certimate/ui/dist/assets/index-Cum7econ.js
2024-09-22 20:00:55 +08:00

304 lines
736 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 aT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var aU=aT((xU,Uu)=>{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 i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{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 i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rw={exports:{}},$d={},nw={exports:{}},et={};/**
* @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 cc=Symbol.for("react.element"),lT=Symbol.for("react.portal"),cT=Symbol.for("react.fragment"),uT=Symbol.for("react.strict_mode"),dT=Symbol.for("react.profiler"),fT=Symbol.for("react.provider"),hT=Symbol.for("react.context"),pT=Symbol.for("react.forward_ref"),mT=Symbol.for("react.suspense"),gT=Symbol.for("react.memo"),vT=Symbol.for("react.lazy"),wy=Symbol.iterator;function yT(e){return e===null||typeof e!="object"?null:(e=wy&&e[wy]||e["@@iterator"],typeof e=="function"?e:null)}var sw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iw=Object.assign,ow={};function va(e,t,r){this.props=e,this.context=t,this.refs=ow,this.updater=r||sw}va.prototype.isReactComponent={};va.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")};va.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function aw(){}aw.prototype=va.prototype;function jm(e,t,r){this.props=e,this.context=t,this.refs=ow,this.updater=r||sw}var Tm=jm.prototype=new aw;Tm.constructor=jm;iw(Tm,va.prototype);Tm.isPureReactComponent=!0;var _y=Array.isArray,lw=Object.prototype.hasOwnProperty,Nm={current:null},cw={key:!0,ref:!0,__self:!0,__source:!0};function uw(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)lw.call(t,n)&&!cw.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:cc,type:e,key:i,ref:o,props:s,_owner:Nm.current}}function xT(e,t){return{$$typeof:cc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rm(e){return typeof e=="object"&&e!==null&&e.$$typeof===cc}function wT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var by=/\/+/g;function eh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wT(""+e.key):t.toString(36)}function vu(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case cc:case lT:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+eh(o,0):n,_y(s)?(r="",e!=null&&(r=e.replace(by,"$&/")+"/"),vu(s,t,r,"",function(u){return u})):s!=null&&(Rm(s)&&(s=xT(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(by,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",_y(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+eh(i,a);o+=vu(i,t,r,l,s)}else if(l=yT(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+eh(i,a++),o+=vu(i,t,r,l,s);else if(i==="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 o}function Uc(e,t,r){if(e==null)return e;var n=[],s=0;return vu(e,n,"","",function(i){return t.call(r,i,s++)}),n}function _T(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 gr={current:null},yu={transition:null},bT={ReactCurrentDispatcher:gr,ReactCurrentBatchConfig:yu,ReactCurrentOwner:Nm};function dw(){throw Error("act(...) is not supported in production builds of React.")}et.Children={map:Uc,forEach:function(e,t,r){Uc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Uc(e,function(){t++}),t},toArray:function(e){return Uc(e,function(t){return t})||[]},only:function(e){if(!Rm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};et.Component=va;et.Fragment=cT;et.Profiler=dT;et.PureComponent=jm;et.StrictMode=uT;et.Suspense=mT;et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bT;et.act=dw;et.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=iw({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Nm.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)lw.call(t,l)&&!cw.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:cc,type:e.type,key:s,ref:i,props:n,_owner:o}};et.createContext=function(e){return e={$$typeof:hT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:fT,_context:e},e.Consumer=e};et.createElement=uw;et.createFactory=function(e){var t=uw.bind(null,e);return t.type=e,t};et.createRef=function(){return{current:null}};et.forwardRef=function(e){return{$$typeof:pT,render:e}};et.isValidElement=Rm;et.lazy=function(e){return{$$typeof:vT,_payload:{_status:-1,_result:e},_init:_T}};et.memo=function(e,t){return{$$typeof:gT,type:e,compare:t===void 0?null:t}};et.startTransition=function(e){var t=yu.transition;yu.transition={};try{e()}finally{yu.transition=t}};et.unstable_act=dw;et.useCallback=function(e,t){return gr.current.useCallback(e,t)};et.useContext=function(e){return gr.current.useContext(e)};et.useDebugValue=function(){};et.useDeferredValue=function(e){return gr.current.useDeferredValue(e)};et.useEffect=function(e,t){return gr.current.useEffect(e,t)};et.useId=function(){return gr.current.useId()};et.useImperativeHandle=function(e,t,r){return gr.current.useImperativeHandle(e,t,r)};et.useInsertionEffect=function(e,t){return gr.current.useInsertionEffect(e,t)};et.useLayoutEffect=function(e,t){return gr.current.useLayoutEffect(e,t)};et.useMemo=function(e,t){return gr.current.useMemo(e,t)};et.useReducer=function(e,t,r){return gr.current.useReducer(e,t,r)};et.useRef=function(e){return gr.current.useRef(e)};et.useState=function(e){return gr.current.useState(e)};et.useSyncExternalStore=function(e,t,r){return gr.current.useSyncExternalStore(e,t,r)};et.useTransition=function(){return gr.current.useTransition()};et.version="18.3.1";nw.exports=et;var y=nw.exports;const tt=Em(y),fw=tw({__proto__:null,default:tt},[y]);/**
* @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 ST=y,kT=Symbol.for("react.element"),CT=Symbol.for("react.fragment"),ET=Object.prototype.hasOwnProperty,jT=ST.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TT={key:!0,ref:!0,__self:!0,__source:!0};function hw(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)ET.call(t,n)&&!TT.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:kT,type:e,key:i,ref:o,props:s,_owner:jT.current}}$d.Fragment=CT;$d.jsx=hw;$d.jsxs=hw;rw.exports=$d;var c=rw.exports,qh={},pw={exports:{}},Br={},mw={exports:{}},gw={};/**
* @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(Z,I){var Q=Z.length;Z.push(I);e:for(;0<Q;){var z=Q-1>>>1,V=Z[z];if(0<s(V,I))Z[z]=I,Z[Q]=V,Q=z;else break e}}function r(Z){return Z.length===0?null:Z[0]}function n(Z){if(Z.length===0)return null;var I=Z[0],Q=Z.pop();if(Q!==I){Z[0]=Q;e:for(var z=0,V=Z.length,fe=V>>>1;z<fe;){var ne=2*(z+1)-1,se=Z[ne],Ae=ne+1,he=Z[Ae];if(0>s(se,Q))Ae<V&&0>s(he,se)?(Z[z]=he,Z[Ae]=Q,z=Ae):(Z[z]=se,Z[ne]=Q,z=ne);else if(Ae<V&&0>s(he,Q))Z[z]=he,Z[Ae]=Q,z=Ae;else break e}}return I}function s(Z,I){var Q=Z.sortIndex-I.sortIndex;return Q!==0?Q:Z.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,f=null,m=3,v=!1,x=!1,g=!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(Z){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=Z)n(u),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(u)}}function C(Z){if(g=!1,w(Z),!x)if(r(l)!==null)x=!0,te(E);else{var I=r(u);I!==null&&B(C,I.startTime-Z)}}function E(Z,I){x=!1,g&&(g=!1,p(P),P=-1),v=!0;var Q=m;try{for(w(I),f=r(l);f!==null&&(!(f.expirationTime>I)||Z&&!q());){var z=f.callback;if(typeof z=="function"){f.callback=null,m=f.priorityLevel;var V=z(f.expirationTime<=I);I=e.unstable_now(),typeof V=="function"?f.callback=V:f===r(l)&&n(l),w(I)}else n(l);f=r(l)}if(f!==null)var fe=!0;else{var ne=r(u);ne!==null&&B(C,ne.startTime-I),fe=!1}return fe}finally{f=null,m=Q,v=!1}}var j=!1,R=null,P=-1,A=5,L=-1;function q(){return!(e.unstable_now()-L<A)}function T(){if(R!==null){var Z=e.unstable_now();L=Z;var I=!0;try{I=R(!0,Z)}finally{I?F():(j=!1,R=null)}}else j=!1}var F;if(typeof h=="function")F=function(){h(T)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,$=b.port2;b.port1.onmessage=T,F=function(){$.postMessage(null)}}else F=function(){_(T,0)};function te(Z){R=Z,j||(j=!0,F())}function B(Z,I){P=_(function(){Z(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(Z){Z.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,te(E))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(Z){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var Q=m;m=I;try{return Z()}finally{m=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,I){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var Q=m;m=Z;try{return I()}finally{m=Q}},e.unstable_scheduleCallback=function(Z,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,Z){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=Q+V,Z={id:d++,callback:I,priorityLevel:Z,startTime:Q,expirationTime:V,sortIndex:-1},Q>z?(Z.sortIndex=Q,t(u,Z),r(l)===null&&Z===r(u)&&(g?(p(P),P=-1):g=!0,B(C,Q-z))):(Z.sortIndex=V,t(l,Z),x||v||(x=!0,te(E))),Z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Z){var I=m;return function(){var Q=m;m=I;try{return Z.apply(this,arguments)}finally{m=Q}}}})(gw);mw.exports=gw;var NT=mw.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 RT=y,$r=NT;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 vw=new Set,xl={};function no(e,t){na(e,t),na(e+"Capture",t)}function na(e,t){for(xl[e]=t,e=0;e<t.length;e++)vw.add(t[e])}var gs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xh=Object.prototype.hasOwnProperty,PT=/^[: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]*$/,Sy={},ky={};function AT(e){return Xh.call(ky,e)?!0:Xh.call(Sy,e)?!1:PT.test(e)?ky[e]=!0:(Sy[e]=!0,!1)}function DT(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 OT(e,t,r,n){if(t===null||typeof t>"u"||DT(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 vr(e,t,r,n,s,i,o){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=i,this.removeEmptyString=o}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new vr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rr[t]=new vr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new vr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new vr(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){rr[e]=new vr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new vr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new vr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new vr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new vr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pm=/[\-:]([a-z])/g;function Am(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(Pm,Am);rr[t]=new vr(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(Pm,Am);rr[t]=new vr(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(Pm,Am);rr[t]=new vr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new vr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new vr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new vr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dm(e,t,r,n){var s=rr.hasOwnProperty(t)?rr[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(OT(t,r,s,n)&&(r=null),n||s===null?AT(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 Es=RT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vc=Symbol.for("react.element"),ko=Symbol.for("react.portal"),Co=Symbol.for("react.fragment"),Om=Symbol.for("react.strict_mode"),Qh=Symbol.for("react.profiler"),yw=Symbol.for("react.provider"),xw=Symbol.for("react.context"),Mm=Symbol.for("react.forward_ref"),Jh=Symbol.for("react.suspense"),ep=Symbol.for("react.suspense_list"),Im=Symbol.for("react.memo"),Vs=Symbol.for("react.lazy"),ww=Symbol.for("react.offscreen"),Cy=Symbol.iterator;function Da(e){return e===null||typeof e!="object"?null:(e=Cy&&e[Cy]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,th;function Ga(e){if(th===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);th=t&&t[1]||""}return`
`+th+e}var rh=!1;function nh(e,t){if(!e||rh)return"";rh=!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(`
`),i=n.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{rh=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ga(e):""}function MT(e){switch(e.tag){case 5:return Ga(e.type);case 16:return Ga("Lazy");case 13:return Ga("Suspense");case 19:return Ga("SuspenseList");case 0:case 2:case 15:return e=nh(e.type,!1),e;case 11:return e=nh(e.type.render,!1),e;case 1:return e=nh(e.type,!0),e;default:return""}}function tp(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 Co:return"Fragment";case ko:return"Portal";case Qh:return"Profiler";case Om:return"StrictMode";case Jh:return"Suspense";case ep:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xw:return(e.displayName||"Context")+".Consumer";case yw:return(e._context.displayName||"Context")+".Provider";case Mm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Im:return t=e.displayName||null,t!==null?t:tp(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return tp(e(t))}catch{}}return null}function IT(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 tp(t);case 8:return t===Om?"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 ci(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _w(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LT(e){var t=_w(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,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $c(e){e._valueTracker||(e._valueTracker=LT(e))}function bw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=_w(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vu(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 rp(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ey(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ci(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 Sw(e,t){t=t.checked,t!=null&&Dm(e,"checked",t,!1)}function np(e,t){Sw(e,t);var r=ci(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")?sp(e,t.type,r):t.hasOwnProperty("defaultValue")&&sp(e,t.type,ci(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jy(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 sp(e,t,r){(t!=="number"||Vu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var qa=Array.isArray;function Vo(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=""+ci(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 ip(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ty(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(qa(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ci(r)}}function kw(e,t){var r=ci(t.value),n=ci(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 Ny(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Cw(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 op(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Cw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Bc,Ew=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(Bc=Bc||document.createElement("div"),Bc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Bc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var il={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},FT=["Webkit","ms","Moz","O"];Object.keys(il).forEach(function(e){FT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),il[t]=il[e]})});function jw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||il.hasOwnProperty(e)&&il[e]?(""+t).trim():t+"px"}function Tw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=jw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var zT=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 ap(e,t){if(t){if(zT[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 lp(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 cp=null;function Lm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var up=null,$o=null,Bo=null;function Ry(e){if(e=fc(e)){if(typeof up!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=Zd(t),up(e.stateNode,e.type,t))}}function Nw(e){$o?Bo?Bo.push(e):Bo=[e]:$o=e}function Rw(){if($o){var e=$o,t=Bo;if(Bo=$o=null,Ry(e),t)for(e=0;e<t.length;e++)Ry(t[e])}}function Pw(e,t){return e(t)}function Aw(){}var sh=!1;function Dw(e,t,r){if(sh)return e(t,r);sh=!0;try{return Pw(e,t,r)}finally{sh=!1,($o!==null||Bo!==null)&&(Aw(),Rw())}}function _l(e,t){var r=e.stateNode;if(r===null)return null;var n=Zd(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 dp=!1;if(gs)try{var Oa={};Object.defineProperty(Oa,"passive",{get:function(){dp=!0}}),window.addEventListener("test",Oa,Oa),window.removeEventListener("test",Oa,Oa)}catch{dp=!1}function UT(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var ol=!1,$u=null,Bu=!1,fp=null,VT={onError:function(e){ol=!0,$u=e}};function $T(e,t,r,n,s,i,o,a,l){ol=!1,$u=null,UT.apply(VT,arguments)}function BT(e,t,r,n,s,i,o,a,l){if($T.apply(this,arguments),ol){if(ol){var u=$u;ol=!1,$u=null}else throw Error(ie(198));Bu||(Bu=!0,fp=u)}}function so(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 Ow(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 Py(e){if(so(e)!==e)throw Error(ie(188))}function WT(e){var t=e.alternate;if(!t){if(t=so(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 i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Py(s),e;if(i===n)return Py(s),t;i=i.sibling}throw Error(ie(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)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 Mw(e){return e=WT(e),e!==null?Iw(e):null}function Iw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Iw(e);if(t!==null)return t;e=e.sibling}return null}var Lw=$r.unstable_scheduleCallback,Ay=$r.unstable_cancelCallback,HT=$r.unstable_shouldYield,YT=$r.unstable_requestPaint,Ut=$r.unstable_now,ZT=$r.unstable_getCurrentPriorityLevel,Fm=$r.unstable_ImmediatePriority,Fw=$r.unstable_UserBlockingPriority,Wu=$r.unstable_NormalPriority,KT=$r.unstable_LowPriority,zw=$r.unstable_IdlePriority,Bd=null,Un=null;function GT(e){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(Bd,e,void 0,(e.current.flags&128)===128)}catch{}}var vn=Math.clz32?Math.clz32:QT,qT=Math.log,XT=Math.LN2;function QT(e){return e>>>=0,e===0?32:31-(qT(e)/XT|0)|0}var Wc=64,Hc=4194304;function Xa(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 Hu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Xa(a):(i&=o,i!==0&&(n=Xa(i)))}else o=r&~s,o!==0?n=Xa(o):i!==0&&(n=Xa(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&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-vn(t),s=1<<r,n|=e[r],t&=~s;return n}function JT(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 eN(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-vn(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=JT(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function hp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Uw(){var e=Wc;return Wc<<=1,!(Wc&4194240)&&(Wc=64),e}function ih(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function uc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=r}function tN(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-vn(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function zm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-vn(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var pt=0;function Vw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $w,Um,Bw,Ww,Hw,pp=!1,Yc=[],Js=null,ei=null,ti=null,bl=new Map,Sl=new Map,Bs=[],rN="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 Dy(e,t){switch(e){case"focusin":case"focusout":Js=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":bl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sl.delete(t.pointerId)}}function Ma(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=fc(t),t!==null&&Um(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function nN(e,t,r,n,s){switch(t){case"focusin":return Js=Ma(Js,e,t,r,n,s),!0;case"dragenter":return ei=Ma(ei,e,t,r,n,s),!0;case"mouseover":return ti=Ma(ti,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return bl.set(i,Ma(bl.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Sl.set(i,Ma(Sl.get(i)||null,e,t,r,n,s)),!0}return!1}function Yw(e){var t=Di(e.target);if(t!==null){var r=so(t);if(r!==null){if(t=r.tag,t===13){if(t=Ow(r),t!==null){e.blockedOn=t,Hw(e.priority,function(){Bw(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 xu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);cp=n,r.target.dispatchEvent(n),cp=null}else return t=fc(r),t!==null&&Um(t),e.blockedOn=r,!1;t.shift()}return!0}function Oy(e,t,r){xu(e)&&r.delete(t)}function sN(){pp=!1,Js!==null&&xu(Js)&&(Js=null),ei!==null&&xu(ei)&&(ei=null),ti!==null&&xu(ti)&&(ti=null),bl.forEach(Oy),Sl.forEach(Oy)}function Ia(e,t){e.blockedOn===t&&(e.blockedOn=null,pp||(pp=!0,$r.unstable_scheduleCallback($r.unstable_NormalPriority,sN)))}function kl(e){function t(s){return Ia(s,e)}if(0<Yc.length){Ia(Yc[0],e);for(var r=1;r<Yc.length;r++){var n=Yc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Js!==null&&Ia(Js,e),ei!==null&&Ia(ei,e),ti!==null&&Ia(ti,e),bl.forEach(t),Sl.forEach(t),r=0;r<Bs.length;r++)n=Bs[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Bs.length&&(r=Bs[0],r.blockedOn===null);)Yw(r),r.blockedOn===null&&Bs.shift()}var Wo=Es.ReactCurrentBatchConfig,Yu=!0;function iN(e,t,r,n){var s=pt,i=Wo.transition;Wo.transition=null;try{pt=1,Vm(e,t,r,n)}finally{pt=s,Wo.transition=i}}function oN(e,t,r,n){var s=pt,i=Wo.transition;Wo.transition=null;try{pt=4,Vm(e,t,r,n)}finally{pt=s,Wo.transition=i}}function Vm(e,t,r,n){if(Yu){var s=mp(e,t,r,n);if(s===null)mh(e,t,n,Zu,r),Dy(e,n);else if(nN(s,e,t,r,n))n.stopPropagation();else if(Dy(e,n),t&4&&-1<rN.indexOf(e)){for(;s!==null;){var i=fc(s);if(i!==null&&$w(i),i=mp(e,t,r,n),i===null&&mh(e,t,n,Zu,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else mh(e,t,n,null,r)}}var Zu=null;function mp(e,t,r,n){if(Zu=null,e=Lm(n),e=Di(e),e!==null)if(t=so(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Ow(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 Zu=e,null}function Zw(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 Fm:return 1;case Fw:return 4;case Wu:case KT:return 16;case zw:return 536870912;default:return 16}default:return 16}}var Ks=null,$m=null,wu=null;function Kw(){if(wu)return wu;var e,t=$m,r=t.length,n,s="value"in Ks?Ks.value:Ks.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return wu=s.slice(e,1<n?1-n:void 0)}function _u(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 Zc(){return!0}function My(){return!1}function Wr(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zc:My,this.isPropagationStopped=My,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=Zc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Zc)},persist:function(){},isPersistent:Zc}),t}var ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bm=Wr(ya),dc=Mt({},ya,{view:0,detail:0}),aN=Wr(dc),oh,ah,La,Wd=Mt({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wm,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!==La&&(La&&e.type==="mousemove"?(oh=e.screenX-La.screenX,ah=e.screenY-La.screenY):ah=oh=0,La=e),oh)},movementY:function(e){return"movementY"in e?e.movementY:ah}}),Iy=Wr(Wd),lN=Mt({},Wd,{dataTransfer:0}),cN=Wr(lN),uN=Mt({},dc,{relatedTarget:0}),lh=Wr(uN),dN=Mt({},ya,{animationName:0,elapsedTime:0,pseudoElement:0}),fN=Wr(dN),hN=Mt({},ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pN=Wr(hN),mN=Mt({},ya,{data:0}),Ly=Wr(mN),gN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vN={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"},yN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yN[e])?!!t[e]:!1}function Wm(){return xN}var wN=Mt({},dc,{key:function(e){if(e.key){var t=gN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_u(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wm,charCode:function(e){return e.type==="keypress"?_u(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_u(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_N=Wr(wN),bN=Mt({},Wd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fy=Wr(bN),SN=Mt({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wm}),kN=Wr(SN),CN=Mt({},ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),EN=Wr(CN),jN=Mt({},Wd,{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}),TN=Wr(jN),NN=[9,13,27,32],Hm=gs&&"CompositionEvent"in window,al=null;gs&&"documentMode"in document&&(al=document.documentMode);var RN=gs&&"TextEvent"in window&&!al,Gw=gs&&(!Hm||al&&8<al&&11>=al),zy=" ",Uy=!1;function qw(e,t){switch(e){case"keyup":return NN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function PN(e,t){switch(e){case"compositionend":return Xw(t);case"keypress":return t.which!==32?null:(Uy=!0,zy);case"textInput":return e=t.data,e===zy&&Uy?null:e;default:return null}}function AN(e,t){if(Eo)return e==="compositionend"||!Hm&&qw(e,t)?(e=Kw(),wu=$m=Ks=null,Eo=!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 Gw&&t.locale!=="ko"?null:t.data;default:return null}}var DN={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 Vy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!DN[e.type]:t==="textarea"}function Qw(e,t,r,n){Nw(n),t=Ku(t,"onChange"),0<t.length&&(r=new Bm("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var ll=null,Cl=null;function ON(e){c_(e,0)}function Hd(e){var t=No(e);if(bw(t))return e}function MN(e,t){if(e==="change")return t}var Jw=!1;if(gs){var ch;if(gs){var uh="oninput"in document;if(!uh){var $y=document.createElement("div");$y.setAttribute("oninput","return;"),uh=typeof $y.oninput=="function"}ch=uh}else ch=!1;Jw=ch&&(!document.documentMode||9<document.documentMode)}function By(){ll&&(ll.detachEvent("onpropertychange",e_),Cl=ll=null)}function e_(e){if(e.propertyName==="value"&&Hd(Cl)){var t=[];Qw(t,Cl,e,Lm(e)),Dw(ON,t)}}function IN(e,t,r){e==="focusin"?(By(),ll=t,Cl=r,ll.attachEvent("onpropertychange",e_)):e==="focusout"&&By()}function LN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hd(Cl)}function FN(e,t){if(e==="click")return Hd(t)}function zN(e,t){if(e==="input"||e==="change")return Hd(t)}function UN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _n=typeof Object.is=="function"?Object.is:UN;function El(e,t){if(_n(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(!Xh.call(t,s)||!_n(e[s],t[s]))return!1}return!0}function Wy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hy(e,t){var r=Wy(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=Wy(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=Vu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vu(e.document)}return t}function Ym(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 VN(e){var t=r_(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&t_(r.ownerDocument.documentElement,r)){if(n!==null&&Ym(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,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Hy(r,i);var o=Hy(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 $N=gs&&"documentMode"in document&&11>=document.documentMode,jo=null,gp=null,cl=null,vp=!1;function Yy(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vp||jo==null||jo!==Vu(n)||(n=jo,"selectionStart"in n&&Ym(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}),cl&&El(cl,n)||(cl=n,n=Ku(gp,"onSelect"),0<n.length&&(t=new Bm("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=jo)))}function Kc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var To={animationend:Kc("Animation","AnimationEnd"),animationiteration:Kc("Animation","AnimationIteration"),animationstart:Kc("Animation","AnimationStart"),transitionend:Kc("Transition","TransitionEnd")},dh={},n_={};gs&&(n_=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function Yd(e){if(dh[e])return dh[e];if(!To[e])return e;var t=To[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in n_)return dh[e]=t[r];return e}var s_=Yd("animationend"),i_=Yd("animationiteration"),o_=Yd("animationstart"),a_=Yd("transitionend"),l_=new Map,Zy="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 yi(e,t){l_.set(e,t),no(t,[e])}for(var fh=0;fh<Zy.length;fh++){var hh=Zy[fh],BN=hh.toLowerCase(),WN=hh[0].toUpperCase()+hh.slice(1);yi(BN,"on"+WN)}yi(s_,"onAnimationEnd");yi(i_,"onAnimationIteration");yi(o_,"onAnimationStart");yi("dblclick","onDoubleClick");yi("focusin","onFocus");yi("focusout","onBlur");yi(a_,"onTransitionEnd");na("onMouseEnter",["mouseout","mouseover"]);na("onMouseLeave",["mouseout","mouseover"]);na("onPointerEnter",["pointerout","pointerover"]);na("onPointerLeave",["pointerout","pointerover"]);no("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));no("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));no("onBeforeInput",["compositionend","keypress","textInput","paste"]);no("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));no("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));no("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qa="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(" "),HN=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qa));function Ky(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,BT(n,t,void 0,e),e.currentTarget=null}function c_(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 i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Ky(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Ky(s,a,u),i=l}}}if(Bu)throw e=fp,Bu=!1,fp=null,e}function bt(e,t){var r=t[bp];r===void 0&&(r=t[bp]=new Set);var n=e+"__bubble";r.has(n)||(u_(t,e,2,!1),r.add(n))}function ph(e,t,r){var n=0;t&&(n|=4),u_(r,e,n,t)}var Gc="_reactListening"+Math.random().toString(36).slice(2);function jl(e){if(!e[Gc]){e[Gc]=!0,vw.forEach(function(r){r!=="selectionchange"&&(HN.has(r)||ph(r,!1,e),ph(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gc]||(t[Gc]=!0,ph("selectionchange",!1,t))}}function u_(e,t,r,n){switch(Zw(t)){case 1:var s=iN;break;case 4:s=oN;break;default:s=Vm}r=s.bind(null,t,r,e),s=void 0,!dp||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 mh(e,t,r,n,s){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Di(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Dw(function(){var u=i,d=Lm(r),f=[];e:{var m=l_.get(e);if(m!==void 0){var v=Bm,x=e;switch(e){case"keypress":if(_u(r)===0)break e;case"keydown":case"keyup":v=_N;break;case"focusin":x="focus",v=lh;break;case"focusout":x="blur",v=lh;break;case"beforeblur":case"afterblur":v=lh;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=Iy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=cN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=kN;break;case s_:case i_:case o_:v=fN;break;case a_:v=EN;break;case"scroll":v=aN;break;case"wheel":v=TN;break;case"copy":case"cut":case"paste":v=pN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Fy}var g=(t&4)!==0,_=!g&&e==="scroll",p=g?m!==null?m+"Capture":null:m;g=[];for(var h=u,w;h!==null;){w=h;var C=w.stateNode;if(w.tag===5&&C!==null&&(w=C,p!==null&&(C=_l(h,p),C!=null&&g.push(Tl(h,C,w)))),_)break;h=h.return}0<g.length&&(m=new v(m,x,null,r,d),f.push({event:m,listeners:g}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&r!==cp&&(x=r.relatedTarget||r.fromElement)&&(Di(x)||x[vs]))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?Di(x):null,x!==null&&(_=so(x),x!==_||x.tag!==5&&x.tag!==6)&&(x=null)):(v=null,x=u),v!==x)){if(g=Iy,C="onMouseLeave",p="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(g=Fy,C="onPointerLeave",p="onPointerEnter",h="pointer"),_=v==null?m:No(v),w=x==null?m:No(x),m=new g(C,h+"leave",v,r,d),m.target=_,m.relatedTarget=w,C=null,Di(d)===u&&(g=new g(p,h+"enter",x,r,d),g.target=w,g.relatedTarget=_,C=g),_=C,v&&x)t:{for(g=v,p=x,h=0,w=g;w;w=mo(w))h++;for(w=0,C=p;C;C=mo(C))w++;for(;0<h-w;)g=mo(g),h--;for(;0<w-h;)p=mo(p),w--;for(;h--;){if(g===p||p!==null&&g===p.alternate)break t;g=mo(g),p=mo(p)}g=null}else g=null;v!==null&&Gy(f,m,v,g,!1),x!==null&&_!==null&&Gy(f,_,x,g,!0)}}e:{if(m=u?No(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var E=MN;else if(Vy(m))if(Jw)E=zN;else{E=LN;var j=IN}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(E=FN);if(E&&(E=E(e,u))){Qw(f,E,r,d);break e}j&&j(e,m,u),e==="focusout"&&(j=m._wrapperState)&&j.controlled&&m.type==="number"&&sp(m,"number",m.value)}switch(j=u?No(u):window,e){case"focusin":(Vy(j)||j.contentEditable==="true")&&(jo=j,gp=u,cl=null);break;case"focusout":cl=gp=jo=null;break;case"mousedown":vp=!0;break;case"contextmenu":case"mouseup":case"dragend":vp=!1,Yy(f,r,d);break;case"selectionchange":if($N)break;case"keydown":case"keyup":Yy(f,r,d)}var R;if(Hm)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 Eo?qw(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(Gw&&r.locale!=="ko"&&(Eo||P!=="onCompositionStart"?P==="onCompositionEnd"&&Eo&&(R=Kw()):(Ks=d,$m="value"in Ks?Ks.value:Ks.textContent,Eo=!0)),j=Ku(u,P),0<j.length&&(P=new Ly(P,e,null,r,d),f.push({event:P,listeners:j}),R?P.data=R:(R=Xw(r),R!==null&&(P.data=R)))),(R=RN?PN(e,r):AN(e,r))&&(u=Ku(u,"onBeforeInput"),0<u.length&&(d=new Ly("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=R))}c_(f,t)})}function Tl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ku(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=_l(e,r),i!=null&&n.unshift(Tl(e,i,s)),i=_l(e,t),i!=null&&n.push(Tl(e,i,s))),e=e.return}return n}function mo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Gy(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=_l(r,i),l!=null&&o.unshift(Tl(r,l,a))):s||(l=_l(r,i),l!=null&&o.push(Tl(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var YN=/\r\n?/g,ZN=/\u0000|\uFFFD/g;function qy(e){return(typeof e=="string"?e:""+e).replace(YN,`
`).replace(ZN,"")}function qc(e,t,r){if(t=qy(t),qy(e)!==t&&r)throw Error(ie(425))}function Gu(){}var yp=null,xp=null;function wp(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 _p=typeof setTimeout=="function"?setTimeout:void 0,KN=typeof clearTimeout=="function"?clearTimeout:void 0,Xy=typeof Promise=="function"?Promise:void 0,GN=typeof queueMicrotask=="function"?queueMicrotask:typeof Xy<"u"?function(e){return Xy.resolve(null).then(e).catch(qN)}:_p;function qN(e){setTimeout(function(){throw e})}function gh(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),kl(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);kl(t)}function ri(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 Qy(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 xa=Math.random().toString(36).slice(2),On="__reactFiber$"+xa,Nl="__reactProps$"+xa,vs="__reactContainer$"+xa,bp="__reactEvents$"+xa,XN="__reactListeners$"+xa,QN="__reactHandles$"+xa;function Di(e){var t=e[On];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vs]||r[On]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Qy(e);e!==null;){if(r=e[On])return r;e=Qy(e)}return t}e=r,r=e.parentNode}return null}function fc(e){return e=e[On]||e[vs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function No(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function Zd(e){return e[Nl]||null}var Sp=[],Ro=-1;function xi(e){return{current:e}}function St(e){0>Ro||(e.current=Sp[Ro],Sp[Ro]=null,Ro--)}function wt(e,t){Ro++,Sp[Ro]=e.current,e.current=t}var ui={},lr=xi(ui),kr=xi(!1),Hi=ui;function sa(e,t){var r=e.type.contextTypes;if(!r)return ui;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Cr(e){return e=e.childContextTypes,e!=null}function qu(){St(kr),St(lr)}function Jy(e,t,r){if(lr.current!==ui)throw Error(ie(168));wt(lr,t),wt(kr,r)}function d_(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,IT(e)||"Unknown",s));return Mt({},r,n)}function Xu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ui,Hi=lr.current,wt(lr,e),wt(kr,kr.current),!0}function ex(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=d_(e,t,Hi),n.__reactInternalMemoizedMergedChildContext=e,St(kr),St(lr),wt(lr,e)):St(kr),wt(kr,r)}var as=null,Kd=!1,vh=!1;function f_(e){as===null?as=[e]:as.push(e)}function JN(e){Kd=!0,f_(e)}function wi(){if(!vh&&as!==null){vh=!0;var e=0,t=pt;try{var r=as;for(pt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}as=null,Kd=!1}catch(s){throw as!==null&&(as=as.slice(e+1)),Lw(Fm,wi),s}finally{pt=t,vh=!1}}return null}var Po=[],Ao=0,Qu=null,Ju=0,qr=[],Xr=0,Yi=null,ls=1,cs="";function Ti(e,t){Po[Ao++]=Ju,Po[Ao++]=Qu,Qu=e,Ju=t}function h_(e,t,r){qr[Xr++]=ls,qr[Xr++]=cs,qr[Xr++]=Yi,Yi=e;var n=ls;e=cs;var s=32-vn(n)-1;n&=~(1<<s),r+=1;var i=32-vn(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,ls=1<<32-vn(t)+s|r<<s|n,cs=i+e}else ls=1<<i|r<<s|n,cs=e}function Zm(e){e.return!==null&&(Ti(e,1),h_(e,1,0))}function Km(e){for(;e===Qu;)Qu=Po[--Ao],Po[Ao]=null,Ju=Po[--Ao],Po[Ao]=null;for(;e===Yi;)Yi=qr[--Xr],qr[Xr]=null,cs=qr[--Xr],qr[Xr]=null,ls=qr[--Xr],qr[Xr]=null}var Fr=null,Lr=null,Nt=!1,hn=null;function p_(e,t){var r=Jr(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 tx(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,Fr=e,Lr=ri(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Fr=e,Lr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Yi!==null?{id:ls,overflow:cs}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Jr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Fr=e,Lr=null,!0):!1;default:return!1}}function kp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cp(e){if(Nt){var t=Lr;if(t){var r=t;if(!tx(e,t)){if(kp(e))throw Error(ie(418));t=ri(r.nextSibling);var n=Fr;t&&tx(e,t)?p_(n,r):(e.flags=e.flags&-4097|2,Nt=!1,Fr=e)}}else{if(kp(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Nt=!1,Fr=e}}}function rx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Fr=e}function Xc(e){if(e!==Fr)return!1;if(!Nt)return rx(e),Nt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wp(e.type,e.memoizedProps)),t&&(t=Lr)){if(kp(e))throw m_(),Error(ie(418));for(;t;)p_(e,t),t=ri(t.nextSibling)}if(rx(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){Lr=ri(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Lr=null}}else Lr=Fr?ri(e.stateNode.nextSibling):null;return!0}function m_(){for(var e=Lr;e;)e=ri(e.nextSibling)}function ia(){Lr=Fr=null,Nt=!1}function Gm(e){hn===null?hn=[e]:hn.push(e)}var e2=Es.ReactCurrentBatchConfig;function Fa(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,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function Qc(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function nx(e){var t=e._init;return t(e._payload)}function g_(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=oi(p,h),p.index=0,p.sibling=null,p}function i(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 o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,h,w,C){return h===null||h.tag!==6?(h=kh(w,p.mode,C),h.return=p,h):(h=s(h,w),h.return=p,h)}function l(p,h,w,C){var E=w.type;return E===Co?d(p,h,w.props.children,C,w.key):h!==null&&(h.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Vs&&nx(E)===h.type)?(C=s(h,w.props),C.ref=Fa(p,h,w),C.return=p,C):(C=Tu(w.type,w.key,w.props,null,p.mode,C),C.ref=Fa(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=Ch(w,p.mode,C),h.return=p,h):(h=s(h,w.children||[]),h.return=p,h)}function d(p,h,w,C,E){return h===null||h.tag!==7?(h=$i(w,p.mode,C,E),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=kh(""+h,p.mode,w),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Vc:return w=Tu(h.type,h.key,h.props,null,p.mode,w),w.ref=Fa(p,null,h),w.return=p,w;case ko:return h=Ch(h,p.mode,w),h.return=p,h;case Vs:var C=h._init;return f(p,C(h._payload),w)}if(qa(h)||Da(h))return h=$i(h,p.mode,w,null),h.return=p,h;Qc(p,h)}return null}function m(p,h,w,C){var E=h!==null?h.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:a(p,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Vc:return w.key===E?l(p,h,w,C):null;case ko:return w.key===E?u(p,h,w,C):null;case Vs:return E=w._init,m(p,h,E(w._payload),C)}if(qa(w)||Da(w))return E!==null?null:d(p,h,w,C,null);Qc(p,w)}return null}function v(p,h,w,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return p=p.get(w)||null,a(h,p,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Vc:return p=p.get(C.key===null?w:C.key)||null,l(h,p,C,E);case ko:return p=p.get(C.key===null?w:C.key)||null,u(h,p,C,E);case Vs:var j=C._init;return v(p,h,w,j(C._payload),E)}if(qa(C)||Da(C))return p=p.get(w)||null,d(h,p,C,E,null);Qc(h,C)}return null}function x(p,h,w,C){for(var E=null,j=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=i(L,h,P),j===null?E=L:j.sibling=L,j=L,R=A}if(P===w.length)return r(p,R),Nt&&Ti(p,P),E;if(R===null){for(;P<w.length;P++)R=f(p,w[P],C),R!==null&&(h=i(R,h,P),j===null?E=R:j.sibling=R,j=R);return Nt&&Ti(p,P),E}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=i(A,h,P),j===null?E=A:j.sibling=A,j=A);return e&&R.forEach(function(q){return t(p,q)}),Nt&&Ti(p,P),E}function g(p,h,w,C){var E=Da(w);if(typeof E!="function")throw Error(ie(150));if(w=E.call(w),w==null)throw Error(ie(151));for(var j=E=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=i(q,h,P),j===null?E=q:j.sibling=q,j=q,R=A}if(L.done)return r(p,R),Nt&&Ti(p,P),E;if(R===null){for(;!L.done;P++,L=w.next())L=f(p,L.value,C),L!==null&&(h=i(L,h,P),j===null?E=L:j.sibling=L,j=L);return Nt&&Ti(p,P),E}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=i(L,h,P),j===null?E=L:j.sibling=L,j=L);return e&&R.forEach(function(T){return t(p,T)}),Nt&&Ti(p,P),E}function _(p,h,w,C){if(typeof w=="object"&&w!==null&&w.type===Co&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Vc:e:{for(var E=w.key,j=h;j!==null;){if(j.key===E){if(E=w.type,E===Co){if(j.tag===7){r(p,j.sibling),h=s(j,w.props.children),h.return=p,p=h;break e}}else if(j.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Vs&&nx(E)===j.type){r(p,j.sibling),h=s(j,w.props),h.ref=Fa(p,j,w),h.return=p,p=h;break e}r(p,j);break}else t(p,j);j=j.sibling}w.type===Co?(h=$i(w.props.children,p.mode,C,w.key),h.return=p,p=h):(C=Tu(w.type,w.key,w.props,null,p.mode,C),C.ref=Fa(p,h,w),C.return=p,p=C)}return o(p);case ko:e:{for(j=w.key;h!==null;){if(h.key===j)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=Ch(w,p.mode,C),h.return=p,p=h}return o(p);case Vs:return j=w._init,_(p,h,j(w._payload),C)}if(qa(w))return x(p,h,w,C);if(Da(w))return g(p,h,w,C);Qc(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=kh(w,p.mode,C),h.return=p,p=h),o(p)):r(p,h)}return _}var oa=g_(!0),v_=g_(!1),ed=xi(null),td=null,Do=null,qm=null;function Xm(){qm=Do=td=null}function Qm(e){var t=ed.current;St(ed),e._currentValue=t}function Ep(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 Ho(e,t){td=e,qm=Do=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Sr=!0),e.firstContext=null)}function rn(e){var t=e._currentValue;if(qm!==e)if(e={context:e,memoizedValue:t,next:null},Do===null){if(td===null)throw Error(ie(308));Do=e,td.dependencies={lanes:0,firstContext:e}}else Do=Do.next=e;return t}var Oi=null;function Jm(e){Oi===null?Oi=[e]:Oi.push(e)}function y_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Jm(t)):(r.next=s.next,s.next=r),t.interleaved=r,ys(e,n)}function ys(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 $s=!1;function eg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function x_(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 fs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ni(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,ys(e,r)}return s=n.interleaved,s===null?(t.next=t,Jm(n)):(t.next=s.next,s.next=t),n.interleaved=t,ys(e,r)}function bu(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,zm(e,r)}}function sx(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 rd(e,t,r,n){var s=e.updateQueue;$s=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,d=u=l=null,a=i;do{var m=a.lane,v=a.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,g=a;switch(m=t,v=r,g.tag){case 1:if(x=g.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=g.payload,m=typeof x=="function"?x.call(v,f,m):x,m==null)break e;f=Mt({},f,m);break e;case 2:$s=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else v={eventTime:v,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=v,l=f):d=d.next=v,o|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ki|=o,e.lanes=o,e.memoizedState=f}}function ix(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 hc={},Vn=xi(hc),Rl=xi(hc),Pl=xi(hc);function Mi(e){if(e===hc)throw Error(ie(174));return e}function tg(e,t){switch(wt(Pl,t),wt(Rl,e),wt(Vn,hc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:op(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=op(t,e)}St(Vn),wt(Vn,t)}function aa(){St(Vn),St(Rl),St(Pl)}function w_(e){Mi(Pl.current);var t=Mi(Vn.current),r=op(t,e.type);t!==r&&(wt(Rl,e),wt(Vn,r))}function rg(e){Rl.current===e&&(St(Vn),St(Rl))}var At=xi(0);function nd(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 yh=[];function ng(){for(var e=0;e<yh.length;e++)yh[e]._workInProgressVersionPrimary=null;yh.length=0}var Su=Es.ReactCurrentDispatcher,xh=Es.ReactCurrentBatchConfig,Zi=0,Ot=null,Zt=null,Xt=null,sd=!1,ul=!1,Al=0,t2=0;function sr(){throw Error(ie(321))}function sg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!_n(e[r],t[r]))return!1;return!0}function ig(e,t,r,n,s,i){if(Zi=i,Ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Su.current=e===null||e.memoizedState===null?i2:o2,e=r(n,s),ul){i=0;do{if(ul=!1,Al=0,25<=i)throw Error(ie(301));i+=1,Xt=Zt=null,t.updateQueue=null,Su.current=a2,e=r(n,s)}while(ul)}if(Su.current=id,t=Zt!==null&&Zt.next!==null,Zi=0,Xt=Zt=Ot=null,sd=!1,t)throw Error(ie(300));return e}function og(){var e=Al!==0;return Al=0,e}function Dn(){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 nn(){if(Zt===null){var e=Ot.alternate;e=e!==null?e.memoizedState:null}else e=Zt.next;var t=Xt===null?Ot.memoizedState:Xt.next;if(t!==null)Xt=t,Zt=e;else{if(e===null)throw Error(ie(310));Zt=e,e={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},Xt===null?Ot.memoizedState=Xt=e:Xt=Xt.next=e}return Xt}function Dl(e,t){return typeof t=="function"?t(e):t}function wh(e){var t=nn(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Zt,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,u=i;do{var d=u.lane;if((Zi&d)===d)l!==null&&(l=l.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};l===null?(a=l=f,o=n):l=l.next=f,Ot.lanes|=d,Ki|=d}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,_n(n,t.memoizedState)||(Sr=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,Ot.lanes|=i,Ki|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function _h(e){var t=nn(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);_n(i,t.memoizedState)||(Sr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function __(){}function b_(e,t){var r=Ot,n=nn(),s=t(),i=!_n(n.memoizedState,s);if(i&&(n.memoizedState=s,Sr=!0),n=n.queue,ag(C_.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Xt!==null&&Xt.memoizedState.tag&1){if(r.flags|=2048,Ol(9,k_.bind(null,r,n,s,t),void 0,null),Qt===null)throw Error(ie(349));Zi&30||S_(r,t,s)}return s}function S_(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 k_(e,t,r,n){t.value=r,t.getSnapshot=n,E_(t)&&j_(e)}function C_(e,t,r){return r(function(){E_(t)&&j_(e)})}function E_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!_n(e,r)}catch{return!0}}function j_(e){var t=ys(e,1);t!==null&&yn(t,e,1,-1)}function ox(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:e},t.queue=e,e=e.dispatch=s2.bind(null,Ot,e),[t.memoizedState,e]}function Ol(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 T_(){return nn().memoizedState}function ku(e,t,r,n){var s=Dn();Ot.flags|=e,s.memoizedState=Ol(1|t,r,void 0,n===void 0?null:n)}function Gd(e,t,r,n){var s=nn();n=n===void 0?null:n;var i=void 0;if(Zt!==null){var o=Zt.memoizedState;if(i=o.destroy,n!==null&&sg(n,o.deps)){s.memoizedState=Ol(t,r,i,n);return}}Ot.flags|=e,s.memoizedState=Ol(1|t,r,i,n)}function ax(e,t){return ku(8390656,8,e,t)}function ag(e,t){return Gd(2048,8,e,t)}function N_(e,t){return Gd(4,2,e,t)}function R_(e,t){return Gd(4,4,e,t)}function P_(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 A_(e,t,r){return r=r!=null?r.concat([e]):null,Gd(4,4,P_.bind(null,t,e),r)}function lg(){}function D_(e,t){var r=nn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&sg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function O_(e,t){var r=nn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&sg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function M_(e,t,r){return Zi&21?(_n(r,t)||(r=Uw(),Ot.lanes|=r,Ki|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Sr=!0),e.memoizedState=r)}function r2(e,t){var r=pt;pt=r!==0&&4>r?r:4,e(!0);var n=xh.transition;xh.transition={};try{e(!1),t()}finally{pt=r,xh.transition=n}}function I_(){return nn().memoizedState}function n2(e,t,r){var n=ii(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},L_(e))F_(t,r);else if(r=y_(e,t,r,n),r!==null){var s=pr();yn(r,e,n,s),z_(r,t,n)}}function s2(e,t,r){var n=ii(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(L_(e))F_(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,_n(a,o)){var l=t.interleaved;l===null?(s.next=s,Jm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=y_(e,t,s,n),r!==null&&(s=pr(),yn(r,e,n,s),z_(r,t,n))}}function L_(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function F_(e,t){ul=sd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function z_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,zm(e,r)}}var id={readContext:rn,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},i2={readContext:rn,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:rn,useEffect:ax,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ku(4194308,4,P_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ku(4194308,4,e,t)},useInsertionEffect:function(e,t){return ku(4,2,e,t)},useMemo:function(e,t){var r=Dn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Dn();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=n2.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:ox,useDebugValue:lg,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=ox(!1),t=e[0];return e=r2.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=Dn();if(Nt){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Qt===null)throw Error(ie(349));Zi&30||S_(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,ax(C_.bind(null,n,i,e),[e]),n.flags|=2048,Ol(9,k_.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Dn(),t=Qt.identifierPrefix;if(Nt){var r=cs,n=ls;r=(n&~(1<<32-vn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Al++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=t2++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},o2={readContext:rn,useCallback:D_,useContext:rn,useEffect:ag,useImperativeHandle:A_,useInsertionEffect:N_,useLayoutEffect:R_,useMemo:O_,useReducer:wh,useRef:T_,useState:function(){return wh(Dl)},useDebugValue:lg,useDeferredValue:function(e){var t=nn();return M_(t,Zt.memoizedState,e)},useTransition:function(){var e=wh(Dl)[0],t=nn().memoizedState;return[e,t]},useMutableSource:__,useSyncExternalStore:b_,useId:I_,unstable_isNewReconciler:!1},a2={readContext:rn,useCallback:D_,useContext:rn,useEffect:ag,useImperativeHandle:A_,useInsertionEffect:N_,useLayoutEffect:R_,useMemo:O_,useReducer:_h,useRef:T_,useState:function(){return _h(Dl)},useDebugValue:lg,useDeferredValue:function(e){var t=nn();return Zt===null?t.memoizedState=e:M_(t,Zt.memoizedState,e)},useTransition:function(){var e=_h(Dl)[0],t=nn().memoizedState;return[e,t]},useMutableSource:__,useSyncExternalStore:b_,useId:I_,unstable_isNewReconciler:!1};function cn(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 jp(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 qd={isMounted:function(e){return(e=e._reactInternals)?so(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=pr(),s=ii(e),i=fs(n,s);i.payload=t,r!=null&&(i.callback=r),t=ni(e,i,s),t!==null&&(yn(t,e,s,n),bu(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=pr(),s=ii(e),i=fs(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ni(e,i,s),t!==null&&(yn(t,e,s,n),bu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=pr(),n=ii(e),s=fs(r,n);s.tag=2,t!=null&&(s.callback=t),t=ni(e,s,n),t!==null&&(yn(t,e,n,r),bu(t,e,n))}};function lx(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!El(r,n)||!El(s,i):!0}function U_(e,t,r){var n=!1,s=ui,i=t.contextType;return typeof i=="object"&&i!==null?i=rn(i):(s=Cr(t)?Hi:lr.current,n=t.contextTypes,i=(n=n!=null)?sa(e,s):ui),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function cx(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&&qd.enqueueReplaceState(t,t.state,null)}function Tp(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},eg(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=rn(i):(i=Cr(t)?Hi:lr.current,s.context=sa(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(jp(e,t,i,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&&qd.enqueueReplaceState(s,s.state,null),rd(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function la(e,t){try{var r="",n=t;do r+=MT(n),n=n.return;while(n);var s=r}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function bh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Np(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var l2=typeof WeakMap=="function"?WeakMap:Map;function V_(e,t,r){r=fs(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ad||(ad=!0,zp=n),Np(e,t)},r}function $_(e,t,r){r=fs(-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(){Np(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Np(e,t),typeof n!="function"&&(si===null?si=new Set([this]):si.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function ux(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new l2;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=b2.bind(null,e,t,r),t.then(e,e))}function dx(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 fx(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=fs(-1,1),t.tag=2,ni(r,t,1))),r.lanes|=1),e)}var c2=Es.ReactCurrentOwner,Sr=!1;function fr(e,t,r,n){t.child=e===null?v_(t,null,r,n):oa(t,e.child,r,n)}function hx(e,t,r,n,s){r=r.render;var i=t.ref;return Ho(t,s),n=ig(e,t,r,n,i,s),r=og(),e!==null&&!Sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xs(e,t,s)):(Nt&&r&&Zm(t),t.flags|=1,fr(e,t,n,s),t.child)}function px(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!gg(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,B_(e,t,i,n,s)):(e=Tu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:El,r(o,n)&&e.ref===t.ref)return xs(e,t,s)}return t.flags|=1,e=oi(i,n),e.ref=t.ref,e.return=t,t.child=e}function B_(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(El(i,n)&&e.ref===t.ref)if(Sr=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(Sr=!0);else return t.lanes=e.lanes,xs(e,t,s)}return Rp(e,t,r,n,s)}function W_(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},wt(Mo,Or),Or|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,wt(Mo,Or),Or|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,wt(Mo,Or),Or|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,wt(Mo,Or),Or|=n;return fr(e,t,s,r),t.child}function H_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Rp(e,t,r,n,s){var i=Cr(r)?Hi:lr.current;return i=sa(t,i),Ho(t,s),r=ig(e,t,r,n,i,s),n=og(),e!==null&&!Sr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xs(e,t,s)):(Nt&&n&&Zm(t),t.flags|=1,fr(e,t,r,s),t.child)}function mx(e,t,r,n,s){if(Cr(r)){var i=!0;Xu(t)}else i=!1;if(Ho(t,s),t.stateNode===null)Cu(e,t),U_(t,r,n),Tp(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=rn(u):(u=Cr(r)?Hi:lr.current,u=sa(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&cx(t,o,n,u),$s=!1;var m=t.memoizedState;o.state=m,rd(t,n,o,s),l=t.memoizedState,a!==n||m!==l||kr.current||$s?(typeof d=="function"&&(jp(t,r,d,n),l=t.memoizedState),(a=$s||lx(t,r,a,n,m,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,x_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:cn(t.type,a),o.props=u,f=t.pendingProps,m=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=rn(l):(l=Cr(r)?Hi:lr.current,l=sa(t,l));var v=r.getDerivedStateFromProps;(d=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||m!==l)&&cx(t,o,n,l),$s=!1,m=t.memoizedState,o.state=m,rd(t,n,o,s);var x=t.memoizedState;a!==f||m!==x||kr.current||$s?(typeof v=="function"&&(jp(t,r,v,n),x=t.memoizedState),(u=$s||lx(t,r,u,n,m,x,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,x,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,x,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=x),o.props=n,o.state=x,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return Pp(e,t,r,n,i,s)}function Pp(e,t,r,n,s,i){H_(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&ex(t,r,!1),xs(e,t,i);n=t.stateNode,c2.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=oa(t,e.child,null,i),t.child=oa(t,null,a,i)):fr(e,t,a,i),t.memoizedState=n.state,s&&ex(t,r,!0),t.child}function Y_(e){var t=e.stateNode;t.pendingContext?Jy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Jy(e,t.context,!1),tg(e,t.containerInfo)}function gx(e,t,r,n,s){return ia(),Gm(s),t.flags|=256,fr(e,t,r,n),t.child}var Ap={dehydrated:null,treeContext:null,retryLane:0};function Dp(e){return{baseLanes:e,cachePool:null,transitions:null}}function Z_(e,t,r){var n=t.pendingProps,s=At.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),wt(At,s&1),e===null)return Cp(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):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Jd(o,n,0,null),e=$i(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Dp(r),t.memoizedState=Ap,e):cg(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return u2(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=oi(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=oi(a,i):(i=$i(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Dp(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Ap,n}return i=e.child,e=i.sibling,n=oi(i,{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 cg(e,t){return t=Jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Jc(e,t,r,n){return n!==null&&Gm(n),oa(t,e.child,null,r),e=cg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function u2(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=bh(Error(ie(422))),Jc(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=Jd({mode:"visible",children:n.children},s,0,null),i=$i(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&oa(t,e.child,null,o),t.child.memoizedState=Dp(o),t.memoizedState=Ap,i);if(!(t.mode&1))return Jc(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(ie(419)),n=bh(i,n,void 0),Jc(e,t,o,n)}if(a=(o&e.childLanes)!==0,Sr||a){if(n=Qt,n!==null){switch(o&-o){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|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ys(e,s),yn(n,e,s,-1))}return mg(),n=bh(Error(ie(421))),Jc(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=S2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Lr=ri(s.nextSibling),Fr=t,Nt=!0,hn=null,e!==null&&(qr[Xr++]=ls,qr[Xr++]=cs,qr[Xr++]=Yi,ls=e.id,cs=e.overflow,Yi=t),t=cg(t,n.children),t.flags|=4096,t)}function vx(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ep(e.return,t,r)}function Sh(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function K_(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(fr(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&&vx(e,r,t);else if(e.tag===19)vx(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&&nd(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Sh(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&nd(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Sh(t,!0,r,null,i);break;case"together":Sh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ki|=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=oi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=oi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function d2(e,t,r){switch(t.tag){case 3:Y_(t),ia();break;case 5:w_(t);break;case 1:Cr(t.type)&&Xu(t);break;case 4:tg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;wt(ed,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?Z_(e,t,r):(wt(At,At.current&1),e=xs(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 K_(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,W_(e,t,r)}return xs(e,t,r)}var G_,Op,q_,X_;G_=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}};Op=function(){};q_=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Mi(Vn.current);var i=null;switch(r){case"input":s=rp(e,s),n=rp(e,n),i=[];break;case"select":s=Mt({},s,{value:void 0}),n=Mt({},n,{value:void 0}),i=[];break;case"textarea":s=ip(e,s),n=ip(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Gu)}ap(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(xl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(xl.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&bt("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};X_=function(e,t,r,n){r!==n&&(t.flags|=4)};function za(e,t){if(!Nt)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 ir(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 f2(e,t,r){var n=t.pendingProps;switch(Km(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ir(t),null;case 1:return Cr(t.type)&&qu(),ir(t),null;case 3:return n=t.stateNode,aa(),St(kr),St(lr),ng(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&($p(hn),hn=null))),Op(e,t),ir(t),null;case 5:rg(t);var s=Mi(Pl.current);if(r=t.type,e!==null&&t.stateNode!=null)q_(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 ir(t),null}if(e=Mi(Vn.current),Xc(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[On]=t,n[Nl]=i,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<Qa.length;s++)bt(Qa[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":Ey(n,i),bt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},bt("invalid",n);break;case"textarea":Ty(n,i),bt("invalid",n)}ap(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&qc(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&qc(n.textContent,a,e),s=["children",""+a]):xl.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&bt("scroll",n)}switch(r){case"input":$c(n),jy(n,i,!0);break;case"textarea":$c(n),Ny(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Gu)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Cw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[On]=t,e[Nl]=n,G_(e,t,!1,!1),t.stateNode=e;e:{switch(o=lp(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<Qa.length;s++)bt(Qa[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":Ey(e,n),s=rp(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":Ty(e,n),s=ip(e,n),bt("invalid",e);break;default:s=n}ap(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Tw(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ew(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&wl(e,l):typeof l=="number"&&wl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(xl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&bt("scroll",e):l!=null&&Dm(e,i,l,o))}switch(r){case"input":$c(e),jy(e,n,!1);break;case"textarea":$c(e),Ny(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ci(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Vo(e,!!n.multiple,i,!1):n.defaultValue!=null&&Vo(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Gu)}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 ir(t),null;case 6:if(e&&t.stateNode!=null)X_(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=Mi(Pl.current),Mi(Vn.current),Xc(t)){if(n=t.stateNode,r=t.memoizedProps,n[On]=t,(i=n.nodeValue!==r)&&(e=Fr,e!==null))switch(e.tag){case 3:qc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qc(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[On]=t,t.stateNode=n}return ir(t),null;case 13:if(St(At),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Nt&&Lr!==null&&t.mode&1&&!(t.flags&128))m_(),ia(),t.flags|=98560,i=!1;else if(i=Xc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[On]=t}else ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ir(t),i=!1}else hn!==null&&($p(hn),hn=null),i=!0;if(!i)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?Kt===0&&(Kt=3):mg())),t.updateQueue!==null&&(t.flags|=4),ir(t),null);case 4:return aa(),Op(e,t),e===null&&jl(t.stateNode.containerInfo),ir(t),null;case 10:return Qm(t.type._context),ir(t),null;case 17:return Cr(t.type)&&qu(),ir(t),null;case 19:if(St(At),i=t.memoizedState,i===null)return ir(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)za(i,!1);else{if(Kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=nd(e),o!==null){for(t.flags|=128,za(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.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}i.tail!==null&&Ut()>ca&&(t.flags|=128,n=!0,za(i,!1),t.lanes=4194304)}else{if(!n)if(e=nd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),za(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Nt)return ir(t),null}else 2*Ut()-i.renderingStartTime>ca&&r!==1073741824&&(t.flags|=128,n=!0,za(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ut(),t.sibling=null,r=At.current,wt(At,n?r&1|2:r&1),t):(ir(t),null);case 22:case 23:return pg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Or&1073741824&&(ir(t),t.subtreeFlags&6&&(t.flags|=8192)):ir(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function h2(e,t){switch(Km(t),t.tag){case 1:return Cr(t.type)&&qu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(),St(kr),St(lr),ng(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rg(t),null;case 13:if(St(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(At),null;case 4:return aa(),null;case 10:return Qm(t.type._context),null;case 22:case 23:return pg(),null;case 24:return null;default:return null}}var eu=!1,or=!1,p2=typeof WeakSet=="function"?WeakSet:Set,be=null;function Oo(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 Mp(e,t,r){try{r()}catch(n){Lt(e,t,n)}}var yx=!1;function m2(e,t){if(yp=Yu,e=r_(),Ym(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,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var v;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)m=f,f=v;for(;;){if(f===e)break t;if(m===r&&++u===s&&(a=o),m===i&&++d===n&&(l=o),(v=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(xp={focusedElem:e,selectionRange:r},Yu=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;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 g=x.memoizedProps,_=x.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?g:cn(t.type,g),_);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,be=e;break}be=t.return}return x=yx,yx=!1,x}function dl(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 i=s.destroy;s.destroy=void 0,i!==void 0&&Mp(t,r,i)}s=s.next}while(s!==n)}}function Xd(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 Ip(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 Q_(e){var t=e.alternate;t!==null&&(e.alternate=null,Q_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[On],delete t[Nl],delete t[bp],delete t[XN],delete t[QN])),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 J_(e){return e.tag===5||e.tag===3||e.tag===4}function xx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||J_(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 Lp(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=Gu));else if(n!==4&&(e=e.child,e!==null))for(Lp(e,t,r),e=e.sibling;e!==null;)Lp(e,t,r),e=e.sibling}function Fp(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(Fp(e,t,r),e=e.sibling;e!==null;)Fp(e,t,r),e=e.sibling}var er=null,un=!1;function Is(e,t,r){for(r=r.child;r!==null;)e1(e,t,r),r=r.sibling}function e1(e,t,r){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(Bd,r)}catch{}switch(r.tag){case 5:or||Oo(r,t);case 6:var n=er,s=un;er=null,Is(e,t,r),er=n,un=s,er!==null&&(un?(e=er,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):er.removeChild(r.stateNode));break;case 18:er!==null&&(un?(e=er,r=r.stateNode,e.nodeType===8?gh(e.parentNode,r):e.nodeType===1&&gh(e,r),kl(e)):gh(er,r.stateNode));break;case 4:n=er,s=un,er=r.stateNode.containerInfo,un=!0,Is(e,t,r),er=n,un=s;break;case 0:case 11:case 14:case 15:if(!or&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Mp(r,t,o),s=s.next}while(s!==n)}Is(e,t,r);break;case 1:if(!or&&(Oo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Lt(r,t,a)}Is(e,t,r);break;case 21:Is(e,t,r);break;case 22:r.mode&1?(or=(n=or)||r.memoizedState!==null,Is(e,t,r),or=n):Is(e,t,r);break;default:Is(e,t,r)}}function wx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new p2),t.forEach(function(n){var s=k2.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ln(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:er=a.stateNode,un=!1;break e;case 3:er=a.stateNode.containerInfo,un=!0;break e;case 4:er=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(er===null)throw Error(ie(160));e1(i,o,s),er=null,un=!1;var l=s.alternate;l!==null&&(l.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(ln(t,e),An(e),n&4){try{dl(3,e,e.return),Xd(3,e)}catch(g){Lt(e,e.return,g)}try{dl(5,e,e.return)}catch(g){Lt(e,e.return,g)}}break;case 1:ln(t,e),An(e),n&512&&r!==null&&Oo(r,r.return);break;case 5:if(ln(t,e),An(e),n&512&&r!==null&&Oo(r,r.return),e.flags&32){var s=e.stateNode;try{wl(s,"")}catch(g){Lt(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Sw(s,i),lp(a,o);var u=lp(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?Tw(s,f):d==="dangerouslySetInnerHTML"?Ew(s,f):d==="children"?wl(s,f):Dm(s,d,f,u)}switch(a){case"input":np(s,i);break;case"textarea":kw(s,i);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?Vo(s,!!i.multiple,v,!1):m!==!!i.multiple&&(i.defaultValue!=null?Vo(s,!!i.multiple,i.defaultValue,!0):Vo(s,!!i.multiple,i.multiple?[]:"",!1))}s[Nl]=i}catch(g){Lt(e,e.return,g)}}break;case 6:if(ln(t,e),An(e),n&4){if(e.stateNode===null)throw Error(ie(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){Lt(e,e.return,g)}}break;case 3:if(ln(t,e),An(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{kl(t.containerInfo)}catch(g){Lt(e,e.return,g)}break;case 4:ln(t,e),An(e);break;case 13:ln(t,e),An(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(fg=Ut())),n&4&&wx(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(or=(u=or)||d,ln(t,e),or=u):ln(t,e),An(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(be=e,d=e.child;d!==null;){for(f=be=d;be!==null;){switch(m=be,v=m.child,m.tag){case 0:case 11:case 14:case 15:dl(4,m,m.return);break;case 1:Oo(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(g){Lt(n,r,g)}}break;case 5:Oo(m,m.return);break;case 22:if(m.memoizedState!==null){bx(f);continue}}v!==null?(v.return=m,be=v):bx(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=jw("display",o))}catch(g){Lt(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Lt(e,e.return,g)}}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:ln(t,e),An(e),n&4&&wx(e);break;case 21:break;default:ln(t,e),An(e)}}function An(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(J_(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&&(wl(s,""),n.flags&=-33);var i=xx(e);Fp(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=xx(e);Lp(e,a,o);break;default:throw Error(ie(161))}}catch(l){Lt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g2(e,t,r){be=e,r1(e)}function r1(e,t,r){for(var n=(e.mode&1)!==0;be!==null;){var s=be,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||eu;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||or;a=eu;var u=or;if(eu=o,(or=l)&&!u)for(be=s;be!==null;)o=be,l=o.child,o.tag===22&&o.memoizedState!==null?Sx(s):l!==null?(l.return=o,be=l):Sx(s);for(;i!==null;)be=i,r1(i),i=i.sibling;be=s,eu=a,or=u}_x(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,be=i):_x(e)}}function _x(e){for(;be!==null;){var t=be;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:or||Xd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!or)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:cn(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&ix(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ix(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.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&&kl(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}or||t.flags&512&&Ip(t)}catch(m){Lt(t,t.return,m)}}if(t===e){be=null;break}if(r=t.sibling,r!==null){r.return=t.return,be=r;break}be=t.return}}function bx(e){for(;be!==null;){var t=be;if(t===e){be=null;break}var r=t.sibling;if(r!==null){r.return=t.return,be=r;break}be=t.return}}function Sx(e){for(;be!==null;){var t=be;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Xd(4,t)}catch(l){Lt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Lt(t,s,l)}}var i=t.return;try{Ip(t)}catch(l){Lt(t,i,l)}break;case 5:var o=t.return;try{Ip(t)}catch(l){Lt(t,o,l)}}}catch(l){Lt(t,t.return,l)}if(t===e){be=null;break}var a=t.sibling;if(a!==null){a.return=t.return,be=a;break}be=t.return}}var v2=Math.ceil,od=Es.ReactCurrentDispatcher,ug=Es.ReactCurrentOwner,en=Es.ReactCurrentBatchConfig,lt=0,Qt=null,Wt=null,tr=0,Or=0,Mo=xi(0),Kt=0,Ml=null,Ki=0,Qd=0,dg=0,fl=null,br=null,fg=0,ca=1/0,ss=null,ad=!1,zp=null,si=null,tu=!1,Gs=null,ld=0,hl=0,Up=null,Eu=-1,ju=0;function pr(){return lt&6?Ut():Eu!==-1?Eu:Eu=Ut()}function ii(e){return e.mode&1?lt&2&&tr!==0?tr&-tr:e2.transition!==null?(ju===0&&(ju=Uw()),ju):(e=pt,e!==0||(e=window.event,e=e===void 0?16:Zw(e.type)),e):1}function yn(e,t,r,n){if(50<hl)throw hl=0,Up=null,Error(ie(185));uc(e,r,n),(!(lt&2)||e!==Qt)&&(e===Qt&&(!(lt&2)&&(Qd|=r),Kt===4&&Ws(e,tr)),Er(e,n),r===1&&lt===0&&!(t.mode&1)&&(ca=Ut()+500,Kd&&wi()))}function Er(e,t){var r=e.callbackNode;eN(e,t);var n=Hu(e,e===Qt?tr:0);if(n===0)r!==null&&Ay(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Ay(r),t===1)e.tag===0?JN(kx.bind(null,e)):f_(kx.bind(null,e)),GN(function(){!(lt&6)&&wi()}),r=null;else{switch(Vw(n)){case 1:r=Fm;break;case 4:r=Fw;break;case 16:r=Wu;break;case 536870912:r=zw;break;default:r=Wu}r=u1(r,n1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function n1(e,t){if(Eu=-1,ju=0,lt&6)throw Error(ie(327));var r=e.callbackNode;if(Yo()&&e.callbackNode!==r)return null;var n=Hu(e,e===Qt?tr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=cd(e,n);else{t=n;var s=lt;lt|=2;var i=i1();(Qt!==e||tr!==t)&&(ss=null,ca=Ut()+500,Vi(e,t));do try{w2();break}catch(a){s1(e,a)}while(!0);Xm(),od.current=i,lt=s,Wt!==null?t=0:(Qt=null,tr=0,t=Kt)}if(t!==0){if(t===2&&(s=hp(e),s!==0&&(n=s,t=Vp(e,s))),t===1)throw r=Ml,Vi(e,0),Ws(e,n),Er(e,Ut()),r;if(t===6)Ws(e,n);else{if(s=e.current.alternate,!(n&30)&&!y2(s)&&(t=cd(e,n),t===2&&(i=hp(e),i!==0&&(n=i,t=Vp(e,i))),t===1))throw r=Ml,Vi(e,0),Ws(e,n),Er(e,Ut()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:Ni(e,br,ss);break;case 3:if(Ws(e,n),(n&130023424)===n&&(t=fg+500-Ut(),10<t)){if(Hu(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){pr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=_p(Ni.bind(null,e,br,ss),t);break}Ni(e,br,ss);break;case 4:if(Ws(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-vn(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}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*v2(n/1960))-n,10<n){e.timeoutHandle=_p(Ni.bind(null,e,br,ss),n);break}Ni(e,br,ss);break;case 5:Ni(e,br,ss);break;default:throw Error(ie(329))}}}return Er(e,Ut()),e.callbackNode===r?n1.bind(null,e):null}function Vp(e,t){var r=fl;return e.current.memoizedState.isDehydrated&&(Vi(e,t).flags|=256),e=cd(e,t),e!==2&&(t=br,br=r,t!==null&&$p(t)),e}function $p(e){br===null?br=e:br.push.apply(br,e)}function y2(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],i=s.getSnapshot;s=s.value;try{if(!_n(i(),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 Ws(e,t){for(t&=~dg,t&=~Qd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-vn(t),n=1<<r;e[r]=-1,t&=~n}}function kx(e){if(lt&6)throw Error(ie(327));Yo();var t=Hu(e,0);if(!(t&1))return Er(e,Ut()),null;var r=cd(e,t);if(e.tag!==0&&r===2){var n=hp(e);n!==0&&(t=n,r=Vp(e,n))}if(r===1)throw r=Ml,Vi(e,0),Ws(e,t),Er(e,Ut()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ni(e,br,ss),Er(e,Ut()),null}function hg(e,t){var r=lt;lt|=1;try{return e(t)}finally{lt=r,lt===0&&(ca=Ut()+500,Kd&&wi())}}function Gi(e){Gs!==null&&Gs.tag===0&&!(lt&6)&&Yo();var t=lt;lt|=1;var r=en.transition,n=pt;try{if(en.transition=null,pt=1,e)return e()}finally{pt=n,en.transition=r,lt=t,!(lt&6)&&wi()}}function pg(){Or=Mo.current,St(Mo)}function Vi(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,KN(r)),Wt!==null)for(r=Wt.return;r!==null;){var n=r;switch(Km(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&qu();break;case 3:aa(),St(kr),St(lr),ng();break;case 5:rg(n);break;case 4:aa();break;case 13:St(At);break;case 19:St(At);break;case 10:Qm(n.type._context);break;case 22:case 23:pg()}r=r.return}if(Qt=e,Wt=e=oi(e.current,null),tr=Or=t,Kt=0,Ml=null,dg=Qd=Ki=0,br=fl=null,Oi!==null){for(t=0;t<Oi.length;t++)if(r=Oi[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}Oi=null}return e}function s1(e,t){do{var r=Wt;try{if(Xm(),Su.current=id,sd){for(var n=Ot.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}sd=!1}if(Zi=0,Xt=Zt=Ot=null,ul=!1,Al=0,ug.current=null,r===null||r.return===null){Kt=1,Ml=t,Wt=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=tr,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,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=dx(o);if(v!==null){v.flags&=-257,fx(v,o,a,i,t),v.mode&1&&ux(i,u,t),t=v,l=u;var x=t.updateQueue;if(x===null){var g=new Set;g.add(l),t.updateQueue=g}else x.add(l);break e}else{if(!(t&1)){ux(i,u,t),mg();break e}l=Error(ie(426))}}else if(Nt&&a.mode&1){var _=dx(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),fx(_,o,a,i,t),Gm(la(l,a));break e}}i=l=la(l,a),Kt!==4&&(Kt=2),fl===null?fl=[i]:fl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=V_(i,l,t);sx(i,p);break e;case 1:a=l;var h=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(si===null||!si.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var C=$_(i,a,t);sx(i,C);break e}}i=i.return}while(i!==null)}a1(r)}catch(E){t=E,Wt===r&&r!==null&&(Wt=r=r.return);continue}break}while(!0)}function i1(){var e=od.current;return od.current=id,e===null?id:e}function mg(){(Kt===0||Kt===3||Kt===2)&&(Kt=4),Qt===null||!(Ki&268435455)&&!(Qd&268435455)||Ws(Qt,tr)}function cd(e,t){var r=lt;lt|=2;var n=i1();(Qt!==e||tr!==t)&&(ss=null,Vi(e,t));do try{x2();break}catch(s){s1(e,s)}while(!0);if(Xm(),lt=r,od.current=n,Wt!==null)throw Error(ie(261));return Qt=null,tr=0,Kt}function x2(){for(;Wt!==null;)o1(Wt)}function w2(){for(;Wt!==null&&!HT();)o1(Wt)}function o1(e){var t=c1(e.alternate,e,Or);e.memoizedProps=e.pendingProps,t===null?a1(e):Wt=t,ug.current=null}function a1(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=h2(r,t),r!==null){r.flags&=32767,Wt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kt=6,Wt=null;return}}else if(r=f2(r,t,Or),r!==null){Wt=r;return}if(t=t.sibling,t!==null){Wt=t;return}Wt=t=e}while(t!==null);Kt===0&&(Kt=5)}function Ni(e,t,r){var n=pt,s=en.transition;try{en.transition=null,pt=1,_2(e,t,r,n)}finally{en.transition=s,pt=n}return null}function _2(e,t,r,n){do Yo();while(Gs!==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 i=r.lanes|r.childLanes;if(tN(e,i),e===Qt&&(Wt=Qt=null,tr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||tu||(tu=!0,u1(Wu,function(){return Yo(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=en.transition,en.transition=null;var o=pt;pt=1;var a=lt;lt|=4,ug.current=null,m2(e,r),t1(r,e),VN(xp),Yu=!!yp,xp=yp=null,e.current=r,g2(r),YT(),lt=a,pt=o,en.transition=i}else e.current=r;if(tu&&(tu=!1,Gs=e,ld=s),i=e.pendingLanes,i===0&&(si=null),GT(r.stateNode),Er(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(ad)throw ad=!1,e=zp,zp=null,e;return ld&1&&e.tag!==0&&Yo(),i=e.pendingLanes,i&1?e===Up?hl++:(hl=0,Up=e):hl=0,wi(),null}function Yo(){if(Gs!==null){var e=Vw(ld),t=en.transition,r=pt;try{if(en.transition=null,pt=16>e?16:e,Gs===null)var n=!1;else{if(e=Gs,Gs=null,ld=0,lt&6)throw Error(ie(331));var s=lt;for(lt|=4,be=e.current;be!==null;){var i=be,o=i.child;if(be.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(be=u;be!==null;){var d=be;switch(d.tag){case 0:case 11:case 15:dl(8,d,i)}var f=d.child;if(f!==null)f.return=d,be=f;else for(;be!==null;){d=be;var m=d.sibling,v=d.return;if(Q_(d),d===u){be=null;break}if(m!==null){m.return=v,be=m;break}be=v}}}var x=i.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}be=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,be=o;else e:for(;be!==null;){if(i=be,i.flags&2048)switch(i.tag){case 0:case 11:case 15:dl(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,be=p;break e}be=i.return}}var h=e.current;for(be=h;be!==null;){o=be;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,be=w;else e:for(o=h;be!==null;){if(a=be,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xd(9,a)}}catch(E){Lt(a,a.return,E)}if(a===o){be=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,be=C;break e}be=a.return}}if(lt=s,wi(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(Bd,e)}catch{}n=!0}return n}finally{pt=r,en.transition=t}}return!1}function Cx(e,t,r){t=la(r,t),t=V_(e,t,1),e=ni(e,t,1),t=pr(),e!==null&&(uc(e,1,t),Er(e,t))}function Lt(e,t,r){if(e.tag===3)Cx(e,e,r);else for(;t!==null;){if(t.tag===3){Cx(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(si===null||!si.has(n))){e=la(r,e),e=$_(t,e,1),t=ni(t,e,1),e=pr(),t!==null&&(uc(t,1,e),Er(t,e));break}}t=t.return}}function b2(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=pr(),e.pingedLanes|=e.suspendedLanes&r,Qt===e&&(tr&r)===r&&(Kt===4||Kt===3&&(tr&130023424)===tr&&500>Ut()-fg?Vi(e,0):dg|=r),Er(e,t)}function l1(e,t){t===0&&(e.mode&1?(t=Hc,Hc<<=1,!(Hc&130023424)&&(Hc=4194304)):t=1);var r=pr();e=ys(e,t),e!==null&&(uc(e,t,r),Er(e,r))}function S2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),l1(e,r)}function k2(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),l1(e,r)}var c1;c1=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||kr.current)Sr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Sr=!1,d2(e,t,r);Sr=!!(e.flags&131072)}else Sr=!1,Nt&&t.flags&1048576&&h_(t,Ju,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Cu(e,t),e=t.pendingProps;var s=sa(t,lr.current);Ho(t,r),s=ig(null,t,n,e,s,r);var i=og();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,Cr(n)?(i=!0,Xu(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,eg(t),s.updater=qd,t.stateNode=s,s._reactInternals=t,Tp(t,n,e,r),t=Pp(null,t,n,!0,i,r)):(t.tag=0,Nt&&i&&Zm(t),fr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Cu(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=E2(n),e=cn(n,e),s){case 0:t=Rp(null,t,n,e,r);break e;case 1:t=mx(null,t,n,e,r);break e;case 11:t=hx(null,t,n,e,r);break e;case 14:t=px(null,t,n,cn(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:cn(n,s),Rp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),mx(e,t,n,s,r);case 3:e:{if(Y_(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,s=i.element,x_(e,t),rd(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=la(Error(ie(423)),t),t=gx(e,t,n,r,s);break e}else if(n!==s){s=la(Error(ie(424)),t),t=gx(e,t,n,r,s);break e}else for(Lr=ri(t.stateNode.containerInfo.firstChild),Fr=t,Nt=!0,hn=null,r=v_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ia(),n===s){t=xs(e,t,r);break e}fr(e,t,n,r)}t=t.child}return t;case 5:return w_(t),e===null&&Cp(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,wp(n,s)?o=null:i!==null&&wp(n,i)&&(t.flags|=32),H_(e,t),fr(e,t,o,r),t.child;case 6:return e===null&&Cp(t),null;case 13:return Z_(e,t,r);case 4:return tg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=oa(t,null,n,r):fr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),hx(e,t,n,s,r);case 7:return fr(e,t,t.pendingProps,r),t.child;case 8:return fr(e,t,t.pendingProps.children,r),t.child;case 12:return fr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,wt(ed,n._currentValue),n._currentValue=o,i!==null)if(_n(i.value,o)){if(i.children===s.children&&!kr.current){t=xs(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=fs(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Ep(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ie(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Ep(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}fr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ho(t,r),s=rn(s),n=n(s),t.flags|=1,fr(e,t,n,r),t.child;case 14:return n=t.type,s=cn(n,t.pendingProps),s=cn(n.type,s),px(e,t,n,s,r);case 15:return B_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:cn(n,s),Cu(e,t),t.tag=1,Cr(n)?(e=!0,Xu(t)):e=!1,Ho(t,r),U_(t,n,s),Tp(t,n,s,r),Pp(null,t,n,!0,e,r);case 19:return K_(e,t,r);case 22:return W_(e,t,r)}throw Error(ie(156,t.tag))};function u1(e,t){return Lw(e,t)}function C2(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 Jr(e,t,r,n){return new C2(e,t,r,n)}function gg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function E2(e){if(typeof e=="function")return gg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mm)return 11;if(e===Im)return 14}return 2}function oi(e,t){var r=e.alternate;return r===null?(r=Jr(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 Tu(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")gg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Co:return $i(r.children,s,i,t);case Om:o=8,s|=8;break;case Qh:return e=Jr(12,r,t,s|2),e.elementType=Qh,e.lanes=i,e;case Jh:return e=Jr(13,r,t,s),e.elementType=Jh,e.lanes=i,e;case ep:return e=Jr(19,r,t,s),e.elementType=ep,e.lanes=i,e;case ww:return Jd(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yw:o=10;break e;case xw:o=9;break e;case Mm:o=11;break e;case Im:o=14;break e;case Vs:o=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=Jr(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function $i(e,t,r,n){return e=Jr(7,e,n,t),e.lanes=r,e}function Jd(e,t,r,n){return e=Jr(22,e,n,t),e.elementType=ww,e.lanes=r,e.stateNode={isHidden:!1},e}function kh(e,t,r){return e=Jr(6,e,null,t),e.lanes=r,e}function Ch(e,t,r){return t=Jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function j2(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=ih(0),this.expirationTimes=ih(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ih(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function vg(e,t,r,n,s,i,o,a,l){return e=new j2(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},eg(i),e}function T2(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ko,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function d1(e){if(!e)return ui;e=e._reactInternals;e:{if(so(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(Cr(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(Cr(r))return d_(e,r,t)}return t}function f1(e,t,r,n,s,i,o,a,l){return e=vg(r,n,!0,e,s,i,o,a,l),e.context=d1(null),r=e.current,n=pr(),s=ii(r),i=fs(n,s),i.callback=t??null,ni(r,i,s),e.current.lanes=s,uc(e,s,n),Er(e,n),e}function ef(e,t,r,n){var s=t.current,i=pr(),o=ii(s);return r=d1(r),t.context===null?t.context=r:t.pendingContext=r,t=fs(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ni(s,t,o),e!==null&&(yn(e,s,o,i),bu(e,s,o)),o}function ud(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 Ex(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function yg(e,t){Ex(e,t),(e=e.alternate)&&Ex(e,t)}function N2(){return null}var h1=typeof reportError=="function"?reportError:function(e){console.error(e)};function xg(e){this._internalRoot=e}tf.prototype.render=xg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));ef(e,t,null,null)};tf.prototype.unmount=xg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gi(function(){ef(null,e,null,null)}),t[vs]=null}};function tf(e){this._internalRoot=e}tf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ww();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Bs.length&&t!==0&&t<Bs[r].priority;r++);Bs.splice(r,0,e),r===0&&Yw(e)}};function wg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jx(){}function R2(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=ud(o);i.call(u)}}var o=f1(t,n,e,0,null,!1,!1,"",jx);return e._reactRootContainer=o,e[vs]=o.current,jl(e.nodeType===8?e.parentNode:e),Gi(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=ud(l);a.call(u)}}var l=vg(e,0,!1,null,null,!1,!1,"",jx);return e._reactRootContainer=l,e[vs]=l.current,jl(e.nodeType===8?e.parentNode:e),Gi(function(){ef(t,l,r,n)}),l}function nf(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ud(o);a.call(l)}}ef(t,o,e,s)}else o=R2(r,t,e,s,n);return ud(o)}$w=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Xa(t.pendingLanes);r!==0&&(zm(t,r|1),Er(t,Ut()),!(lt&6)&&(ca=Ut()+500,wi()))}break;case 13:Gi(function(){var n=ys(e,1);if(n!==null){var s=pr();yn(n,e,1,s)}}),yg(e,1)}};Um=function(e){if(e.tag===13){var t=ys(e,134217728);if(t!==null){var r=pr();yn(t,e,134217728,r)}yg(e,134217728)}};Bw=function(e){if(e.tag===13){var t=ii(e),r=ys(e,t);if(r!==null){var n=pr();yn(r,e,t,n)}yg(e,t)}};Ww=function(){return pt};Hw=function(e,t){var r=pt;try{return pt=e,t()}finally{pt=r}};up=function(e,t,r){switch(t){case"input":if(np(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=Zd(n);if(!s)throw Error(ie(90));bw(n),np(n,s)}}}break;case"textarea":kw(e,r);break;case"select":t=r.value,t!=null&&Vo(e,!!r.multiple,t,!1)}};Pw=hg;Aw=Gi;var P2={usingClientEntryPoint:!1,Events:[fc,No,Zd,Nw,Rw,hg]},Ua={findFiberByHostInstance:Di,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},A2={bundleType:Ua.bundleType,version:Ua.version,rendererPackageName:Ua.rendererPackageName,rendererConfig:Ua.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Es.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Mw(e),e===null?null:e.stateNode},findFiberByHostInstance:Ua.findFiberByHostInstance||N2,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 ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{Bd=ru.inject(A2),Un=ru}catch{}}Br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P2;Br.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wg(t))throw Error(ie(200));return T2(e,t,null,r)};Br.createRoot=function(e,t){if(!wg(e))throw Error(ie(299));var r=!1,n="",s=h1;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=vg(e,1,!1,null,null,r,!1,n,s),e[vs]=t.current,jl(e.nodeType===8?e.parentNode:e),new xg(t)};Br.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=Mw(t),e=e===null?null:e.stateNode,e};Br.flushSync=function(e){return Gi(e)};Br.hydrate=function(e,t,r){if(!rf(t))throw Error(ie(200));return nf(null,e,t,!0,r)};Br.hydrateRoot=function(e,t,r){if(!wg(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=h1;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=f1(t,null,e,1,r??null,s,!1,i,o),e[vs]=t.current,jl(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 tf(t)};Br.render=function(e,t,r){if(!rf(t))throw Error(ie(200));return nf(null,e,t,!1,r)};Br.unmountComponentAtNode=function(e){if(!rf(e))throw Error(ie(40));return e._reactRootContainer?(Gi(function(){nf(null,null,e,!1,function(){e._reactRootContainer=null,e[vs]=null})}),!0):!1};Br.unstable_batchedUpdates=hg;Br.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!rf(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return nf(e,t,r,!1,n)};Br.version="18.3.1-next-f1338f8080-20240426";function p1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p1)}catch(e){console.error(e)}}p1(),pw.exports=Br;var js=pw.exports;const m1=Em(js),D2=tw({__proto__:null,default:m1},[js]);var Tx=js;qh.createRoot=Tx.createRoot,qh.hydrateRoot=Tx.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 $t;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($t||($t={}));const Nx="popstate";function O2(e){e===void 0&&(e={});function t(s,i){let{pathname:o="/",search:a="",hash:l=""}=Ts(s.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Il("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(s,i){let o=s.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=s.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof i=="string"?i:Xi(i))}function n(s,i){qi(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(i)+")")}return I2(t,r,n,e)}function Je(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function M2(){return Math.random().toString(36).substr(2,8)}function Rx(e,t){return{usr:e.state,key:e.key,idx:t}}function Il(e,t,r,n){return r===void 0&&(r=null),Pt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ts(t):t,{state:r,key:t&&t.key||n||M2()})}function Xi(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 Ts(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 I2(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=$t.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Pt({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=$t.Pop;let _=d(),p=_==null?null:_-u;u=_,l&&l({action:a,location:g.location,delta:p})}function m(_,p){a=$t.Push;let h=Il(g.location,_,p);r&&r(h,_),u=d()+1;let w=Rx(h,u),C=g.createHref(h);try{o.pushState(w,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}i&&l&&l({action:a,location:g.location,delta:1})}function v(_,p){a=$t.Replace;let h=Il(g.location,_,p);r&&r(h,_),u=d();let w=Rx(h,u),C=g.createHref(h);o.replaceState(w,"",C),i&&l&&l({action:a,location:g.location,delta:0})}function x(_){let p=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof _=="string"?_:Xi(_);return h=h.replace(/ $/,"%20"),Je(p,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,p)}let g={get action(){return a},get location(){return e(s,o)},listen(_){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Nx,f),l=_,()=>{s.removeEventListener(Nx,f),l=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 o.go(_)}};return g}var xt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(xt||(xt={}));const L2=new Set(["lazy","caseSensitive","path","id","index","children"]);function F2(e){return e.index===!0}function Ll(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,i)=>{let o=[...r,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(Je(s.index!==!0||!s.children,"Cannot specify children on an index route"),Je(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),F2(s)){let l=Pt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Pt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=Ll(s.children,t,o,n)),l}})}function Ri(e,t,r){return r===void 0&&(r="/"),Nu(e,t,r,!1)}function Nu(e,t,r,n){let s=typeof t=="string"?Ts(t):t,i=wa(s.pathname||"/",r);if(i==null)return null;let o=g1(e);U2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=X2(i);a=G2(o[l],u,n)}return a}function z2(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 g1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Je(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=hs([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(Je(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),g1(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Z2(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of v1(i.path))s(i,o,l)}),t}function v1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=v1(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function U2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:K2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const V2=/^:[\w-]+$/,$2=3,B2=2,W2=1,H2=10,Y2=-2,Px=e=>e==="*";function Z2(e,t){let r=e.split("/"),n=r.length;return r.some(Px)&&(n+=Y2),t&&(n+=B2),r.filter(s=>!Px(s)).reduce((s,i)=>s+(V2.test(i)?$2:i===""?W2:H2),n)}function K2(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 G2(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Ax({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),m=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Ax({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:hs([i,f.pathname]),pathnameBase:eR(hs([i,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(i=hs([i,f.pathnameBase]))}return o}function Ax(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=q2(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:m,isOptional:v}=d;if(m==="*"){let g=a[f]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[f];return v&&!x?u[m]=void 0:u[m]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function q2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),qi(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,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function X2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qi(!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 wa(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 Q2(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Ts(e):e;return{pathname:r?r.startsWith("/")?r:J2(r,t):t,search:tR(n),hash:rR(s)}}function J2(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 Eh(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 sf(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 of(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Ts(e):(s=Pt({},e),Je(!s.pathname||!s.pathname.includes("?"),Eh("?","pathname","search",s)),Je(!s.pathname||!s.pathname.includes("#"),Eh("#","pathname","hash",s)),Je(!s.search||!s.search.includes("#"),Eh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;s.pathname=m.join("/")}a=f>=0?t[f]:"/"}let l=Q2(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const hs=e=>e.join("/").replace(/\/\/+/g,"/"),eR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class _g{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 af(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const x1=["post","put","patch","delete"],nR=new Set(x1),sR=["get",...x1],iR=new Set(sR),oR=new Set([301,302,303,307,308]),aR=new Set([307,308]),jh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lR={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Va={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},bg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cR=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),w1="remix-router-transitions";function uR(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;Je(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=cR;let i={},o=Ll(e.routes,s,void 0,i),a,l=e.basename||"/",u=e.unstable_dataStrategy||mR,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,g=null,_=null,p=e.hydrationData!=null,h=Ri(o,e.history.location,l),w=null;if(h==null&&!d){let U=ur(404,{pathname:e.history.location.pathname}),{matches:W,route:G}=$x(o);h=W,w={[G.id]:U}}h&&d&&!e.hydrationData&&Jf(h,o,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,G=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(xe=>W[xe.route.id]!==void 0);C=h.slice(0,re+1).every(G)}else C=h.every(G)}else C=e.hydrationData!=null;let E,j={historyAction:e.history.action,location:e.history.location,matches:h,initialized:C,navigation:jh,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=$t.Pop,P=!1,A,L=!1,q=new Map,T=null,F=!1,b=!1,$=[],te=[],B=new Map,Z=0,I=-1,Q=new Map,z=new Set,V=new Map,fe=new Map,ne=new Set,se=new Map,Ae=new Map,he=new Map,ye=!1;function ke(){if(m=e.history.listen(U=>{let{action:W,location:G,delta:re}=U;if(ye){ye=!1;return}qi(Ae.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 xe=Oc({currentLocation:j.location,nextLocation:G,historyAction:W});if(xe&&re!=null){ye=!0,e.history.go(re*-1),co(xe,{state:"blocked",location:G,proceed(){co(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(re)},reset(){let Re=new Map(j.blockers);Re.set(xe,Va),Ne({blockers:Re})}});return}return K(W,G)}),r){TR(t,q);let U=()=>NR(t,q);t.addEventListener("pagehide",U),T=()=>t.removeEventListener("pagehide",U)}return j.initialized||K($t.Pop,j.location,{initialHydration:!0}),E}function Fe(){m&&m(),T&&T(),v.clear(),A&&A.abort(),j.fetchers.forEach((U,W)=>Ht(W)),j.blockers.forEach((U,W)=>Dc(W))}function De(U){return v.add(U),()=>v.delete(U)}function Ne(U,W){W===void 0&&(W={}),j=Pt({},j,U);let G=[],re=[];f.v7_fetcherPersist&&j.fetchers.forEach((xe,Re)=>{xe.state==="idle"&&(ne.has(Re)?re.push(Re):G.push(Re))}),[...v].forEach(xe=>xe(j,{deletedFetchers:re,unstable_viewTransitionOpts:W.viewTransitionOpts,unstable_flushSync:W.flushSync===!0})),f.v7_fetcherPersist&&(G.forEach(xe=>j.fetchers.delete(xe)),re.forEach(xe=>Ht(xe)))}function nt(U,W,G){var re,xe;let{flushSync:Re}=G===void 0?{}:G,$e=j.actionData!=null&&j.navigation.formMethod!=null&&dn(j.navigation.formMethod)&&j.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,de;W.actionData?Object.keys(W.actionData).length>0?de=W.actionData:de=null:$e?de=j.actionData:de=null;let Ye=W.loaderData?Ux(j.loaderData,W.loaderData,W.matches||[],W.errors):j.loaderData,Me=j.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((ht,yt)=>Me.set(yt,Va)));let ze=P===!0||j.navigation.formMethod!=null&&dn(j.navigation.formMethod)&&((xe=U.state)==null?void 0:xe._isRedirect)!==!0;a&&(o=a,a=void 0),F||R===$t.Pop||(R===$t.Push?e.history.push(U,U.state):R===$t.Replace&&e.history.replace(U,U.state));let mt;if(R===$t.Pop){let ht=q.get(j.location.pathname);ht&&ht.has(U.pathname)?mt={currentLocation:j.location,nextLocation:U}:q.has(U.pathname)&&(mt={currentLocation:U,nextLocation:j.location})}else if(L){let ht=q.get(j.location.pathname);ht?ht.add(U.pathname):(ht=new Set([U.pathname]),q.set(j.location.pathname,ht)),mt={currentLocation:j.location,nextLocation:U}}Ne(Pt({},W,{actionData:de,loaderData:Ye,historyAction:R,location:U,initialized:!0,navigation:jh,revalidation:"idle",restoreScrollPosition:yy(U,W.matches||j.matches),preventScrollReset:ze,blockers:Me}),{viewTransitionOpts:mt,flushSync:Re===!0}),R=$t.Pop,P=!1,L=!1,F=!1,b=!1,$=[],te=[]}async function k(U,W){if(typeof U=="number"){e.history.go(U);return}let G=Bp(j.location,j.matches,l,f.v7_prependBasename,U,f.v7_relativeSplatPath,W==null?void 0:W.fromRouteId,W==null?void 0:W.relative),{path:re,submission:xe,error:Re}=Dx(f.v7_normalizeFormMethod,!1,G,W),$e=j.location,de=Il(j.location,re,W&&W.state);de=Pt({},de,e.history.encodeLocation(de));let Ye=W&&W.replace!=null?W.replace:void 0,Me=$t.Push;Ye===!0?Me=$t.Replace:Ye===!1||xe!=null&&dn(xe.formMethod)&&xe.formAction===j.location.pathname+j.location.search&&(Me=$t.Replace);let ze=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,mt=(W&&W.unstable_flushSync)===!0,ht=Oc({currentLocation:$e,nextLocation:de,historyAction:Me});if(ht){co(ht,{state:"blocked",location:de,proceed(){co(ht,{state:"proceeding",proceed:void 0,reset:void 0,location:de}),k(U,W)},reset(){let yt=new Map(j.blockers);yt.set(ht,Va),Ne({blockers:yt})}});return}return await K(Me,de,{submission:xe,pendingError:Re,preventScrollReset:ze,replace:W&&W.replace,enableViewTransition:W&&W.unstable_viewTransition,flushSync:mt})}function J(){if(We(),Ne({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){K(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}K(R||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function K(U,W,G){A&&A.abort(),A=null,R=U,F=(G&&G.startUninterruptedRevalidation)===!0,nT(j.location,j.matches),P=(G&&G.preventScrollReset)===!0,L=(G&&G.enableViewTransition)===!0;let re=a||o,xe=G&&G.overrideNavigation,Re=Ri(re,W,l),$e=(G&&G.flushSync)===!0,de=Jf(Re,re,W.pathname);if(de.active&&de.matches&&(Re=de.matches),!Re){let{error:dt,notFoundMatches:Jt,route:Vt}=uo(W.pathname);nt(W,{matches:Jt,loaderData:{},errors:{[Vt.id]:dt}},{flushSync:$e});return}if(j.initialized&&!b&&_R(j.location,W)&&!(G&&G.submission&&dn(G.submission.formMethod))){nt(W,{matches:Re},{flushSync:$e});return}A=new AbortController;let Ye=go(e.history,W,A.signal,G&&G.submission),Me;if(G&&G.pendingError)Me=[Io(Re).route.id,{type:xt.error,error:G.pendingError}];else if(G&&G.submission&&dn(G.submission.formMethod)){let dt=await D(Ye,W,G.submission,Re,de.active,{replace:G.replace,flushSync:$e});if(dt.shortCircuited)return;if(dt.pendingActionResult){let[Jt,Vt]=dt.pendingActionResult;if(Mr(Vt)&&af(Vt.error)&&Vt.error.status===404){A=null,nt(W,{matches:dt.matches,loaderData:{},errors:{[Jt]:Vt.error}});return}}Re=dt.matches||Re,Me=dt.pendingActionResult,xe=Th(W,G.submission),$e=!1,de.active=!1,Ye=go(e.history,Ye.url,Ye.signal)}let{shortCircuited:ze,matches:mt,loaderData:ht,errors:yt}=await S(Ye,W,Re,de.active,xe,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,G&&G.initialHydration===!0,$e,Me);ze||(A=null,nt(W,Pt({matches:mt||Re},Vx(Me),{loaderData:ht,errors:yt})))}async function D(U,W,G,re,xe,Re){Re===void 0&&(Re={}),We();let $e=ER(W,G);if(Ne({navigation:$e},{flushSync:Re.flushSync===!0}),xe){let Me=await Mc(re,W.pathname,U.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){let{boundaryId:ze,error:mt}=Rn(W.pathname,Me);return{matches:Me.partialMatches,pendingActionResult:[ze,{type:xt.error,error:mt}]}}else if(Me.matches)re=Me.matches;else{let{notFoundMatches:ze,error:mt,route:ht}=uo(W.pathname);return{matches:ze,pendingActionResult:[ht.id,{type:xt.error,error:mt}]}}}let de,Ye=Ja(re,W);if(!Ye.route.action&&!Ye.route.lazy)de={type:xt.error,error:ur(405,{method:U.method,pathname:W.pathname,routeId:Ye.route.id})};else if(de=(await ee("action",U,[Ye],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Li(de)){let Me;return Re&&Re.replace!=null?Me=Re.replace:Me=Lx(de.response.headers.get("Location"),new URL(U.url),l)===j.location.pathname+j.location.search,await X(U,de,{submission:G,replace:Me}),{shortCircuited:!0}}if(Ii(de))throw ur(400,{type:"defer-action"});if(Mr(de)){let Me=Io(re,Ye.route.id);return(Re&&Re.replace)!==!0&&(R=$t.Push),{matches:re,pendingActionResult:[Me.route.id,de]}}return{matches:re,pendingActionResult:[Ye.route.id,de]}}async function S(U,W,G,re,xe,Re,$e,de,Ye,Me,ze){let mt=xe||Th(W,Re),ht=Re||$e||Hx(mt),yt=!F&&(!f.v7_partialHydration||!Ye);if(re){if(yt){let It=N(ze);Ne(Pt({navigation:mt},It!==void 0?{actionData:It}:{}),{flushSync:Me})}let qe=await Mc(G,W.pathname,U.signal);if(qe.type==="aborted")return{shortCircuited:!0};if(qe.type==="error"){let{boundaryId:It,error:Pr}=Rn(W.pathname,qe);return{matches:qe.partialMatches,loaderData:{},errors:{[It]:Pr}}}else if(qe.matches)G=qe.matches;else{let{error:It,notFoundMatches:Pr,route:jt}=uo(W.pathname);return{matches:Pr,loaderData:{},errors:{[jt.id]:It}}}}let dt=a||o,[Jt,Vt]=Ox(e.history,j,G,ht,W,f.v7_partialHydration&&Ye===!0,f.v7_skipActionErrorRevalidation,b,$,te,ne,V,z,dt,l,ze);if(Os(qe=>!(G&&G.some(It=>It.route.id===qe))||Jt&&Jt.some(It=>It.route.id===qe)),I=++Z,Jt.length===0&&Vt.length===0){let qe=Qn();return nt(W,Pt({matches:G,loaderData:{},errors:ze&&Mr(ze[1])?{[ze[0]]:ze[1].error}:null},Vx(ze),qe?{fetchers:new Map(j.fetchers)}:{}),{flushSync:Me}),{shortCircuited:!0}}if(yt){let qe={};if(!re){qe.navigation=mt;let It=N(ze);It!==void 0&&(qe.actionData=It)}Vt.length>0&&(qe.fetchers=O(Vt)),Ne(qe,{flushSync:Me})}Vt.forEach(qe=>{B.has(qe.key)&&at(qe.key),qe.controller&&B.set(qe.key,qe.controller)});let Aa=()=>Vt.forEach(qe=>at(qe.key));A&&A.signal.addEventListener("abort",Aa);let{loaderResults:Ms,fetcherResults:fo}=await me(j.matches,G,Jt,Vt,U);if(U.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",Aa),Vt.forEach(qe=>B.delete(qe.key));let ho=Bx([...Ms,...fo]);if(ho){if(ho.idx>=Jt.length){let qe=Vt[ho.idx-Jt.length].key;z.add(qe)}return await X(U,ho.result,{replace:de}),{shortCircuited:!0}}let{loaderData:po,errors:Pn}=zx(j,G,Jt,Ms,ze,Vt,fo,se);se.forEach((qe,It)=>{qe.subscribe(Pr=>{(Pr||qe.done)&&se.delete(It)})}),f.v7_partialHydration&&Ye&&j.errors&&Object.entries(j.errors).filter(qe=>{let[It]=qe;return!Jt.some(Pr=>Pr.route.id===It)}).forEach(qe=>{let[It,Pr]=qe;Pn=Object.assign(Pn||{},{[It]:Pr})});let Ic=Qn(),Lc=Gr(I),Fc=Ic||Lc||Vt.length>0;return Pt({matches:G,loaderData:po,errors:Pn},Fc?{fetchers:new Map(j.fetchers)}:{})}function N(U){if(U&&!Mr(U[1]))return{[U[0]]:U[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function O(U){return U.forEach(W=>{let G=j.fetchers.get(W.key),re=$a(void 0,G?G.data:void 0);j.fetchers.set(W.key,re)}),new Map(j.fetchers)}function Y(U,W,G,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 xe=(re&&re.unstable_flushSync)===!0,Re=a||o,$e=Bp(j.location,j.matches,l,f.v7_prependBasename,G,f.v7_relativeSplatPath,W,re==null?void 0:re.relative),de=Ri(Re,$e,l),Ye=Jf(de,Re,$e);if(Ye.active&&Ye.matches&&(de=Ye.matches),!de){Et(U,W,ur(404,{pathname:$e}),{flushSync:xe});return}let{path:Me,submission:ze,error:mt}=Dx(f.v7_normalizeFormMethod,!0,$e,re);if(mt){Et(U,W,mt,{flushSync:xe});return}let ht=Ja(de,Me);if(P=(re&&re.preventScrollReset)===!0,ze&&dn(ze.formMethod)){M(U,W,Me,ht,de,Ye.active,xe,ze);return}V.set(U,{routeId:W,path:Me}),H(U,W,Me,ht,de,Ye.active,xe,ze)}async function M(U,W,G,re,xe,Re,$e,de){We(),V.delete(U);function Ye(jt){if(!jt.route.action&&!jt.route.lazy){let Jn=ur(405,{method:de.formMethod,pathname:G,routeId:W});return Et(U,W,Jn,{flushSync:$e}),!0}return!1}if(!Re&&Ye(re))return;let Me=j.fetchers.get(U);Ue(U,jR(de,Me),{flushSync:$e});let ze=new AbortController,mt=go(e.history,G,ze.signal,de);if(Re){let jt=await Mc(xe,G,mt.signal);if(jt.type==="aborted")return;if(jt.type==="error"){let{error:Jn}=Rn(G,jt);Et(U,W,Jn,{flushSync:$e});return}else if(jt.matches){if(xe=jt.matches,re=Ja(xe,G),Ye(re))return}else{Et(U,W,ur(404,{pathname:G}),{flushSync:$e});return}}B.set(U,ze);let ht=Z,dt=(await ee("action",mt,[re],xe))[0];if(mt.signal.aborted){B.get(U)===ze&&B.delete(U);return}if(f.v7_fetcherPersist&&ne.has(U)){if(Li(dt)||Mr(dt)){Ue(U,zs(void 0));return}}else{if(Li(dt))if(B.delete(U),I>ht){Ue(U,zs(void 0));return}else return z.add(U),Ue(U,$a(de)),X(mt,dt,{fetcherSubmission:de});if(Mr(dt)){Et(U,W,dt.error);return}}if(Ii(dt))throw ur(400,{type:"defer-action"});let Jt=j.navigation.location||j.location,Vt=go(e.history,Jt,ze.signal),Aa=a||o,Ms=j.navigation.state!=="idle"?Ri(Aa,j.navigation.location,l):j.matches;Je(Ms,"Didn't find any matches after fetcher action");let fo=++Z;Q.set(U,fo);let ho=$a(de,dt.data);j.fetchers.set(U,ho);let[po,Pn]=Ox(e.history,j,Ms,de,Jt,!1,f.v7_skipActionErrorRevalidation,b,$,te,ne,V,z,Aa,l,[re.route.id,dt]);Pn.filter(jt=>jt.key!==U).forEach(jt=>{let Jn=jt.key,xy=j.fetchers.get(Jn),oT=$a(void 0,xy?xy.data:void 0);j.fetchers.set(Jn,oT),B.has(Jn)&&at(Jn),jt.controller&&B.set(Jn,jt.controller)}),Ne({fetchers:new Map(j.fetchers)});let Ic=()=>Pn.forEach(jt=>at(jt.key));ze.signal.addEventListener("abort",Ic);let{loaderResults:Lc,fetcherResults:Fc}=await me(j.matches,Ms,po,Pn,Vt);if(ze.signal.aborted)return;ze.signal.removeEventListener("abort",Ic),Q.delete(U),B.delete(U),Pn.forEach(jt=>B.delete(jt.key));let qe=Bx([...Lc,...Fc]);if(qe){if(qe.idx>=po.length){let jt=Pn[qe.idx-po.length].key;z.add(jt)}return X(Vt,qe.result)}let{loaderData:It,errors:Pr}=zx(j,j.matches,po,Lc,void 0,Pn,Fc,se);if(j.fetchers.has(U)){let jt=zs(dt.data);j.fetchers.set(U,jt)}Gr(fo),j.navigation.state==="loading"&&fo>I?(Je(R,"Expected pending action"),A&&A.abort(),nt(j.navigation.location,{matches:Ms,loaderData:It,errors:Pr,fetchers:new Map(j.fetchers)})):(Ne({errors:Pr,loaderData:Ux(j.loaderData,It,Ms,Pr),fetchers:new Map(j.fetchers)}),b=!1)}async function H(U,W,G,re,xe,Re,$e,de){let Ye=j.fetchers.get(U);Ue(U,$a(de,Ye?Ye.data:void 0),{flushSync:$e});let Me=new AbortController,ze=go(e.history,G,Me.signal);if(Re){let dt=await Mc(xe,G,ze.signal);if(dt.type==="aborted")return;if(dt.type==="error"){let{error:Jt}=Rn(G,dt);Et(U,W,Jt,{flushSync:$e});return}else if(dt.matches)xe=dt.matches,re=Ja(xe,G);else{Et(U,W,ur(404,{pathname:G}),{flushSync:$e});return}}B.set(U,Me);let mt=Z,yt=(await ee("loader",ze,[re],xe))[0];if(Ii(yt)&&(yt=await C1(yt,ze.signal,!0)||yt),B.get(U)===Me&&B.delete(U),!ze.signal.aborted){if(ne.has(U)){Ue(U,zs(void 0));return}if(Li(yt))if(I>mt){Ue(U,zs(void 0));return}else{z.add(U),await X(ze,yt);return}if(Mr(yt)){Et(U,W,yt.error);return}Je(!Ii(yt),"Unhandled fetcher deferred data"),Ue(U,zs(yt.data))}}async function X(U,W,G){let{submission:re,fetcherSubmission:xe,replace:Re}=G===void 0?{}:G;W.response.headers.has("X-Remix-Revalidate")&&(b=!0);let $e=W.response.headers.get("Location");Je($e,"Expected a Location header on the redirect Response"),$e=Lx($e,new URL(U.url),l);let de=Il(j.location,$e,{_isRedirect:!0});if(r){let yt=!1;if(W.response.headers.has("X-Remix-Reload-Document"))yt=!0;else if(bg.test($e)){const dt=e.history.createURL($e);yt=dt.origin!==t.location.origin||wa(dt.pathname,l)==null}if(yt){Re?t.location.replace($e):t.location.assign($e);return}}A=null;let Ye=Re===!0?$t.Replace:$t.Push,{formMethod:Me,formAction:ze,formEncType:mt}=j.navigation;!re&&!xe&&Me&&ze&&mt&&(re=Hx(j.navigation));let ht=re||xe;if(aR.has(W.response.status)&&ht&&dn(ht.formMethod))await K(Ye,de,{submission:Pt({},ht,{formAction:$e}),preventScrollReset:P});else{let yt=Th(de,re);await K(Ye,de,{overrideNavigation:yt,fetcherSubmission:xe,preventScrollReset:P})}}async function ee(U,W,G,re){try{let xe=await gR(u,U,W,G,re,i,s);return await Promise.all(xe.map((Re,$e)=>{if(SR(Re)){let de=Re.result;return{type:xt.redirect,response:xR(de,W,G[$e].route.id,re,l,f.v7_relativeSplatPath)}}return yR(Re)}))}catch(xe){return G.map(()=>({type:xt.error,error:xe}))}}async function me(U,W,G,re,xe){let[Re,...$e]=await Promise.all([G.length?ee("loader",xe,G,W):[],...re.map(de=>{if(de.matches&&de.match&&de.controller){let Ye=go(e.history,de.path,de.controller.signal);return ee("loader",Ye,[de.match],de.matches).then(Me=>Me[0])}else return Promise.resolve({type:xt.error,error:ur(404,{pathname:de.path})})})]);return await Promise.all([Wx(U,G,Re,Re.map(()=>xe.signal),!1,j.loaderData),Wx(U,re.map(de=>de.match),$e,re.map(de=>de.controller?de.controller.signal:null),!0)]),{loaderResults:Re,fetcherResults:$e}}function We(){b=!0,$.push(...Os()),V.forEach((U,W)=>{B.has(W)&&(te.push(W),at(W))})}function Ue(U,W,G){G===void 0&&(G={}),j.fetchers.set(U,W),Ne({fetchers:new Map(j.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Et(U,W,G,re){re===void 0&&(re={});let xe=Io(j.matches,W);Ht(U),Ne({errors:{[xe.route.id]:G},fetchers:new Map(j.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Kr(U){return f.v7_fetcherPersist&&(fe.set(U,(fe.get(U)||0)+1),ne.has(U)&&ne.delete(U)),j.fetchers.get(U)||lR}function Ht(U){let W=j.fetchers.get(U);B.has(U)&&!(W&&W.state==="loading"&&Q.has(U))&&at(U),V.delete(U),Q.delete(U),z.delete(U),ne.delete(U),j.fetchers.delete(U)}function qn(U){if(f.v7_fetcherPersist){let W=(fe.get(U)||0)-1;W<=0?(fe.delete(U),ne.add(U)):fe.set(U,W)}else Ht(U);Ne({fetchers:new Map(j.fetchers)})}function at(U){let W=B.get(U);Je(W,"Expected fetch controller: "+U),W.abort(),B.delete(U)}function Xn(U){for(let W of U){let G=Kr(W),re=zs(G.data);j.fetchers.set(W,re)}}function Qn(){let U=[],W=!1;for(let G of z){let re=j.fetchers.get(G);Je(re,"Expected fetcher: "+G),re.state==="loading"&&(z.delete(G),U.push(G),W=!0)}return Xn(U),W}function Gr(U){let W=[];for(let[G,re]of Q)if(re<U){let xe=j.fetchers.get(G);Je(xe,"Expected fetcher: "+G),xe.state==="loading"&&(at(G),Q.delete(G),W.push(G))}return Xn(W),W.length>0}function Ac(U,W){let G=j.blockers.get(U)||Va;return Ae.get(U)!==W&&Ae.set(U,W),G}function Dc(U){j.blockers.delete(U),Ae.delete(U)}function co(U,W){let G=j.blockers.get(U)||Va;Je(G.state==="unblocked"&&W.state==="blocked"||G.state==="blocked"&&W.state==="blocked"||G.state==="blocked"&&W.state==="proceeding"||G.state==="blocked"&&W.state==="unblocked"||G.state==="proceeding"&&W.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+W.state);let re=new Map(j.blockers);re.set(U,W),Ne({blockers:re})}function Oc(U){let{currentLocation:W,nextLocation:G,historyAction:re}=U;if(Ae.size===0)return;Ae.size>1&&qi(!1,"A router only supports one blocker at a time");let xe=Array.from(Ae.entries()),[Re,$e]=xe[xe.length-1],de=j.blockers.get(Re);if(!(de&&de.state==="proceeding")&&$e({currentLocation:W,nextLocation:G,historyAction:re}))return Re}function uo(U){let W=ur(404,{pathname:U}),G=a||o,{matches:re,route:xe}=$x(G);return Os(),{notFoundMatches:re,route:xe,error:W}}function Rn(U,W){return{boundaryId:Io(W.partialMatches).route.id,error:ur(400,{type:"route-discovery",pathname:U,message:W.error!=null&&"message"in W.error?W.error:String(W.error)})}}function Os(U){let W=[];return se.forEach((G,re)=>{(!U||U(re))&&(G.cancel(),W.push(re),se.delete(re))}),W}function rT(U,W,G){if(x=U,_=W,g=G||null,!p&&j.navigation===jh){p=!0;let re=yy(j.location,j.matches);re!=null&&Ne({restoreScrollPosition:re})}return()=>{x=null,_=null,g=null}}function vy(U,W){return g&&g(U,W.map(re=>z2(re,j.loaderData)))||U.key}function nT(U,W){if(x&&_){let G=vy(U,W);x[G]=_()}}function yy(U,W){if(x){let G=vy(U,W),re=x[G];if(typeof re=="number")return re}return null}function Jf(U,W,G){if(d)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:Nu(W,G,l,!0)}}else return{active:!0,matches:Nu(W,G,l,!0)||[]};return{active:!1,matches:null}}async function Mc(U,W,G){let re=U,xe=re.length>0?re[re.length-1].route:null;for(;;){let Re=a==null,$e=a||o;try{await pR(d,W,re,$e,i,s,he,G)}catch(ze){return{type:"error",error:ze,partialMatches:re}}finally{Re&&(o=[...o])}if(G.aborted)return{type:"aborted"};let de=Ri($e,W,l),Ye=!1;if(de){let ze=de[de.length-1].route;if(ze.index)return{type:"success",matches:de};if(ze.path&&ze.path.length>0)if(ze.path==="*")Ye=!0;else return{type:"success",matches:de}}let Me=Nu($e,W,l,!0);if(!Me||re.map(ze=>ze.route.id).join("-")===Me.map(ze=>ze.route.id).join("-"))return{type:"success",matches:Ye?de:null};if(re=Me,xe=re[re.length-1].route,xe.path==="*")return{type:"success",matches:re}}}function sT(U){i={},a=Ll(U,s,void 0,i)}function iT(U,W){let G=a==null;b1(U,W,a||o,i,s),G&&(o=[...o],Ne({}))}return E={get basename(){return l},get future(){return f},get state(){return j},get routes(){return o},get window(){return t},initialize:ke,subscribe:De,enableScrollRestoration:rT,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Kr,deleteFetcher:qn,dispose:Fe,getBlocker:Ac,deleteBlocker:Dc,patchRoutes:iT,_internalFetchControllers:B,_internalActiveDeferreds:se,_internalSetRoutes:sT},E}function dR(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Bp(e,t,r,n,s,i,o,a){let l,u;if(o){l=[];for(let f of t)if(l.push(f),f.route.id===o){u=f;break}}else l=t,u=t[t.length-1];let d=of(s||".",sf(l,i),wa(e.pathname,r)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!Sg(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:hs([r,d.pathname])),Xi(d)}function Dx(e,t,r,n){if(!n||!dR(n))return{path:r};if(n.formMethod&&!CR(n.formMethod))return{path:r,error:ur(405,{method:n.formMethod})};let s=()=>({path:r,error:ur(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=S1(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!dn(o))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[g,_]=x;return""+v+g+"="+_+`
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!dn(o))return s();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Je(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=Wp(n.formData),u=n.formData;else if(n.body instanceof FormData)l=Wp(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=Fx(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=Fx(l)}catch{return s()}let d={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(dn(d.formMethod))return{path:r,submission:d};let f=Ts(r);return t&&f.search&&Sg(f.search)&&l.append("index",""),f.search="?"+l,{path:Xi(f),submission:d}}function fR(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 Ox(e,t,r,n,s,i,o,a,l,u,d,f,m,v,x,g){let _=g?Mr(g[1])?g[1].error:g[1].data:void 0,p=e.createURL(t.location),h=e.createURL(s),w=g&&Mr(g[1])?g[0]:void 0,C=w?fR(r,w):r,E=g?g[1].statusCode:void 0,j=o&&E&&E>=400,R=C.filter((A,L)=>{let{route:q}=A;if(q.lazy)return!0;if(q.loader==null)return!1;if(i)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(hR(t.loaderData,t.matches[L],A)||l.some(b=>b===A.route.id))return!0;let T=t.matches[L],F=A;return Mx(A,Pt({currentUrl:p,currentParams:T.params,nextUrl:h,nextParams:F.params},n,{actionResult:_,actionStatus:E,defaultShouldRevalidate:j?!1:a||p.pathname+p.search===h.pathname+h.search||p.search!==h.search||_1(T,F)}))}),P=[];return f.forEach((A,L)=>{if(i||!r.some($=>$.route.id===A.routeId)||d.has(L))return;let q=Ri(v,A.path,x);if(!q){P.push({key:L,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get(L),F=Ja(q,A.path),b=!1;m.has(L)?b=!1:u.includes(L)?b=!0:T&&T.state!=="idle"&&T.data===void 0?b=a:b=Mx(F,Pt({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:r[r.length-1].params},n,{actionResult:_,actionStatus:E,defaultShouldRevalidate:j?!1:a})),b&&P.push({key:L,routeId:A.routeId,path:A.path,matches:q,match:F,controller:new AbortController})}),[R,P]}function hR(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function _1(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Mx(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function pR(e,t,r,n,s,i,o,a){let l=[t,...r.map(u=>u.route.id)].join("-");try{let u=o.get(l);u||(u=e({path:t,matches:r,patch:(d,f)=>{a.aborted||b1(d,f,n,s,i)}}),o.set(l,u)),u&&bR(u)&&await u}finally{o.delete(l)}}function b1(e,t,r,n,s){if(e){var i;let o=n[e];Je(o,"No route found to patch children into: routeId = "+e);let a=Ll(t,s,[e,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],n);o.children?o.children.push(...a):o.children=a}else{let o=Ll(t,s,["patch",String(r.length||"0")],n);r.push(...o)}}async function Ix(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Je(s,"No route found in manifest");let i={};for(let o in n){let l=s[o]!==void 0&&o!=="hasErrorBoundary";qi(!l,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!L2.has(o)&&(i[o]=n[o])}Object.assign(s,i),Object.assign(s,Pt({},t(s),{lazy:void 0}))}function mR(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function gR(e,t,r,n,s,i,o,a){let l=n.reduce((f,m)=>f.add(m.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let m=l.has(f.route.id);return Pt({},f,{shouldLoad:m,resolve:x=>(u.add(f.route.id),m?vR(t,r,f,i,o,x,a):Promise.resolve({type:xt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(f=>Je(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)=>l.has(s[m].route.id))}async function vR(e,t,r,n,s,i,o){let a,l,u=d=>{let f,m=new Promise((g,_)=>f=_);l=()=>f(),t.signal.addEventListener("abort",l);let v=g=>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:o},...g!==void 0?[g]:[]),x;return i?x=i(g=>v(g)):x=(async()=>{try{return{type:"data",result:await v()}}catch(g){return{type:"error",result:g}}})(),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}),Ix(r.route,s,n)]);if(f!==void 0)throw f;a=m}else if(await Ix(r.route,s,n),d=r.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),m=f.pathname+f.search;throw ur(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:xt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),m=f.pathname+f.search;throw ur(404,{pathname:m})}Je(a.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{l&&t.signal.removeEventListener("abort",l)}return a}async function yR(e){let{result:t,type:r,status:n}=e;if(k1(t)){let o;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(a){return{type:xt.error,error:a}}return r===xt.error?{type:xt.error,error:new _g(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:xt.data,data:o,statusCode:t.status,headers:t.headers}}if(r===xt.error)return{type:xt.error,error:t,statusCode:af(t)?t.status:n};if(kR(t)){var s,i;return{type:xt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}return{type:xt.data,data:t,statusCode:n}}function xR(e,t,r,n,s,i){let o=e.headers.get("Location");if(Je(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!bg.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=Bp(new URL(t.url),a,s,!0,o,i),e.headers.set("Location",o)}return e}function Lx(e,t,r){if(bg.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=wa(s.pathname,r)!=null;if(s.origin===t.origin&&i)return s.pathname+s.search+s.hash}return e}function go(e,t,r,n){let s=e.createURL(S1(t)).toString(),i={signal:r};if(n&&dn(n.formMethod)){let{formMethod:o,formEncType:a}=n;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(n.json)):a==="text/plain"?i.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?i.body=Wp(n.formData):i.body=n.formData}return new Request(s,i)}function Wp(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Fx(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function wR(e,t,r,n,s,i){let o={},a=null,l,u=!1,d={},f=n&&Mr(n[1])?n[1].error:void 0;return r.forEach((m,v)=>{let x=t[v].route.id;if(Je(!Li(m),"Cannot handle redirect results in processLoaderData"),Mr(m)){let g=m.error;f!==void 0&&(g=f,f=void 0),a=a||{};{let _=Io(e,x);a[_.route.id]==null&&(a[_.route.id]=g)}o[x]=void 0,u||(u=!0,l=af(m.error)?m.error.status:500),m.headers&&(d[x]=m.headers)}else Ii(m)?(s.set(x,m.deferredData),o[x]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(d[x]=m.headers)):(o[x]=m.data,m.statusCode&&m.statusCode!==200&&!u&&(l=m.statusCode),m.headers&&(d[x]=m.headers))}),f!==void 0&&n&&(a={[n[0]]:f},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:d}}function zx(e,t,r,n,s,i,o,a){let{loaderData:l,errors:u}=wR(t,r,n,s,a);for(let d=0;d<i.length;d++){let{key:f,match:m,controller:v}=i[d];Je(o!==void 0&&o[d]!==void 0,"Did not find corresponding fetcher result");let x=o[d];if(!(v&&v.signal.aborted))if(Mr(x)){let g=Io(e.matches,m==null?void 0:m.route.id);u&&u[g.route.id]||(u=Pt({},u,{[g.route.id]:x.error})),e.fetchers.delete(f)}else if(Li(x))Je(!1,"Unhandled fetcher revalidation redirect");else if(Ii(x))Je(!1,"Unhandled fetcher deferred data");else{let g=zs(x.data);e.fetchers.set(f,g)}}return{loaderData:l,errors:u}}function Ux(e,t,r,n){let s=Pt({},t);for(let i of r){let o=i.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(s[o]=t[o]):e[o]!==void 0&&i.route.loader&&(s[o]=e[o]),n&&n.hasOwnProperty(o))break}return s}function Vx(e){return e?Mr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Io(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 $x(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 ur(e,t){let{pathname:r,routeId:n,method:s,type:i,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+o):s&&r&&n?l="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.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",s&&r&&n?l="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&&(l='Invalid request method "'+s.toUpperCase()+'"')),new _g(e||500,a,new Error(l),!0)}function Bx(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Li(r))return{result:r,idx:t}}}function S1(e){let t=typeof e=="string"?Ts(e):e;return Xi(Pt({},t,{hash:""}))}function _R(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function bR(e){return typeof e=="object"&&e!=null&&"then"in e}function SR(e){return k1(e.result)&&oR.has(e.result.status)}function Ii(e){return e.type===xt.deferred}function Mr(e){return e.type===xt.error}function Li(e){return(e&&e.type)===xt.redirect}function kR(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 k1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function CR(e){return iR.has(e.toLowerCase())}function dn(e){return nR.has(e.toLowerCase())}async function Wx(e,t,r,n,s,i){for(let o=0;o<r.length;o++){let a=r[o],l=t[o];if(!l)continue;let u=e.find(f=>f.route.id===l.route.id),d=u!=null&&!_1(u,l)&&(i&&i[l.route.id])!==void 0;if(Ii(a)&&(s||d)){let f=n[o];Je(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await C1(a,f,s).then(m=>{m&&(r[o]=m||r[o])})}}}async function C1(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 Sg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ja(e,t){let r=typeof t=="string"?Ts(t).search:t.search;if(e[e.length-1].route.index&&Sg(r||""))return e[e.length-1];let n=y1(e);return n[n.length-1]}function Hx(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:i,json:o}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Th(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 ER(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 $a(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 jR(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 zs(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 TR(e,t){try{let r=e.sessionStorage.getItem(w1);if(r){let n=JSON.parse(r);for(let[s,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(s,new Set(i||[]))}}catch{}}function NR(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(w1,JSON.stringify(r))}catch(n){qi(!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 dd(){return dd=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},dd.apply(this,arguments)}const lf=y.createContext(null),E1=y.createContext(null),_i=y.createContext(null),kg=y.createContext(null),Ns=y.createContext({outlet:null,matches:[],isDataRoute:!1}),j1=y.createContext(null);function RR(e,t){let{relative:r}=t===void 0?{}:t;_a()||Je(!1);let{basename:n,navigator:s}=y.useContext(_i),{hash:i,pathname:o,search:a}=N1(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:hs([n,o])),s.createHref({pathname:l,search:a,hash:i})}function _a(){return y.useContext(kg)!=null}function jn(){return _a()||Je(!1),y.useContext(kg).location}function T1(e){y.useContext(_i).static||y.useLayoutEffect(e)}function jr(){let{isDataRoute:e}=y.useContext(Ns);return e?WR():PR()}function PR(){_a()||Je(!1);let e=y.useContext(lf),{basename:t,future:r,navigator:n}=y.useContext(_i),{matches:s}=y.useContext(Ns),{pathname:i}=jn(),o=JSON.stringify(sf(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return T1(()=>{a.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let f=of(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:hs([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,i,e])}const AR=y.createContext(null);function DR(e){let t=y.useContext(Ns).outlet;return t&&y.createElement(AR.Provider,{value:e},t)}function N1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(_i),{matches:s}=y.useContext(Ns),{pathname:i}=jn(),o=JSON.stringify(sf(s,n.v7_relativeSplatPath));return y.useMemo(()=>of(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function OR(e,t,r,n){_a()||Je(!1);let{navigator:s}=y.useContext(_i),{matches:i}=y.useContext(Ns),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=jn(),d;d=u;let f=d.pathname||"/",m=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=Ri(e,{pathname:m});return zR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:hs([l,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:hs([l,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n)}function MR(){let e=BR(),t=af(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 y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:s},r):null,null)}const IR=y.createElement(MR,null);class LR extends y.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?y.createElement(Ns.Provider,{value:this.props.routeContext},y.createElement(j1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function FR(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(lf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Ns.Provider,{value:t},n)}function zR(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if((i=r)!=null&&i.errors)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Je(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[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){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,m)=>{let v,x=!1,g=null,_=null;r&&(v=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||IR,l&&(u<0&&m===0?(HR("route-fallback"),x=!0,_=null):u===m&&(x=!0,_=f.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,m+1)),h=()=>{let w;return v?w=g:x?w=_:f.route.Component?w=y.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,y.createElement(FR,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?y.createElement(LR,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):h()},null)}var R1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(R1||{}),fd=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}(fd||{});function UR(e){let t=y.useContext(lf);return t||Je(!1),t}function VR(e){let t=y.useContext(E1);return t||Je(!1),t}function $R(e){let t=y.useContext(Ns);return t||Je(!1),t}function P1(e){let t=$R(),r=t.matches[t.matches.length-1];return r.route.id||Je(!1),r.route.id}function BR(){var e;let t=y.useContext(j1),r=VR(fd.UseRouteError),n=P1(fd.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function WR(){let{router:e}=UR(R1.UseNavigateStable),t=P1(fd.UseNavigateStable),r=y.useRef(!1);return T1(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,dd({fromRouteId:t},i)))},[e,t])}const Yx={};function HR(e,t,r){Yx[e]||(Yx[e]=!0)}function A1(e){let{to:t,replace:r,state:n,relative:s}=e;_a()||Je(!1);let{future:i,static:o}=y.useContext(_i),{matches:a}=y.useContext(Ns),{pathname:l}=jn(),u=jr(),d=of(t,sf(a,i.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:s}),[u,f,s,r,n]),null}function Cg(e){return DR(e.context)}function YR(e){let{basename:t="/",children:r=null,location:n,navigationType:s=$t.Pop,navigator:i,static:o=!1,future:a}=e;_a()&&Je(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:i,static:o,future:dd({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Ts(n));let{pathname:d="/",search:f="",hash:m="",state:v=null,key:x="default"}=n,g=y.useMemo(()=>{let _=wa(d,l);return _==null?null:{location:{pathname:_,search:f,hash:m,state:v,key:x},navigationType:s}},[l,d,f,m,v,x,s]);return g==null?null:y.createElement(_i.Provider,{value:u},y.createElement(kg.Provider,{children:r,value:g}))}new Promise(()=>{});function ZR(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.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 Fl(){return Fl=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},Fl.apply(this,arguments)}function KR(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function GR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qR(e,t){return e.button===0&&(!t||t==="_self")&&!GR(e)}function Hp(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 XR(e,t){let r=Hp(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(i=>{r.append(s,i)})}),r}const QR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],JR="6";try{window.__reactRouterVersion=JR}catch{}function eP(e,t){return uR({basename:void 0,future:Fl({},void 0,{v7_prependBasename:!0}),history:O2({window:void 0}),hydrationData:tP(),routes:e,mapRouteProperties:ZR,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function tP(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Fl({},t,{errors:rP(t.errors)})),t}function rP(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 _g(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(s.message);i.stack="",r[n]=i}}else r[n]=s;return r}const nP=y.createContext({isTransitioning:!1}),sP=y.createContext(new Map),iP="startTransition",Zx=fw[iP],oP="flushSync",Kx=D2[oP];function aP(e){Zx?Zx(e):e()}function Ba(e){Kx?Kx(e):e()}class lP{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 cP(e){let{fallbackElement:t,router:r,future:n}=e,[s,i]=y.useState(r.state),[o,a]=y.useState(),[l,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[m,v]=y.useState(),[x,g]=y.useState(),_=y.useRef(new Map),{v7_startTransition:p}=n||{},h=y.useCallback(P=>{p?aP(P):P()},[p]),w=y.useCallback((P,A)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:T}=A;L.forEach(b=>_.current.delete(b)),P.fetchers.forEach((b,$)=>{b.data!==void 0&&_.current.set($,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!T||F){q?Ba(()=>i(P)):h(()=>i(P));return}if(q){Ba(()=>{m&&(d&&d.resolve(),m.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:T.currentLocation,nextLocation:T.nextLocation})});let b=r.window.document.startViewTransition(()=>{Ba(()=>i(P))});b.finished.finally(()=>{Ba(()=>{f(void 0),v(void 0),a(void 0),u({isTransitioning:!1})})}),Ba(()=>v(b));return}m?(d&&d.resolve(),m.skipTransition(),g({state:P,currentLocation:T.currentLocation,nextLocation:T.nextLocation})):(a(P),u({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}))},[r.window,m,d,_,h]);y.useLayoutEffect(()=>r.subscribe(w),[r,w]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new lP)},[l]),y.useEffect(()=>{if(d&&o&&r.window){let P=o,A=d.promise,L=r.window.document.startViewTransition(async()=>{h(()=>i(P)),await A});L.finished.finally(()=>{f(void 0),v(void 0),a(void 0),u({isTransitioning:!1})}),v(L)}},[h,o,d,r.window]),y.useEffect(()=>{d&&o&&s.location.key===o.location.key&&d.resolve()},[d,m,s.location,o]),y.useEffect(()=>{!l.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),g(void 0))},[l.isTransitioning,x]),y.useEffect(()=>{},[]);let C=y.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]),E=r.basename||"/",j=y.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),R=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(lf.Provider,{value:j},y.createElement(E1.Provider,{value:s},y.createElement(sP.Provider,{value:_.current},y.createElement(nP.Provider,{value:l},y.createElement(YR,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:R},s.initialized||r.future.v7_partialHydration?y.createElement(uP,{routes:r.routes,future:r.future,state:s}):t))))),null)}const uP=y.memo(dP);function dP(e){let{routes:t,future:r,state:n}=e;return OR(t,void 0,n,r)}const fP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dr=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,m=KR(t,QR),{basename:v}=y.useContext(_i),x,g=!1;if(typeof u=="string"&&hP.test(u)&&(x=u,fP))try{let w=new URL(window.location.href),C=u.startsWith("//")?new URL(w.protocol+u):new URL(u),E=wa(C.pathname,v);C.origin===w.origin&&E!=null?u=E+C.search+C.hash:g=!0}catch{}let _=RR(u,{relative:s}),p=pP(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function h(w){n&&n(w),w.defaultPrevented||p(w)}return y.createElement("a",Fl({},m,{href:x||_,onClick:g||i?n:h,ref:r,target:l}))});var Gx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Gx||(Gx={}));var qx;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qx||(qx={}));function pP(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=jr(),u=jn(),d=N1(e,{relative:o});return y.useCallback(f=>{if(qR(f,r)){f.preventDefault();let m=n!==void 0?n:Xi(u)===Xi(d);l(e,{replace:m,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[u,l,d,n,s,r,e,i,o,a])}function mP(e){let t=y.useRef(Hp(e)),r=y.useRef(!1),n=jn(),s=y.useMemo(()=>XR(n.search,r.current?null:t.current),[n.search]),i=jr(),o=y.useCallback((a,l)=>{const u=Hp(typeof a=="function"?a(s):a);r.current=!0,i("?"+u,l)},[i,s]);return[s,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 gP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),D1=(...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 vP={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 yP=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...vP,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:D1("lucide",s),...a},[...o.map(([u,d])=>y.createElement(u,d)),...Array.isArray(i)?i:[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 gt=(e,t)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(yP,{ref:i,iconNode:t,className:D1(`lucide-${gP(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 xP=gt("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 wP=gt("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 _P=gt("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 O1=gt("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 M1=gt("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 bP=gt("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 SP=gt("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 kP=gt("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 CP=gt("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 Xx=gt("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 EP=gt("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 Yp=gt("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 jP=gt("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 Qx=gt("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 Jx=gt("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=gt("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 TP=gt("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 NP=gt("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 RP=gt("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 PP=gt("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 AP=gt("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 Ru=gt("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 t0=gt("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 I1=gt("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 DP=gt("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 OP=gt("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 MP=gt("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 Eg=gt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function IP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function cf(...e){return t=>e.forEach(r=>IP(r,t))}function Qe(...e){return y.useCallback(cf(...e),e)}var ws=y.forwardRef((e,t)=>{const{children:r,...n}=e,s=y.Children.toArray(r),i=s.find(LP);if(i){const o=i.props.children,a=s.map(l=>l===i?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:l);return c.jsx(Zp,{...n,ref:t,children:y.isValidElement(o)?y.cloneElement(o,void 0,a):null})}return c.jsx(Zp,{...n,ref:t,children:r})});ws.displayName="Slot";var Zp=y.forwardRef((e,t)=>{const{children:r,...n}=e;if(y.isValidElement(r)){const s=zP(r);return y.cloneElement(r,{...FP(n,r.props),ref:t?cf(t,s):s})}return y.Children.count(r)>1?y.Children.only(null):null});Zp.displayName="SlotClone";var jg=({children:e})=>c.jsx(c.Fragment,{children:e});function LP(e){return y.isValidElement(e)&&e.type===jg}function FP(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function zP(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 L1(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=L1(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function UP(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=L1(e))&&(n&&(n+=" "),n+=t);return n}const r0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,n0=UP,pc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return n0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],f=i==null?void 0:i[u];if(d===null)return null;const m=r0(d)||r0(f);return s[u][m]}),a=r&&Object.entries(r).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),l=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[g,_]=x;return Array.isArray(_)?_.includes({...i,...a}[g]):{...i,...a}[g]===_})?[...u,f,m]:u},[]);return n0(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};function F1(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=F1(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function VP(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=F1(e))&&(n&&(n+=" "),n+=t);return n}const Tg="-";function $P(e){const t=WP(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function s(o){const a=o.split(Tg);return a[0]===""&&a.length!==1&&a.shift(),z1(a,t)||BP(o)}function i(o,a){const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}return{getClassGroupId:s,getConflictingClassGroupIds:i}}function z1(e,t){var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?z1(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Tg);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId}const s0=/^\[(.+)\]$/;function BP(e){if(s0.test(e)){const t=s0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function WP(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return YP(Object.entries(e.classGroups),r).forEach(([i,o])=>{Kp(o,n,i,t)}),n}function Kp(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:i0(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(HP(s)){Kp(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Kp(o,i0(t,i),r,n)})})}function i0(e,t){let r=e;return t.split(Tg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function HP(e){return e.isThemeGetter}function YP(e,t){return t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e}function ZP(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(i,o){r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)}return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}}const U1="!";function KP(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length;function o(a){const l=[];let u=0,d=0,f;for(let _=0;_<a.length;_++){let p=a[_];if(u===0){if(p===s&&(n||a.slice(_,_+i)===t)){l.push(a.slice(d,_)),d=_+i;continue}if(p==="/"){f=_;continue}}p==="["?u++:p==="]"&&u--}const m=l.length===0?a:a.substring(d),v=m.startsWith(U1),x=v?m.substring(1):m,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:g}}return r?function(l){return r({className:l,parseClassName:o})}:o}function GP(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 qP(e){return{cache:ZP(e.cacheSize),parseClassName:KP(e),...$P(e)}}const XP=/\s+/;function QP(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=new Set;return e.trim().split(XP).map(o=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=r(o);let f=!!d,m=n(f?u.substring(0,d):u);if(!m){if(!f)return{isTailwindClass:!1,originalClassName:o};if(m=n(u),!m)return{isTailwindClass:!1,originalClassName:o};f=!1}const v=GP(a).join(":");return{isTailwindClass:!0,modifierId:l?v+U1:v,classGroupId:m,originalClassName:o,hasPostfixModifier:f}}).reverse().filter(o=>{if(!o.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=o,d=a+l;return i.has(d)?!1:(i.add(d),s(l,u).forEach(f=>i.add(a+f)),!0)}).reverse().map(o=>o.originalClassName).join(" ")}function JP(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=V1(t))&&(n&&(n+=" "),n+=r);return n}function V1(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=V1(e[n]))&&(r&&(r+=" "),r+=t);return r}function eA(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((d,f)=>f(d),e());return r=qP(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const d=QP(l,r);return s(l,d),d}return function(){return i(JP.apply(null,arguments))}}function _t(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const $1=/^\[(?:([a-z-]+):)?(.+)\]$/i,tA=/^\d+\/\d+$/,rA=new Set(["px","full","screen"]),nA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sA=/\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$/,iA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function es(e){return Fi(e)||rA.has(e)||tA.test(e)}function Ls(e){return ba(e,"length",mA)}function Fi(e){return!!e&&!Number.isNaN(Number(e))}function nu(e){return ba(e,"number",Fi)}function Wa(e){return!!e&&Number.isInteger(Number(e))}function lA(e){return e.endsWith("%")&&Fi(e.slice(0,-1))}function Ze(e){return $1.test(e)}function Fs(e){return nA.test(e)}const cA=new Set(["length","size","percentage"]);function uA(e){return ba(e,cA,B1)}function dA(e){return ba(e,"position",B1)}const fA=new Set(["image","url"]);function hA(e){return ba(e,fA,vA)}function pA(e){return ba(e,"",gA)}function Ha(){return!0}function ba(e,t,r){const n=$1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function mA(e){return sA.test(e)&&!iA.test(e)}function B1(){return!1}function gA(e){return oA.test(e)}function vA(e){return aA.test(e)}function yA(){const e=_t("colors"),t=_t("spacing"),r=_t("blur"),n=_t("brightness"),s=_t("borderColor"),i=_t("borderRadius"),o=_t("borderSpacing"),a=_t("borderWidth"),l=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),m=_t("gap"),v=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),g=_t("inset"),_=_t("margin"),p=_t("opacity"),h=_t("padding"),w=_t("saturate"),C=_t("scale"),E=_t("sepia"),j=_t("skew"),R=_t("space"),P=_t("translate"),A=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Ze,t],T=()=>[Ze,t],F=()=>["",es,Ls],b=()=>["auto",Fi,Ze],$=()=>["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"],Z=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Ze],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Fi,nu],V=()=>[Fi,Ze];return{cacheSize:500,separator:":",theme:{colors:[Ha],spacing:[es,Ls],blur:["none","",Fs,Ze],brightness:z(),borderColor:[e],borderRadius:["none","","full",Fs,Ze],borderSpacing:T(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:V(),invert:I(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[lA,Ls],inset:q(),margin:q(),opacity:z(),padding:T(),saturate:z(),scale:z(),sepia:I(),skew:V(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[Fs]}],"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:[...$(),Ze]}],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:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wa,Ze]}],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",Ze]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Wa,Ze]}],"grid-cols":[{"grid-cols":[Ha]}],"col-start-end":[{col:["auto",{span:["full",Wa,Ze]},Ze]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[Ha]}],"row-start-end":[{row:["auto",{span:[Wa,Ze]},Ze]}],"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",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"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",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[Fs]},Fs]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fs,Ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nu]}],"font-family":[{font:[Ha]}],"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",Ze]}],"line-clamp":[{"line-clamp":["none",Fi,nu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",es,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"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",es,Ls]}],"underline-offset":[{"underline-offset":["auto",es,Ze]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],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",Ze]}],"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:[...$(),dA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hA]}],"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:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"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":[es,Ze]}],"outline-w":[{outline:[es,Ls]}],"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":[es,Ls]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fs,pA]}],"shadow-color":[{shadow:[Ha]}],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:[l]}],"drop-shadow":[{"drop-shadow":["","none",Fs,Ze]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"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":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Wa,Ze]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],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",Ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[es,Ls,nu]}],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 xA=eA(yA);function le(...e){return xA(VP(e))}const uf=pc("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"}}),Ge=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?ws:"button";return c.jsx(o,{className:le(uf({variant:t,size:r,className:e})),ref:i,...s})});Ge.displayName="Button";function ce(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 wA(e,t){const r=y.createContext(t);function n(i){const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return c.jsx(r.Provider,{value:l,children:o})}function s(i){const o=y.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function Hr(e,t=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];function u(f){const{scope:m,children:v,...x}=f,g=(m==null?void 0:m[e][l])||a,_=y.useMemo(()=>x,Object.values(x));return c.jsx(g.Provider,{value:_,children:v})}function d(f,m){const v=(m==null?void 0:m[e][l])||a,x=y.useContext(v);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const s=()=>{const i=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,_A(s,...t)]}function _A(...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(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Dt(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function _s({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=bA({defaultProp:t,onChange:r}),i=e!==void 0,o=i?e:n,a=Dt(r),l=y.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[i,e,s,a]);return[o,l]}function bA({defaultProp:e,onChange:t}){const r=y.useState(e),[n]=r,s=y.useRef(n),i=Dt(t);return y.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var SA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Le=SA.reduce((e,t)=>{const r=y.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ws:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ng(e,t){e&&js.flushSync(()=>e.dispatchEvent(t))}function df(e){const t=e+"CollectionProvider",[r,n]=Hr(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:x,children:g}=v,_=tt.useRef(null),p=tt.useRef(new Map).current;return c.jsx(s,{scope:x,itemMap:p,collectionRef:_,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=tt.forwardRef((v,x)=>{const{scope:g,children:_}=v,p=i(a,g),h=Qe(x,p.collectionRef);return c.jsx(ws,{ref:h,children:_})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=tt.forwardRef((v,x)=>{const{scope:g,children:_,...p}=v,h=tt.useRef(null),w=Qe(x,h),C=i(u,g);return tt.useEffect(()=>(C.itemMap.set(h,{ref:h,...p}),()=>void C.itemMap.delete(h))),c.jsx(ws,{[d]:"",ref:w,children:_})});f.displayName=u;function m(v){const x=i(e+"CollectionConsumer",v);return tt.useCallback(()=>{const _=x.collectionRef.current;if(!_)return[];const p=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((C,E)=>p.indexOf(C.ref.current)-p.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:l,ItemSlot:f},m,n]}var kA=y.createContext(void 0);function mc(e){const t=y.useContext(kA);return e||t||"ltr"}function CA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);y.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 EA="DismissableLayer",Gp="dismissableLayer.update",jA="dismissableLayer.pointerDownOutside",TA="dismissableLayer.focusOutside",o0,W1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sa=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=y.useContext(W1),[d,f]=y.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=y.useState({}),x=Qe(t,R=>f(R)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(_),h=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=h>=p,E=RA(R=>{const P=R.target,A=[...u.branches].some(L=>L.contains(P));!C||A||(s==null||s(R),o==null||o(R),R.defaultPrevented||a==null||a())},m),j=PA(R=>{const P=R.target;[...u.branches].some(L=>L.contains(P))||(i==null||i(R),o==null||o(R),R.defaultPrevented||a==null||a())},m);return CA(R=>{h===u.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),y.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(o0=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),a0(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=o0)}},[d,m,r,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),a0())},[d,u]),y.useEffect(()=>{const R=()=>v({});return document.addEventListener(Gp,R),()=>document.removeEventListener(Gp,R)},[]),c.jsx(Le.div,{...l,ref:x,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,E.onPointerDownCapture)})});Sa.displayName=EA;var NA="DismissableLayerBranch",H1=y.forwardRef((e,t)=>{const r=y.useContext(W1),n=y.useRef(null),s=Qe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Le.div,{...e,ref:s})});H1.displayName=NA;function RA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Y1(jA,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function PA(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&Y1(TA,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function a0(){const e=new CustomEvent(Gp);document.dispatchEvent(e)}function Y1(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Ng(s,i):s.dispatchEvent(i)}var AA=Sa,DA=H1,Nh=0;function Rg(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??l0()),document.body.insertAdjacentElement("beforeend",e[1]??l0()),Nh++,()=>{Nh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nh--}},[])}function l0(){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 Rh="focusScope.autoFocusOnMount",Ph="focusScope.autoFocusOnUnmount",c0={bubbles:!1,cancelable:!0},OA="FocusScope",ff=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=y.useState(null),u=Dt(s),d=Dt(i),f=y.useRef(null),m=Qe(t,g=>l(g)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let g=function(w){if(v.paused||!a)return;const C=w.target;a.contains(C)?f.current=C:Us(f.current,{select:!0})},_=function(w){if(v.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||Us(f.current,{select:!0}))},p=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&Us(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",_);const h=new MutationObserver(p);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",_),h.disconnect()}}},[n,a,v.paused]),y.useEffect(()=>{if(a){d0.add(v);const g=document.activeElement;if(!a.contains(g)){const p=new CustomEvent(Rh,c0);a.addEventListener(Rh,u),a.dispatchEvent(p),p.defaultPrevented||(MA(UA(Z1(a)),{select:!0}),document.activeElement===g&&Us(a))}return()=>{a.removeEventListener(Rh,u),setTimeout(()=>{const p=new CustomEvent(Ph,c0);a.addEventListener(Ph,d),a.dispatchEvent(p),p.defaultPrevented||Us(g??document.body,{select:!0}),a.removeEventListener(Ph,d),d0.remove(v)},0)}}},[a,u,d,v]);const x=y.useCallback(g=>{if(!r&&!n||v.paused)return;const _=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,p=document.activeElement;if(_&&p){const h=g.currentTarget,[w,C]=IA(h);w&&C?!g.shiftKey&&p===C?(g.preventDefault(),r&&Us(w,{select:!0})):g.shiftKey&&p===w&&(g.preventDefault(),r&&Us(C,{select:!0})):p===h&&g.preventDefault()}},[r,n,v.paused]);return c.jsx(Le.div,{tabIndex:-1,...o,ref:m,onKeyDown:x})});ff.displayName=OA;function MA(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Us(n,{select:t}),document.activeElement!==r)return}function IA(e){const t=Z1(e),r=u0(t,e),n=u0(t.reverse(),e);return[r,n]}function Z1(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 u0(e,t){for(const r of e)if(!LA(r,{upTo:t}))return r}function LA(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 FA(e){return e instanceof HTMLInputElement&&"select"in e}function Us(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&FA(e)&&t&&e.select()}}var d0=zA();function zA(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=f0(e,t),e.unshift(t)},remove(t){var r;e=f0(e,t),(r=e[0])==null||r.resume()}}}function f0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function UA(e){return e.filter(t=>t.tagName!=="A")}var nr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},VA=fw.useId||(()=>{}),$A=0;function xn(e){const[t,r]=y.useState(VA());return nr(()=>{r(n=>n??String($A++))},[e]),t?`radix-${t}`:""}const BA=["top","right","bottom","left"],Fn=Math.min,Ir=Math.max,hd=Math.round,su=Math.floor,di=e=>({x:e,y:e}),WA={left:"right",right:"left",bottom:"top",top:"bottom"},HA={start:"end",end:"start"};function qp(e,t,r){return Ir(e,Fn(t,r))}function bs(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function ka(e){return e.split("-")[1]}function Pg(e){return e==="x"?"y":"x"}function Ag(e){return e==="y"?"height":"width"}function fi(e){return["top","bottom"].includes(Ss(e))?"y":"x"}function Dg(e){return Pg(fi(e))}function YA(e,t,r){r===void 0&&(r=!1);const n=ka(e),s=Dg(e),i=Ag(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=pd(o)),[o,pd(o)]}function ZA(e){const t=pd(e);return[Xp(e),t,Xp(t)]}function Xp(e){return e.replace(/start|end/g,t=>HA[t])}function KA(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function GA(e,t,r,n){const s=ka(e);let i=KA(Ss(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Xp)))),i}function pd(e){return e.replace(/left|right|bottom|top/g,t=>WA[t])}function qA(e){return{top:0,right:0,bottom:0,left:0,...e}}function K1(e){return typeof e!="number"?qA(e):{top:e,right:e,bottom:e,left:e}}function md(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 h0(e,t,r){let{reference:n,floating:s}=e;const i=fi(t),o=Dg(t),a=Ag(o),l=Ss(t),u=i==="y",d=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,m=n[a]/2-s[a]/2;let v;switch(l){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(ka(t)){case"start":v[o]-=m*(r&&u?-1:1);break;case"end":v[o]+=m*(r&&u?-1:1);break}return v}const XA=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=h0(u,n,l),m=n,v={},x=0;for(let g=0;g<a.length;g++){const{name:_,fn:p}=a[g],{x:h,y:w,data:C,reset:E}=await p({x:d,y:f,initialPlacement:n,placement:m,strategy:s,middlewareData:v,rects:u,platform:o,elements:{reference:e,floating:t}});d=h??d,f=w??f,v={...v,[_]:{...v[_],...C}},E&&x<=50&&(x++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:d,y:f}=h0(u,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:s,middlewareData:v}};async function zl(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:v=0}=bs(t,e),x=K1(v),_=a[m?f==="floating"?"reference":"floating":f],p=md(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(_)))==null||r?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),h=f==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=md(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:w,strategy:l}):h);return{top:(p.top-E.top+x.top)/C.y,bottom:(E.bottom-p.bottom+x.bottom)/C.y,left:(p.left-E.left+x.left)/C.x,right:(E.right-p.right+x.right)/C.x}}const QA=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=bs(e,t)||{};if(u==null)return{};const f=K1(d),m={x:r,y:n},v=Dg(s),x=Ag(v),g=await o.getDimensions(u),_=v==="y",p=_?"top":"left",h=_?"bottom":"right",w=_?"clientHeight":"clientWidth",C=i.reference[x]+i.reference[v]-m[v]-i.floating[x],E=m[v]-i.reference[v],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let R=j?j[w]:0;(!R||!await(o.isElement==null?void 0:o.isElement(j)))&&(R=a.floating[w]||i.floating[x]);const P=C/2-E/2,A=R/2-g[x]/2-1,L=Fn(f[p],A),q=Fn(f[h],A),T=L,F=R-g[x]-q,b=R/2-g[x]/2+P,$=qp(T,b,F),te=!l.arrow&&ka(s)!=null&&b!==$&&i.reference[x]/2-(b<T?L:q)-g[x]/2<0,B=te?b<T?b-T:b-F:0;return{[v]:m[v]+B,data:{[v]:$,centerOffset:b-$-B,...te&&{alignmentOffset:B}},reset:te}}}),JA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,..._}=bs(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const p=Ss(s),h=fi(a),w=Ss(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(w||!g?[pd(a)]:ZA(a)),j=x!=="none";!m&&j&&E.push(...GA(a,g,x,C));const R=[a,...E],P=await zl(t,_),A=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&A.push(P[p]),f){const b=YA(s,o,C);A.push(P[b[0]],P[b[1]])}if(L=[...L,{placement:s,overflows:A}],!A.every(b=>b<=0)){var q,T;const b=(((q=i.flip)==null?void 0:q.index)||0)+1,$=R[b];if($)return{data:{index:b,overflows:L},reset:{placement:$}};let te=(T=L.filter(B=>B.overflows[0]<=0).sort((B,Z)=>B.overflows[1]-Z.overflows[1])[0])==null?void 0:T.placement;if(!te)switch(v){case"bestFit":{var F;const B=(F=L.filter(Z=>{if(j){const I=fi(Z.placement);return I===h||I==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((Z,I)=>Z[1]-I[1])[0])==null?void 0:F[0];B&&(te=B);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function p0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function m0(e){return BA.some(t=>e[t]>=0)}const eD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=bs(e,t);switch(n){case"referenceHidden":{const i=await zl(t,{...s,elementContext:"reference"}),o=p0(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:m0(o)}}}case"escaped":{const i=await zl(t,{...s,altBoundary:!0}),o=p0(i,r.floating);return{data:{escapedOffsets:o,escaped:m0(o)}}}default:return{}}}}};async function tD(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ss(r),a=ka(r),l=fi(r)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,f=bs(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 a&&typeof x=="number"&&(v=a==="end"?x*-1:x),l?{x:v*d,y:m*u}:{x:m*u,y:v*d}}const rD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await tD(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},nD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:_=>{let{x:p,y:h}=_;return{x:p,y:h}}},...l}=bs(e,t),u={x:r,y:n},d=await zl(t,l),f=fi(Ss(s)),m=Pg(f);let v=u[m],x=u[f];if(i){const _=m==="y"?"top":"left",p=m==="y"?"bottom":"right",h=v+d[_],w=v-d[p];v=qp(h,v,w)}if(o){const _=f==="y"?"top":"left",p=f==="y"?"bottom":"right",h=x+d[_],w=x-d[p];x=qp(h,x,w)}const g=a.fn({...t,[m]:v,[f]:x});return{...g,data:{x:g.x-r,y:g.y-n}}}}},sD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=bs(e,t),d={x:r,y:n},f=fi(s),m=Pg(f);let v=d[m],x=d[f];const g=bs(a,t),_=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=m==="y"?"height":"width",C=i.reference[m]-i.floating[w]+_.mainAxis,E=i.reference[m]+i.reference[w]-_.mainAxis;v<C?v=C:v>E&&(v=E)}if(u){var p,h;const w=m==="y"?"width":"height",C=["top","left"].includes(Ss(s)),E=i.reference[f]-i.floating[w]+(C&&((p=o.offset)==null?void 0:p[f])||0)+(C?0:_.crossAxis),j=i.reference[f]+i.reference[w]+(C?0:((h=o.offset)==null?void 0:h[f])||0)-(C?_.crossAxis:0);x<E?x=E:x>j&&(x=j)}return{[m]:v,[f]:x}}}},iD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:i}=t,{apply:o=()=>{},...a}=bs(e,t),l=await zl(t,a),u=Ss(r),d=ka(r),f=fi(r)==="y",{width:m,height:v}=n.floating;let x,g;u==="top"||u==="bottom"?(x=u,g=d===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,x=d==="end"?"top":"bottom");const _=v-l.top-l.bottom,p=m-l.left-l.right,h=Fn(v-l[x],_),w=Fn(m-l[g],p),C=!t.middlewareData.shift;let E=h,j=w;if(f?j=d||C?Fn(w,p):p:E=d||C?Fn(h,_):_,C&&!d){const P=Ir(l.left,0),A=Ir(l.right,0),L=Ir(l.top,0),q=Ir(l.bottom,0);f?j=m-2*(P!==0||A!==0?P+A:Ir(l.left,l.right)):E=v-2*(L!==0||q!==0?L+q:Ir(l.top,l.bottom))}await o({...t,availableWidth:j,availableHeight:E});const R=await s.getDimensions(i.floating);return m!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function Ca(e){return G1(e)?(e.nodeName||"").toLowerCase():"#document"}function zr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rs(e){var t;return(t=(G1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function G1(e){return e instanceof Node||e instanceof zr(e).Node}function bn(e){return e instanceof Element||e instanceof zr(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof zr(e).HTMLElement}function g0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zr(e).ShadowRoot}function gc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function oD(e){return["table","td","th"].includes(Ca(e))}function hf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Og(e){const t=Mg(),r=bn(e)?Sn(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 aD(e){let t=hi(e);for(;Bn(t)&&!ua(t);){if(Og(t))return t;if(hf(t))return null;t=hi(t)}return null}function Mg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ua(e){return["html","body","#document"].includes(Ca(e))}function Sn(e){return zr(e).getComputedStyle(e)}function pf(e){return bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||g0(e)&&e.host||Rs(e);return g0(t)?t.host:t}function q1(e){const t=hi(e);return ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&gc(t)?t:q1(t)}function Ul(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=q1(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=zr(s);return i?t.concat(o,o.visualViewport||[],gc(s)?s:[],o.frameElement&&r?Ul(o.frameElement):[]):t.concat(s,Ul(s,[],r))}function X1(e){const t=Sn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Bn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=hd(r)!==i||hd(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Ig(e){return bn(e)?e:e.contextElement}function Zo(e){const t=Ig(e);if(!Bn(t))return di(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=X1(t);let o=(i?hd(r.width):r.width)/n,a=(i?hd(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const lD=di(0);function Q1(e){const t=zr(e);return!Mg()||!t.visualViewport?lD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==zr(e)?!1:t}function Qi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Ig(e);let o=di(1);t&&(n?bn(n)&&(o=Zo(n)):o=Zo(e));const a=cD(i,r,n)?Q1(i):di(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,f=s.height/o.y;if(i){const m=zr(i),v=n&&bn(n)?zr(n):n;let x=m,g=x.frameElement;for(;g&&n&&v!==x;){const _=Zo(g),p=g.getBoundingClientRect(),h=Sn(g),w=p.left+(g.clientLeft+parseFloat(h.paddingLeft))*_.x,C=p.top+(g.clientTop+parseFloat(h.paddingTop))*_.y;l*=_.x,u*=_.y,d*=_.x,f*=_.y,l+=w,u+=C,x=zr(g),g=x.frameElement}}return md({width:d,height:f,x:l,y:u})}function uD(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Rs(n),a=t?hf(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=di(1);const d=di(0),f=Bn(n);if((f||!f&&!i)&&((Ca(n)!=="body"||gc(o))&&(l=pf(n)),Bn(n))){const m=Qi(n);u=Zo(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-l.scrollLeft*u.x+d.x,y:r.y*u.y-l.scrollTop*u.y+d.y}}function dD(e){return Array.from(e.getClientRects())}function J1(e){return Qi(Rs(e)).left+pf(e).scrollLeft}function fD(e){const t=Rs(e),r=pf(e),n=e.ownerDocument.body,s=Ir(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ir(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+J1(e);const a=-r.scrollTop;return Sn(n).direction==="rtl"&&(o+=Ir(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function hD(e,t){const r=zr(e),n=Rs(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Mg();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function pD(e,t){const r=Qi(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Bn(e)?Zo(e):di(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function v0(e,t,r){let n;if(t==="viewport")n=hD(e,r);else if(t==="document")n=fD(Rs(e));else if(bn(t))n=pD(t,r);else{const s=Q1(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return md(n)}function eb(e,t){const r=hi(e);return r===t||!bn(r)||ua(r)?!1:Sn(r).position==="fixed"||eb(r,t)}function mD(e,t){const r=t.get(e);if(r)return r;let n=Ul(e,[],!1).filter(a=>bn(a)&&Ca(a)!=="body"),s=null;const i=Sn(e).position==="fixed";let o=i?hi(e):e;for(;bn(o)&&!ua(o);){const a=Sn(o),l=Og(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||gc(o)&&!l&&eb(e,o))?n=n.filter(d=>d!==o):s=a,o=hi(o)}return t.set(e,n),n}function gD(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?hf(t)?[]:mD(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,d)=>{const f=v0(t,d,s);return u.top=Ir(f.top,u.top),u.right=Fn(f.right,u.right),u.bottom=Fn(f.bottom,u.bottom),u.left=Ir(f.left,u.left),u},v0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vD(e){const{width:t,height:r}=X1(e);return{width:t,height:r}}function yD(e,t,r){const n=Bn(t),s=Rs(t),i=r==="fixed",o=Qi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=di(0);if(n||!n&&!i)if((Ca(t)!=="body"||gc(s))&&(a=pf(t)),n){const f=Qi(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=J1(s));const u=o.left+a.scrollLeft-l.x,d=o.top+a.scrollTop-l.y;return{x:u,y:d,width:o.width,height:o.height}}function Ah(e){return Sn(e).position==="static"}function y0(e,t){return!Bn(e)||Sn(e).position==="fixed"?null:t?t(e):e.offsetParent}function tb(e,t){const r=zr(e);if(hf(e))return r;if(!Bn(e)){let s=hi(e);for(;s&&!ua(s);){if(bn(s)&&!Ah(s))return s;s=hi(s)}return r}let n=y0(e,t);for(;n&&oD(n)&&Ah(n);)n=y0(n,t);return n&&ua(n)&&Ah(n)&&!Og(n)?r:n||aD(e)||r}const xD=async function(e){const t=this.getOffsetParent||tb,r=this.getDimensions,n=await r(e.floating);return{reference:yD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function wD(e){return Sn(e).direction==="rtl"}const _D={convertOffsetParentRelativeRectToViewportRelativeRect:uD,getDocumentElement:Rs,getClippingRect:gD,getOffsetParent:tb,getElementRects:xD,getClientRects:dD,getDimensions:vD,getScale:Zo,isElement:bn,isRTL:wD};function bD(e,t){let r=null,n;const s=Rs(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(a||t(),!f||!m)return;const v=su(d),x=su(s.clientWidth-(u+f)),g=su(s.clientHeight-(d+m)),_=su(u),h={rootMargin:-v+"px "+-x+"px "+-g+"px "+-_+"px",threshold:Ir(0,Fn(1,l))||1};let w=!0;function C(E){const j=E[0].intersectionRatio;if(j!==l){if(!w)return o();j?o(!1,j):n=setTimeout(()=>{o(!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 o(!0),i}function SD(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Ig(e),d=s||i?[...u?Ul(u):[],...Ul(t)]:[];d.forEach(p=>{s&&p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});const f=u&&a?bD(u,r):null;let m=-1,v=null;o&&(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&&!l&&v.observe(u),v.observe(t));let x,g=l?Qi(e):null;l&&_();function _(){const p=Qi(e);g&&(p.x!==g.x||p.y!==g.y||p.width!==g.width||p.height!==g.height)&&r(),g=p,x=requestAnimationFrame(_)}return r(),()=>{var p;d.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),f==null||f(),(p=v)==null||p.disconnect(),v=null,l&&cancelAnimationFrame(x)}}const kD=rD,CD=nD,ED=JA,jD=iD,TD=eD,x0=QA,ND=sD,RD=(e,t,r)=>{const n=new Map,s={platform:_D,...r},i={...s.platform,_c:n};return XA(e,t,{...s,platform:i})};var Pu=typeof document<"u"?y.useLayoutEffect:y.useEffect;function gd(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(!gd(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 i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!gd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function rb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function w0(e,t){const r=rb(e);return Math.round(t*r)/r}function _0(e){const t=y.useRef(e);return Pu(()=>{t.current=e}),t}function PD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=y.useState(n);gd(m,n)||v(n);const[x,g]=y.useState(null),[_,p]=y.useState(null),h=y.useCallback(B=>{B!==j.current&&(j.current=B,g(B))},[]),w=y.useCallback(B=>{B!==R.current&&(R.current=B,p(B))},[]),C=i||x,E=o||_,j=y.useRef(null),R=y.useRef(null),P=y.useRef(d),A=l!=null,L=_0(l),q=_0(s),T=y.useCallback(()=>{if(!j.current||!R.current)return;const B={placement:t,strategy:r,middleware:m};q.current&&(B.platform=q.current),RD(j.current,R.current,B).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!gd(P.current,I)&&(P.current=I,js.flushSync(()=>{f(I)}))})},[m,t,r,q]);Pu(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[u]);const F=y.useRef(!1);Pu(()=>(F.current=!0,()=>{F.current=!1}),[]),Pu(()=>{if(C&&(j.current=C),E&&(R.current=E),C&&E){if(L.current)return L.current(C,E,T);T()}},[C,E,T,L,A]);const b=y.useMemo(()=>({reference:j,floating:R,setReference:h,setFloating:w}),[h,w]),$=y.useMemo(()=>({reference:C,floating:E}),[C,E]),te=y.useMemo(()=>{const B={position:r,left:0,top:0};if(!$.floating)return B;const Z=w0($.floating,d.x),I=w0($.floating,d.y);return a?{...B,transform:"translate("+Z+"px, "+I+"px)",...rb($.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,$.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:T,refs:b,elements:$,floatingStyles:te}),[d,T,b,$,te])}const AD=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?x0({element:n.current,padding:s}).fn(r):{}:n?x0({element:n,padding:s}).fn(r):{}}}},DD=(e,t)=>({...kD(e),options:[e,t]}),OD=(e,t)=>({...CD(e),options:[e,t]}),MD=(e,t)=>({...ND(e),options:[e,t]}),ID=(e,t)=>({...ED(e),options:[e,t]}),LD=(e,t)=>({...jD(e),options:[e,t]}),FD=(e,t)=>({...TD(e),options:[e,t]}),zD=(e,t)=>({...AD(e),options:[e,t]});var UD="Arrow",nb=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return c.jsx(Le.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});nb.displayName=UD;var VD=nb;function sb(e){const[t,r]=y.useState(void 0);return nr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Lg="Popper",[ib,Ea]=Hr(Lg),[$D,ob]=ib(Lg),ab=e=>{const{__scopePopper:t,children:r}=e,[n,s]=y.useState(null);return c.jsx($D,{scope:t,anchor:n,onAnchorChange:s,children:r})};ab.displayName=Lg;var lb="PopperAnchor",cb=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=ob(lb,r),o=y.useRef(null),a=Qe(t,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:c.jsx(Le.div,{...s,ref:a})});cb.displayName=lb;var Fg="PopperContent",[BD,WD]=ib(Fg),ub=y.forwardRef((e,t)=>{var he,ye,ke,Fe,De,Ne;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...g}=e,_=ob(Fg,r),[p,h]=y.useState(null),w=Qe(t,nt=>h(nt)),[C,E]=y.useState(null),j=sb(C),R=(j==null?void 0:j.width)??0,P=(j==null?void 0:j.height)??0,A=n+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},q=Array.isArray(u)?u:[u],T=q.length>0,F={padding:L,boundary:q.filter(YD),altBoundary:T},{refs:b,floatingStyles:$,placement:te,isPositioned:B,middlewareData:Z}=PD({strategy:"fixed",placement:A,whileElementsMounted:(...nt)=>SD(...nt,{animationFrame:v==="always"}),elements:{reference:_.anchor},middleware:[DD({mainAxis:s+P,alignmentAxis:o}),l&&OD({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?MD():void 0,...F}),l&&ID({...F}),LD({...F,apply:({elements:nt,rects:k,availableWidth:J,availableHeight:K})=>{const{width:D,height:S}=k.reference,N=nt.floating.style;N.setProperty("--radix-popper-available-width",`${J}px`),N.setProperty("--radix-popper-available-height",`${K}px`),N.setProperty("--radix-popper-anchor-width",`${D}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&zD({element:C,padding:a}),ZD({arrowWidth:R,arrowHeight:P}),m&&FD({strategy:"referenceHidden",...F})]}),[I,Q]=hb(te),z=Dt(x);nr(()=>{B&&(z==null||z())},[B,z]);const V=(he=Z.arrow)==null?void 0:he.x,fe=(ye=Z.arrow)==null?void 0:ye.y,ne=((ke=Z.arrow)==null?void 0:ke.centerOffset)!==0,[se,Ae]=y.useState();return nr(()=>{p&&Ae(window.getComputedStyle(p).zIndex)},[p]),c.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Fe=Z.transformOrigin)==null?void 0:Fe.x,(De=Z.transformOrigin)==null?void 0:De.y].join(" "),...((Ne=Z.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(BD,{scope:r,placedSide:I,onArrowChange:E,arrowX:V,arrowY:fe,shouldHideArrow:ne,children:c.jsx(Le.div,{"data-side":I,"data-align":Q,...g,ref:w,style:{...g.style,animation:B?void 0:"none"}})})})});ub.displayName=Fg;var db="PopperArrow",HD={top:"bottom",right:"left",bottom:"top",left:"right"},fb=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=WD(db,n),o=HD[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(VD,{...s,ref:r,style:{...s.style,display:"block"}})})});fb.displayName=db;function YD(e){return e!==null}var ZD=e=>({name:"transformOrigin",options:e,fn(t){var _,p,h;const{placement:r,rects:n,middlewareData:s}=t,o=((_=s.arrow)==null?void 0:_.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=hb(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((p=s.arrow)==null?void 0:p.x)??0)+a/2,v=(((h=s.arrow)==null?void 0:h.y)??0)+l/2;let x="",g="";return u==="bottom"?(x=o?f:`${m}px`,g=`${-l}px`):u==="top"?(x=o?f:`${m}px`,g=`${n.floating.height+l}px`):u==="right"?(x=`${-l}px`,g=o?f:`${v}px`):u==="left"&&(x=`${n.floating.width+l}px`,g=o?f:`${v}px`),{data:{x,y:g}}}});function hb(e){const[t,r="center"]=e.split("-");return[t,r]}var zg=ab,Ug=cb,Vg=ub,$g=fb,KD="Portal",vc=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=y.useState(!1);nr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?m1.createPortal(c.jsx(Le.div,{...n,ref:t}),o):null});vc.displayName=KD;function GD(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var yr=e=>{const{present:t,children:r}=e,n=qD(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=Qe(n.ref,XD(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};yr.displayName="Presence";function qD(e){const[t,r]=y.useState(),n=y.useRef({}),s=y.useRef(e),i=y.useRef("none"),o=e?"mounted":"unmounted",[a,l]=GD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=iu(n.current);i.current=a==="mounted"?u:"none"},[a]),nr(()=>{const u=n.current,d=s.current;if(d!==e){const m=i.current,v=iu(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),nr(()=>{if(t){const u=f=>{const v=iu(n.current).includes(f.animationName);f.target===t&&v&&js.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=iu(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 l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function iu(e){return(e==null?void 0:e.animationName)||"none"}function XD(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 Dh="rovingFocusGroup.onEntryFocus",QD={bubbles:!1,cancelable:!0},mf="RovingFocusGroup",[Qp,pb,JD]=df(mf),[eO,gf]=Hr(mf,[JD]),[tO,rO]=eO(mf),mb=y.forwardRef((e,t)=>c.jsx(Qp.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Qp.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(nO,{...e,ref:t})})}));mb.displayName=mf;var nO=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=y.useRef(null),v=Qe(t,m),x=mc(i),[g=null,_]=_s({prop:o,defaultProp:a,onChange:l}),[p,h]=y.useState(!1),w=Dt(u),C=pb(r),E=y.useRef(!1),[j,R]=y.useState(0);return y.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(Dh,w),()=>P.removeEventListener(Dh,w)},[w]),c.jsx(tO,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:g,onItemFocus:y.useCallback(P=>_(P),[_]),onItemShiftTab:y.useCallback(()=>h(!0),[]),onFocusableItemAdd:y.useCallback(()=>R(P=>P+1),[]),onFocusableItemRemove:y.useCallback(()=>R(P=>P-1),[]),children:c.jsx(Le.div,{tabIndex:p||j===0?-1:0,"data-orientation":n,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:ce(e.onMouseDown,()=>{E.current=!0}),onFocus:ce(e.onFocus,P=>{const A=!E.current;if(P.target===P.currentTarget&&A&&!p){const L=new CustomEvent(Dh,QD);if(P.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),T=q.find(te=>te.active),F=q.find(te=>te.id===g),$=[T,F,...q].filter(Boolean).map(te=>te.ref.current);yb($,d)}}E.current=!1}),onBlur:ce(e.onBlur,()=>h(!1))})})}),gb="RovingFocusGroupItem",vb=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=e,a=xn(),l=i||a,u=rO(gb,r),d=u.currentTabStopId===l,f=pb(r),{onFocusableItemAdd:m,onFocusableItemRemove:v}=u;return y.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),c.jsx(Qp.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:c.jsx(Le.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ce(e.onMouseDown,x=>{n?u.onItemFocus(l):x.preventDefault()}),onFocus:ce(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ce(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const g=oO(x,u.orientation,u.dir);if(g!==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(g==="last")p.reverse();else if(g==="prev"||g==="next"){g==="prev"&&p.reverse();const h=p.indexOf(x.currentTarget);p=u.loop?aO(p,h+1):p.slice(h+1)}setTimeout(()=>yb(p))}})})})});vb.displayName=gb;var sO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function iO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function oO(e,t,r){const n=iO(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return sO[n]}function yb(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function aO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var xb=mb,wb=vb,lO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,ou=new WeakMap,au={},Oh=0,_b=function(e){return e&&(e.host||_b(e.parentNode))},cO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=_b(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})},uO=function(e,t,r,n){var s=cO(t,Array.isArray(e)?e:[e]);au[r]||(au[r]=new WeakMap);var i=au[r],o=[],a=new Set,l=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var v=m.getAttribute(n),x=v!==null&&v!=="false",g=(vo.get(m)||0)+1,_=(i.get(m)||0)+1;vo.set(m,g),i.set(m,_),o.push(m),g===1&&x&&ou.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),a.clear(),Oh++,function(){o.forEach(function(f){var m=vo.get(f)-1,v=i.get(f)-1;vo.set(f,m),i.set(f,v),m||(ou.has(f)||f.removeAttribute(n),ou.delete(f)),v||f.removeAttribute(r)}),Oh--,Oh||(vo=new WeakMap,vo=new WeakMap,ou=new WeakMap,au={})}},Bg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=lO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),uO(n,s,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Mn.apply(this,arguments)};function bb(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 dO(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Au="right-scroll-bar-position",Du="width-before-scroll-bar",fO="with-scroll-bars-hidden",hO="--removed-body-scroll-bar-size";function Mh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pO(e,t){var r=y.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 mO=typeof window<"u"?y.useLayoutEffect:y.useEffect,b0=new WeakMap;function gO(e,t){var r=pO(null,function(n){return e.forEach(function(s){return Mh(s,n)})});return mO(function(){var n=b0.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;s.forEach(function(a){i.has(a)||Mh(a,null)}),i.forEach(function(a){s.has(a)||Mh(a,o)})}b0.set(r,e)},[e]),r}function vO(e){return e}function yO(e,t){t===void 0&&(t=vO);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(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return s}function xO(e){e===void 0&&(e={});var t=yO(null);return t.options=Mn({async:!0,ssr:!1},e),t}var Sb=function(e){var t=e.sideCar,r=bb(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 y.createElement(n,Mn({},r))};Sb.isSideCarExport=!0;function wO(e,t){return e.useMedium(t),Sb}var kb=xO(),Ih=function(){},vf=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:Ih,onWheelCapture:Ih,onTouchMoveCapture:Ih}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,v=e.noIsolation,x=e.inert,g=e.allowPinchZoom,_=e.as,p=_===void 0?"div":_,h=e.gapMode,w=bb(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,E=gO([r,t]),j=Mn(Mn({},w),s);return y.createElement(y.Fragment,null,d&&y.createElement(C,{sideCar:kb,removeScrollBar:u,shards:f,noIsolation:v,inert:x,setCallbacks:i,allowPinchZoom:!!g,lockRef:r,gapMode:h}),o?y.cloneElement(y.Children.only(a),Mn(Mn({},j),{ref:E})):y.createElement(p,Mn({},j,{className:l,ref:E}),a))});vf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vf.classNames={fullWidth:Du,zeroRight:Au};var _O=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_O();return t&&e.setAttribute("nonce",t),e}function SO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var CO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bO())&&(SO(t,r),kO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},EO=function(){var e=CO();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Cb=function(){var e=EO(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},jO={left:0,top:0,right:0,gap:0},Lh=function(e){return parseInt(e||"",10)||0},TO=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[Lh(r),Lh(n),Lh(s)]},NO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return jO;var t=TO(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])}},RO=Cb(),Ko="data-scroll-locked",PO=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),`
.`.concat(fO,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(a,"px ").concat(n,`;
}
body[`).concat(Ko,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(o,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Au,` {
right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Du,` {
margin-right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Au," .").concat(Au,` {
right: 0 `).concat(n,`;
}
.`).concat(Du," .").concat(Du,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(Ko,`] {
`).concat(hO,": ").concat(a,`px;
}
`)},S0=function(){var e=parseInt(document.body.getAttribute(Ko)||"0",10);return isFinite(e)?e:0},AO=function(){y.useEffect(function(){return document.body.setAttribute(Ko,(S0()+1).toString()),function(){var e=S0()-1;e<=0?document.body.removeAttribute(Ko):document.body.setAttribute(Ko,e.toString())}},[])},DO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;AO();var i=y.useMemo(function(){return NO(s)},[s]);return y.createElement(RO,{styles:PO(i,!t,s,r?"":"!important")})},Jp=!1;if(typeof window<"u")try{var lu=Object.defineProperty({},"passive",{get:function(){return Jp=!0,!0}});window.addEventListener("test",lu,lu),window.removeEventListener("test",lu,lu)}catch{Jp=!1}var yo=Jp?{passive:!1}:!1,OO=function(e){return e.tagName==="TEXTAREA"},Eb=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!OO(e)&&r[t]==="visible")},MO=function(e){return Eb(e,"overflowY")},IO=function(e){return Eb(e,"overflowX")},k0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=jb(e,n);if(s){var i=Tb(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},LO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},FO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},jb=function(e,t){return e==="v"?MO(t):IO(t)},Tb=function(e,t){return e==="v"?LO(t):FO(t)},zO=function(e,t){return e==="h"&&t==="rtl"?-1:1},UO=function(e,t,r,n,s){var i=zO(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),u=!1,d=o>0,f=0,m=0;do{var v=Tb(e,a),x=v[0],g=v[1],_=v[2],p=g-_-i*x;(x||p)&&jb(e,a)&&(f+=p,m+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},cu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},C0=function(e){return[e.deltaX,e.deltaY]},E0=function(e){return e&&"current"in e?e.current:e},VO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$O=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},BO=0,xo=[];function WO(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(BO++)[0],i=y.useState(Cb)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=dO([e.lockRef.current],(e.shards||[]).map(E0),!0).filter(Boolean);return g.forEach(function(_){return _.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(g,_){if("touches"in g&&g.touches.length===2)return!o.current.allowPinchZoom;var p=cu(g),h=r.current,w="deltaX"in g?g.deltaX:h[0]-p[0],C="deltaY"in g?g.deltaY:h[1]-p[1],E,j=g.target,R=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in g&&R==="h"&&j.type==="range")return!1;var P=k0(R,j);if(!P)return!0;if(P?E=R:(E=R==="v"?"h":"v",P=k0(R,j)),!P)return!1;if(!n.current&&"changedTouches"in g&&(w||C)&&(n.current=E),!E)return!0;var A=n.current||E;return UO(A,_,g,A==="h"?w:C,!0)},[]),l=y.useCallback(function(g){var _=g;if(!(!xo.length||xo[xo.length-1]!==i)){var p="deltaY"in _?C0(_):cu(_),h=t.current.filter(function(E){return E.name===_.type&&(E.target===_.target||_.target===E.shadowParent)&&VO(E.delta,p)})[0];if(h&&h.should){_.cancelable&&_.preventDefault();return}if(!h){var w=(o.current.shards||[]).map(E0).filter(Boolean).filter(function(E){return E.contains(_.target)}),C=w.length>0?a(_,w[0]):!o.current.noIsolation;C&&_.cancelable&&_.preventDefault()}}},[]),u=y.useCallback(function(g,_,p,h){var w={name:g,delta:_,target:p,should:h,shadowParent:HO(p)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=y.useCallback(function(g){r.current=cu(g),n.current=void 0},[]),f=y.useCallback(function(g){u(g.type,C0(g),g.target,a(g,e.lockRef.current))},[]),m=y.useCallback(function(g){u(g.type,cu(g),g.target,a(g,e.lockRef.current))},[]);y.useEffect(function(){return xo.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,yo),document.addEventListener("touchmove",l,yo),document.addEventListener("touchstart",d,yo),function(){xo=xo.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,yo),document.removeEventListener("touchmove",l,yo),document.removeEventListener("touchstart",d,yo)}},[]);var v=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(i,{styles:$O(s)}):null,v?y.createElement(DO,{gapMode:e.gapMode}):null)}function HO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const YO=wO(kb,WO);var yf=y.forwardRef(function(e,t){return y.createElement(vf,Mn({},e,{ref:t,sideCar:YO}))});yf.classNames=vf.classNames;var em=["Enter"," "],ZO=["ArrowDown","PageUp","Home"],Nb=["ArrowUp","PageDown","End"],KO=[...ZO,...Nb],GO={ltr:[...em,"ArrowRight"],rtl:[...em,"ArrowLeft"]},qO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yc="Menu",[Vl,XO,QO]=df(yc),[io,Rb]=Hr(yc,[QO,Ea,gf]),xf=Ea(),Pb=gf(),[JO,oo]=io(yc),[eM,xc]=io(yc),Ab=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=e,a=xf(t),[l,u]=y.useState(null),d=y.useRef(!1),f=Dt(i),m=mc(s);return y.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})}},[]),c.jsx(zg,{...a,children:c.jsx(JO,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:c.jsx(eM,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:o,children:n})})})};Ab.displayName=yc;var tM="MenuAnchor",Wg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=xf(r);return c.jsx(Ug,{...s,...n,ref:t})});Wg.displayName=tM;var Hg="MenuPortal",[rM,Db]=io(Hg,{forceMount:void 0}),Ob=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,i=oo(Hg,t);return c.jsx(rM,{scope:t,forceMount:r,children:c.jsx(yr,{present:r||i.open,children:c.jsx(vc,{asChild:!0,container:s,children:n})})})};Ob.displayName=Hg;var tn="MenuContent",[nM,Yg]=io(tn),Mb=y.forwardRef((e,t)=>{const r=Db(tn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=oo(tn,e.__scopeMenu),o=xc(tn,e.__scopeMenu);return c.jsx(Vl.Provider,{scope:e.__scopeMenu,children:c.jsx(yr,{present:n||i.open,children:c.jsx(Vl.Slot,{scope:e.__scopeMenu,children:o.modal?c.jsx(sM,{...s,ref:t}):c.jsx(iM,{...s,ref:t})})})})}),sM=y.forwardRef((e,t)=>{const r=oo(tn,e.__scopeMenu),n=y.useRef(null),s=Qe(t,n);return y.useEffect(()=>{const i=n.current;if(i)return Bg(i)},[]),c.jsx(Zg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),iM=y.forwardRef((e,t)=>{const r=oo(tn,e.__scopeMenu);return c.jsx(Zg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Zg=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,disableOutsideScroll:x,...g}=e,_=oo(tn,r),p=xc(tn,r),h=xf(r),w=Pb(r),C=XO(r),[E,j]=y.useState(null),R=y.useRef(null),P=Qe(t,R,_.onContentChange),A=y.useRef(0),L=y.useRef(""),q=y.useRef(0),T=y.useRef(null),F=y.useRef("right"),b=y.useRef(0),$=x?yf:y.Fragment,te=x?{as:ws,allowPinchZoom:!0}:void 0,B=I=>{var he,ye;const Q=L.current+I,z=C().filter(ke=>!ke.disabled),V=document.activeElement,fe=(he=z.find(ke=>ke.ref.current===V))==null?void 0:he.textValue,ne=z.map(ke=>ke.textValue),se=vM(ne,Q,fe),Ae=(ye=z.find(ke=>ke.textValue===se))==null?void 0:ye.ref.current;(function ke(Fe){L.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>ke(""),1e3))})(Q),Ae&&setTimeout(()=>Ae.focus())};y.useEffect(()=>()=>window.clearTimeout(A.current),[]),Rg();const Z=y.useCallback(I=>{var z,V;return F.current===((z=T.current)==null?void 0:z.side)&&xM(I,(V=T.current)==null?void 0:V.area)},[]);return c.jsx(nM,{scope:r,searchRef:L,onItemEnter:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:y.useCallback(I=>{var Q;Z(I)||((Q=R.current)==null||Q.focus(),j(null))},[Z]),onTriggerLeave:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:y.useCallback(I=>{T.current=I},[]),children:c.jsx($,{...te,children:c.jsx(ff,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,I=>{var Q;I.preventDefault(),(Q=R.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:c.jsx(Sa,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,children:c.jsx(xb,{asChild:!0,...w,dir:p.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:j,onEntryFocus:ce(l,I=>{p.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Vg,{role:"menu","aria-orientation":"vertical","data-state":Xb(_.open),"data-radix-menu-content":"",dir:p.dir,...h,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:ce(g.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,V=I.ctrlKey||I.altKey||I.metaKey,fe=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!V&&fe&&B(I.key));const ne=R.current;if(I.target!==ne||!KO.includes(I.key))return;I.preventDefault();const Ae=C().filter(he=>!he.disabled).map(he=>he.ref.current);Nb.includes(I.key)&&Ae.reverse(),mM(Ae)}),onBlur:ce(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),L.current="")}),onPointerMove:ce(e.onPointerMove,$l(I=>{const Q=I.target,z=b.current!==I.clientX;if(I.currentTarget.contains(Q)&&z){const V=I.clientX>b.current?"right":"left";F.current=V,b.current=I.clientX}}))})})})})})})});Mb.displayName=tn;var oM="MenuGroup",Kg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Le.div,{role:"group",...n,ref:t})});Kg.displayName=oM;var aM="MenuLabel",Ib=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Le.div,{...n,ref:t})});Ib.displayName=aM;var vd="MenuItem",j0="menu.itemSelect",wf=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,i=y.useRef(null),o=xc(vd,e.__scopeMenu),a=Yg(vd,e.__scopeMenu),l=Qe(t,i),u=y.useRef(!1),d=()=>{const f=i.current;if(!r&&f){const m=new CustomEvent(j0,{bubbles:!0,cancelable:!0});f.addEventListener(j0,v=>n==null?void 0:n(v),{once:!0}),Ng(f,m),m.defaultPrevented?u.current=!1:o.onClose()}};return c.jsx(Lb,{...s,ref:l,disabled:r,onClick:ce(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),u.current=!0},onPointerUp:ce(e.onPointerUp,f=>{var m;u.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:ce(e.onKeyDown,f=>{const m=a.searchRef.current!=="";r||m&&f.key===" "||em.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});wf.displayName=vd;var Lb=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=e,o=Yg(vd,r),a=Pb(r),l=y.useRef(null),u=Qe(t,l),[d,f]=y.useState(!1),[m,v]=y.useState("");return y.useEffect(()=>{const x=l.current;x&&v((x.textContent??"").trim())},[i.children]),c.jsx(Vl.ItemSlot,{scope:r,disabled:n,textValue:s??m,children:c.jsx(wb,{asChild:!0,...a,focusable:!n,children:c.jsx(Le.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:u,onPointerMove:ce(e.onPointerMove,$l(x=>{n?o.onItemLeave(x):(o.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(e.onPointerLeave,$l(x=>o.onItemLeave(x))),onFocus:ce(e.onFocus,()=>f(!0)),onBlur:ce(e.onBlur,()=>f(!1))})})})}),lM="MenuCheckboxItem",Fb=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return c.jsx(Bb,{scope:e.__scopeMenu,checked:r,children:c.jsx(wf,{role:"menuitemcheckbox","aria-checked":yd(r)?"mixed":r,...s,ref:t,"data-state":qg(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(yd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Fb.displayName=lM;var zb="MenuRadioGroup",[cM,uM]=io(zb,{value:void 0,onValueChange:()=>{}}),Ub=y.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,i=Dt(n);return c.jsx(cM,{scope:e.__scopeMenu,value:r,onValueChange:i,children:c.jsx(Kg,{...s,ref:t})})});Ub.displayName=zb;var Vb="MenuRadioItem",$b=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=uM(Vb,e.__scopeMenu),i=r===s.value;return c.jsx(Bb,{scope:e.__scopeMenu,checked:i,children:c.jsx(wf,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":qg(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});$b.displayName=Vb;var Gg="MenuItemIndicator",[Bb,dM]=io(Gg,{checked:!1}),Wb=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,i=dM(Gg,r);return c.jsx(yr,{present:n||yd(i.checked)||i.checked===!0,children:c.jsx(Le.span,{...s,ref:t,"data-state":qg(i.checked)})})});Wb.displayName=Gg;var fM="MenuSeparator",Hb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.jsx(Le.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Hb.displayName=fM;var hM="MenuArrow",Yb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=xf(r);return c.jsx($g,{...s,...n,ref:t})});Yb.displayName=hM;var pM="MenuSub",[cU,Zb]=io(pM),el="MenuSubTrigger",Kb=y.forwardRef((e,t)=>{const r=oo(el,e.__scopeMenu),n=xc(el,e.__scopeMenu),s=Zb(el,e.__scopeMenu),i=Yg(el,e.__scopeMenu),o=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},d=y.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return y.useEffect(()=>d,[d]),y.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),c.jsx(Wg,{asChild:!0,...u,children:c.jsx(Lb,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Xb(r.open),...e,ref:cf(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:ce(e.onPointerMove,$l(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:ce(e.onPointerLeave,$l(f=>{var v,x;d();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const g=(x=r.content)==null?void 0:x.dataset.side,_=g==="right",p=_?-5:5,h=m[_?"left":"right"],w=m[_?"right":"left"];i.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:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ce(e.onKeyDown,f=>{var v;const m=i.searchRef.current!=="";e.disabled||m&&f.key===" "||GO[n.dir].includes(f.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),f.preventDefault())})})})});Kb.displayName=el;var Gb="MenuSubContent",qb=y.forwardRef((e,t)=>{const r=Db(tn,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,i=oo(tn,e.__scopeMenu),o=xc(tn,e.__scopeMenu),a=Zb(Gb,e.__scopeMenu),l=y.useRef(null),u=Qe(t,l);return c.jsx(Vl.Provider,{scope:e.__scopeMenu,children:c.jsx(yr,{present:n||i.open,children:c.jsx(Vl.Slot,{scope:e.__scopeMenu,children:c.jsx(Zg,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ce(e.onFocusOutside,d=>{d.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ce(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:ce(e.onKeyDown,d=>{var v;const f=d.currentTarget.contains(d.target),m=qO[o.dir].includes(d.key);f&&m&&(i.onOpenChange(!1),(v=a.trigger)==null||v.focus(),d.preventDefault())})})})})})});qb.displayName=Gb;function Xb(e){return e?"open":"closed"}function yd(e){return e==="indeterminate"}function qg(e){return yd(e)?"indeterminate":e?"checked":"unchecked"}function mM(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function gM(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function vM(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=gM(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function yM(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,d=t[o].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function xM(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return yM(r,t)}function $l(e){return t=>t.pointerType==="mouse"?e(t):void 0}var wM=Ab,_M=Wg,bM=Ob,SM=Mb,kM=Kg,CM=Ib,EM=wf,jM=Fb,TM=Ub,NM=$b,RM=Wb,PM=Hb,AM=Yb,DM=Kb,OM=qb,Xg="DropdownMenu",[MM,uU]=Hr(Xg,[Rb]),xr=Rb(),[IM,Qb]=MM(Xg),Jb=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=xr(t),u=y.useRef(null),[d=!1,f]=_s({prop:s,defaultProp:i,onChange:o});return c.jsx(IM,{scope:t,triggerId:xn(),triggerRef:u,contentId:xn(),open:d,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(m=>!m),[f]),modal:a,children:c.jsx(wM,{...l,open:d,onOpenChange:f,dir:n,modal:a,children:r})})};Jb.displayName=Xg;var eS="DropdownMenuTrigger",tS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,i=Qb(eS,r),o=xr(r);return c.jsx(_M,{asChild:!0,...o,children:c.jsx(Le.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:cf(t,i.triggerRef),onPointerDown:ce(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ce(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});tS.displayName=eS;var LM="DropdownMenuPortal",rS=e=>{const{__scopeDropdownMenu:t,...r}=e,n=xr(t);return c.jsx(bM,{...n,...r})};rS.displayName=LM;var nS="DropdownMenuContent",sS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=Qb(nS,r),i=xr(r),o=y.useRef(!1);return c.jsx(SM,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:t,onCloseAutoFocus:ce(e.onCloseAutoFocus,a=>{var l;o.current||(l=s.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ce(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!s.modal||d)&&(o.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)"}})});sS.displayName=nS;var FM="DropdownMenuGroup",zM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(kM,{...s,...n,ref:t})});zM.displayName=FM;var UM="DropdownMenuLabel",iS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(CM,{...s,...n,ref:t})});iS.displayName=UM;var VM="DropdownMenuItem",oS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(EM,{...s,...n,ref:t})});oS.displayName=VM;var $M="DropdownMenuCheckboxItem",aS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(jM,{...s,...n,ref:t})});aS.displayName=$M;var BM="DropdownMenuRadioGroup",WM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(TM,{...s,...n,ref:t})});WM.displayName=BM;var HM="DropdownMenuRadioItem",lS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(NM,{...s,...n,ref:t})});lS.displayName=HM;var YM="DropdownMenuItemIndicator",cS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(RM,{...s,...n,ref:t})});cS.displayName=YM;var ZM="DropdownMenuSeparator",uS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(PM,{...s,...n,ref:t})});uS.displayName=ZM;var KM="DropdownMenuArrow",GM=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(AM,{...s,...n,ref:t})});GM.displayName=KM;var qM="DropdownMenuSubTrigger",dS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(DM,{...s,...n,ref:t})});dS.displayName=qM;var XM="DropdownMenuSubContent",fS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=xr(r);return c.jsx(OM,{...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)"}})});fS.displayName=XM;var QM=Jb,JM=tS,eI=rS,hS=sS,pS=iS,mS=oS,gS=aS,vS=lS,yS=cS,xS=uS,wS=dS,_S=fS;const bS=QM,SS=JM,tI=y.forwardRef(({className:e,inset:t,children:r,...n},s)=>c.jsxs(wS,{ref:s,className:le("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,c.jsx(bP,{className:"ml-auto h-4 w-4"})]}));tI.displayName=wS.displayName;const rI=y.forwardRef(({className:e,...t},r)=>c.jsx(_S,{ref:r,className:le("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}));rI.displayName=_S.displayName;const Qg=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(eI,{children:c.jsx(hS,{ref:n,sideOffset:t,className:le("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})}));Qg.displayName=hS.displayName;const Go=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(mS,{ref:n,className:le("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}));Go.displayName=mS.displayName;const nI=y.forwardRef(({className:e,children:t,checked:r,...n},s)=>c.jsxs(gS,{ref:s,className:le("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:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(yS,{children:c.jsx(O1,{className:"h-4 w-4"})})}),t]}));nI.displayName=gS.displayName;const sI=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(vS,{ref:n,className:le("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:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(yS,{children:c.jsx(EP,{className:"h-2 w-2 fill-current"})})}),t]}));sI.displayName=vS.displayName;const kS=y.forwardRef(({className:e,inset:t,...r},n)=>c.jsx(pS,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));kS.displayName=pS.displayName;const CS=y.forwardRef(({className:e,...t},r)=>c.jsx(xS,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));CS.displayName=xS.displayName;var Jg="Dialog",[ES,jS]=Hr(Jg),[iI,Tn]=ES(Jg),TS=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=y.useRef(null),l=y.useRef(null),[u=!1,d]=_s({prop:n,defaultProp:s,onChange:i});return c.jsx(iI,{scope:t,triggerRef:a,contentRef:l,contentId:xn(),titleId:xn(),descriptionId:xn(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:o,children:r})};TS.displayName=Jg;var NS="DialogTrigger",RS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(NS,r),i=Qe(t,s.triggerRef);return c.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":rv(s.open),...n,ref:i,onClick:ce(e.onClick,s.onOpenToggle)})});RS.displayName=NS;var ev="DialogPortal",[oI,PS]=ES(ev,{forceMount:void 0}),AS=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=Tn(ev,t);return c.jsx(oI,{scope:t,forceMount:r,children:y.Children.map(n,o=>c.jsx(yr,{present:r||i.open,children:c.jsx(vc,{asChild:!0,container:s,children:o})}))})};AS.displayName=ev;var xd="DialogOverlay",DS=y.forwardRef((e,t)=>{const r=PS(xd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Tn(xd,e.__scopeDialog);return i.modal?c.jsx(yr,{present:n||i.open,children:c.jsx(aI,{...s,ref:t})}):null});DS.displayName=xd;var aI=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(xd,r);return c.jsx(yf,{as:ws,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Le.div,{"data-state":rv(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ji="DialogContent",OS=y.forwardRef((e,t)=>{const r=PS(Ji,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Tn(Ji,e.__scopeDialog);return c.jsx(yr,{present:n||i.open,children:i.modal?c.jsx(lI,{...s,ref:t}):c.jsx(cI,{...s,ref:t})})});OS.displayName=Ji;var lI=y.forwardRef((e,t)=>{const r=Tn(Ji,e.__scopeDialog),n=y.useRef(null),s=Qe(t,r.contentRef,n);return y.useEffect(()=>{const i=n.current;if(i)return Bg(i)},[]),c.jsx(MS,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,i=>i.preventDefault())})}),cI=y.forwardRef((e,t)=>{const r=Tn(Ji,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return c.jsx(MS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),MS=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Tn(Ji,r),l=y.useRef(null),u=Qe(t,l);return Rg(),c.jsxs(c.Fragment,{children:[c.jsx(ff,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(Sa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":rv(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(dI,{titleId:a.titleId}),c.jsx(hI,{contentRef:l,descriptionId:a.descriptionId})]})]})}),tv="DialogTitle",IS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(tv,r);return c.jsx(Le.h2,{id:s.titleId,...n,ref:t})});IS.displayName=tv;var LS="DialogDescription",FS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(LS,r);return c.jsx(Le.p,{id:s.descriptionId,...n,ref:t})});FS.displayName=LS;var zS="DialogClose",US=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Tn(zS,r);return c.jsx(Le.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,()=>s.onOpenChange(!1))})});US.displayName=zS;function rv(e){return e?"open":"closed"}var VS="DialogTitleWarning",[uI,$S]=wA(VS,{contentName:Ji,titleName:tv,docsSlug:"dialog"}),dI=({titleId:e})=>{const t=$S(VS),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 y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},fI="DialogDescriptionWarning",hI=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$S(fI).contentName}}.`;return y.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},nv=TS,sv=RS,iv=AS,wc=DS,_c=OS,bc=IS,Sc=FS,_f=US;const ov=nv,av=sv,pI=iv,BS=y.forwardRef(({className:e,...t},r)=>c.jsx(wc,{className:le("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}));BS.displayName=wc.displayName;const mI=pc("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"}}),bf=y.forwardRef(({side:e="right",className:t,children:r,...n},s)=>c.jsxs(pI,{children:[c.jsx(BS,{}),c.jsxs(_c,{ref:s,className:le(mI({side:e}),t),...n,children:[r,c.jsxs(_f,{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:[c.jsx(Eg,{className:"h-4 w-4 dark:text-stone-200"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bf.displayName=_c.displayName;const lv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});lv.displayName="SheetHeader";const cv=y.forwardRef(({className:e,...t},r)=>c.jsx(bc,{ref:r,className:le("text-lg font-semibold text-foreground",e),...t}));cv.displayName=bc.displayName;const gI=y.forwardRef(({className:e,...t},r)=>c.jsx(Sc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));gI.displayName=Sc.displayName;class Ur extends Error{constructor(t){var r,n,s,i;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Ur.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 Ur||(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.":(i=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&i.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 uu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function vI(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||yI;let s=0;for(;s<e.length;){const i=e.indexOf("=",s);if(i===-1)break;let o=e.indexOf(";",s);if(o===-1)o=e.length;else if(o<i){s=e.lastIndexOf(";",i-1)+1;continue}const a=e.slice(s,i).trim();if(r[a]===void 0){let l=e.slice(i+1,o).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{r[a]=n(l)}catch{r[a]=l}}s=o+1}return r}function T0(e,t,r){const n=Object.assign({},r||{}),s=n.encode||xI;if(!uu.test(e))throw new TypeError("argument name is invalid");const i=s(t);if(i&&!uu.test(i))throw new TypeError("argument val is invalid");let o=e+"="+i;if(n.maxAge!=null){const a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!uu.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!uu.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if(!function(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}(n.expires)||isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; 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:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o}function yI(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function xI(e){return encodeURIComponent(e)}const wI=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let WS;function qo(e){if(e)try{const t=decodeURIComponent(WS(e.split(".")[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function HS(e,t=0){let r=qo(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}WS=typeof atob!="function"||wI?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,i=0,o="";n=t.charAt(i++);~n&&(r=s%4?64*r+n:n,s++%4)?o+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return o}:atob;const N0="pb_auth";class _I{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!HS(this.token)}get isAdmin(){return qo(this.token).type==="admin"}get isAuthRecord(){return qo(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=N0){const n=vI(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=N0){var l,u;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=qo(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const i={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let o=T0(r,JSON.stringify(i),t);const a=typeof Blob<"u"?new Blob([o]).size:o.length;if(i.model&&a>4096){i.model={id:(l=i==null?void 0:i.model)==null?void 0:l.id,email:(u=i==null?void 0:i.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(i.model[f]=this.model[f]);o=T0(r,JSON.stringify(i),t)}return o}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 bI extends _I{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 ao{constructor(t){this.client=t}}class SI extends ao{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,i,o){return o=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:i}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class uv extends ao{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 i;return s.items=((i=s.items)==null?void 0:i.map(o=>this.decode(o)))||[],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 Ur({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 Ur({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 i=>this.getList(i,t||500,r).then(o=>{const a=o.items;return n=n.concat(a),a.length==o.perPage?s(i+1):n});return s(1)}}function Ar(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 Fh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class kI extends uv{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var i,o;return((i=this.client.authStore.model)==null?void 0:i.id)===s.id&&((o=this.client.authStore.model)==null?void 0:o.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,i;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((i=this.client.authStore.model)==null?void 0:i.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 i={method:"POST",body:{identity:t,password:r}};i=Ar("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",i,n,s);const o=i.autoRefreshThreshold;delete i.autoRefreshThreshold,i.autoRefresh||Fh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",i);return a=this.authResponse(a),o&&function(u,d,f,m){Fh(u);const v=u.beforeSend,x=u.authStore.model,g=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))&&Fh(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=v,delete u._resetAutoRefresh},u.beforeSend=async(_,p)=>{var E;const h=u.authStore.token;if((E=p.query)!=null&&E.autoRefresh)return v?v(_,p):{url:_,sendOptions:p};let w=u.authStore.isValid;if(w&&HS(u.authStore.token,d))try{await f()}catch{w=!1}w||await m();const C=p.headers||{};for(let j in C)if(j.toLowerCase()=="authorization"&&h==C[j]&&u.authStore.token){C[j]=u.authStore.token;break}return p.headers=C,v?v(_,p):{url:_,sendOptions:p}}}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},i))),a}async authRefresh(t,r){let n={method:"POST"};return n=Ar("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=Ar("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,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Ar("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}const CI=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function YS(e){if(e){e.query=e.query||{};for(let t in e)CI.includes(t)||(e.query[t]=e[t],delete e[t])}}class ZS extends ao{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 o;if(!t)throw new Error("topic must be set.");let s=t;if(n){YS(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const i=function(a){const l=a;let u;try{u=JSON.parse(l==null?void 0:l.data)}catch{}r(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(i),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(o=this.eventSource)==null||o.addEventListener(s,i):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,i)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let i in s)if(this.hasSubscriptionListeners(i)){for(let o of this.subscriptions[i])(n=this.eventSource)==null||n.removeEventListener(i,o);delete this.subscriptions[i],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 i of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,i);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var i;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let o in s){if(!Array.isArray(this.subscriptions[o])||!this.subscriptions[o].length)continue;let a=!1;for(let l=this.subscriptions[o].length-1;l>=0;l--)this.subscriptions[o][l]===r&&(a=!0,delete this.subscriptions[o][l],this.subscriptions[o].splice(l,1),(i=this.eventSource)==null||i.removeEventListener(o,r));a&&(this.subscriptions[o].length||delete this.subscriptions[o],n||this.hasSubscriptionListeners(o)||(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 i of n[s])i(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 Ur(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 EI extends uv{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 i,o,a;return((i=this.client.authStore.model)==null?void 0:i.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((a=this.client.authStore.model)==null?void 0:a.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,i,o;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)==null?void 0:o.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 i={method:"POST",body:{identity:t,password:r}};return i=Ar("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",i).then(o=>this.authResponse(o))}async authWithOAuth2Code(t,r,n,s,i,o,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:i}};return l=Ar("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",l,o,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).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=R0(void 0));const s=new ZS(this.client);function i(){n==null||n.close(),s.unsubscribe()}const o={},a=r.requestKey;return a&&(o.requestKey=a),this.listAuthMethods(o).then(l=>{var m;const u=l.authProviders.find(v=>v.name===r.provider);if(!u)throw new Ur(new Error(`Missing or invalid provider "${r.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(m=this.client.cancelControllers)==null?void 0:m[a]:void 0;return f&&(f.signal.onabort=()=>{i()}),new Promise(async(v,x)=>{var g;try{await s.subscribe("@oauth2",async w=>{var E;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 j=Object.assign({},r);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(E=f==null?void 0:f.signal)!=null&&E.onabort&&(f.signal.onabort=null);const R=await this.authWithOAuth2Code(u.name,w.code,u.codeVerifier,d,r.createData,j);v(R)}catch(j){x(new Ur(j))}i()});const _={state:s.clientId};(g=r.scopes)!=null&&g.length&&(_.scope=r.scopes.join(" "));const p=this._replaceQueryParams(u.authUrl+d,_);await(r.urlCallback||function(w){n?n.location.href=w:n=R0(w)})(p)}catch(_){i(),x(new Ur(_))}})}).catch(l=>{throw i(),l})}async authRefresh(t,r){let n={method:"POST"};return n=Ar("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=Ar("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,i){let o={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return o=Ar("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,i),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Ar("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=Ar("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 i=qo(t),o=this.client.authStore.model;return o&&!o.verified&&o.id===i.id&&o.collectionId===i.collectionId&&(o.verified=!0,this.client.authStore.save(this.client.authStore.token,o)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Ar("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 i={method:"POST",body:{token:t,password:r}};return i=Ar("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",i,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",i).then(()=>{const o=qo(t),a=this.client.authStore.model;return a&&a.id===o.id&&a.collectionId===o.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 i={},o=s.split("&");for(const a of o){if(a=="")continue;const l=a.split("=");i[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete i[a]:i[a]=r[a]);s="";for(let a in i)i.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(i[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function R0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Ur(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 i=n/2-t/2,o=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+o+",left="+i+",resizable,menubar=no")}class jI extends uv{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 TI extends ao{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 Ur({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 NI extends ao{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class RI extends ao{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 i=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const o=new URLSearchParams(n);i+=(i.includes("?")?"&":"?")+o}return i}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 PI extends ao{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 AI{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new bI,this.admins=new kI(this),this.collections=new jI(this),this.files=new RI(this),this.logs=new TI(this),this.settings=new SI(this),this.realtime=new ZS(this),this.health=new NI(this),this.backups=new PI(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new EI(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 i={};try{i=await s.json()}catch{}if(this.afterSend&&(i=await this.afterSend(s,i)),s.status>=400)throw new Ur({url:s.url,status:s.status,data:i});return i}).catch(s=>{throw new Ur(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),YS(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 i=Array.isArray(s)?s:[s];for(let o of i)r.append(n,o)}else{let i={};i[n]=s,r.append("@jsonPayload",JSON.stringify(i))}}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],i=encodeURIComponent(n);if(Array.isArray(s))for(const o of s)r.push(i+"="+encodeURIComponent(o));else s instanceof Date?r.push(i+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(i+"="+encodeURIComponent(JSON.stringify(s))):r.push(i+"="+encodeURIComponent(s))}return r.join("&")}}var DI={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const OI=DI.VITE_API_DOMAIN;console.log(OI);let du;const it=()=>du||(du=new AI("/"),du);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var KS;function ve(){return KS.apply(null,arguments)}function MI(e){KS=e}function kn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Bi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ct(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dv(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 wr(e){return e===void 0}function ks(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function kc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function GS(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function qs(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 yk(e,t,r,n,!0).utc()}function II(){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 Ke(e){return e._pf==null&&(e._pf=II()),e._pf}var tm;Array.prototype.some?tm=Array.prototype.some:tm=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 fv(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=Ke(e),r=tm.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 Sf(e){var t=Zn(NaN);return e!=null?qs(Ke(t),e):Ke(t).userInvalidated=!0,t}var P0=ve.momentProperties=[],zh=!1;function hv(e,t){var r,n,s,i=P0.length;if(wr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),wr(t._i)||(e._i=t._i),wr(t._f)||(e._f=t._f),wr(t._l)||(e._l=t._l),wr(t._strict)||(e._strict=t._strict),wr(t._tzm)||(e._tzm=t._tzm),wr(t._isUTC)||(e._isUTC=t._isUTC),wr(t._offset)||(e._offset=t._offset),wr(t._pf)||(e._pf=Ke(t)),wr(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)n=P0[r],s=t[n],wr(s)||(e[n]=s);return e}function Cc(e){hv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),zh===!1&&(zh=!0,ve.updateOffset(this),zh=!1)}function Cn(e){return e instanceof Cc||e!=null&&e._isAMomentObject!=null}function qS(e){ve.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function sn(e,t){var r=!0;return qs(function(){if(ve.deprecationHandler!=null&&ve.deprecationHandler(null,e),r){var n=[],s,i,o,a=arguments.length;for(i=0;i<a;i++){if(s="",typeof arguments[i]=="object"){s+=`
[`+i+"] ";for(o in arguments[0])ct(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[i];n.push(s)}qS(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var A0={};function XS(e,t){ve.deprecationHandler!=null&&ve.deprecationHandler(e,t),A0[e]||(qS(t),A0[e]=!0)}ve.suppressDeprecationWarnings=!1;ve.deprecationHandler=null;function Kn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function LI(e){var t,r;for(r in e)ct(e,r)&&(t=e[r],Kn(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 rm(e,t){var r=qs({},e),n;for(n in t)ct(t,n)&&(Bi(e[n])&&Bi(t[n])?(r[n]={},qs(r[n],e[n]),qs(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)ct(e,n)&&!ct(t,n)&&Bi(e[n])&&(r[n]=qs({},r[n]));return r}function pv(e){e!=null&&this.set(e)}var nm;Object.keys?nm=Object.keys:nm=function(e){var t,r=[];for(t in e)ct(e,t)&&r.push(t);return r};var FI={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function zI(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Kn(n)?n.call(t,r):n}function Wn(e,t,r){var n=""+Math.abs(e),s=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var mv=/(\[[^\[]*\])|(\\)?([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,fu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Uh={},Xo={};function Oe(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Xo[e]=s),t&&(Xo[t[0]]=function(){return Wn(s.apply(this,arguments),t[1],t[2])}),r&&(Xo[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function UI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function VI(e){var t=e.match(mv),r,n;for(r=0,n=t.length;r<n;r++)Xo[t[r]]?t[r]=Xo[t[r]]:t[r]=UI(t[r]);return function(s){var i="",o;for(o=0;o<n;o++)i+=Kn(t[o])?t[o].call(s,e):t[o];return i}}function Ou(e,t){return e.isValid()?(t=QS(t,e.localeData()),Uh[t]=Uh[t]||VI(t),Uh[t](e)):e.localeData().invalidDate()}function QS(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(fu.lastIndex=0;r>=0&&fu.test(e);)e=e.replace(fu,n),fu.lastIndex=0,r-=1;return e}var $I={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 BI(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(mv).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var WI="Invalid date";function HI(){return this._invalidDate}var YI="%d",ZI=/\d{1,2}/;function KI(e){return this._ordinal.replace("%d",e)}var GI={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 qI(e,t,r,n){var s=this._relativeTime[r];return Kn(s)?s(e,t,r,n):s.replace(/%d/i,e)}function XI(e,t){var r=this._relativeTime[e>0?"future":"past"];return Kn(r)?r(t):r.replace(/%s/i,t)}var D0={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 on(e){return typeof e=="string"?D0[e]||D0[e.toLowerCase()]:void 0}function gv(e){var t={},r,n;for(n in e)ct(e,n)&&(r=on(n),r&&(t[r]=e[n]));return t}var QI={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 JI(e){var t=[],r;for(r in e)ct(e,r)&&t.push({unit:r,priority:QI[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var JS=/\d/,Yr=/\d\d/,ek=/\d{3}/,vv=/\d{4}/,kf=/[+-]?\d{6}/,Ct=/\d\d?/,tk=/\d\d\d\d?/,rk=/\d\d\d\d\d\d?/,Cf=/\d{1,3}/,yv=/\d{1,4}/,Ef=/[+-]?\d{1,6}/,ja=/\d+/,jf=/[+-]?\d+/,eL=/Z|[+-]\d\d:?\d\d/gi,Tf=/Z|[+-]\d\d(?::?\d\d)?/gi,tL=/[+-]?\d+(\.\d{1,3})?/,Ec=/[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,Ta=/^[1-9]\d?/,xv=/^([1-9]\d|\d)/,wd;wd={};function _e(e,t,r){wd[e]=Kn(t)?t:function(n,s){return n&&r?r:t}}function rL(e,t){return ct(wd,e)?wd[e](t._strict,t._locale):new RegExp(nL(e))}function nL(e){return ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function ps(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Qr(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=Qr(t)),r}var sm={};function vt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ks(t)&&(n=function(i,o){o[t]=rt(i)}),s=e.length,r=0;r<s;r++)sm[e[r]]=n}function jc(e,t){vt(e,function(r,n,s,i){s._w=s._w||{},t(r,s._w,s,i)})}function sL(e,t,r){t!=null&&ct(sm,e)&&sm[e](t,r._a,r,e)}function Nf(e){return e%4===0&&e%100!==0||e%400===0}var ar=0,us=1,In=2,Gt=3,mn=4,ds=5,zi=6,iL=7,oL=8;Oe("Y",0,0,function(){var e=this.year();return e<=9999?Wn(e,4):"+"+e});Oe(0,["YY",2],0,function(){return this.year()%100});Oe(0,["YYYY",4],0,"year");Oe(0,["YYYYY",5],0,"year");Oe(0,["YYYYYY",6,!0],0,"year");_e("Y",jf);_e("YY",Ct,Yr);_e("YYYY",yv,vv);_e("YYYYY",Ef,kf);_e("YYYYYY",Ef,kf);vt(["YYYYY","YYYYYY"],ar);vt("YYYY",function(e,t){t[ar]=e.length===2?ve.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[ar]=ve.parseTwoDigitYear(e)});vt("Y",function(e,t){t[ar]=parseInt(e,10)});function pl(e){return Nf(e)?366:365}ve.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var nk=Na("FullYear",!0);function aL(){return Nf(this.year())}function Na(e,t){return function(r){return r!=null?(sk(this,e,r),ve.updateOffset(this,t),this):Bl(this,e)}}function Bl(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 sk(e,t,r){var n,s,i,o,a;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}i=r,o=e.month(),a=e.date(),a=a===29&&o===1&&!Nf(i)?28:a,s?n.setUTCFullYear(i,o,a):n.setFullYear(i,o,a)}}function lL(e){return e=on(e),Kn(this[e])?this[e]():this}function cL(e,t){if(typeof e=="object"){e=gv(e);var r=JI(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=on(e),Kn(this[e]))return this[e](t);return this}function uL(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 wv(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=uL(t,12);return e+=(t-r)/12,r===1?Nf(e)?29:28:31-r%7%2}Oe("M",["MM",2],"Mo",function(){return this.month()+1});Oe("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Oe("MMMM",0,0,function(e){return this.localeData().months(this,e)});_e("M",Ct,Ta);_e("MM",Ct,Yr);_e("MMM",function(e,t){return t.monthsShortRegex(e)});_e("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[us]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[us]=s:Ke(r).invalidMonth=e});var dL="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ik="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ok=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fL=Ec,hL=Ec;function pL(e,t){return e?kn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ok).test(t)?"format":"standalone"][e.month()]:kn(this._months)?this._months:this._months.standalone}function mL(e,t){return e?kn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ok.test(t)?"format":"standalone"][e.month()]:kn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function gL(e,t,r){var n,s,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=Zn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(s=zt.call(this._shortMonthsParse,o),s!==-1?s:null):(s=zt.call(this._longMonthsParse,o),s!==-1?s:null):t==="MMM"?(s=zt.call(this._shortMonthsParse,o),s!==-1?s:(s=zt.call(this._longMonthsParse,o),s!==-1?s:null)):(s=zt.call(this._longMonthsParse,o),s!==-1?s:(s=zt.call(this._shortMonthsParse,o),s!==-1?s:null))}function vL(e,t,r){var n,s,i;if(this._monthsParseExact)return gL.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]&&(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(i.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),!ks(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,wv(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function lk(e){return e!=null?(ak(this,e),ve.updateOffset(this,!0),this):Bl(this,"Month")}function yL(){return wv(this.year(),this.month())}function xL(e){return this._monthsParseExact?(ct(this,"_monthsRegex")||ck.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ct(this,"_monthsShortRegex")||(this._monthsShortRegex=fL),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function wL(e){return this._monthsParseExact?(ct(this,"_monthsRegex")||ck.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ct(this,"_monthsRegex")||(this._monthsRegex=hL),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function ck(){function e(l,u){return u.length-l.length}var t=[],r=[],n=[],s,i,o,a;for(s=0;s<12;s++)i=Zn([2e3,s]),o=ps(this.monthsShort(i,"")),a=ps(this.months(i,"")),t.push(o),r.push(a),n.push(a),n.push(o);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 _L(e,t,r,n,s,i,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,s,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,i,o),a}function Wl(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 _d(e,t,r){var n=7+t-r,s=(7+Wl(e,0,n).getUTCDay()-t)%7;return-s+n-1}function uk(e,t,r,n,s){var i=(7+r-n)%7,o=_d(e,n,s),a=1+7*(t-1)+i+o,l,u;return a<=0?(l=e-1,u=pl(l)+a):a>pl(e)?(l=e+1,u=a-pl(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Hl(e,t,r){var n=_d(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,o;return s<1?(o=e.year()-1,i=s+ms(o,t,r)):s>ms(e.year(),t,r)?(i=s-ms(e.year(),t,r),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function ms(e,t,r){var n=_d(e,t,r),s=_d(e+1,t,r);return(pl(e)-n+s)/7}Oe("w",["ww",2],"wo","week");Oe("W",["WW",2],"Wo","isoWeek");_e("w",Ct,Ta);_e("ww",Ct,Yr);_e("W",Ct,Ta);_e("WW",Ct,Yr);jc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=rt(e)});function bL(e){return Hl(e,this._week.dow,this._week.doy).week}var SL={dow:0,doy:6};function kL(){return this._week.dow}function CL(){return this._week.doy}function EL(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function jL(e){var t=Hl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Oe("d",0,"do","day");Oe("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Oe("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Oe("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Oe("e",0,0,"weekday");Oe("E",0,0,"isoWeekday");_e("d",Ct);_e("e",Ct);_e("E",Ct);_e("dd",function(e,t){return t.weekdaysMinRegex(e)});_e("ddd",function(e,t){return t.weekdaysShortRegex(e)});_e("dddd",function(e,t){return t.weekdaysRegex(e)});jc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:Ke(r).invalidWeekday=e});jc(["d","e","E"],function(e,t,r,n){t[n]=rt(e)});function TL(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function NL(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function _v(e,t){return e.slice(t,7).concat(e.slice(0,t))}var RL="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),dk="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),PL="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),AL=Ec,DL=Ec,OL=Ec;function ML(e,t){var r=kn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?_v(r,this._week.dow):e?r[e.day()]:r}function IL(e){return e===!0?_v(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function LL(e){return e===!0?_v(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function FL(e,t,r){var n,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=Zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=zt.call(this._weekdaysParse,o),s!==-1||(s=zt.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=zt.call(this._shortWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=zt.call(this._minWeekdaysParse,o),s!==-1||(s=zt.call(this._weekdaysParse,o),s!==-1)?s:(s=zt.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function zL(e,t,r){var n,s,i;if(this._weekdaysParseExact)return FL.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]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.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 UL(e){if(!this.isValid())return e!=null?this:NaN;var t=Bl(this,"Day");return e!=null?(e=TL(e,this.localeData()),this.add(e-t,"d")):t}function VL(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 $L(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=NL(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function BL(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||bv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ct(this,"_weekdaysRegex")||(this._weekdaysRegex=AL),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function WL(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||bv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ct(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=DL),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function HL(e){return this._weekdaysParseExact?(ct(this,"_weekdaysRegex")||bv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ct(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=OL),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function bv(){function e(d,f){return f.length-d.length}var t=[],r=[],n=[],s=[],i,o,a,l,u;for(i=0;i<7;i++)o=Zn([2e3,1]).day(i),a=ps(this.weekdaysMin(o,"")),l=ps(this.weekdaysShort(o,"")),u=ps(this.weekdays(o,"")),t.push(a),r.push(l),n.push(u),s.push(a),s.push(l),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 Sv(){return this.hours()%12||12}function YL(){return this.hours()||24}Oe("H",["HH",2],0,"hour");Oe("h",["hh",2],0,Sv);Oe("k",["kk",2],0,YL);Oe("hmm",0,0,function(){return""+Sv.apply(this)+Wn(this.minutes(),2)});Oe("hmmss",0,0,function(){return""+Sv.apply(this)+Wn(this.minutes(),2)+Wn(this.seconds(),2)});Oe("Hmm",0,0,function(){return""+this.hours()+Wn(this.minutes(),2)});Oe("Hmmss",0,0,function(){return""+this.hours()+Wn(this.minutes(),2)+Wn(this.seconds(),2)});function fk(e,t){Oe(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}fk("a",!0);fk("A",!1);function hk(e,t){return t._meridiemParse}_e("a",hk);_e("A",hk);_e("H",Ct,xv);_e("h",Ct,Ta);_e("k",Ct,Ta);_e("HH",Ct,Yr);_e("hh",Ct,Yr);_e("kk",Ct,Yr);_e("hmm",tk);_e("hmmss",rk);_e("Hmm",tk);_e("Hmmss",rk);vt(["H","HH"],Gt);vt(["k","kk"],function(e,t,r){var n=rt(e);t[Gt]=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[Gt]=rt(e),Ke(r).bigHour=!0});vt("hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n)),Ke(r).bigHour=!0});vt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n,2)),t[ds]=rt(e.substr(s)),Ke(r).bigHour=!0});vt("Hmm",function(e,t,r){var n=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n))});vt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=rt(e.substr(0,n)),t[mn]=rt(e.substr(n,2)),t[ds]=rt(e.substr(s))});function ZL(e){return(e+"").toLowerCase().charAt(0)==="p"}var KL=/[ap]\.?m?\.?/i,GL=Na("Hours",!0);function qL(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var pk={calendar:FI,longDateFormat:$I,invalidDate:WI,ordinal:YI,dayOfMonthOrdinalParse:ZI,relativeTime:GI,months:dL,monthsShort:ik,week:SL,weekdays:RL,weekdaysMin:PL,weekdaysShort:dk,meridiemParse:KL},Tt={},Ya={},Yl;function XL(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 O0(e){return e&&e.toLowerCase().replace("_","-")}function QL(e){for(var t=0,r,n,s,i;t<e.length;){for(i=O0(e[t]).split("-"),r=i.length,n=O0(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Rf(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&XL(i,n)>=r-1)break;r--}t++}return Yl}function JL(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Rf(e){var t=null,r;if(Tt[e]===void 0&&typeof Uu<"u"&&Uu&&Uu.exports&&JL(e))try{t=Yl._abbr,r=require,r("./locale/"+e),ai(t)}catch{Tt[e]=null}return Tt[e]}function ai(e,t){var r;return e&&(wr(t)?r=Ps(e):r=kv(e,t),r?Yl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Yl._abbr}function kv(e,t){if(t!==null){var r,n=pk;if(t.abbr=e,Tt[e]!=null)XS("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=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)n=Tt[t.parentLocale]._config;else if(r=Rf(t.parentLocale),r!=null)n=r._config;else return Ya[t.parentLocale]||(Ya[t.parentLocale]=[]),Ya[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new pv(rm(n,t)),Ya[e]&&Ya[e].forEach(function(s){kv(s.name,s.config)}),ai(e),Tt[e]}else return delete Tt[e],null}function e4(e,t){if(t!=null){var r,n,s=pk;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(rm(Tt[e]._config,t)):(n=Rf(e),n!=null&&(s=n._config),t=rm(s,t),n==null&&(t.abbr=e),r=new pv(t),r.parentLocale=Tt[e],Tt[e]=r),ai(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===ai()&&ai(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ps(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Yl;if(!kn(e)){if(t=Rf(e),t)return t;e=[e]}return QL(e)}function t4(){return nm(Tt)}function Cv(e){var t,r=e._a;return r&&Ke(e).overflow===-2&&(t=r[us]<0||r[us]>11?us:r[In]<1||r[In]>wv(r[ar],r[us])?In:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[mn]!==0||r[ds]!==0||r[zi]!==0)?Gt:r[mn]<0||r[mn]>59?mn:r[ds]<0||r[ds]>59?ds:r[zi]<0||r[zi]>999?zi:-1,Ke(e)._overflowDayOfYear&&(t<ar||t>In)&&(t=In),Ke(e)._overflowWeeks&&t===-1&&(t=iL),Ke(e)._overflowWeekday&&t===-1&&(t=oL),Ke(e).overflow=t),e}var r4=/^\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)?)?$/,n4=/^\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)?)?$/,s4=/Z|[+-]\d\d(?::?\d\d)?/,hu=[["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]],Vh=[["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/]],i4=/^\/?Date\((-?\d+)/i,o4=/^(?:(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}))$/,a4={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 mk(e){var t,r,n=e._i,s=r4.exec(n)||n4.exec(n),i,o,a,l,u=hu.length,d=Vh.length;if(s){for(Ke(e).iso=!0,t=0,r=u;t<r;t++)if(hu[t][1].exec(s[1])){o=hu[t][0],i=hu[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(s[3]){for(t=0,r=d;t<r;t++)if(Vh[t][1].exec(s[3])){a=(s[2]||" ")+Vh[t][0];break}if(a==null){e._isValid=!1;return}}if(!i&&a!=null){e._isValid=!1;return}if(s[4])if(s4.exec(s[4]))l="Z";else{e._isValid=!1;return}e._f=o+(a||"")+(l||""),jv(e)}else e._isValid=!1}function l4(e,t,r,n,s,i){var o=[c4(e),ik.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return i&&o.push(parseInt(i,10)),o}function c4(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function u4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function d4(e,t,r){if(e){var n=dk.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return Ke(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function f4(e,t,r){if(e)return a4[e];if(t)return 0;var n=parseInt(r,10),s=n%100,i=(n-s)/100;return i*60+s}function gk(e){var t=o4.exec(u4(e._i)),r;if(t){if(r=l4(t[4],t[3],t[2],t[5],t[6],t[7]),!d4(t[1],r,e))return;e._a=r,e._tzm=f4(t[8],t[9],t[10]),e._d=Wl.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ke(e).rfc2822=!0}else e._isValid=!1}function h4(e){var t=i4.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(mk(e),e._isValid===!1)delete e._isValid;else return;if(gk(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ve.createFromInputFallback(e)}ve.createFromInputFallback=sn("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 bo(e,t,r){return e??t??r}function p4(e){var t=new Date(ve.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ev(e){var t,r,n=[],s,i,o;if(!e._d){for(s=p4(e),e._w&&e._a[In]==null&&e._a[us]==null&&m4(e),e._dayOfYear!=null&&(o=bo(e._a[ar],s[ar]),(e._dayOfYear>pl(o)||e._dayOfYear===0)&&(Ke(e)._overflowDayOfYear=!0),r=Wl(o,0,e._dayOfYear),e._a[us]=r.getUTCMonth(),e._a[In]=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[Gt]===24&&e._a[mn]===0&&e._a[ds]===0&&e._a[zi]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?Wl:_L).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Gt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Ke(e).weekdayMismatch=!0)}}function m4(e){var t,r,n,s,i,o,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,r=bo(t.GG,e._a[ar],Hl(kt(),1,4).year),n=bo(t.W,1),s=bo(t.E,1),(s<1||s>7)&&(l=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,u=Hl(kt(),i,o),r=bo(t.gg,e._a[ar],u.year),n=bo(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(l=!0)):s=i),n<1||n>ms(r,i,o)?Ke(e)._overflowWeeks=!0:l!=null?Ke(e)._overflowWeekday=!0:(a=uk(r,n,s,i,o),e._a[ar]=a.year,e._dayOfYear=a.dayOfYear)}ve.ISO_8601=function(){};ve.RFC_2822=function(){};function jv(e){if(e._f===ve.ISO_8601){mk(e);return}if(e._f===ve.RFC_2822){gk(e);return}e._a=[],Ke(e).empty=!0;var t=""+e._i,r,n,s,i,o,a=t.length,l=0,u,d;for(s=QS(e._f,e._locale).match(mv)||[],d=s.length,r=0;r<d;r++)i=s[r],n=(t.match(rL(i,e))||[])[0],n&&(o=t.substr(0,t.indexOf(n)),o.length>0&&Ke(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Xo[i]?(n?Ke(e).empty=!1:Ke(e).unusedTokens.push(i),sL(i,n,e)):e._strict&&!n&&Ke(e).unusedTokens.push(i);Ke(e).charsLeftOver=a-l,t.length>0&&Ke(e).unusedInput.push(t),e._a[Gt]<=12&&Ke(e).bigHour===!0&&e._a[Gt]>0&&(Ke(e).bigHour=void 0),Ke(e).parsedDateParts=e._a.slice(0),Ke(e).meridiem=e._meridiem,e._a[Gt]=g4(e._locale,e._a[Gt],e._meridiem),u=Ke(e).era,u!==null&&(e._a[ar]=e._locale.erasConvertYear(u,e._a[ar])),Ev(e),Cv(e)}function g4(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 v4(e){var t,r,n,s,i,o,a=!1,l=e._f.length;if(l===0){Ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<l;s++)i=0,o=!1,t=hv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],jv(t),fv(t)&&(o=!0),i+=Ke(t).charsLeftOver,i+=Ke(t).unusedTokens.length*10,Ke(t).score=i,a?i<n&&(n=i,r=t):(n==null||i<n||o)&&(n=i,r=t,o&&(a=!0));qs(e,r||t)}function y4(e){if(!e._d){var t=gv(e._i),r=t.day===void 0?t.date:t.day;e._a=GS([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Ev(e)}}function x4(e){var t=new Cc(Cv(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||Ps(e._l),t===null||r===void 0&&t===""?Sf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Cn(t)?new Cc(Cv(t)):(kc(t)?e._d=t:kn(r)?v4(e):r?jv(e):w4(e),fv(e)||(e._d=null),e))}function w4(e){var t=e._i;wr(t)?e._d=new Date(ve.now()):kc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?h4(e):kn(t)?(e._a=GS(t.slice(0),function(r){return parseInt(r,10)}),Ev(e)):Bi(t)?y4(e):ks(t)?e._d=new Date(t):ve.createFromInputFallback(e)}function yk(e,t,r,n,s){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Bi(e)&&dv(e)||kn(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=s,i._l=r,i._i=e,i._f=t,i._strict=n,x4(i)}function kt(e,t,r,n){return yk(e,t,r,n,!1)}var _4=sn("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:Sf()}),b4=sn("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:Sf()});function xk(e,t){var r,n;if(t.length===1&&kn(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 S4(){var e=[].slice.call(arguments,0);return xk("isBefore",e)}function k4(){var e=[].slice.call(arguments,0);return xk("isAfter",e)}var C4=function(){return Date.now?Date.now():+new Date},Za=["year","quarter","month","week","day","hour","minute","second","millisecond"];function E4(e){var t,r=!1,n,s=Za.length;for(t in e)if(ct(e,t)&&!(zt.call(Za,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Za[n]]){if(r)return!1;parseFloat(e[Za[n]])!==rt(e[Za[n]])&&(r=!0)}return!0}function j4(){return this._isValid}function T4(){return Nn(NaN)}function Pf(e){var t=gv(e),r=t.year||0,n=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=E4(t),this._milliseconds=+d+u*1e3+l*6e4+a*1e3*60*60,this._days=+o+i*7,this._months=+s+n*3+r*12,this._data={},this._locale=Ps(),this._bubble()}function Mu(e){return e instanceof Pf}function im(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function N4(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0,o;for(o=0;o<n;o++)rt(e[o])!==rt(t[o])&&i++;return i+s}function wk(e,t){Oe(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Wn(~~(r/60),2)+t+Wn(~~r%60,2)})}wk("Z",":");wk("ZZ","");_e("Z",Tf);_e("ZZ",Tf);vt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Tv(Tf,e)});var R4=/([\+\-]|\d\d)/gi;function Tv(e,t){var r=(t||"").match(e),n,s,i;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(R4)||["-",0,0],i=+(s[1]*60)+rt(s[2]),i===0?0:s[0]==="+"?i:-i)}function Nv(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(Cn(e)||kc(e)?e.valueOf():kt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ve.updateOffset(r,!1),r):kt(e).local()}function om(e){return-Math.round(e._d.getTimezoneOffset())}ve.updateOffset=function(){};function P4(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=Tv(Tf,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=om(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Sk(this,Nn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ve.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:om(this)}function A4(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function D4(e){return this.utcOffset(0,e)}function O4(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(om(this),"m")),this}function M4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Tv(eL,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function I4(e){return this.isValid()?(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function L4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function F4(){if(!wr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return hv(e,this),e=vk(e),e._a?(t=e._isUTC?Zn(e._a):kt(e._a),this._isDSTShifted=this.isValid()&&N4(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function z4(){return this.isValid()?!this._isUTC:!1}function U4(){return this.isValid()?this._isUTC:!1}function _k(){return this.isValid()?this._isUTC&&this._offset===0:!1}var V4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,$4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nn(e,t){var r=e,n=null,s,i,o;return Mu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ks(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=V4.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:rt(n[In])*s,h:rt(n[Gt])*s,m:rt(n[mn])*s,s:rt(n[ds])*s,ms:rt(im(n[zi]*1e3))*s}):(n=$4.exec(e))?(s=n[1]==="-"?-1:1,r={y:ji(n[2],s),M:ji(n[3],s),w:ji(n[4],s),d:ji(n[5],s),h:ji(n[6],s),m:ji(n[7],s),s:ji(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=B4(kt(r.from),kt(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Pf(r),Mu(e)&&ct(e,"_locale")&&(i._locale=e._locale),Mu(e)&&ct(e,"_isValid")&&(i._isValid=e._isValid),i}Nn.fn=Pf.prototype;Nn.invalid=T4;function ji(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function M0(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 B4(e,t){var r;return e.isValid()&&t.isValid()?(t=Nv(t,e),e.isBefore(t)?r=M0(e,t):(r=M0(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function bk(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(XS(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."),i=r,r=n,n=i),s=Nn(r,n),Sk(this,s,e),this}}function Sk(e,t,r,n){var s=t._milliseconds,i=im(t._days),o=im(t._months);e.isValid()&&(n=n??!0,o&&ak(e,Bl(e,"Month")+o*r),i&&sk(e,"Date",Bl(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&ve.updateOffset(e,i||o))}var W4=bk(1,"add"),H4=bk(-1,"subtract");function kk(e){return typeof e=="string"||e instanceof String}function Y4(e){return Cn(e)||kc(e)||kk(e)||ks(e)||K4(e)||Z4(e)||e===null||e===void 0}function Z4(e){var t=Bi(e)&&!dv(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,i,o=n.length;for(s=0;s<o;s+=1)i=n[s],r=r||ct(e,i);return t&&r}function K4(e){var t=kn(e),r=!1;return t&&(r=e.filter(function(n){return!ks(n)&&kk(e)}).length===0),t&&r}function G4(e){var t=Bi(e)&&!dv(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,i;for(s=0;s<n.length;s+=1)i=n[s],r=r||ct(e,i);return t&&r}function q4(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 X4(e,t){arguments.length===1&&(arguments[0]?Y4(arguments[0])?(e=arguments[0],t=void 0):G4(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||kt(),n=Nv(r,this).startOf("day"),s=ve.calendarFormat(this,n)||"sameElse",i=t&&(Kn(t[s])?t[s].call(this,r):t[s]);return this.format(i||this.localeData().calendar(s,this,kt(r)))}function Q4(){return new Cc(this)}function J4(e,t){var r=Cn(e)?e:kt(e);return this.isValid()&&r.isValid()?(t=on(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function e5(e,t){var r=Cn(e)?e:kt(e);return this.isValid()&&r.isValid()?(t=on(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function t5(e,t,r,n){var s=Cn(e)?e:kt(e),i=Cn(t)?t:kt(t);return this.isValid()&&s.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function r5(e,t){var r=Cn(e)?e:kt(e),n;return this.isValid()&&r.isValid()?(t=on(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 n5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function s5(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function i5(e,t,r){var n,s,i;if(!this.isValid())return NaN;if(n=Nv(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=on(t),t){case"year":i=Iu(this,n)/12;break;case"month":i=Iu(this,n);break;case"quarter":i=Iu(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-s)/864e5;break;case"week":i=(this-n-s)/6048e5;break;default:i=this-n}return r?i:Qr(i)}function Iu(e,t){if(e.date()<t.date())return-Iu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,i;return t-n<0?(s=e.clone().add(r-1,"months"),i=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),i=(t-n)/(s-n)),-(r+i)||0}ve.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ve.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function o5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function a5(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Ou(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Kn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ou(r,"Z")):Ou(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function l5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;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",i=t+'[")]',this.format(r+n+s+i)}function c5(e){e||(e=this.isUtc()?ve.defaultFormatUtc:ve.defaultFormat);var t=Ou(this,e);return this.localeData().postformat(t)}function u5(e,t){return this.isValid()&&(Cn(e)&&e.isValid()||kt(e).isValid())?Nn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function d5(e){return this.from(kt(),e)}function f5(e,t){return this.isValid()&&(Cn(e)&&e.isValid()||kt(e).isValid())?Nn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function h5(e){return this.to(kt(),e)}function Ck(e){var t;return e===void 0?this._locale._abbr:(t=Ps(e),t!=null&&(this._locale=t),this)}var Ek=sn("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 jk(){return this._locale}var bd=1e3,Qo=60*bd,Sd=60*Qo,Tk=(365*400+97)*24*Sd;function Jo(e,t){return(e%t+t)%t}function Nk(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Tk:new Date(e,t,r).valueOf()}function Rk(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Tk:Date.UTC(e,t,r)}function p5(e){var t,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Rk:Nk,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-=Jo(t+(this._isUTC?0:this.utcOffset()*Qo),Sd);break;case"minute":t=this._d.valueOf(),t-=Jo(t,Qo);break;case"second":t=this._d.valueOf(),t-=Jo(t,bd);break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function m5(e){var t,r;if(e=on(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Rk:Nk,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+=Sd-Jo(t+(this._isUTC?0:this.utcOffset()*Qo),Sd)-1;break;case"minute":t=this._d.valueOf(),t+=Qo-Jo(t,Qo)-1;break;case"second":t=this._d.valueOf(),t+=bd-Jo(t,bd)-1;break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function g5(){return this._d.valueOf()-(this._offset||0)*6e4}function v5(){return Math.floor(this.valueOf()/1e3)}function y5(){return new Date(this.valueOf())}function x5(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function w5(){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 _5(){return this.isValid()?this.toISOString():null}function b5(){return fv(this)}function S5(){return qs({},Ke(this))}function k5(){return Ke(this).overflow}function C5(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Oe("N",0,0,"eraAbbr");Oe("NN",0,0,"eraAbbr");Oe("NNN",0,0,"eraAbbr");Oe("NNNN",0,0,"eraName");Oe("NNNNN",0,0,"eraNarrow");Oe("y",["y",1],"yo","eraYear");Oe("y",["yy",2],0,"eraYear");Oe("y",["yyy",3],0,"eraYear");Oe("y",["yyyy",4],0,"eraYear");_e("N",Rv);_e("NN",Rv);_e("NNN",Rv);_e("NNNN",I5);_e("NNNNN",L5);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?Ke(r).era=s:Ke(r).invalidEra=e});_e("y",ja);_e("yy",ja);_e("yyy",ja);_e("yyyy",ja);_e("yo",F5);vt(["y","yy","yyy","yyyy"],ar);vt(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[ar]=r._locale.eraYearOrdinalParse(e,s):t[ar]=parseInt(e,10)});function E5(e,t){var r,n,s,i=this._eras||Ps("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":s=ve(i[r].since).startOf("day"),i[r].since=s.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":s=ve(i[r].until).startOf("day").valueOf(),i[r].until=s.valueOf();break}}return i}function j5(e,t,r){var n,s,i=this.eras(),o,a,l;for(e=e.toUpperCase(),n=0,s=i.length;n<s;++n)if(o=i[n].name.toUpperCase(),a=i[n].abbr.toUpperCase(),l=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return i[n];break;case"NNNN":if(o===e)return i[n];break;case"NNNNN":if(l===e)return i[n];break}else if([o,a,l].indexOf(e)>=0)return i[n]}function T5(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ve(e.since).year():ve(e.since).year()+(t-e.offset)*r}function N5(){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 R5(){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 P5(){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 A5(){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()-ve(s[e].since).year())*r+s[e].offset;return this.year()}function D5(e){return ct(this,"_erasNameRegex")||Pv.call(this),e?this._erasNameRegex:this._erasRegex}function O5(e){return ct(this,"_erasAbbrRegex")||Pv.call(this),e?this._erasAbbrRegex:this._erasRegex}function M5(e){return ct(this,"_erasNarrowRegex")||Pv.call(this),e?this._erasNarrowRegex:this._erasRegex}function Rv(e,t){return t.erasAbbrRegex(e)}function I5(e,t){return t.erasNameRegex(e)}function L5(e,t){return t.erasNarrowRegex(e)}function F5(e,t){return t._eraYearOrdinalRegex||ja}function Pv(){var e=[],t=[],r=[],n=[],s,i,o,a,l,u=this.eras();for(s=0,i=u.length;s<i;++s)o=ps(u[s].name),a=ps(u[s].abbr),l=ps(u[s].narrow),t.push(o),e.push(a),r.push(l),n.push(o),n.push(a),n.push(l);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")}Oe(0,["gg",2],0,function(){return this.weekYear()%100});Oe(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Af(e,t){Oe(0,[e,e.length],0,t)}Af("gggg","weekYear");Af("ggggg","weekYear");Af("GGGG","isoWeekYear");Af("GGGGG","isoWeekYear");_e("G",jf);_e("g",jf);_e("GG",Ct,Yr);_e("gg",Ct,Yr);_e("GGGG",yv,vv);_e("gggg",yv,vv);_e("GGGGG",Ef,kf);_e("ggggg",Ef,kf);jc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=rt(e)});jc(["gg","GG"],function(e,t,r,n){t[n]=ve.parseTwoDigitYear(e)});function z5(e){return Pk.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function U5(e){return Pk.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function V5(){return ms(this.year(),1,4)}function $5(){return ms(this.isoWeekYear(),1,4)}function B5(){var e=this.localeData()._week;return ms(this.year(),e.dow,e.doy)}function W5(){var e=this.localeData()._week;return ms(this.weekYear(),e.dow,e.doy)}function Pk(e,t,r,n,s){var i;return e==null?Hl(this,n,s).year:(i=ms(e,n,s),t>i&&(t=i),H5.call(this,e,t,r,n,s))}function H5(e,t,r,n,s){var i=uk(e,t,r,n,s),o=Wl(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Oe("Q",0,"Qo","quarter");_e("Q",JS);vt("Q",function(e,t){t[us]=(rt(e)-1)*3});function Y5(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Oe("D",["DD",2],"Do","date");_e("D",Ct,Ta);_e("DD",Ct,Yr);_e("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],In);vt("Do",function(e,t){t[In]=rt(e.match(Ct)[0])});var Ak=Na("Date",!0);Oe("DDD",["DDDD",3],"DDDo","dayOfYear");_e("DDD",Cf);_e("DDDD",ek);vt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=rt(e)});function Z5(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Oe("m",["mm",2],0,"minute");_e("m",Ct,xv);_e("mm",Ct,Yr);vt(["m","mm"],mn);var K5=Na("Minutes",!1);Oe("s",["ss",2],0,"second");_e("s",Ct,xv);_e("ss",Ct,Yr);vt(["s","ss"],ds);var G5=Na("Seconds",!1);Oe("S",0,0,function(){return~~(this.millisecond()/100)});Oe(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Oe(0,["SSS",3],0,"millisecond");Oe(0,["SSSS",4],0,function(){return this.millisecond()*10});Oe(0,["SSSSS",5],0,function(){return this.millisecond()*100});Oe(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Oe(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Oe(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Oe(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});_e("S",Cf,JS);_e("SS",Cf,Yr);_e("SSS",Cf,ek);var Xs,Dk;for(Xs="SSSS";Xs.length<=9;Xs+="S")_e(Xs,ja);function q5(e,t){t[zi]=rt(("0."+e)*1e3)}for(Xs="S";Xs.length<=9;Xs+="S")vt(Xs,q5);Dk=Na("Milliseconds",!1);Oe("z",0,0,"zoneAbbr");Oe("zz",0,0,"zoneName");function X5(){return this._isUTC?"UTC":""}function Q5(){return this._isUTC?"Coordinated Universal Time":""}var ae=Cc.prototype;ae.add=W4;ae.calendar=X4;ae.clone=Q4;ae.diff=i5;ae.endOf=m5;ae.format=c5;ae.from=u5;ae.fromNow=d5;ae.to=f5;ae.toNow=h5;ae.get=lL;ae.invalidAt=k5;ae.isAfter=J4;ae.isBefore=e5;ae.isBetween=t5;ae.isSame=r5;ae.isSameOrAfter=n5;ae.isSameOrBefore=s5;ae.isValid=b5;ae.lang=Ek;ae.locale=Ck;ae.localeData=jk;ae.max=b4;ae.min=_4;ae.parsingFlags=S5;ae.set=cL;ae.startOf=p5;ae.subtract=H4;ae.toArray=x5;ae.toObject=w5;ae.toDate=y5;ae.toISOString=a5;ae.inspect=l5;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=_5;ae.toString=o5;ae.unix=v5;ae.valueOf=g5;ae.creationData=C5;ae.eraName=N5;ae.eraNarrow=R5;ae.eraAbbr=P5;ae.eraYear=A5;ae.year=nk;ae.isLeapYear=aL;ae.weekYear=z5;ae.isoWeekYear=U5;ae.quarter=ae.quarters=Y5;ae.month=lk;ae.daysInMonth=yL;ae.week=ae.weeks=EL;ae.isoWeek=ae.isoWeeks=jL;ae.weeksInYear=B5;ae.weeksInWeekYear=W5;ae.isoWeeksInYear=V5;ae.isoWeeksInISOWeekYear=$5;ae.date=Ak;ae.day=ae.days=UL;ae.weekday=VL;ae.isoWeekday=$L;ae.dayOfYear=Z5;ae.hour=ae.hours=GL;ae.minute=ae.minutes=K5;ae.second=ae.seconds=G5;ae.millisecond=ae.milliseconds=Dk;ae.utcOffset=P4;ae.utc=D4;ae.local=O4;ae.parseZone=M4;ae.hasAlignedHourOffset=I4;ae.isDST=L4;ae.isLocal=z4;ae.isUtcOffset=U4;ae.isUtc=_k;ae.isUTC=_k;ae.zoneAbbr=X5;ae.zoneName=Q5;ae.dates=sn("dates accessor is deprecated. Use date instead.",Ak);ae.months=sn("months accessor is deprecated. Use month instead",lk);ae.years=sn("years accessor is deprecated. Use year instead",nk);ae.zone=sn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",A4);ae.isDSTShifted=sn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",F4);function J5(e){return kt(e*1e3)}function eF(){return kt.apply(null,arguments).parseZone()}function Ok(e){return e}var ut=pv.prototype;ut.calendar=zI;ut.longDateFormat=BI;ut.invalidDate=HI;ut.ordinal=KI;ut.preparse=Ok;ut.postformat=Ok;ut.relativeTime=qI;ut.pastFuture=XI;ut.set=LI;ut.eras=E5;ut.erasParse=j5;ut.erasConvertYear=T5;ut.erasAbbrRegex=O5;ut.erasNameRegex=D5;ut.erasNarrowRegex=M5;ut.months=pL;ut.monthsShort=mL;ut.monthsParse=vL;ut.monthsRegex=wL;ut.monthsShortRegex=xL;ut.week=bL;ut.firstDayOfYear=CL;ut.firstDayOfWeek=kL;ut.weekdays=ML;ut.weekdaysMin=LL;ut.weekdaysShort=IL;ut.weekdaysParse=zL;ut.weekdaysRegex=BL;ut.weekdaysShortRegex=WL;ut.weekdaysMinRegex=HL;ut.isPM=ZL;ut.meridiem=qL;function kd(e,t,r,n){var s=Ps(),i=Zn().set(n,t);return s[r](i,e)}function Mk(e,t,r){if(ks(e)&&(t=e,e=void 0),e=e||"",t!=null)return kd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=kd(e,n,r,"month");return s}function Av(e,t,r,n){typeof e=="boolean"?(ks(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ks(t)&&(r=t,t=void 0),t=t||"");var s=Ps(),i=e?s._week.dow:0,o,a=[];if(r!=null)return kd(t,(r+i)%7,n,"day");for(o=0;o<7;o++)a[o]=kd(t,(o+i)%7,n,"day");return a}function tF(e,t){return Mk(e,t,"months")}function rF(e,t){return Mk(e,t,"monthsShort")}function nF(e,t,r){return Av(e,t,r,"weekdays")}function sF(e,t,r){return Av(e,t,r,"weekdaysShort")}function iF(e,t,r){return Av(e,t,r,"weekdaysMin")}ai("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}});ve.lang=sn("moment.lang is deprecated. Use moment.locale instead.",ai);ve.langData=sn("moment.langData is deprecated. Use moment.localeData instead.",Ps);var ts=Math.abs;function oF(){var e=this._data;return this._milliseconds=ts(this._milliseconds),this._days=ts(this._days),this._months=ts(this._months),e.milliseconds=ts(e.milliseconds),e.seconds=ts(e.seconds),e.minutes=ts(e.minutes),e.hours=ts(e.hours),e.months=ts(e.months),e.years=ts(e.years),this}function Ik(e,t,r,n){var s=Nn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function aF(e,t){return Ik(this,e,t,1)}function lF(e,t){return Ik(this,e,t,-1)}function I0(e){return e<0?Math.floor(e):Math.ceil(e)}function cF(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,o,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=I0(am(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Qr(e/1e3),n.seconds=s%60,i=Qr(s/60),n.minutes=i%60,o=Qr(i/60),n.hours=o%24,t+=Qr(o/24),l=Qr(Lk(t)),r+=l,t-=I0(am(l)),a=Qr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function Lk(e){return e*4800/146097}function am(e){return e*146097/4800}function uF(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=on(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Lk(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(am(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 As(e){return function(){return this.as(e)}}var Fk=As("ms"),dF=As("s"),fF=As("m"),hF=As("h"),pF=As("d"),mF=As("w"),gF=As("M"),vF=As("Q"),yF=As("y"),xF=Fk;function wF(){return Nn(this)}function _F(e){return e=on(e),this.isValid()?this[e+"s"]():NaN}function lo(e){return function(){return this.isValid()?this._data[e]:NaN}}var bF=lo("milliseconds"),SF=lo("seconds"),kF=lo("minutes"),CF=lo("hours"),EF=lo("days"),jF=lo("months"),TF=lo("years");function NF(){return Qr(this.days()/7)}var is=Math.round,Lo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function RF(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function PF(e,t,r,n){var s=Nn(e).abs(),i=is(s.as("s")),o=is(s.as("m")),a=is(s.as("h")),l=is(s.as("d")),u=is(s.as("M")),d=is(s.as("w")),f=is(s.as("y")),m=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||o<=1&&["m"]||o<r.m&&["mm",o]||a<=1&&["h"]||a<r.h&&["hh",a]||l<=1&&["d"]||l<r.d&&["dd",l];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,RF.apply(null,m)}function AF(e){return e===void 0?is:typeof e=="function"?(is=e,!0):!1}function DF(e,t){return Lo[e]===void 0?!1:t===void 0?Lo[e]:(Lo[e]=t,e==="s"&&(Lo.ss=t-1),!0)}function OF(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Lo,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Lo,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=PF(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var $h=Math.abs;function wo(e){return(e>0)-(e<0)||+e}function Df(){if(!this.isValid())return this.localeData().invalidDate();var e=$h(this._milliseconds)/1e3,t=$h(this._days),r=$h(this._months),n,s,i,o,a=this.asSeconds(),l,u,d,f;return a?(n=Qr(e/60),s=Qr(n/60),e%=60,n%=60,i=Qr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=wo(this._months)!==wo(a)?"-":"",d=wo(this._days)!==wo(a)?"-":"",f=wo(this._milliseconds)!==wo(a)?"-":"",l+"P"+(i?u+i+"Y":"")+(r?u+r+"M":"")+(t?d+t+"D":"")+(s||n||e?"T":"")+(s?f+s+"H":"")+(n?f+n+"M":"")+(e?f+o+"S":"")):"P0D"}var ot=Pf.prototype;ot.isValid=j4;ot.abs=oF;ot.add=aF;ot.subtract=lF;ot.as=uF;ot.asMilliseconds=Fk;ot.asSeconds=dF;ot.asMinutes=fF;ot.asHours=hF;ot.asDays=pF;ot.asWeeks=mF;ot.asMonths=gF;ot.asQuarters=vF;ot.asYears=yF;ot.valueOf=xF;ot._bubble=cF;ot.clone=wF;ot.get=_F;ot.milliseconds=bF;ot.seconds=SF;ot.minutes=kF;ot.hours=CF;ot.days=EF;ot.weeks=NF;ot.months=jF;ot.years=TF;ot.humanize=OF;ot.toISOString=Df;ot.toString=Df;ot.toJSON=Df;ot.locale=Ck;ot.localeData=jk;ot.toIsoString=sn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Df);ot.lang=Ek;Oe("X",0,0,"unix");Oe("x",0,0,"valueOf");_e("x",jf);_e("X",tL);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
ve.version="2.30.1";MI(kt);ve.fn=ae;ve.min=S4;ve.max=k4;ve.now=C4;ve.utc=Zn;ve.unix=J5;ve.months=tF;ve.isDate=kc;ve.locale=ai;ve.invalid=Sf;ve.duration=Nn;ve.isMoment=Cn;ve.weekdays=nF;ve.parseZone=eF;ve.localeData=Ps;ve.isDuration=Mu;ve.monthsShort=rF;ve.weekdaysMin=iF;ve.defineLocale=kv;ve.updateLocale=e4;ve.locales=t4;ve.weekdaysShort=sF;ve.normalizeUnits=on;ve.relativeTimeRounding=AF;ve.relativeTimeThreshold=DF;ve.calendarFormat=q4;ve.prototype=ae;ve.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 MF=async()=>await it().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),bi=async e=>e.id?await it().collection("access").update(e.id,e):await it().collection("access").create(e),IF=async e=>(e.deleted=ve.utc().format("YYYY-MM-DD HH:mm:ss"),await it().collection("access").update(e.id,e)),L0=async()=>await it().collection("access_groups").getFullList({sort:"-created",expand:"access"}),LF=async e=>{const t=it();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)},FF=async e=>{const t=it();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},F0=async e=>await it().collection("access_groups").update(e.id,e),zF=(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}},UF=async()=>{try{return await it().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},VF=async e=>{const t=it();let r;return e.id?r=await t.collection("settings").update(e.id,e):r=await t.collection("settings").create(e),r},zk=y.createContext({}),Zr=()=>y.useContext(zk),$F=({children:e})=>{const[t,r]=y.useReducer(zF,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const d=await MF();r({type:"SET_ACCESSES",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await UF();r({type:"SET_EMAILS",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await L0();r({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const n=y.useCallback(async()=>{const u=await L0();r({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{r({type:"SET_EMAILS",payload:u})},[]),i=y.useCallback(u=>{r({type:"DELETE_ACCESS",payload:u})},[]),o=y.useCallback(u=>{r({type:"ADD_ACCESS",payload:u})},[]),a=y.useCallback(u=>{r({type:"UPDATE_ACCESS",payload:u})},[]),l=y.useCallback(u=>{r({type:"SET_ACCESS_GROUPS",payload:u})},[]);return c.jsx(zk.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:l,reloadAccessGroups:n},children:e&&e})},BF={theme:"system",setTheme:()=>null},Uk=y.createContext(BF);function WF({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,i]=y.useState(()=>localStorage.getItem(r)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(r,a),i(a)}};return c.jsx(Uk.Provider,{...n,value:o,children:e})}const HF=()=>{const e=y.useContext(Uk);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function YF(){const{setTheme:e}=HF();return c.jsxs(bS,{children:[c.jsx(SS,{asChild:!0,children:c.jsxs(Ge,{variant:"outline",size:"icon",children:[c.jsx(OP,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(AP,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(Qg,{align:"end",children:[c.jsx(Go,{onClick:()=>e("light"),children:"浅色"}),c.jsx(Go,{onClick:()=>e("dark"),children:"暗黑"}),c.jsx(Go,{onClick:()=>e("system"),children:"系统"})]})]})}var ZF="Separator",z0="horizontal",KF=["horizontal","vertical"],Vk=y.forwardRef((e,t)=>{const{decorative:r,orientation:n=z0,...s}=e,i=GF(n)?n:z0,a=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return c.jsx(Le.div,{"data-orientation":i,...a,...s,ref:t})});Vk.displayName=ZF;function GF(e){return KF.includes(e)}var $k=Vk;const Bt=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>c.jsx($k,{ref:s,decorative:r,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Bt.displayName=$k.displayName;const qF="Certimate v0.1.10",Bk=()=>c.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[c.jsx("div",{className:""}),c.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[c.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[c.jsx(wP,{size:16}),c.jsx("div",{className:"ml-1",children:"文档"})]}),c.jsx(Bt,{orientation:"vertical",className:"mx-2"}),c.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:qF})]})]});function XF(){const e=jr(),t=jn();if(!it().authStore.isValid||!it().authStore.isAdmin)return c.jsx(A1,{to:"/login"});const r=t.pathname,n=o=>(console.log(r),o==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{it().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return c.jsx(c.Fragment,{children:c.jsx($F,{children:c.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:[c.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:c.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[c.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:c.jsxs(dr,{to:"/",className:"flex items-center gap-2 font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),c.jsx("div",{className:"flex-1",children:c.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[c.jsxs(dr,{to:"/",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[c.jsx(e0,{className:"h-4 w-4"}),"控制面板"]}),c.jsxs(dr,{to:"/domains",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/domains")),children:[c.jsx(Yp,{className:"h-4 w-4"}),"域名列表"]}),c.jsxs(dr,{to:"/access",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[c.jsx(t0,{className:"h-4 w-4"}),"授权管理"]}),c.jsxs(dr,{to:"/history",className:le("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[c.jsx(Jx,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),c.jsxs("div",{className:"flex flex-col",children:[c.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:[c.jsxs(ov,{children:[c.jsx(av,{asChild:!0,children:c.jsxs(Ge,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[c.jsx(PP,{className:"h-5 w-5 dark:text-white"}),c.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),c.jsx(bf,{side:"left",className:"flex flex-col",children:c.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[c.jsxs(dr,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[c.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),c.jsx("span",{className:"dark:text-white",children:"Certimate"}),c.jsx("span",{className:"sr-only",children:"Certimate"})]}),c.jsxs(dr,{to:"/",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[c.jsx(e0,{className:"h-5 w-5"}),"控制面板"]}),c.jsxs(dr,{to:"/domains",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/domains")),children:[c.jsx(Yp,{className:"h-5 w-5"}),"域名列表"]}),c.jsxs(dr,{to:"/access",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/access")),children:[c.jsx(t0,{className:"h-5 w-5"}),"授权管理"]}),c.jsxs(dr,{to:"/history",className:le("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[c.jsx(Jx,{className:"h-5 w-5"}),"部署历史"]})]})})]}),c.jsx("div",{className:"w-full flex-1"}),c.jsx(YF,{}),c.jsxs(bS,{children:[c.jsx(SS,{asChild:!0,children:c.jsxs(Ge,{variant:"secondary",size:"icon",className:"rounded-full",children:[c.jsx(CP,{className:"h-5 w-5"}),c.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),c.jsxs(Qg,{align:"end",children:[c.jsx(kS,{children:"账户"}),c.jsx(CS,{}),c.jsx(Go,{onClick:i,children:"偏好设置"}),c.jsx(Go,{onClick:s,children:"退出"})]})]})]}),c.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[c.jsx(Cg,{}),c.jsx(Bk,{})]})]})]})})})}const Dv=({phase:e,phaseSuccess:t})=>{let r=c.jsx(c.Fragment,{children:" "});return e==="check"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Bt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Bt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),c.jsx(Bt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),c.jsx(Bt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Bt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Bt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Bt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),c.jsx(Bt,{className:"h-1 grow"}),c.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Bt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Bt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),c.jsx(Bt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),c.jsx(Bt,{className:"h-1 grow bg-green-600"}),c.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r};var QF="VisuallyHidden",Tc=y.forwardRef((e,t)=>c.jsx(Le.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}}));Tc.displayName=QF;var JF=Tc,[Of,dU]=Hr("Tooltip",[Ea]),Mf=Ea(),Wk="TooltipProvider",e3=700,lm="tooltip.open",[t3,Ov]=Of(Wk),Mv=e=>{const{__scopeTooltip:t,delayDuration:r=e3,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=y.useState(!0),l=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(t3,{scope:t,isOpenDelayed:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:i})};Mv.displayName=Wk;var If="Tooltip",[r3,Lf]=Of(If),Hk=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=Ov(If,e.__scopeTooltip),u=Mf(t),[d,f]=y.useState(null),m=xn(),v=y.useRef(0),x=o??l.disableHoverableContent,g=a??l.delayDuration,_=y.useRef(!1),[p=!1,h]=_s({prop:n,defaultProp:s,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(lm))):l.onClose(),i==null||i(R)}}),w=y.useMemo(()=>p?_.current?"delayed-open":"instant-open":"closed",[p]),C=y.useCallback(()=>{window.clearTimeout(v.current),_.current=!1,h(!0)},[h]),E=y.useCallback(()=>{window.clearTimeout(v.current),h(!1)},[h]),j=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{_.current=!0,h(!0)},g)},[g,h]);return y.useEffect(()=>()=>window.clearTimeout(v.current),[]),c.jsx(zg,{...u,children:c.jsx(r3,{scope:t,contentId:m,open:p,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayed?j():C()},[l.isOpenDelayed,j,C]),onTriggerLeave:y.useCallback(()=>{x?E():window.clearTimeout(v.current)},[E,x]),onOpen:C,onClose:E,disableHoverableContent:x,children:r})})};Hk.displayName=If;var cm="TooltipTrigger",Yk=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Lf(cm,r),i=Ov(cm,r),o=Mf(r),a=y.useRef(null),l=Qe(t,a,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(Ug,{asChild:!0,...o,children:c.jsx(Le.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ce(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ce(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ce(e.onBlur,s.onClose),onClick:ce(e.onClick,s.onClose)})})});Yk.displayName=cm;var n3="TooltipPortal",[fU,s3]=Of(n3,{forceMount:void 0}),da="TooltipContent",Iv=y.forwardRef((e,t)=>{const r=s3(da,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Lf(da,e.__scopeTooltip);return c.jsx(yr,{present:n||o.open,children:o.disableHoverableContent?c.jsx(Zk,{side:s,...i,ref:t}):c.jsx(i3,{side:s,...i,ref:t})})}),i3=y.forwardRef((e,t)=>{const r=Lf(da,e.__scopeTooltip),n=Ov(da,e.__scopeTooltip),s=y.useRef(null),i=Qe(t,s),[o,a]=y.useState(null),{trigger:l,onClose:u}=r,d=s.current,{onPointerInTransitChange:f}=n,m=y.useCallback(()=>{a(null),f(!1)},[f]),v=y.useCallback((x,g)=>{const _=x.currentTarget,p={x:x.clientX,y:x.clientY},h=c3(p,_.getBoundingClientRect()),w=u3(p,h),C=d3(g.getBoundingClientRect()),E=h3([...w,...C]);a(E),f(!0)},[f]);return y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{if(l&&d){const x=_=>v(_,d),g=_=>v(_,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[l,d,v,m]),y.useEffect(()=>{if(o){const x=g=>{const _=g.target,p={x:g.clientX,y:g.clientY},h=(l==null?void 0:l.contains(_))||(d==null?void 0:d.contains(_)),w=!f3(p,o);h?m():w&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,o,u,m]),c.jsx(Zk,{...e,ref:i})}),[o3,a3]=Of(If,{isInside:!1}),Zk=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Lf(da,r),u=Mf(r),{onClose:d}=l;return y.useEffect(()=>(document.addEventListener(lm,d),()=>document.removeEventListener(lm,d)),[d]),y.useEffect(()=>{if(l.trigger){const f=m=>{const v=m.target;v!=null&&v.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(Sa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(Vg,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[c.jsx(jg,{children:n}),c.jsx(o3,{scope:r,isInside:!0,children:c.jsx(JF,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Iv.displayName=da;var Kk="TooltipArrow",l3=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Mf(r);return a3(Kk,r).isInside?null:c.jsx($g,{...s,...n,ref:t})});l3.displayName=Kk;function c3(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function u3(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 d3(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 f3(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,d=t[o].y;l>n!=d>n&&r<(u-a)*(n-l)/(d-l)+a&&(s=!s)}return s}function h3(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),p3(t)}function p3(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 i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 m3=Mv,g3=Hk,v3=Yk,Gk=Iv;const y3=m3,qk=g3,Xk=v3,Qk=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Gk,{ref:n,sideOffset:t,className:le("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}));Qk.displayName=Gk.displayName;const Lv=({deployment:e})=>{const t=r=>e.log[r]?e.log[r][e.log[r].length-1].error:"";return c.jsx(c.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?c.jsx(kP,{size:16,className:"text-green-700"}):c.jsx(c.Fragment,{children:t(e.phase).length?c.jsx(y3,{children:c.jsxs(qk,{children:[c.jsx(Xk,{asChild:!0,className:"cursor-pointer",children:c.jsx(Xx,{size:16,className:"text-red-700"})}),c.jsx(Qk,{className:"max-w-[35em]",children:t(e.phase)})]})}):c.jsx(Xx,{size:16,className:"text-red-700"})})})},Jk=({className:e,...t})=>c.jsx("nav",{role:"navigation","aria-label":"pagination",className:le("mx-auto flex w-full justify-center",e),...t});Jk.displayName="Pagination";const eC=y.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,className:le("flex flex-row items-center gap-1",e),...t}));eC.displayName="PaginationContent";const um=y.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,className:le("",e),...t}));um.displayName="PaginationItem";const tC=({className:e,isActive:t,size:r="icon",...n})=>c.jsx("a",{"aria-current":t?"page":void 0,className:le(uf({variant:t?"outline":"ghost",size:r}),e),...n});tC.displayName="PaginationLink";const rC=({className:e,...t})=>c.jsxs("span",{"aria-hidden":!0,className:le("flex h-9 w-9 items-center justify-center",e),...t,children:[c.jsx(jP,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"More pages"})]});rC.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=i(d,f),t>3&&u.unshift("..."),t<m-1&&u.push("..."),u.unshift(1),u.push(e),u}return i(1,e)},i=(a,l,u=1)=>{let d=a;const f=[];for(;d<=l;)f.push(d),d+=u;return f},o=s();return c.jsx(c.Fragment,{children:c.jsx(Jk,{className:"dark:text-stone-200 justify-end mt-3",children:c.jsx(eC,{children:o.map((a,l)=>a==="..."?c.jsx(um,{children:c.jsx(rC,{})},l):c.jsx(um,{children:c.jsx(tC,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),r(a)},children:a})},l))})})})},ea=({when:e,children:t,fallback:r})=>e?t:r;var sC="AlertDialog",[x3,hU]=Hr(sC,[jS]),Ds=jS(),iC=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ds(t);return c.jsx(nv,{...n,...r,modal:!0})};iC.displayName=sC;var w3="AlertDialogTrigger",oC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(sv,{...s,...n,ref:t})});oC.displayName=w3;var _3="AlertDialogPortal",aC=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ds(t);return c.jsx(iv,{...n,...r})};aC.displayName=_3;var b3="AlertDialogOverlay",lC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(wc,{...s,...n,ref:t})});lC.displayName=b3;var ta="AlertDialogContent",[S3,k3]=x3(ta),cC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,i=Ds(r),o=y.useRef(null),a=Qe(t,o),l=y.useRef(null);return c.jsx(uI,{contentName:ta,titleName:uC,docsSlug:"alert-dialog",children:c.jsx(S3,{scope:r,cancelRef:l,children:c.jsxs(_c,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ce(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(jg,{children:n}),c.jsx(E3,{contentRef:o})]})})})});cC.displayName=ta;var uC="AlertDialogTitle",dC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(bc,{...s,...n,ref:t})});dC.displayName=uC;var fC="AlertDialogDescription",hC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(Sc,{...s,...n,ref:t})});hC.displayName=fC;var C3="AlertDialogAction",pC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Ds(r);return c.jsx(_f,{...s,...n,ref:t})});pC.displayName=C3;var mC="AlertDialogCancel",gC=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=k3(mC,r),i=Ds(r),o=Qe(t,s);return c.jsx(_f,{...i,...n,ref:o})});gC.displayName=mC;var E3=({contentRef:e})=>{const t=`\`${ta}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${ta}\` by passing a \`${fC}\` 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 \`${ta}\`. 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 y.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},j3=iC,T3=oC,N3=aC,vC=lC,yC=cC,xC=pC,wC=gC,_C=dC,bC=hC;const SC=j3,kC=T3,R3=N3,CC=y.forwardRef(({className:e,...t},r)=>c.jsx(vC,{className:le("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}));CC.displayName=vC.displayName;const Fv=y.forwardRef(({className:e,...t},r)=>c.jsxs(R3,{children:[c.jsx(CC,{}),c.jsx(yC,{ref:r,className:le("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})]}));Fv.displayName=yC.displayName;const zv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});zv.displayName="AlertDialogHeader";const Uv=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Uv.displayName="AlertDialogFooter";const Vv=y.forwardRef(({className:e,...t},r)=>c.jsx(_C,{ref:r,className:le("text-lg font-semibold",e),...t}));Vv.displayName=_C.displayName;const $v=y.forwardRef(({className:e,...t},r)=>c.jsx(bC,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));$v.displayName=bC.displayName;const Bv=y.forwardRef(({className:e,...t},r)=>c.jsx(xC,{ref:r,className:le(uf(),e),...t}));Bv.displayName=xC.displayName;const Wv=y.forwardRef(({className:e,...t},r)=>c.jsx(wC,{ref:r,className:le(uf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Wv.displayName=wC.displayName;function EC(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Hv="Switch",[P3,pU]=Hr(Hv),[A3,D3]=P3(Hv),jC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:u,...d}=e,[f,m]=y.useState(null),v=Qe(t,h=>m(h)),x=y.useRef(!1),g=f?!!f.closest("form"):!0,[_=!1,p]=_s({prop:s,defaultProp:i,onChange:u});return c.jsxs(A3,{scope:r,checked:_,disabled:a,children:[c.jsx(Le.button,{type:"button",role:"switch","aria-checked":_,"aria-required":o,"data-state":RC(_),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:v,onClick:ce(e.onClick,h=>{p(w=>!w),g&&(x.current=h.isPropagationStopped(),x.current||h.stopPropagation())})}),g&&c.jsx(O3,{control:f,bubbles:!x.current,name:n,value:l,checked:_,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});jC.displayName=Hv;var TC="SwitchThumb",NC=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=D3(TC,r);return c.jsx(Le.span,{"data-state":RC(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});NC.displayName=TC;var O3=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,i=y.useRef(null),o=EC(r),a=sb(t);return y.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==r&&f){const m=new Event("click",{bubbles:n});f.call(l,r),l.dispatchEvent(m)}},[o,r,n]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function RC(e){return e?"checked":"unchecked"}var PC=jC,M3=NC;const AC=y.forwardRef(({className:e,...t},r)=>c.jsx(PC,{className:le("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:c.jsx(M3,{className:le("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")})}));AC.displayName=PC.displayName;var Yv="ToastProvider",[Zv,I3,L3]=df("Toast"),[DC,mU]=Hr("Toast",[L3]),[F3,Ff]=DC(Yv),OC=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=y.useState(null),[u,d]=y.useState(0),f=y.useRef(!1),m=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Yv}\`. Expected non-empty \`string\`.`),c.jsx(Zv.Provider,{scope:t,children:c.jsx(F3,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>d(v=>v+1),[]),onToastRemove:y.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:o})})};OC.displayName=Yv;var MC="ToastViewport",z3=["F8"],dm="toast.viewportPause",fm="toast.viewportResume",IC=y.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=z3,label:s="Notifications ({hotkey})",...i}=e,o=Ff(MC,r),a=I3(r),l=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),m=Qe(t,f,o.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=o.toastCount>0;y.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]),y.useEffect(()=>{const _=l.current,p=f.current;if(x&&_&&p){const h=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(dm);p.dispatchEvent(j),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(fm);p.dispatchEvent(j),o.isClosePausedRef.current=!1}},C=j=>{!_.contains(j.relatedTarget)&&w()},E=()=>{_.contains(document.activeElement)||w()};return _.addEventListener("focusin",h),_.addEventListener("focusout",C),_.addEventListener("pointermove",h),_.addEventListener("pointerleave",E),window.addEventListener("blur",h),window.addEventListener("focus",w),()=>{_.removeEventListener("focusin",h),_.removeEventListener("focusout",C),_.removeEventListener("pointermove",h),_.removeEventListener("pointerleave",E),window.removeEventListener("blur",h),window.removeEventListener("focus",w)}}},[x,o.isClosePausedRef]);const g=y.useCallback(({tabbingDirection:_})=>{const h=a().map(w=>{const C=w.ref.current,E=[C,...Q3(C)];return _==="forwards"?E:E.reverse()});return(_==="forwards"?h.reverse():h).flat()},[a]);return y.useEffect(()=>{const _=f.current;if(_){const p=h=>{var E,j,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){(E=u.current)==null||E.focus();return}const T=g({tabbingDirection:A?"backwards":"forwards"}),F=T.findIndex(b=>b===P);Bh(T.slice(F+1))?h.preventDefault():A?(j=u.current)==null||j.focus():(R=d.current)==null||R.focus()}};return _.addEventListener("keydown",p),()=>_.removeEventListener("keydown",p)}},[a,g]),c.jsxs(DA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&c.jsx(hm,{ref:u,onFocusFromOutsideViewport:()=>{const _=g({tabbingDirection:"forwards"});Bh(_)}}),c.jsx(Zv.Slot,{scope:r,children:c.jsx(Le.ol,{tabIndex:-1,...i,ref:m})}),x&&c.jsx(hm,{ref:d,onFocusFromOutsideViewport:()=>{const _=g({tabbingDirection:"backwards"});Bh(_)}})]})});IC.displayName=MC;var LC="ToastFocusProxy",hm=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=Ff(LC,r);return c.jsx(Tc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});hm.displayName=LC;var zf="Toast",U3="toast.swipeStart",V3="toast.swipeMove",$3="toast.swipeCancel",B3="toast.swipeEnd",FC=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=_s({prop:n,defaultProp:s,onChange:i});return c.jsx(yr,{present:r||a,children:c.jsx(Y3,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Dt(e.onPause),onResume:Dt(e.onResume),onSwipeStart:ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(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:ce(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:ce(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`),l(!1)})})})});FC.displayName=zf;var[W3,H3]=DC(zf,{onClose(){}}),Y3=y.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:v,...x}=e,g=Ff(zf,r),[_,p]=y.useState(null),h=Qe(t,b=>p(b)),w=y.useRef(null),C=y.useRef(null),E=s||g.duration,j=y.useRef(0),R=y.useRef(E),P=y.useRef(0),{onToastAdd:A,onToastRemove:L}=g,q=Dt(()=>{var $;(_==null?void 0:_.contains(document.activeElement))&&(($=g.viewport)==null||$.focus()),o()}),T=y.useCallback(b=>{!b||b===1/0||(window.clearTimeout(P.current),j.current=new Date().getTime(),P.current=window.setTimeout(q,b))},[q]);y.useEffect(()=>{const b=g.viewport;if(b){const $=()=>{T(R.current),u==null||u()},te=()=>{const B=new Date().getTime()-j.current;R.current=R.current-B,window.clearTimeout(P.current),l==null||l()};return b.addEventListener(dm,te),b.addEventListener(fm,$),()=>{b.removeEventListener(dm,te),b.removeEventListener(fm,$)}}},[g.viewport,E,l,u,T]),y.useEffect(()=>{i&&!g.isClosePausedRef.current&&T(E)},[i,E,g.isClosePausedRef,T]),y.useEffect(()=>(A(),()=>L()),[A,L]);const F=y.useMemo(()=>_?HC(_):null,[_]);return g.viewport?c.jsxs(c.Fragment,{children:[F&&c.jsx(Z3,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),c.jsx(W3,{scope:r,onClose:q,children:js.createPortal(c.jsx(Zv.ItemSlot,{scope:r,children:c.jsx(AA,{asChild:!0,onEscapeKeyDown:ce(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||q(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...x,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ce(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:ce(e.onPointerDown,b=>{b.button===0&&(w.current={x:b.clientX,y:b.clientY})}),onPointerMove:ce(e.onPointerMove,b=>{if(!w.current)return;const $=b.clientX-w.current.x,te=b.clientY-w.current.y,B=!!C.current,Z=["left","right"].includes(g.swipeDirection),I=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,Q=Z?I(0,$):0,z=Z?0:I(0,te),V=b.pointerType==="touch"?10:2,fe={x:Q,y:z},ne={originalEvent:b,delta:fe};B?(C.current=fe,pu(V3,f,ne,{discrete:!1})):U0(fe,g.swipeDirection,V)?(C.current=fe,pu(U3,d,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs($)>V||Math.abs(te)>V)&&(w.current=null)}),onPointerUp:ce(e.onPointerUp,b=>{const $=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,w.current=null,$){const B=b.currentTarget,Z={originalEvent:b,delta:$};U0($,g.swipeDirection,g.swipeThreshold)?pu(B3,v,Z,{discrete:!0}):pu($3,m,Z,{discrete:!0}),B.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),Z3=e=>{const{__scopeToast:t,children:r,...n}=e,s=Ff(zf,t),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return q3(()=>o(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(vc,{asChild:!0,children:c.jsx(Tc,{...n,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",r]})})})},K3="ToastTitle",zC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Le.div,{...n,ref:t})});zC.displayName=K3;var G3="ToastDescription",UC=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(Le.div,{...n,ref:t})});UC.displayName=G3;var VC="ToastAction",$C=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(WC,{altText:r,asChild:!0,children:c.jsx(Kv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${VC}\`. Expected non-empty \`string\`.`),null)});$C.displayName=VC;var BC="ToastClose",Kv=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=H3(BC,r);return c.jsx(WC,{asChild:!0,children:c.jsx(Le.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,s.onClose)})})});Kv.displayName=BC;var WC=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return c.jsx(Le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function HC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),X3(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...HC(n))}}),t}function pu(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Ng(s,i):s.dispatchEvent(i)}var U0=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function q3(e=()=>{}){const t=Dt(e);nr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function X3(e){return e.nodeType===e.ELEMENT_NODE}function Q3(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 Bh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var J3=OC,YC=IC,ZC=FC,KC=zC,GC=UC,qC=$C,XC=Kv;const e6=J3,QC=y.forwardRef(({className:e,...t},r)=>c.jsx(YC,{ref:r,className:le("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}));QC.displayName=YC.displayName;const t6=pc("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"}}),JC=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(ZC,{ref:n,className:le(t6({variant:t}),e),...r}));JC.displayName=ZC.displayName;const r6=y.forwardRef(({className:e,...t},r)=>c.jsx(qC,{ref:r,className:le("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}));r6.displayName=qC.displayName;const eE=y.forwardRef(({className:e,...t},r)=>c.jsx(XC,{ref:r,className:le("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:c.jsx(Eg,{className:"h-4 w-4"})}));eE.displayName=XC.displayName;const tE=y.forwardRef(({className:e,...t},r)=>c.jsx(KC,{ref:r,className:le("text-sm font-semibold",e),...t}));tE.displayName=KC.displayName;const rE=y.forwardRef(({className:e,...t},r)=>c.jsx(GC,{ref:r,className:le("text-sm opacity-90",e),...t}));rE.displayName=GC.displayName;const n6=1,s6=1e6;let Wh=0;function i6(){return Wh=(Wh+1)%Number.MAX_SAFE_INTEGER,Wh.toString()}const Hh=new Map,V0=e=>{if(Hh.has(e))return;const t=setTimeout(()=>{Hh.delete(e),ml({type:"REMOVE_TOAST",toastId:e})},s6);Hh.set(e,t)},o6=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,n6)};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?V0(r):e.toasts.forEach(n=>{V0(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)}}},Lu=[];let Fu={toasts:[]};function ml(e){Fu=o6(Fu,e),Lu.forEach(t=>{t(Fu)})}function a6({...e}){const t=i6(),r=s=>ml({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>ml({type:"DISMISS_TOAST",toastId:t});return ml({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Ra(){const[e,t]=y.useState(Fu);return y.useEffect(()=>(Lu.push(t),()=>{const r=Lu.indexOf(t);r>-1&&Lu.splice(r,1)}),[e]),{...e,toast:a6,dismiss:r=>ml({type:"DISMISS_TOAST",toastId:r})}}function Gv(){const{toasts:e}=Ra();return c.jsxs(e6,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return c.jsxs(JC,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(tE,{children:r}),n&&c.jsx(rE,{children:n})]}),s,c.jsx(eE,{})]},t)}),c.jsx(QC,{})]})}function mu(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 nE={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,i){function o(u,d){if(!s[u]){if(!n[u]){var f=typeof mu=="function"&&mu;if(!d&&f)return f(u,!0);if(a)return a(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 g=n[u][1][x];return o(g||x)},v,v.exports,r,n,s,i)}return s[u].exports}for(var a=typeof mu=="function"&&mu,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(r,n,s){var i=r("./utils"),o=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(l){for(var u,d,f,m,v,x,g,_=[],p=0,h=l.length,w=h,C=i.getTypeOf(l)!=="string";p<l.length;)w=h-p,f=C?(u=l[p++],d=p<h?l[p++]:0,p<h?l[p++]:0):(u=l.charCodeAt(p++),d=p<h?l.charCodeAt(p++):0,p<h?l.charCodeAt(p++):0),m=u>>2,v=(3&u)<<4|d>>4,x=1<w?(15&d)<<2|f>>6:64,g=2<w?63&f:64,_.push(a.charAt(m)+a.charAt(v)+a.charAt(x)+a.charAt(g));return _.join("")},s.decode=function(l){var u,d,f,m,v,x,g=0,_=0,p="data:";if(l.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var h,w=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&w--,l.charAt(l.length-2)===a.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=o.uint8array?new Uint8Array(0|w):new Array(0|w);g<l.length;)u=a.indexOf(l.charAt(g++))<<2|(m=a.indexOf(l.charAt(g++)))>>4,d=(15&m)<<4|(v=a.indexOf(l.charAt(g++)))>>2,f=(3&v)<<6|(x=a.indexOf(l.charAt(g++))),h[_++]=u,v!==64&&(h[_++]=d),x!==64&&(h[_++]=f);return h}},{"./support":30,"./utils":32}],2:[function(r,n,s){var i=r("./external"),o=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=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 o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("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 o(i.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 a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},n.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var i=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var i=r("./utils"),o=function(){for(var a,l=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[u]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(u,d,f,m){var v=o,x=m+f;u^=-1;for(var g=m;g<x;g++)u=u>>>8^v[255&(u^d[g])];return-1^u}(0|l,a,a.length,0):function(u,d,f,m){var v=o,x=m+f;u^=-1;for(var g=m;g<x;g++)u=u>>>8^v[255&(u^d.charCodeAt(g))];return-1^u}(0|l,a,a.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 i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),u=i?"uint8array":"array";function d(f,m){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new o[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 i(v,x){var g,_="";for(g=0;g<x;g++)_+=String.fromCharCode(255&v),v>>>=8;return _}function o(v,x,g,_,p,h){var w,C,E=v.file,j=v.compression,R=h!==u.utf8encode,P=a.transformTo("string",h(E.name)),A=a.transformTo("string",u.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",h(L)),T=a.transformTo("string",u.utf8encode(L)),F=A.length!==E.name.length,b=T.length!==L.length,$="",te="",B="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};x&&!g||(Q.crc32=v.crc32,Q.compressedSize=v.compressedSize,Q.uncompressedSize=v.uncompressedSize);var z=0;x&&(z|=8),R||!F&&!b||(z|=2048);var V=0,fe=0;Z&&(V|=16),p==="UNIX"?(fe=798,V|=function(se,Ae){var he=se;return se||(he=Ae?16893:33204),(65535&he)<<16}(E.unixPermissions,Z)):(fe=20,V|=function(se){return 63&(se||0)}(E.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=i(1,1)+i(d(P),4)+A,$+="up"+i(te.length,2)+te),b&&(B=i(1,1)+i(d(q),4)+T,$+="uc"+i(B.length,2)+B);var ne="";return ne+=`
\0`,ne+=i(z,2),ne+=j.magic,ne+=i(w,2),ne+=i(C,2),ne+=i(Q.crc32,4),ne+=i(Q.compressedSize,4),ne+=i(Q.uncompressedSize,4),ne+=i(P.length,2),ne+=i($.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ne+P+$,dirRecord:f.CENTRAL_FILE_HEADER+i(fe,2)+ne+i(q.length,2)+"\0\0\0\0"+i(V,4)+i(_,4)+P+$+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),u=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(v,x,g,_){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=g,this.encodeFileName=_,this.streamFiles=v,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(v){var x=v.meta.percent||0,g=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(v):(this.bytesWritten+=v.data.length,l.prototype.push.call(this,{data:v.data,meta:{currentFile:this.currentFile,percent:g?(x+100*(g-_-1))/g: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 g=o(v,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(v){this.accumulate=!1;var x=this.streamFiles&&!v.file.dir,g=o(v,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),x)this.push({data:function(_){return f.DATA_DESCRIPTOR+i(_.crc32,4)+i(_.compressedSize,4)+i(_.uncompressedSize,4)}(v),meta:{percent:100}});else for(this.push({data:g.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 g=this.bytesWritten-v,_=function(p,h,w,C,E){var j=a.transformTo("string",E(C));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(p,2)+i(p,2)+i(h,4)+i(w,4)+i(j.length,2)+j}(this.dirRecords.length,g,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(g){x.processChunk(g)}),v.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),v.on("error",function(g){x.error(g)}),this},m.prototype.resume=function(){return!!l.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(!l.prototype.error.call(this,v))return!1;for(var g=0;g<x.length;g++)try{x[g].error(v)}catch{}return!0},m.prototype.lock=function(){l.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 i=r("../compressions"),o=r("./ZipFileWorker");s.generateWorker=function(a,l,u){var d=new o(l.streamFiles,u,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,v){f++;var x=function(h,w){var C=h||w,E=i[C];if(!E)throw new Error(C+" is not a valid compression method !");return E}(v.options.compression,l.compression),g=v.options.compressionOptions||l.compressionOptions||{},_=v.dir,p=v.date;v._compressWorker(x,g).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 i(){if(!(this instanceof i))return new i;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 o=new i;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,a){return new i().loadAsync(o,a)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,s){var i=r("./utils"),o=r("./external"),a=r("./utf8"),l=r("./zipEntries"),u=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new o.Promise(function(v,x){var g=m.decompressed.getContentWorker().pipe(new u);g.on("error",function(_){x(_)}).on("end",function(){g.streamInfo.crc32!==m.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):v()}).resume()})}n.exports=function(m,v){var x=this;return v=i.extend(v||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,v.optimizedBinaryString,v.base64).then(function(g){var _=new l(v);return _.load(g),_}).then(function(g){var _=[o.Promise.resolve(g)],p=g.files;if(v.checkCRC32)for(var h=0;h<p.length;h++)_.push(f(p[h]));return o.Promise.all(_)}).then(function(g){for(var _=g.shift(),p=_.files,h=0;h<p.length;h++){var w=p[h],C=w.fileNameStr,E=i.resolve(w.fileNameStr);x.file(E,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(E).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 i=r("../utils"),o=r("../stream/GenericWorker");function a(l,u){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(u)}i.inherits(a,o),a.prototype._bindStream=function(l){var u=this;(this._stream=l).pause(),l.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()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,s){var i=r("readable-stream").Readable;function o(a,l,u){i.call(this,l),this._helper=a;var d=this;a.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(o,i),o.prototype._read=function(){this._helper.resume()},n.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,n,s){function i(E,j,R){var P,A=a.getTypeOf(j),L=a.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&&(E=p(E)),L.createFolders&&(P=_(E))&&h.call(this,P,!0);var q=A==="string"&&L.binary===!1&&L.base64===!1;R&&R.binary!==void 0||(L.binary=!q),(j instanceof f&&j.uncompressedSize===0||L.dir||!j||j.length===0)&&(L.base64=!1,L.binary=!0,j="",L.compression="STORE",A="string");var T=null;T=j instanceof f||j instanceof l?j:x.isNode&&x.isStream(j)?new g(E,j):a.prepareContent(E,j,L.binary,L.optimizedBinaryString,L.base64);var F=new m(E,T,L);this.files[E]=F}var o=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),u=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),v=r("./generate"),x=r("./nodejsUtils"),g=r("./nodejs/NodejsStreamInputAdapter"),_=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var j=E.lastIndexOf("/");return 0<j?E.substring(0,j):""},p=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},h=function(E,j){return j=j!==void 0?j:d.createFolders,E=p(E),this.files[E]||i.call(this,E,null,{dir:!0,createFolders:j}),this.files[E]};function w(E){return Object.prototype.toString.call(E)==="[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(E){var j,R,P;for(j in this.files)P=this.files[j],(R=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&E(R,P)},filter:function(E){var j=[];return this.forEach(function(R,P){E(R,P)&&j.push(P)}),j},file:function(E,j,R){if(arguments.length!==1)return E=this.root+E,i.call(this,E,j,R),this;if(w(E)){var P=E;return this.filter(function(L,q){return!q.dir&&P.test(L)})}var A=this.files[this.root+E];return A&&!A.dir?A:null},folder:function(E){if(!E)return this;if(w(E))return this.filter(function(A,L){return L.dir&&E.test(A)});var j=this.root+E,R=h.call(this,j),P=this.clone();return P.root=R.name,P},remove:function(E){E=this.root+E;var j=this.files[E];if(j||(E.slice(-1)!=="/"&&(E+="/"),j=this.files[E]),j&&!j.dir)delete this.files[E];else for(var R=this.filter(function(A,L){return L.name.slice(0,E.length)===E}),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(E){var j,R={};try{if((R=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.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.");a.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||"";j=v.generateWorker(this,R,P)}catch(A){(j=new l("error")).error(A)}return new u(j,R.type||"string",R.mimeType)},generateAsync:function(E,j){return this.generateInternalStream(E).accumulate(j)},generateNodeStream:function(E,j){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(j)}};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 i=r("./DataReader");function o(a){i.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===u&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&u===m[1]&&d===m[2]&&f===m[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,n,s){var i=r("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,u=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=o},{"../utils":32}],19:[function(r,n,s){var i=r("./Uint8ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var i=r("./DataReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var i=r("./ArrayReader");function o(a){i.call(this,a)}r("../utils").inherits(o,i),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var i=r("../utils"),o=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),u=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||o.uint8array?m==="nodebuffer"?new u(f):o.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new l(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 i=r("./GenericWorker"),o=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var i=r("./GenericWorker"),o=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var i=r("../utils"),o=r("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,s){function i(o){this.name=o||"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}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),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 o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},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 o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},n.exports=i},{}],29:[function(r,n,s){var i=r("../utils"),o=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),u=r("../support"),d=r("../external"),f=null;if(u.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(x,g){return new d.Promise(function(_,p){var h=[],w=x._internalType,C=x._outputType,E=x._mimeType;x.on("data",function(j,R){h.push(j),g&&g(R)}).on("error",function(j){h=[],p(j)}).on("end",function(){try{var j=function(R,P,A){switch(R){case"blob":return i.newBlob(i.transformTo("arraybuffer",P),A);case"base64":return l.encode(P);default:return i.transformTo(R,P)}}(C,function(R,P){var A,L=0,q=null,T=0;for(A=0;A<P.length;A++)T+=P[A].length;switch(R){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(q=new Uint8Array(T),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),E);_(j)}catch(R){p(R)}h=[]}).resume()})}function v(x,g,_){var p=g;switch(g){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=g,this._mimeType=_,i.checkSupport(p),this._worker=x.pipe(new o(p)),x.lock()}catch(h){this._worker=new a("error"),this._worker.error(h)}}v.prototype={accumulate:function(x){return m(this,x)},on:function(x,g){var _=this;return x==="data"?this._worker.on(x,function(p){g.call(_,p.data,p.meta)}):this._worker.on(x,function(){i.delay(g,arguments,_)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(i.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 i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),s.blob=o.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 i=r("./utils"),o=r("./support"),a=r("./nodejsUtils"),l=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(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}s.utf8encode=function(v){return o.nodebuffer?a.newBufferFrom(v,"utf-8"):function(x){var g,_,p,h,w,C=x.length,E=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++),E+=_<128?1:_<2048?2:_<65536?3:4;for(g=o.uint8array?new Uint8Array(E):new Array(E),h=w=0;w<E;h++)(64512&(_=x.charCodeAt(h)))==55296&&h+1<C&&(64512&(p=x.charCodeAt(h+1)))==56320&&(_=65536+(_-55296<<10)+(p-56320),h++),_<128?g[w++]=_:(_<2048?g[w++]=192|_>>>6:(_<65536?g[w++]=224|_>>>12:(g[w++]=240|_>>>18,g[w++]=128|_>>>12&63),g[w++]=128|_>>>6&63),g[w++]=128|63&_);return g}(v)},s.utf8decode=function(v){return o.nodebuffer?i.transformTo("nodebuffer",v).toString("utf-8"):function(x){var g,_,p,h,w=x.length,C=new Array(2*w);for(g=_=0;g<w;)if((p=x[g++])<128)C[_++]=p;else if(4<(h=u[p]))C[_++]=65533,g+=h-1;else{for(p&=h===2?31:h===3?15:7;1<h&&g<w;)p=p<<6|63&x[g++],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=_),i.applyFromCharCode(C)}(v=i.transformTo(o.uint8array?"uint8array":"array",v))},i.inherits(f,l),f.prototype.processChunk=function(v){var x=i.transformTo(o.uint8array?"uint8array":"array",v.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=x;(x=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),x.set(g,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&&(o.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,i.inherits(m,l),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 i=r("./support"),o=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function u(g){return g}function d(g,_){for(var p=0;p<g.length;++p)_[p]=255&g.charCodeAt(p);return _}r("setimmediate"),s.newBlob=function(g,_){s.checkSupport("blob");try{return new Blob([g],{type:_})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(g),p.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(g,_,p){var h=[],w=0,C=g.length;if(C<=p)return String.fromCharCode.apply(null,g);for(;w<C;)_==="array"||_==="nodebuffer"?h.push(String.fromCharCode.apply(null,g.slice(w,Math.min(w+p,C)))):h.push(String.fromCharCode.apply(null,g.subarray(w,Math.min(w+p,C)))),w+=p;return h.join("")},stringifyByChar:function(g){for(var _="",p=0;p<g.length;p++)_+=String.fromCharCode(g[p]);return _},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function m(g){var _=65536,p=s.getTypeOf(g),h=!0;if(p==="uint8array"?h=f.applyCanBeUsed.uint8array:p==="nodebuffer"&&(h=f.applyCanBeUsed.nodebuffer),h)for(;1<_;)try{return f.stringifyByChunk(g,p,_)}catch{_=Math.floor(_/2)}return f.stringifyByChar(g)}function v(g,_){for(var p=0;p<g.length;p++)_[p]=g[p];return _}s.applyFromCharCode=m;var x={};x.string={string:u,array:function(g){return d(g,new Array(g.length))},arraybuffer:function(g){return x.string.uint8array(g).buffer},uint8array:function(g){return d(g,new Uint8Array(g.length))},nodebuffer:function(g){return d(g,a.allocBuffer(g.length))}},x.array={string:m,array:u,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(g)}},x.arraybuffer={string:function(g){return m(new Uint8Array(g))},array:function(g){return v(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:u,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return a.newBufferFrom(new Uint8Array(g))}},x.uint8array={string:m,array:function(g){return v(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:u,nodebuffer:function(g){return a.newBufferFrom(g)}},x.nodebuffer={string:m,array:function(g){return v(g,new Array(g.length))},arraybuffer:function(g){return x.nodebuffer.uint8array(g).buffer},uint8array:function(g){return v(g,new Uint8Array(g.length))},nodebuffer:u},s.transformTo=function(g,_){if(_=_||"",!g)return _;s.checkSupport(g);var p=s.getTypeOf(_);return x[p][g](_)},s.resolve=function(g){for(var _=g.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(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(g)?"nodebuffer":i.uint8array&&g instanceof Uint8Array?"uint8array":i.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(g){if(!i[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(g){var _,p,h="";for(p=0;p<(g||"").length;p++)h+="\\x"+((_=g.charCodeAt(p))<16?"0":"")+_.toString(16).toUpperCase();return h},s.delay=function(g,_,p){setImmediate(function(){g.apply(p||null,_||[])})},s.inherits=function(g,_){function p(){}p.prototype=_.prototype,g.prototype=new p},s.extend=function(){var g,_,p={};for(g=0;g<arguments.length;g++)for(_ in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],_)&&p[_]===void 0&&(p[_]=arguments[g][_]);return p},s.prepareContent=function(g,_,p,h,w){return l.Promise.resolve(_).then(function(C){return i.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,j){var R=new FileReader;R.onload=function(P){E(P.target.result)},R.onerror=function(P){j(P.target.error)},R.readAsArrayBuffer(C)}):C}).then(function(C){var E=s.getTypeOf(C);return E?(E==="arraybuffer"?C=s.transformTo("uint8array",C):E==="string"&&(w?C=o.decode(C):p&&h!==!0&&(C=function(j){return d(j,i.uint8array?new Uint8Array(j.length):new Array(j.length))}(C))),C):l.Promise.reject(new Error("Can't read the data of '"+g+"'. 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 i=r("./reader/readerFor"),o=r("./utils"),a=r("./signature"),l=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 ("+o.pretty(m)+", expected "+o.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=o.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(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({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(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.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(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.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(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.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(a.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,a.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=i(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 i=r("./reader/readerFor"),o=r("./utils"),a=r("./compressedObject"),l=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,g;if(v.skip(22),this.fileNameLength=v.readInt(2),g=v.readInt(2),this.fileName=v.readData(this.fileNameLength),v.skip(g),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 "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(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=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(v){var x,g,_,p=v.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});v.index+4<p;)x=v.readInt(2),g=v.readInt(2),_=v.readData(g),this.extraFields[x]={id:x,length:g,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 g=o.transformTo(v,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var p=o.transformTo(v,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var v=this.extraFields[28789];if(v){var x=i(v.value);return x.readInt(1)!==1||l(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=i(v.value);return x.readInt(1)!==1||l(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 i(x,g,_){this.name=x,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=g,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var o=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),u=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(x){var g=null,_="string";try{if(!x)throw new Error("No output type specified.");var p=(_=x.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),g=this._decompressWorker();var h=!this._dataBinary;h&&!p&&(g=g.pipe(new l.Utf8EncodeWorker)),!h&&p&&(g=g.pipe(new l.Utf8DecodeWorker))}catch(w){(g=new d("error")).error(w)}return new o(g,_,"")},async:function(x,g){return this.internalStream(x).accumulate(g)},nodeStream:function(x,g){return this.internalStream(x||"nodebuffer").toNodejsStream(g)},_compressWorker:function(x,g){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new l.Utf8EncodeWorker)),u.createWorkerFrom(_,x,g)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(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++)i.prototype[f[v]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,s){(function(i){var o,a,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var u=0,d=new l(x),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),o=function(){f.data=u=++u%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var g=i.document.createElement("script");g.onreadystatechange=function(){x(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},i.document.documentElement.appendChild(g)}:function(){setTimeout(x,0)};else{var m=new i.MessageChannel;m.port1.onmessage=x,o=function(){m.port2.postMessage(0)}}var v=[];function x(){var g,_;a=!0;for(var p=v.length;p;){for(_=v,v=[],g=-1;++g<p;)_[g]();p=v.length}a=!1}n.exports=function(g){v.push(g)!==1||a||o()}}).call(this,typeof zc<"u"?zc:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var i=r("immediate");function o(){}var a={},l=["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!==o&&g(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){i(function(){var C;try{C=h(w)}catch(E){return a.reject(p,E)}C===p?a.reject(p,new TypeError("Cannot resolve promise with itself")):a.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 g(p,h){var w=!1;function C(R){w||(w=!0,a.reject(p,R))}function E(R){w||(w=!0,a.resolve(p,R))}var j=_(function(){h(E,C)});j.status==="error"&&C(j.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===l)return this;var w=new this.constructor(o);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){a.resolve(this.promise,p)},m.prototype.otherCallFulfilled=function(p){v(this.promise,this.onFulfilled,p)},m.prototype.callRejected=function(p){a.reject(this.promise,p)},m.prototype.otherCallRejected=function(p){v(this.promise,this.onRejected,p)},a.resolve=function(p,h){var w=_(x,h);if(w.status==="error")return a.reject(p,w.value);var C=w.value;if(C)g(p,C);else{p.state=u,p.outcome=h;for(var E=-1,j=p.queue.length;++E<j;)p.queue[E].callFulfilled(h)}return p},a.reject=function(p,h){p.state=l,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:a.resolve(new this(o),p)},f.reject=function(p){var h=new this(o);return a.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 E=new Array(w),j=0,R=-1,P=new this(o);++R<w;)A(p[R],R);return P;function A(L,q){h.resolve(L).then(function(T){E[q]=T,++j!==w||C||(C=!0,a.resolve(P,E))},function(T){C||(C=!0,a.reject(P,T))})}},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 E=-1,j=new this(o);++E<w;)R=p[E],h.resolve(R).then(function(P){C||(C=!0,a.resolve(j,P))},function(P){C||(C=!0,a.reject(j,P))});var R;return j}},{immediate:36}],38:[function(r,n,s){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,s){var i=r("./zlib/deflate"),o=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),u=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,v=0,x=8;function g(p){if(!(this instanceof g))return new g(p);this.options=o.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=i.deflateInit2(this.strm,h.level,h.method,h.windowBits,h.memLevel,h.strategy);if(w!==f)throw new Error(l[w]);if(h.header&&i.deflateSetHeader(this.strm,h.header),h.dictionary){var C;if(C=typeof h.dictionary=="string"?a.string2buf(h.dictionary):d.call(h.dictionary)==="[object ArrayBuffer]"?new Uint8Array(h.dictionary):h.dictionary,(w=i.deflateSetDictionary(this.strm,C))!==f)throw new Error(l[w]);this._dict_set=!0}}function _(p,h){var w=new g(h);if(w.push(p,!0),w.err)throw w.msg||l[w.err];return w.result}g.prototype.push=function(p,h){var w,C,E=this.strm,j=this.options.chunkSize;if(this.ended)return!1;C=h===~~h?h:h===!0?4:0,typeof p=="string"?E.input=a.string2buf(p):d.call(p)==="[object ArrayBuffer]"?E.input=new Uint8Array(p):E.input=p,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new o.Buf8(j),E.next_out=0,E.avail_out=j),(w=i.deflate(E,C))!==1&&w!==f)return this.onEnd(w),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(E.output,E.next_out))):this.onData(o.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&w!==1);return C===4?(w=i.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===f):C!==2||(this.onEnd(f),!(E.avail_out=0))},g.prototype.onData=function(p){this.chunks.push(p)},g.prototype.onEnd=function(p){p===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Deflate=g,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 i=r("./zlib/inflate"),o=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),u=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function v(g){if(!(this instanceof v))return new v(g);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},g||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||g&&g.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=i.inflateInit2(this.strm,_.windowBits);if(p!==l.Z_OK)throw new Error(u[p]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function x(g,_){var p=new v(_);if(p.push(g,!0),p.err)throw p.msg||u[p.err];return p.result}v.prototype.push=function(g,_){var p,h,w,C,E,j,R=this.strm,P=this.options.chunkSize,A=this.options.dictionary,L=!1;if(this.ended)return!1;h=_===~~_?_:_===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof g=="string"?R.input=a.binstring2buf(g):m.call(g)==="[object ArrayBuffer]"?R.input=new Uint8Array(g):R.input=g,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new o.Buf8(P),R.next_out=0,R.avail_out=P),(p=i.inflate(R,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&A&&(j=typeof A=="string"?a.string2buf(A):m.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,p=i.inflateSetDictionary(this.strm,j)),p===l.Z_BUF_ERROR&&L===!0&&(p=l.Z_OK,L=!1),p!==l.Z_STREAM_END&&p!==l.Z_OK)return this.onEnd(p),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&p!==l.Z_STREAM_END&&(R.avail_in!==0||h!==l.Z_FINISH&&h!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=a.utf8border(R.output,R.next_out),C=R.next_out-w,E=a.buf2string(R.output,w),R.next_out=C,R.avail_out=P-C,C&&o.arraySet(R.output,R.output,w,C,0),this.onData(E)):this.onData(o.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!==l.Z_STREAM_END);return p===l.Z_STREAM_END&&(h=l.Z_FINISH),h===l.Z_FINISH?(p=i.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l.Z_OK):h!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(R.avail_out=0))},v.prototype.onData=function(g){this.chunks.push(g)},v.prototype.onEnd=function(g){g===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Inflate=v,s.inflate=x,s.inflateRaw=function(g,_){return(_=_||{}).raw=!0,x(g,_)},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 i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(l){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)&&(l[f]=d[f])}}return l},s.shrinkBuf=function(l,u){return l.length===u?l:l.subarray?l.subarray(0,u):(l.length=u,l)};var o={arraySet:function(l,u,d,f,m){if(u.subarray&&l.subarray)l.set(u.subarray(d,d+f),m);else for(var v=0;v<f;v++)l[m+v]=u[d+v]},flattenChunks:function(l){var u,d,f,m,v,x;for(u=f=0,d=l.length;u<d;u++)f+=l[u].length;for(x=new Uint8Array(f),u=m=0,d=l.length;u<d;u++)v=l[u],x.set(v,m),m+=v.length;return x}},a={arraySet:function(l,u,d,f,m){for(var v=0;v<f;v++)l[m+v]=u[d+v]},flattenChunks:function(l){return[].concat.apply([],l)}};s.setTyped=function(l){l?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,o)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(i)},{}],42:[function(r,n,s){var i=r("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new i.Buf8(256),u=0;u<256;u++)l[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&&a||!f.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var v="",x=0;x<m;x++)v+=String.fromCharCode(f[x]);return v}l[254]=l[254]=1,s.string2buf=function(f){var m,v,x,g,_,p=f.length,h=0;for(g=0;g<p;g++)(64512&(v=f.charCodeAt(g)))==55296&&g+1<p&&(64512&(x=f.charCodeAt(g+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),g++),h+=v<128?1:v<2048?2:v<65536?3:4;for(m=new i.Buf8(h),g=_=0;_<h;g++)(64512&(v=f.charCodeAt(g)))==55296&&g+1<p&&(64512&(x=f.charCodeAt(g+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),g++),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 i.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,g,_,p=m||f.length,h=new Array(2*p);for(v=x=0;v<p;)if((g=f[v++])<128)h[x++]=g;else if(4<(_=l[g]))h[x++]=65533,v+=_-1;else{for(g&=_===2?31:_===3?15:7;1<_&&v<p;)g=g<<6|63&f[v++],_--;1<_?h[x++]=65533:g<65536?h[x++]=g:(g-=65536,h[x++]=55296|g>>10&1023,h[x++]=56320|1023&g)}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+l[f[v]]>m?v:m}},{"./common":41}],43:[function(r,n,s){n.exports=function(i,o,a,l){for(var u=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+o[l++]|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 i=function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a}();n.exports=function(o,a,l,u){var d=i,f=u+l;o^=-1;for(var m=u;m<f;m++)o=o>>>8^d[255&(o^a[m])];return-1^o}},{}],46:[function(r,n,s){var i,o=r("../utils/common"),a=r("./trees"),l=r("./adler32"),u=r("./crc32"),d=r("./messages"),f=0,m=4,v=0,x=-2,g=-1,_=4,p=2,h=8,w=9,C=286,E=30,j=19,R=2*C+1,P=15,A=3,L=258,q=L+A+1,T=42,F=113,b=1,$=2,te=3,B=4;function Z(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,K=J.pending;K>k.avail_out&&(K=k.avail_out),K!==0&&(o.arraySet(k.output,J.pending_buf,J.pending_out,K,k.next_out),k.next_out+=K,J.pending_out+=K,k.total_out+=K,k.avail_out-=K,J.pending-=K,J.pending===0&&(J.pending_out=0))}function V(k,J){a._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 fe(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 K,D,S=k.max_chain_length,N=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,We=H[N+O-1],Ue=H[N+O];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(K=J)+O]===Ue&&H[K+O-1]===We&&H[K]===H[N]&&H[++K]===H[N+1]){N+=2,K++;do;while(H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&H[++N]===H[++K]&&N<me);if(D=L-(me-N),N=me-L,O<D){if(k.match_start=J,Y<=(O=D))break;We=H[N+O-1],Ue=H[N+O]}}while((J=ee[J&X])>M&&--S!=0);return O<=k.lookahead?O:k.lookahead}function Ae(k){var J,K,D,S,N,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(o.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=K=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--K;);for(J=K=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--K;);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),K=X===0?0:(O.avail_in-=X,o.arraySet(Y,O.input,O.next_in,X,M),O.state.wrap===1?O.adler=l(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+=K,k.lookahead+k.insert>=A)for(N=k.strstart-k.insert,k.ins_h=k.window[N],k.ins_h=(k.ins_h<<k.hash_shift^k.window[N+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[N+A-1])&k.hash_mask,k.prev[N&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=N,N++,k.insert--,!(k.lookahead+k.insert<A)););}while(k.lookahead<q&&k.strm.avail_in!==0)}function he(k,J){for(var K,D;;){if(k.lookahead<q){if(Ae(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(K=0,k.lookahead>=A&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-1])&k.hash_mask,K=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),K!==0&&k.strstart-K<=k.w_size-q&&(k.match_length=se(k,K)),k.match_length>=A)if(D=a._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,K=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=a._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(D&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=k.strstart<A-1?k.strstart:A-1,J===m?(V(k,!0),k.strm.avail_out===0?te:B):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:$}function ye(k,J){for(var K,D,S;;){if(k.lookahead<q){if(Ae(k),k.lookahead<q&&J===f)return b;if(k.lookahead===0)break}if(K=0,k.lookahead>=A&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+A-1])&k.hash_mask,K=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,K!==0&&k.prev_length<k.max_lazy_match&&k.strstart-K<=k.w_size-q&&(k.match_length=se(k,K),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=a._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,K=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&&(V(k,!1),k.strm.avail_out===0))return b}else if(k.match_available){if((D=a._tr_tally(k,0,k.window[k.strstart-1]))&&V(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=a._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?(V(k,!0),k.strm.avail_out===0?te:B):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:$}function ke(k,J,K,D,S){this.good_length=k,this.max_lazy=J,this.nice_length=K,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 o.Buf16(2*R),this.dyn_dtree=new o.Buf16(2*(2*E+1)),this.bl_tree=new o.Buf16(2*(2*j+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 o.Buf16(P+1),this.heap=new o.Buf16(2*C+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.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 De(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?T:F,k.adler=J.wrap===2?0:1,J.last_flush=f,a._tr_init(J),v):Z(k,x)}function Ne(k){var J=De(k);return J===v&&function(K){K.window_size=2*K.w_size,Q(K.head),K.max_lazy_match=i[K.level].max_lazy,K.good_match=i[K.level].good_length,K.nice_match=i[K.level].nice_length,K.max_chain_length=i[K.level].max_chain,K.strstart=0,K.block_start=0,K.lookahead=0,K.insert=0,K.match_length=K.prev_length=A-1,K.match_available=0,K.ins_h=0}(k.state),J}function nt(k,J,K,D,S,N){if(!k)return x;var O=1;if(J===g&&(J=6),D<0?(O=0,D=-D):15<D&&(O=2,D-=16),S<1||w<S||K!==h||D<8||15<D||J<0||9<J||N<0||_<N)return Z(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 o.Buf8(2*Y.w_size),Y.head=new o.Buf16(Y.hash_size),Y.prev=new o.Buf16(Y.w_size),Y.lit_bufsize=1<<S+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new o.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=J,Y.strategy=N,Y.method=K,Ne(k)}i=[new ke(0,0,0,0,function(k,J){var K=65535;for(K>k.pending_buf_size-5&&(K=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ae(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+K;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,V(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-q&&(V(k,!1),k.strm.avail_out===0))return b}return k.insert=0,J===m?(V(k,!0),k.strm.avail_out===0?te:B):(k.strstart>k.block_start&&(V(k,!1),k.strm.avail_out),b)}),new ke(4,4,8,4,he),new ke(4,5,16,8,he),new ke(4,6,32,32,he),new ke(4,4,16,16,ye),new ke(8,16,32,32,ye),new ke(8,16,128,128,ye),new ke(8,32,128,256,ye),new ke(32,128,258,1024,ye),new ke(32,258,258,4096,ye)],s.deflateInit=function(k,J){return nt(k,J,h,15,8,0)},s.deflateInit2=nt,s.deflateReset=Ne,s.deflateResetKeep=De,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 K,D,S,N;if(!k||!k.state||5<J||J<0)return k?Z(k,x):x;if(D=k.state,!k.output||!k.input&&k.avail_in!==0||D.status===666&&J!==m)return Z(k,k.avail_out===0?-5:x);if(D.strm=k,K=D.last_flush,D.last_flush=J,D.status===T)if(D.wrap===2)k.adler=0,fe(D,31),fe(D,139),fe(D,8),D.gzhead?(fe(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)),fe(D,255&D.gzhead.time),fe(D,D.gzhead.time>>8&255),fe(D,D.gzhead.time>>16&255),fe(D,D.gzhead.time>>24&255),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(fe(D,255&D.gzhead.extra.length),fe(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):(fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,0),fe(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),fe(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));)fe(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)){N=1;break}N=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,fe(D,N)}while(N!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),N===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)){N=1;break}N=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,fe(D,N)}while(N!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=u(k.adler,D.pending_buf,D.pending-S,S)),N===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&&(fe(D,255&k.adler),fe(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(K)&&J!==m)return Z(k,-5);if(D.status===666&&k.avail_in!==0)return Z(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&&(Ae(M),M.lookahead===0)){if(H===f)return b;break}if(M.match_length=0,X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:B):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(D,J):D.strategy===3?function(M,H){for(var X,ee,me,We,Ue=M.window;;){if(M.lookahead<=L){if(Ae(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]){We=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<We);M.match_length=L-(We-me),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=A?(X=a._tr_tally(M,1,M.match_length-A),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(X=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),X&&(V(M,!1),M.strm.avail_out===0))return b}return M.insert=0,H===m?(V(M,!0),M.strm.avail_out===0?te:B):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:$}(D,J):i[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===$&&(J===1?a._tr_align(D):J!==5&&(a._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?(fe(D,255&k.adler),fe(D,k.adler>>8&255),fe(D,k.adler>>16&255),fe(D,k.adler>>24&255),fe(D,255&k.total_in),fe(D,k.total_in>>8&255),fe(D,k.total_in>>16&255),fe(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)!==T&&J!==69&&J!==73&&J!==91&&J!==103&&J!==F&&J!==666?Z(k,x):(k.state=null,J===F?Z(k,-3):v):x},s.deflateSetDictionary=function(k,J){var K,D,S,N,O,Y,M,H,X=J.length;if(!k||!k.state||(N=(K=k.state).wrap)===2||N===1&&K.status!==T||K.lookahead)return x;for(N===1&&(k.adler=l(k.adler,J,X,0)),K.wrap=0,X>=K.w_size&&(N===0&&(Q(K.head),K.strstart=0,K.block_start=0,K.insert=0),H=new o.Buf8(K.w_size),o.arraySet(H,J,X-K.w_size,K.w_size,0),J=H,X=K.w_size),O=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ae(K);K.lookahead>=A;){for(D=K.strstart,S=K.lookahead-(A-1);K.ins_h=(K.ins_h<<K.hash_shift^K.window[D+A-1])&K.hash_mask,K.prev[D&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=D,D++,--S;);K.strstart=D,K.lookahead=A-1,Ae(K)}return K.strstart+=K.lookahead,K.block_start=K.strstart,K.insert=K.lookahead,K.lookahead=0,K.match_length=K.prev_length=A-1,K.match_available=0,k.next_in=Y,k.input=M,k.avail_in=O,K.wrap=N,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(i,o){var a,l,u,d,f,m,v,x,g,_,p,h,w,C,E,j,R,P,A,L,q,T,F,b,$;a=i.state,l=i.next_in,b=i.input,u=l+(i.avail_in-5),d=i.next_out,$=i.output,f=d-(o-i.avail_out),m=d+(i.avail_out-257),v=a.dmax,x=a.wsize,g=a.whave,_=a.wnext,p=a.window,h=a.hold,w=a.bits,C=a.lencode,E=a.distcode,j=(1<<a.lenbits)-1,R=(1<<a.distbits)-1;e:do{w<15&&(h+=b[l++]<<w,w+=8,h+=b[l++]<<w,w+=8),P=C[h&j];t:for(;;){if(h>>>=A=P>>>24,w-=A,(A=P>>>16&255)===0)$[d++]=65535&P;else{if(!(16&A)){if(!(64&A)){P=C[(65535&P)+(h&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}L=65535&P,(A&=15)&&(w<A&&(h+=b[l++]<<w,w+=8),L+=h&(1<<A)-1,h>>>=A,w-=A),w<15&&(h+=b[l++]<<w,w+=8,h+=b[l++]<<w,w+=8),P=E[h&R];r:for(;;){if(h>>>=A=P>>>24,w-=A,!(16&(A=P>>>16&255))){if(!(64&A)){P=E[(65535&P)+(h&(1<<A)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(q=65535&P,w<(A&=15)&&(h+=b[l++]<<w,(w+=8)<A&&(h+=b[l++]<<w,w+=8)),v<(q+=h&(1<<A)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(h>>>=A,w-=A,(A=d-f)<q){if(g<(A=q-A)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(F=p,(T=0)===_){if(T+=x-A,A<L){for(L-=A;$[d++]=p[T++],--A;);T=d-q,F=$}}else if(_<A){if(T+=x+_-A,(A-=_)<L){for(L-=A;$[d++]=p[T++],--A;);if(T=0,_<L){for(L-=A=_;$[d++]=p[T++],--A;);T=d-q,F=$}}}else if(T+=_-A,A<L){for(L-=A;$[d++]=p[T++],--A;);T=d-q,F=$}for(;2<L;)$[d++]=F[T++],$[d++]=F[T++],$[d++]=F[T++],L-=3;L&&($[d++]=F[T++],1<L&&($[d++]=F[T++]))}else{for(T=d-q;$[d++]=$[T++],$[d++]=$[T++],$[d++]=$[T++],2<(L-=3););L&&($[d++]=$[T++],1<L&&($[d++]=$[T++]))}break}}break}}while(l<u&&d<m);l-=L=w>>3,h&=(1<<(w-=L<<3))-1,i.next_in=l,i.next_out=d,i.avail_in=l<u?u-l+5:5-(l-u),i.avail_out=d<m?m-d+257:257-(d-m),a.hold=h,a.bits=w}},{}],49:[function(r,n,s){var i=r("../utils/common"),o=r("./adler32"),a=r("./crc32"),l=r("./inffast"),u=r("./inftrees"),d=1,f=2,m=0,v=-2,x=1,g=852,_=592;function p(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(T){var F;return T&&T.state?(F=T.state,T.total_in=T.total_out=F.total=0,T.msg="",F.wrap&&(T.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 i.Buf32(g),F.distcode=F.distdyn=new i.Buf32(_),F.sane=1,F.back=-1,m):v}function C(T){var F;return T&&T.state?((F=T.state).wsize=0,F.whave=0,F.wnext=0,w(T)):v}function E(T,F){var b,$;return T&&T.state?($=T.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?v:($.window!==null&&$.wbits!==F&&($.window=null),$.wrap=b,$.wbits=F,C(T))):v}function j(T,F){var b,$;return T?($=new h,(T.state=$).window=null,(b=E(T,F))!==m&&(T.state=null),b):v}var R,P,A=!0;function L(T){if(A){var F;for(R=new i.Buf32(512),P=new i.Buf32(32),F=0;F<144;)T.lens[F++]=8;for(;F<256;)T.lens[F++]=9;for(;F<280;)T.lens[F++]=7;for(;F<288;)T.lens[F++]=8;for(u(d,T.lens,0,288,R,0,T.work,{bits:9}),F=0;F<32;)T.lens[F++]=5;u(f,T.lens,0,32,P,0,T.work,{bits:5}),A=!1}T.lencode=R,T.lenbits=9,T.distcode=P,T.distbits=5}function q(T,F,b,$){var te,B=T.state;return B.window===null&&(B.wsize=1<<B.wbits,B.wnext=0,B.whave=0,B.window=new i.Buf8(B.wsize)),$>=B.wsize?(i.arraySet(B.window,F,b-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):($<(te=B.wsize-B.wnext)&&(te=$),i.arraySet(B.window,F,b-$,te,B.wnext),($-=te)?(i.arraySet(B.window,F,b-$,$,0),B.wnext=$,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=E,s.inflateResetKeep=w,s.inflateInit=function(T){return j(T,15)},s.inflateInit2=j,s.inflate=function(T,F){var b,$,te,B,Z,I,Q,z,V,fe,ne,se,Ae,he,ye,ke,Fe,De,Ne,nt,k,J,K,D,S=0,N=new i.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return v;(b=T.state).mode===12&&(b.mode=13),Z=T.next_out,te=T.output,Q=T.avail_out,B=T.next_in,$=T.input,I=T.avail_in,z=b.hold,V=b.bits,fe=I,ne=Q,J=m;e:for(;;)switch(b.mode){case x:if(b.wrap===0){b.mode=13;break}for(;V<16;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(2&b.wrap&&z===35615){N[b.check=0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0),V=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){T.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){T.msg="unknown compression method",b.mode=30;break}if(V-=4,k=8+(15&(z>>>=4)),b.wbits===0)b.wbits=k;else if(k>b.wbits){T.msg="invalid window size",b.mode=30;break}b.dmax=1<<k,T.adler=b.check=1,b.mode=512&z?10:12,V=z=0;break;case 2:for(;V<16;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(b.flags=z,(255&b.flags)!=8){T.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){T.msg="unknown header flags set",b.mode=30;break}b.head&&(b.head.text=z>>8&1),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=3;case 3:for(;V<32;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}b.head&&(b.head.time=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,N[2]=z>>>16&255,N[3]=z>>>24&255,b.check=a(b.check,N,4,0)),V=z=0,b.mode=4;case 4:for(;V<16;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}b.head&&(b.head.xflags=255&z,b.head.os=z>>8),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=z=0,b.mode=5;case 5:if(1024&b.flags){for(;V<16;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}b.length=z,b.head&&(b.head.extra_len=z),512&b.flags&&(N[0]=255&z,N[1]=z>>>8&255,b.check=a(b.check,N,2,0)),V=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)),i.arraySet(b.head.extra,$,B,se,k)),512&b.flags&&(b.check=a(b.check,$,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=$[B+se++],b.head&&k&&b.length<65536&&(b.head.name+=String.fromCharCode(k)),k&&se<I;);if(512&b.flags&&(b.check=a(b.check,$,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=$[B+se++],b.head&&k&&b.length<65536&&(b.head.comment+=String.fromCharCode(k)),k&&se<I;);if(512&b.flags&&(b.check=a(b.check,$,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(;V<16;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(z!==(65535&b.check)){T.msg="header crc mismatch",b.mode=30;break}V=z=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),T.adler=b.check=0,b.mode=12;break;case 10:for(;V<32;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}T.adler=b.check=p(z),V=z=0,b.mode=11;case 11:if(b.havedict===0)return T.next_out=Z,T.avail_out=Q,T.next_in=B,T.avail_in=I,b.hold=z,b.bits=V,2;T.adler=b.check=1,b.mode=12;case 12:if(F===5||F===6)break e;case 13:if(b.last){z>>>=7&V,V-=7&V,b.mode=27;break}for(;V<3;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}switch(b.last=1&z,V-=1,3&(z>>>=1)){case 0:b.mode=14;break;case 1:if(L(b),b.mode=20,F!==6)break;z>>>=2,V-=2;break e;case 2:b.mode=17;break;case 3:T.msg="invalid block type",b.mode=30}z>>>=2,V-=2;break;case 14:for(z>>>=7&V,V-=7&V;V<32;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if((65535&z)!=(z>>>16^65535)){T.msg="invalid stored block lengths",b.mode=30;break}if(b.length=65535&z,V=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;i.arraySet(te,$,B,se,Z),I-=se,B+=se,Q-=se,Z+=se,b.length-=se;break}b.mode=12;break;case 17:for(;V<14;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(b.nlen=257+(31&z),z>>>=5,V-=5,b.ndist=1+(31&z),z>>>=5,V-=5,b.ncode=4+(15&z),z>>>=4,V-=4,286<b.nlen||30<b.ndist){T.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(;V<3;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}b.lens[O[b.have++]]=7&z,z>>>=3,V-=3}for(;b.have<19;)b.lens[O[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,K={bits:b.lenbits},J=u(0,b.lens,0,19,b.lencode,0,b.work,K),b.lenbits=K.bits,J){T.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(;ke=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Fe=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(Fe<16)z>>>=ye,V-=ye,b.lens[b.have++]=Fe;else{if(Fe===16){for(D=ye+2;V<D;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(z>>>=ye,V-=ye,b.have===0){T.msg="invalid bit length repeat",b.mode=30;break}k=b.lens[b.have-1],se=3+(3&z),z>>>=2,V-=2}else if(Fe===17){for(D=ye+3;V<D;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}V-=ye,k=0,se=3+(7&(z>>>=ye)),z>>>=3,V-=3}else{for(D=ye+7;V<D;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}V-=ye,k=0,se=11+(127&(z>>>=ye)),z>>>=7,V-=7}if(b.have+se>b.nlen+b.ndist){T.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){T.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,K={bits:b.lenbits},J=u(d,b.lens,0,b.nlen,b.lencode,0,b.work,K),b.lenbits=K.bits,J){T.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,K={bits:b.distbits},J=u(f,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,K),b.distbits=K.bits,J){T.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){T.next_out=Z,T.avail_out=Q,T.next_in=B,T.avail_in=I,b.hold=z,b.bits=V,l(T,ne),Z=T.next_out,te=T.output,Q=T.avail_out,B=T.next_in,$=T.input,I=T.avail_in,z=b.hold,V=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;ke=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Fe=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(ke&&!(240&ke)){for(De=ye,Ne=ke,nt=Fe;ke=(S=b.lencode[nt+((z&(1<<De+Ne)-1)>>De)])>>>16&255,Fe=65535&S,!(De+(ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}z>>>=De,V-=De,b.back+=De}if(z>>>=ye,V-=ye,b.back+=ye,b.length=Fe,ke===0){b.mode=26;break}if(32&ke){b.back=-1,b.mode=12;break}if(64&ke){T.msg="invalid literal/length code",b.mode=30;break}b.extra=15&ke,b.mode=22;case 22:if(b.extra){for(D=b.extra;V<D;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}b.length+=z&(1<<b.extra)-1,z>>>=b.extra,V-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=23;case 23:for(;ke=(S=b.distcode[z&(1<<b.distbits)-1])>>>16&255,Fe=65535&S,!((ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(!(240&ke)){for(De=ye,Ne=ke,nt=Fe;ke=(S=b.distcode[nt+((z&(1<<De+Ne)-1)>>De)])>>>16&255,Fe=65535&S,!(De+(ye=S>>>24)<=V);){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}z>>>=De,V-=De,b.back+=De}if(z>>>=ye,V-=ye,b.back+=ye,64&ke){T.msg="invalid distance code",b.mode=30;break}b.offset=Fe,b.extra=15&ke,b.mode=24;case 24:if(b.extra){for(D=b.extra;V<D;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}b.offset+=z&(1<<b.extra)-1,z>>>=b.extra,V-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){T.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){T.msg="invalid distance too far back",b.mode=30;break}Ae=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),he=b.window}else he=te,Ae=Z-b.offset,se=b.length;for(Q<se&&(se=Q),Q-=se,b.length-=se;te[Z++]=he[Ae++],--se;);b.length===0&&(b.mode=21);break;case 26:if(Q===0)break e;te[Z++]=b.length,Q--,b.mode=21;break;case 27:if(b.wrap){for(;V<32;){if(I===0)break e;I--,z|=$[B++]<<V,V+=8}if(ne-=Q,T.total_out+=ne,b.total+=ne,ne&&(T.adler=b.check=b.flags?a(b.check,te,ne,Z-ne):o(b.check,te,ne,Z-ne)),ne=Q,(b.flags?z:p(z))!==b.check){T.msg="incorrect data check",b.mode=30;break}V=z=0}b.mode=28;case 28:if(b.wrap&&b.flags){for(;V<32;){if(I===0)break e;I--,z+=$[B++]<<V,V+=8}if(z!==(4294967295&b.total)){T.msg="incorrect length check",b.mode=30;break}V=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 T.next_out=Z,T.avail_out=Q,T.next_in=B,T.avail_in=I,b.hold=z,b.bits=V,(b.wsize||ne!==T.avail_out&&b.mode<30&&(b.mode<27||F!==4))&&q(T,T.output,T.next_out,ne-T.avail_out)?(b.mode=31,-4):(fe-=T.avail_in,ne-=T.avail_out,T.total_in+=fe,T.total_out+=ne,b.total+=ne,b.wrap&&ne&&(T.adler=b.check=b.flags?a(b.check,te,ne,T.next_out-ne):o(b.check,te,ne,T.next_out-ne)),T.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(fe==0&&ne===0||F===4)&&J===m&&(J=-5),J)},s.inflateEnd=function(T){if(!T||!T.state)return v;var F=T.state;return F.window&&(F.window=null),T.state=null,m},s.inflateGetHeader=function(T,F){var b;return T&&T.state&&2&(b=T.state).wrap?((b.head=F).done=!1,m):v},s.inflateSetDictionary=function(T,F){var b,$=F.length;return T&&T.state?(b=T.state).wrap!==0&&b.mode!==11?v:b.mode===11&&o(1,F,$,0)!==b.check?-3:q(T,F,$,$)?(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 i=r("../utils/common"),o=[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],a=[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],l=[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,g,_,p){var h,w,C,E,j,R,P,A,L,q=p.bits,T=0,F=0,b=0,$=0,te=0,B=0,Z=0,I=0,Q=0,z=0,V=null,fe=0,ne=new i.Buf16(16),se=new i.Buf16(16),Ae=null,he=0;for(T=0;T<=15;T++)ne[T]=0;for(F=0;F<v;F++)ne[f[m+F]]++;for(te=q,$=15;1<=$&&ne[$]===0;$--);if($<te&&(te=$),$===0)return x[g++]=20971520,x[g++]=20971520,p.bits=1,0;for(b=1;b<$&&ne[b]===0;b++);for(te<b&&(te=b),T=I=1;T<=15;T++)if(I<<=1,(I-=ne[T])<0)return-1;if(0<I&&(d===0||$!==1))return-1;for(se[1]=0,T=1;T<15;T++)se[T+1]=se[T]+ne[T];for(F=0;F<v;F++)f[m+F]!==0&&(_[se[f[m+F]]++]=F);if(R=d===0?(V=Ae=_,19):d===1?(V=o,fe-=257,Ae=a,he-=257,256):(V=l,Ae=u,-1),T=b,j=g,Z=F=z=0,C=-1,E=(Q=1<<(B=te))-1,d===1&&852<Q||d===2&&592<Q)return 1;for(;;){for(P=T-Z,L=_[F]<R?(A=0,_[F]):_[F]>R?(A=Ae[he+_[F]],V[fe+_[F]]):(A=96,0),h=1<<T-Z,b=w=1<<B;x[j+(z>>Z)+(w-=h)]=P<<24|A<<16|L|0,w!==0;);for(h=1<<T-1;z&h;)h>>=1;if(h!==0?(z&=h-1,z+=h):z=0,F++,--ne[T]==0){if(T===$)break;T=f[m+_[F]]}if(te<T&&(z&E)!==C){for(Z===0&&(Z=te),j+=b,I=1<<(B=T-Z);B+Z<$&&!((I-=ne[B+Z])<=0);)B++,I<<=1;if(Q+=1<<B,d===1&&852<Q||d===2&&592<Q)return 1;x[C=z&E]=te<<24|B<<16|j-g|0}}return z!==0&&(x[j+z]=T-Z<<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 i=r("../utils/common"),o=0,a=1;function l(S){for(var N=S.length;0<=--N;)S[N]=0}var u=0,d=29,f=256,m=f+1+d,v=30,x=19,g=2*m+1,_=15,p=16,h=7,w=256,C=16,E=17,j=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));l(q);var T=new Array(2*v);l(T);var F=new Array(512);l(F);var b=new Array(256);l(b);var $=new Array(d);l($);var te,B,Z,I=new Array(v);function Q(S,N,O,Y,M){this.static_tree=S,this.extra_bits=N,this.extra_base=O,this.elems=Y,this.max_length=M,this.has_stree=S&&S.length}function z(S,N){this.dyn_tree=S,this.max_code=0,this.stat_desc=N}function V(S){return S<256?F[S]:F[256+(S>>>7)]}function fe(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,O){S.bi_valid>p-O?(S.bi_buf|=N<<S.bi_valid&65535,fe(S,S.bi_buf),S.bi_buf=N>>p-S.bi_valid,S.bi_valid+=O-p):(S.bi_buf|=N<<S.bi_valid&65535,S.bi_valid+=O)}function se(S,N,O){ne(S,O[2*N],O[2*N+1])}function Ae(S,N){for(var O=0;O|=1&S,S>>>=1,O<<=1,0<--N;);return O>>>1}function he(S,N,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<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ae(H[ee]++,ee))}}function ye(S){var N;for(N=0;N<m;N++)S.dyn_ltree[2*N]=0;for(N=0;N<v;N++)S.dyn_dtree[2*N]=0;for(N=0;N<x;N++)S.bl_tree[2*N]=0;S.dyn_ltree[2*w]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function ke(S){8<S.bi_valid?fe(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,N,O,Y){var M=2*N,H=2*O;return S[M]<S[H]||S[M]===S[H]&&Y[N]<=Y[O]}function De(S,N,O){for(var Y=S.heap[O],M=O<<1;M<=S.heap_len&&(M<S.heap_len&&Fe(N,S.heap[M+1],S.heap[M],S.depth)&&M++,!Fe(N,Y,S.heap[M],S.depth));)S.heap[O]=S.heap[M],O=M,M<<=1;S.heap[O]=Y}function Ne(S,N,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,N):(se(S,(H=b[M])+f+1,N),(X=R[H])!==0&&ne(S,M-=$[H],X),se(S,H=V(--Y),O),(X=P[H])!==0&&ne(S,Y-=I[H],X)),ee<S.last_lit;);se(S,w,N)}function nt(S,N){var O,Y,M,H=N.dyn_tree,X=N.stat_desc.static_tree,ee=N.stat_desc.has_stree,me=N.stat_desc.elems,We=-1;for(S.heap_len=0,S.heap_max=g,O=0;O<me;O++)H[2*O]!==0?(S.heap[++S.heap_len]=We=O,S.depth[O]=0):H[2*O+1]=0;for(;S.heap_len<2;)H[2*(M=S.heap[++S.heap_len]=We<2?++We:0)]=1,S.depth[M]=0,S.opt_len--,ee&&(S.static_len-=X[2*M+1]);for(N.max_code=We,O=S.heap_len>>1;1<=O;O--)De(S,H,O);for(M=me;O=S.heap[1],S.heap[1]=S.heap[S.heap_len--],De(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++,De(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(Ue,Et){var Kr,Ht,qn,at,Xn,Qn,Gr=Et.dyn_tree,Ac=Et.max_code,Dc=Et.stat_desc.static_tree,co=Et.stat_desc.has_stree,Oc=Et.stat_desc.extra_bits,uo=Et.stat_desc.extra_base,Rn=Et.stat_desc.max_length,Os=0;for(at=0;at<=_;at++)Ue.bl_count[at]=0;for(Gr[2*Ue.heap[Ue.heap_max]+1]=0,Kr=Ue.heap_max+1;Kr<g;Kr++)Rn<(at=Gr[2*Gr[2*(Ht=Ue.heap[Kr])+1]+1]+1)&&(at=Rn,Os++),Gr[2*Ht+1]=at,Ac<Ht||(Ue.bl_count[at]++,Xn=0,uo<=Ht&&(Xn=Oc[Ht-uo]),Qn=Gr[2*Ht],Ue.opt_len+=Qn*(at+Xn),co&&(Ue.static_len+=Qn*(Dc[2*Ht+1]+Xn)));if(Os!==0){do{for(at=Rn-1;Ue.bl_count[at]===0;)at--;Ue.bl_count[at]--,Ue.bl_count[at+1]+=2,Ue.bl_count[Rn]--,Os-=2}while(0<Os);for(at=Rn;at!==0;at--)for(Ht=Ue.bl_count[at];Ht!==0;)Ac<(qn=Ue.heap[--Kr])||(Gr[2*qn+1]!==at&&(Ue.opt_len+=(at-Gr[2*qn+1])*Gr[2*qn],Gr[2*qn+1]=at),Ht--)}}(S,N),he(H,We,S.bl_count)}function k(S,N,O){var Y,M,H=-1,X=N[1],ee=0,me=7,We=4;for(X===0&&(me=138,We=3),N[2*(O+1)+1]=65535,Y=0;Y<=O;Y++)M=X,X=N[2*(Y+1)+1],++ee<me&&M===X||(ee<We?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*E]++:S.bl_tree[2*j]++,H=M,We=(ee=0)===X?(me=138,3):M===X?(me=6,3):(me=7,4))}function J(S,N,O){var Y,M,H=-1,X=N[1],ee=0,me=7,We=4;for(X===0&&(me=138,We=3),Y=0;Y<=O;Y++)if(M=X,X=N[2*(Y+1)+1],!(++ee<me&&M===X)){if(ee<We)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,E,S.bl_tree),ne(S,ee-3,3)):(se(S,j,S.bl_tree),ne(S,ee-11,7));H=M,We=(ee=0)===X?(me=138,3):M===X?(me=6,3):(me=7,4)}}l(I);var K=!1;function D(S,N,O,Y){ne(S,(u<<1)+(Y?1:0),3),function(M,H,X,ee){ke(M),fe(M,X),fe(M,~X),i.arraySet(M.pending_buf,M.window,H,X,M.pending),M.pending+=X}(S,N,O)}s._tr_init=function(S){K||(function(){var N,O,Y,M,H,X=new Array(_+1);for(M=Y=0;M<d-1;M++)for($[M]=Y,N=0;N<1<<R[M];N++)b[Y++]=M;for(b[Y-1]=M,M=H=0;M<16;M++)for(I[M]=H,N=0;N<1<<P[M];N++)F[H++]=M;for(H>>=7;M<v;M++)for(I[M]=H<<7,N=0;N<1<<P[M]-7;N++)F[256+H++]=M;for(O=0;O<=_;O++)X[O]=0;for(N=0;N<=143;)q[2*N+1]=8,N++,X[8]++;for(;N<=255;)q[2*N+1]=9,N++,X[9]++;for(;N<=279;)q[2*N+1]=7,N++,X[7]++;for(;N<=287;)q[2*N+1]=8,N++,X[8]++;for(he(q,m+1,X),N=0;N<v;N++)T[2*N+1]=5,T[2*N]=Ae(N,5);te=new Q(q,R,f+1,m,_),B=new Q(T,P,0,v,_),Z=new Q(new Array(0),A,0,x,h)}(),K=!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,Z),S.bi_buf=0,S.bi_valid=0,ye(S)},s._tr_stored_block=D,s._tr_flush_block=function(S,N,O,Y){var M,H,X=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(ee){var me,We=4093624447;for(me=0;me<=31;me++,We>>>=1)if(1&We&&ee.dyn_ltree[2*me]!==0)return o;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(me=32;me<f;me++)if(ee.dyn_ltree[2*me]!==0)return a;return o}(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&&N!==-1?D(S,N,O,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Ne(S,q,T)):(ne(S,4+(Y?1:0),3),function(ee,me,We,Ue){var Et;for(ne(ee,me-257,5),ne(ee,We-1,5),ne(ee,Ue-4,4),Et=0;Et<Ue;Et++)ne(ee,ee.bl_tree[2*L[Et]+1],3);J(ee,ee.dyn_ltree,me-1),J(ee,ee.dyn_dtree,We-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,X+1),Ne(S,S.dyn_ltree,S.dyn_dtree)),ye(S),Y&&ke(S)},s._tr_tally=function(S,N,O){return S.pending_buf[S.d_buf+2*S.last_lit]=N>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&N,S.pending_buf[S.l_buf+S.last_lit]=255&O,S.last_lit++,N===0?S.dyn_ltree[2*O]++:(S.matches++,N--,S.dyn_ltree[2*(b[O]+f+1)]++,S.dyn_dtree[2*V(N)]++),S.last_lit===S.lit_bufsize-1},s._tr_align=function(S){ne(S,2,3),se(S,w,q),function(N){N.bi_valid===16?(fe(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.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(i){(function(o,a){if(!o.setImmediate){var l,u,d,f,m=1,v={},x=!1,g=o.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(o);_=_&&_.setTimeout?_:o,l={}.toString.call(o.process)==="[object process]"?function(C){process.nextTick(function(){h(C)})}:function(){if(o.postMessage&&!o.importScripts){var C=!0,E=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=E,C}}()?(f="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),function(C){o.postMessage(f+C,"*")}):o.MessageChannel?((d=new MessageChannel).port1.onmessage=function(C){h(C.data)},function(C){d.port2.postMessage(C)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(C){var E=g.createElement("script");E.onreadystatechange=function(){h(C),E.onreadystatechange=null,u.removeChild(E),E=null},u.appendChild(E)}):function(C){setTimeout(h,0,C)},_.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),j=0;j<E.length;j++)E[j]=arguments[j+1];var R={callback:C,args:E};return v[m]=R,l(m),m++},_.clearImmediate=p}function p(C){delete v[C]}function h(C){if(x)setTimeout(h,0,C);else{var E=v[C];if(E){x=!0;try{(function(j){var R=j.callback,P=j.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(a,P)}})(E)}finally{p(C),x=!1}}}}function w(C){C.source===o&&typeof C.data=="string"&&C.data.indexOf(f)===0&&h(+C.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof zc<"u"?zc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(nE);var l6=nE.exports;const c6=Em(l6);function u6(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 d6=async(e,t)=>{const r=new c6;t.forEach(i=>{r.file(i.name,i.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},fa=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)},f6=e=>fa(e).split(" ")[0];function sE(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"),i=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${r}-${n}-${s} ${i}:${o}:${a}`}const h6=async e=>{let t=1;e.page&&(t=e.page);let r=2;e.perPage&&(r=e.perPage);const n=it();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=n.filter("expiredAt<{:expiredAt}",{expiredAt:sE(15)})),n.collection("domains").getList(t,r,{sort:"-created",expand:"lastDeployment",filter:s})},p6=async()=>{const e=it(),t=await e.collection("domains").getList(1,1,{}),r=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:sE(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}},m6=async e=>await it().collection("domains").getOne(e),pm=async e=>e.id?await it().collection("domains").update(e.id,e):await it().collection("domains").create(e),g6=async e=>await it().collection("domains").delete(e),v6=(e,t)=>it().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),y6=e=>{it().collection("domains").unsubscribe(e)},x6=()=>{const e=Ra(),t=jr(),r=jn(),n=new URLSearchParams(r.search),s=n.get("page"),i=n.get("state"),[o,a]=y.useState(0),l=()=>{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 g6(w),x(v.filter(C=>C.id!==w))}catch(C){console.error("Error deleting domain:",C)}},[v,x]=y.useState([]);y.useEffect(()=>{(async()=>{const C=await h6({page:s?Number(s):1,perPage:10,state:i||""});x(C.items),a(C.totalPages)})()},[s,i]);const g=async w=>{const C=v.filter(P=>P.id===w),E=C[0].enabled,j=C[0];j.enabled=!E,await pm(j);const R=v.map(P=>P.id===w?{...P,checked:!E}:P);x(R)},_=async w=>{try{y6(w.id),v6(w.id,C=>{console.log(C);const E=v.map(j=>j.id===C.id?{...C}:j);x(E)}),w.rightnow=!0,await pm(w),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:c.jsxs(c.Fragment,{children:["执行失败,请查看",c.jsx(dr,{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`,E=[{name:`${w.domain}.pem`,content:w.certificate?w.certificate:""},{name:`${w.domain}.key`,content:w.privateKey?w.privateKey:""}];await d6(C,E)};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Gv,{}),c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),c.jsx(Ge,{onClick:l,children:"新增域名"})]}),v.length?c.jsxs(c.Fragment,{children:[c.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:[c.jsx("div",{className:"w-36",children:"域名"}),c.jsx("div",{className:"w-40",children:"有效期限"}),c.jsx("div",{className:"w-32",children:"最近执行状态"}),c.jsx("div",{className:"w-64",children:"最近执行阶段"}),c.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),c.jsx("div",{className:"w-24",children:"是否启用"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),v.map(w=>{var C,E,j,R;return c.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:[c.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center",children:w.domain}),c.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx("div",{children:w.expiredAt?c.jsxs(c.Fragment,{children:[c.jsx("div",{children:"有效期90天"}),c.jsxs("div",{children:[f6(w.expiredAt),"到期"]})]}):"---"})}),c.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)?c.jsx(c.Fragment,{children:c.jsx(Lv,{deployment:w.expand.lastDeployment})}):"---"}),c.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:w.lastDeployedAt&&((E=w.expand)!=null&&E.lastDeployment)?c.jsx(Dv,{phase:(j=w.expand.lastDeployment)==null?void 0:j.phase,phaseSuccess:(R=w.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),c.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:w.lastDeployedAt?fa(w.lastDeployedAt):"---"}),c.jsx("div",{className:"sm:w-24 flex items-center",children:c.jsx(Mv,{children:c.jsxs(qk,{children:[c.jsx(Xk,{children:c.jsx(AC,{checked:w.enabled,onCheckedChange:()=>{g(w.id)}})}),c.jsx(Iv,{children:c.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:w.enabled?"禁用":"启用"})})]})})}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(Ge,{variant:"link",className:"p-0",onClick:()=>f(w.id),children:"部署历史"}),c.jsxs(ea,{when:!!w.enabled,children:[c.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Ge,{variant:"link",className:"p-0",onClick:()=>_(w),children:"立即部署"})]}),c.jsxs(ea,{when:!!(w.enabled&&w.deployed),children:[c.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Ge,{variant:"link",className:"p-0",onClick:()=>p(w),children:"强行部署"})]}),c.jsxs(ea,{when:!!w.expiredAt,children:[c.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Ge,{variant:"link",className:"p-0",onClick:()=>h(w),children:"下载"})]}),!w.enabled&&c.jsxs(c.Fragment,{children:[c.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsxs(SC,{children:[c.jsx(kC,{asChild:!0,children:c.jsx(Ge,{variant:"link",className:"p-0",children:"删除"})}),c.jsxs(Fv,{children:[c.jsxs(zv,{children:[c.jsx(Vv,{children:"删除域名"}),c.jsx($v,{children:"确定要删除域名吗?"})]}),c.jsxs(Uv,{children:[c.jsx(Wv,{children:"取消"}),c.jsx(Bv,{onClick:()=>{m(w.id)},children:"确认"})]})]})]}),c.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Ge,{variant:"link",className:"p-0",onClick:()=>d(w.id),children:"编辑"})]})]})]},w.id)}),c.jsx(nC,{totalPages:o,currentPage:s?Number(s):1,onPageChange:w=>{u(w)}})]}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Yp,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(Ge,{onClick:l,className:"mt-3",children:"添加域名"})]})})]})})},Ie=y.forwardRef(({className:e,type:t,...r},n)=>c.jsx("input",{type:t,className:le("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}));Ie.displayName="Input";var Nc=e=>e.type==="checkbox",Fo=e=>e instanceof Date,hr=e=>e==null;const iE=e=>typeof e=="object";var qt=e=>!hr(e)&&!Array.isArray(e)&&iE(e)&&!Fo(e),oE=e=>qt(e)&&e.target?Nc(e.target)?e.target.checked:e.target.value:e,w6=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,aE=(e,t)=>e.has(w6(t)),_6=e=>{const t=e.constructor&&e.constructor.prototype;return qt(t)&&t.hasOwnProperty("isPrototypeOf")},qv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _r(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(!(qv&&(e instanceof Blob||e instanceof FileList))&&(r||qt(e)))if(t=r?[]:{},!r&&!_6(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=_r(e[n]));else return e;return t}var Uf=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,ue=(e,t,r)=>{if(!t||!qt(e))return r;const n=Uf(t.split(/[,[\].]+?/)).reduce((s,i)=>hr(s)?s:s[i],e);return Ft(n)||n===e?Ft(e[t])?r:e[t]:n},Ln=e=>typeof e=="boolean",Xv=e=>/^\w*$/.test(e),lE=e=>Uf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ft=(e,t,r)=>{let n=-1;const s=Xv(t)?[t]:lE(t),i=s.length,o=i-1;for(;++n<i;){const a=s[n];let l=r;if(n!==o){const u=e[a];l=qt(u)||Array.isArray(u)?u:isNaN(+s[n+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const Cd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},pn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},rs={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},cE=tt.createContext(null),Vf=()=>tt.useContext(cE),b6=e=>{const{children:t,...r}=e;return tt.createElement(cE.Provider,{value:r},t)};var uE=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==pn.all&&(t._proxyFormState[o]=!n||pn.all),r&&(r[o]=!0),e[o]}});return s},Dr=e=>qt(e)&&!Object.keys(e).length,dE=(e,t,r,n)=>{r(e);const{name:s,...i}=e;return Dr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||pn.all))},gl=e=>Array.isArray(e)?e:[e],fE=(e,t,r)=>!e||!t||e===t||gl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Qv(e){const t=tt.useRef(e);t.current=e,tt.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function S6(e){const t=Vf(),{control:r=t.control,disabled:n,name:s,exact:i}=e||{},[o,a]=tt.useState(r._formState),l=tt.useRef(!0),u=tt.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=tt.useRef(s);return d.current=s,Qv({disabled:n,next:f=>l.current&&fE(d.current,f.name,i)&&dE(f,u.current,r._updateFormState)&&a({...r._formState,...f}),subject:r._subjects.state}),tt.useEffect(()=>(l.current=!0,u.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),uE(o,r,u.current,!1)}var zn=e=>typeof e=="string",hE=(e,t,r,n,s)=>zn(e)?(n&&t.watch.add(e),ue(r,e,s)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),ue(r,i))):(n&&(t.watchAll=!0),r);function k6(e){const t=Vf(),{control:r=t.control,name:n,defaultValue:s,disabled:i,exact:o}=e||{},a=tt.useRef(n);a.current=n,Qv({disabled:i,subject:r._subjects.values,next:d=>{fE(a.current,d.name,o)&&u(_r(hE(a.current,r._names,d.values||r._formValues,!1,s)))}});const[l,u]=tt.useState(r._getWatch(n,s));return tt.useEffect(()=>r._removeUnmounted()),l}function C6(e){const t=Vf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:i}=e,o=aE(s._names.array,r),a=k6({control:s,name:r,defaultValue:ue(s._formValues,r,ue(s._defaultValues,r,e.defaultValue)),exact:!0}),l=S6({control:s,name:r}),u=tt.useRef(s.register(r,{...e.rules,value:a,...Ln(e.disabled)?{disabled:e.disabled}:{}}));return tt.useEffect(()=>{const d=s._options.shouldUnregister||i,f=(m,v)=>{const x=ue(s._fields,m);x&&x._f&&(x._f.mount=v)};if(f(r,!0),d){const m=_r(ue(s._options.defaultValues,r));ft(s._defaultValues,r,m),Ft(ue(s._formValues,r))&&ft(s._formValues,r,m)}return()=>{(o?d&&!s._state.action:d)?s.unregister(r):f(r,!1)}},[r,s,o,i]),tt.useEffect(()=>{ue(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:ue(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Ln(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:tt.useCallback(d=>u.current.onChange({target:{value:oE(d),name:r},type:Cd.CHANGE}),[r]),onBlur:tt.useCallback(()=>u.current.onBlur({target:{value:ue(s._formValues,r),name:r},type:Cd.BLUR}),[r,s]),ref:d=>{const f=ue(s._fields,r);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:m=>d.setCustomValidity(m),reportValidity:()=>d.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ue(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!ue(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ue(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!ue(l.validatingFields,r)},error:{enumerable:!0,get:()=>ue(l.errors,r)}})}}const E6=e=>e.render(C6(e));var pE=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},$0=e=>({isOnSubmit:!e||e===pn.onSubmit,isOnBlur:e===pn.onBlur,isOnChange:e===pn.onChange,isOnAll:e===pn.all,isOnTouch:e===pn.onTouched}),B0=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const vl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const i=ue(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!n)break;if(o.ref&&t(o.ref,o.name)&&!n)break;vl(a,t)}else qt(a)&&vl(a,t)}}};var j6=(e,t,r)=>{const n=gl(ue(e,r));return ft(n,"root",t[r]),ft(e,r,n),e},Jv=e=>e.type==="file",Qs=e=>typeof e=="function",Ed=e=>{if(!qv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},zu=e=>zn(e),ey=e=>e.type==="radio",jd=e=>e instanceof RegExp;const W0={value:!1,isValid:!1},H0={value:!0,isValid:!0};var mE=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===""?H0:{value:e[0].value,isValid:!0}:H0:W0}return W0};const Y0={isValid:!1,value:null};var gE=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Y0):Y0;function Z0(e,t,r="validate"){if(zu(e)||Array.isArray(e)&&e.every(zu)||Ln(e)&&!e)return{type:r,message:zu(e)?e:"",ref:t}}var _o=e=>qt(e)&&!jd(e)?e:{value:e,message:""},K0=async(e,t,r,n,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:u,min:d,max:f,pattern:m,validate:v,name:x,valueAsNumber:g,mount:_,disabled:p}=e._f,h=ue(t,x);if(!_||p)return{};const w=o?o[0]:i,C=T=>{n&&w.reportValidity&&(w.setCustomValidity(Ln(T)?"":T||""),w.reportValidity())},E={},j=ey(i),R=Nc(i),P=j||R,A=(g||Jv(i))&&Ft(i.value)&&Ft(h)||Ed(i)&&i.value===""||h===""||Array.isArray(h)&&!h.length,L=pE.bind(null,x,r,E),q=(T,F,b,$=rs.maxLength,te=rs.minLength)=>{const B=T?F:b;E[x]={type:T?$:te,message:B,ref:i,...L(T?$:te,B)}};if(s?!Array.isArray(h)||!h.length:a&&(!P&&(A||hr(h))||Ln(h)&&!h||R&&!mE(o).isValid||j&&!gE(o).isValid)){const{value:T,message:F}=zu(a)?{value:!!a,message:a}:_o(a);if(T&&(E[x]={type:rs.required,message:F,ref:w,...L(rs.required,F)},!r))return C(F),E}if(!A&&(!hr(d)||!hr(f))){let T,F;const b=_o(f),$=_o(d);if(!hr(h)&&!isNaN(h)){const te=i.valueAsNumber||h&&+h;hr(b.value)||(T=te>b.value),hr($.value)||(F=te<$.value)}else{const te=i.valueAsDate||new Date(h),B=Q=>new Date(new Date().toDateString()+" "+Q),Z=i.type=="time",I=i.type=="week";zn(b.value)&&h&&(T=Z?B(h)>B(b.value):I?h>b.value:te>new Date(b.value)),zn($.value)&&h&&(F=Z?B(h)<B($.value):I?h<$.value:te<new Date($.value))}if((T||F)&&(q(!!T,b.message,$.message,rs.max,rs.min),!r))return C(E[x].message),E}if((l||u)&&!A&&(zn(h)||s&&Array.isArray(h))){const T=_o(l),F=_o(u),b=!hr(T.value)&&h.length>+T.value,$=!hr(F.value)&&h.length<+F.value;if((b||$)&&(q(b,T.message,F.message),!r))return C(E[x].message),E}if(m&&!A&&zn(h)){const{value:T,message:F}=_o(m);if(jd(T)&&!h.match(T)&&(E[x]={type:rs.pattern,message:F,ref:i,...L(rs.pattern,F)},!r))return C(F),E}if(v){if(Qs(v)){const T=await v(h,t),F=Z0(T,w);if(F&&(E[x]={...F,...L(rs.validate,F.message)},!r))return C(F.message),E}else if(qt(v)){let T={};for(const F in v){if(!Dr(T)&&!r)break;const b=Z0(await v[F](h,t),w,F);b&&(T={...b,...L(F,b.message)},C(b.message),r&&(E[x]=T))}if(!Dr(T)&&(E[x]={ref:w,...T},!r))return E}}return C(!0),E};function T6(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 N6(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:Xv(t)?[t]:lE(t),n=r.length===1?e:T6(e,r),s=r.length-1,i=r[s];return n&&delete n[i],s!==0&&(qt(n)&&Dr(n)||Array.isArray(n)&&N6(n))&&Yt(e,r.slice(0,-1)),e}var Yh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},Td=e=>hr(e)||!iE(e);function Ui(e,t){if(Td(e)||Td(t))return e===t;if(Fo(e)&&Fo(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 i=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const o=t[s];if(Fo(i)&&Fo(o)||qt(i)&&qt(o)||Array.isArray(i)&&Array.isArray(o)?!Ui(i,o):i!==o)return!1}}return!0}var vE=e=>e.type==="select-multiple",R6=e=>ey(e)||Nc(e),Zh=e=>Ed(e)&&e.isConnected,yE=e=>{for(const t in e)if(Qs(e[t]))return!0;return!1};function Nd(e,t={}){const r=Array.isArray(e);if(qt(e)||r)for(const n in e)Array.isArray(e[n])||qt(e[n])&&!yE(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Nd(e[n],t[n])):hr(e[n])||(t[n]=!0);return t}function xE(e,t,r){const n=Array.isArray(e);if(qt(e)||n)for(const s in e)Array.isArray(e[s])||qt(e[s])&&!yE(e[s])?Ft(t)||Td(r[s])?r[s]=Array.isArray(e[s])?Nd(e[s],[]):{...Nd(e[s])}:xE(e[s],hr(t)?{}:t[s],r[s]):r[s]=!Ui(e[s],t[s]);return r}var gu=(e,t)=>xE(e,t,Nd(t)),wE=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Ft(e)?e:t?e===""?NaN:e&&+e:r&&zn(e)?new Date(e):n?n(e):e;function Kh(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Jv(t)?t.files:ey(t)?gE(e.refs).value:vE(t)?[...t.selectedOptions].map(({value:r})=>r):Nc(t)?mE(e.refs).value:wE(Ft(t.value)?e.ref.value:t.value,e)}var P6=(e,t,r,n)=>{const s={};for(const i of e){const o=ue(t,i);o&&ft(s,i,o._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ka=e=>Ft(e)?e:jd(e)?e.source:qt(e)?jd(e.value)?e.value.source:e.value:e,A6=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function G0(e,t,r){const n=ue(e,r);if(n||Xv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const i=s.join("."),o=ue(t,i),a=ue(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:r}}var D6=(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,O6=(e,t)=>!Uf(ue(e,t)).length&&Yt(e,t);const M6={mode:pn.onSubmit,reValidateMode:pn.onChange,shouldFocusError:!0};function I6(e={}){let t={...M6,...e},r={submitCount:0,isDirty:!1,isLoading:Qs(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)?_r(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:_r(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Yh(),array:Yh(),state:Yh()},m=$0(t.mode),v=$0(t.reValidateMode),x=t.criteriaMode===pn.all,g=S=>N=>{clearTimeout(u),u=setTimeout(S,N)},_=async S=>{if(d.isValid||S){const N=t.resolver?Dr((await P()).errors):await L(n,!0);N!==r.isValid&&f.state.next({isValid:N})}},p=(S,N)=>{(d.isValidating||d.validatingFields)&&((S||Array.from(a.mount)).forEach(O=>{O&&(N?ft(r.validatingFields,O,N):Yt(r.validatingFields,O))}),f.state.next({validatingFields:r.validatingFields,isValidating:!Dr(r.validatingFields)}))},h=(S,N=[],O,Y,M=!0,H=!0)=>{if(Y&&O){if(o.action=!0,H&&Array.isArray(ue(n,S))){const X=O(ue(n,S),Y.argA,Y.argB);M&&ft(n,S,X)}if(H&&Array.isArray(ue(r.errors,S))){const X=O(ue(r.errors,S),Y.argA,Y.argB);M&&ft(r.errors,S,X),O6(r.errors,S)}if(d.touchedFields&&H&&Array.isArray(ue(r.touchedFields,S))){const X=O(ue(r.touchedFields,S),Y.argA,Y.argB);M&&ft(r.touchedFields,S,X)}d.dirtyFields&&(r.dirtyFields=gu(s,i)),f.state.next({name:S,isDirty:T(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ft(i,S,N)},w=(S,N)=>{ft(r.errors,S,N),f.state.next({errors:r.errors})},C=S=>{r.errors=S,f.state.next({errors:r.errors,isValid:!1})},E=(S,N,O,Y)=>{const M=ue(n,S);if(M){const H=ue(i,S,Ft(O)?ue(s,S):O);Ft(H)||Y&&Y.defaultChecked||N?ft(i,S,N?H:Kh(M._f)):$(S,H),o.mount&&_()}},j=(S,N,O,Y,M)=>{let H=!1,X=!1;const ee={name:S},me=!!(ue(n,S)&&ue(n,S)._f&&ue(n,S)._f.disabled);if(!O||Y){d.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=T(),H=X!==ee.isDirty);const We=me||Ui(ue(s,S),N);X=!!(!me&&ue(r.dirtyFields,S)),We||me?Yt(r.dirtyFields,S):ft(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||d.dirtyFields&&X!==!We}if(O){const We=ue(r.touchedFields,S);We||(ft(r.touchedFields,S,O),ee.touchedFields=r.touchedFields,H=H||d.touchedFields&&We!==O)}return H&&M&&f.state.next(ee),H?ee:{}},R=(S,N,O,Y)=>{const M=ue(r.errors,S),H=d.isValid&&Ln(N)&&r.isValid!==N;if(e.delayError&&O?(l=g(()=>w(S,O)),l(e.delayError)):(clearTimeout(u),l=null,O?ft(r.errors,S,O):Yt(r.errors,S)),(O?!Ui(M,O):M)||!Dr(Y)||H){const X={...Y,...H&&Ln(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},f.state.next(X)}},P=async S=>{p(S,!0);const N=await t.resolver(i,t.context,P6(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return p(S),N},A=async S=>{const{errors:N}=await P(S);if(S)for(const O of S){const Y=ue(N,O);Y?ft(r.errors,O,Y):Yt(r.errors,O)}else r.errors=N;return N},L=async(S,N,O={valid:!0})=>{for(const Y in S){const M=S[Y];if(M){const{_f:H,...X}=M;if(H){const ee=a.array.has(H.name);p([Y],!0);const me=await K0(M,i,x,t.shouldUseNativeValidation&&!N,ee);if(p([Y]),me[H.name]&&(O.valid=!1,N))break;!N&&(ue(me,H.name)?ee?j6(r.errors,me,H.name):ft(r.errors,H.name,me[H.name]):Yt(r.errors,H.name))}X&&await L(X,N,O)}}return O.valid},q=()=>{for(const S of a.unMount){const N=ue(n,S);N&&(N._f.refs?N._f.refs.every(O=>!Zh(O)):!Zh(N._f.ref))&&Ae(S)}a.unMount=new Set},T=(S,N)=>(S&&N&&ft(i,S,N),!Ui(z(),s)),F=(S,N,O)=>hE(S,a,{...o.mount?i:Ft(N)?s:zn(S)?{[S]:N}:N},O,N),b=S=>Uf(ue(o.mount?i:s,S,e.shouldUnregister?ue(s,S,[]):[])),$=(S,N,O={})=>{const Y=ue(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&ft(i,S,wE(N,H)),M=Ed(H.ref)&&hr(N)?"":N,vE(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?Nc(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):Jv(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||f.values.next({name:S,values:{...i}})))}(O.shouldDirty||O.shouldTouch)&&j(S,M,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Q(S)},te=(S,N,O)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=ue(n,H);(a.array.has(S)||!Td(M)||X&&!X._f)&&!Fo(M)?te(H,M,O):$(H,M,O)}},B=(S,N,O={})=>{const Y=ue(n,S),M=a.array.has(S),H=_r(N);ft(i,S,H),M?(f.array.next({name:S,values:{...i}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:S,dirtyFields:gu(s,i),isDirty:T(S,H)})):Y&&!Y._f&&!hr(H)?te(S,H,O):$(S,H,O),B0(S,a)&&f.state.next({...r}),f.values.next({name:o.mount?S:void 0,values:{...i}})},Z=async S=>{o.mount=!0;const N=S.target;let O=N.name,Y=!0;const M=ue(n,O),H=()=>N.type?Kh(M._f):oE(S),X=ee=>{Y=Number.isNaN(ee)||ee===ue(i,O,ee)};if(M){let ee,me;const We=H(),Ue=S.type===Cd.BLUR||S.type===Cd.FOCUS_OUT,Et=!A6(M._f)&&!t.resolver&&!ue(r.errors,O)&&!M._f.deps||D6(Ue,ue(r.touchedFields,O),r.isSubmitted,v,m),Kr=B0(O,a,Ue);ft(i,O,We),Ue?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const Ht=j(O,We,Ue,!1),qn=!Dr(Ht)||Kr;if(!Ue&&f.values.next({name:O,type:S.type,values:{...i}}),Et)return d.isValid&&_(),qn&&f.state.next({name:O,...Kr?{}:Ht});if(!Ue&&Kr&&f.state.next({...r}),t.resolver){const{errors:at}=await P([O]);if(X(We),Y){const Xn=G0(r.errors,n,O),Qn=G0(at,n,Xn.name||O);ee=Qn.error,O=Qn.name,me=Dr(at)}}else p([O],!0),ee=(await K0(M,i,x,t.shouldUseNativeValidation))[O],p([O]),X(We),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,N)=>{if(ue(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let O,Y;const M=gl(S);if(t.resolver){const H=await A(Ft(S)?S:M);O=Dr(H),Y=S?!M.some(X=>ue(H,X)):O}else S?(Y=(await Promise.all(M.map(async H=>{const X=ue(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({...!zn(S)||d.isValid&&O!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:O}:{},errors:r.errors}),N.shouldFocus&&!Y&&vl(n,I,S?M:a.mount),Y},z=S=>{const N={...o.mount?i:s};return Ft(S)?N:zn(S)?ue(N,S):S.map(O=>ue(N,O))},V=(S,N)=>({invalid:!!ue((N||r).errors,S),isDirty:!!ue((N||r).dirtyFields,S),error:ue((N||r).errors,S),isValidating:!!ue(r.validatingFields,S),isTouched:!!ue((N||r).touchedFields,S)}),fe=S=>{S&&gl(S).forEach(N=>Yt(r.errors,N)),f.state.next({errors:S?r.errors:{}})},ne=(S,N,O)=>{const Y=(ue(n,S,{_f:{}})._f||{}).ref,M=ue(r.errors,S)||{},{ref:H,message:X,type:ee,...me}=M;ft(r.errors,S,{...me,...N,ref:Y}),f.state.next({name:S,errors:r.errors,isValid:!1}),O&&O.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>Qs(S)?f.values.subscribe({next:O=>S(F(void 0,N),O)}):F(S,N,!0),Ae=(S,N={})=>{for(const O of S?gl(S):a.mount)a.mount.delete(O),a.array.delete(O),N.keepValue||(Yt(n,O),Yt(i,O)),!N.keepError&&Yt(r.errors,O),!N.keepDirty&&Yt(r.dirtyFields,O),!N.keepTouched&&Yt(r.touchedFields,O),!N.keepIsValidating&&Yt(r.validatingFields,O),!t.shouldUnregister&&!N.keepDefaultValue&&Yt(s,O);f.values.next({values:{...i}}),f.state.next({...r,...N.keepDirty?{isDirty:T()}:{}}),!N.keepIsValid&&_()},he=({disabled:S,name:N,field:O,fields:Y,value:M})=>{if(Ln(S)&&o.mount||S){const H=S?void 0:Ft(M)?Kh(O?O._f:ue(Y,N)._f):M;ft(i,N,H),j(N,H,!1,!1,!0)}},ye=(S,N={})=>{let O=ue(n,S);const Y=Ln(N.disabled);return ft(n,S,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),O?he({field:O,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Ka(N.min),max:Ka(N.max),minLength:Ka(N.minLength),maxLength:Ka(N.maxLength),pattern:Ka(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ye(S,N),O=ue(n,S);const H=Ft(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=R6(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(Zh),H,...Array.isArray(ue(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else O=ue(n,S,{}),O._f&&(O._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(aE(a.array,S)&&o.action)&&a.unMount.add(S)}}},ke=()=>t.shouldFocusError&&vl(n,I,a.mount),Fe=S=>{Ln(S)&&(f.state.next({disabled:S}),vl(n,(N,O)=>{const Y=ue(n,O);Y&&(N.disabled=Y._f.disabled||S,Array.isArray(Y._f.refs)&&Y._f.refs.forEach(M=>{M.disabled=Y._f.disabled||S}))},0,!1))},De=(S,N)=>async O=>{let Y;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let M=_r(i);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"),Dr(r.errors)){f.state.next({errors:{}});try{await S(M,O)}catch(H){Y=H}}else N&&await N({...r.errors},O),ke(),setTimeout(ke);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Dr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Ne=(S,N={})=>{ue(n,S)&&(Ft(N.defaultValue)?B(S,_r(ue(s,S))):(B(S,N.defaultValue),ft(s,S,_r(N.defaultValue))),N.keepTouched||Yt(r.touchedFields,S),N.keepDirty||(Yt(r.dirtyFields,S),r.isDirty=N.defaultValue?T(S,_r(ue(s,S))):T()),N.keepError||(Yt(r.errors,S),d.isValid&&_()),f.state.next({...r}))},nt=(S,N={})=>{const O=S?_r(S):s,Y=_r(O),M=Dr(S),H=M?s:Y;if(N.keepDefaultValues||(s=O),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)ue(r.dirtyFields,X)?ft(H,X,ue(i,X)):B(X,ue(H,X));else{if(qv&&Ft(S))for(const X of a.mount){const ee=ue(n,X);if(ee&&ee._f){const me=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(Ed(me)){const We=me.closest("form");if(We){We.reset();break}}}}n={}}i=e.shouldUnregister?N.keepDefaultValues?_r(s):{}:_r(H),f.array.next({values:{...H}}),f.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!Ui(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&i?gu(s,i):r.dirtyFields:N.keepDefaultValues&&S?gu(s,S):N.keepDirty?r.dirtyFields:{},touchedFields:N.keepTouched?r.touchedFields:{},errors:N.keepErrors?r.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},k=(S,N)=>nt(Qs(S)?S(i):S,N);return{control:{register:ye,unregister:Ae,getFieldState:V,handleSubmit:De,setError:ne,_executeSchema:P,_getWatch:F,_getDirty:T,_updateValid:_,_removeUnmounted:q,_updateFieldArray:h,_updateDisabledField:he,_getFieldArray:b,_reset:nt,_resetDefaultValues:()=>Qs(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 i},get _state(){return o},set _state(S){o=S},get _defaultValues(){return s},get _names(){return a},set _names(S){a=S},get _formState(){return r},set _formState(S){r=S},get _options(){return t},set _options(S){t={...t,...S}}},trigger:Q,register:ye,handleSubmit:De,watch:se,setValue:B,getValues:z,reset:k,resetField:Ne,clearErrors:fe,unregister:Ae,setError:ne,setFocus:(S,N={})=>{const O=ue(n,S),Y=O&&O._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:V}}function Tr(e={}){const t=tt.useRef(),r=tt.useRef(),[n,s]=tt.useState({isDirty:!1,isValidating:!1,isLoading:Qs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Qs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...I6(e),formState:n});const i=t.current.control;return i._options=e,Qv({subject:i._subjects.state,next:o=>{dE(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),tt.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),tt.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),tt.useEffect(()=>{e.values&&!Ui(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),tt.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),tt.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),tt.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=uE(n,i),t.current}const q0=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ue(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},_E=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?q0(n.ref,r,e):n.refs&&n.refs.forEach(s=>q0(s,r,e))}},L6=(e,t)=>{t.shouldUseNativeValidation&&_E(e,t);const r={};for(const n in e){const s=ue(t.fields,n),i=Object.assign(e[n]||{},{ref:s&&s.ref});if(F6(t.names||Object.keys(e),n)){const o=Object.assign({},ue(r,n));ft(o,"root",i),ft(r,n,o)}else ft(r,n,i)}return r},F6=(e,t)=>e.some(r=>r.startsWith(t+"."));var z6=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[o]={message:a.message,type:a.code}}else r[o]={message:i,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var l=r[o].types,u=l&&l[n.code];r[o]=pE(o,t,r,s,u?[].concat(u,n.message):n.message)}e.shift()}return r},Nr=function(e,t,r){return r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return i.shouldUseNativeValidation&&_E({},i),{errors:{},values:r.raw?n:u}})}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:L6(z6(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},st;(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 i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(st||(st={}));var mm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mm||(mm={}));const we=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Hs=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},oe=st.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"]),U6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vr 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(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),n}static assert(t){if(!(t instanceof Vr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.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()}}Vr.create=e=>new Vr(e);const ha=(e,t)=>{let r;switch(e.code){case oe.invalid_type:e.received===we.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case oe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:r=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case oe.invalid_union:r="Invalid input";break;case oe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case oe.invalid_enum_value:r=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case oe.invalid_arguments:r="Invalid function arguments";break;case oe.invalid_return_type:r="Invalid function return type";break;case oe.invalid_date:r="Invalid date";break;case oe.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}"`:st.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case oe.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 oe.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 oe.custom:r="Invalid input";break;case oe.invalid_intersection_types:r="Intersection results could not be merged";break;case oe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case oe.not_finite:r="Number must be finite";break;default:r=t.defaultError,st.assertNever(e)}return{message:r}};let bE=ha;function V6(e){bE=e}function Rd(){return bE}const Pd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},$6=[];function ge(e,t){const r=Rd(),n=Pd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ha?void 0:ha].filter(s=>!!s)});e.common.issues.push(n)}class cr{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 Be;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 i=await s.key,o=await s.value;n.push({key:i,value:o})}return cr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const Be=Object.freeze({status:"aborted"}),zo=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),gm=e=>e.status==="aborted",vm=e=>e.status==="dirty",Zl=e=>e.status==="valid",Kl=e=>typeof Promise<"u"&&e instanceof Promise;function Ad(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 SE(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 Pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Pe||(Pe={}));var tl,rl;class Hn{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 X0=(e,t)=>{if(Zl(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 Vr(e.common.issues);return this._error=r,this._error}}};function He(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:(o,a)=>{var l,u;const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??n)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}class Xe{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 Hs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Hs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cr,ctx:{common:t.parent.common,data:t.data,parsedType:Hs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Kl(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:Hs(t)},i=this._parseSync({data:t,path:s.path,parent:s});return X0(s,i)}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:Hs(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(Kl(s)?s:Promise.resolve(s));return X0(n,i)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:oe.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!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:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return $n.create(this,this._def)}nullable(){return vi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wn.create(this,this._def)}promise(){return ma.create(this,this._def)}or(t){return Ql.create([this,t],this._def)}and(t){return Jl.create(this,t,this._def)}transform(t){return new En({...He(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new sc({...He(this._def),innerType:this,defaultValue:r,typeName:Ve.ZodDefault})}brand(){return new ty({typeName:Ve.ZodBranded,type:this,...He(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new ic({...He(this._def),innerType:this,catchValue:r,typeName:Ve.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Rc.create(this,t)}readonly(){return oc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const B6=/^c[^\s-]{8,}$/i,W6=/^[0-9a-z]+$/,H6=/^[0-9A-HJKMNP-TV-Z]{26}$/,Y6=/^[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,Z6=/^[a-z0-9_-]{21}$/i,K6=/^[-+]?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)?)??$/,G6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,q6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Gh;const X6=/^(?:(?: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])$/,Q6=/^(([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})))$/,J6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kE="((\\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])))",ez=new RegExp(`^${kE}$`);function CE(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 tz(e){return new RegExp(`^${CE(e)}$`)}function EE(e){let t=`${kE}T${CE(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 rz(e,t){return!!((t==="v4"||!t)&&X6.test(e)||(t==="v6"||!t)&&Q6.test(e))}class gn extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.string,received:i.parsedType}),Be}const n=new cr;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?ge(s,{code:oe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ge(s,{code:oe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")G6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"email",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Gh||(Gh=new RegExp(q6,"u")),Gh.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"emoji",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Y6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"uuid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Z6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"nanoid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")B6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")W6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid2",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")H6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ulid",code:oe.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ge(s,{validation:"url",code:oe.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"regex",code:oe.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?EE(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ez.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?tz(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?K6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"duration",code:oe.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?rz(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ip",code:oe.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?J6.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"base64",code:oe.invalid_string,message:i.message}),n.dirty()):st.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:oe.invalid_string,...Pe.errToObj(n)})}_addCheck(t){return new gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pe.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,...Pe.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,...Pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Pe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Pe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Pe.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Pe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Pe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Pe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Pe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Pe.errToObj(r)})}nonempty(t){return this.min(1,Pe.errToObj(t))}trim(){return new gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gn({...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}}gn.create=e=>{var t;return new gn({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};function nz(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class pi extends Xe{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)!==we.number){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.number,received:i.parsedType}),Be}let n;const s=new cr;for(const i of this._def.checks)i.kind==="int"?st.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?nz(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_finite,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Pe.toString(r))}setLimit(t,r,n,s){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Pe.toString(s)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pe.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"&&st.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)}}pi.create=e=>new pi({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class mi extends Xe{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)!==we.bigint){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.bigint,received:i.parsedType}),Be}let n;const s=new cr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:oe.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):st.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Pe.toString(r))}setLimit(t,r,n,s){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Pe.toString(s)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Pe.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}}mi.create=e=>{var t;return new mi({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...He(e)})};class Gl extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.boolean,received:n.parsedType}),Be}return mr(t.data)}}Gl.create=e=>new Gl({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...He(e)});class eo extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_type,expected:we.date,received:i.parsedType}),Be}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ge(i,{code:oe.invalid_date}),Be}const n=new cr;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:oe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):st.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new eo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Pe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Pe.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}}eo.create=e=>new eo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...He(e)});class Dd extends Xe{_parse(t){if(this._getType(t)!==we.symbol){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.symbol,received:n.parsedType}),Be}return mr(t.data)}}Dd.create=e=>new Dd({typeName:Ve.ZodSymbol,...He(e)});class ql extends Xe{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.undefined,received:n.parsedType}),Be}return mr(t.data)}}ql.create=e=>new ql({typeName:Ve.ZodUndefined,...He(e)});class Xl extends Xe{_parse(t){if(this._getType(t)!==we.null){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.null,received:n.parsedType}),Be}return mr(t.data)}}Xl.create=e=>new Xl({typeName:Ve.ZodNull,...He(e)});class pa extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}}pa.create=e=>new pa({typeName:Ve.ZodAny,...He(e)});class Wi extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}}Wi.create=e=>new Wi({typeName:Ve.ZodUnknown,...He(e)});class Cs extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ge(r,{code:oe.invalid_type,expected:we.never,received:r.parsedType}),Be}}Cs.create=e=>new Cs({typeName:Ve.ZodNever,...He(e)});class Od extends Xe{_parse(t){if(this._getType(t)!==we.undefined){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.void,received:n.parsedType}),Be}return mr(t.data)}}Od.create=e=>new Od({typeName:Ve.ZodVoid,...He(e)});class wn extends Xe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==we.array)return ge(r,{code:oe.invalid_type,expected:we.array,received:r.parsedType}),Be;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(ge(r,{code:o?oe.too_big:oe.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?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&&(ge(r,{code:oe.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&&(ge(r,{code:oe.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((o,a)=>s.type._parseAsync(new Hn(r,o,r.path,a)))).then(o=>cr.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new Hn(r,o,r.path,a)));return cr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new wn({...this._def,minLength:{value:t,message:Pe.toString(r)}})}max(t,r){return new wn({...this._def,maxLength:{value:t,message:Pe.toString(r)}})}length(t,r){return new wn({...this._def,exactLength:{value:t,message:Pe.toString(r)}})}nonempty(t){return this.min(1,t)}}wn.create=(e,t)=>new wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...He(t)});function So(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=$n.create(So(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof wn?new wn({...e._def,type:So(e.element)}):e instanceof $n?$n.create(So(e.unwrap())):e instanceof vi?vi.create(So(e.unwrap())):e instanceof Yn?Yn.create(e.items.map(t=>So(t))):e}class Rt extends Xe{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=st.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==we.object){const u=this._getOrReturnCtx(t);return ge(u,{code:oe.invalid_type,expected:we.object,received:u.parsedType}),Be}const{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Cs&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const d=i[u],f=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Hn(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Cs){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ge(s,{code:oe.unrecognized_keys,keys:a}),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 a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Hn(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const f=await d.key,m=await d.value;u.push({key:f,value:m,alwaysSet:d.alwaysSet})}return u}).then(u=>cr.mergeObjectSync(n,u)):cr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Pe.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Pe.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}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:Ve.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return st.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 st.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return So(this)}partial(t){const r={};return st.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 st.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof $n;)i=i._def.innerType;r[n]=i}}),new Rt({...this._def,shape:()=>r})}keyof(){return jE(st.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Cs.create(),typeName:Ve.ZodObject,...He(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Cs.create(),typeName:Ve.ZodObject,...He(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Cs.create(),typeName:Ve.ZodObject,...He(t)});class Ql extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Vr(a.ctx.common.issues));return ge(r,{code:oe.invalid_union,unionErrors:o}),Be}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Vr(l));return ge(r,{code:oe.invalid_union,unionErrors:a}),Be}}get options(){return this._def.options}}Ql.create=(e,t)=>new Ql({options:e,typeName:Ve.ZodUnion,...He(t)});const ns=e=>e instanceof tc?ns(e.schema):e instanceof En?ns(e.innerType()):e instanceof rc?[e.value]:e instanceof gi?e.options:e instanceof nc?st.objectValues(e.enum):e instanceof sc?ns(e._def.innerType):e instanceof ql?[void 0]:e instanceof Xl?[null]:e instanceof $n?[void 0,...ns(e.unwrap())]:e instanceof vi?[null,...ns(e.unwrap())]:e instanceof ty||e instanceof oc?ns(e.unwrap()):e instanceof ic?ns(e._def.innerType):[];class $f extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return ge(r,{code:oe.invalid_type,expected:we.object,received:r.parsedType}),Be;const n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ge(r,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Be)}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 i of r){const o=ns(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new $f({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...He(n)})}}function ym(e,t){const r=Hs(e),n=Hs(t);if(e===t)return{valid:!0,data:e};if(r===we.object&&n===we.object){const s=st.objectKeys(t),i=st.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=ym(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===we.array&&n===we.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=ym(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===we.date&&n===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Jl extends Xe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(gm(i)||gm(o))return Be;const a=ym(i.value,o.value);return a.valid?((vm(i)||vm(o))&&r.dirty(),{status:r.value,value:a.data}):(ge(n,{code:oe.invalid_intersection_types}),Be)};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(([i,o])=>s(i,o)):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}))}}Jl.create=(e,t,r)=>new Jl({left:e,right:t,typeName:Ve.ZodIntersection,...He(r)});class Yn extends Xe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.array)return ge(n,{code:oe.invalid_type,expected:we.array,received:n.parsedType}),Be;if(n.data.length<this._def.items.length)return ge(n,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&n.data.length>this._def.items.length&&(ge(n,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Hn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>cr.mergeArray(r,o)):cr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Yn({...this._def,rest:t})}}Yn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yn({items:e,typeName:Ve.ZodTuple,rest:null,...He(t)})};class ec extends Xe{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!==we.object)return ge(n,{code:oe.invalid_type,expected:we.object,received:n.parsedType}),Be;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in n.data)s.push({key:i._parse(new Hn(n,a,n.path,a)),value:o._parse(new Hn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?cr.mergeObjectAsync(r,s):cr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Xe?new ec({keyType:t,valueType:r,typeName:Ve.ZodRecord,...He(n)}):new ec({keyType:gn.create(),valueType:t,typeName:Ve.ZodRecord,...He(r)})}}class Md extends Xe{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!==we.map)return ge(n,{code:oe.invalid_type,expected:we.map,received:n.parsedType}),Be;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],u)=>({key:s._parse(new Hn(n,a,n.path,[u,"key"])),value:i._parse(new Hn(n,l,n.path,[u,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return Be;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return Be;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),a.set(u.value,d.value)}return{status:r.value,value:a}}}}Md.create=(e,t,r)=>new Md({valueType:t,keyType:e,typeName:Ve.ZodMap,...He(r)});class to extends Xe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==we.set)return ge(n,{code:oe.invalid_type,expected:we.set,received:n.parsedType}),Be;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ge(n,{code:oe.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&&(ge(n,{code:oe.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const d of l){if(d.status==="aborted")return Be;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const a=[...n.data.values()].map((l,u)=>i._parse(new Hn(n,l,n.path,u)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,r){return new to({...this._def,minSize:{value:t,message:Pe.toString(r)}})}max(t,r){return new to({...this._def,maxSize:{value:t,message:Pe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}to.create=(e,t)=>new to({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...He(t)});class ra extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.function)return ge(r,{code:oe.invalid_type,expected:we.function,received:r.parsedType}),Be;function n(a,l){return Pd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rd(),ha].filter(u=>!!u),issueData:{code:oe.invalid_arguments,argumentsError:l}})}function s(a,l){return Pd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Rd(),ha].filter(u=>!!u),issueData:{code:oe.invalid_return_type,returnTypeError:l}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ma){const a=this;return mr(async function(...l){const u=new Vr([]),d=await a._def.args.parseAsync(l,i).catch(v=>{throw u.addIssue(n(l,v)),u}),f=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(f,i).catch(v=>{throw u.addIssue(s(f,v)),u})})}else{const a=this;return mr(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new Vr([n(l,u.error)]);const d=Reflect.apply(o,this,u.data),f=a._def.returns.safeParse(d,i);if(!f.success)throw new Vr([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ra({...this._def,args:Yn.create(t).rest(Wi.create())})}returns(t){return new ra({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new ra({args:t||Yn.create([]).rest(Wi.create()),returns:r||Wi.create(),typeName:Ve.ZodFunction,...He(n)})}}class tc extends Xe{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})}}tc.create=(e,t)=>new tc({getter:e,typeName:Ve.ZodLazy,...He(t)});class rc extends Xe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ge(r,{received:r.data,code:oe.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}rc.create=(e,t)=>new rc({value:e,typeName:Ve.ZodLiteral,...He(t)});function jE(e,t){return new gi({values:e,typeName:Ve.ZodEnum,...He(t)})}class gi extends Xe{constructor(){super(...arguments),tl.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{expected:st.joinValues(n),received:r.parsedType,code:oe.invalid_type}),Be}if(Ad(this,tl)||SE(this,tl,new Set(this._def.values)),!Ad(this,tl).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{received:r.data,code:oe.invalid_enum_value,options:n}),Be}return mr(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 gi.create(t,{...this._def,...r})}exclude(t,r=this._def){return gi.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}tl=new WeakMap;gi.create=jE;class nc extends Xe{constructor(){super(...arguments),rl.set(this,void 0)}_parse(t){const r=st.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==we.string&&n.parsedType!==we.number){const s=st.objectValues(r);return ge(n,{expected:st.joinValues(s),received:n.parsedType,code:oe.invalid_type}),Be}if(Ad(this,rl)||SE(this,rl,new Set(st.getValidEnumValues(this._def.values))),!Ad(this,rl).has(t.data)){const s=st.objectValues(r);return ge(n,{received:n.data,code:oe.invalid_enum_value,options:s}),Be}return mr(t.data)}get enum(){return this._def.values}}rl=new WeakMap;nc.create=(e,t)=>new nc({values:e,typeName:Ve.ZodNativeEnum,...He(t)});class ma extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==we.promise&&r.common.async===!1)return ge(r,{code:oe.invalid_type,expected:we.promise,received:r.parsedType}),Be;const n=r.parsedType===we.promise?r.data:Promise.resolve(r.data);return mr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ma.create=(e,t)=>new ma({type:e,typeName:Ve.ZodPromise,...He(t)});class En extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Be;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Be:l.status==="dirty"||r.value==="dirty"?zo(l.value):l});{if(r.value==="aborted")return Be;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Be:a.status==="dirty"||r.value==="dirty"?zo(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Be:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Be:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Zl(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Zl(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):o);st.assertNever(s)}}En.create=(e,t,r)=>new En({schema:e,typeName:Ve.ZodEffects,effect:t,...He(r)});En.createWithPreprocess=(e,t,r)=>new En({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...He(r)});class $n extends Xe{_parse(t){return this._getType(t)===we.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:Ve.ZodOptional,...He(t)});class vi extends Xe{_parse(t){return this._getType(t)===we.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vi.create=(e,t)=>new vi({innerType:e,typeName:Ve.ZodNullable,...He(t)});class sc extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===we.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}sc.create=(e,t)=>new sc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});class ic extends Xe{_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 Kl(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Vr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ic.create=(e,t)=>new ic({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});class Id extends Xe{_parse(t){if(this._getType(t)!==we.nan){const n=this._getOrReturnCtx(t);return ge(n,{code:oe.invalid_type,expected:we.nan,received:n.parsedType}),Be}return{status:"valid",value:t.data}}}Id.create=e=>new Id({typeName:Ve.ZodNaN,...He(e)});const sz=Symbol("zod_brand");class ty extends Xe{_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 Rc extends Xe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Be:i.status==="dirty"?(r.dirty(),zo(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Be: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 Rc({in:t,out:r,typeName:Ve.ZodPipeline})}}class oc extends Xe{_parse(t){const r=this._def.innerType._parse(t),n=s=>(Zl(s)&&(s.value=Object.freeze(s.value)),s);return Kl(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}oc.create=(e,t)=>new oc({innerType:e,typeName:Ve.ZodReadonly,...He(t)});function TE(e,t={},r){return e?pa.create().superRefine((n,s)=>{var i,o;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):pa.create()}const iz={object:Rt.lazycreate};var Ve;(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"})(Ve||(Ve={}));const oz=(e,t={message:`Input not instance of ${e.name}`})=>TE(r=>r instanceof e,t),NE=gn.create,RE=pi.create,az=Id.create,lz=mi.create,PE=Gl.create,cz=eo.create,uz=Dd.create,dz=ql.create,fz=Xl.create,hz=pa.create,pz=Wi.create,mz=Cs.create,gz=Od.create,vz=wn.create,yz=Rt.create,xz=Rt.strictCreate,wz=Ql.create,_z=$f.create,bz=Jl.create,Sz=Yn.create,kz=ec.create,Cz=Md.create,Ez=to.create,jz=ra.create,Tz=tc.create,Nz=rc.create,Rz=gi.create,Pz=nc.create,Az=ma.create,Q0=En.create,Dz=$n.create,Oz=vi.create,Mz=En.createWithPreprocess,Iz=Rc.create,Lz=()=>NE().optional(),Fz=()=>RE().optional(),zz=()=>PE().optional(),Uz={string:e=>gn.create({...e,coerce:!0}),number:e=>pi.create({...e,coerce:!0}),boolean:e=>Gl.create({...e,coerce:!0}),bigint:e=>mi.create({...e,coerce:!0}),date:e=>eo.create({...e,coerce:!0})},Vz=Be;var pe=Object.freeze({__proto__:null,defaultErrorMap:ha,setErrorMap:V6,getErrorMap:Rd,makeIssue:Pd,EMPTY_PATH:$6,addIssueToContext:ge,ParseStatus:cr,INVALID:Be,DIRTY:zo,OK:mr,isAborted:gm,isDirty:vm,isValid:Zl,isAsync:Kl,get util(){return st},get objectUtil(){return mm},ZodParsedType:we,getParsedType:Hs,ZodType:Xe,datetimeRegex:EE,ZodString:gn,ZodNumber:pi,ZodBigInt:mi,ZodBoolean:Gl,ZodDate:eo,ZodSymbol:Dd,ZodUndefined:ql,ZodNull:Xl,ZodAny:pa,ZodUnknown:Wi,ZodNever:Cs,ZodVoid:Od,ZodArray:wn,ZodObject:Rt,ZodUnion:Ql,ZodDiscriminatedUnion:$f,ZodIntersection:Jl,ZodTuple:Yn,ZodRecord:ec,ZodMap:Md,ZodSet:to,ZodFunction:ra,ZodLazy:tc,ZodLiteral:rc,ZodEnum:gi,ZodNativeEnum:nc,ZodPromise:ma,ZodEffects:En,ZodTransformer:En,ZodOptional:$n,ZodNullable:vi,ZodDefault:sc,ZodCatch:ic,ZodNaN:Id,BRAND:sz,ZodBranded:ty,ZodPipeline:Rc,ZodReadonly:oc,custom:TE,Schema:Xe,ZodSchema:Xe,late:iz,get ZodFirstPartyTypeKind(){return Ve},coerce:Uz,any:hz,array:vz,bigint:lz,boolean:PE,date:cz,discriminatedUnion:_z,effect:Q0,enum:Rz,function:jz,instanceof:oz,intersection:bz,lazy:Tz,literal:Nz,map:Cz,nan:az,nativeEnum:Pz,never:mz,null:fz,nullable:Oz,number:RE,object:yz,oboolean:zz,onumber:Fz,optional:Dz,ostring:Lz,pipeline:Iz,preprocess:Mz,promise:Az,record:kz,set:Ez,strictObject:xz,string:NE,symbol:uz,transformer:Q0,tuple:Sz,undefined:dz,union:wz,unknown:pz,void:gz,NEVER:Vz,ZodIssueCode:oe,quotelessJson:U6,ZodError:Vr}),$z="Label",AE=y.forwardRef((e,t)=>c.jsx(Le.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())}}));AE.displayName=$z;var DE=AE;const Bz=pc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ry=y.forwardRef(({className:e,...t},r)=>c.jsx(DE,{ref:r,className:le(Bz(),e),...t}));ry.displayName=DE.displayName;const Rr=b6,OE=y.createContext({}),Te=({...e})=>c.jsx(OE.Provider,{value:{name:e.name},children:c.jsx(E6,{...e})}),Bf=()=>{const e=y.useContext(OE),t=y.useContext(ME),{getFieldState:r,formState:n}=Vf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},ME=y.createContext({}),Ce=y.forwardRef(({className:e,...t},r)=>{const n=y.useId();return c.jsx(ME.Provider,{value:{id:n},children:c.jsx("div",{ref:r,className:le("space-y-2",e),...t})})});Ce.displayName="FormItem";const Ee=y.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Bf();return c.jsx(ry,{ref:r,className:le(n&&"text-destructive",e),htmlFor:s,...t})});Ee.displayName="FormLabel";const je=y.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:i}=Bf();return c.jsx(ws,{ref:t,id:n,"aria-describedby":r?`${s} ${i}`:`${s}`,"aria-invalid":!!r,...e})});je.displayName="FormControl";const Wz=y.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Bf();return c.jsx("p",{ref:r,id:n,className:le("text-sm text-muted-foreground",e),...t})});Wz.displayName="FormDescription";const Se=y.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:i}=Bf(),o=s?String(s==null?void 0:s.message):t;return o?c.jsx("p",{ref:n,id:i,className:le("text-sm font-medium text-destructive",e),...r,children:o}):null});Se.displayName="FormMessage";function xm(e,[t,r]){return Math.min(r,Math.max(t,e))}var Hz=[" ","Enter","ArrowUp","ArrowDown"],Yz=[" ","Enter"],Pc="Select",[Wf,Hf,Zz]=df(Pc),[Pa,gU]=Hr(Pc,[Zz,Ea]),Yf=Ea(),[Kz,Si]=Pa(Pc),[Gz,qz]=Pa(Pc),IE=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:m,required:v}=e,x=Yf(t),[g,_]=y.useState(null),[p,h]=y.useState(null),[w,C]=y.useState(!1),E=mc(u),[j=!1,R]=_s({prop:n,defaultProp:s,onChange:i}),[P,A]=_s({prop:o,defaultProp:a,onChange:l}),L=y.useRef(null),q=g?!!g.closest("form"):!0,[T,F]=y.useState(new Set),b=Array.from(T).map($=>$.props.value).join(";");return c.jsx(zg,{...x,children:c.jsxs(Kz,{required:v,scope:t,trigger:g,onTriggerChange:_,valueNode:p,onValueNodeChange:h,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:xn(),value:P,onValueChange:A,open:j,onOpenChange:R,dir:E,triggerPointerDownPosRef:L,disabled:m,children:[c.jsx(Wf.Provider,{scope:t,children:c.jsx(Gz,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{F(te=>new Set(te).add($))},[]),onNativeOptionRemove:y.useCallback($=>{F(te=>{const B=new Set(te);return B.delete($),B})},[]),children:r})}),q?c.jsxs(lj,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:$=>A($.target.value),disabled:m,children:[P===void 0?c.jsx("option",{value:""}):null,Array.from(T)]},b):null]})})};IE.displayName=Pc;var LE="SelectTrigger",FE=y.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,i=Yf(r),o=Si(LE,r),a=o.disabled||n,l=Qe(t,o.onTriggerChange),u=Hf(r),[d,f,m]=cj(x=>{const g=u().filter(h=>!h.disabled),_=g.find(h=>h.value===o.value),p=uj(g,x,_);p!==void 0&&o.onValueChange(p.value)}),v=()=>{a||(o.onOpenChange(!0),m())};return c.jsx(Ug,{asChild:!0,...i,children:c.jsx(Le.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":aj(o.value)?"":void 0,...s,ref:l,onClick:ce(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ce(s.onKeyDown,x=>{const g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(g&&x.key===" ")&&Hz.includes(x.key)&&(v(),x.preventDefault())})})})});FE.displayName=LE;var zE="SelectValue",UE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=e,l=Si(zE,r),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,f=Qe(t,l.onValueNodeChange);return nr(()=>{u(d)},[u,d]),c.jsx(Le.span,{...a,ref:f,style:{pointerEvents:"none"},children:aj(l.value)?c.jsx(c.Fragment,{children:o}):i})});UE.displayName=zE;var Xz="SelectIcon",VE=y.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return c.jsx(Le.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});VE.displayName=Xz;var Qz="SelectPortal",$E=e=>c.jsx(vc,{asChild:!0,...e});$E.displayName=Qz;var ro="SelectContent",BE=y.forwardRef((e,t)=>{const r=Si(ro,e.__scopeSelect),[n,s]=y.useState();if(nr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?js.createPortal(c.jsx(WE,{scope:e.__scopeSelect,children:c.jsx(Wf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(HE,{...e,ref:t})});BE.displayName=ro;var os=10,[WE,ki]=Pa(ro),Jz="SelectContentImpl",HE=y.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:g,avoidCollisions:_,...p}=e,h=Si(ro,r),[w,C]=y.useState(null),[E,j]=y.useState(null),R=Qe(t,he=>C(he)),[P,A]=y.useState(null),[L,q]=y.useState(null),T=Hf(r),[F,b]=y.useState(!1),$=y.useRef(!1);y.useEffect(()=>{if(w)return Bg(w)},[w]),Rg();const te=y.useCallback(he=>{const[ye,...ke]=T().map(Ne=>Ne.ref.current),[Fe]=ke.slice(-1),De=document.activeElement;for(const Ne of he)if(Ne===De||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===ye&&E&&(E.scrollTop=0),Ne===Fe&&E&&(E.scrollTop=E.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==De))return},[T,E]),B=y.useCallback(()=>te([P,w]),[te,P,w]);y.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=h;y.useEffect(()=>{if(w){let he={x:0,y:0};const ye=Fe=>{var De,Ne;he={x:Math.abs(Math.round(Fe.pageX)-(((De=I.current)==null?void 0:De.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Ne=I.current)==null?void 0:Ne.y)??0))}},ke=Fe=>{he.x<=10&&he.y<=10?Fe.preventDefault():w.contains(Fe.target)||Z(!1),document.removeEventListener("pointermove",ye),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",ke,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",ke,{capture:!0})}}},[w,Z,I]),y.useEffect(()=>{const he=()=>Z(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[Z]);const[Q,z]=cj(he=>{const ye=T().filter(De=>!De.disabled),ke=ye.find(De=>De.ref.current===document.activeElement),Fe=uj(ye,he,ke);Fe&&setTimeout(()=>Fe.ref.current.focus())}),V=y.useCallback((he,ye,ke)=>{const Fe=!$.current&&!ke;(h.value!==void 0&&h.value===ye||Fe)&&(A(he),Fe&&($.current=!0))},[h.value]),fe=y.useCallback(()=>w==null?void 0:w.focus(),[w]),ne=y.useCallback((he,ye,ke)=>{const Fe=!$.current&&!ke;(h.value!==void 0&&h.value===ye||Fe)&&q(he)},[h.value]),se=n==="popper"?wm:YE,Ae=se===wm?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:g,avoidCollisions:_}:{};return c.jsx(WE,{scope:r,content:w,viewport:E,onViewportChange:j,itemRefCallback:V,selectedItem:P,onItemLeave:fe,itemTextRefCallback:ne,focusSelectedItem:B,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:c.jsx(yf,{as:ws,allowPinchZoom:!0,children:c.jsx(ff,{asChild:!0,trapped:h.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:ce(s,he=>{var ye;(ye=h.trigger)==null||ye.focus({preventScroll:!0}),he.preventDefault()}),children:c.jsx(Sa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:c.jsx(se,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:he=>he.preventDefault(),...p,...Ae,onPlaced:()=>b(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:ce(p.onKeyDown,he=>{const ye=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!ye&&he.key.length===1&&z(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Fe=T().filter(De=>!De.disabled).map(De=>De.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const De=he.target,Ne=Fe.indexOf(De);Fe=Fe.slice(Ne+1)}setTimeout(()=>te(Fe)),he.preventDefault()}})})})})})})});HE.displayName=Jz;var e8="SelectItemAlignedPosition",YE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,i=Si(ro,r),o=ki(ro,r),[a,l]=y.useState(null),[u,d]=y.useState(null),f=Qe(t,R=>d(R)),m=Hf(r),v=y.useRef(!1),x=y.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:p,focusSelectedItem:h}=o,w=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&g&&_&&p){const R=i.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),L=p.getBoundingClientRect();if(i.dir!=="rtl"){const De=L.left-P.left,Ne=A.left-De,nt=R.left-Ne,k=R.width+nt,J=Math.max(k,P.width),K=window.innerWidth-os,D=xm(Ne,[os,K-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const De=P.right-L.right,Ne=window.innerWidth-A.right-De,nt=window.innerWidth-R.right-Ne,k=R.width+nt,J=Math.max(k,P.width),K=window.innerWidth-os,D=xm(Ne,[os,K-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=m(),T=window.innerHeight-os*2,F=g.scrollHeight,b=window.getComputedStyle(u),$=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),B=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=$+te+F+Z+B,Q=Math.min(_.offsetHeight*5,I),z=window.getComputedStyle(g),V=parseInt(z.paddingTop,10),fe=parseInt(z.paddingBottom,10),ne=R.top+R.height/2-os,se=T-ne,Ae=_.offsetHeight/2,he=_.offsetTop+Ae,ye=$+te+he,ke=I-ye;if(ye<=ne){const De=_===q[q.length-1].ref.current;a.style.bottom="0px";const Ne=u.clientHeight-g.offsetTop-g.offsetHeight,nt=Math.max(se,Ae+(De?fe:0)+Ne+B),k=ye+nt;a.style.height=k+"px"}else{const De=_===q[0].ref.current;a.style.top="0px";const nt=Math.max(ne,$+g.offsetTop+(De?V:0)+Ae)+ke;a.style.height=nt+"px",g.scrollTop=ye-ne+g.offsetTop}a.style.margin=`${os}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=T+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[m,i.trigger,i.valueNode,a,u,g,_,p,i.dir,n]);nr(()=>w(),[w]);const[C,E]=y.useState();nr(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const j=y.useCallback(R=>{R&&x.current===!0&&(w(),h==null||h(),x.current=!1)},[w,h]);return c.jsx(r8,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:c.jsx(Le.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});YE.displayName=e8;var t8="SelectPopperPosition",wm=y.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=os,...i}=e,o=Yf(r);return c.jsx(Vg,{...o,...i,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}})});wm.displayName=t8;var[r8,ny]=Pa(ro,{}),_m="SelectViewport",ZE=y.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,i=ki(_m,r),o=ny(_m,r),a=Qe(t,i.onViewportChange),l=y.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(Wf.Slot,{scope:r,children:c.jsx(Le.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&f){const v=Math.abs(l.current-d.scrollTop);if(v>0){const x=window.innerHeight-os*2,g=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),p=Math.max(g,_);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")}}}l.current=d.scrollTop})})})]})});ZE.displayName=_m;var KE="SelectGroup",[n8,s8]=Pa(KE),GE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=xn();return c.jsx(n8,{scope:r,id:s,children:c.jsx(Le.div,{role:"group","aria-labelledby":s,...n,ref:t})})});GE.displayName=KE;var qE="SelectLabel",XE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=s8(qE,r);return c.jsx(Le.div,{id:s.id,...n,ref:t})});XE.displayName=qE;var Ld="SelectItem",[i8,QE]=Pa(Ld),JE=y.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=e,a=Si(Ld,r),l=ki(Ld,r),u=a.value===n,[d,f]=y.useState(i??""),[m,v]=y.useState(!1),x=Qe(t,p=>{var h;return(h=l.itemRefCallback)==null?void 0:h.call(l,p,n,s)}),g=xn(),_=()=>{s||(a.onValueChange(n),a.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 c.jsx(i8,{scope:r,value:n,disabled:s,textId:g,isSelected:u,onItemTextChange:y.useCallback(p=>{f(h=>h||((p==null?void 0:p.textContent)??"").trim())},[]),children:c.jsx(Wf.ItemSlot,{scope:r,value:n,disabled:s,textValue:d,children:c.jsx(Le.div,{role:"option","aria-labelledby":g,"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,...o,ref:x,onFocus:ce(o.onFocus,()=>v(!0)),onBlur:ce(o.onBlur,()=>v(!1)),onPointerUp:ce(o.onPointerUp,_),onPointerMove:ce(o.onPointerMove,p=>{var h;s?(h=l.onItemLeave)==null||h.call(l):p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,p=>{var h;p.currentTarget===document.activeElement&&((h=l.onItemLeave)==null||h.call(l))}),onKeyDown:ce(o.onKeyDown,p=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&p.key===" "||(Yz.includes(p.key)&&_(),p.key===" "&&p.preventDefault())})})})})});JE.displayName=Ld;var nl="SelectItemText",ej=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...i}=e,o=Si(nl,r),a=ki(nl,r),l=QE(nl,r),u=qz(nl,r),[d,f]=y.useState(null),m=Qe(t,p=>f(p),l.onItemTextChange,p=>{var h;return(h=a.itemTextRefCallback)==null?void 0:h.call(a,p,l.value,l.disabled)}),v=d==null?void 0:d.textContent,x=y.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=u;return nr(()=>(g(x),()=>_(x)),[g,_,x]),c.jsxs(c.Fragment,{children:[c.jsx(Le.span,{id:l.textId,...i,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?js.createPortal(i.children,o.valueNode):null]})});ej.displayName=nl;var tj="SelectItemIndicator",rj=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return QE(tj,r).isSelected?c.jsx(Le.span,{"aria-hidden":!0,...n,ref:t}):null});rj.displayName=tj;var bm="SelectScrollUpButton",nj=y.forwardRef((e,t)=>{const r=ki(bm,e.__scopeSelect),n=ny(bm,e.__scopeSelect),[s,i]=y.useState(!1),o=Qe(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(ij,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});nj.displayName=bm;var Sm="SelectScrollDownButton",sj=y.forwardRef((e,t)=>{const r=ki(Sm,e.__scopeSelect),n=ny(Sm,e.__scopeSelect),[s,i]=y.useState(!1),o=Qe(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?c.jsx(ij,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});sj.displayName=Sm;var ij=y.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,i=ki("SelectScrollButton",r),o=y.useRef(null),a=Hf(r),l=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),nr(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(Le.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{l()})})}),o8="SelectSeparator",oj=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Le.div,{"aria-hidden":!0,...n,ref:t})});oj.displayName=o8;var km="SelectArrow",a8=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Yf(r),i=Si(km,r),o=ki(km,r);return i.open&&o.position==="popper"?c.jsx($g,{...s,...n,ref:t}):null});a8.displayName=km;function aj(e){return e===""||e===void 0}var lj=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=y.useRef(null),i=Qe(t,s),o=EC(r);return y.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&d){const f=new Event("change",{bubbles:!0});d.call(a,r),a.dispatchEvent(f)}},[o,r]),c.jsx(Tc,{asChild:!0,children:c.jsx("select",{...n,ref:i,defaultValue:r})})});lj.displayName="BubbleSelect";function cj(e){const t=Dt(e),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(o=>{const a=r.current+o;t(a),function l(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function uj(e,t,r){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=l8(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==r));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function l8(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var c8=IE,dj=FE,u8=UE,d8=VE,f8=$E,fj=BE,h8=ZE,p8=GE,hj=XE,pj=JE,m8=ej,g8=rj,mj=nj,gj=sj,vj=oj;const Pi=c8,sl=p8,Ai=u8,Ys=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(dj,{ref:n,className:le("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,c.jsx(d8,{asChild:!0,children:c.jsx(M1,{className:"h-4 w-4 opacity-50"})})]}));Ys.displayName=dj.displayName;const yj=y.forwardRef(({className:e,...t},r)=>c.jsx(mj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(SP,{className:"h-4 w-4"})}));yj.displayName=mj.displayName;const xj=y.forwardRef(({className:e,...t},r)=>c.jsx(gj,{ref:r,className:le("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(M1,{className:"h-4 w-4"})}));xj.displayName=gj.displayName;const Zs=y.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>c.jsx(f8,{children:c.jsxs(fj,{ref:s,className:le("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:[c.jsx(yj,{}),c.jsx(h8,{className:le("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(xj,{})]})}));Zs.displayName=fj.displayName;const Uo=y.forwardRef(({className:e,...t},r)=>c.jsx(hj,{ref:r,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Uo.displayName=hj.displayName;const fn=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(pj,{ref:n,className:le("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:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(g8,{children:c.jsx(O1,{className:"h-4 w-4"})})}),c.jsx(m8,{children:t})]}));fn.displayName=pj.displayName;const v8=y.forwardRef(({className:e,...t},r)=>c.jsx(vj,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));v8.displayName=vj.displayName;const Cm=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"]]]),y8=Array.from(Cm.keys()),sy=nv,iy=sv,x8=iv,wj=y.forwardRef(({className:e,...t},r)=>c.jsx(wc,{ref:r,className:le("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}));wj.displayName=wc.displayName;const Zf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(x8,{children:[c.jsx(wj,{}),c.jsxs(_c,{ref:n,className:le("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,c.jsxs(_f,{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:[c.jsx(Eg,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zf.displayName=_c.displayName;const Kf=({className:e,...t})=>c.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Kf.displayName="DialogHeader";const Gf=y.forwardRef(({className:e,...t},r)=>c.jsx(bc,{ref:r,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));Gf.displayName=bc.displayName;const w8=y.forwardRef(({className:e,...t},r)=>c.jsx(Sc,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));w8.displayName=Sc.displayName;function _8(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var oy="ScrollArea",[_j,vU]=Hr(oy),[b8,an]=_j(oy),bj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=y.useState(null),[u,d]=y.useState(null),[f,m]=y.useState(null),[v,x]=y.useState(null),[g,_]=y.useState(null),[p,h]=y.useState(0),[w,C]=y.useState(0),[E,j]=y.useState(!1),[R,P]=y.useState(!1),A=Qe(t,q=>l(q)),L=mc(s);return c.jsx(b8,{scope:r,type:n,dir:L,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:v,onScrollbarXChange:x,scrollbarXEnabled:E,onScrollbarXEnabledChange:j,scrollbarY:g,onScrollbarYChange:_,scrollbarYEnabled:R,onScrollbarYEnabledChange:P,onCornerWidthChange:h,onCornerHeightChange:C,children:c.jsx(Le.div,{dir:L,...o,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});bj.displayName=oy;var Sj="ScrollAreaViewport",kj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...i}=e,o=an(Sj,r),a=y.useRef(null),l=Qe(t,a,o.onViewportChange);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(Le.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});kj.displayName=Sj;var Gn="ScrollAreaScrollbar",ay=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(S8,{...n,ref:t,forceMount:r}):s.type==="scroll"?c.jsx(k8,{...n,ref:t,forceMount:r}):s.type==="auto"?c.jsx(Cj,{...n,ref:t,forceMount:r}):s.type==="always"?c.jsx(ly,{...n,ref:t}):null});ay.displayName=Gn;var S8=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),[i,o]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(yr,{present:r||i,children:c.jsx(Cj,{"data-state":i?"visible":"hidden",...n,ref:t})})}),k8=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=an(Gn,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Xf(()=>l("SCROLL_END"),100),[a,l]=_8("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 y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const v=u[d];f!==v&&(l("SCROLL"),o()),f=v};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[s.viewport,i,l,o]),c.jsx(yr,{present:r||a!=="hidden",children:c.jsx(ly,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ce(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ce(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Cj=y.forwardRef((e,t)=>{const r=an(Gn,e.__scopeScrollArea),{forceMount:n,...s}=e,[i,o]=y.useState(!1),a=e.orientation==="horizontal",l=Xf(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;o(a?u:d)}},10);return ga(r.viewport,l),ga(r.content,l),c.jsx(yr,{present:n||i,children:c.jsx(ly,{"data-state":i?"visible":"hidden",...s,ref:t})})}),ly=y.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=an(Gn,e.__scopeScrollArea),i=y.useRef(null),o=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Rj(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function f(m,v){return R8(m,o.current,a,v)}return r==="horizontal"?c.jsx(C8,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollLeft,v=J0(m,a,s.dir);i.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"?c.jsx(E8,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const m=s.viewport.scrollTop,v=J0(m,a);i.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}),C8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=an(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Qe(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(jj,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":qf(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Aj(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:zd(o.paddingLeft),paddingEnd:zd(o.paddingRight)}})}})}),E8=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=an(Gn,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),u=Qe(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(jj,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":qf(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Aj(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:zd(o.paddingTop),paddingEnd:zd(o.paddingBottom)}})}})}),[j8,Ej]=_j(Gn),jj=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=e,v=an(Gn,r),[x,g]=y.useState(null),_=Qe(t,A=>g(A)),p=y.useRef(null),h=y.useRef(""),w=v.viewport,C=n.content-n.viewport,E=Dt(d),j=Dt(l),R=Xf(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 y.useEffect(()=>{const A=L=>{const q=L.target;(x==null?void 0:x.contains(q))&&E(L,C)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[w,x,C,E]),y.useEffect(j,[n,j]),ga(x,R),ga(v.content,R),c.jsx(j8,{scope:r,scrollbar:x,hasThumb:s,onThumbChange:Dt(i),onThumbPointerUp:Dt(o),onThumbPositionChange:j,onThumbPointerDown:Dt(a),children:c.jsx(Le.div,{...m,ref:_,style:{position:"absolute",...m.style},onPointerDown:ce(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:ce(e.onPointerMove,P),onPointerUp:ce(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})})})}),Fd="ScrollAreaThumb",Tj=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Ej(Fd,e.__scopeScrollArea);return c.jsx(yr,{present:r||s.hasThumb,children:c.jsx(T8,{ref:t,...n})})}),T8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,i=an(Fd,r),o=Ej(Fd,r),{onThumbPositionChange:a}=o,l=Qe(t,f=>o.onThumbChange(f)),u=y.useRef(),d=Xf(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const f=i.viewport;if(f){const m=()=>{if(d(),!u.current){const v=P8(f,a);u.current=v,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,d,a]),c.jsx(Le.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ce(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),x=f.clientX-v.left,g=f.clientY-v.top;o.onThumbPointerDown({x,y:g})}),onPointerUp:ce(e.onPointerUp,o.onThumbPointerUp)})});Tj.displayName=Fd;var cy="ScrollAreaCorner",Nj=y.forwardRef((e,t)=>{const r=an(cy,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.jsx(N8,{...e,ref:t}):null});Nj.displayName=cy;var N8=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=an(cy,r),[i,o]=y.useState(0),[a,l]=y.useState(0),u=!!(i&&a);return ga(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),ga(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?c.jsx(Le.div,{...n,ref:t,style:{width:i,height:a,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 Rj(e,t){const r=e/t;return isNaN(r)?0:r}function qf(e){const t=Rj(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function R8(e,t,r,n="ltr"){const s=qf(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return Pj([l,u],f)(e)}function J0(e,t,r="ltr"){const n=qf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=xm(e,l);return Pj([0,o],[0,a])(u)}function Pj(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 Aj(e,t){return e>0&&e<t}var P8=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Xf(e,t){const r=Dt(e),n=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),y.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ga(e,t){const r=Dt(t);nr(()=>{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 Dj=bj,A8=kj,D8=Nj;const Qf=y.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Dj,{ref:n,className:le("relative overflow-hidden",e),...r,children:[c.jsx(A8,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(Oj,{}),c.jsx(D8,{})]}));Qf.displayName=Dj.displayName;const Oj=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>c.jsx(ay,{ref:n,orientation:t,className:le("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:c.jsx(Tj,{className:"relative flex-1 rounded-full bg-border"})}));Oj.displayName=ay.displayName;const li=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"]]]),ew=e=>li.get(e),Ci=pe.union([pe.literal("aliyun"),pe.literal("tencent"),pe.literal("ssh"),pe.literal("webhook"),pe.literal("cloudflare"),pe.literal("qiniu"),pe.literal("namesilo"),pe.literal("godaddy")],{message:"请选择云服务商"}),Ei=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},O8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,secretId:pe.string().min(1).max(64),secretKey:pe.string().min(1).max(64)});let i={secretId:"",secretKey:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:i.secretId,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{secretId:l.secretId,secretKey:l.secretKey}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretId"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入SecretId",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},M8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,accessKeyId:pe.string().min(1).max(64),accessSecretId:pe.string().min(1).max(64)});let i={accessKeyId:"",accessKeySecret:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:i.accessKeyId,accessSecretId:i.accessKeySecret}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessKeyId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeyId"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入AccessKeyId",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessSecretId",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKeySecret"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入AccessKeySecret",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},Ud=y.forwardRef(({className:e,...t},r)=>c.jsx("textarea",{className:le("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}));Ud.displayName="Textarea";const uy=({className:e,trigger:t})=>{const{reloadAccessGroups:r}=Zr(),[n,s]=y.useState(!1),i=pe.object({name:pe.string().min(1).max(64)}),o=Tr({resolver:Nr(i),defaultValues:{name:""}}),a=async l=>{try{await FF({name:l.name}),r(),s(!1)}catch(u){Object.entries(u.response.data).forEach(([f,m])=>{o.setError(f,{type:"manual",message:m.message})})}};return c.jsxs(sy,{onOpenChange:s,open:n,children:[c.jsx(iy,{asChild:!0,className:le(e),children:t}),c.jsxs(Zf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Kf,{children:c.jsx(Gf,{children:"添加分组"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"组名"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入组名",...l,type:"text"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})]})]})},I8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n,reloadAccessGroups:s,config:{accessGroups:i}}=Zr(),o=y.useRef(null),[a,l]=y.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=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,host:pe.string().refine(h=>f.test(h)||d.test(h),{message:"请输入正确的域名或IP"}),group:pe.string().optional(),port:pe.string().min(1).max(5),username:pe.string().min(1).max(64),password:pe.string().min(0).max(64),key:pe.string().min(0).max(20480),keyFile:pe.any().optional(),command:pe.string().min(1).max(2048),certPath:pe.string().min(0).max(2048),keyPath:pe.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=Tr({resolver:Nr(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}}),g=async h=>{console.log(h);let w=h.group;w=="emptyId"&&(w="");const C={id:h.id,name:h.name,configType:h.configType,usage:Ei(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 E=await bi(C);t(),C.id=E.id,C.created=E.created,C.updated=E.updated,h.id?n(C):r(C),w!=u&&(u&&await F0({id:u,"access-":C.id}),w&&await F0({id:w,"access+":C.id})),s()}catch(E){Object.entries(E.response.data).forEach(([R,P])=>{x.setError(R,{type:"manual",message:P.message})});return}},_=async h=>{var j;const w=(j=h.target.files)==null?void 0:j[0];if(!w)return;const C=w;l(C.name);const E=await u6(C);x.setValue("key",E)},p=()=>{var h;console.log(o.current),(h=o.current)==null||h.click()};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...x,children:c.jsxs("form",{onSubmit:h=>{h.stopPropagation(),x.handleSubmit(g)(h)},className:"space-y-3",children:[c.jsx(Te,{control:x.control,name:"name",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"group",render:({field:h})=>c.jsxs(Ce,{children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"授权配置组(用于将一个域名证书部署到多个 ssh 主机)"}),c.jsx(uy,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Ru,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Pi,{...h,value:h.value,defaultValue:"emptyId",onValueChange:w=>{x.setValue("group",w)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择分组"})}),c.jsxs(Zs,{children:[c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(w=>c.jsx(fn,{value:w.id?w.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:w.name})},w.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"id",render:({field:h})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"configType",render:({field:h})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...h})}),c.jsx(Se,{})]})}),c.jsxs("div",{className:"flex space-x-2",children:[c.jsx(Te,{control:x.control,name:"host",render:({field:h})=>c.jsxs(Ce,{className:"grow",children:[c.jsx(Ee,{children:"服务器HOST"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入Host",...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"port",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SSH端口"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入Port",...h,type:"number"})}),c.jsx(Se,{})]})})]}),c.jsx(Te,{control:x.control,name:"username",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入用户名",...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"password",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入密码",...h,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"key",render:({field:h})=>c.jsxs(Ce,{hidden:!0,children:[c.jsx(Ee,{children:"Key使用证书登录"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入Key",...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"keyFile",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Key使用证书登录"}),c.jsx(je,{children:c.jsxs("div",{children:[c.jsx(Ge,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:p,children:a||"请选择文件"}),c.jsx(Ie,{placeholder:"请输入Key",...h,ref:o,className:"hidden",hidden:!0,type:"file",onChange:_})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"certPath",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"证书上传路径"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入证书上传路径",...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"keyPath",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"私钥上传路径"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入私钥上传路径",...h})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:x.control,name:"command",render:({field:h})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Command"}),c.jsx(je,{children:c.jsx(Ud,{placeholder:"请输入要执行的命令",...h})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},L8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,url:pe.string().url()});let i={url:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:i.url}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{url:l.url}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"url",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"Webhook Url"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入Webhook Url",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},F8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,dnsApiToken:pe.string().min(1).max(64)});let i={dnsApiToken:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:i.dnsApiToken}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{dnsApiToken:l.dnsApiToken}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"dnsApiToken",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"CLOUD_DNS_API_TOKEN"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},z8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,accessKey:pe.string().min(1).max(64),secretKey:pe.string().min(1).max(64)});let i={accessKey:"",secretKey:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"qiniu",accessKey:i.accessKey,secretKey:i.secretKey}}),a=async l=>{const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{accessKey:l.accessKey,secretKey:l.secretKey}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})});return}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"accessKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"AccessKey"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入AccessKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"secretKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"SecretKey"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入SecretKey",...l})}),c.jsx(Se,{})]})}),c.jsx(Se,{}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},U8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,apiKey:pe.string().min(1).max(64)});let i={apiKey:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"namesilo",apiKey:i.apiKey}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{apiKey:l.apiKey}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"NAMESILO_API_KEY"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入NAMESILO_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})},V8=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=Zr(),s=pe.object({id:pe.string().optional(),name:pe.string().min(1).max(64),configType:Ci,apiKey:pe.string().min(1).max(64),apiSecret:pe.string().min(1).max(64)});let i={apiKey:"",apiSecret:""};e&&(i=e.config);const o=Tr({resolver:Nr(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"godaddy",apiKey:i.apiKey,apiSecret:i.apiSecret}}),a=async l=>{console.log(l);const u={id:l.id,name:l.name,configType:l.configType,usage:Ei(l.configType),config:{apiKey:l.apiKey,apiSecret:l.apiSecret}};try{const d=await bi(u);if(t(),u.id=d.id,u.created=d.created,u.updated=d.updated,l.id){n(u);return}r(u)}catch(d){Object.entries(d.response.data).forEach(([m,v])=>{o.setError(m,{type:"manual",message:v.message})})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:c.jsx(Rr,{...o,children:c.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),o.handleSubmit(a)(l)},className:"space-y-8",children:[c.jsx(Te,{control:o.control,name:"name",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"名称"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入授权名称",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"id",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"configType",render:({field:l})=>c.jsxs(Ce,{className:"hidden",children:[c.jsx(Ee,{children:"配置类型"}),c.jsx(je,{children:c.jsx(Ie,{...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiKey",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_KEY"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入GODADDY_API_KEY",...l})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:o.control,name:"apiSecret",render:({field:l})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"GODADDY_API_SECRET"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入GODADDY_API_SECRET",...l})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})})};function yl({trigger:e,op:t,data:r,className:n}){const[s,i]=y.useState(!1),o=Array.from(li.keys()),[a,l]=y.useState((r==null?void 0:r.configType)||"");let u=c.jsx(c.Fragment,{children:" "});switch(a){case"tencent":u=c.jsx(O8,{data:r,onAfterReq:()=>{i(!1)}});break;case"aliyun":u=c.jsx(M8,{data:r,onAfterReq:()=>{i(!1)}});break;case"ssh":u=c.jsx(I8,{data:r,onAfterReq:()=>{i(!1)}});break;case"webhook":u=c.jsx(L8,{data:r,onAfterReq:()=>{i(!1)}});break;case"cloudflare":u=c.jsx(F8,{data:r,onAfterReq:()=>{i(!1)}});break;case"qiniu":u=c.jsx(z8,{data:r,onAfterReq:()=>{i(!1)}});break;case"namesilo":u=c.jsx(U8,{data:r,onAfterReq:()=>{i(!1)}});break;case"godaddy":u=c.jsx(V8,{data:r,onAfterReq:()=>{i(!1)}});break}const d=f=>f==a?"border-primary":"";return c.jsxs(sy,{onOpenChange:i,open:s,children:[c.jsx(iy,{asChild:!0,className:le(n),children:e}),c.jsxs(Zf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Kf,{children:c.jsxs(Gf,{children:[t=="add"?"添加":"编辑","授权"]})}),c.jsx(Qf,{className:"max-h-[80vh]",children:c.jsxs("div",{className:"container py-3",children:[c.jsx(ry,{children:"服务商"}),c.jsxs(Pi,{onValueChange:f=>{console.log(f),l(f)},defaultValue:a,children:[c.jsx(Ys,{className:"mt-3",children:c.jsx(Ai,{placeholder:"请选择服务商"})}),c.jsx(Zs,{children:c.jsxs(sl,{children:[c.jsx(Uo,{children:"服务商"}),o.map(f=>{var m,v;return c.jsx(fn,{value:f,children:c.jsxs("div",{className:le("flex items-center space-x-2 rounded cursor-pointer",d(f)),children:[c.jsx("img",{src:(m=li.get(f))==null?void 0:m[1],className:"h-6 w-6"}),c.jsx("div",{children:(v=li.get(f))==null?void 0:v[0]})]})},f)})]})})]}),u]})})]})]})}const $8=({className:e,trigger:t})=>{const{config:{emails:r},setEmails:n}=Zr(),[s,i]=y.useState(!1),o=pe.object({email:pe.string().email()}),a=Tr({resolver:Nr(o),defaultValues:{email:""}}),l=async u=>{if(r.content.emails.includes(u.email)){a.setError("email",{message:"邮箱已存在"});return}const d=[...r.content.emails,u.email];try{const f=await VF({...r,name:"emails",content:{emails:d}});n(f),a.reset(),a.clearErrors(),i(!1)}catch(f){Object.entries(f.response.data).forEach(([v,x])=>{a.setError(v,{type:"manual",message:x.message})})}};return c.jsxs(sy,{onOpenChange:i,open:s,children:[c.jsx(iy,{asChild:!0,className:le(e),children:t}),c.jsxs(Zf,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[c.jsx(Kf,{children:c.jsx(Gf,{children:"添加邮箱"})}),c.jsx("div",{className:"container py-3",children:c.jsx(Rr,{...a,children:c.jsxs("form",{onSubmit:u=>{console.log(u),u.stopPropagation(),a.handleSubmit(l)(u)},className:"space-y-8",children:[c.jsx(Te,{control:a.control,name:"email",render:({field:u})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"邮箱"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入邮箱",...u,type:"email"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})]})]})},B8=()=>{const{config:{accesses:e,emails:t,accessGroups:r}}=Zr(),[n,s]=y.useState(),i=jn(),[o,a]=y.useState("base"),[l,u]=y.useState(n?n.targetType:"");y.useEffect(()=>{const p=new URLSearchParams(i.search).get("id");p&&(async()=>{const w=await m6(p);s(w),u(w.targetType)})()},[i.search]);const d=pe.object({id:pe.string().optional(),domain:pe.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),email:pe.string().email().optional(),access:pe.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:pe.string().optional(),targetType:pe.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"}),variables:pe.string().optional(),group:pe.string().optional(),nameservers:pe.string().optional()}),f=Tr({resolver:Nr(d),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:"",nameservers:""}});y.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(l=="")return!0;const p=l.split("-");return _.configType===p[0]}),{toast:v}=Ra(),x=jr(),g=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 pm(w);let C="域名编辑成功";w.id==""&&(C="域名添加成功"),v({title:"成功",description:C}),x("/domains")}catch(C){Object.entries(C.response.data).forEach(([j,R])=>{f.setError(j,{type:"manual",message:R.message})});return}};return c.jsx(c.Fragment,{children:c.jsxs("div",{className:"",children:[c.jsx(Gv,{}),c.jsxs("div",{className:" h-5 text-muted-foreground",children:[n!=null&&n.id?"编辑":"新增","域名"]}),c.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[c.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:[c.jsx("div",{className:le("cursor-pointer text-right",o==="base"?"text-primary":""),onClick:()=>{a("base")},children:"基础设置"}),c.jsx("div",{className:le("cursor-pointer text-right",o==="advance"?"text-primary":""),onClick:()=>{a("advance")},children:"高级设置"})]}),c.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:c.jsx(Rr,{...f,children:c.jsxs("form",{onSubmit:f.handleSubmit(g),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:f.control,name:"domain",render:({field:_})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"域名"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入域名",..._})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"email",render:({field:_})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"Email申请证书需要提供邮箱"}),c.jsx($8,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Ru,{size:14}),"新增"]})})]}),c.jsx(je,{children:c.jsxs(Pi,{..._,value:_.value,onValueChange:p=>{f.setValue("email",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择邮箱"})}),c.jsx(Zs,{children:c.jsxs(sl,{children:[c.jsx(Uo,{children:"邮箱列表"}),t.content.emails.map(p=>c.jsx(fn,{value:p,children:c.jsx("div",{children:p})},p))]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"access",render:({field:_})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"flex w-full justify-between",children:[c.jsx("div",{children:"DNS 服务商授权配置"}),c.jsx(yl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Ru,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Pi,{..._,value:_.value,onValueChange:p=>{f.setValue("access",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择授权配置"})}),c.jsx(Zs,{children:c.jsxs(sl,{children:[c.jsx(Uo,{children:"服务商授权配置"}),e.filter(p=>p.usage!="deploy").map(p=>{var h;return c.jsx(fn,{value:p.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=li.get(p.configType))==null?void 0:h[1]}),c.jsx("div",{children:p.name})]})},p.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"targetType",render:({field:_})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsx(Ee,{children:"部署服务类型"}),c.jsx(je,{children:c.jsxs(Pi,{..._,onValueChange:p=>{u(p),f.setValue("targetType",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择部署服务类型"})}),c.jsx(Zs,{children:c.jsxs(sl,{children:[c.jsx(Uo,{children:"部署服务类型"}),y8.map(p=>{var h,w;return c.jsx(fn,{value:p,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=Cm.get(p))==null?void 0:h[1]}),c.jsx("div",{children:(w=Cm.get(p))==null?void 0:w[0]})]})},p)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"targetAccess",render:({field:_})=>c.jsxs(Ce,{hidden:o!="base",children:[c.jsxs(Ee,{className:"w-full flex justify-between",children:[c.jsx("div",{children:"部署服务商授权配置"}),c.jsx(yl,{trigger:c.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[c.jsx(Ru,{size:14}),"新增"]}),op:"add"})]}),c.jsx(je,{children:c.jsxs(Pi,{..._,onValueChange:p=>{f.setValue("targetAccess",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择授权配置"})}),c.jsx(Zs,{children:c.jsxs(sl,{children:[c.jsxs(Uo,{children:["服务商授权配置",f.getValues().targetAccess]}),c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),m.map(p=>{var h;return c.jsx(fn,{value:p.id,children:c.jsxs("div",{className:"flex items-center space-x-2",children:[c.jsx("img",{className:"w-6",src:(h=li.get(p.configType))==null?void 0:h[1]}),c.jsx("div",{children:p.name})]})},p.id)})]})})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"group",render:({field:_})=>c.jsxs(Ce,{hidden:o!="advance"||l!="ssh",children:[c.jsx(Ee,{className:"w-full flex justify-between",children:c.jsx("div",{children:"部署配置组(用于将一个域名证书部署到多个 ssh 主机)"})}),c.jsx(je,{children:c.jsxs(Pi,{..._,value:_.value,defaultValue:"emptyId",onValueChange:p=>{f.setValue("group",p)},children:[c.jsx(Ys,{children:c.jsx(Ai,{placeholder:"请选择分组"})}),c.jsxs(Zs,{children:[c.jsx(fn,{value:"emptyId",children:c.jsx("div",{className:le("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=>c.jsx(fn,{value:p.id?p.id:"",children:c.jsx("div",{className:le("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"variables",render:({field:_})=>c.jsxs(Ce,{hidden:o!="advance",children:[c.jsx(Ee,{children:"变量"}),c.jsx(je,{children:c.jsx(Ud,{placeholder:`可在SSH部署中使用,形如:
key=val;
key2=val2;`,..._,className:"placeholder:whitespace-pre-wrap"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:f.control,name:"nameservers",render:({field:_})=>c.jsxs(Ce,{hidden:o!="advance",children:[c.jsx(Ee,{children:"域名服务器"}),c.jsx(je,{children:c.jsx(Ud,{placeholder:`自定义域名服务器,多个用分号隔开,如:
8.8.8.8;
8.8.4.4;`,..._,className:"placeholder:whitespace-pre-wrap"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"保存"})})]})})})]})]})})},Mj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Mj.displayName="Card";const Ij=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex flex-col space-y-1.5 p-6",e),...t}));Ij.displayName="CardHeader";const Lj=y.forwardRef(({className:e,...t},r)=>c.jsx("h3",{ref:r,className:le("text-2xl font-semibold leading-none tracking-tight",e),...t}));Lj.displayName="CardTitle";const Fj=y.forwardRef(({className:e,...t},r)=>c.jsx("p",{ref:r,className:le("text-sm text-muted-foreground",e),...t}));Fj.displayName="CardDescription";const zj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("p-6 pt-0",e),...t}));zj.displayName="CardContent";const Uj=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("flex items-center p-6 pt-0",e),...t}));Uj.displayName="CardFooter";const ac=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",W8=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=Zr(),{toast:r}=Ra(),n=jr(),s=async o=>{try{await LF(o),t()}catch(a){r({title:"删除失败",description:ac(a),variant:"destructive"});return}},i=()=>{n("/access")};return c.jsxs("div",{className:"mt-10",children:[c.jsx(ea,{when:e.length==0,children:c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(Qx,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),c.jsx(uy,{trigger:c.jsx(Ge,{children:"新增授权组"}),className:"mt-3"})]})})}),c.jsx(Qf,{className:"h-[75vh] overflow-hidden",children:c.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(o=>c.jsxs(Mj,{className:"w-full md:w-[350px]",children:[c.jsxs(Ij,{children:[c.jsx(Lj,{children:o.name}),c.jsxs(Fj,{children:["共有",o.expand?o.expand.access.length:0,"个部署授权配置"]})]}),c.jsx(zj,{className:"min-h-[180px]",children:o.expand?c.jsx(c.Fragment,{children:o.expand.access.slice(0,3).map(a=>c.jsx("div",{className:"flex flex-col mb-3",children:c.jsxs("div",{className:"flex items-center",children:[c.jsx("div",{className:"",children:c.jsx("img",{src:ew(a.configType)[1],alt:"provider",className:"w-8 h-8"})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:a.name}),c.jsx("div",{className:"text-xs text-muted-foreground",children:ew(a.configType)[0]})]})]})},a.id))}):c.jsx(c.Fragment,{children:c.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[c.jsx("div",{children:c.jsx(Qx,{size:40})}),c.jsx("div",{className:"ml-2",children:"暂无部署授权配置,请添加后开始使用吧"})]})})}),c.jsx(Uj,{children:c.jsxs("div",{className:"flex justify-end w-full",children:[c.jsx(ea,{when:!!(o.expand&&o.expand.access.length>0),children:c.jsx("div",{children:c.jsx(Ge,{size:"sm",variant:"link",onClick:()=>{n(`/access?accessGroupId=${o.id}&tab=access`,{replace:!0})},children:"所有授权"})})}),c.jsx(ea,{when:!o.expand||o.expand.access.length==0,children:c.jsx("div",{children:c.jsx(Ge,{size:"sm",onClick:i,children:"新增授权"})})}),c.jsx("div",{className:"ml-3",children:c.jsxs(SC,{children:[c.jsx(kC,{asChild:!0,children:c.jsx(Ge,{variant:"destructive",size:"sm",children:"删除"})}),c.jsxs(Fv,{children:[c.jsxs(zv,{children:[c.jsx(Vv,{className:"dark:text-gray-200",children:"删除组"}),c.jsx($v,{children:"确定要删除部署授权组吗?"})]}),c.jsxs(Uv,{children:[c.jsx(Wv,{className:"dark:text-gray-200",children:"取消"}),c.jsx(Bv,{onClick:()=>{s(o.id?o.id:"")},children:"确认"})]})]})]})})]})})]}))})})]})};var dy="Tabs",[H8,yU]=Hr(dy,[gf]),Vj=gf(),[Y8,fy]=H8(dy),$j=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=mc(a),[f,m]=_s({prop:n,onChange:s,defaultProp:i});return c.jsx(Y8,{scope:r,baseId:xn(),value:f,onValueChange:m,orientation:o,dir:d,activationMode:l,children:c.jsx(Le.div,{dir:d,"data-orientation":o,...u,ref:t})})});$j.displayName=dy;var Bj="TabsList",Wj=y.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,i=fy(Bj,r),o=Vj(r);return c.jsx(xb,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:c.jsx(Le.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});Wj.displayName=Bj;var Hj="TabsTrigger",Yj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=e,o=fy(Hj,r),a=Vj(r),l=Gj(o.baseId,n),u=qj(o.baseId,n),d=n===o.value;return c.jsx(wb,{asChild:!0,...a,focusable:!s,active:d,children:c.jsx(Le.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:ce(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ce(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ce(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!s&&f&&o.onValueChange(n)})})})});Yj.displayName=Hj;var Zj="TabsContent",Kj=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=e,a=fy(Zj,r),l=Gj(a.baseId,n),u=qj(a.baseId,n),d=n===a.value,f=y.useRef(d);return y.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),c.jsx(yr,{present:s||d,children:({present:m})=>c.jsx(Le.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});Kj.displayName=Zj;function Gj(e,t){return`${e}-trigger-${t}`}function qj(e,t){return`${e}-content-${t}`}var Z8=$j,Xj=Wj,Qj=Yj,Jj=Kj;const eT=Z8,hy=y.forwardRef(({className:e,...t},r)=>c.jsx(Xj,{ref:r,className:le("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));hy.displayName=Xj.displayName;const lc=y.forwardRef(({className:e,...t},r)=>c.jsx(Qj,{ref:r,className:le("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}));lc.displayName=Qj.displayName;const Vd=y.forwardRef(({className:e,...t},r)=>c.jsx(Jj,{ref:r,className:le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Vd.displayName=Jj.displayName;const K8=()=>{const{config:e,deleteAccess:t}=Zr(),{accesses:r}=e,n=10,s=Math.ceil(r.length/n),i=jr(),o=jn(),a=new URLSearchParams(o.search),l=a.get("page"),u=l?Number(l):1,d=a.get("tab"),f=a.get("accessGroupId"),m=(u-1)*n,v=m+n,x=async _=>{const p=await IF(_);t(p.id)},g=_=>{a.set("tab",_),i({search:a.toString()})};return c.jsxs("div",{className:"",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),d!="access_group"?c.jsx(yl,{trigger:c.jsx(Ge,{children:"添加授权"}),op:"add"}):c.jsx(uy,{trigger:c.jsx(Ge,{children:"添加授权组"})})]}),c.jsxs(eT,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[c.jsxs(hy,{className:"space-x-5 px-3",children:[c.jsx(lc,{value:"access",onClick:()=>{g("access")},children:"授权管理"}),c.jsx(lc,{value:"access_group",onClick:()=>{g("access_group")},children:"授权组管理"})]}),c.jsx(Vd,{value:"access",children:r.length===0?c.jsxs("div",{className:"flex flex-col items-center mt-10",children:[c.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:c.jsx(NP,{size:40,className:"text-primary"})}),c.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),c.jsx(yl,{trigger:c.jsx(Ge,{children:"添加授权"}),op:"add",className:"mt-3"})]}):c.jsxs(c.Fragment,{children:[c.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:[c.jsx("div",{className:"w-48",children:"名称"}),c.jsx("div",{className:"w-48",children:"服务商"}),c.jsx("div",{className:"w-52",children:"创建时间"}),c.jsx("div",{className:"w-52",children:"更新时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.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 c.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:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:_.name}),c.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[c.jsx("img",{src:(p=li.get(_.configType))==null?void 0:p[1],className:"w-6"}),c.jsx("div",{children:(h=li.get(_.configType))==null?void 0:h[0]})]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于"," ",_.created&&fa(_.created)]}),c.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于"," ",_.updated&&fa(_.updated)]}),c.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[c.jsx(yl,{trigger:c.jsx(Ge,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:_}),c.jsx(Bt,{orientation:"vertical",className:"h-4 mx-2"}),c.jsx(Ge,{variant:"link",className:"p-0",onClick:()=>{x(_)},children:"删除"})]})]},_.id)}),c.jsx(nC,{totalPages:s,currentPage:u,onPageChange:_=>{a.set("page",_.toString()),i({search:a.toString()})}})]})}),c.jsx(Vd,{value:"access_group",children:c.jsx(W8,{})})]})]})},G8=pc("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=y.forwardRef(({className:e,variant:t,...r},n)=>c.jsx("div",{ref:n,role:"alert",className:le(G8({variant:t}),e),...r}));py.displayName="Alert";const my=y.forwardRef(({className:e,...t},r)=>c.jsx("h5",{ref:r,className:le("mb-1 font-medium leading-none tracking-tight",e),...t}));my.displayName="AlertTitle";const gy=y.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,className:le("text-sm [&_p]:leading-relaxed",e),...t}));gy.displayName="AlertDescription";const tT=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 it().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},q8=()=>{const e=jr(),[t,r]=y.useState(),[n]=mP(),s=n.get("domain");return y.useEffect(()=>{(async()=>{const o={};s&&(o.domain=s);const a=await tT(o);r(a.items)})()},[s]),c.jsxs(Qf,{className:"h-[80vh] overflow-hidden",children:[c.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?c.jsxs(c.Fragment,{children:[c.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:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(i=>{var o,a;return c.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:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Lv,{deployment:i})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Dv,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:fa(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(ov,{children:[c.jsx(av,{asChild:!0,children:c.jsx(Ge,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(bf,{className:"sm:max-w-5xl",children:[c.jsx(lv,{children:c.jsxs(cv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]}):c.jsx(c.Fragment,{children:c.jsxs(py,{className:"max-w-[40em] mx-auto mt-20",children:[c.jsx(my,{children:"暂无数据"}),c.jsxs(gy,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(I1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Ge,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},X8=pe.object({username:pe.string().email({message:"请输入正确的邮箱地址"}),password:pe.string().min(10,{message:"密码至少10个字符"})}),Q8=()=>{const e=Tr({resolver:Nr(X8),defaultValues:{username:"",password:""}}),t=async n=>{try{await it().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const i=ac(s);e.setError("username",{message:i}),e.setError("password",{message:i})}},r=jr();return c.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[c.jsx("div",{className:"flex justify-center mb-10",children:c.jsx("img",{src:"/vite.svg",className:"w-16"})}),c.jsx(Rr,{...e,children:c.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:e.control,name:"username",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"用户名"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"email",...n})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:e.control,name:"password",render:({field:n})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"密码"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"shadcn",...n,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"登录"})})]})})]})},J8=()=>it().authStore.isValid&&it().authStore.isAdmin?c.jsx(A1,{to:"/"}):c.jsxs("div",{className:"container",children:[c.jsx(Cg,{}),c.jsx(Bk,{})]}),eU=pe.object({oldPassword:pe.string().min(10,{message:"密码至少10个字符"}),newPassword:pe.string().min(10,{message:"密码至少10个字符"}),confirmPassword:pe.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),tU=()=>{const{toast:e}=Ra(),t=jr(),r=Tr({resolver:Nr(eU),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var i,o;try{await it().admins.authWithPassword((i=it().authStore.model)==null?void 0:i.email,s.oldPassword)}catch(a){const l=ac(a);r.setError("oldPassword",{message:l})}try{await it().admins.update((o=it().authStore.model)==null?void 0:o.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),it().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=ac(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"w-full md:max-w-[35em]",children:c.jsx(Rr,{...r,children:c.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:r.control,name:"oldPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"当前密码"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"当前密码",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:r.control,name:"newPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"新密码"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"newPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx(Te,{control:r.control,name:"confirmPassword",render:({field:s})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"确认密码"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"confirmPassword",...s,type:"password"})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Ge,{type:"submit",children:"确认修改"})})]})})})})},rU=()=>{const e=jn(),[t,r]=y.useState("account"),n=jr();return y.useEffect(()=>{const i=e.pathname.split("/")[2];r(i)},[e]),c.jsxs("div",{children:[c.jsx(Gv,{}),c.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"偏好设置"}),c.jsx("div",{className:"w-full mt-5 p-3 flex justify-center",children:c.jsxs(eT,{defaultValue:"account",className:"",value:t,children:[c.jsxs(hy,{children:[c.jsxs(lc,{value:"account",onClick:()=>{n("/setting/account")},className:"px-5",children:[c.jsx(MP,{size:14}),c.jsx("div",{className:"ml-1",children:"账户"})]}),c.jsxs(lc,{value:"password",onClick:()=>{n("/setting/password")},className:"px-5",children:[c.jsx(TP,{size:14}),c.jsx("div",{className:"ml-1",children:"密码"})]})]}),c.jsx(Vd,{value:t,children:c.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:c.jsx(Cg,{})})})]})})]})},nU=()=>{const[e,t]=y.useState(),[r,n]=y.useState(),s=jr();return y.useEffect(()=>{(async()=>{const o=await p6();t(o)})()},[]),y.useEffect(()=>{(async()=>{const a=await tT({perPage:8});n(a.items)})()},[]),c.jsxs("div",{className:"flex flex-col",children:[c.jsx("div",{className:"flex justify-between items-center",children:c.jsx("div",{className:"text-muted-foreground",children:"控制面板"})}),c.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(DP,{size:48,strokeWidth:1,className:"text-blue-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"所有"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?c.jsx(dr,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[c.jsx("div",{className:"p-3",children:c.jsx(_P,{size:48,strokeWidth:1,className:"text-red-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"即将过期"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?c.jsx(dr,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(RP,{size:48,strokeWidth:1,className:"text-green-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"启用中"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?c.jsx(dr,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]}),c.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[c.jsx("div",{className:"p-3",children:c.jsx(xP,{size:48,strokeWidth:1,className:"text-gray-400"})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground font-semibold",children:"未启用"}),c.jsxs("div",{className:"flex items-baseline",children:[c.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?c.jsx(dr,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),c.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:"个"})]})]})]})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:"部署历史"}),(r==null?void 0:r.length)==0?c.jsx(c.Fragment,{children:c.jsxs(py,{className:"max-w-[40em] mt-10",children:[c.jsx(my,{children:"暂无数据"}),c.jsxs(gy,{children:[c.jsxs("div",{className:"flex items-center mt-5",children:[c.jsx("div",{children:c.jsx(I1,{className:"text-yellow-400",size:36})}),c.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),c.jsx("div",{className:"mt-2 flex justify-end",children:c.jsx(Ge,{onClick:()=>{s("/edit")},children:"添加域名"})})]})]})}):c.jsxs(c.Fragment,{children:[c.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:[c.jsx("div",{className:"w-48",children:"域名"}),c.jsx("div",{className:"w-24",children:"状态"}),c.jsx("div",{className:"w-56",children:"阶段"}),c.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),c.jsx("div",{className:"grow",children:"操作"})]}),c.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),r==null?void 0:r.map(i=>{var o,a;return c.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:[c.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(o=i.expand.domain)==null?void 0:o.domain}),c.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Lv,{deployment:i})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:c.jsx(Dv,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),c.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:fa(i.deployedAt)}),c.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:c.jsxs(ov,{children:[c.jsx(av,{asChild:!0,children:c.jsx(Ge,{variant:"link",className:"p-0",children:"日志"})}),c.jsxs(bf,{className:"sm:max-w-5xl",children:[c.jsx(lv,{children:c.jsxs(cv,{children:[(a=i.expand.domain)==null?void 0:a.domain,"-",i.id,"部署详情"]})}),c.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&c.jsx(c.Fragment,{children:i.log.check.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.apply&&c.jsx(c.Fragment,{children:i.log.apply.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(u=>c.jsx("div",{className:"mt-1 text-green-600",children:u})),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),i.log.deploy&&c.jsx(c.Fragment,{children:i.log.deploy.map(l=>c.jsxs("div",{className:"flex flex-col mt-2",children:[c.jsxs("div",{className:"flex",children:[c.jsxs("div",{children:["[",l.time,"]"]}),c.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&c.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},i.id)})]})]})]})},sU=pe.object({email:pe.string().email("请输入正确的邮箱")}),iU=()=>{var o;const{toast:e}=Ra(),t=jr(),[r,n]=y.useState(!1),s=Tr({resolver:Nr(sU),defaultValues:{email:(o=it().authStore.model)==null?void 0:o.email}}),i=async a=>{var l;try{await it().admins.update((l=it().authStore.model)==null?void 0:l.id,{email:a.email}),it().authStore.clear(),e({title:"修改账户邮箱功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(u){const d=ac(u);e({title:"修改账户邮箱失败",description:d,variant:"destructive"})}};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"w-full md:max-w-[35em]",children:c.jsx(Rr,{...s,children:c.jsxs("form",{onSubmit:s.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[c.jsx(Te,{control:s.control,name:"email",render:({field:a})=>c.jsxs(Ce,{children:[c.jsx(Ee,{children:"邮箱"}),c.jsx(je,{children:c.jsx(Ie,{placeholder:"请输入邮箱",...a,type:"email",onChange:l=>{n(!0),s.setValue("email",l.target.value)}})}),c.jsx(Se,{})]})}),c.jsx("div",{className:"flex justify-end",children:r?c.jsx(Ge,{type:"submit",children:"确认修改"}):c.jsx(Ge,{type:"submit",disabled:!0,variant:"secondary",children:"确认修改"})})]})})})})},oU=eP([{path:"/",element:c.jsx(XF,{}),children:[{path:"/",element:c.jsx(nU,{})},{path:"/domains",element:c.jsx(x6,{})},{path:"/edit",element:c.jsx(B8,{})},{path:"/access",element:c.jsx(K8,{})},{path:"/history",element:c.jsx(q8,{})},{path:"/setting",element:c.jsx(rU,{}),children:[{path:"/setting/password",element:c.jsx(tU,{})},{path:"/setting/account",element:c.jsx(iU,{})}]}]},{path:"/login",element:c.jsx(J8,{}),children:[{path:"/login",element:c.jsx(Q8,{})}]},{path:"/about",element:c.jsx("div",{children:"About"})}]);qh.createRoot(document.getElementById("root")).render(c.jsx(tt.StrictMode,{children:c.jsx(WF,{defaultTheme:"system",storageKey:"vite-ui-theme",children:c.jsx(cP,{router:oU})})}))});export default aU();