certimate/ui/dist/assets/index-C0ENR1vV.js
2024-09-02 14:36:46 +08:00

250 lines
696 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 uT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z6=uT((sU,Ou)=>{function gw(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var Pc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vw={exports:{}},Od={},yw={exports:{}},Qe={};/**
* @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 Jl=Symbol.for("react.element"),dT=Symbol.for("react.portal"),fT=Symbol.for("react.fragment"),hT=Symbol.for("react.strict_mode"),pT=Symbol.for("react.profiler"),mT=Symbol.for("react.provider"),gT=Symbol.for("react.context"),vT=Symbol.for("react.forward_ref"),yT=Symbol.for("react.suspense"),wT=Symbol.for("react.memo"),xT=Symbol.for("react.lazy"),zv=Symbol.iterator;function _T(e){return e===null||typeof e!="object"?null:(e=zv&&e[zv]||e["@@iterator"],typeof e=="function"?e:null)}var ww={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xw=Object.assign,_w={};function ia(e,t,r){this.props=e,this.context=t,this.refs=_w,this.updater=r||ww}ia.prototype.isReactComponent={};ia.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")};ia.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bw(){}bw.prototype=ia.prototype;function hm(e,t,r){this.props=e,this.context=t,this.refs=_w,this.updater=r||ww}var pm=hm.prototype=new bw;pm.constructor=hm;xw(pm,ia.prototype);pm.isPureReactComponent=!0;var Uv=Array.isArray,Sw=Object.prototype.hasOwnProperty,mm={current:null},kw={key:!0,ref:!0,__self:!0,__source:!0};function Cw(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Sw.call(t,n)&&!kw.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),c=0;c<a;c++)l[c]=arguments[c+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:Jl,type:e,key:o,ref:i,props:s,_owner:mm.current}}function bT(e,t){return{$$typeof:Jl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jl}function ST(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Vv=/\/+/g;function Uf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ST(""+e.key):t.toString(36)}function lu(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Jl:case dT:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+Uf(i,0):n,Uv(s)?(r="",e!=null&&(r=e.replace(Vv,"$&/")+"/"),lu(s,t,r,"",function(c){return c})):s!=null&&(gm(s)&&(s=bT(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Vv,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Uv(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+Uf(o,a);i+=lu(o,t,r,l,s)}else if(l=_T(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+Uf(o,a++),i+=lu(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function jc(e,t,r){if(e==null)return e;var n=[],s=0;return lu(e,n,"","",function(o){return t.call(r,o,s++)}),n}function kT(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 mr={current:null},cu={transition:null},CT={ReactCurrentDispatcher:mr,ReactCurrentBatchConfig:cu,ReactCurrentOwner:mm};function Ew(){throw Error("act(...) is not supported in production builds of React.")}Qe.Children={map:jc,forEach:function(e,t,r){jc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return jc(e,function(){t++}),t},toArray:function(e){return jc(e,function(t){return t})||[]},only:function(e){if(!gm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Qe.Component=ia;Qe.Fragment=fT;Qe.Profiler=pT;Qe.PureComponent=hm;Qe.StrictMode=hT;Qe.Suspense=yT;Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CT;Qe.act=Ew;Qe.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=xw({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=mm.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Sw.call(t,l)&&!kw.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 c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Jl,type:e.type,key:s,ref:o,props:n,_owner:i}};Qe.createContext=function(e){return e={$$typeof:gT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mT,_context:e},e.Consumer=e};Qe.createElement=Cw;Qe.createFactory=function(e){var t=Cw.bind(null,e);return t.type=e,t};Qe.createRef=function(){return{current:null}};Qe.forwardRef=function(e){return{$$typeof:vT,render:e}};Qe.isValidElement=gm;Qe.lazy=function(e){return{$$typeof:xT,_payload:{_status:-1,_result:e},_init:kT}};Qe.memo=function(e,t){return{$$typeof:wT,type:e,compare:t===void 0?null:t}};Qe.startTransition=function(e){var t=cu.transition;cu.transition={};try{e()}finally{cu.transition=t}};Qe.unstable_act=Ew;Qe.useCallback=function(e,t){return mr.current.useCallback(e,t)};Qe.useContext=function(e){return mr.current.useContext(e)};Qe.useDebugValue=function(){};Qe.useDeferredValue=function(e){return mr.current.useDeferredValue(e)};Qe.useEffect=function(e,t){return mr.current.useEffect(e,t)};Qe.useId=function(){return mr.current.useId()};Qe.useImperativeHandle=function(e,t,r){return mr.current.useImperativeHandle(e,t,r)};Qe.useInsertionEffect=function(e,t){return mr.current.useInsertionEffect(e,t)};Qe.useLayoutEffect=function(e,t){return mr.current.useLayoutEffect(e,t)};Qe.useMemo=function(e,t){return mr.current.useMemo(e,t)};Qe.useReducer=function(e,t,r){return mr.current.useReducer(e,t,r)};Qe.useRef=function(e){return mr.current.useRef(e)};Qe.useState=function(e){return mr.current.useState(e)};Qe.useSyncExternalStore=function(e,t,r){return mr.current.useSyncExternalStore(e,t,r)};Qe.useTransition=function(){return mr.current.useTransition()};Qe.version="18.3.1";yw.exports=Qe;var y=yw.exports;const et=fm(y),Tw=gw({__proto__:null,default:et},[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 ET=y,TT=Symbol.for("react.element"),RT=Symbol.for("react.fragment"),NT=Object.prototype.hasOwnProperty,PT=ET.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jT={key:!0,ref:!0,__self:!0,__source:!0};function Rw(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)NT.call(t,n)&&!jT.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:TT,type:e,key:o,ref:i,props:s,_owner:PT.current}}Od.Fragment=RT;Od.jsx=Rw;Od.jsxs=Rw;vw.exports=Od;var u=vw.exports,Ih={},Nw={exports:{}},Fr={},Pw={exports:{}},jw={};/**
* @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,de=V>>>1;z<de;){var ne=2*(z+1)-1,se=Z[ne],Ee=ne+1,fe=Z[Ee];if(0>s(se,Q))Ee<V&&0>s(fe,se)?(Z[z]=fe,Z[Ee]=Q,z=Ee):(Z[z]=se,Z[ne]=Q,z=ne);else if(Ee<V&&0>s(fe,Q))Z[z]=fe,Z[Ee]=Q,z=Ee;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 o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],f=1,d=null,h=3,p=!1,w=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(Z){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=Z)n(c),I.sortIndex=I.expirationTime,t(l,I);else break;I=r(c)}}function C(Z){if(m=!1,_(Z),!w)if(r(l)!==null)w=!0,te(E);else{var I=r(c);I!==null&&$(C,I.startTime-Z)}}function E(Z,I){w=!1,m&&(m=!1,g(O),O=-1),p=!0;var Q=h;try{for(_(I),d=r(l);d!==null&&(!(d.expirationTime>I)||Z&&!q());){var z=d.callback;if(typeof z=="function"){d.callback=null,h=d.priorityLevel;var V=z(d.expirationTime<=I);I=e.unstable_now(),typeof V=="function"?d.callback=V:d===r(l)&&n(l),_(I)}else n(l);d=r(l)}if(d!==null)var de=!0;else{var ne=r(c);ne!==null&&$(C,ne.startTime-I),de=!1}return de}finally{d=null,h=Q,p=!1}}var T=!1,P=null,O=-1,j=5,L=-1;function q(){return!(e.unstable_now()-L<j)}function R(){if(P!==null){var Z=e.unstable_now();L=Z;var I=!0;try{I=P(!0,Z)}finally{I?F():(T=!1,P=null)}}else T=!1}var F;if(typeof v=="function")F=function(){v(R)};else if(typeof MessageChannel<"u"){var b=new MessageChannel,W=b.port2;b.port1.onmessage=R,F=function(){W.postMessage(null)}}else F=function(){x(R,0)};function te(Z){P=Z,T||(T=!0,F())}function $(Z,I){O=x(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(){w||p||(w=!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"):j=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(Z){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var Q=h;h=I;try{return Z()}finally{h=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=h;h=Z;try{return I()}finally{h=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:f++,callback:I,priorityLevel:Z,startTime:Q,expirationTime:V,sortIndex:-1},Q>z?(Z.sortIndex=Q,t(c,Z),r(l)===null&&Z===r(c)&&(m?(g(O),O=-1):m=!0,$(C,Q-z))):(Z.sortIndex=V,t(l,Z),w||p||(w=!0,te(E))),Z},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Z){var I=h;return function(){var Q=h;h=I;try{return Z.apply(this,arguments)}finally{h=Q}}}})(jw);Pw.exports=jw;var DT=Pw.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 OT=y,Lr=DT;function oe(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 Dw=new Set,ul={};function Ko(e,t){Zi(e,t),Zi(e+"Capture",t)}function Zi(e,t){for(ul[e]=t,e=0;e<t.length;e++)Dw.add(t[e])}var cs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lh=Object.prototype.hasOwnProperty,AT=/^[: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]*$/,Wv={},$v={};function MT(e){return Lh.call($v,e)?!0:Lh.call(Wv,e)?!1:AT.test(e)?$v[e]=!0:(Wv[e]=!0,!1)}function IT(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 LT(e,t,r,n){if(t===null||typeof t>"u"||IT(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 gr(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var rr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rr[e]=new gr(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 gr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rr[e]=new gr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rr[e]=new gr(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 gr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rr[e]=new gr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rr[e]=new gr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rr[e]=new gr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rr[e]=new gr(e,5,!1,e.toLowerCase(),null,!1,!1)});var vm=/[\-:]([a-z])/g;function ym(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(vm,ym);rr[t]=new gr(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(vm,ym);rr[t]=new gr(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(vm,ym);rr[t]=new gr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rr[e]=new gr(e,1,!1,e.toLowerCase(),null,!1,!1)});rr.xlinkHref=new gr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rr[e]=new gr(e,1,!1,e.toLowerCase(),null,!0,!0)});function wm(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")&&(LT(t,r,s,n)&&(r=null),n||s===null?MT(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 ys=OT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Dc=Symbol.for("react.element"),gi=Symbol.for("react.portal"),vi=Symbol.for("react.fragment"),xm=Symbol.for("react.strict_mode"),Fh=Symbol.for("react.profiler"),Ow=Symbol.for("react.provider"),Aw=Symbol.for("react.context"),_m=Symbol.for("react.forward_ref"),zh=Symbol.for("react.suspense"),Uh=Symbol.for("react.suspense_list"),bm=Symbol.for("react.memo"),As=Symbol.for("react.lazy"),Mw=Symbol.for("react.offscreen"),Bv=Symbol.iterator;function _a(e){return e===null||typeof e!="object"?null:(e=Bv&&e[Bv]||e["@@iterator"],typeof e=="function"?e:null)}var At=Object.assign,Vf;function La(e){if(Vf===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Vf=t&&t[1]||""}return`
`+Vf+e}var Wf=!1;function $f(e,t){if(!e||Wf)return"";Wf=!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(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),o=n.stack.split(`
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Wf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?La(e):""}function FT(e){switch(e.tag){case 5:return La(e.type);case 16:return La("Lazy");case 13:return La("Suspense");case 19:return La("SuspenseList");case 0:case 2:case 15:return e=$f(e.type,!1),e;case 11:return e=$f(e.type.render,!1),e;case 1:return e=$f(e.type,!0),e;default:return""}}function Vh(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 vi:return"Fragment";case gi:return"Portal";case Fh:return"Profiler";case xm:return"StrictMode";case zh:return"Suspense";case Uh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Aw:return(e.displayName||"Context")+".Consumer";case Ow:return(e._context.displayName||"Context")+".Provider";case _m:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bm:return t=e.displayName||null,t!==null?t:Vh(e.type)||"Memo";case As:t=e._payload,e=e._init;try{return Vh(e(t))}catch{}}return null}function zT(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 Vh(t);case 8:return t===xm?"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 Js(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Iw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UT(e){var t=Iw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oc(e){e._valueTracker||(e._valueTracker=UT(e))}function Lw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Iw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Au(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 Wh(e,t){var r=t.checked;return At({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Hv(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Js(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 Fw(e,t){t=t.checked,t!=null&&wm(e,"checked",t,!1)}function $h(e,t){Fw(e,t);var r=Js(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")?Bh(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bh(e,t.type,Js(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yv(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 Bh(e,t,r){(t!=="number"||Au(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Fa=Array.isArray;function Di(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=""+Js(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 Hh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(oe(91));return At({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Zv(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(oe(92));if(Fa(r)){if(1<r.length)throw Error(oe(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Js(r)}}function zw(e,t){var r=Js(t.value),n=Js(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 Gv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Uw(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 Yh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Uw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ac,Vw=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(Ac=Ac||document.createElement("div"),Ac.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ac.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ya={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},VT=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){VT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function Ww(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function $w(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Ww(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var WT=At({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 Zh(e,t){if(t){if(WT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(oe(62))}}function Gh(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 Kh=null;function Sm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qh=null,Oi=null,Ai=null;function Kv(e){if(e=rc(e)){if(typeof qh!="function")throw Error(oe(280));var t=e.stateNode;t&&(t=Fd(t),qh(e.stateNode,e.type,t))}}function Bw(e){Oi?Ai?Ai.push(e):Ai=[e]:Oi=e}function Hw(){if(Oi){var e=Oi,t=Ai;if(Ai=Oi=null,Kv(e),t)for(e=0;e<t.length;e++)Kv(t[e])}}function Yw(e,t){return e(t)}function Zw(){}var Bf=!1;function Gw(e,t,r){if(Bf)return e(t,r);Bf=!0;try{return Yw(e,t,r)}finally{Bf=!1,(Oi!==null||Ai!==null)&&(Zw(),Hw())}}function fl(e,t){var r=e.stateNode;if(r===null)return null;var n=Fd(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(oe(231,t,typeof r));return r}var Xh=!1;if(cs)try{var ba={};Object.defineProperty(ba,"passive",{get:function(){Xh=!0}}),window.addEventListener("test",ba,ba),window.removeEventListener("test",ba,ba)}catch{Xh=!1}function $T(e,t,r,n,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(f){this.onError(f)}}var Za=!1,Mu=null,Iu=!1,Qh=null,BT={onError:function(e){Za=!0,Mu=e}};function HT(e,t,r,n,s,o,i,a,l){Za=!1,Mu=null,$T.apply(BT,arguments)}function YT(e,t,r,n,s,o,i,a,l){if(HT.apply(this,arguments),Za){if(Za){var c=Mu;Za=!1,Mu=null}else throw Error(oe(198));Iu||(Iu=!0,Qh=c)}}function qo(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 Kw(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 qv(e){if(qo(e)!==e)throw Error(oe(188))}function ZT(e){var t=e.alternate;if(!t){if(t=qo(e),t===null)throw Error(oe(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return qv(s),e;if(o===n)return qv(s),t;o=o.sibling}throw Error(oe(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(oe(189))}}if(r.alternate!==n)throw Error(oe(190))}if(r.tag!==3)throw Error(oe(188));return r.stateNode.current===r?e:t}function qw(e){return e=ZT(e),e!==null?Xw(e):null}function Xw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xw(e);if(t!==null)return t;e=e.sibling}return null}var Qw=Lr.unstable_scheduleCallback,Xv=Lr.unstable_cancelCallback,GT=Lr.unstable_shouldYield,KT=Lr.unstable_requestPaint,zt=Lr.unstable_now,qT=Lr.unstable_getCurrentPriorityLevel,km=Lr.unstable_ImmediatePriority,Jw=Lr.unstable_UserBlockingPriority,Lu=Lr.unstable_NormalPriority,XT=Lr.unstable_LowPriority,ex=Lr.unstable_IdlePriority,Ad=null,jn=null;function QT(e){if(jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(Ad,e,void 0,(e.current.flags&128)===128)}catch{}}var un=Math.clz32?Math.clz32:tR,JT=Math.log,eR=Math.LN2;function tR(e){return e>>>=0,e===0?32:31-(JT(e)/eR|0)|0}var Mc=64,Ic=4194304;function za(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 Fu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=za(a):(o&=i,o!==0&&(n=za(o)))}else i=r&~s,i!==0?n=za(i):o!==0&&(n=za(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-un(t),s=1<<r,n|=e[r],t&=~s;return n}function rR(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 nR(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-un(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=rR(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Jh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tx(){var e=Mc;return Mc<<=1,!(Mc&4194240)&&(Mc=64),e}function Hf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ec(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-un(t),e[t]=r}function sR(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-un(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Cm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-un(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ft=0;function rx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var nx,Em,sx,ox,ix,ep=!1,Lc=[],Bs=null,Hs=null,Ys=null,hl=new Map,pl=new Map,Is=[],oR="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 Qv(e,t){switch(e){case"focusin":case"focusout":Bs=null;break;case"dragenter":case"dragleave":Hs=null;break;case"mouseover":case"mouseout":Ys=null;break;case"pointerover":case"pointerout":hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(t.pointerId)}}function Sa(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=rc(t),t!==null&&Em(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function iR(e,t,r,n,s){switch(t){case"focusin":return Bs=Sa(Bs,e,t,r,n,s),!0;case"dragenter":return Hs=Sa(Hs,e,t,r,n,s),!0;case"mouseover":return Ys=Sa(Ys,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return hl.set(o,Sa(hl.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,pl.set(o,Sa(pl.get(o)||null,e,t,r,n,s)),!0}return!1}function ax(e){var t=ko(e.target);if(t!==null){var r=qo(t);if(r!==null){if(t=r.tag,t===13){if(t=Kw(r),t!==null){e.blockedOn=t,ix(e.priority,function(){sx(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 uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=tp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Kh=n,r.target.dispatchEvent(n),Kh=null}else return t=rc(r),t!==null&&Em(t),e.blockedOn=r,!1;t.shift()}return!0}function Jv(e,t,r){uu(e)&&r.delete(t)}function aR(){ep=!1,Bs!==null&&uu(Bs)&&(Bs=null),Hs!==null&&uu(Hs)&&(Hs=null),Ys!==null&&uu(Ys)&&(Ys=null),hl.forEach(Jv),pl.forEach(Jv)}function ka(e,t){e.blockedOn===t&&(e.blockedOn=null,ep||(ep=!0,Lr.unstable_scheduleCallback(Lr.unstable_NormalPriority,aR)))}function ml(e){function t(s){return ka(s,e)}if(0<Lc.length){ka(Lc[0],e);for(var r=1;r<Lc.length;r++){var n=Lc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Bs!==null&&ka(Bs,e),Hs!==null&&ka(Hs,e),Ys!==null&&ka(Ys,e),hl.forEach(t),pl.forEach(t),r=0;r<Is.length;r++)n=Is[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Is.length&&(r=Is[0],r.blockedOn===null);)ax(r),r.blockedOn===null&&Is.shift()}var Mi=ys.ReactCurrentBatchConfig,zu=!0;function lR(e,t,r,n){var s=ft,o=Mi.transition;Mi.transition=null;try{ft=1,Tm(e,t,r,n)}finally{ft=s,Mi.transition=o}}function cR(e,t,r,n){var s=ft,o=Mi.transition;Mi.transition=null;try{ft=4,Tm(e,t,r,n)}finally{ft=s,Mi.transition=o}}function Tm(e,t,r,n){if(zu){var s=tp(e,t,r,n);if(s===null)th(e,t,n,Uu,r),Qv(e,n);else if(iR(s,e,t,r,n))n.stopPropagation();else if(Qv(e,n),t&4&&-1<oR.indexOf(e)){for(;s!==null;){var o=rc(s);if(o!==null&&nx(o),o=tp(e,t,r,n),o===null&&th(e,t,n,Uu,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else th(e,t,n,null,r)}}var Uu=null;function tp(e,t,r,n){if(Uu=null,e=Sm(n),e=ko(e),e!==null)if(t=qo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Kw(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 Uu=e,null}function lx(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(qT()){case km:return 1;case Jw:return 4;case Lu:case XT:return 16;case ex:return 536870912;default:return 16}default:return 16}}var zs=null,Rm=null,du=null;function cx(){if(du)return du;var e,t=Rm,r=t.length,n,s="value"in zs?zs.value:zs.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return du=s.slice(e,1<n?1-n:void 0)}function fu(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 Fc(){return!0}function ey(){return!1}function zr(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Fc:ey,this.isPropagationStopped=ey,this}return At(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=Fc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Fc)},persist:function(){},isPersistent:Fc}),t}var aa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nm=zr(aa),tc=At({},aa,{view:0,detail:0}),uR=zr(tc),Yf,Zf,Ca,Md=At({},tc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pm,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!==Ca&&(Ca&&e.type==="mousemove"?(Yf=e.screenX-Ca.screenX,Zf=e.screenY-Ca.screenY):Zf=Yf=0,Ca=e),Yf)},movementY:function(e){return"movementY"in e?e.movementY:Zf}}),ty=zr(Md),dR=At({},Md,{dataTransfer:0}),fR=zr(dR),hR=At({},tc,{relatedTarget:0}),Gf=zr(hR),pR=At({},aa,{animationName:0,elapsedTime:0,pseudoElement:0}),mR=zr(pR),gR=At({},aa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vR=zr(gR),yR=At({},aa,{data:0}),ry=zr(yR),wR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xR={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"},_R={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_R[e])?!!t[e]:!1}function Pm(){return bR}var SR=At({},tc,{key:function(e){if(e.key){var t=wR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pm,charCode:function(e){return e.type==="keypress"?fu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kR=zr(SR),CR=At({},Md,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ny=zr(CR),ER=At({},tc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pm}),TR=zr(ER),RR=At({},aa,{propertyName:0,elapsedTime:0,pseudoElement:0}),NR=zr(RR),PR=At({},Md,{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}),jR=zr(PR),DR=[9,13,27,32],jm=cs&&"CompositionEvent"in window,Ga=null;cs&&"documentMode"in document&&(Ga=document.documentMode);var OR=cs&&"TextEvent"in window&&!Ga,ux=cs&&(!jm||Ga&&8<Ga&&11>=Ga),sy=" ",oy=!1;function dx(e,t){switch(e){case"keyup":return DR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yi=!1;function AR(e,t){switch(e){case"compositionend":return fx(t);case"keypress":return t.which!==32?null:(oy=!0,sy);case"textInput":return e=t.data,e===sy&&oy?null:e;default:return null}}function MR(e,t){if(yi)return e==="compositionend"||!jm&&dx(e,t)?(e=cx(),du=Rm=zs=null,yi=!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 ux&&t.locale!=="ko"?null:t.data;default:return null}}var IR={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 iy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!IR[e.type]:t==="textarea"}function hx(e,t,r,n){Bw(n),t=Vu(t,"onChange"),0<t.length&&(r=new Nm("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ka=null,gl=null;function LR(e){kx(e,0)}function Id(e){var t=_i(e);if(Lw(t))return e}function FR(e,t){if(e==="change")return t}var px=!1;if(cs){var Kf;if(cs){var qf="oninput"in document;if(!qf){var ay=document.createElement("div");ay.setAttribute("oninput","return;"),qf=typeof ay.oninput=="function"}Kf=qf}else Kf=!1;px=Kf&&(!document.documentMode||9<document.documentMode)}function ly(){Ka&&(Ka.detachEvent("onpropertychange",mx),gl=Ka=null)}function mx(e){if(e.propertyName==="value"&&Id(gl)){var t=[];hx(t,gl,e,Sm(e)),Gw(LR,t)}}function zR(e,t,r){e==="focusin"?(ly(),Ka=t,gl=r,Ka.attachEvent("onpropertychange",mx)):e==="focusout"&&ly()}function UR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Id(gl)}function VR(e,t){if(e==="click")return Id(t)}function WR(e,t){if(e==="input"||e==="change")return Id(t)}function $R(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:$R;function vl(e,t){if(hn(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(!Lh.call(t,s)||!hn(e[s],t[s]))return!1}return!0}function cy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uy(e,t){var r=cy(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=cy(r)}}function gx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vx(){for(var e=window,t=Au();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Au(e.document)}return t}function Dm(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 BR(e){var t=vx(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&gx(r.ownerDocument.documentElement,r)){if(n!==null&&Dm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=uy(r,o);var i=uy(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var HR=cs&&"documentMode"in document&&11>=document.documentMode,wi=null,rp=null,qa=null,np=!1;function dy(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;np||wi==null||wi!==Au(n)||(n=wi,"selectionStart"in n&&Dm(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}),qa&&vl(qa,n)||(qa=n,n=Vu(rp,"onSelect"),0<n.length&&(t=new Nm("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=wi)))}function zc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var xi={animationend:zc("Animation","AnimationEnd"),animationiteration:zc("Animation","AnimationIteration"),animationstart:zc("Animation","AnimationStart"),transitionend:zc("Transition","TransitionEnd")},Xf={},yx={};cs&&(yx=document.createElement("div").style,"AnimationEvent"in window||(delete xi.animationend.animation,delete xi.animationiteration.animation,delete xi.animationstart.animation),"TransitionEvent"in window||delete xi.transitionend.transition);function Ld(e){if(Xf[e])return Xf[e];if(!xi[e])return e;var t=xi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in yx)return Xf[e]=t[r];return e}var wx=Ld("animationend"),xx=Ld("animationiteration"),_x=Ld("animationstart"),bx=Ld("transitionend"),Sx=new Map,fy="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 co(e,t){Sx.set(e,t),Ko(t,[e])}for(var Qf=0;Qf<fy.length;Qf++){var Jf=fy[Qf],YR=Jf.toLowerCase(),ZR=Jf[0].toUpperCase()+Jf.slice(1);co(YR,"on"+ZR)}co(wx,"onAnimationEnd");co(xx,"onAnimationIteration");co(_x,"onAnimationStart");co("dblclick","onDoubleClick");co("focusin","onFocus");co("focusout","onBlur");co(bx,"onTransitionEnd");Zi("onMouseEnter",["mouseout","mouseover"]);Zi("onMouseLeave",["mouseout","mouseover"]);Zi("onPointerEnter",["pointerout","pointerover"]);Zi("onPointerLeave",["pointerout","pointerover"]);Ko("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ko("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ko("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ko("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ko("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ko("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ua="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(" "),GR=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ua));function hy(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,YT(n,t,void 0,e),e.currentTarget=null}function kx(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;hy(s,a,c),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;hy(s,a,c),o=l}}}if(Iu)throw e=Qh,Iu=!1,Qh=null,e}function wt(e,t){var r=t[lp];r===void 0&&(r=t[lp]=new Set);var n=e+"__bubble";r.has(n)||(Cx(t,e,2,!1),r.add(n))}function eh(e,t,r){var n=0;t&&(n|=4),Cx(r,e,n,t)}var Uc="_reactListening"+Math.random().toString(36).slice(2);function yl(e){if(!e[Uc]){e[Uc]=!0,Dw.forEach(function(r){r!=="selectionchange"&&(GR.has(r)||eh(r,!1,e),eh(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uc]||(t[Uc]=!0,eh("selectionchange",!1,t))}}function Cx(e,t,r,n){switch(lx(t)){case 1:var s=lR;break;case 4:s=cR;break;default:s=Tm}r=s.bind(null,t,r,e),s=void 0,!Xh||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 th(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=ko(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}Gw(function(){var c=o,f=Sm(r),d=[];e:{var h=Sx.get(e);if(h!==void 0){var p=Nm,w=e;switch(e){case"keypress":if(fu(r)===0)break e;case"keydown":case"keyup":p=kR;break;case"focusin":w="focus",p=Gf;break;case"focusout":w="blur",p=Gf;break;case"beforeblur":case"afterblur":p=Gf;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":p=ty;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=fR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=TR;break;case wx:case xx:case _x:p=mR;break;case bx:p=NR;break;case"scroll":p=uR;break;case"wheel":p=jR;break;case"copy":case"cut":case"paste":p=vR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=ny}var m=(t&4)!==0,x=!m&&e==="scroll",g=m?h!==null?h+"Capture":null:h;m=[];for(var v=c,_;v!==null;){_=v;var C=_.stateNode;if(_.tag===5&&C!==null&&(_=C,g!==null&&(C=fl(v,g),C!=null&&m.push(wl(v,C,_)))),x)break;v=v.return}0<m.length&&(h=new p(h,w,null,r,f),d.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==Kh&&(w=r.relatedTarget||r.fromElement)&&(ko(w)||w[us]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(w=r.relatedTarget||r.toElement,p=c,w=w?ko(w):null,w!==null&&(x=qo(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(p=null,w=c),p!==w)){if(m=ty,C="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=ny,C="onPointerLeave",g="onPointerEnter",v="pointer"),x=p==null?h:_i(p),_=w==null?h:_i(w),h=new m(C,v+"leave",p,r,f),h.target=x,h.relatedTarget=_,C=null,ko(f)===c&&(m=new m(g,v+"enter",w,r,f),m.target=_,m.relatedTarget=x,C=m),x=C,p&&w)t:{for(m=p,g=w,v=0,_=m;_;_=ai(_))v++;for(_=0,C=g;C;C=ai(C))_++;for(;0<v-_;)m=ai(m),v--;for(;0<_-v;)g=ai(g),_--;for(;v--;){if(m===g||g!==null&&m===g.alternate)break t;m=ai(m),g=ai(g)}m=null}else m=null;p!==null&&py(d,h,p,m,!1),w!==null&&x!==null&&py(d,x,w,m,!0)}}e:{if(h=c?_i(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var E=FR;else if(iy(h))if(px)E=WR;else{E=UR;var T=zR}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(E=VR);if(E&&(E=E(e,c))){hx(d,E,r,f);break e}T&&T(e,h,c),e==="focusout"&&(T=h._wrapperState)&&T.controlled&&h.type==="number"&&Bh(h,"number",h.value)}switch(T=c?_i(c):window,e){case"focusin":(iy(T)||T.contentEditable==="true")&&(wi=T,rp=c,qa=null);break;case"focusout":qa=rp=wi=null;break;case"mousedown":np=!0;break;case"contextmenu":case"mouseup":case"dragend":np=!1,dy(d,r,f);break;case"selectionchange":if(HR)break;case"keydown":case"keyup":dy(d,r,f)}var P;if(jm)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else yi?dx(e,r)&&(O="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(ux&&r.locale!=="ko"&&(yi||O!=="onCompositionStart"?O==="onCompositionEnd"&&yi&&(P=cx()):(zs=f,Rm="value"in zs?zs.value:zs.textContent,yi=!0)),T=Vu(c,O),0<T.length&&(O=new ry(O,e,null,r,f),d.push({event:O,listeners:T}),P?O.data=P:(P=fx(r),P!==null&&(O.data=P)))),(P=OR?AR(e,r):MR(e,r))&&(c=Vu(c,"onBeforeInput"),0<c.length&&(f=new ry("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:c}),f.data=P))}kx(d,t)})}function wl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Vu(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=fl(e,r),o!=null&&n.unshift(wl(e,o,s)),o=fl(e,t),o!=null&&n.push(wl(e,o,s))),e=e.return}return n}function ai(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function py(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=fl(r,o),l!=null&&i.unshift(wl(r,l,a))):s||(l=fl(r,o),l!=null&&i.push(wl(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var KR=/\r\n?/g,qR=/\u0000|\uFFFD/g;function my(e){return(typeof e=="string"?e:""+e).replace(KR,`
`).replace(qR,"")}function Vc(e,t,r){if(t=my(t),my(e)!==t&&r)throw Error(oe(425))}function Wu(){}var sp=null,op=null;function ip(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 ap=typeof setTimeout=="function"?setTimeout:void 0,XR=typeof clearTimeout=="function"?clearTimeout:void 0,gy=typeof Promise=="function"?Promise:void 0,QR=typeof queueMicrotask=="function"?queueMicrotask:typeof gy<"u"?function(e){return gy.resolve(null).then(e).catch(JR)}:ap;function JR(e){setTimeout(function(){throw e})}function rh(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),ml(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);ml(t)}function Zs(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 vy(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 la=Math.random().toString(36).slice(2),Cn="__reactFiber$"+la,xl="__reactProps$"+la,us="__reactContainer$"+la,lp="__reactEvents$"+la,e2="__reactListeners$"+la,t2="__reactHandles$"+la;function ko(e){var t=e[Cn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[us]||r[Cn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=vy(e);e!==null;){if(r=e[Cn])return r;e=vy(e)}return t}e=r,r=e.parentNode}return null}function rc(e){return e=e[Cn]||e[us],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function _i(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(oe(33))}function Fd(e){return e[xl]||null}var cp=[],bi=-1;function uo(e){return{current:e}}function _t(e){0>bi||(e.current=cp[bi],cp[bi]=null,bi--)}function vt(e,t){bi++,cp[bi]=e.current,e.current=t}var eo={},lr=uo(eo),br=uo(!1),Lo=eo;function Gi(e,t){var r=e.type.contextTypes;if(!r)return eo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Sr(e){return e=e.childContextTypes,e!=null}function $u(){_t(br),_t(lr)}function yy(e,t,r){if(lr.current!==eo)throw Error(oe(168));vt(lr,t),vt(br,r)}function Ex(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(oe(108,zT(e)||"Unknown",s));return At({},r,n)}function Bu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||eo,Lo=lr.current,vt(lr,e),vt(br,br.current),!0}function wy(e,t,r){var n=e.stateNode;if(!n)throw Error(oe(169));r?(e=Ex(e,t,Lo),n.__reactInternalMemoizedMergedChildContext=e,_t(br),_t(lr),vt(lr,e)):_t(br),vt(br,r)}var es=null,zd=!1,nh=!1;function Tx(e){es===null?es=[e]:es.push(e)}function r2(e){zd=!0,Tx(e)}function fo(){if(!nh&&es!==null){nh=!0;var e=0,t=ft;try{var r=es;for(ft=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}es=null,zd=!1}catch(s){throw es!==null&&(es=es.slice(e+1)),Qw(km,fo),s}finally{ft=t,nh=!1}}return null}var Si=[],ki=0,Hu=null,Yu=0,$r=[],Br=0,Fo=null,ts=1,rs="";function _o(e,t){Si[ki++]=Yu,Si[ki++]=Hu,Hu=e,Yu=t}function Rx(e,t,r){$r[Br++]=ts,$r[Br++]=rs,$r[Br++]=Fo,Fo=e;var n=ts;e=rs;var s=32-un(n)-1;n&=~(1<<s),r+=1;var o=32-un(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,ts=1<<32-un(t)+s|r<<s|n,rs=o+e}else ts=1<<o|r<<s|n,rs=e}function Om(e){e.return!==null&&(_o(e,1),Rx(e,1,0))}function Am(e){for(;e===Hu;)Hu=Si[--ki],Si[ki]=null,Yu=Si[--ki],Si[ki]=null;for(;e===Fo;)Fo=$r[--Br],$r[Br]=null,rs=$r[--Br],$r[Br]=null,ts=$r[--Br],$r[Br]=null}var Or=null,Dr=null,Tt=!1,on=null;function Nx(e,t){var r=Yr(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 xy(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,Or=e,Dr=Zs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Or=e,Dr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Fo!==null?{id:ts,overflow:rs}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Yr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Or=e,Dr=null,!0):!1;default:return!1}}function up(e){return(e.mode&1)!==0&&(e.flags&128)===0}function dp(e){if(Tt){var t=Dr;if(t){var r=t;if(!xy(e,t)){if(up(e))throw Error(oe(418));t=Zs(r.nextSibling);var n=Or;t&&xy(e,t)?Nx(n,r):(e.flags=e.flags&-4097|2,Tt=!1,Or=e)}}else{if(up(e))throw Error(oe(418));e.flags=e.flags&-4097|2,Tt=!1,Or=e}}}function _y(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Or=e}function Wc(e){if(e!==Or)return!1;if(!Tt)return _y(e),Tt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ip(e.type,e.memoizedProps)),t&&(t=Dr)){if(up(e))throw Px(),Error(oe(418));for(;t;)Nx(e,t),t=Zs(t.nextSibling)}if(_y(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(oe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Dr=Zs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Dr=null}}else Dr=Or?Zs(e.stateNode.nextSibling):null;return!0}function Px(){for(var e=Dr;e;)e=Zs(e.nextSibling)}function Ki(){Dr=Or=null,Tt=!1}function Mm(e){on===null?on=[e]:on.push(e)}var n2=ys.ReactCurrentBatchConfig;function Ea(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(oe(309));var n=r.stateNode}if(!n)throw Error(oe(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(oe(284));if(!r._owner)throw Error(oe(290,e))}return e}function $c(e,t){throw e=Object.prototype.toString.call(t),Error(oe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function by(e){var t=e._init;return t(e._payload)}function jx(e){function t(g,v){if(e){var _=g.deletions;_===null?(g.deletions=[v],g.flags|=16):_.push(v)}}function r(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function n(g,v){for(g=new Map;v!==null;)v.key!==null?g.set(v.key,v):g.set(v.index,v),v=v.sibling;return g}function s(g,v){return g=Xs(g,v),g.index=0,g.sibling=null,g}function o(g,v,_){return g.index=_,e?(_=g.alternate,_!==null?(_=_.index,_<v?(g.flags|=2,v):_):(g.flags|=2,v)):(g.flags|=1048576,v)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,_,C){return v===null||v.tag!==6?(v=uh(_,g.mode,C),v.return=g,v):(v=s(v,_),v.return=g,v)}function l(g,v,_,C){var E=_.type;return E===vi?f(g,v,_.props.children,C,_.key):v!==null&&(v.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===As&&by(E)===v.type)?(C=s(v,_.props),C.ref=Ea(g,v,_),C.return=g,C):(C=wu(_.type,_.key,_.props,null,g.mode,C),C.ref=Ea(g,v,_),C.return=g,C)}function c(g,v,_,C){return v===null||v.tag!==4||v.stateNode.containerInfo!==_.containerInfo||v.stateNode.implementation!==_.implementation?(v=dh(_,g.mode,C),v.return=g,v):(v=s(v,_.children||[]),v.return=g,v)}function f(g,v,_,C,E){return v===null||v.tag!==7?(v=Oo(_,g.mode,C,E),v.return=g,v):(v=s(v,_),v.return=g,v)}function d(g,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return v=uh(""+v,g.mode,_),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Dc:return _=wu(v.type,v.key,v.props,null,g.mode,_),_.ref=Ea(g,null,v),_.return=g,_;case gi:return v=dh(v,g.mode,_),v.return=g,v;case As:var C=v._init;return d(g,C(v._payload),_)}if(Fa(v)||_a(v))return v=Oo(v,g.mode,_,null),v.return=g,v;$c(g,v)}return null}function h(g,v,_,C){var E=v!==null?v.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:a(g,v,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Dc:return _.key===E?l(g,v,_,C):null;case gi:return _.key===E?c(g,v,_,C):null;case As:return E=_._init,h(g,v,E(_._payload),C)}if(Fa(_)||_a(_))return E!==null?null:f(g,v,_,C,null);$c(g,_)}return null}function p(g,v,_,C,E){if(typeof C=="string"&&C!==""||typeof C=="number")return g=g.get(_)||null,a(v,g,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Dc:return g=g.get(C.key===null?_:C.key)||null,l(v,g,C,E);case gi:return g=g.get(C.key===null?_:C.key)||null,c(v,g,C,E);case As:var T=C._init;return p(g,v,_,T(C._payload),E)}if(Fa(C)||_a(C))return g=g.get(_)||null,f(v,g,C,E,null);$c(v,C)}return null}function w(g,v,_,C){for(var E=null,T=null,P=v,O=v=0,j=null;P!==null&&O<_.length;O++){P.index>O?(j=P,P=null):j=P.sibling;var L=h(g,P,_[O],C);if(L===null){P===null&&(P=j);break}e&&P&&L.alternate===null&&t(g,P),v=o(L,v,O),T===null?E=L:T.sibling=L,T=L,P=j}if(O===_.length)return r(g,P),Tt&&_o(g,O),E;if(P===null){for(;O<_.length;O++)P=d(g,_[O],C),P!==null&&(v=o(P,v,O),T===null?E=P:T.sibling=P,T=P);return Tt&&_o(g,O),E}for(P=n(g,P);O<_.length;O++)j=p(P,g,O,_[O],C),j!==null&&(e&&j.alternate!==null&&P.delete(j.key===null?O:j.key),v=o(j,v,O),T===null?E=j:T.sibling=j,T=j);return e&&P.forEach(function(q){return t(g,q)}),Tt&&_o(g,O),E}function m(g,v,_,C){var E=_a(_);if(typeof E!="function")throw Error(oe(150));if(_=E.call(_),_==null)throw Error(oe(151));for(var T=E=null,P=v,O=v=0,j=null,L=_.next();P!==null&&!L.done;O++,L=_.next()){P.index>O?(j=P,P=null):j=P.sibling;var q=h(g,P,L.value,C);if(q===null){P===null&&(P=j);break}e&&P&&q.alternate===null&&t(g,P),v=o(q,v,O),T===null?E=q:T.sibling=q,T=q,P=j}if(L.done)return r(g,P),Tt&&_o(g,O),E;if(P===null){for(;!L.done;O++,L=_.next())L=d(g,L.value,C),L!==null&&(v=o(L,v,O),T===null?E=L:T.sibling=L,T=L);return Tt&&_o(g,O),E}for(P=n(g,P);!L.done;O++,L=_.next())L=p(P,g,O,L.value,C),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?O:L.key),v=o(L,v,O),T===null?E=L:T.sibling=L,T=L);return e&&P.forEach(function(R){return t(g,R)}),Tt&&_o(g,O),E}function x(g,v,_,C){if(typeof _=="object"&&_!==null&&_.type===vi&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Dc:e:{for(var E=_.key,T=v;T!==null;){if(T.key===E){if(E=_.type,E===vi){if(T.tag===7){r(g,T.sibling),v=s(T,_.props.children),v.return=g,g=v;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===As&&by(E)===T.type){r(g,T.sibling),v=s(T,_.props),v.ref=Ea(g,T,_),v.return=g,g=v;break e}r(g,T);break}else t(g,T);T=T.sibling}_.type===vi?(v=Oo(_.props.children,g.mode,C,_.key),v.return=g,g=v):(C=wu(_.type,_.key,_.props,null,g.mode,C),C.ref=Ea(g,v,_),C.return=g,g=C)}return i(g);case gi:e:{for(T=_.key;v!==null;){if(v.key===T)if(v.tag===4&&v.stateNode.containerInfo===_.containerInfo&&v.stateNode.implementation===_.implementation){r(g,v.sibling),v=s(v,_.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else t(g,v);v=v.sibling}v=dh(_,g.mode,C),v.return=g,g=v}return i(g);case As:return T=_._init,x(g,v,T(_._payload),C)}if(Fa(_))return w(g,v,_,C);if(_a(_))return m(g,v,_,C);$c(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,v!==null&&v.tag===6?(r(g,v.sibling),v=s(v,_),v.return=g,g=v):(r(g,v),v=uh(_,g.mode,C),v.return=g,g=v),i(g)):r(g,v)}return x}var qi=jx(!0),Dx=jx(!1),Zu=uo(null),Gu=null,Ci=null,Im=null;function Lm(){Im=Ci=Gu=null}function Fm(e){var t=Zu.current;_t(Zu),e._currentValue=t}function fp(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 Ii(e,t){Gu=e,Im=Ci=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_r=!0),e.firstContext=null)}function Kr(e){var t=e._currentValue;if(Im!==e)if(e={context:e,memoizedValue:t,next:null},Ci===null){if(Gu===null)throw Error(oe(308));Ci=e,Gu.dependencies={lanes:0,firstContext:e}}else Ci=Ci.next=e;return t}var Co=null;function zm(e){Co===null?Co=[e]:Co.push(e)}function Ox(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,zm(t)):(r.next=s.next,s.next=r),t.interleaved=r,ds(e,n)}function ds(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 Ms=!1;function Um(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ax(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 os(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gs(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,it&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,ds(e,r)}return s=n.interleaved,s===null?(t.next=t,zm(n)):(t.next=s.next,s.next=t),n.interleaved=t,ds(e,r)}function hu(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,Cm(e,r)}}function Sy(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ku(e,t,r,n){var s=e.updateQueue;Ms=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==i&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=l))}if(o!==null){var d=s.baseState;i=0,f=c=l=null,a=o;do{var h=a.lane,p=a.eventTime;if((n&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,m=a;switch(h=t,p=r,m.tag){case 1:if(w=m.payload,typeof w=="function"){d=w.call(p,d,h);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=m.payload,h=typeof w=="function"?w.call(p,d,h):w,h==null)break e;d=At({},d,h);break e;case 2:Ms=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=p,l=d):f=f.next=p,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(f===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Uo|=i,e.lanes=i,e.memoizedState=d}}function ky(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(oe(191,s));s.call(n)}}}var nc={},Dn=uo(nc),_l=uo(nc),bl=uo(nc);function Eo(e){if(e===nc)throw Error(oe(174));return e}function Vm(e,t){switch(vt(bl,t),vt(_l,e),vt(Dn,nc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yh(t,e)}_t(Dn),vt(Dn,t)}function Xi(){_t(Dn),_t(_l),_t(bl)}function Mx(e){Eo(bl.current);var t=Eo(Dn.current),r=Yh(t,e.type);t!==r&&(vt(_l,e),vt(Dn,r))}function Wm(e){_l.current===e&&(_t(Dn),_t(_l))}var Pt=uo(0);function qu(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 sh=[];function $m(){for(var e=0;e<sh.length;e++)sh[e]._workInProgressVersionPrimary=null;sh.length=0}var pu=ys.ReactCurrentDispatcher,oh=ys.ReactCurrentBatchConfig,zo=0,Ot=null,Yt=null,qt=null,Xu=!1,Xa=!1,Sl=0,s2=0;function sr(){throw Error(oe(321))}function Bm(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!hn(e[r],t[r]))return!1;return!0}function Hm(e,t,r,n,s,o){if(zo=o,Ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pu.current=e===null||e.memoizedState===null?l2:c2,e=r(n,s),Xa){o=0;do{if(Xa=!1,Sl=0,25<=o)throw Error(oe(301));o+=1,qt=Yt=null,t.updateQueue=null,pu.current=u2,e=r(n,s)}while(Xa)}if(pu.current=Qu,t=Yt!==null&&Yt.next!==null,zo=0,qt=Yt=Ot=null,Xu=!1,t)throw Error(oe(300));return e}function Ym(){var e=Sl!==0;return Sl=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?Ot.memoizedState=qt=e:qt=qt.next=e,qt}function qr(){if(Yt===null){var e=Ot.alternate;e=e!==null?e.memoizedState:null}else e=Yt.next;var t=qt===null?Ot.memoizedState:qt.next;if(t!==null)qt=t,Yt=e;else{if(e===null)throw Error(oe(310));Yt=e,e={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},qt===null?Ot.memoizedState=qt=e:qt=qt.next=e}return qt}function kl(e,t){return typeof t=="function"?t(e):t}function ih(e){var t=qr(),r=t.queue;if(r===null)throw Error(oe(311));r.lastRenderedReducer=e;var n=Yt,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,c=o;do{var f=c.lane;if((zo&f)===f)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=n):l=l.next=d,Ot.lanes|=f,Uo|=f}c=c.next}while(c!==null&&c!==o);l===null?i=n:l.next=a,hn(n,t.memoizedState)||(_r=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Ot.lanes|=o,Uo|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ah(e){var t=qr(),r=t.queue;if(r===null)throw Error(oe(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);hn(o,t.memoizedState)||(_r=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Ix(){}function Lx(e,t){var r=Ot,n=qr(),s=t(),o=!hn(n.memoizedState,s);if(o&&(n.memoizedState=s,_r=!0),n=n.queue,Zm(Ux.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||qt!==null&&qt.memoizedState.tag&1){if(r.flags|=2048,Cl(9,zx.bind(null,r,n,s,t),void 0,null),Xt===null)throw Error(oe(349));zo&30||Fx(r,t,s)}return s}function Fx(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 zx(e,t,r,n){t.value=r,t.getSnapshot=n,Vx(t)&&Wx(e)}function Ux(e,t,r){return r(function(){Vx(t)&&Wx(e)})}function Vx(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!hn(e,r)}catch{return!0}}function Wx(e){var t=ds(e,1);t!==null&&dn(t,e,1,-1)}function Cy(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kl,lastRenderedState:e},t.queue=e,e=e.dispatch=a2.bind(null,Ot,e),[t.memoizedState,e]}function Cl(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 $x(){return qr().memoizedState}function mu(e,t,r,n){var s=kn();Ot.flags|=e,s.memoizedState=Cl(1|t,r,void 0,n===void 0?null:n)}function Ud(e,t,r,n){var s=qr();n=n===void 0?null:n;var o=void 0;if(Yt!==null){var i=Yt.memoizedState;if(o=i.destroy,n!==null&&Bm(n,i.deps)){s.memoizedState=Cl(t,r,o,n);return}}Ot.flags|=e,s.memoizedState=Cl(1|t,r,o,n)}function Ey(e,t){return mu(8390656,8,e,t)}function Zm(e,t){return Ud(2048,8,e,t)}function Bx(e,t){return Ud(4,2,e,t)}function Hx(e,t){return Ud(4,4,e,t)}function Yx(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 Zx(e,t,r){return r=r!=null?r.concat([e]):null,Ud(4,4,Yx.bind(null,t,e),r)}function Gm(){}function Gx(e,t){var r=qr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Bm(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Kx(e,t){var r=qr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Bm(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function qx(e,t,r){return zo&21?(hn(r,t)||(r=tx(),Ot.lanes|=r,Uo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_r=!0),e.memoizedState=r)}function o2(e,t){var r=ft;ft=r!==0&&4>r?r:4,e(!0);var n=oh.transition;oh.transition={};try{e(!1),t()}finally{ft=r,oh.transition=n}}function Xx(){return qr().memoizedState}function i2(e,t,r){var n=qs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Qx(e))Jx(t,r);else if(r=Ox(e,t,r,n),r!==null){var s=hr();dn(r,e,n,s),e_(r,t,n)}}function a2(e,t,r){var n=qs(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Qx(e))Jx(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,hn(a,i)){var l=t.interleaved;l===null?(s.next=s,zm(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Ox(e,t,s,n),r!==null&&(s=hr(),dn(r,e,n,s),e_(r,t,n))}}function Qx(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function Jx(e,t){Xa=Xu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function e_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Cm(e,r)}}var Qu={readContext:Kr,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},l2={readContext:Kr,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:Kr,useEffect:Ey,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,mu(4194308,4,Yx.bind(null,t,e),r)},useLayoutEffect:function(e,t){return mu(4194308,4,e,t)},useInsertionEffect:function(e,t){return mu(4,2,e,t)},useMemo:function(e,t){var r=kn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=kn();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=i2.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Cy,useDebugValue:Gm,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Cy(!1),t=e[0];return e=o2.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,s=kn();if(Tt){if(r===void 0)throw Error(oe(407));r=r()}else{if(r=t(),Xt===null)throw Error(oe(349));zo&30||Fx(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Ey(Ux.bind(null,n,o,e),[e]),n.flags|=2048,Cl(9,zx.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=kn(),t=Xt.identifierPrefix;if(Tt){var r=rs,n=ts;r=(n&~(1<<32-un(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Sl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=s2++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},c2={readContext:Kr,useCallback:Gx,useContext:Kr,useEffect:Zm,useImperativeHandle:Zx,useInsertionEffect:Bx,useLayoutEffect:Hx,useMemo:Kx,useReducer:ih,useRef:$x,useState:function(){return ih(kl)},useDebugValue:Gm,useDeferredValue:function(e){var t=qr();return qx(t,Yt.memoizedState,e)},useTransition:function(){var e=ih(kl)[0],t=qr().memoizedState;return[e,t]},useMutableSource:Ix,useSyncExternalStore:Lx,useId:Xx,unstable_isNewReconciler:!1},u2={readContext:Kr,useCallback:Gx,useContext:Kr,useEffect:Zm,useImperativeHandle:Zx,useInsertionEffect:Bx,useLayoutEffect:Hx,useMemo:Kx,useReducer:ah,useRef:$x,useState:function(){return ah(kl)},useDebugValue:Gm,useDeferredValue:function(e){var t=qr();return Yt===null?t.memoizedState=e:qx(t,Yt.memoizedState,e)},useTransition:function(){var e=ah(kl)[0],t=qr().memoizedState;return[e,t]},useMutableSource:Ix,useSyncExternalStore:Lx,useId:Xx,unstable_isNewReconciler:!1};function rn(e,t){if(e&&e.defaultProps){t=At({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function hp(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:At({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Vd={isMounted:function(e){return(e=e._reactInternals)?qo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=hr(),s=qs(e),o=os(n,s);o.payload=t,r!=null&&(o.callback=r),t=Gs(e,o,s),t!==null&&(dn(t,e,s,n),hu(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=hr(),s=qs(e),o=os(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=Gs(e,o,s),t!==null&&(dn(t,e,s,n),hu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=hr(),n=qs(e),s=os(r,n);s.tag=2,t!=null&&(s.callback=t),t=Gs(e,s,n),t!==null&&(dn(t,e,n,r),hu(t,e,n))}};function Ty(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!vl(r,n)||!vl(s,o):!0}function t_(e,t,r){var n=!1,s=eo,o=t.contextType;return typeof o=="object"&&o!==null?o=Kr(o):(s=Sr(t)?Lo:lr.current,n=t.contextTypes,o=(n=n!=null)?Gi(e,s):eo),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Vd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ry(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&&Vd.enqueueReplaceState(t,t.state,null)}function pp(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Um(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=Kr(o):(o=Sr(t)?Lo:lr.current,s.context=Gi(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(hp(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Vd.enqueueReplaceState(s,s.state,null),Ku(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Qi(e,t){try{var r="",n=t;do r+=FT(n),n=n.return;while(n);var s=r}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function lh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function mp(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var d2=typeof WeakMap=="function"?WeakMap:Map;function r_(e,t,r){r=os(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ed||(ed=!0,Cp=n),mp(e,t)},r}function n_(e,t,r){r=os(-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(){mp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){mp(e,t),typeof n!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Ny(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new d2;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=C2.bind(null,e,t,r),t.then(e,e))}function Py(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 jy(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=os(-1,1),t.tag=2,Gs(r,t,1))),r.lanes|=1),e)}var f2=ys.ReactCurrentOwner,_r=!1;function dr(e,t,r,n){t.child=e===null?Dx(t,null,r,n):qi(t,e.child,r,n)}function Dy(e,t,r,n,s){r=r.render;var o=t.ref;return Ii(t,s),n=Hm(e,t,r,n,o,s),r=Ym(),e!==null&&!_r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,fs(e,t,s)):(Tt&&r&&Om(t),t.flags|=1,dr(e,t,n,s),t.child)}function Oy(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!rg(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,s_(e,t,o,n,s)):(e=wu(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:vl,r(i,n)&&e.ref===t.ref)return fs(e,t,s)}return t.flags|=1,e=Xs(o,n),e.ref=t.ref,e.return=t,t.child=e}function s_(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(vl(o,n)&&e.ref===t.ref)if(_r=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(_r=!0);else return t.lanes=e.lanes,fs(e,t,s)}return gp(e,t,r,n,s)}function o_(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(Ti,Nr),Nr|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,vt(Ti,Nr),Nr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,vt(Ti,Nr),Nr|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,vt(Ti,Nr),Nr|=n;return dr(e,t,s,r),t.child}function i_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function gp(e,t,r,n,s){var o=Sr(r)?Lo:lr.current;return o=Gi(t,o),Ii(t,s),r=Hm(e,t,r,n,o,s),n=Ym(),e!==null&&!_r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,fs(e,t,s)):(Tt&&n&&Om(t),t.flags|=1,dr(e,t,r,s),t.child)}function Ay(e,t,r,n,s){if(Sr(r)){var o=!0;Bu(t)}else o=!1;if(Ii(t,s),t.stateNode===null)gu(e,t),t_(t,r,n),pp(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=r.contextType;typeof c=="object"&&c!==null?c=Kr(c):(c=Sr(r)?Lo:lr.current,c=Gi(t,c));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Ry(t,i,n,c),Ms=!1;var h=t.memoizedState;i.state=h,Ku(t,n,i,s),l=t.memoizedState,a!==n||h!==l||br.current||Ms?(typeof f=="function"&&(hp(t,r,f,n),l=t.memoizedState),(a=Ms||Ty(t,r,a,n,h,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=c,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Ax(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:rn(t.type,a),i.props=c,d=t.pendingProps,h=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Kr(l):(l=Sr(r)?Lo:lr.current,l=Gi(t,l));var p=r.getDerivedStateFromProps;(f=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Ry(t,i,n,l),Ms=!1,h=t.memoizedState,i.state=h,Ku(t,n,i,s);var w=t.memoizedState;a!==d||h!==w||br.current||Ms?(typeof p=="function"&&(hp(t,r,p,n),w=t.memoizedState),(c=Ms||Ty(t,r,c,n,h,w,l)||!1)?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,w,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,w,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),i.props=n,i.state=w,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return vp(e,t,r,n,o,s)}function vp(e,t,r,n,s,o){i_(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&wy(t,r,!1),fs(e,t,o);n=t.stateNode,f2.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=qi(t,e.child,null,o),t.child=qi(t,null,a,o)):dr(e,t,a,o),t.memoizedState=n.state,s&&wy(t,r,!0),t.child}function a_(e){var t=e.stateNode;t.pendingContext?yy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yy(e,t.context,!1),Vm(e,t.containerInfo)}function My(e,t,r,n,s){return Ki(),Mm(s),t.flags|=256,dr(e,t,r,n),t.child}var yp={dehydrated:null,treeContext:null,retryLane:0};function wp(e){return{baseLanes:e,cachePool:null,transitions:null}}function l_(e,t,r){var n=t.pendingProps,s=Pt.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),vt(Pt,s&1),e===null)return dp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Bd(i,n,0,null),e=Oo(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=wp(r),t.memoizedState=yp,e):Km(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return h2(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Xs(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=Xs(a,o):(o=Oo(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?wp(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=yp,n}return o=e.child,e=o.sibling,n=Xs(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Km(e,t){return t=Bd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Bc(e,t,r,n){return n!==null&&Mm(n),qi(t,e.child,null,r),e=Km(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function h2(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=lh(Error(oe(422))),Bc(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Bd({mode:"visible",children:n.children},s,0,null),o=Oo(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&qi(t,e.child,null,i),t.child.memoizedState=wp(i),t.memoizedState=yp,o);if(!(t.mode&1))return Bc(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(oe(419)),n=lh(o,n,void 0),Bc(e,t,i,n)}if(a=(i&e.childLanes)!==0,_r||a){if(n=Xt,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,ds(e,s),dn(n,e,s,-1))}return tg(),n=lh(Error(oe(421))),Bc(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=E2.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Dr=Zs(s.nextSibling),Or=t,Tt=!0,on=null,e!==null&&($r[Br++]=ts,$r[Br++]=rs,$r[Br++]=Fo,ts=e.id,rs=e.overflow,Fo=t),t=Km(t,n.children),t.flags|=4096,t)}function Iy(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),fp(e.return,t,r)}function ch(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function c_(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(dr(e,t,n.children,r),n=Pt.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&&Iy(e,r,t);else if(e.tag===19)Iy(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(vt(Pt,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&&qu(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),ch(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&qu(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}ch(t,!0,r,null,o);break;case"together":ch(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fs(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Uo|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(oe(153));if(t.child!==null){for(e=t.child,r=Xs(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Xs(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function p2(e,t,r){switch(t.tag){case 3:a_(t),Ki();break;case 5:Mx(t);break;case 1:Sr(t.type)&&Bu(t);break;case 4:Vm(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;vt(Zu,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(vt(Pt,Pt.current&1),t.flags|=128,null):r&t.child.childLanes?l_(e,t,r):(vt(Pt,Pt.current&1),e=fs(e,t,r),e!==null?e.sibling:null);vt(Pt,Pt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return c_(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),vt(Pt,Pt.current),n)break;return null;case 22:case 23:return t.lanes=0,o_(e,t,r)}return fs(e,t,r)}var u_,xp,d_,f_;u_=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}};xp=function(){};d_=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Eo(Dn.current);var o=null;switch(r){case"input":s=Wh(e,s),n=Wh(e,n),o=[];break;case"select":s=At({},s,{value:void 0}),n=At({},n,{value:void 0}),o=[];break;case"textarea":s=Hh(e,s),n=Hh(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Wu)}Zh(r,n);var i;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ul.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ul.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&wt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};f_=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ta(e,t){if(!Tt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function or(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 m2(e,t,r){var n=t.pendingProps;switch(Am(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(t),null;case 1:return Sr(t.type)&&$u(),or(t),null;case 3:return n=t.stateNode,Xi(),_t(br),_t(lr),$m(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,on!==null&&(Rp(on),on=null))),xp(e,t),or(t),null;case 5:Wm(t);var s=Eo(bl.current);if(r=t.type,e!==null&&t.stateNode!=null)d_(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(oe(166));return or(t),null}if(e=Eo(Dn.current),Wc(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Cn]=t,n[xl]=o,e=(t.mode&1)!==0,r){case"dialog":wt("cancel",n),wt("close",n);break;case"iframe":case"object":case"embed":wt("load",n);break;case"video":case"audio":for(s=0;s<Ua.length;s++)wt(Ua[s],n);break;case"source":wt("error",n);break;case"img":case"image":case"link":wt("error",n),wt("load",n);break;case"details":wt("toggle",n);break;case"input":Hv(n,o),wt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},wt("invalid",n);break;case"textarea":Zv(n,o),wt("invalid",n)}Zh(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&Vc(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Vc(n.textContent,a,e),s=["children",""+a]):ul.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&wt("scroll",n)}switch(r){case"input":Oc(n),Yv(n,o,!0);break;case"textarea":Oc(n),Gv(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Wu)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Uw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Cn]=t,e[xl]=n,u_(e,t,!1,!1),t.stateNode=e;e:{switch(i=Gh(r,n),r){case"dialog":wt("cancel",e),wt("close",e),s=n;break;case"iframe":case"object":case"embed":wt("load",e),s=n;break;case"video":case"audio":for(s=0;s<Ua.length;s++)wt(Ua[s],e);s=n;break;case"source":wt("error",e),s=n;break;case"img":case"image":case"link":wt("error",e),wt("load",e),s=n;break;case"details":wt("toggle",e),s=n;break;case"input":Hv(e,n),s=Wh(e,n),wt("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=At({},n,{value:void 0}),wt("invalid",e);break;case"textarea":Zv(e,n),s=Hh(e,n),wt("invalid",e);break;default:s=n}Zh(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?$w(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vw(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&dl(e,l):typeof l=="number"&&dl(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ul.hasOwnProperty(o)?l!=null&&o==="onScroll"&&wt("scroll",e):l!=null&&wm(e,o,l,i))}switch(r){case"input":Oc(e),Yv(e,n,!1);break;case"textarea":Oc(e),Gv(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Js(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Di(e,!!n.multiple,o,!1):n.defaultValue!=null&&Di(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Wu)}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 or(t),null;case 6:if(e&&t.stateNode!=null)f_(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(oe(166));if(r=Eo(bl.current),Eo(Dn.current),Wc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Cn]=t,(o=n.nodeValue!==r)&&(e=Or,e!==null))switch(e.tag){case 3:Vc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Vc(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Cn]=t,t.stateNode=n}return or(t),null;case 13:if(_t(Pt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Tt&&Dr!==null&&t.mode&1&&!(t.flags&128))Px(),Ki(),t.flags|=98560,o=!1;else if(o=Wc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(oe(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(oe(317));o[Cn]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;or(t),o=!1}else on!==null&&(Rp(on),on=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Pt.current&1?Zt===0&&(Zt=3):tg())),t.updateQueue!==null&&(t.flags|=4),or(t),null);case 4:return Xi(),xp(e,t),e===null&&yl(t.stateNode.containerInfo),or(t),null;case 10:return Fm(t.type._context),or(t),null;case 17:return Sr(t.type)&&$u(),or(t),null;case 19:if(_t(Pt),o=t.memoizedState,o===null)return or(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Ta(o,!1);else{if(Zt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=qu(e),i!==null){for(t.flags|=128,Ta(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return vt(Pt,Pt.current&1|2),t.child}e=e.sibling}o.tail!==null&&zt()>Ji&&(t.flags|=128,n=!0,Ta(o,!1),t.lanes=4194304)}else{if(!n)if(e=qu(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ta(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Tt)return or(t),null}else 2*zt()-o.renderingStartTime>Ji&&r!==1073741824&&(t.flags|=128,n=!0,Ta(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=zt(),t.sibling=null,r=Pt.current,vt(Pt,n?r&1|2:r&1),t):(or(t),null);case 22:case 23:return eg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Nr&1073741824&&(or(t),t.subtreeFlags&6&&(t.flags|=8192)):or(t),null;case 24:return null;case 25:return null}throw Error(oe(156,t.tag))}function g2(e,t){switch(Am(t),t.tag){case 1:return Sr(t.type)&&$u(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(),_t(br),_t(lr),$m(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wm(t),null;case 13:if(_t(Pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(oe(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _t(Pt),null;case 4:return Xi(),null;case 10:return Fm(t.type._context),null;case 22:case 23:return eg(),null;case 24:return null;default:return null}}var Hc=!1,ir=!1,v2=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ei(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){It(e,t,n)}else r.current=null}function _p(e,t,r){try{r()}catch(n){It(e,t,n)}}var Ly=!1;function y2(e,t){if(sp=zu,e=vx(),Dm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==r||s!==0&&d.nodeType!==3||(a=i+s),d!==o||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===r&&++c===s&&(a=i),h===o&&++f===n&&(l=i),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(op={focusedElem:e,selectionRange:r},zu=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var m=w.memoizedProps,x=w.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:rn(t.type,m),x);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(C){It(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return w=Ly,Ly=!1,w}function Qa(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&_p(t,r,o)}s=s.next}while(s!==n)}}function Wd(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 bp(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 h_(e){var t=e.alternate;t!==null&&(e.alternate=null,h_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cn],delete t[xl],delete t[lp],delete t[e2],delete t[t2])),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 p_(e){return e.tag===5||e.tag===3||e.tag===4}function Fy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||p_(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 Sp(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=Wu));else if(n!==4&&(e=e.child,e!==null))for(Sp(e,t,r),e=e.sibling;e!==null;)Sp(e,t,r),e=e.sibling}function kp(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(kp(e,t,r),e=e.sibling;e!==null;)kp(e,t,r),e=e.sibling}var er=null,nn=!1;function Ns(e,t,r){for(r=r.child;r!==null;)m_(e,t,r),r=r.sibling}function m_(e,t,r){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(Ad,r)}catch{}switch(r.tag){case 5:ir||Ei(r,t);case 6:var n=er,s=nn;er=null,Ns(e,t,r),er=n,nn=s,er!==null&&(nn?(e=er,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):er.removeChild(r.stateNode));break;case 18:er!==null&&(nn?(e=er,r=r.stateNode,e.nodeType===8?rh(e.parentNode,r):e.nodeType===1&&rh(e,r),ml(e)):rh(er,r.stateNode));break;case 4:n=er,s=nn,er=r.stateNode.containerInfo,nn=!0,Ns(e,t,r),er=n,nn=s;break;case 0:case 11:case 14:case 15:if(!ir&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&_p(r,t,i),s=s.next}while(s!==n)}Ns(e,t,r);break;case 1:if(!ir&&(Ei(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){It(r,t,a)}Ns(e,t,r);break;case 21:Ns(e,t,r);break;case 22:r.mode&1?(ir=(n=ir)||r.memoizedState!==null,Ns(e,t,r),ir=n):Ns(e,t,r);break;default:Ns(e,t,r)}}function zy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new v2),t.forEach(function(n){var s=T2.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function tn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:er=a.stateNode,nn=!1;break e;case 3:er=a.stateNode.containerInfo,nn=!0;break e;case 4:er=a.stateNode.containerInfo,nn=!0;break e}a=a.return}if(er===null)throw Error(oe(160));m_(o,i,s),er=null,nn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){It(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)g_(t,e),t=t.sibling}function g_(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(tn(t,e),Sn(e),n&4){try{Qa(3,e,e.return),Wd(3,e)}catch(m){It(e,e.return,m)}try{Qa(5,e,e.return)}catch(m){It(e,e.return,m)}}break;case 1:tn(t,e),Sn(e),n&512&&r!==null&&Ei(r,r.return);break;case 5:if(tn(t,e),Sn(e),n&512&&r!==null&&Ei(r,r.return),e.flags&32){var s=e.stateNode;try{dl(s,"")}catch(m){It(e,e.return,m)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Fw(s,o),Gh(a,i);var c=Gh(a,o);for(i=0;i<l.length;i+=2){var f=l[i],d=l[i+1];f==="style"?$w(s,d):f==="dangerouslySetInnerHTML"?Vw(s,d):f==="children"?dl(s,d):wm(s,f,d,c)}switch(a){case"input":$h(s,o);break;case"textarea":zw(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Di(s,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?Di(s,!!o.multiple,o.defaultValue,!0):Di(s,!!o.multiple,o.multiple?[]:"",!1))}s[xl]=o}catch(m){It(e,e.return,m)}}break;case 6:if(tn(t,e),Sn(e),n&4){if(e.stateNode===null)throw Error(oe(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(m){It(e,e.return,m)}}break;case 3:if(tn(t,e),Sn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ml(t.containerInfo)}catch(m){It(e,e.return,m)}break;case 4:tn(t,e),Sn(e);break;case 13:tn(t,e),Sn(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Qm=zt())),n&4&&zy(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(ir=(c=ir)||f,tn(t,e),ir=c):tn(t,e),Sn(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(xe=e,f=e.child;f!==null;){for(d=xe=f;xe!==null;){switch(h=xe,p=h.child,h.tag){case 0:case 11:case 14:case 15:Qa(4,h,h.return);break;case 1:Ei(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(m){It(n,r,m)}}break;case 5:Ei(h,h.return);break;case 22:if(h.memoizedState!==null){Vy(d);continue}}p!==null?(p.return=h,xe=p):Vy(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{s=d.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Ww("display",i))}catch(m){It(e,e.return,m)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){It(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:tn(t,e),Sn(e),n&4&&zy(e);break;case 21:break;default:tn(t,e),Sn(e)}}function Sn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(p_(r)){var n=r;break e}r=r.return}throw Error(oe(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(dl(s,""),n.flags&=-33);var o=Fy(e);kp(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Fy(e);Sp(e,a,i);break;default:throw Error(oe(161))}}catch(l){It(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function w2(e,t,r){xe=e,v_(e)}function v_(e,t,r){for(var n=(e.mode&1)!==0;xe!==null;){var s=xe,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Hc;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ir;a=Hc;var c=ir;if(Hc=i,(ir=l)&&!c)for(xe=s;xe!==null;)i=xe,l=i.child,i.tag===22&&i.memoizedState!==null?Wy(s):l!==null?(l.return=i,xe=l):Wy(s);for(;o!==null;)xe=o,v_(o),o=o.sibling;xe=s,Hc=a,ir=c}Uy(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,xe=o):Uy(e)}}function Uy(e){for(;xe!==null;){var t=xe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ir||Wd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!ir)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:rn(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ky(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ky(t,i,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 c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&ml(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(oe(163))}ir||t.flags&512&&bp(t)}catch(h){It(t,t.return,h)}}if(t===e){xe=null;break}if(r=t.sibling,r!==null){r.return=t.return,xe=r;break}xe=t.return}}function Vy(e){for(;xe!==null;){var t=xe;if(t===e){xe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,xe=r;break}xe=t.return}}function Wy(e){for(;xe!==null;){var t=xe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Wd(4,t)}catch(l){It(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){It(t,s,l)}}var o=t.return;try{bp(t)}catch(l){It(t,o,l)}break;case 5:var i=t.return;try{bp(t)}catch(l){It(t,i,l)}}}catch(l){It(t,t.return,l)}if(t===e){xe=null;break}var a=t.sibling;if(a!==null){a.return=t.return,xe=a;break}xe=t.return}}var x2=Math.ceil,Ju=ys.ReactCurrentDispatcher,qm=ys.ReactCurrentOwner,Zr=ys.ReactCurrentBatchConfig,it=0,Xt=null,Wt=null,tr=0,Nr=0,Ti=uo(0),Zt=0,El=null,Uo=0,$d=0,Xm=0,Ja=null,xr=null,Qm=0,Ji=1/0,Xn=null,ed=!1,Cp=null,Ks=null,Yc=!1,Us=null,td=0,el=0,Ep=null,vu=-1,yu=0;function hr(){return it&6?zt():vu!==-1?vu:vu=zt()}function qs(e){return e.mode&1?it&2&&tr!==0?tr&-tr:n2.transition!==null?(yu===0&&(yu=tx()),yu):(e=ft,e!==0||(e=window.event,e=e===void 0?16:lx(e.type)),e):1}function dn(e,t,r,n){if(50<el)throw el=0,Ep=null,Error(oe(185));ec(e,r,n),(!(it&2)||e!==Xt)&&(e===Xt&&(!(it&2)&&($d|=r),Zt===4&&Ls(e,tr)),kr(e,n),r===1&&it===0&&!(t.mode&1)&&(Ji=zt()+500,zd&&fo()))}function kr(e,t){var r=e.callbackNode;nR(e,t);var n=Fu(e,e===Xt?tr:0);if(n===0)r!==null&&Xv(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Xv(r),t===1)e.tag===0?r2($y.bind(null,e)):Tx($y.bind(null,e)),QR(function(){!(it&6)&&fo()}),r=null;else{switch(rx(n)){case 1:r=km;break;case 4:r=Jw;break;case 16:r=Lu;break;case 536870912:r=ex;break;default:r=Lu}r=C_(r,y_.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function y_(e,t){if(vu=-1,yu=0,it&6)throw Error(oe(327));var r=e.callbackNode;if(Li()&&e.callbackNode!==r)return null;var n=Fu(e,e===Xt?tr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=rd(e,n);else{t=n;var s=it;it|=2;var o=x_();(Xt!==e||tr!==t)&&(Xn=null,Ji=zt()+500,Do(e,t));do try{S2();break}catch(a){w_(e,a)}while(!0);Lm(),Ju.current=o,it=s,Wt!==null?t=0:(Xt=null,tr=0,t=Zt)}if(t!==0){if(t===2&&(s=Jh(e),s!==0&&(n=s,t=Tp(e,s))),t===1)throw r=El,Do(e,0),Ls(e,n),kr(e,zt()),r;if(t===6)Ls(e,n);else{if(s=e.current.alternate,!(n&30)&&!_2(s)&&(t=rd(e,n),t===2&&(o=Jh(e),o!==0&&(n=o,t=Tp(e,o))),t===1))throw r=El,Do(e,0),Ls(e,n),kr(e,zt()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(oe(345));case 2:bo(e,xr,Xn);break;case 3:if(Ls(e,n),(n&130023424)===n&&(t=Qm+500-zt(),10<t)){if(Fu(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){hr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ap(bo.bind(null,e,xr,Xn),t);break}bo(e,xr,Xn);break;case 4:if(Ls(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-un(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*x2(n/1960))-n,10<n){e.timeoutHandle=ap(bo.bind(null,e,xr,Xn),n);break}bo(e,xr,Xn);break;case 5:bo(e,xr,Xn);break;default:throw Error(oe(329))}}}return kr(e,zt()),e.callbackNode===r?y_.bind(null,e):null}function Tp(e,t){var r=Ja;return e.current.memoizedState.isDehydrated&&(Do(e,t).flags|=256),e=rd(e,t),e!==2&&(t=xr,xr=r,t!==null&&Rp(t)),e}function Rp(e){xr===null?xr=e:xr.push.apply(xr,e)}function _2(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!hn(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ls(e,t){for(t&=~Xm,t&=~$d,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-un(t),n=1<<r;e[r]=-1,t&=~n}}function $y(e){if(it&6)throw Error(oe(327));Li();var t=Fu(e,0);if(!(t&1))return kr(e,zt()),null;var r=rd(e,t);if(e.tag!==0&&r===2){var n=Jh(e);n!==0&&(t=n,r=Tp(e,n))}if(r===1)throw r=El,Do(e,0),Ls(e,t),kr(e,zt()),r;if(r===6)throw Error(oe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bo(e,xr,Xn),kr(e,zt()),null}function Jm(e,t){var r=it;it|=1;try{return e(t)}finally{it=r,it===0&&(Ji=zt()+500,zd&&fo())}}function Vo(e){Us!==null&&Us.tag===0&&!(it&6)&&Li();var t=it;it|=1;var r=Zr.transition,n=ft;try{if(Zr.transition=null,ft=1,e)return e()}finally{ft=n,Zr.transition=r,it=t,!(it&6)&&fo()}}function eg(){Nr=Ti.current,_t(Ti)}function Do(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,XR(r)),Wt!==null)for(r=Wt.return;r!==null;){var n=r;switch(Am(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&$u();break;case 3:Xi(),_t(br),_t(lr),$m();break;case 5:Wm(n);break;case 4:Xi();break;case 13:_t(Pt);break;case 19:_t(Pt);break;case 10:Fm(n.type._context);break;case 22:case 23:eg()}r=r.return}if(Xt=e,Wt=e=Xs(e.current,null),tr=Nr=t,Zt=0,El=null,Xm=$d=Uo=0,xr=Ja=null,Co!==null){for(t=0;t<Co.length;t++)if(r=Co[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}Co=null}return e}function w_(e,t){do{var r=Wt;try{if(Lm(),pu.current=Qu,Xu){for(var n=Ot.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Xu=!1}if(zo=0,qt=Yt=Ot=null,Xa=!1,Sl=0,qm.current=null,r===null||r.return===null){Zt=1,El=t,Wt=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=tr,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,f=a,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=Py(i);if(p!==null){p.flags&=-257,jy(p,i,a,o,t),p.mode&1&&Ny(o,c,t),t=p,l=c;var w=t.updateQueue;if(w===null){var m=new Set;m.add(l),t.updateQueue=m}else w.add(l);break e}else{if(!(t&1)){Ny(o,c,t),tg();break e}l=Error(oe(426))}}else if(Tt&&a.mode&1){var x=Py(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),jy(x,i,a,o,t),Mm(Qi(l,a));break e}}o=l=Qi(l,a),Zt!==4&&(Zt=2),Ja===null?Ja=[o]:Ja.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=r_(o,l,t);Sy(o,g);break e;case 1:a=l;var v=o.type,_=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Ks===null||!Ks.has(_)))){o.flags|=65536,t&=-t,o.lanes|=t;var C=n_(o,a,t);Sy(o,C);break e}}o=o.return}while(o!==null)}b_(r)}catch(E){t=E,Wt===r&&r!==null&&(Wt=r=r.return);continue}break}while(!0)}function x_(){var e=Ju.current;return Ju.current=Qu,e===null?Qu:e}function tg(){(Zt===0||Zt===3||Zt===2)&&(Zt=4),Xt===null||!(Uo&268435455)&&!($d&268435455)||Ls(Xt,tr)}function rd(e,t){var r=it;it|=2;var n=x_();(Xt!==e||tr!==t)&&(Xn=null,Do(e,t));do try{b2();break}catch(s){w_(e,s)}while(!0);if(Lm(),it=r,Ju.current=n,Wt!==null)throw Error(oe(261));return Xt=null,tr=0,Zt}function b2(){for(;Wt!==null;)__(Wt)}function S2(){for(;Wt!==null&&!GT();)__(Wt)}function __(e){var t=k_(e.alternate,e,Nr);e.memoizedProps=e.pendingProps,t===null?b_(e):Wt=t,qm.current=null}function b_(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=g2(r,t),r!==null){r.flags&=32767,Wt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Zt=6,Wt=null;return}}else if(r=m2(r,t,Nr),r!==null){Wt=r;return}if(t=t.sibling,t!==null){Wt=t;return}Wt=t=e}while(t!==null);Zt===0&&(Zt=5)}function bo(e,t,r){var n=ft,s=Zr.transition;try{Zr.transition=null,ft=1,k2(e,t,r,n)}finally{Zr.transition=s,ft=n}return null}function k2(e,t,r,n){do Li();while(Us!==null);if(it&6)throw Error(oe(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(oe(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(sR(e,o),e===Xt&&(Wt=Xt=null,tr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Yc||(Yc=!0,C_(Lu,function(){return Li(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Zr.transition,Zr.transition=null;var i=ft;ft=1;var a=it;it|=4,qm.current=null,y2(e,r),g_(r,e),BR(op),zu=!!sp,op=sp=null,e.current=r,w2(r),KT(),it=a,ft=i,Zr.transition=o}else e.current=r;if(Yc&&(Yc=!1,Us=e,td=s),o=e.pendingLanes,o===0&&(Ks=null),QT(r.stateNode),kr(e,zt()),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(ed)throw ed=!1,e=Cp,Cp=null,e;return td&1&&e.tag!==0&&Li(),o=e.pendingLanes,o&1?e===Ep?el++:(el=0,Ep=e):el=0,fo(),null}function Li(){if(Us!==null){var e=rx(td),t=Zr.transition,r=ft;try{if(Zr.transition=null,ft=16>e?16:e,Us===null)var n=!1;else{if(e=Us,Us=null,td=0,it&6)throw Error(oe(331));var s=it;for(it|=4,xe=e.current;xe!==null;){var o=xe,i=o.child;if(xe.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(xe=c;xe!==null;){var f=xe;switch(f.tag){case 0:case 11:case 15:Qa(8,f,o)}var d=f.child;if(d!==null)d.return=f,xe=d;else for(;xe!==null;){f=xe;var h=f.sibling,p=f.return;if(h_(f),f===c){xe=null;break}if(h!==null){h.return=p,xe=h;break}xe=p}}}var w=o.alternate;if(w!==null){var m=w.child;if(m!==null){w.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}xe=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,xe=i;else e:for(;xe!==null;){if(o=xe,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Qa(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,xe=g;break e}xe=o.return}}var v=e.current;for(xe=v;xe!==null;){i=xe;var _=i.child;if(i.subtreeFlags&2064&&_!==null)_.return=i,xe=_;else e:for(i=v;xe!==null;){if(a=xe,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Wd(9,a)}}catch(E){It(a,a.return,E)}if(a===i){xe=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,xe=C;break e}xe=a.return}}if(it=s,fo(),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(Ad,e)}catch{}n=!0}return n}finally{ft=r,Zr.transition=t}}return!1}function By(e,t,r){t=Qi(r,t),t=r_(e,t,1),e=Gs(e,t,1),t=hr(),e!==null&&(ec(e,1,t),kr(e,t))}function It(e,t,r){if(e.tag===3)By(e,e,r);else for(;t!==null;){if(t.tag===3){By(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ks===null||!Ks.has(n))){e=Qi(r,e),e=n_(t,e,1),t=Gs(t,e,1),e=hr(),t!==null&&(ec(t,1,e),kr(t,e));break}}t=t.return}}function C2(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=hr(),e.pingedLanes|=e.suspendedLanes&r,Xt===e&&(tr&r)===r&&(Zt===4||Zt===3&&(tr&130023424)===tr&&500>zt()-Qm?Do(e,0):Xm|=r),kr(e,t)}function S_(e,t){t===0&&(e.mode&1?(t=Ic,Ic<<=1,!(Ic&130023424)&&(Ic=4194304)):t=1);var r=hr();e=ds(e,t),e!==null&&(ec(e,t,r),kr(e,r))}function E2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),S_(e,r)}function T2(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(oe(314))}n!==null&&n.delete(t),S_(e,r)}var k_;k_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||br.current)_r=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return _r=!1,p2(e,t,r);_r=!!(e.flags&131072)}else _r=!1,Tt&&t.flags&1048576&&Rx(t,Yu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;gu(e,t),e=t.pendingProps;var s=Gi(t,lr.current);Ii(t,r),s=Hm(null,t,n,e,s,r);var o=Ym();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,Sr(n)?(o=!0,Bu(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Um(t),s.updater=Vd,t.stateNode=s,s._reactInternals=t,pp(t,n,e,r),t=vp(null,t,n,!0,o,r)):(t.tag=0,Tt&&o&&Om(t),dr(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(gu(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=N2(n),e=rn(n,e),s){case 0:t=gp(null,t,n,e,r);break e;case 1:t=Ay(null,t,n,e,r);break e;case 11:t=Dy(null,t,n,e,r);break e;case 14:t=Oy(null,t,n,rn(n.type,e),r);break e}throw Error(oe(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),gp(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),Ay(e,t,n,s,r);case 3:e:{if(a_(t),e===null)throw Error(oe(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Ax(e,t),Ku(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Qi(Error(oe(423)),t),t=My(e,t,n,r,s);break e}else if(n!==s){s=Qi(Error(oe(424)),t),t=My(e,t,n,r,s);break e}else for(Dr=Zs(t.stateNode.containerInfo.firstChild),Or=t,Tt=!0,on=null,r=Dx(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ki(),n===s){t=fs(e,t,r);break e}dr(e,t,n,r)}t=t.child}return t;case 5:return Mx(t),e===null&&dp(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,ip(n,s)?i=null:o!==null&&ip(n,o)&&(t.flags|=32),i_(e,t),dr(e,t,i,r),t.child;case 6:return e===null&&dp(t),null;case 13:return l_(e,t,r);case 4:return Vm(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=qi(t,null,n,r):dr(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),Dy(e,t,n,s,r);case 7:return dr(e,t,t.pendingProps,r),t.child;case 8:return dr(e,t,t.pendingProps.children,r),t.child;case 12:return dr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,vt(Zu,n._currentValue),n._currentValue=i,o!==null)if(hn(o.value,i)){if(o.children===s.children&&!br.current){t=fs(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=os(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),fp(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(oe(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),fp(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}dr(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ii(t,r),s=Kr(s),n=n(s),t.flags|=1,dr(e,t,n,r),t.child;case 14:return n=t.type,s=rn(n,t.pendingProps),s=rn(n.type,s),Oy(e,t,n,s,r);case 15:return s_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:rn(n,s),gu(e,t),t.tag=1,Sr(n)?(e=!0,Bu(t)):e=!1,Ii(t,r),t_(t,n,s),pp(t,n,s,r),vp(null,t,n,!0,e,r);case 19:return c_(e,t,r);case 22:return o_(e,t,r)}throw Error(oe(156,t.tag))};function C_(e,t){return Qw(e,t)}function R2(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 Yr(e,t,r,n){return new R2(e,t,r,n)}function rg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function N2(e){if(typeof e=="function")return rg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_m)return 11;if(e===bm)return 14}return 2}function Xs(e,t){var r=e.alternate;return r===null?(r=Yr(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 wu(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")rg(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case vi:return Oo(r.children,s,o,t);case xm:i=8,s|=8;break;case Fh:return e=Yr(12,r,t,s|2),e.elementType=Fh,e.lanes=o,e;case zh:return e=Yr(13,r,t,s),e.elementType=zh,e.lanes=o,e;case Uh:return e=Yr(19,r,t,s),e.elementType=Uh,e.lanes=o,e;case Mw:return Bd(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ow:i=10;break e;case Aw:i=9;break e;case _m:i=11;break e;case bm:i=14;break e;case As:i=16,n=null;break e}throw Error(oe(130,e==null?e:typeof e,""))}return t=Yr(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Oo(e,t,r,n){return e=Yr(7,e,n,t),e.lanes=r,e}function Bd(e,t,r,n){return e=Yr(22,e,n,t),e.elementType=Mw,e.lanes=r,e.stateNode={isHidden:!1},e}function uh(e,t,r){return e=Yr(6,e,null,t),e.lanes=r,e}function dh(e,t,r){return t=Yr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function P2(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=Hf(0),this.expirationTimes=Hf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hf(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ng(e,t,r,n,s,o,i,a,l){return e=new P2(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Yr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Um(o),e}function j2(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function E_(e){if(!e)return eo;e=e._reactInternals;e:{if(qo(e)!==e||e.tag!==1)throw Error(oe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Sr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(oe(171))}if(e.tag===1){var r=e.type;if(Sr(r))return Ex(e,r,t)}return t}function T_(e,t,r,n,s,o,i,a,l){return e=ng(r,n,!0,e,s,o,i,a,l),e.context=E_(null),r=e.current,n=hr(),s=qs(r),o=os(n,s),o.callback=t??null,Gs(r,o,s),e.current.lanes=s,ec(e,s,n),kr(e,n),e}function Hd(e,t,r,n){var s=t.current,o=hr(),i=qs(s);return r=E_(r),t.context===null?t.context=r:t.pendingContext=r,t=os(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Gs(s,t,i),e!==null&&(dn(e,s,i,o),hu(e,s,i)),i}function nd(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 Hy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function sg(e,t){Hy(e,t),(e=e.alternate)&&Hy(e,t)}function D2(){return null}var R_=typeof reportError=="function"?reportError:function(e){console.error(e)};function og(e){this._internalRoot=e}Yd.prototype.render=og.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(oe(409));Hd(e,t,null,null)};Yd.prototype.unmount=og.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vo(function(){Hd(null,e,null,null)}),t[us]=null}};function Yd(e){this._internalRoot=e}Yd.prototype.unstable_scheduleHydration=function(e){if(e){var t=ox();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Is.length&&t!==0&&t<Is[r].priority;r++);Is.splice(r,0,e),r===0&&ax(e)}};function ig(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yy(){}function O2(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var c=nd(i);o.call(c)}}var i=T_(t,n,e,0,null,!1,!1,"",Yy);return e._reactRootContainer=i,e[us]=i.current,yl(e.nodeType===8?e.parentNode:e),Vo(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=nd(l);a.call(c)}}var l=ng(e,0,!1,null,null,!1,!1,"",Yy);return e._reactRootContainer=l,e[us]=l.current,yl(e.nodeType===8?e.parentNode:e),Vo(function(){Hd(t,l,r,n)}),l}function Gd(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=nd(i);a.call(l)}}Hd(t,i,e,s)}else i=O2(r,t,e,s,n);return nd(i)}nx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=za(t.pendingLanes);r!==0&&(Cm(t,r|1),kr(t,zt()),!(it&6)&&(Ji=zt()+500,fo()))}break;case 13:Vo(function(){var n=ds(e,1);if(n!==null){var s=hr();dn(n,e,1,s)}}),sg(e,1)}};Em=function(e){if(e.tag===13){var t=ds(e,134217728);if(t!==null){var r=hr();dn(t,e,134217728,r)}sg(e,134217728)}};sx=function(e){if(e.tag===13){var t=qs(e),r=ds(e,t);if(r!==null){var n=hr();dn(r,e,t,n)}sg(e,t)}};ox=function(){return ft};ix=function(e,t){var r=ft;try{return ft=e,t()}finally{ft=r}};qh=function(e,t,r){switch(t){case"input":if($h(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=Fd(n);if(!s)throw Error(oe(90));Lw(n),$h(n,s)}}}break;case"textarea":zw(e,r);break;case"select":t=r.value,t!=null&&Di(e,!!r.multiple,t,!1)}};Yw=Jm;Zw=Vo;var A2={usingClientEntryPoint:!1,Events:[rc,_i,Fd,Bw,Hw,Jm]},Ra={findFiberByHostInstance:ko,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},M2={bundleType:Ra.bundleType,version:Ra.version,rendererPackageName:Ra.rendererPackageName,rendererConfig:Ra.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ys.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qw(e),e===null?null:e.stateNode},findFiberByHostInstance:Ra.findFiberByHostInstance||D2,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 Zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zc.isDisabled&&Zc.supportsFiber)try{Ad=Zc.inject(M2),jn=Zc}catch{}}Fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A2;Fr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ig(t))throw Error(oe(200));return j2(e,t,null,r)};Fr.createRoot=function(e,t){if(!ig(e))throw Error(oe(299));var r=!1,n="",s=R_;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ng(e,1,!1,null,null,r,!1,n,s),e[us]=t.current,yl(e.nodeType===8?e.parentNode:e),new og(t)};Fr.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(oe(188)):(e=Object.keys(e).join(","),Error(oe(268,e)));return e=qw(t),e=e===null?null:e.stateNode,e};Fr.flushSync=function(e){return Vo(e)};Fr.hydrate=function(e,t,r){if(!Zd(t))throw Error(oe(200));return Gd(null,e,t,!0,r)};Fr.hydrateRoot=function(e,t,r){if(!ig(e))throw Error(oe(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=R_;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=T_(t,null,e,1,r??null,s,!1,o,i),e[us]=t.current,yl(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 Yd(t)};Fr.render=function(e,t,r){if(!Zd(t))throw Error(oe(200));return Gd(null,e,t,!1,r)};Fr.unmountComponentAtNode=function(e){if(!Zd(e))throw Error(oe(40));return e._reactRootContainer?(Vo(function(){Gd(null,null,e,!1,function(){e._reactRootContainer=null,e[us]=null})}),!0):!1};Fr.unstable_batchedUpdates=Jm;Fr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Zd(r))throw Error(oe(200));if(e==null||e._reactInternals===void 0)throw Error(oe(38));return Gd(e,t,r,!1,n)};Fr.version="18.3.1-next-f1338f8080-20240426";function N_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(N_)}catch(e){console.error(e)}}N_(),Nw.exports=Fr;var ws=Nw.exports;const P_=fm(ws),I2=gw({__proto__:null,default:P_},[ws]);var Zy=ws;Ih.createRoot=Zy.createRoot,Ih.hydrateRoot=Zy.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 Nt(){return Nt=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},Nt.apply(this,arguments)}var Vt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vt||(Vt={}));const Gy="popstate";function L2(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:l=""}=xs(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),Tl("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let l=s.location.href,c=l.indexOf("#");a=c===-1?l:l.slice(0,c)}return a+"#"+(typeof o=="string"?o:$o(o))}function n(s,o){Wo(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return z2(t,r,n,e)}function Xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Wo(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function F2(){return Math.random().toString(36).substr(2,8)}function Ky(e,t){return{usr:e.state,key:e.key,idx:t}}function Tl(e,t,r,n){return r===void 0&&(r=null),Nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xs(t):t,{state:r,key:t&&t.key||n||F2()})}function $o(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 xs(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 z2(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=Vt.Pop,l=null,c=f();c==null&&(c=0,i.replaceState(Nt({},i.state,{idx:c}),""));function f(){return(i.state||{idx:null}).idx}function d(){a=Vt.Pop;let x=f(),g=x==null?null:x-c;c=x,l&&l({action:a,location:m.location,delta:g})}function h(x,g){a=Vt.Push;let v=Tl(m.location,x,g);r&&r(v,x),c=f()+1;let _=Ky(v,c),C=m.createHref(v);try{i.pushState(_,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}o&&l&&l({action:a,location:m.location,delta:1})}function p(x,g){a=Vt.Replace;let v=Tl(m.location,x,g);r&&r(v,x),c=f();let _=Ky(v,c),C=m.createHref(v);i.replaceState(_,"",C),o&&l&&l({action:a,location:m.location,delta:0})}function w(x){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof x=="string"?x:$o(x);return v=v.replace(/ $/,"%20"),Xe(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return a},get location(){return e(s,i)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Gy,d),l=x,()=>{s.removeEventListener(Gy,d),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let g=w(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:p,go(x){return i.go(x)}};return m}var gt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gt||(gt={}));const U2=new Set(["lazy","caseSensitive","path","id","index","children"]);function V2(e){return e.index===!0}function Rl(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((s,o)=>{let i=[...r,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(Xe(s.index!==!0||!s.children,"Cannot specify children on an index route"),Xe(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),V2(s)){let l=Nt({},s,t(s),{id:a});return n[a]=l,l}else{let l=Nt({},s,t(s),{id:a,children:void 0});return n[a]=l,s.children&&(l.children=Rl(s.children,t,i,n)),l}})}function So(e,t,r){return r===void 0&&(r="/"),xu(e,t,r,!1)}function xu(e,t,r,n){let s=typeof t=="string"?xs(t):t,o=ca(s.pathname||"/",r);if(o==null)return null;let i=j_(e);$2(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=eN(o);a=Q2(i[l],c,n)}return a}function W2(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 j_(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Xe(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 c=is([n,l.relativePath]),f=r.concat(l);o.children&&o.children.length>0&&(Xe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),j_(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:q2(c,o.index),routesMeta:f})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of D_(o.path))s(o,i,l)}),t}function D_(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=D_(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function $2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:X2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const B2=/^:[\w-]+$/,H2=3,Y2=2,Z2=1,G2=10,K2=-2,qy=e=>e==="*";function q2(e,t){let r=e.split("/"),n=r.length;return r.some(qy)&&(n+=K2),t&&(n+=Y2),r.filter(s=>!qy(s)).reduce((s,o)=>s+(B2.test(o)?H2:o===""?Z2:G2),n)}function X2(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 Q2(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",d=Xy({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),h=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=Xy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!d)return null;Object.assign(s,d.params),i.push({params:s,pathname:is([o,d.pathname]),pathnameBase:nN(is([o,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(o=is([o,d.pathnameBase]))}return i}function Xy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=J2(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,f,d)=>{let{paramName:h,isOptional:p}=f;if(h==="*"){let m=a[d]||"";i=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const w=a[d];return p&&!w?c[h]=void 0:c[h]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function J2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Wo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,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 eN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Wo(!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 ca(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 tN(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?xs(e):e;return{pathname:r?r.startsWith("/")?r:rN(r,t):t,search:sN(n),hash:oN(s)}}function rN(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 fh(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 O_(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Kd(e,t){let r=O_(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function qd(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=xs(e):(s=Nt({},e),Xe(!s.pathname||!s.pathname.includes("?"),fh("?","pathname","search",s)),Xe(!s.pathname||!s.pathname.includes("#"),fh("#","pathname","hash",s)),Xe(!s.search||!s.search.includes("#"),fh("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=tN(s,a),c=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const is=e=>e.join("/").replace(/\/\/+/g,"/"),nN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),sN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ag{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 Xd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const A_=["post","put","patch","delete"],iN=new Set(A_),aN=["get",...A_],lN=new Set(aN),cN=new Set([301,302,303,307,308]),uN=new Set([307,308]),hh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dN={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Na={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},lg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fN=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),M_="remix-router-transitions";function hN(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;Xe(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=B=>({hasErrorBoundary:U(B)})}else s=fN;let o={},i=Rl(e.routes,s,void 0,o),a,l=e.basename||"/",c=e.unstable_dataStrategy||yN,f=e.unstable_patchRoutesOnMiss,d=Nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,w=null,m=null,x=null,g=e.hydrationData!=null,v=So(i,e.history.location,l),_=null;if(v==null&&!f){let U=ur(404,{pathname:e.history.location.pathname}),{matches:B,route:K}=a0(i);v=B,_={[K.id]:U}}v&&f&&!e.hydrationData&&zf(v,i,e.history.location.pathname).active&&(v=null);let C;if(!v)C=!1,v=[];else if(v.some(U=>U.route.lazy))C=!1;else if(!v.some(U=>U.route.loader))C=!0;else if(d.v7_partialHydration){let U=e.hydrationData?e.hydrationData.loaderData:null,B=e.hydrationData?e.hydrationData.errors:null,K=re=>re.route.loader?typeof re.route.loader=="function"&&re.route.loader.hydrate===!0?!1:U&&U[re.route.id]!==void 0||B&&B[re.route.id]!==void 0:!0;if(B){let re=v.findIndex(ve=>B[ve.route.id]!==void 0);C=v.slice(0,re+1).every(K)}else C=v.every(K)}else C=e.hydrationData!=null;let E,T={historyAction:e.history.action,location:e.history.location,matches:v,initialized:C,navigation:hh,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||_,fetchers:new Map,blockers:new Map},P=Vt.Pop,O=!1,j,L=!1,q=new Map,R=null,F=!1,b=!1,W=[],te=[],$=new Map,Z=0,I=-1,Q=new Map,z=new Set,V=new Map,de=new Map,ne=new Set,se=new Map,Ee=new Map,fe=new Map,ge=!1;function be(){if(h=e.history.listen(U=>{let{action:B,location:K,delta:re}=U;if(ge){ge=!1;return}Wo(Ee.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 ve=Cc({currentLocation:T.location,nextLocation:K,historyAction:B});if(ve&&re!=null){ge=!0,e.history.go(re*-1),ri(ve,{state:"blocked",location:K,proceed(){ri(ve,{state:"proceeding",proceed:void 0,reset:void 0,location:K}),e.history.go(re)},reset(){let ke=new Map(T.blockers);ke.set(ve,Na),Se({blockers:ke})}});return}return G(B,K)}),r){jN(t,q);let U=()=>DN(t,q);t.addEventListener("pagehide",U),R=()=>t.removeEventListener("pagehide",U)}return T.initialized||G(Vt.Pop,T.location,{initialHydration:!0}),E}function Pe(){h&&h(),R&&R(),p.clear(),j&&j.abort(),T.fetchers.forEach((U,B)=>$t(B)),T.blockers.forEach((U,B)=>kc(B))}function Te(U){return p.add(U),()=>p.delete(U)}function Se(U,B){B===void 0&&(B={}),T=Nt({},T,U);let K=[],re=[];d.v7_fetcherPersist&&T.fetchers.forEach((ve,ke)=>{ve.state==="idle"&&(ne.has(ke)?re.push(ke):K.push(ke))}),[...p].forEach(ve=>ve(T,{deletedFetchers:re,unstable_viewTransitionOpts:B.viewTransitionOpts,unstable_flushSync:B.flushSync===!0})),d.v7_fetcherPersist&&(K.forEach(ve=>T.fetchers.delete(ve)),re.forEach(ve=>$t(ve)))}function rt(U,B,K){var re,ve;let{flushSync:ke}=K===void 0?{}:K,Ie=T.actionData!=null&&T.navigation.formMethod!=null&&sn(T.navigation.formMethod)&&T.navigation.state==="loading"&&((re=U.state)==null?void 0:re._isRedirect)!==!0,ce;B.actionData?Object.keys(B.actionData).length>0?ce=B.actionData:ce=null:Ie?ce=T.actionData:ce=null;let Ve=B.loaderData?o0(T.loaderData,B.loaderData,B.matches||[],B.errors):T.loaderData,Ne=T.blockers;Ne.size>0&&(Ne=new Map(Ne),Ne.forEach((dt,mt)=>Ne.set(mt,Na)));let je=O===!0||T.navigation.formMethod!=null&&sn(T.navigation.formMethod)&&((ve=U.state)==null?void 0:ve._isRedirect)!==!0;a&&(i=a,a=void 0),F||P===Vt.Pop||(P===Vt.Push?e.history.push(U,U.state):P===Vt.Replace&&e.history.replace(U,U.state));let ht;if(P===Vt.Pop){let dt=q.get(T.location.pathname);dt&&dt.has(U.pathname)?ht={currentLocation:T.location,nextLocation:U}:q.has(U.pathname)&&(ht={currentLocation:U,nextLocation:T.location})}else if(L){let dt=q.get(T.location.pathname);dt?dt.add(U.pathname):(dt=new Set([U.pathname]),q.set(T.location.pathname,dt)),ht={currentLocation:T.location,nextLocation:U}}Se(Nt({},B,{actionData:ce,loaderData:Ve,historyAction:P,location:U,initialized:!0,navigation:hh,revalidation:"idle",restoreScrollPosition:Lv(U,B.matches||T.matches),preventScrollReset:je,blockers:Ne}),{viewTransitionOpts:ht,flushSync:ke===!0}),P=Vt.Pop,O=!1,L=!1,F=!1,b=!1,W=[],te=[]}async function k(U,B){if(typeof U=="number"){e.history.go(U);return}let K=Np(T.location,T.matches,l,d.v7_prependBasename,U,d.v7_relativeSplatPath,B==null?void 0:B.fromRouteId,B==null?void 0:B.relative),{path:re,submission:ve,error:ke}=Qy(d.v7_normalizeFormMethod,!1,K,B),Ie=T.location,ce=Tl(T.location,re,B&&B.state);ce=Nt({},ce,e.history.encodeLocation(ce));let Ve=B&&B.replace!=null?B.replace:void 0,Ne=Vt.Push;Ve===!0?Ne=Vt.Replace:Ve===!1||ve!=null&&sn(ve.formMethod)&&ve.formAction===T.location.pathname+T.location.search&&(Ne=Vt.Replace);let je=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,ht=(B&&B.unstable_flushSync)===!0,dt=Cc({currentLocation:Ie,nextLocation:ce,historyAction:Ne});if(dt){ri(dt,{state:"blocked",location:ce,proceed(){ri(dt,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),k(U,B)},reset(){let mt=new Map(T.blockers);mt.set(dt,Na),Se({blockers:mt})}});return}return await G(Ne,ce,{submission:ve,pendingError:ke,preventScrollReset:je,replace:B&&B.replace,enableViewTransition:B&&B.unstable_viewTransition,flushSync:ht})}function J(){if(Fe(),Se({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){G(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}G(P||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function G(U,B,K){j&&j.abort(),j=null,P=U,F=(K&&K.startUninterruptedRevalidation)===!0,iT(T.location,T.matches),O=(K&&K.preventScrollReset)===!0,L=(K&&K.enableViewTransition)===!0;let re=a||i,ve=K&&K.overrideNavigation,ke=So(re,B,l),Ie=(K&&K.flushSync)===!0,ce=zf(ke,re,B.pathname);if(ce.active&&ce.matches&&(ke=ce.matches),!ke){let{error:ct,notFoundMatches:Jt,route:Ut}=ni(B.pathname);rt(B,{matches:Jt,loaderData:{},errors:{[Ut.id]:ct}},{flushSync:Ie});return}if(T.initialized&&!b&&kN(T.location,B)&&!(K&&K.submission&&sn(K.submission.formMethod))){rt(B,{matches:ke},{flushSync:Ie});return}j=new AbortController;let Ve=li(e.history,B,j.signal,K&&K.submission),Ne;if(K&&K.pendingError)Ne=[Ri(ke).route.id,{type:gt.error,error:K.pendingError}];else if(K&&K.submission&&sn(K.submission.formMethod)){let ct=await D(Ve,B,K.submission,ke,ce.active,{replace:K.replace,flushSync:Ie});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Jt,Ut]=ct.pendingActionResult;if(Pr(Ut)&&Xd(Ut.error)&&Ut.error.status===404){j=null,rt(B,{matches:ct.matches,loaderData:{},errors:{[Jt]:Ut.error}});return}}ke=ct.matches||ke,Ne=ct.pendingActionResult,ve=ph(B,K.submission),Ie=!1,ce.active=!1,Ve=li(e.history,Ve.url,Ve.signal)}let{shortCircuited:je,matches:ht,loaderData:dt,errors:mt}=await S(Ve,B,ke,ce.active,ve,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,Ie,Ne);je||(j=null,rt(B,Nt({matches:ht||ke},i0(Ne),{loaderData:dt,errors:mt})))}async function D(U,B,K,re,ve,ke){ke===void 0&&(ke={}),Fe();let Ie=NN(B,K);if(Se({navigation:Ie},{flushSync:ke.flushSync===!0}),ve){let Ne=await Ec(re,B.pathname,U.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let{boundaryId:je,error:ht}=_n(B.pathname,Ne);return{matches:Ne.partialMatches,pendingActionResult:[je,{type:gt.error,error:ht}]}}else if(Ne.matches)re=Ne.matches;else{let{notFoundMatches:je,error:ht,route:dt}=ni(B.pathname);return{matches:je,pendingActionResult:[dt.id,{type:gt.error,error:ht}]}}}let ce,Ve=Va(re,B);if(!Ve.route.action&&!Ve.route.lazy)ce={type:gt.error,error:ur(405,{method:U.method,pathname:B.pathname,routeId:Ve.route.id})};else if(ce=(await ee("action",U,[Ve],re))[0],U.signal.aborted)return{shortCircuited:!0};if(Ro(ce)){let Ne;return ke&&ke.replace!=null?Ne=ke.replace:Ne=r0(ce.response.headers.get("Location"),new URL(U.url),l)===T.location.pathname+T.location.search,await X(U,ce,{submission:K,replace:Ne}),{shortCircuited:!0}}if(To(ce))throw ur(400,{type:"defer-action"});if(Pr(ce)){let Ne=Ri(re,Ve.route.id);return(ke&&ke.replace)!==!0&&(P=Vt.Push),{matches:re,pendingActionResult:[Ne.route.id,ce]}}return{matches:re,pendingActionResult:[Ve.route.id,ce]}}async function S(U,B,K,re,ve,ke,Ie,ce,Ve,Ne,je){let ht=ve||ph(B,ke),dt=ke||Ie||u0(ht),mt=!F&&(!d.v7_partialHydration||!Ve);if(re){if(mt){let Mt=N(je);Se(Nt({navigation:ht},Mt!==void 0?{actionData:Mt}:{}),{flushSync:Ne})}let Be=await Ec(K,B.pathname,U.signal);if(Be.type==="aborted")return{shortCircuited:!0};if(Be.type==="error"){let{boundaryId:Mt,error:Er}=_n(B.pathname,Be);return{matches:Be.partialMatches,loaderData:{},errors:{[Mt]:Er}}}else if(Be.matches)K=Be.matches;else{let{error:Mt,notFoundMatches:Er,route:Ct}=ni(B.pathname);return{matches:Er,loaderData:{},errors:{[Ct.id]:Mt}}}}let ct=a||i,[Jt,Ut]=Jy(e.history,T,K,dt,B,d.v7_partialHydration&&Ve===!0,d.v7_skipActionErrorRevalidation,b,W,te,ne,V,z,ct,l,je);if(Ts(Be=>!(K&&K.some(Mt=>Mt.route.id===Be))||Jt&&Jt.some(Mt=>Mt.route.id===Be)),I=++Z,Jt.length===0&&Ut.length===0){let Be=Bn();return rt(B,Nt({matches:K,loaderData:{},errors:je&&Pr(je[1])?{[je[0]]:je[1].error}:null},i0(je),Be?{fetchers:new Map(T.fetchers)}:{}),{flushSync:Ne}),{shortCircuited:!0}}if(mt){let Be={};if(!re){Be.navigation=ht;let Mt=N(je);Mt!==void 0&&(Be.actionData=Mt)}Ut.length>0&&(Be.fetchers=A(Ut)),Se(Be,{flushSync:Ne})}Ut.forEach(Be=>{$.has(Be.key)&&ot(Be.key),Be.controller&&$.set(Be.key,Be.controller)});let xa=()=>Ut.forEach(Be=>ot(Be.key));j&&j.signal.addEventListener("abort",xa);let{loaderResults:Rs,fetcherResults:si}=await he(T.matches,K,Jt,Ut,U);if(U.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",xa),Ut.forEach(Be=>$.delete(Be.key));let oi=l0([...Rs,...si]);if(oi){if(oi.idx>=Jt.length){let Be=Ut[oi.idx-Jt.length].key;z.add(Be)}return await X(U,oi.result,{replace:ce}),{shortCircuited:!0}}let{loaderData:ii,errors:bn}=s0(T,K,Jt,Rs,je,Ut,si,se);se.forEach((Be,Mt)=>{Be.subscribe(Er=>{(Er||Be.done)&&se.delete(Mt)})}),d.v7_partialHydration&&Ve&&T.errors&&Object.entries(T.errors).filter(Be=>{let[Mt]=Be;return!Jt.some(Er=>Er.route.id===Mt)}).forEach(Be=>{let[Mt,Er]=Be;bn=Object.assign(bn||{},{[Mt]:Er})});let Tc=Bn(),Rc=Wr(I),Nc=Tc||Rc||Ut.length>0;return Nt({matches:K,loaderData:ii,errors:bn},Nc?{fetchers:new Map(T.fetchers)}:{})}function N(U){if(U&&!Pr(U[1]))return{[U[0]]:U[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function A(U){return U.forEach(B=>{let K=T.fetchers.get(B.key),re=Pa(void 0,K?K.data:void 0);T.fetchers.set(B.key,re)}),new Map(T.fetchers)}function Y(U,B,K,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.");$.has(U)&&ot(U);let ve=(re&&re.unstable_flushSync)===!0,ke=a||i,Ie=Np(T.location,T.matches,l,d.v7_prependBasename,K,d.v7_relativeSplatPath,B,re==null?void 0:re.relative),ce=So(ke,Ie,l),Ve=zf(ce,ke,Ie);if(Ve.active&&Ve.matches&&(ce=Ve.matches),!ce){kt(U,B,ur(404,{pathname:Ie}),{flushSync:ve});return}let{path:Ne,submission:je,error:ht}=Qy(d.v7_normalizeFormMethod,!0,Ie,re);if(ht){kt(U,B,ht,{flushSync:ve});return}let dt=Va(ce,Ne);if(O=(re&&re.preventScrollReset)===!0,je&&sn(je.formMethod)){M(U,B,Ne,dt,ce,Ve.active,ve,je);return}V.set(U,{routeId:B,path:Ne}),H(U,B,Ne,dt,ce,Ve.active,ve,je)}async function M(U,B,K,re,ve,ke,Ie,ce){Fe(),V.delete(U);function Ve(Ct){if(!Ct.route.action&&!Ct.route.lazy){let Hn=ur(405,{method:ce.formMethod,pathname:K,routeId:B});return kt(U,B,Hn,{flushSync:Ie}),!0}return!1}if(!ke&&Ve(re))return;let Ne=T.fetchers.get(U);De(U,PN(ce,Ne),{flushSync:Ie});let je=new AbortController,ht=li(e.history,K,je.signal,ce);if(ke){let Ct=await Ec(ve,K,ht.signal);if(Ct.type==="aborted")return;if(Ct.type==="error"){let{error:Hn}=_n(K,Ct);kt(U,B,Hn,{flushSync:Ie});return}else if(Ct.matches){if(ve=Ct.matches,re=Va(ve,K),Ve(re))return}else{kt(U,B,ur(404,{pathname:K}),{flushSync:Ie});return}}$.set(U,je);let dt=Z,ct=(await ee("action",ht,[re],ve))[0];if(ht.signal.aborted){$.get(U)===je&&$.delete(U);return}if(d.v7_fetcherPersist&&ne.has(U)){if(Ro(ct)||Pr(ct)){De(U,Ds(void 0));return}}else{if(Ro(ct))if($.delete(U),I>dt){De(U,Ds(void 0));return}else return z.add(U),De(U,Pa(ce)),X(ht,ct,{fetcherSubmission:ce});if(Pr(ct)){kt(U,B,ct.error);return}}if(To(ct))throw ur(400,{type:"defer-action"});let Jt=T.navigation.location||T.location,Ut=li(e.history,Jt,je.signal),xa=a||i,Rs=T.navigation.state!=="idle"?So(xa,T.navigation.location,l):T.matches;Xe(Rs,"Didn't find any matches after fetcher action");let si=++Z;Q.set(U,si);let oi=Pa(ce,ct.data);T.fetchers.set(U,oi);let[ii,bn]=Jy(e.history,T,Rs,ce,Jt,!1,d.v7_skipActionErrorRevalidation,b,W,te,ne,V,z,xa,l,[re.route.id,ct]);bn.filter(Ct=>Ct.key!==U).forEach(Ct=>{let Hn=Ct.key,Fv=T.fetchers.get(Hn),cT=Pa(void 0,Fv?Fv.data:void 0);T.fetchers.set(Hn,cT),$.has(Hn)&&ot(Hn),Ct.controller&&$.set(Hn,Ct.controller)}),Se({fetchers:new Map(T.fetchers)});let Tc=()=>bn.forEach(Ct=>ot(Ct.key));je.signal.addEventListener("abort",Tc);let{loaderResults:Rc,fetcherResults:Nc}=await he(T.matches,Rs,ii,bn,Ut);if(je.signal.aborted)return;je.signal.removeEventListener("abort",Tc),Q.delete(U),$.delete(U),bn.forEach(Ct=>$.delete(Ct.key));let Be=l0([...Rc,...Nc]);if(Be){if(Be.idx>=ii.length){let Ct=bn[Be.idx-ii.length].key;z.add(Ct)}return X(Ut,Be.result)}let{loaderData:Mt,errors:Er}=s0(T,T.matches,ii,Rc,void 0,bn,Nc,se);if(T.fetchers.has(U)){let Ct=Ds(ct.data);T.fetchers.set(U,Ct)}Wr(si),T.navigation.state==="loading"&&si>I?(Xe(P,"Expected pending action"),j&&j.abort(),rt(T.navigation.location,{matches:Rs,loaderData:Mt,errors:Er,fetchers:new Map(T.fetchers)})):(Se({errors:Er,loaderData:o0(T.loaderData,Mt,Rs,Er),fetchers:new Map(T.fetchers)}),b=!1)}async function H(U,B,K,re,ve,ke,Ie,ce){let Ve=T.fetchers.get(U);De(U,Pa(ce,Ve?Ve.data:void 0),{flushSync:Ie});let Ne=new AbortController,je=li(e.history,K,Ne.signal);if(ke){let ct=await Ec(ve,K,je.signal);if(ct.type==="aborted")return;if(ct.type==="error"){let{error:Jt}=_n(K,ct);kt(U,B,Jt,{flushSync:Ie});return}else if(ct.matches)ve=ct.matches,re=Va(ve,K);else{kt(U,B,ur(404,{pathname:K}),{flushSync:Ie});return}}$.set(U,Ne);let ht=Z,mt=(await ee("loader",je,[re],ve))[0];if(To(mt)&&(mt=await U_(mt,je.signal,!0)||mt),$.get(U)===Ne&&$.delete(U),!je.signal.aborted){if(ne.has(U)){De(U,Ds(void 0));return}if(Ro(mt))if(I>ht){De(U,Ds(void 0));return}else{z.add(U),await X(je,mt);return}if(Pr(mt)){kt(U,B,mt.error);return}Xe(!To(mt),"Unhandled fetcher deferred data"),De(U,Ds(mt.data))}}async function X(U,B,K){let{submission:re,fetcherSubmission:ve,replace:ke}=K===void 0?{}:K;B.response.headers.has("X-Remix-Revalidate")&&(b=!0);let Ie=B.response.headers.get("Location");Xe(Ie,"Expected a Location header on the redirect Response"),Ie=r0(Ie,new URL(U.url),l);let ce=Tl(T.location,Ie,{_isRedirect:!0});if(r){let mt=!1;if(B.response.headers.has("X-Remix-Reload-Document"))mt=!0;else if(lg.test(Ie)){const ct=e.history.createURL(Ie);mt=ct.origin!==t.location.origin||ca(ct.pathname,l)==null}if(mt){ke?t.location.replace(Ie):t.location.assign(Ie);return}}j=null;let Ve=ke===!0?Vt.Replace:Vt.Push,{formMethod:Ne,formAction:je,formEncType:ht}=T.navigation;!re&&!ve&&Ne&&je&&ht&&(re=u0(T.navigation));let dt=re||ve;if(uN.has(B.response.status)&&dt&&sn(dt.formMethod))await G(Ve,ce,{submission:Nt({},dt,{formAction:Ie}),preventScrollReset:O});else{let mt=ph(ce,re);await G(Ve,ce,{overrideNavigation:mt,fetcherSubmission:ve,preventScrollReset:O})}}async function ee(U,B,K,re){try{let ve=await wN(c,U,B,K,re,o,s);return await Promise.all(ve.map((ke,Ie)=>{if(EN(ke)){let ce=ke.result;return{type:gt.redirect,response:bN(ce,B,K[Ie].route.id,re,l,d.v7_relativeSplatPath)}}return _N(ke)}))}catch(ve){return K.map(()=>({type:gt.error,error:ve}))}}async function he(U,B,K,re,ve){let[ke,...Ie]=await Promise.all([K.length?ee("loader",ve,K,B):[],...re.map(ce=>{if(ce.matches&&ce.match&&ce.controller){let Ve=li(e.history,ce.path,ce.controller.signal);return ee("loader",Ve,[ce.match],ce.matches).then(Ne=>Ne[0])}else return Promise.resolve({type:gt.error,error:ur(404,{pathname:ce.path})})})]);return await Promise.all([c0(U,K,ke,ke.map(()=>ve.signal),!1,T.loaderData),c0(U,re.map(ce=>ce.match),Ie,re.map(ce=>ce.controller?ce.controller.signal:null),!0)]),{loaderResults:ke,fetcherResults:Ie}}function Fe(){b=!0,W.push(...Ts()),V.forEach((U,B)=>{$.has(B)&&(te.push(B),ot(B))})}function De(U,B,K){K===void 0&&(K={}),T.fetchers.set(U,B),Se({fetchers:new Map(T.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function kt(U,B,K,re){re===void 0&&(re={});let ve=Ri(T.matches,B);$t(U),Se({errors:{[ve.route.id]:K},fetchers:new Map(T.fetchers)},{flushSync:(re&&re.flushSync)===!0})}function Vr(U){return d.v7_fetcherPersist&&(de.set(U,(de.get(U)||0)+1),ne.has(U)&&ne.delete(U)),T.fetchers.get(U)||dN}function $t(U){let B=T.fetchers.get(U);$.has(U)&&!(B&&B.state==="loading"&&Q.has(U))&&ot(U),V.delete(U),Q.delete(U),z.delete(U),ne.delete(U),T.fetchers.delete(U)}function Wn(U){if(d.v7_fetcherPersist){let B=(de.get(U)||0)-1;B<=0?(de.delete(U),ne.add(U)):de.set(U,B)}else $t(U);Se({fetchers:new Map(T.fetchers)})}function ot(U){let B=$.get(U);Xe(B,"Expected fetch controller: "+U),B.abort(),$.delete(U)}function $n(U){for(let B of U){let K=Vr(B),re=Ds(K.data);T.fetchers.set(B,re)}}function Bn(){let U=[],B=!1;for(let K of z){let re=T.fetchers.get(K);Xe(re,"Expected fetcher: "+K),re.state==="loading"&&(z.delete(K),U.push(K),B=!0)}return $n(U),B}function Wr(U){let B=[];for(let[K,re]of Q)if(re<U){let ve=T.fetchers.get(K);Xe(ve,"Expected fetcher: "+K),ve.state==="loading"&&(ot(K),Q.delete(K),B.push(K))}return $n(B),B.length>0}function Sc(U,B){let K=T.blockers.get(U)||Na;return Ee.get(U)!==B&&Ee.set(U,B),K}function kc(U){T.blockers.delete(U),Ee.delete(U)}function ri(U,B){let K=T.blockers.get(U)||Na;Xe(K.state==="unblocked"&&B.state==="blocked"||K.state==="blocked"&&B.state==="blocked"||K.state==="blocked"&&B.state==="proceeding"||K.state==="blocked"&&B.state==="unblocked"||K.state==="proceeding"&&B.state==="unblocked","Invalid blocker state transition: "+K.state+" -> "+B.state);let re=new Map(T.blockers);re.set(U,B),Se({blockers:re})}function Cc(U){let{currentLocation:B,nextLocation:K,historyAction:re}=U;if(Ee.size===0)return;Ee.size>1&&Wo(!1,"A router only supports one blocker at a time");let ve=Array.from(Ee.entries()),[ke,Ie]=ve[ve.length-1],ce=T.blockers.get(ke);if(!(ce&&ce.state==="proceeding")&&Ie({currentLocation:B,nextLocation:K,historyAction:re}))return ke}function ni(U){let B=ur(404,{pathname:U}),K=a||i,{matches:re,route:ve}=a0(K);return Ts(),{notFoundMatches:re,route:ve,error:B}}function _n(U,B){return{boundaryId:Ri(B.partialMatches).route.id,error:ur(400,{type:"route-discovery",pathname:U,message:B.error!=null&&"message"in B.error?B.error:String(B.error)})}}function Ts(U){let B=[];return se.forEach((K,re)=>{(!U||U(re))&&(K.cancel(),B.push(re),se.delete(re))}),B}function oT(U,B,K){if(w=U,x=B,m=K||null,!g&&T.navigation===hh){g=!0;let re=Lv(T.location,T.matches);re!=null&&Se({restoreScrollPosition:re})}return()=>{w=null,x=null,m=null}}function Iv(U,B){return m&&m(U,B.map(re=>W2(re,T.loaderData)))||U.key}function iT(U,B){if(w&&x){let K=Iv(U,B);w[K]=x()}}function Lv(U,B){if(w){let K=Iv(U,B),re=w[K];if(typeof re=="number")return re}return null}function zf(U,B,K){if(f)if(U){let re=U[U.length-1].route;if(re.path&&(re.path==="*"||re.path.endsWith("/*")))return{active:!0,matches:xu(B,K,l,!0)}}else return{active:!0,matches:xu(B,K,l,!0)||[]};return{active:!1,matches:null}}async function Ec(U,B,K){let re=U,ve=re.length>0?re[re.length-1].route:null;for(;;){let ke=a==null,Ie=a||i;try{await vN(f,B,re,Ie,o,s,fe,K)}catch(je){return{type:"error",error:je,partialMatches:re}}finally{ke&&(i=[...i])}if(K.aborted)return{type:"aborted"};let ce=So(Ie,B,l),Ve=!1;if(ce){let je=ce[ce.length-1].route;if(je.index)return{type:"success",matches:ce};if(je.path&&je.path.length>0)if(je.path==="*")Ve=!0;else return{type:"success",matches:ce}}let Ne=xu(Ie,B,l,!0);if(!Ne||re.map(je=>je.route.id).join("-")===Ne.map(je=>je.route.id).join("-"))return{type:"success",matches:Ve?ce:null};if(re=Ne,ve=re[re.length-1].route,ve.path==="*")return{type:"success",matches:re}}}function aT(U){o={},a=Rl(U,s,void 0,o)}function lT(U,B){let K=a==null;L_(U,B,a||i,o,s),K&&(i=[...i],Se({}))}return E={get basename(){return l},get future(){return d},get state(){return T},get routes(){return i},get window(){return t},initialize:be,subscribe:Te,enableScrollRestoration:oT,navigate:k,fetch:Y,revalidate:J,createHref:U=>e.history.createHref(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Vr,deleteFetcher:Wn,dispose:Pe,getBlocker:Sc,deleteBlocker:kc,patchRoutes:lT,_internalFetchControllers:$,_internalActiveDeferreds:se,_internalSetRoutes:aT},E}function pN(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Np(e,t,r,n,s,o,i,a){let l,c;if(i){l=[];for(let d of t)if(l.push(d),d.route.id===i){c=d;break}}else l=t,c=t[t.length-1];let f=qd(s||".",Kd(l,o),ca(e.pathname,r)||e.pathname,a==="path");return s==null&&(f.search=e.search,f.hash=e.hash),(s==null||s===""||s===".")&&c&&c.route.index&&!cg(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:is([r,f.pathname])),$o(f)}function Qy(e,t,r,n){if(!n||!pN(n))return{path:r};if(n.formMethod&&!RN(n.formMethod))return{path:r,error:ur(405,{method:n.formMethod})};let s=()=>({path:r,error:ur(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=F_(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!sn(i))return s();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,w)=>{let[m,x]=w;return""+p+m+"="+x+`
`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!sn(i))return s();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}Xe(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=Pp(n.formData),c=n.formData;else if(n.body instanceof FormData)l=Pp(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=n0(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=n0(l)}catch{return s()}let f={formMethod:i,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(sn(f.formMethod))return{path:r,submission:f};let d=xs(r);return t&&d.search&&cg(d.search)&&l.append("index",""),d.search="?"+l,{path:$o(d),submission:f}}function mN(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 Jy(e,t,r,n,s,o,i,a,l,c,f,d,h,p,w,m){let x=m?Pr(m[1])?m[1].error:m[1].data:void 0,g=e.createURL(t.location),v=e.createURL(s),_=m&&Pr(m[1])?m[0]:void 0,C=_?mN(r,_):r,E=m?m[1].statusCode:void 0,T=i&&E&&E>=400,P=C.filter((j,L)=>{let{route:q}=j;if(q.lazy)return!0;if(q.loader==null)return!1;if(o)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(gN(t.loaderData,t.matches[L],j)||l.some(b=>b===j.route.id))return!0;let R=t.matches[L],F=j;return e0(j,Nt({currentUrl:g,currentParams:R.params,nextUrl:v,nextParams:F.params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:T?!1:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||I_(R,F)}))}),O=[];return d.forEach((j,L)=>{if(o||!r.some(W=>W.route.id===j.routeId)||f.has(L))return;let q=So(p,j.path,w);if(!q){O.push({key:L,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let R=t.fetchers.get(L),F=Va(q,j.path),b=!1;h.has(L)?b=!1:c.includes(L)?b=!0:R&&R.state!=="idle"&&R.data===void 0?b=a:b=e0(F,Nt({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:E,defaultShouldRevalidate:T?!1:a})),b&&O.push({key:L,routeId:j.routeId,path:j.path,matches:q,match:F,controller:new AbortController})}),[P,O]}function gN(e,t,r){let n=!t||r.route.id!==t.route.id,s=e[r.route.id]===void 0;return n||s}function I_(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function e0(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function vN(e,t,r,n,s,o,i,a){let l=[t,...r.map(c=>c.route.id)].join("-");try{let c=i.get(l);c||(c=e({path:t,matches:r,patch:(f,d)=>{a.aborted||L_(f,d,n,s,o)}}),i.set(l,c)),c&&CN(c)&&await c}finally{i.delete(l)}}function L_(e,t,r,n,s){if(e){var o;let i=n[e];Xe(i,"No route found to patch children into: routeId = "+e);let a=Rl(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],n);i.children?i.children.push(...a):i.children=a}else{let i=Rl(t,s,["patch",String(r.length||"0")],n);r.push(...i)}}async function t0(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let s=r[e.id];Xe(s,"No route found in manifest");let o={};for(let i in n){let l=s[i]!==void 0&&i!=="hasErrorBoundary";Wo(!l,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!U2.has(i)&&(o[i]=n[i])}Object.assign(s,o),Object.assign(s,Nt({},t(s),{lazy:void 0}))}function yN(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function wN(e,t,r,n,s,o,i,a){let l=n.reduce((d,h)=>d.add(h.route.id),new Set),c=new Set,f=await e({matches:s.map(d=>{let h=l.has(d.route.id);return Nt({},d,{shouldLoad:h,resolve:w=>(c.add(d.route.id),h?xN(t,r,d,o,i,w,a):Promise.resolve({type:gt.data,result:void 0}))})}),request:r,params:s[0].params,context:a});return s.forEach(d=>Xe(c.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((d,h)=>l.has(s[h].route.id))}async function xN(e,t,r,n,s,o,i){let a,l,c=f=>{let d,h=new Promise((m,x)=>d=x);l=()=>d(),t.signal.addEventListener("abort",l);let p=m=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:i},...m!==void 0?[m]:[]),w;return o?w=o(m=>p(m)):w=(async()=>{try{return{type:"data",result:await p()}}catch(m){return{type:"error",result:m}}})(),Promise.race([w,h])};try{let f=r.route[e];if(r.route.lazy)if(f){let d,[h]=await Promise.all([c(f).catch(p=>{d=p}),t0(r.route,s,n)]);if(d!==void 0)throw d;a=h}else if(await t0(r.route,s,n),f=r.route[e],f)a=await c(f);else if(e==="action"){let d=new URL(t.url),h=d.pathname+d.search;throw ur(405,{method:t.method,pathname:h,routeId:r.route.id})}else return{type:gt.data,result:void 0};else if(f)a=await c(f);else{let d=new URL(t.url),h=d.pathname+d.search;throw ur(404,{pathname:h})}Xe(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(f){return{type:gt.error,result:f}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function _N(e){let{result:t,type:r,status:n}=e;if(z_(t)){let i;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(a){return{type:gt.error,error:a}}return r===gt.error?{type:gt.error,error:new ag(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:gt.data,data:i,statusCode:t.status,headers:t.headers}}if(r===gt.error)return{type:gt.error,error:t,statusCode:Xd(t)?t.status:n};if(TN(t)){var s,o;return{type:gt.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:gt.data,data:t,statusCode:n}}function bN(e,t,r,n,s,o){let i=e.headers.get("Location");if(Xe(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!lg.test(i)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=Np(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function r0(e,t,r){if(lg.test(e)){let n=e,s=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=ca(s.pathname,r)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function li(e,t,r,n){let s=e.createURL(F_(t)).toString(),o={signal:r};if(n&&sn(n.formMethod)){let{formMethod:i,formEncType:a}=n;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(n.json)):a==="text/plain"?o.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?o.body=Pp(n.formData):o.body=n.formData}return new Request(s,o)}function Pp(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function n0(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function SN(e,t,r,n,s,o){let i={},a=null,l,c=!1,f={},d=n&&Pr(n[1])?n[1].error:void 0;return r.forEach((h,p)=>{let w=t[p].route.id;if(Xe(!Ro(h),"Cannot handle redirect results in processLoaderData"),Pr(h)){let m=h.error;d!==void 0&&(m=d,d=void 0),a=a||{};{let x=Ri(e,w);a[x.route.id]==null&&(a[x.route.id]=m)}i[w]=void 0,c||(c=!0,l=Xd(h.error)?h.error.status:500),h.headers&&(f[w]=h.headers)}else To(h)?(s.set(w,h.deferredData),i[w]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!c&&(l=h.statusCode),h.headers&&(f[w]=h.headers)):(i[w]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(l=h.statusCode),h.headers&&(f[w]=h.headers))}),d!==void 0&&n&&(a={[n[0]]:d},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:f}}function s0(e,t,r,n,s,o,i,a){let{loaderData:l,errors:c}=SN(t,r,n,s,a);for(let f=0;f<o.length;f++){let{key:d,match:h,controller:p}=o[f];Xe(i!==void 0&&i[f]!==void 0,"Did not find corresponding fetcher result");let w=i[f];if(!(p&&p.signal.aborted))if(Pr(w)){let m=Ri(e.matches,h==null?void 0:h.route.id);c&&c[m.route.id]||(c=Nt({},c,{[m.route.id]:w.error})),e.fetchers.delete(d)}else if(Ro(w))Xe(!1,"Unhandled fetcher revalidation redirect");else if(To(w))Xe(!1,"Unhandled fetcher deferred data");else{let m=Ds(w.data);e.fetchers.set(d,m)}}return{loaderData:l,errors:c}}function o0(e,t,r,n){let s=Nt({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),n&&n.hasOwnProperty(i))break}return s}function i0(e){return e?Pr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ri(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 a0(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:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?l='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):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.":o==="defer-action"?l="defer() is not supported in actions":o==="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 ag(e||500,a,new Error(l),!0)}function l0(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Ro(r))return{result:r,idx:t}}}function F_(e){let t=typeof e=="string"?xs(e):e;return $o(Nt({},t,{hash:""}))}function kN(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function CN(e){return typeof e=="object"&&e!=null&&"then"in e}function EN(e){return z_(e.result)&&cN.has(e.result.status)}function To(e){return e.type===gt.deferred}function Pr(e){return e.type===gt.error}function Ro(e){return(e&&e.type)===gt.redirect}function TN(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 z_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function RN(e){return lN.has(e.toLowerCase())}function sn(e){return iN.has(e.toLowerCase())}async function c0(e,t,r,n,s,o){for(let i=0;i<r.length;i++){let a=r[i],l=t[i];if(!l)continue;let c=e.find(d=>d.route.id===l.route.id),f=c!=null&&!I_(c,l)&&(o&&o[l.route.id])!==void 0;if(To(a)&&(s||f)){let d=n[i];Xe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await U_(a,d,s).then(h=>{h&&(r[i]=h||r[i])})}}}async function U_(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:gt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:gt.error,error:s}}return{type:gt.data,data:e.deferredData.data}}}function cg(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Va(e,t){let r=typeof t=="string"?xs(t).search:t.search;if(e[e.length-1].route.index&&cg(r||""))return e[e.length-1];let n=O_(e);return n[n.length-1]}function u0(e){let{formMethod:t,formAction:r,formEncType:n,text:s,formData:o,json:i}=e;if(!(!t||!r||!n)){if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function ph(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 NN(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 Pa(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 PN(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 Ds(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 jN(e,t){try{let r=e.sessionStorage.getItem(M_);if(r){let n=JSON.parse(r);for(let[s,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function DN(e,t){if(t.size>0){let r={};for(let[n,s]of t)r[n]=[...s];try{e.sessionStorage.setItem(M_,JSON.stringify(r))}catch(n){Wo(!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 sd(){return sd=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},sd.apply(this,arguments)}const Qd=y.createContext(null),V_=y.createContext(null),ho=y.createContext(null),ug=y.createContext(null),_s=y.createContext({outlet:null,matches:[],isDataRoute:!1}),W_=y.createContext(null);function ON(e,t){let{relative:r}=t===void 0?{}:t;ua()||Xe(!1);let{basename:n,navigator:s}=y.useContext(ho),{hash:o,pathname:i,search:a}=B_(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:is([n,i])),s.createHref({pathname:l,search:a,hash:o})}function ua(){return y.useContext(ug)!=null}function po(){return ua()||Xe(!1),y.useContext(ug).location}function $_(e){y.useContext(ho).static||y.useLayoutEffect(e)}function bs(){let{isDataRoute:e}=y.useContext(_s);return e?ZN():AN()}function AN(){ua()||Xe(!1);let e=y.useContext(Qd),{basename:t,future:r,navigator:n}=y.useContext(ho),{matches:s}=y.useContext(_s),{pathname:o}=po(),i=JSON.stringify(Kd(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return $_(()=>{a.current=!0}),y.useCallback(function(c,f){if(f===void 0&&(f={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=qd(c,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:is([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,i,o,e])}const MN=y.createContext(null);function IN(e){let t=y.useContext(_s).outlet;return t&&y.createElement(MN.Provider,{value:e},t)}function B_(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(ho),{matches:s}=y.useContext(_s),{pathname:o}=po(),i=JSON.stringify(Kd(s,n.v7_relativeSplatPath));return y.useMemo(()=>qd(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function LN(e,t,r,n){ua()||Xe(!1);let{navigator:s}=y.useContext(ho),{matches:o}=y.useContext(_s),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=po(),f;f=c;let d=f.pathname||"/",h=d;if(l!=="/"){let m=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=So(e,{pathname:h});return WN(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:is([l,s.encodeLocation?s.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:is([l,s.encodeLocation?s.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,r,n)}function FN(){let e=YN(),t=Xd(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 zN=y.createElement(FN,null);class UN 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(_s.Provider,{value:this.props.routeContext},y.createElement(W_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function VN(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(Qd);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(_s.Provider,{value:t},n)}function WN(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let f=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||Xe(!1),i=i.slice(0,Math.min(i.length,f+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f<i.length;f++){let d=i[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=f),d.route.id){let{loaderData:h,errors:p}=r,w=d.route.loader&&h[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||w){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((f,d,h)=>{let p,w=!1,m=null,x=null;r&&(p=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||zN,l&&(c<0&&h===0?(GN("route-fallback"),w=!0,x=null):c===h&&(w=!0,x=d.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),v=()=>{let _;return p?_=m:w?_=x:d.route.Component?_=y.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=f,y.createElement(VN,{match:d,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?y.createElement(UN,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var H_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(H_||{}),od=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}(od||{});function $N(e){let t=y.useContext(Qd);return t||Xe(!1),t}function BN(e){let t=y.useContext(V_);return t||Xe(!1),t}function HN(e){let t=y.useContext(_s);return t||Xe(!1),t}function Y_(e){let t=HN(),r=t.matches[t.matches.length-1];return r.route.id||Xe(!1),r.route.id}function YN(){var e;let t=y.useContext(W_),r=BN(od.UseRouteError),n=Y_(od.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ZN(){let{router:e}=$N(H_.UseNavigateStable),t=Y_(od.UseNavigateStable),r=y.useRef(!1);return $_(()=>{r.current=!0}),y.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,sd({fromRouteId:t},o)))},[e,t])}const d0={};function GN(e,t,r){d0[e]||(d0[e]=!0)}function Z_(e){let{to:t,replace:r,state:n,relative:s}=e;ua()||Xe(!1);let{future:o,static:i}=y.useContext(ho),{matches:a}=y.useContext(_s),{pathname:l}=po(),c=bs(),f=qd(t,Kd(a,o.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(f);return y.useEffect(()=>c(JSON.parse(d),{replace:r,state:n,relative:s}),[c,d,s,r,n]),null}function dg(e){return IN(e.context)}function KN(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Vt.Pop,navigator:o,static:i=!1,future:a}=e;ua()&&Xe(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:o,static:i,future:sd({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=xs(n));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:w="default"}=n,m=y.useMemo(()=>{let x=ca(f,l);return x==null?null:{location:{pathname:x,search:d,hash:h,state:p,key:w},navigationType:s}},[l,f,d,h,p,w,s]);return m==null?null:y.createElement(ho.Provider,{value:c},y.createElement(ug.Provider,{children:r,value:m}))}new Promise(()=>{});function qN(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 Nl(){return Nl=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},Nl.apply(this,arguments)}function XN(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function QN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function JN(e,t){return e.button===0&&(!t||t==="_self")&&!QN(e)}function jp(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 eP(e,t){let r=jp(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const tP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],rP="6";try{window.__reactRouterVersion=rP}catch{}function nP(e,t){return hN({basename:void 0,future:Nl({},void 0,{v7_prependBasename:!0}),history:L2({window:void 0}),hydrationData:sP(),routes:e,mapRouteProperties:qN,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function sP(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Nl({},t,{errors:oP(t.errors)})),t}function oP(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 ag(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(s.message);o.stack="",r[n]=o}}else r[n]=s;return r}const iP=y.createContext({isTransitioning:!1}),aP=y.createContext(new Map),lP="startTransition",f0=Tw[lP],cP="flushSync",h0=I2[cP];function uP(e){f0?f0(e):e()}function ja(e){h0?h0(e):e()}class dP{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 fP(e){let{fallbackElement:t,router:r,future:n}=e,[s,o]=y.useState(r.state),[i,a]=y.useState(),[l,c]=y.useState({isTransitioning:!1}),[f,d]=y.useState(),[h,p]=y.useState(),[w,m]=y.useState(),x=y.useRef(new Map),{v7_startTransition:g}=n||{},v=y.useCallback(O=>{g?uP(O):O()},[g]),_=y.useCallback((O,j)=>{let{deletedFetchers:L,unstable_flushSync:q,unstable_viewTransitionOpts:R}=j;L.forEach(b=>x.current.delete(b)),O.fetchers.forEach((b,W)=>{b.data!==void 0&&x.current.set(W,b.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!R||F){q?ja(()=>o(O)):v(()=>o(O));return}if(q){ja(()=>{h&&(f&&f.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation})});let b=r.window.document.startViewTransition(()=>{ja(()=>o(O))});b.finished.finally(()=>{ja(()=>{d(void 0),p(void 0),a(void 0),c({isTransitioning:!1})})}),ja(()=>p(b));return}h?(f&&f.resolve(),h.skipTransition(),m({state:O,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(a(O),c({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[r.window,h,f,x,v]);y.useLayoutEffect(()=>r.subscribe(_),[r,_]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new dP)},[l]),y.useEffect(()=>{if(f&&i&&r.window){let O=i,j=f.promise,L=r.window.document.startViewTransition(async()=>{v(()=>o(O)),await j});L.finished.finally(()=>{d(void 0),p(void 0),a(void 0),c({isTransitioning:!1})}),p(L)}},[v,i,f,r.window]),y.useEffect(()=>{f&&i&&s.location.key===i.location.key&&f.resolve()},[f,h,s.location,i]),y.useEffect(()=>{!l.isTransitioning&&w&&(a(w.state),c({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),m(void 0))},[l.isTransitioning,w]),y.useEffect(()=>{},[]);let C=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:O=>r.navigate(O),push:(O,j,L)=>r.navigate(O,{state:j,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(O,j,L)=>r.navigate(O,{replace:!0,state:j,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[r]),E=r.basename||"/",T=y.useMemo(()=>({router:r,navigator:C,static:!1,basename:E}),[r,C,E]),P=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(Qd.Provider,{value:T},y.createElement(V_.Provider,{value:s},y.createElement(aP.Provider,{value:x.current},y.createElement(iP.Provider,{value:l},y.createElement(KN,{basename:E,location:s.location,navigationType:s.historyAction,navigator:C,future:P},s.initialized||r.future.v7_partialHydration?y.createElement(hP,{routes:r.routes,future:r.future,state:s}):t))))),null)}const hP=y.memo(pP);function pP(e){let{routes:t,future:r,state:n}=e;return LN(t,void 0,n,r)}const mP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kn=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:f,unstable_viewTransition:d}=t,h=XN(t,tP),{basename:p}=y.useContext(ho),w,m=!1;if(typeof c=="string"&&gP.test(c)&&(w=c,mP))try{let _=new URL(window.location.href),C=c.startsWith("//")?new URL(_.protocol+c):new URL(c),E=ca(C.pathname,p);C.origin===_.origin&&E!=null?c=E+C.search+C.hash:m=!0}catch{}let x=ON(c,{relative:s}),g=vP(c,{replace:i,state:a,target:l,preventScrollReset:f,relative:s,unstable_viewTransition:d});function v(_){n&&n(_),_.defaultPrevented||g(_)}return y.createElement("a",Nl({},h,{href:w||x,onClick:m||o?n:v,ref:r,target:l}))});var p0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p0||(p0={}));var m0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(m0||(m0={}));function vP(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,l=bs(),c=po(),f=B_(e,{relative:i});return y.useCallback(d=>{if(JN(d,r)){d.preventDefault();let h=n!==void 0?n:$o(c)===$o(f);l(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[c,l,f,n,s,r,e,o,i,a])}function yP(e){let t=y.useRef(jp(e)),r=y.useRef(!1),n=po(),s=y.useMemo(()=>eP(n.search,r.current?null:t.current),[n.search]),o=bs(),i=y.useCallback((a,l)=>{const c=jp(typeof a=="function"?a(s):a);r.current=!0,o("?"+c,l)},[o,s]);return[s,i]}/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G_=(...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 xP={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 _P=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>y.createElement("svg",{ref:l,...xP,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:G_("lucide",s),...a},[...i.map(([c,f])=>y.createElement(c,f)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qt=(e,t)=>{const r=y.forwardRef(({className:n,...s},o)=>y.createElement(_P,{ref:o,iconNode:t,className:G_(`lucide-${wP(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 K_=Qt("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 q_=Qt("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=Qt("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=Qt("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 X_=Qt("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 kP=Qt("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 Q_=Qt("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 CP=Qt("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 Dp=Qt("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 g0=Qt("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 EP=Qt("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 TP=Qt("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 RP=Qt("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 v0=Qt("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 y0=Qt("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 NP=Qt("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 PP=Qt("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 fg=Qt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function jP(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Jd(...e){return t=>e.forEach(r=>jP(r,t))}function Ke(...e){return y.useCallback(Jd(...e),e)}var hs=y.forwardRef((e,t)=>{const{children:r,...n}=e,s=y.Children.toArray(r),o=s.find(DP);if(o){const i=o.props.children,a=s.map(l=>l===o?y.Children.count(i)>1?y.Children.only(null):y.isValidElement(i)?i.props.children:null:l);return u.jsx(Op,{...n,ref:t,children:y.isValidElement(i)?y.cloneElement(i,void 0,a):null})}return u.jsx(Op,{...n,ref:t,children:r})});hs.displayName="Slot";var Op=y.forwardRef((e,t)=>{const{children:r,...n}=e;if(y.isValidElement(r)){const s=AP(r);return y.cloneElement(r,{...OP(n,r.props),ref:t?Jd(t,s):s})}return y.Children.count(r)>1?y.Children.only(null):null});Op.displayName="SlotClone";var hg=({children:e})=>u.jsx(u.Fragment,{children:e});function DP(e){return y.isValidElement(e)&&e.type===hg}function OP(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{o(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function AP(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 J_(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=J_(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function MP(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=J_(e))&&(n&&(n+=" "),n+=t);return n}const w0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,x0=MP,sc=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return x0(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const f=r==null?void 0:r[c],d=o==null?void 0:o[c];if(f===null)return null;const h=w0(f)||w0(d);return s[c][h]}),a=r&&Object.entries(r).reduce((c,f)=>{let[d,h]=f;return h===void 0||(c[d]=h),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(w=>{let[m,x]=w;return Array.isArray(x)?x.includes({...o,...a}[m]):{...o,...a}[m]===x})?[...c,d,h]:c},[]);return x0(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};function e1(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=e1(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function IP(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=e1(e))&&(n&&(n+=" "),n+=t);return n}const pg="-";function LP(e){const t=zP(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function s(i){const a=i.split(pg);return a[0]===""&&a.length!==1&&a.shift(),t1(a,t)||FP(i)}function o(i,a){const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function t1(e,t){var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?t1(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(pg);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const _0=/^\[(.+)\]$/;function FP(e){if(_0.test(e)){const t=_0.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function zP(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return VP(Object.entries(e.classGroups),r).forEach(([o,i])=>{Ap(i,n,o,t)}),n}function Ap(e,t,r,n){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:b0(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(UP(s)){Ap(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Ap(i,b0(t,o),r,n)})})}function b0(e,t){let r=e;return t.split(pg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function UP(e){return e.isThemeGetter}function VP(e,t){return t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e}function WP(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function s(o,i){r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)}return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}}const r1="!";function $P(e){const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length;function i(a){const l=[];let c=0,f=0,d;for(let x=0;x<a.length;x++){let g=a[x];if(c===0){if(g===s&&(n||a.slice(x,x+o)===t)){l.push(a.slice(f,x)),f=x+o;continue}if(g==="/"){d=x;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(f),p=h.startsWith(r1),w=p?h.substring(1):h,m=d&&d>f?d-f:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:m}}return r?function(l){return r({className:l,parseClassName:i})}:i}function BP(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 HP(e){return{cache:WP(e.cacheSize),parseClassName:$P(e),...LP(e)}}const YP=/\s+/;function ZP(e,t){const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(YP).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:f}=r(i);let d=!!f,h=n(d?c.substring(0,f):c);if(!h){if(!d)return{isTailwindClass:!1,originalClassName:i};if(h=n(c),!h)return{isTailwindClass:!1,originalClassName:i};d=!1}const p=BP(a).join(":");return{isTailwindClass:!0,modifierId:l?p+r1:p,classGroupId:h,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,f=a+l;return o.has(f)?!1:(o.add(f),s(l,c).forEach(d=>o.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function GP(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=n1(t))&&(n&&(n+=" "),n+=r);return n}function n1(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=n1(e[n]))&&(r&&(r+=" "),r+=t);return r}function KP(e,...t){let r,n,s,o=i;function i(l){const c=t.reduce((f,d)=>d(f),e());return r=HP(c),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const c=n(l);if(c)return c;const f=ZP(l,r);return s(l,f),f}return function(){return o(GP.apply(null,arguments))}}function yt(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const s1=/^\[(?:([a-z-]+):)?(.+)\]$/i,qP=/^\d+\/\d+$/,XP=new Set(["px","full","screen"]),QP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JP=/\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$/,ej=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Yn(e){return No(e)||XP.has(e)||qP.test(e)}function Ps(e){return da(e,"length",uj)}function No(e){return!!e&&!Number.isNaN(Number(e))}function Gc(e){return da(e,"number",No)}function Da(e){return!!e&&Number.isInteger(Number(e))}function nj(e){return e.endsWith("%")&&No(e.slice(0,-1))}function We(e){return s1.test(e)}function js(e){return QP.test(e)}const sj=new Set(["length","size","percentage"]);function oj(e){return da(e,sj,o1)}function ij(e){return da(e,"position",o1)}const aj=new Set(["image","url"]);function lj(e){return da(e,aj,fj)}function cj(e){return da(e,"",dj)}function Oa(){return!0}function da(e,t,r){const n=s1.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function uj(e){return JP.test(e)&&!ej.test(e)}function o1(){return!1}function dj(e){return tj.test(e)}function fj(e){return rj.test(e)}function hj(){const e=yt("colors"),t=yt("spacing"),r=yt("blur"),n=yt("brightness"),s=yt("borderColor"),o=yt("borderRadius"),i=yt("borderSpacing"),a=yt("borderWidth"),l=yt("contrast"),c=yt("grayscale"),f=yt("hueRotate"),d=yt("invert"),h=yt("gap"),p=yt("gradientColorStops"),w=yt("gradientColorStopPositions"),m=yt("inset"),x=yt("margin"),g=yt("opacity"),v=yt("padding"),_=yt("saturate"),C=yt("scale"),E=yt("sepia"),T=yt("skew"),P=yt("space"),O=yt("translate"),j=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",We,t],R=()=>[We,t],F=()=>["",Yn,Ps],b=()=>["auto",No,We],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],$=()=>["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",We],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[No,Gc],V=()=>[No,We];return{cacheSize:500,separator:":",theme:{colors:[Oa],spacing:[Yn,Ps],blur:["none","",js,We],brightness:z(),borderColor:[e],borderRadius:["none","","full",js,We],borderSpacing:R(),borderWidth:F(),contrast:z(),grayscale:I(),hueRotate:V(),invert:I(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[nj,Ps],inset:q(),margin:q(),opacity:z(),padding:R(),saturate:z(),scale:z(),sepia:I(),skew:V(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",We]}],container:["container"],columns:[{columns:[js]}],"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:[...W(),We]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Da,We]}],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",We]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Da,We]}],"grid-cols":[{"grid-cols":[Oa]}],"col-start-end":[{col:["auto",{span:["full",Da,We]},We]}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":[Oa]}],"row-start-end":[{row:["auto",{span:[Da,We]},We]}],"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",We]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",We]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"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:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",We,t]}],"min-w":[{"min-w":[We,t,"min","max","fit"]}],"max-w":[{"max-w":[We,t,"none","full","min","max","fit","prose",{screen:[js]},js]}],h:[{h:[We,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[We,t,"auto","min","max","fit"]}],"font-size":[{text:["base",js,Ps]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gc]}],"font-family":[{font:[Oa]}],"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",We]}],"line-clamp":[{"line-clamp":["none",No,Gc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yn,We]}],"list-image":[{"list-image":["none",We]}],"list-style-type":[{list:["none","disc","decimal",We]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yn,Ps]}],"underline-offset":[{"underline-offset":["auto",Yn,We]}],"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:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",We]}],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",We]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),ij]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lj]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[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":[g]}],"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":[g]}],"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":[Yn,We]}],"outline-w":[{outline:[Yn,Ps]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Yn,Ps]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",js,cj]}],"shadow-color":[{shadow:[Oa]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",js,We]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],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":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",We]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",We]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",We]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Da,We]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",We]}],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",We]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",We]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yn,Ps,Gc]}],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 pj=KP(hj);function _e(...e){return pj(IP(e))}const mg=sc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),xt=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?hs:"button";return u.jsx(i,{className:_e(mg({variant:t,size:r,className:e})),ref:o,...s})});xt.displayName="Button";function ue(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function mj(e,t){const r=y.createContext(t);function n(o){const{children:i,...a}=o,l=y.useMemo(()=>a,Object.values(a));return u.jsx(r.Provider,{value:l,children:i})}function s(o){const i=y.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,s]}function Xr(e,t=[]){let r=[];function n(o,i){const a=y.createContext(i),l=r.length;r=[...r,i];function c(d){const{scope:h,children:p,...w}=d,m=(h==null?void 0:h[e][l])||a,x=y.useMemo(()=>w,Object.values(w));return u.jsx(m.Provider,{value:x,children:p})}function f(d,h){const p=(h==null?void 0:h[e][l])||a,w=y.useContext(p);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,f]}const s=()=>{const o=r.map(i=>y.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,gj(s,...t)]}function gj(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function jt(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 to({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,s]=vj({defaultProp:t,onChange:r}),o=e!==void 0,i=o?e:n,a=jt(r),l=y.useCallback(c=>{if(o){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else s(c)},[o,e,s,a]);return[i,l]}function vj({defaultProp:e,onChange:t}){const r=y.useState(e),[n]=r,s=y.useRef(n),o=jt(t);return y.useEffect(()=>{s.current!==n&&(o(n),s.current=n)},[n,s,o]),r}var yj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Me=yj.reduce((e,t)=>{const r=y.forwardRef((n,s)=>{const{asChild:o,...i}=n,a=o?hs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gg(e,t){e&&ws.flushSync(()=>e.dispatchEvent(t))}function ef(e){const t=e+"CollectionProvider",[r,n]=Xr(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:w,children:m}=p,x=et.useRef(null),g=et.useRef(new Map).current;return u.jsx(s,{scope:w,itemMap:g,collectionRef:x,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=et.forwardRef((p,w)=>{const{scope:m,children:x}=p,g=o(a,m),v=Ke(w,g.collectionRef);return u.jsx(hs,{ref:v,children:x})});l.displayName=a;const c=e+"CollectionItemSlot",f="data-radix-collection-item",d=et.forwardRef((p,w)=>{const{scope:m,children:x,...g}=p,v=et.useRef(null),_=Ke(w,v),C=o(c,m);return et.useEffect(()=>(C.itemMap.set(v,{ref:v,...g}),()=>void C.itemMap.delete(v))),u.jsx(hs,{[f]:"",ref:_,children:x})});d.displayName=c;function h(p){const w=o(e+"CollectionConsumer",p);return et.useCallback(()=>{const x=w.collectionRef.current;if(!x)return[];const g=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((C,E)=>g.indexOf(C.ref.current)-g.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:l,ItemSlot:d},h,n]}var wj=y.createContext(void 0);function tf(e){const t=y.useContext(wj);return e||t||"ltr"}function xj(e,t=globalThis==null?void 0:globalThis.document){const r=jt(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 _j="DismissableLayer",Mp="dismissableLayer.update",bj="dismissableLayer.pointerDownOutside",Sj="dismissableLayer.focusOutside",S0,i1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fa=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=y.useContext(i1),[f,d]=y.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=y.useState({}),w=Ke(t,P=>d(P)),m=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(x),v=f?m.indexOf(f):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,C=v>=g,E=Cj(P=>{const O=P.target,j=[...c.branches].some(L=>L.contains(O));!C||j||(s==null||s(P),i==null||i(P),P.defaultPrevented||a==null||a())},h),T=Ej(P=>{const O=P.target;[...c.branches].some(L=>L.contains(O))||(o==null||o(P),i==null||i(P),P.defaultPrevented||a==null||a())},h);return xj(P=>{v===c.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},h),y.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(S0=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),k0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=S0)}},[f,h,r,c]),y.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),k0())},[f,c]),y.useEffect(()=>{const P=()=>p({});return document.addEventListener(Mp,P),()=>document.removeEventListener(Mp,P)},[]),u.jsx(Me.div,{...l,ref:w,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,E.onPointerDownCapture)})});fa.displayName=_j;var kj="DismissableLayerBranch",a1=y.forwardRef((e,t)=>{const r=y.useContext(i1),n=y.useRef(null),s=Ke(t,n);return y.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),u.jsx(Me.div,{...e,ref:s})});a1.displayName=kj;function Cj(e,t=globalThis==null?void 0:globalThis.document){const r=jt(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){l1(bj,r,c,{discrete:!0})};const c={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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Ej(e,t=globalThis==null?void 0:globalThis.document){const r=jt(e),n=y.useRef(!1);return y.useEffect(()=>{const s=o=>{o.target&&!n.current&&l1(Sj,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function k0(){const e=new CustomEvent(Mp);document.dispatchEvent(e)}function l1(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?gg(s,o):s.dispatchEvent(o)}var Tj=fa,Rj=a1,mh=0;function vg(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??C0()),document.body.insertAdjacentElement("beforeend",e[1]??C0()),mh++,()=>{mh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),mh--}},[])}function C0(){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 gh="focusScope.autoFocusOnMount",vh="focusScope.autoFocusOnUnmount",E0={bubbles:!1,cancelable:!0},Nj="FocusScope",rf=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=y.useState(null),c=jt(s),f=jt(o),d=y.useRef(null),h=Ke(t,m=>l(m)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let m=function(_){if(p.paused||!a)return;const C=_.target;a.contains(C)?d.current=C:Os(d.current,{select:!0})},x=function(_){if(p.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Os(d.current,{select:!0}))},g=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&Os(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),v.disconnect()}}},[n,a,p.paused]),y.useEffect(()=>{if(a){R0.add(p);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(gh,E0);a.addEventListener(gh,c),a.dispatchEvent(g),g.defaultPrevented||(Pj(Mj(c1(a)),{select:!0}),document.activeElement===m&&Os(a))}return()=>{a.removeEventListener(gh,c),setTimeout(()=>{const g=new CustomEvent(vh,E0);a.addEventListener(vh,f),a.dispatchEvent(g),g.defaultPrevented||Os(m??document.body,{select:!0}),a.removeEventListener(vh,f),R0.remove(p)},0)}}},[a,c,f,p]);const w=y.useCallback(m=>{if(!r&&!n||p.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(x&&g){const v=m.currentTarget,[_,C]=jj(v);_&&C?!m.shiftKey&&g===C?(m.preventDefault(),r&&Os(_,{select:!0})):m.shiftKey&&g===_&&(m.preventDefault(),r&&Os(C,{select:!0})):g===v&&m.preventDefault()}},[r,n,p.paused]);return u.jsx(Me.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});rf.displayName=Nj;function Pj(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Os(n,{select:t}),document.activeElement!==r)return}function jj(e){const t=c1(e),r=T0(t,e),n=T0(t.reverse(),e);return[r,n]}function c1(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 T0(e,t){for(const r of e)if(!Dj(r,{upTo:t}))return r}function Dj(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 Oj(e){return e instanceof HTMLInputElement&&"select"in e}function Os(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Oj(e)&&t&&e.select()}}var R0=Aj();function Aj(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=N0(e,t),e.unshift(t)},remove(t){var r;e=N0(e,t),(r=e[0])==null||r.resume()}}}function N0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Mj(e){return e.filter(t=>t.tagName!=="A")}var nr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Ij=Tw.useId||(()=>{}),Lj=0;function On(e){const[t,r]=y.useState(Ij());return nr(()=>{r(n=>n??String(Lj++))},[e]),t?`radix-${t}`:""}const Fj=["top","right","bottom","left"],Nn=Math.min,jr=Math.max,id=Math.round,Kc=Math.floor,ro=e=>({x:e,y:e}),zj={left:"right",right:"left",bottom:"top",top:"bottom"},Uj={start:"end",end:"start"};function Ip(e,t,r){return jr(e,Nn(t,r))}function ps(e,t){return typeof e=="function"?e(t):e}function ms(e){return e.split("-")[0]}function ha(e){return e.split("-")[1]}function yg(e){return e==="x"?"y":"x"}function wg(e){return e==="y"?"height":"width"}function no(e){return["top","bottom"].includes(ms(e))?"y":"x"}function xg(e){return yg(no(e))}function Vj(e,t,r){r===void 0&&(r=!1);const n=ha(e),s=xg(e),o=wg(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ad(i)),[i,ad(i)]}function Wj(e){const t=ad(e);return[Lp(e),t,Lp(t)]}function Lp(e){return e.replace(/start|end/g,t=>Uj[t])}function $j(e,t,r){const n=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?o:i;default:return[]}}function Bj(e,t,r,n){const s=ha(e);let o=$j(ms(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Lp)))),o}function ad(e){return e.replace(/left|right|bottom|top/g,t=>zj[t])}function Hj(e){return{top:0,right:0,bottom:0,left:0,...e}}function u1(e){return typeof e!="number"?Hj(e):{top:e,right:e,bottom:e,left:e}}function ld(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 P0(e,t,r){let{reference:n,floating:s}=e;const o=no(t),i=xg(t),a=wg(i),l=ms(t),c=o==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,h=n[a]/2-s[a]/2;let p;switch(l){case"top":p={x:f,y:n.y-s.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-s.width,y:d};break;default:p={x:n.x,y:n.y}}switch(ha(t)){case"start":p[i]-=h*(r&&c?-1:1);break;case"end":p[i]+=h*(r&&c?-1:1);break}return p}const Yj=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:d}=P0(c,n,l),h=n,p={},w=0;for(let m=0;m<a.length;m++){const{name:x,fn:g}=a[m],{x:v,y:_,data:C,reset:E}=await g({x:f,y:d,initialPlacement:n,placement:h,strategy:s,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});f=v??f,d=_??d,p={...p,[x]:{...p[x],...C}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:f,y:d}=P0(c,h,l)),m=-1)}return{x:f,y:d,placement:h,strategy:s,middlewareData:p}};async function Pl(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ps(t,e),w=u1(p),x=a[h?d==="floating"?"reference":"floating":d],g=ld(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),v=d==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},E=ld(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:_,strategy:l}):v);return{top:(g.top-E.top+w.top)/C.y,bottom:(E.bottom-g.bottom+w.bottom)/C.y,left:(g.left-E.left+w.left)/C.x,right:(E.right-g.right+w.right)/C.x}}const Zj=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:f=0}=ps(e,t)||{};if(c==null)return{};const d=u1(f),h={x:r,y:n},p=xg(s),w=wg(p),m=await i.getDimensions(c),x=p==="y",g=x?"top":"left",v=x?"bottom":"right",_=x?"clientHeight":"clientWidth",C=o.reference[w]+o.reference[p]-h[p]-o.floating[w],E=h[p]-o.reference[p],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let P=T?T[_]:0;(!P||!await(i.isElement==null?void 0:i.isElement(T)))&&(P=a.floating[_]||o.floating[w]);const O=C/2-E/2,j=P/2-m[w]/2-1,L=Nn(d[g],j),q=Nn(d[v],j),R=L,F=P-m[w]-q,b=P/2-m[w]/2+O,W=Ip(R,b,F),te=!l.arrow&&ha(s)!=null&&b!==W&&o.reference[w]/2-(b<R?L:q)-m[w]/2<0,$=te?b<R?b-R:b-F:0;return{[p]:h[p]+$,data:{[p]:W,centerOffset:b-W-$,...te&&{alignmentOffset:$}},reset:te}}}),Gj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...x}=ps(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const g=ms(s),v=no(a),_=ms(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(_||!m?[ad(a)]:Wj(a)),T=w!=="none";!h&&T&&E.push(...Bj(a,m,w,C));const P=[a,...E],O=await Pl(t,x),j=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&j.push(O[g]),d){const b=Vj(s,i,C);j.push(O[b[0]],O[b[1]])}if(L=[...L,{placement:s,overflows:j}],!j.every(b=>b<=0)){var q,R;const b=(((q=o.flip)==null?void 0:q.index)||0)+1,W=P[b];if(W)return{data:{index:b,overflows:L},reset:{placement:W}};let te=(R=L.filter($=>$.overflows[0]<=0).sort(($,Z)=>$.overflows[1]-Z.overflows[1])[0])==null?void 0:R.placement;if(!te)switch(p){case"bestFit":{var F;const $=(F=L.filter(Z=>{if(T){const I=no(Z.placement);return I===v||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];$&&(te=$);break}case"initialPlacement":te=a;break}if(s!==te)return{reset:{placement:te}}}return{}}}};function j0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function D0(e){return Fj.some(t=>e[t]>=0)}const Kj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=ps(e,t);switch(n){case"referenceHidden":{const o=await Pl(t,{...s,elementContext:"reference"}),i=j0(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:D0(i)}}}case"escaped":{const o=await Pl(t,{...s,altBoundary:!0}),i=j0(o,r.floating);return{data:{escapedOffsets:i,escaped:D0(i)}}}default:return{}}}}};async function qj(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=ms(r),a=ha(r),l=no(r)==="y",c=["left","top"].includes(i)?-1:1,f=o&&l?-1:1,d=ps(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof w=="number"&&(p=a==="end"?w*-1:w),l?{x:p*f,y:h*c}:{x:h*c,y:p*f}}const Xj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await qj(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},Qj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:x=>{let{x:g,y:v}=x;return{x:g,y:v}}},...l}=ps(e,t),c={x:r,y:n},f=await Pl(t,l),d=no(ms(s)),h=yg(d);let p=c[h],w=c[d];if(o){const x=h==="y"?"top":"left",g=h==="y"?"bottom":"right",v=p+f[x],_=p-f[g];p=Ip(v,p,_)}if(i){const x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=w+f[x],_=w-f[g];w=Ip(v,w,_)}const m=a.fn({...t,[h]:p,[d]:w});return{...m,data:{x:m.x-r,y:m.y-n}}}}},Jj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ps(e,t),f={x:r,y:n},d=no(s),h=yg(d);let p=f[h],w=f[d];const m=ps(a,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const _=h==="y"?"height":"width",C=o.reference[h]-o.floating[_]+x.mainAxis,E=o.reference[h]+o.reference[_]-x.mainAxis;p<C?p=C:p>E&&(p=E)}if(c){var g,v;const _=h==="y"?"width":"height",C=["top","left"].includes(ms(s)),E=o.reference[d]-o.floating[_]+(C&&((g=i.offset)==null?void 0:g[d])||0)+(C?0:x.crossAxis),T=o.reference[d]+o.reference[_]+(C?0:((v=i.offset)==null?void 0:v[d])||0)-(C?x.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:p,[d]:w}}}},eD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:s,elements:o}=t,{apply:i=()=>{},...a}=ps(e,t),l=await Pl(t,a),c=ms(r),f=ha(r),d=no(r)==="y",{width:h,height:p}=n.floating;let w,m;c==="top"||c==="bottom"?(w=c,m=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(m=c,w=f==="end"?"top":"bottom");const x=p-l.top-l.bottom,g=h-l.left-l.right,v=Nn(p-l[w],x),_=Nn(h-l[m],g),C=!t.middlewareData.shift;let E=v,T=_;if(d?T=f||C?Nn(_,g):g:E=f||C?Nn(v,x):x,C&&!f){const O=jr(l.left,0),j=jr(l.right,0),L=jr(l.top,0),q=jr(l.bottom,0);d?T=h-2*(O!==0||j!==0?O+j:jr(l.left,l.right)):E=p-2*(L!==0||q!==0?L+q:jr(l.top,l.bottom))}await i({...t,availableWidth:T,availableHeight:E});const P=await s.getDimensions(o.floating);return h!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function pa(e){return d1(e)?(e.nodeName||"").toLowerCase():"#document"}function Ar(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ss(e){var t;return(t=(d1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function d1(e){return e instanceof Node||e instanceof Ar(e).Node}function pn(e){return e instanceof Element||e instanceof Ar(e).Element}function Mn(e){return e instanceof HTMLElement||e instanceof Ar(e).HTMLElement}function O0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ar(e).ShadowRoot}function oc(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=mn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function tD(e){return["table","td","th"].includes(pa(e))}function nf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _g(e){const t=bg(),r=pn(e)?mn(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 rD(e){let t=so(e);for(;Mn(t)&&!ea(t);){if(_g(t))return t;if(nf(t))return null;t=so(t)}return null}function bg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ea(e){return["html","body","#document"].includes(pa(e))}function mn(e){return Ar(e).getComputedStyle(e)}function sf(e){return pn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function so(e){if(pa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||O0(e)&&e.host||Ss(e);return O0(t)?t.host:t}function f1(e){const t=so(e);return ea(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mn(t)&&oc(t)?t:f1(t)}function jl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=f1(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Ar(s);return o?t.concat(i,i.visualViewport||[],oc(s)?s:[],i.frameElement&&r?jl(i.frameElement):[]):t.concat(s,jl(s,[],r))}function h1(e){const t=mn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Mn(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=id(r)!==o||id(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function Sg(e){return pn(e)?e:e.contextElement}function Fi(e){const t=Sg(e);if(!Mn(t))return ro(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=h1(t);let i=(o?id(r.width):r.width)/n,a=(o?id(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const nD=ro(0);function p1(e){const t=Ar(e);return!bg()||!t.visualViewport?nD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ar(e)?!1:t}function Bo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Sg(e);let i=ro(1);t&&(n?pn(n)&&(i=Fi(n)):i=Fi(e));const a=sD(o,r,n)?p1(o):ro(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,f=s.width/i.x,d=s.height/i.y;if(o){const h=Ar(o),p=n&&pn(n)?Ar(n):n;let w=h,m=w.frameElement;for(;m&&n&&p!==w;){const x=Fi(m),g=m.getBoundingClientRect(),v=mn(m),_=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,C=g.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,c*=x.y,f*=x.x,d*=x.y,l+=_,c+=C,w=Ar(m),m=w.frameElement}}return ld({width:f,height:d,x:l,y:c})}function oD(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=Ss(n),a=t?nf(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ro(1);const f=ro(0),d=Mn(n);if((d||!d&&!o)&&((pa(n)!=="body"||oc(i))&&(l=sf(n)),Mn(n))){const h=Bo(n);c=Fi(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x,y:r.y*c.y-l.scrollTop*c.y+f.y}}function iD(e){return Array.from(e.getClientRects())}function m1(e){return Bo(Ss(e)).left+sf(e).scrollLeft}function aD(e){const t=Ss(e),r=sf(e),n=e.ownerDocument.body,s=jr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=jr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+m1(e);const a=-r.scrollTop;return mn(n).direction==="rtl"&&(i+=jr(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function lD(e,t){const r=Ar(e),n=Ss(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=bg();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function cD(e,t){const r=Bo(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=Mn(e)?Fi(e):ro(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:i,height:a,x:l,y:c}}function A0(e,t,r){let n;if(t==="viewport")n=lD(e,r);else if(t==="document")n=aD(Ss(e));else if(pn(t))n=cD(t,r);else{const s=p1(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return ld(n)}function g1(e,t){const r=so(e);return r===t||!pn(r)||ea(r)?!1:mn(r).position==="fixed"||g1(r,t)}function uD(e,t){const r=t.get(e);if(r)return r;let n=jl(e,[],!1).filter(a=>pn(a)&&pa(a)!=="body"),s=null;const o=mn(e).position==="fixed";let i=o?so(e):e;for(;pn(i)&&!ea(i);){const a=mn(i),l=_g(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||oc(i)&&!l&&g1(e,i))?n=n.filter(f=>f!==i):s=a,i=so(i)}return t.set(e,n),n}function dD(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?nf(t)?[]:uD(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,f)=>{const d=A0(t,f,s);return c.top=jr(d.top,c.top),c.right=Nn(d.right,c.right),c.bottom=Nn(d.bottom,c.bottom),c.left=jr(d.left,c.left),c},A0(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fD(e){const{width:t,height:r}=h1(e);return{width:t,height:r}}function hD(e,t,r){const n=Mn(t),s=Ss(t),o=r==="fixed",i=Bo(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=ro(0);if(n||!n&&!o)if((pa(t)!=="body"||oc(s))&&(a=sf(t)),n){const d=Bo(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&(l.x=m1(s));const c=i.left+a.scrollLeft-l.x,f=i.top+a.scrollTop-l.y;return{x:c,y:f,width:i.width,height:i.height}}function yh(e){return mn(e).position==="static"}function M0(e,t){return!Mn(e)||mn(e).position==="fixed"?null:t?t(e):e.offsetParent}function v1(e,t){const r=Ar(e);if(nf(e))return r;if(!Mn(e)){let s=so(e);for(;s&&!ea(s);){if(pn(s)&&!yh(s))return s;s=so(s)}return r}let n=M0(e,t);for(;n&&tD(n)&&yh(n);)n=M0(n,t);return n&&ea(n)&&yh(n)&&!_g(n)?r:n||rD(e)||r}const pD=async function(e){const t=this.getOffsetParent||v1,r=this.getDimensions,n=await r(e.floating);return{reference:hD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mD(e){return mn(e).direction==="rtl"}const gD={convertOffsetParentRelativeRectToViewportRelativeRect:oD,getDocumentElement:Ss,getClippingRect:dD,getOffsetParent:v1,getElementRects:pD,getClientRects:iD,getDimensions:fD,getScale:Fi,isElement:pn,isRTL:mD};function vD(e,t){let r=null,n;const s=Ss(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=Kc(f),w=Kc(s.clientWidth-(c+d)),m=Kc(s.clientHeight-(f+h)),x=Kc(c),v={rootMargin:-p+"px "+-w+"px "+-m+"px "+-x+"px",threshold:jr(0,Nn(1,l))||1};let _=!0;function C(E){const T=E[0].intersectionRatio;if(T!==l){if(!_)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}_=!1}try{r=new IntersectionObserver(C,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,v)}r.observe(e)}return i(!0),o}function yD(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Sg(e),f=s||o?[...c?jl(c):[],...jl(t)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),o&&g.addEventListener("resize",r)});const d=c&&a?vD(c,r):null;let h=-1,p=null;i&&(p=new ResizeObserver(g=>{let[v]=g;v&&v.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let w,m=l?Bo(e):null;l&&x();function x(){const g=Bo(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&r(),m=g,w=requestAnimationFrame(x)}return r(),()=>{var g;f.forEach(v=>{s&&v.removeEventListener("scroll",r),o&&v.removeEventListener("resize",r)}),d==null||d(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const wD=Xj,xD=Qj,_D=Gj,bD=eD,SD=Kj,I0=Zj,kD=Jj,CD=(e,t,r)=>{const n=new Map,s={platform:gD,...r},o={...s.platform,_c:n};return Yj(e,t,{...s,platform:o})};var _u=typeof document<"u"?y.useLayoutEffect:y.useEffect;function cd(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(!cd(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!cd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function y1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function L0(e,t){const r=y1(e);return Math.round(t*r)/r}function F0(e){const t=y.useRef(e);return _u(()=>{t.current=e}),t}function ED(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[f,d]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(n);cd(h,n)||p(n);const[w,m]=y.useState(null),[x,g]=y.useState(null),v=y.useCallback($=>{$!==T.current&&(T.current=$,m($))},[]),_=y.useCallback($=>{$!==P.current&&(P.current=$,g($))},[]),C=o||w,E=i||x,T=y.useRef(null),P=y.useRef(null),O=y.useRef(f),j=l!=null,L=F0(l),q=F0(s),R=y.useCallback(()=>{if(!T.current||!P.current)return;const $={placement:t,strategy:r,middleware:h};q.current&&($.platform=q.current),CD(T.current,P.current,$).then(Z=>{const I={...Z,isPositioned:!0};F.current&&!cd(O.current,I)&&(O.current=I,ws.flushSync(()=>{d(I)}))})},[h,t,r,q]);_u(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const F=y.useRef(!1);_u(()=>(F.current=!0,()=>{F.current=!1}),[]),_u(()=>{if(C&&(T.current=C),E&&(P.current=E),C&&E){if(L.current)return L.current(C,E,R);R()}},[C,E,R,L,j]);const b=y.useMemo(()=>({reference:T,floating:P,setReference:v,setFloating:_}),[v,_]),W=y.useMemo(()=>({reference:C,floating:E}),[C,E]),te=y.useMemo(()=>{const $={position:r,left:0,top:0};if(!W.floating)return $;const Z=L0(W.floating,f.x),I=L0(W.floating,f.y);return a?{...$,transform:"translate("+Z+"px, "+I+"px)",...y1(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:I}},[r,a,W.floating,f.x,f.y]);return y.useMemo(()=>({...f,update:R,refs:b,elements:W,floatingStyles:te}),[f,R,b,W,te])}const TD=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?I0({element:n.current,padding:s}).fn(r):{}:n?I0({element:n,padding:s}).fn(r):{}}}},RD=(e,t)=>({...wD(e),options:[e,t]}),ND=(e,t)=>({...xD(e),options:[e,t]}),PD=(e,t)=>({...kD(e),options:[e,t]}),jD=(e,t)=>({..._D(e),options:[e,t]}),DD=(e,t)=>({...bD(e),options:[e,t]}),OD=(e,t)=>({...SD(e),options:[e,t]}),AD=(e,t)=>({...TD(e),options:[e,t]});var MD="Arrow",w1=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return u.jsx(Me.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});w1.displayName=MD;var ID=w1;function x1(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 o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var kg="Popper",[_1,ma]=Xr(kg),[LD,b1]=_1(kg),S1=e=>{const{__scopePopper:t,children:r}=e,[n,s]=y.useState(null);return u.jsx(LD,{scope:t,anchor:n,onAnchorChange:s,children:r})};S1.displayName=kg;var k1="PopperAnchor",C1=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=b1(k1,r),i=y.useRef(null),a=Ke(t,i);return y.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:u.jsx(Me.div,{...s,ref:a})});C1.displayName=k1;var Cg="PopperContent",[FD,zD]=_1(Cg),E1=y.forwardRef((e,t)=>{var fe,ge,be,Pe,Te,Se;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:w,...m}=e,x=b1(Cg,r),[g,v]=y.useState(null),_=Ke(t,rt=>v(rt)),[C,E]=y.useState(null),T=x1(C),P=(T==null?void 0:T.width)??0,O=(T==null?void 0:T.height)??0,j=n+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},q=Array.isArray(c)?c:[c],R=q.length>0,F={padding:L,boundary:q.filter(VD),altBoundary:R},{refs:b,floatingStyles:W,placement:te,isPositioned:$,middlewareData:Z}=ED({strategy:"fixed",placement:j,whileElementsMounted:(...rt)=>yD(...rt,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[RD({mainAxis:s+O,alignmentAxis:i}),l&&ND({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?PD():void 0,...F}),l&&jD({...F}),DD({...F,apply:({elements:rt,rects:k,availableWidth:J,availableHeight:G})=>{const{width:D,height:S}=k.reference,N=rt.floating.style;N.setProperty("--radix-popper-available-width",`${J}px`),N.setProperty("--radix-popper-available-height",`${G}px`),N.setProperty("--radix-popper-anchor-width",`${D}px`),N.setProperty("--radix-popper-anchor-height",`${S}px`)}}),C&&AD({element:C,padding:a}),WD({arrowWidth:P,arrowHeight:O}),h&&OD({strategy:"referenceHidden",...F})]}),[I,Q]=N1(te),z=jt(w);nr(()=>{$&&(z==null||z())},[$,z]);const V=(fe=Z.arrow)==null?void 0:fe.x,de=(ge=Z.arrow)==null?void 0:ge.y,ne=((be=Z.arrow)==null?void 0:be.centerOffset)!==0,[se,Ee]=y.useState();return nr(()=>{g&&Ee(window.getComputedStyle(g).zIndex)},[g]),u.jsx("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Pe=Z.transformOrigin)==null?void 0:Pe.x,(Te=Z.transformOrigin)==null?void 0:Te.y].join(" "),...((Se=Z.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(FD,{scope:r,placedSide:I,onArrowChange:E,arrowX:V,arrowY:de,shouldHideArrow:ne,children:u.jsx(Me.div,{"data-side":I,"data-align":Q,...m,ref:_,style:{...m.style,animation:$?void 0:"none"}})})})});E1.displayName=Cg;var T1="PopperArrow",UD={top:"bottom",right:"left",bottom:"top",left:"right"},R1=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=zD(T1,n),i=UD[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(ID,{...s,ref:r,style:{...s.style,display:"block"}})})});R1.displayName=T1;function VD(e){return e!==null}var WD=e=>({name:"transformOrigin",options:e,fn(t){var x,g,v;const{placement:r,rects:n,middlewareData:s}=t,i=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,f]=N1(r),d={start:"0%",center:"50%",end:"100%"}[f],h=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let w="",m="";return c==="bottom"?(w=i?d:`${h}px`,m=`${-l}px`):c==="top"?(w=i?d:`${h}px`,m=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,m=i?d:`${p}px`):c==="left"&&(w=`${n.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:w,y:m}}}});function N1(e){const[t,r="center"]=e.split("-");return[t,r]}var Eg=S1,Tg=C1,Rg=E1,Ng=R1,$D="Portal",ic=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=y.useState(!1);nr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?P_.createPortal(u.jsx(Me.div,{...n,ref:t}),i):null});ic.displayName=$D;function BD(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Cr=e=>{const{present:t,children:r}=e,n=HD(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),o=Ke(n.ref,YD(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:o}):null};Cr.displayName="Presence";function HD(e){const[t,r]=y.useState(),n=y.useRef({}),s=y.useRef(e),o=y.useRef("none"),i=e?"mounted":"unmounted",[a,l]=BD(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=qc(n.current);o.current=a==="mounted"?c:"none"},[a]),nr(()=>{const c=n.current,f=s.current;if(f!==e){const h=o.current,p=qc(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),nr(()=>{if(t){const c=d=>{const p=qc(n.current).includes(d.animationName);d.target===t&&p&&ws.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(o.current=qc(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function qc(e){return(e==null?void 0:e.animationName)||"none"}function YD(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 wh="rovingFocusGroup.onEntryFocus",ZD={bubbles:!1,cancelable:!0},of="RovingFocusGroup",[Fp,P1,GD]=ef(of),[KD,j1]=Xr(of,[GD]),[qD,XD]=KD(of),D1=y.forwardRef((e,t)=>u.jsx(Fp.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Fp.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(QD,{...e,ref:t})})}));D1.displayName=of;var QD=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...d}=e,h=y.useRef(null),p=Ke(t,h),w=tf(o),[m=null,x]=to({prop:i,defaultProp:a,onChange:l}),[g,v]=y.useState(!1),_=jt(c),C=P1(r),E=y.useRef(!1),[T,P]=y.useState(0);return y.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(wh,_),()=>O.removeEventListener(wh,_)},[_]),u.jsx(qD,{scope:r,orientation:n,dir:w,loop:s,currentTabStopId:m,onItemFocus:y.useCallback(O=>x(O),[x]),onItemShiftTab:y.useCallback(()=>v(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(O=>O+1),[]),onFocusableItemRemove:y.useCallback(()=>P(O=>O-1),[]),children:u.jsx(Me.div,{tabIndex:g||T===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{E.current=!0}),onFocus:ue(e.onFocus,O=>{const j=!E.current;if(O.target===O.currentTarget&&j&&!g){const L=new CustomEvent(wh,ZD);if(O.currentTarget.dispatchEvent(L),!L.defaultPrevented){const q=C().filter(te=>te.focusable),R=q.find(te=>te.active),F=q.find(te=>te.id===m),W=[R,F,...q].filter(Boolean).map(te=>te.ref.current);M1(W,f)}}E.current=!1}),onBlur:ue(e.onBlur,()=>v(!1))})})}),O1="RovingFocusGroupItem",A1=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,...i}=e,a=On(),l=o||a,c=XD(O1,r),f=c.currentTabStopId===l,d=P1(r),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return y.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),u.jsx(Fp.ItemSlot,{scope:r,id:l,focusable:n,active:s,children:u.jsx(Me.span,{tabIndex:f?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,w=>{n?c.onItemFocus(l):w.preventDefault()}),onFocus:ue(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:ue(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const m=tO(w,c.orientation,c.dir);if(m!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let g=d().filter(v=>v.focusable).map(v=>v.ref.current);if(m==="last")g.reverse();else if(m==="prev"||m==="next"){m==="prev"&&g.reverse();const v=g.indexOf(w.currentTarget);g=c.loop?rO(g,v+1):g.slice(v+1)}setTimeout(()=>M1(g))}})})})});A1.displayName=O1;var JD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function eO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function tO(e,t,r){const n=eO(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return JD[n]}function M1(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function rO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var nO=D1,sO=A1,oO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ci=new WeakMap,Xc=new WeakMap,Qc={},xh=0,I1=function(e){return e&&(e.host||I1(e.parentNode))},iO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=I1(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})},aO=function(e,t,r,n){var s=iO(t,Array.isArray(e)?e:[e]);Qc[r]||(Qc[r]=new WeakMap);var o=Qc[r],i=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))f(h);else try{var p=h.getAttribute(n),w=p!==null&&p!=="false",m=(ci.get(h)||0)+1,x=(o.get(h)||0)+1;ci.set(h,m),o.set(h,x),i.push(h),m===1&&w&&Xc.set(h,!0),x===1&&h.setAttribute(r,"true"),w||h.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return f(t),a.clear(),xh++,function(){i.forEach(function(d){var h=ci.get(d)-1,p=o.get(d)-1;ci.set(d,h),o.set(d,p),h||(Xc.has(d)||d.removeAttribute(n),Xc.delete(d)),p||d.removeAttribute(r)}),xh--,xh||(ci=new WeakMap,ci=new WeakMap,Xc=new WeakMap,Qc={})}},Pg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=oO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),aO(n,s,r,"aria-hidden")):function(){return null}},En=function(){return En=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},En.apply(this,arguments)};function L1(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 lO(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var bu="right-scroll-bar-position",Su="width-before-scroll-bar",cO="with-scroll-bars-hidden",uO="--removed-body-scroll-bar-size";function _h(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dO(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 fO=typeof window<"u"?y.useLayoutEffect:y.useEffect,z0=new WeakMap;function hO(e,t){var r=dO(null,function(n){return e.forEach(function(s){return _h(s,n)})});return fO(function(){var n=z0.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(a){o.has(a)||_h(a,null)}),o.forEach(function(a){s.has(a)||_h(a,i)})}z0.set(r,e)},[e]),r}function pO(e){return e}function mO(e,t){t===void 0&&(t=pO);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(o),i=r}var l=function(){var f=i;i=[],f.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(f){i.push(f),c()},filter:function(f){return i=i.filter(f),r}}}};return s}function gO(e){e===void 0&&(e={});var t=mO(null);return t.options=En({async:!0,ssr:!1},e),t}var F1=function(e){var t=e.sideCar,r=L1(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,En({},r))};F1.isSideCarExport=!0;function vO(e,t){return e.useMedium(t),F1}var z1=gO(),bh=function(){},af=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:bh,onWheelCapture:bh,onTouchMoveCapture:bh}),s=n[0],o=n[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,w=e.inert,m=e.allowPinchZoom,x=e.as,g=x===void 0?"div":x,v=e.gapMode,_=L1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,E=hO([r,t]),T=En(En({},_),s);return y.createElement(y.Fragment,null,f&&y.createElement(C,{sideCar:z1,removeScrollBar:c,shards:d,noIsolation:p,inert:w,setCallbacks:o,allowPinchZoom:!!m,lockRef:r,gapMode:v}),i?y.cloneElement(y.Children.only(a),En(En({},T),{ref:E})):y.createElement(g,En({},T,{className:l,ref:E}),a))});af.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};af.classNames={fullWidth:Su,zeroRight:bu};var yO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yO();return t&&e.setAttribute("nonce",t),e}function xO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _O(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=wO())&&(xO(t,r),_O(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},SO=function(){var e=bO();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},U1=function(){var e=SO(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},kO={left:0,top:0,right:0,gap:0},Sh=function(e){return parseInt(e||"",10)||0},CO=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[Sh(r),Sh(n),Sh(s)]},EO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kO;var t=CO(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])}},TO=U1(),zi="data-scroll-locked",RO=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
.`.concat(cO,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(a,"px ").concat(n,`;
}
body[`).concat(zi,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(s,`px;
padding-top: `).concat(o,`px;
padding-right: `).concat(i,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(bu,` {
right: `).concat(a,"px ").concat(n,`;
}
.`).concat(Su,` {
margin-right: `).concat(a,"px ").concat(n,`;
}
.`).concat(bu," .").concat(bu,` {
right: 0 `).concat(n,`;
}
.`).concat(Su," .").concat(Su,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(zi,`] {
`).concat(uO,": ").concat(a,`px;
}
`)},U0=function(){var e=parseInt(document.body.getAttribute(zi)||"0",10);return isFinite(e)?e:0},NO=function(){y.useEffect(function(){return document.body.setAttribute(zi,(U0()+1).toString()),function(){var e=U0()-1;e<=0?document.body.removeAttribute(zi):document.body.setAttribute(zi,e.toString())}},[])},PO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;NO();var o=y.useMemo(function(){return EO(s)},[s]);return y.createElement(TO,{styles:RO(o,!t,s,r?"":"!important")})},zp=!1;if(typeof window<"u")try{var Jc=Object.defineProperty({},"passive",{get:function(){return zp=!0,!0}});window.addEventListener("test",Jc,Jc),window.removeEventListener("test",Jc,Jc)}catch{zp=!1}var ui=zp?{passive:!1}:!1,jO=function(e){return e.tagName==="TEXTAREA"},V1=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!jO(e)&&r[t]==="visible")},DO=function(e){return V1(e,"overflowY")},OO=function(e){return V1(e,"overflowX")},V0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=W1(e,n);if(s){var o=$1(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},AO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},MO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},W1=function(e,t){return e==="v"?DO(t):OO(t)},$1=function(e,t){return e==="v"?AO(t):MO(t)},IO=function(e,t){return e==="h"&&t==="rtl"?-1:1},LO=function(e,t,r,n,s){var o=IO(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),c=!1,f=i>0,d=0,h=0;do{var p=$1(e,a),w=p[0],m=p[1],x=p[2],g=m-x-o*w;(w||g)&&W1(e,a)&&(d+=g,h+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&(Math.abs(d)<1||!s)||!f&&(Math.abs(h)<1||!s))&&(c=!0),c},eu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W0=function(e){return[e.deltaX,e.deltaY]},$0=function(e){return e&&"current"in e?e.current:e},FO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zO=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},UO=0,di=[];function VO(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(UO++)[0],o=y.useState(U1)[0],i=y.useRef(e);y.useEffect(function(){i.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=lO([e.lockRef.current],(e.shards||[]).map($0),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(m,x){if("touches"in m&&m.touches.length===2)return!i.current.allowPinchZoom;var g=eu(m),v=r.current,_="deltaX"in m?m.deltaX:v[0]-g[0],C="deltaY"in m?m.deltaY:v[1]-g[1],E,T=m.target,P=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in m&&P==="h"&&T.type==="range")return!1;var O=V0(P,T);if(!O)return!0;if(O?E=P:(E=P==="v"?"h":"v",O=V0(P,T)),!O)return!1;if(!n.current&&"changedTouches"in m&&(_||C)&&(n.current=E),!E)return!0;var j=n.current||E;return LO(j,x,m,j==="h"?_:C,!0)},[]),l=y.useCallback(function(m){var x=m;if(!(!di.length||di[di.length-1]!==o)){var g="deltaY"in x?W0(x):eu(x),v=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&FO(E.delta,g)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var _=(i.current.shards||[]).map($0).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=_.length>0?a(x,_[0]):!i.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),c=y.useCallback(function(m,x,g,v){var _={name:m,delta:x,target:g,should:v,shadowParent:WO(g)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),f=y.useCallback(function(m){r.current=eu(m),n.current=void 0},[]),d=y.useCallback(function(m){c(m.type,W0(m),m.target,a(m,e.lockRef.current))},[]),h=y.useCallback(function(m){c(m.type,eu(m),m.target,a(m,e.lockRef.current))},[]);y.useEffect(function(){return di.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ui),document.addEventListener("touchmove",l,ui),document.addEventListener("touchstart",f,ui),function(){di=di.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,ui),document.removeEventListener("touchmove",l,ui),document.removeEventListener("touchstart",f,ui)}},[]);var p=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(o,{styles:zO(s)}):null,p?y.createElement(PO,{gapMode:e.gapMode}):null)}function WO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $O=vO(z1,VO);var lf=y.forwardRef(function(e,t){return y.createElement(af,En({},e,{ref:t,sideCar:$O}))});lf.classNames=af.classNames;var Up=["Enter"," "],BO=["ArrowDown","PageUp","Home"],B1=["ArrowUp","PageDown","End"],HO=[...BO,...B1],YO={ltr:[...Up,"ArrowRight"],rtl:[...Up,"ArrowLeft"]},ZO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ac="Menu",[Dl,GO,KO]=ef(ac),[Xo,H1]=Xr(ac,[KO,ma,j1]),cf=ma(),Y1=j1(),[qO,Qo]=Xo(ac),[XO,lc]=Xo(ac),Z1=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=e,a=cf(t),[l,c]=y.useState(null),f=y.useRef(!1),d=jt(o),h=tf(s);return y.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),u.jsx(Eg,{...a,children:u.jsx(qO,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:u.jsx(XO,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:h,modal:i,children:n})})})};Z1.displayName=ac;var QO="MenuAnchor",jg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=cf(r);return u.jsx(Tg,{...s,...n,ref:t})});jg.displayName=QO;var Dg="MenuPortal",[JO,G1]=Xo(Dg,{forceMount:void 0}),K1=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=Qo(Dg,t);return u.jsx(JO,{scope:t,forceMount:r,children:u.jsx(Cr,{present:r||o.open,children:u.jsx(ic,{asChild:!0,container:s,children:n})})})};K1.displayName=Dg;var Gr="MenuContent",[eA,Og]=Xo(Gr),q1=y.forwardRef((e,t)=>{const r=G1(Gr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=Qo(Gr,e.__scopeMenu),i=lc(Gr,e.__scopeMenu);return u.jsx(Dl.Provider,{scope:e.__scopeMenu,children:u.jsx(Cr,{present:n||o.open,children:u.jsx(Dl.Slot,{scope:e.__scopeMenu,children:i.modal?u.jsx(tA,{...s,ref:t}):u.jsx(rA,{...s,ref:t})})})})}),tA=y.forwardRef((e,t)=>{const r=Qo(Gr,e.__scopeMenu),n=y.useRef(null),s=Ke(t,n);return y.useEffect(()=>{const o=n.current;if(o)return Pg(o)},[]),u.jsx(Ag,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),rA=y.forwardRef((e,t)=>{const r=Qo(Gr,e.__scopeMenu);return u.jsx(Ag,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Ag=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:p,disableOutsideScroll:w,...m}=e,x=Qo(Gr,r),g=lc(Gr,r),v=cf(r),_=Y1(r),C=GO(r),[E,T]=y.useState(null),P=y.useRef(null),O=Ke(t,P,x.onContentChange),j=y.useRef(0),L=y.useRef(""),q=y.useRef(0),R=y.useRef(null),F=y.useRef("right"),b=y.useRef(0),W=w?lf:y.Fragment,te=w?{as:hs,allowPinchZoom:!0}:void 0,$=I=>{var fe,ge;const Q=L.current+I,z=C().filter(be=>!be.disabled),V=document.activeElement,de=(fe=z.find(be=>be.ref.current===V))==null?void 0:fe.textValue,ne=z.map(be=>be.textValue),se=pA(ne,Q,de),Ee=(ge=z.find(be=>be.textValue===se))==null?void 0:ge.ref.current;(function be(Pe){L.current=Pe,window.clearTimeout(j.current),Pe!==""&&(j.current=window.setTimeout(()=>be(""),1e3))})(Q),Ee&&setTimeout(()=>Ee.focus())};y.useEffect(()=>()=>window.clearTimeout(j.current),[]),vg();const Z=y.useCallback(I=>{var z,V;return F.current===((z=R.current)==null?void 0:z.side)&&gA(I,(V=R.current)==null?void 0:V.area)},[]);return u.jsx(eA,{scope:r,searchRef:L,onItemEnter:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:y.useCallback(I=>{var Q;Z(I)||((Q=P.current)==null||Q.focus(),T(null))},[Z]),onTriggerLeave:y.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:q,onPointerGraceIntentChange:y.useCallback(I=>{R.current=I},[]),children:u.jsx(W,{...te,children:u.jsx(rf,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var Q;I.preventDefault(),(Q=P.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:u.jsx(fa,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:p,children:u.jsx(nO,{asChild:!0,..._,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:ue(l,I=>{g.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Rg,{role:"menu","aria-orientation":"vertical","data-state":fb(x.open),"data-radix-menu-content":"",dir:g.dir,...v,...m,ref:O,style:{outline:"none",...m.style},onKeyDown:ue(m.onKeyDown,I=>{const z=I.target.closest("[data-radix-menu-content]")===I.currentTarget,V=I.ctrlKey||I.altKey||I.metaKey,de=I.key.length===1;z&&(I.key==="Tab"&&I.preventDefault(),!V&&de&&$(I.key));const ne=P.current;if(I.target!==ne||!HO.includes(I.key))return;I.preventDefault();const Ee=C().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);B1.includes(I.key)&&Ee.reverse(),fA(Ee)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:ue(e.onPointerMove,Ol(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}}))})})})})})})});q1.displayName=Gr;var nA="MenuGroup",Mg=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(Me.div,{role:"group",...n,ref:t})});Mg.displayName=nA;var sA="MenuLabel",X1=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(Me.div,{...n,ref:t})});X1.displayName=sA;var ud="MenuItem",B0="menu.itemSelect",uf=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=y.useRef(null),i=lc(ud,e.__scopeMenu),a=Og(ud,e.__scopeMenu),l=Ke(t,o),c=y.useRef(!1),f=()=>{const d=o.current;if(!r&&d){const h=new CustomEvent(B0,{bubbles:!0,cancelable:!0});d.addEventListener(B0,p=>n==null?void 0:n(p),{once:!0}),gg(d,h),h.defaultPrevented?c.current=!1:i.onClose()}};return u.jsx(Q1,{...s,ref:l,disabled:r,onClick:ue(e.onClick,f),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),c.current=!0},onPointerUp:ue(e.onPointerUp,d=>{var h;c.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:ue(e.onKeyDown,d=>{const h=a.searchRef.current!=="";r||h&&d.key===" "||Up.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});uf.displayName=ud;var Q1=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,i=Og(ud,r),a=Y1(r),l=y.useRef(null),c=Ke(t,l),[f,d]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const w=l.current;w&&p((w.textContent??"").trim())},[o.children]),u.jsx(Dl.ItemSlot,{scope:r,disabled:n,textValue:s??h,children:u.jsx(sO,{asChild:!0,...a,focusable:!n,children:u.jsx(Me.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:c,onPointerMove:ue(e.onPointerMove,Ol(w=>{n?i.onItemLeave(w):(i.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,Ol(w=>i.onItemLeave(w))),onFocus:ue(e.onFocus,()=>d(!0)),onBlur:ue(e.onBlur,()=>d(!1))})})})}),oA="MenuCheckboxItem",J1=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return u.jsx(sb,{scope:e.__scopeMenu,checked:r,children:u.jsx(uf,{role:"menuitemcheckbox","aria-checked":dd(r)?"mixed":r,...s,ref:t,"data-state":Lg(r),onSelect:ue(s.onSelect,()=>n==null?void 0:n(dd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});J1.displayName=oA;var eb="MenuRadioGroup",[iA,aA]=Xo(eb,{value:void 0,onValueChange:()=>{}}),tb=y.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=jt(n);return u.jsx(iA,{scope:e.__scopeMenu,value:r,onValueChange:o,children:u.jsx(Mg,{...s,ref:t})})});tb.displayName=eb;var rb="MenuRadioItem",nb=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=aA(rb,e.__scopeMenu),o=r===s.value;return u.jsx(sb,{scope:e.__scopeMenu,checked:o,children:u.jsx(uf,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":Lg(o),onSelect:ue(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});nb.displayName=rb;var Ig="MenuItemIndicator",[sb,lA]=Xo(Ig,{checked:!1}),ob=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=lA(Ig,r);return u.jsx(Cr,{present:n||dd(o.checked)||o.checked===!0,children:u.jsx(Me.span,{...s,ref:t,"data-state":Lg(o.checked)})})});ob.displayName=Ig;var cA="MenuSeparator",ib=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});ib.displayName=cA;var uA="MenuArrow",ab=y.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=cf(r);return u.jsx(Ng,{...s,...n,ref:t})});ab.displayName=uA;var dA="MenuSub",[K6,lb]=Xo(dA),Wa="MenuSubTrigger",cb=y.forwardRef((e,t)=>{const r=Qo(Wa,e.__scopeMenu),n=lc(Wa,e.__scopeMenu),s=lb(Wa,e.__scopeMenu),o=Og(Wa,e.__scopeMenu),i=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__scopeMenu:e.__scopeMenu},f=y.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return y.useEffect(()=>f,[f]),y.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),u.jsx(jg,{asChild:!0,...c,children:u.jsx(Q1,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":fb(r.open),...e,ref:Jd(t,s.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,Ol(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:ue(e.onPointerLeave,Ol(d=>{var p,w;f();const h=(p=r.content)==null?void 0:p.getBoundingClientRect();if(h){const m=(w=r.content)==null?void 0:w.dataset.side,x=m==="right",g=x?-5:5,v=h[x?"left":"right"],_=h[x?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:v,y:h.top},{x:_,y:h.top},{x:_,y:h.bottom},{x:v,y:h.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,d=>{var p;const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||YO[n.dir].includes(d.key)&&(r.onOpenChange(!0),(p=r.content)==null||p.focus(),d.preventDefault())})})})});cb.displayName=Wa;var ub="MenuSubContent",db=y.forwardRef((e,t)=>{const r=G1(Gr,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=Qo(Gr,e.__scopeMenu),i=lc(Gr,e.__scopeMenu),a=lb(ub,e.__scopeMenu),l=y.useRef(null),c=Ke(t,l);return u.jsx(Dl.Provider,{scope:e.__scopeMenu,children:u.jsx(Cr,{present:n||o.open,children:u.jsx(Dl.Slot,{scope:e.__scopeMenu,children:u.jsx(Ag,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;i.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ue(e.onFocusOutside,f=>{f.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{var p;const d=f.currentTarget.contains(f.target),h=ZO[i.dir].includes(f.key);d&&h&&(o.onOpenChange(!1),(p=a.trigger)==null||p.focus(),f.preventDefault())})})})})})});db.displayName=ub;function fb(e){return e?"open":"closed"}function dd(e){return e==="indeterminate"}function Lg(e){return dd(e)?"indeterminate":e?"checked":"unchecked"}function fA(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function hA(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function pA(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=hA(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function mA(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,c=t[i].x,f=t[i].y;l>n!=f>n&&r<(c-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function gA(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return mA(r,t)}function Ol(e){return t=>t.pointerType==="mouse"?e(t):void 0}var vA=Z1,yA=jg,wA=K1,xA=q1,_A=Mg,bA=X1,SA=uf,kA=J1,CA=tb,EA=nb,TA=ob,RA=ib,NA=ab,PA=cb,jA=db,Fg="DropdownMenu",[DA,q6]=Xr(Fg,[H1]),vr=H1(),[OA,hb]=DA(Fg),pb=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=vr(t),c=y.useRef(null),[f=!1,d]=to({prop:s,defaultProp:o,onChange:i});return u.jsx(OA,{scope:t,triggerId:On(),triggerRef:c,contentId:On(),open:f,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(h=>!h),[d]),modal:a,children:u.jsx(vA,{...l,open:f,onOpenChange:d,dir:n,modal:a,children:r})})};pb.displayName=Fg;var mb="DropdownMenuTrigger",gb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=hb(mb,r),i=vr(r);return u.jsx(yA,{asChild:!0,...i,children:u.jsx(Me.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:Jd(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ue(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});gb.displayName=mb;var AA="DropdownMenuPortal",vb=e=>{const{__scopeDropdownMenu:t,...r}=e,n=vr(t);return u.jsx(wA,{...n,...r})};vb.displayName=AA;var yb="DropdownMenuContent",wb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=hb(yb,r),o=vr(r),i=y.useRef(!1);return u.jsx(xA,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,f=l.button===2||c;(!s.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wb.displayName=yb;var MA="DropdownMenuGroup",IA=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(_A,{...s,...n,ref:t})});IA.displayName=MA;var LA="DropdownMenuLabel",xb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(bA,{...s,...n,ref:t})});xb.displayName=LA;var FA="DropdownMenuItem",_b=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(SA,{...s,...n,ref:t})});_b.displayName=FA;var zA="DropdownMenuCheckboxItem",bb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(kA,{...s,...n,ref:t})});bb.displayName=zA;var UA="DropdownMenuRadioGroup",VA=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(CA,{...s,...n,ref:t})});VA.displayName=UA;var WA="DropdownMenuRadioItem",Sb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(EA,{...s,...n,ref:t})});Sb.displayName=WA;var $A="DropdownMenuItemIndicator",kb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(TA,{...s,...n,ref:t})});kb.displayName=$A;var BA="DropdownMenuSeparator",Cb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(RA,{...s,...n,ref:t})});Cb.displayName=BA;var HA="DropdownMenuArrow",YA=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(NA,{...s,...n,ref:t})});YA.displayName=HA;var ZA="DropdownMenuSubTrigger",Eb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(PA,{...s,...n,ref:t})});Eb.displayName=ZA;var GA="DropdownMenuSubContent",Tb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=vr(r);return u.jsx(jA,{...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)"}})});Tb.displayName=GA;var KA=pb,qA=gb,XA=vb,Rb=wb,Nb=xb,Pb=_b,jb=bb,Db=Sb,Ob=kb,Ab=Cb,Mb=Eb,Ib=Tb;const Lb=KA,Fb=qA,QA=y.forwardRef(({className:e,inset:t,children:r,...n},s)=>u.jsxs(Mb,{ref:s,className:_e("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,u.jsx(bP,{className:"ml-auto h-4 w-4"})]}));QA.displayName=Mb.displayName;const JA=y.forwardRef(({className:e,...t},r)=>u.jsx(Ib,{ref:r,className:_e("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}));JA.displayName=Ib.displayName;const zg=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(XA,{children:u.jsx(Rb,{ref:n,sideOffset:t,className:_e("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})}));zg.displayName=Rb.displayName;const Ui=y.forwardRef(({className:e,inset:t,...r},n)=>u.jsx(Pb,{ref:n,className:_e("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}));Ui.displayName=Pb.displayName;const eM=y.forwardRef(({className:e,children:t,checked:r,...n},s)=>u.jsxs(jb,{ref:s,className:_e("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:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ob,{children:u.jsx(K_,{className:"h-4 w-4"})})}),t]}));eM.displayName=jb.displayName;const tM=y.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(Db,{ref:n,className:_e("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:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ob,{children:u.jsx(CP,{className:"h-2 w-2 fill-current"})})}),t]}));tM.displayName=Db.displayName;const zb=y.forwardRef(({className:e,inset:t,...r},n)=>u.jsx(Nb,{ref:n,className:_e("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));zb.displayName=Nb.displayName;const Ub=y.forwardRef(({className:e,...t},r)=>u.jsx(Ab,{ref:r,className:_e("-mx-1 my-1 h-px bg-muted",e),...t}));Ub.displayName=Ab.displayName;var Ug="Dialog",[Vb,Wb]=Xr(Ug),[rM,wn]=Vb(Ug),$b=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=y.useRef(null),l=y.useRef(null),[c=!1,f]=to({prop:n,defaultProp:s,onChange:o});return u.jsx(rM,{scope:t,triggerRef:a,contentRef:l,contentId:On(),titleId:On(),descriptionId:On(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(d=>!d),[f]),modal:i,children:r})};$b.displayName=Ug;var Bb="DialogTrigger",Hb=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(Bb,r),o=Ke(t,s.triggerRef);return u.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":$g(s.open),...n,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});Hb.displayName=Bb;var Vg="DialogPortal",[nM,Yb]=Vb(Vg,{forceMount:void 0}),Zb=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=wn(Vg,t);return u.jsx(nM,{scope:t,forceMount:r,children:y.Children.map(n,i=>u.jsx(Cr,{present:r||o.open,children:u.jsx(ic,{asChild:!0,container:s,children:i})}))})};Zb.displayName=Vg;var fd="DialogOverlay",Gb=y.forwardRef((e,t)=>{const r=Yb(fd,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=wn(fd,e.__scopeDialog);return o.modal?u.jsx(Cr,{present:n||o.open,children:u.jsx(sM,{...s,ref:t})}):null});Gb.displayName=fd;var sM=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(fd,r);return u.jsx(lf,{as:hs,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(Me.div,{"data-state":$g(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ho="DialogContent",Kb=y.forwardRef((e,t)=>{const r=Yb(Ho,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=wn(Ho,e.__scopeDialog);return u.jsx(Cr,{present:n||o.open,children:o.modal?u.jsx(oM,{...s,ref:t}):u.jsx(iM,{...s,ref:t})})});Kb.displayName=Ho;var oM=y.forwardRef((e,t)=>{const r=wn(Ho,e.__scopeDialog),n=y.useRef(null),s=Ke(t,r.contentRef,n);return y.useEffect(()=>{const o=n.current;if(o)return Pg(o)},[]),u.jsx(qb,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault())})}),iM=y.forwardRef((e,t)=>{const r=wn(Ho,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return u.jsx(qb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),qb=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=wn(Ho,r),l=y.useRef(null),c=Ke(t,l);return vg(),u.jsxs(u.Fragment,{children:[u.jsx(rf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:u.jsx(fa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":$g(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(lM,{titleId:a.titleId}),u.jsx(uM,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Wg="DialogTitle",Xb=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(Wg,r);return u.jsx(Me.h2,{id:s.titleId,...n,ref:t})});Xb.displayName=Wg;var Qb="DialogDescription",Jb=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(Qb,r);return u.jsx(Me.p,{id:s.descriptionId,...n,ref:t})});Jb.displayName=Qb;var eS="DialogClose",tS=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=wn(eS,r);return u.jsx(Me.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});tS.displayName=eS;function $g(e){return e?"open":"closed"}var rS="DialogTitleWarning",[aM,nS]=mj(rS,{contentName:Ho,titleName:Wg,docsSlug:"dialog"}),lM=({titleId:e})=>{const t=nS(rS),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},cM="DialogDescriptionWarning",uM=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nS(cM).contentName}}.`;return y.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Bg=$b,Hg=Hb,Yg=Zb,cc=Gb,uc=Kb,dc=Xb,fc=Jb,df=tS;const sS=Bg,oS=Hg,dM=Yg,iS=y.forwardRef(({className:e,...t},r)=>u.jsx(cc,{className:_e("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}));iS.displayName=cc.displayName;const fM=sc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Zg=y.forwardRef(({side:e="right",className:t,children:r,...n},s)=>u.jsxs(dM,{children:[u.jsx(iS,{}),u.jsxs(uc,{ref:s,className:_e(fM({side:e}),t),...n,children:[r,u.jsxs(df,{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:[u.jsx(fg,{className:"h-4 w-4 dark:text-stone-200"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zg.displayName=uc.displayName;const aS=({className:e,...t})=>u.jsx("div",{className:_e("flex flex-col space-y-2 text-center sm:text-left",e),...t});aS.displayName="SheetHeader";const lS=y.forwardRef(({className:e,...t},r)=>u.jsx(dc,{ref:r,className:_e("text-lg font-semibold text-foreground",e),...t}));lS.displayName=dc.displayName;const hM=y.forwardRef(({className:e,...t},r)=>u.jsx(fc,{ref:r,className:_e("text-sm text-muted-foreground",e),...t}));hM.displayName=fc.displayName;class Mr extends Error{constructor(t){var r,n,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Mr.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 Mr||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(r=this.response)==null?void 0:r.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":(o=(s=(n=this.originalError)==null?void 0:n.cause)==null?void 0:s.message)!=null&&o.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return{...this}}}const tu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function pM(e,t){const r={};if(typeof e!="string")return r;const n=Object.assign({},{}).decode||mM;let s=0;for(;s<e.length;){const o=e.indexOf("=",s);if(o===-1)break;let i=e.indexOf(";",s);if(i===-1)i=e.length;else if(i<o){s=e.lastIndexOf(";",o-1)+1;continue}const a=e.slice(s,o).trim();if(r[a]===void 0){let l=e.slice(o+1,i).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1));try{r[a]=n(l)}catch{r[a]=l}}s=i+1}return r}function H0(e,t,r){const n=Object.assign({},r||{}),s=n.encode||gM;if(!tu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!tu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(n.maxAge!=null){const a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(n.domain){if(!tu.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain="+n.domain}if(n.path){if(!tu.test(n.path))throw new TypeError("option path is invalid");i+="; 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");i+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}function mM(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function gM(e){return encodeURIComponent(e)}const vM=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let cS;function Vi(e){if(e)try{const t=decodeURIComponent(cS(e.split(".")[1]).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function uS(e,t=0){let r=Vi(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}cS=typeof atob!="function"||vM?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,s=0,o=0,i="";n=t.charAt(o++);~n&&(r=s%4?64*r+n:n,s++%4)?i+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i}:atob;const Y0="pb_auth";class yM{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!uS(this.token)}get isAdmin(){return Vi(this.token).type==="admin"}get isAuthRecord(){return Vi(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=Y0){const n=pM(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=Y0){var l,c;const n={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=Vi(this.token);n.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},n,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=H0(r,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(l=o==null?void 0:o.model)==null?void 0:l.id,email:(c=o==null?void 0:o.model)==null?void 0:c.email};const f=["collectionId","username","verified"];for(const d in this.model)f.includes(d)&&(o.model[d]=this.model[d]);i=H0(r,JSON.stringify(o),t)}return i}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.model),()=>{for(let n=this._onChangeCallbacks.length-1;n>=0;n--)if(this._onChangeCallbacks[n]==t)return delete this._onChangeCallbacks[n],void this._onChangeCallbacks.splice(n,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class wM extends yM{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 Jo{constructor(t){this.client=t}}class xM extends Jo{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then(()=>!0)}async testEmail(t,r,n){return n=Object.assign({method:"POST",body:{email:t,template:r}},n),this.client.send("/api/settings/test/email",n).then(()=>!0)}async generateAppleClientSecret(t,r,n,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:n,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Gg extends Jo{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let n=500;return(r=Object.assign({},t,r)).batch&&(n=r.batch,delete r.batch),this._getFullList(n,r)}async getList(t=1,r=30,n){return(n=Object.assign({method:"GET"},n)).query=Object.assign({page:t,perPage:r},n.query),this.client.send(this.baseCrudPath,n).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then(n=>{var s;if(!((s=n==null?void 0:n.items)!=null&&s.length))throw new Mr({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 Mr({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(n=>this.decode(n))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then(n=>this.decode(n))}async update(t,r,n){return n=Object.assign({method:"PATCH",body:r},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(s=>this.decode(s))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(()=>!0)}_getFullList(t=500,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let n=[],s=async o=>this.getList(o,t||500,r).then(i=>{const a=i.items;return n=n.concat(a),a.length==i.perPage?s(o+1):n});return s(1)}}function Tr(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 kh(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class _M extends Gg{get baseCrudPath(){return"/api/admins"}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i;return((o=this.client.authStore.model)==null?void 0:o.id)===s.id&&((i=this.client.authStore.model)==null?void 0:i.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}async delete(t,r){return super.delete(t,r).then(n=>{var s,o;return n&&((s=this.client.authStore.model)==null?void 0:s.id)===t&&((o=this.client.authStore.model)==null?void 0:o.collectionId)===void 0&&this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:r})}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};o=Tr("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,n,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||kh(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(c,f,d,h){kh(c);const p=c.beforeSend,w=c.authStore.model,m=c.authStore.onChange((x,g)=>{(!x||(g==null?void 0:g.id)!=(w==null?void 0:w.id)||(g!=null&&g.collectionId||w!=null&&w.collectionId)&&(g==null?void 0:g.collectionId)!=(w==null?void 0:w.collectionId))&&kh(c)});c._resetAutoRefresh=function(){m(),c.beforeSend=p,delete c._resetAutoRefresh},c.beforeSend=async(x,g)=>{var E;const v=c.authStore.token;if((E=g.query)!=null&&E.autoRefresh)return p?p(x,g):{url:x,sendOptions:g};let _=c.authStore.isValid;if(_&&uS(c.authStore.token,f))try{await d()}catch{_=!1}_||await h();const C=g.headers||{};for(let T in C)if(T.toLowerCase()=="authorization"&&v==C[T]&&c.authStore.token){C[T]=c.authStore.token;break}return g.headers=C,p?p(x,g):{url:x,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,r){let n={method:"POST"};return n=Tr("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=Tr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=Tr("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCrudPath+"/confirm-password-reset",i).then(()=>!0)}}const bM=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function dS(e){if(e){e.query=e.query||{};for(let t in e)bM.includes(t)||(e.query[t]=e[t],delete e[t])}}class fS extends Jo{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,r,n){var i;if(!t)throw new Error("topic must be set.");let s=t;if(n){dS(n);const a="options="+encodeURIComponent(JSON.stringify({query:n.query,headers:n.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const l=a;let c;try{c=JSON.parse(l==null?void 0:l.data)}catch{}r(c||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var n;let r=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(n=this.eventSource)==null||n.removeEventListener(o,i);delete this.subscriptions[o],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var n;let r=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){r=!0;for(let o of this.subscriptions[s])(n=this.eventSource)==null||n.removeEventListener(s,o);delete this.subscriptions[s]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){var o;let n=!1;const s=this.getSubscriptionsByTopic(t);for(let i in s){if(!Array.isArray(this.subscriptions[i])||!this.subscriptions[i].length)continue;let a=!1;for(let l=this.subscriptions[i].length-1;l>=0;l--)this.subscriptions[i][l]===r&&(a=!0,delete this.subscriptions[i][l],this.subscriptions[i].splice(l,1),(o=this.eventSource)==null||o.removeEventListener(i,r));a&&(this.subscriptions[i].length||delete this.subscriptions[i],n||this.hasSubscriptionListeners(i)||(n=!0))}this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var r,n;if(this.subscriptions=this.subscriptions||{},t)return!!((r=this.subscriptions[t])!=null&&r.length);for(let s in this.subscriptions)if((n=this.subscriptions[s])!=null&&n.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch(t=>{if(!(t!=null&&t.isAbort))throw t})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){const r={};t=t.includes("?")?t:t+"?";for(let n in this.subscriptions)(n+"?").startsWith(t)&&(r[n]=this.subscriptions[n]);return r}getNonEmptySubscriptionKeys(){const t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),this.pendingConnects.length>1||this.initConnect()})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",t=>{const r=t;this.clientId=r==null?void 0:r.lastEventId,this.submitSubscriptions().then(async()=>{let n=3;for(;this.hasUnsentSubscriptions()&&n>0;)n--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const n=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in n)for(let o of n[s])o(t)}).catch(n=>{this.clientId="",this.connectErrorHandler(n)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let n of this.pendingConnects)n.reject(new Mr(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 SM extends Gg{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,r,n){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,n)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);const n=Object.assign({},t,r);return super.getFullList(n)}async getList(t=1,r=30,n){return super.getList(t,r,n)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,n){return super.update(t,r,n).then(s=>{var o,i,a;return((o=this.client.authStore.model)==null?void 0:o.id)!==(s==null?void 0:s.id)||((i=this.client.authStore.model)==null?void 0:i.collectionId)!==this.collectionIdOrName&&((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,o,i;return!n||((s=this.client.authStore.model)==null?void 0:s.id)!==t||((o=this.client.authStore.model)==null?void 0:o.collectionId)!==this.collectionIdOrName&&((i=this.client.authStore.model)==null?void 0:i.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),n})}authResponse(t){const r=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,r),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(r=>Object.assign({},r,{usernamePassword:!!(r!=null&&r.usernamePassword),emailPassword:!!(r!=null&&r.emailPassword),authProviders:Array.isArray(r==null?void 0:r.authProviders)?r==null?void 0:r.authProviders:[]}))}async authWithPassword(t,r,n,s){let o={method:"POST",body:{identity:t,password:r}};return o=Tr("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,r,n,s,o,i,a){let l={method:"POST",body:{provider:t,code:r,codeVerifier:n,redirectUrl:s,createData:o}};return l=Tr("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,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",l).then(c=>this.authResponse(c))}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=Z0(void 0));const s=new fS(this.client);function o(){n==null||n.close(),s.unsubscribe()}const i={},a=r.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(l=>{var h;const c=l.authProviders.find(p=>p.name===r.provider);if(!c)throw new Mr(new Error(`Missing or invalid provider "${r.provider}".`));const f=this.client.buildUrl("/api/oauth2-redirect"),d=a?(h=this.client.cancelControllers)==null?void 0:h[a]:void 0;return d&&(d.signal.onabort=()=>{o()}),new Promise(async(p,w)=>{var m;try{await s.subscribe("@oauth2",async _=>{var E;const C=s.clientId;try{if(!_.state||C!==_.state)throw new Error("State parameters don't match.");if(_.error||!_.code)throw new Error("OAuth2 redirect error or missing code: "+_.error);const T=Object.assign({},r);delete T.provider,delete T.scopes,delete T.createData,delete T.urlCallback,(E=d==null?void 0:d.signal)!=null&&E.onabort&&(d.signal.onabort=null);const P=await this.authWithOAuth2Code(c.name,_.code,c.codeVerifier,f,r.createData,T);p(P)}catch(T){w(new Mr(T))}o()});const x={state:s.clientId};(m=r.scopes)!=null&&m.length&&(x.scope=r.scopes.join(" "));const g=this._replaceQueryParams(c.authUrl+f,x);await(r.urlCallback||function(_){n?n.location.href=_:n=Z0(_)})(g)}catch(x){o(),w(new Mr(x))}})}).catch(l=>{throw o(),l})}async authRefresh(t,r){let n={method:"POST"};return n=Tr("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=Tr("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,r,n,s,o){let i={method:"POST",body:{token:t,password:r,passwordConfirm:n}};return i=Tr("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",i,s,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",i).then(()=>!0)}async requestVerification(t,r,n){let s={method:"POST",body:{email:t}};return s=Tr("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=Tr("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=Vi(t),i=this.client.authStore.model;return i&&!i.verified&&i.id===o.id&&i.collectionId===o.collectionId&&(i.verified=!0,this.client.authStore.save(this.client.authStore.token,i)),!0})}async requestEmailChange(t,r,n){let s={method:"POST",body:{newEmail:t}};return s=Tr("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,r,n),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,r,n,s){let o={method:"POST",body:{token:t,password:r}};return o=Tr("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,n,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=Vi(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,r){return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",r)}async unlinkExternalAuth(t,r,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(r),n).then(()=>!0)}_replaceQueryParams(t,r={}){let n=t,s="";t.indexOf("?")>=0&&(n=t.substring(0,t.indexOf("?")),s=t.substring(t.indexOf("?")+1));const o={},i=s.split("&");for(const a of i){if(a=="")continue;const l=a.split("=");o[decodeURIComponent(l[0].replace(/\+/g," "))]=decodeURIComponent((l[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete o[a]:o[a]=r[a]);s="";for(let a in o)o.hasOwnProperty(a)&&(s!=""&&(s+="&"),s+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return s!=""?n+"?"+s:n}}function Z0(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Mr(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,n=window.innerWidth,s=window.innerHeight;t=t>n?n:t,r=r>s?s:r;let o=n/2-t/2,i=s/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+i+",left="+o+",resizable,menubar=no")}class kM extends Gg{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 CM extends Jo{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 Mr({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 EM extends Jo{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class TM extends Jo{getUrl(t,r,n={}){if(!r||!(t!=null&&t.id)||!(t!=null&&t.collectionId)&&!(t!=null&&t.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(t.collectionId||t.collectionName)),s.push(encodeURIComponent(t.id)),s.push(encodeURIComponent(r));let o=this.client.buildUrl(s.join("/"));if(Object.keys(n).length){n.download===!1&&delete n.download;const i=new URLSearchParams(n);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(r=>(r==null?void 0:r.token)||"")}}class RM extends Jo{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 NM{constructor(t="/",r,n="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=n,this.authStore=r||new wM,this.admins=new _M(this),this.collections=new kM(this),this.files=new TM(this),this.logs=new CM(this),this.settings=new xM(this),this.realtime=new fS(this),this.health=new EM(this),this.backups=new RM(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new SM(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,r){if(!r)return t;for(let n in r){let s=r[n];switch(typeof s){case"boolean":case"number":s=""+s;break;case"string":s="'"+s.replace(/'/g,"\\'")+"'";break;default:s=s===null?"null":s instanceof Date?"'"+s.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(s).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+n+"}",s)}return t}getFileUrl(t,r,n={}){return this.files.getUrl(t,r,n)}buildUrl(t){var n;let r=this.baseUrl;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=(n=window.location.origin)!=null&&n.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseUrl),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let n=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(n,r));s.url!==void 0||s.options!==void 0?(n=s.url||n,r=s.options||r):Object.keys(s).length&&(r=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){const s=this.serializeQueryParams(r.query);s&&(n+=(n.includes("?")?"&":"?")+s),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(n,r).then(async s=>{let o={};try{o=await s.json()}catch{}if(this.afterSend&&(o=await this.afterSend(s,o)),s.status>=400)throw new Mr({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Mr(s)})}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=this.convertToFormDataIfNeeded(r.body),dS(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||this.isFormData(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){const n=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(n);const s=new AbortController;this.cancelControllers[n]=s,r.signal=s.signal}return r}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const r=new FormData;for(const n in t){const s=t[n];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)r.append(n,i)}else{let o={};o[n]=s,r.append("@jsonPayload",JSON.stringify(o))}}return r}hasBlobField(t){for(const r in t){const n=Array.isArray(t[r])?t[r]:[t[r]];for(const s of n)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let n in t)if(n.toLowerCase()==r)return t[n];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const r=[];for(const n in t){if(t[n]===null)continue;const s=t[n],o=encodeURIComponent(n);if(Array.isArray(s))for(const i of s)r.push(o+"="+encodeURIComponent(i));else s instanceof Date?r.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?r.push(o+"="+encodeURIComponent(JSON.stringify(s))):r.push(o+"="+encodeURIComponent(s))}return r.join("&")}}var PM={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const jM=PM.VITE_API_DOMAIN;console.log(jM);let ru;const Dt=()=>ru||(ru=new NM("/"),ru);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var hS;function me(){return hS.apply(null,arguments)}function DM(e){hS=e}function gn(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Ao(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function at(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Kg(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(at(e,t))return!1;return!0}function yr(e){return e===void 0}function gs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function hc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function pS(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function Vs(e,t){for(var r in t)at(t,r)&&(e[r]=t[r]);return at(t,"toString")&&(e.toString=t.toString),at(t,"valueOf")&&(e.valueOf=t.valueOf),e}function zn(e,t,r,n){return LS(e,t,r,n,!0).utc()}function OM(){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 $e(e){return e._pf==null&&(e._pf=OM()),e._pf}var Vp;Array.prototype.some?Vp=Array.prototype.some:Vp=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 qg(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=$e(e),r=Vp.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 ff(e){var t=zn(NaN);return e!=null?Vs($e(t),e):$e(t).userInvalidated=!0,t}var G0=me.momentProperties=[],Ch=!1;function Xg(e,t){var r,n,s,o=G0.length;if(yr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),yr(t._i)||(e._i=t._i),yr(t._f)||(e._f=t._f),yr(t._l)||(e._l=t._l),yr(t._strict)||(e._strict=t._strict),yr(t._tzm)||(e._tzm=t._tzm),yr(t._isUTC)||(e._isUTC=t._isUTC),yr(t._offset)||(e._offset=t._offset),yr(t._pf)||(e._pf=$e(t)),yr(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)n=G0[r],s=t[n],yr(s)||(e[n]=s);return e}function pc(e){Xg(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ch===!1&&(Ch=!0,me.updateOffset(this),Ch=!1)}function vn(e){return e instanceof pc||e!=null&&e._isAMomentObject!=null}function mS(e){me.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Qr(e,t){var r=!0;return Vs(function(){if(me.deprecationHandler!=null&&me.deprecationHandler(null,e),r){var n=[],s,o,i,a=arguments.length;for(o=0;o<a;o++){if(s="",typeof arguments[o]=="object"){s+=`
[`+o+"] ";for(i in arguments[0])at(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];n.push(s)}mS(e+`
Arguments: `+Array.prototype.slice.call(n).join("")+`
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var K0={};function gS(e,t){me.deprecationHandler!=null&&me.deprecationHandler(e,t),K0[e]||(mS(t),K0[e]=!0)}me.suppressDeprecationWarnings=!1;me.deprecationHandler=null;function Un(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function AM(e){var t,r;for(r in e)at(e,r)&&(t=e[r],Un(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 Wp(e,t){var r=Vs({},e),n;for(n in t)at(t,n)&&(Ao(e[n])&&Ao(t[n])?(r[n]={},Vs(r[n],e[n]),Vs(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)at(e,n)&&!at(t,n)&&Ao(e[n])&&(r[n]=Vs({},r[n]));return r}function Qg(e){e!=null&&this.set(e)}var $p;Object.keys?$p=Object.keys:$p=function(e){var t,r=[];for(t in e)at(e,t)&&r.push(t);return r};var MM={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function IM(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Un(n)?n.call(t,r):n}function In(e,t,r){var n=""+Math.abs(e),s=t-n.length,o=e>=0;return(o?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var Jg=/(\[[^\[]*\])|(\\)?([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,nu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Eh={},Wi={};function Re(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Wi[e]=s),t&&(Wi[t[0]]=function(){return In(s.apply(this,arguments),t[1],t[2])}),r&&(Wi[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function LM(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function FM(e){var t=e.match(Jg),r,n;for(r=0,n=t.length;r<n;r++)Wi[t[r]]?t[r]=Wi[t[r]]:t[r]=LM(t[r]);return function(s){var o="",i;for(i=0;i<n;i++)o+=Un(t[i])?t[i].call(s,e):t[i];return o}}function ku(e,t){return e.isValid()?(t=vS(t,e.localeData()),Eh[t]=Eh[t]||FM(t),Eh[t](e)):e.localeData().invalidDate()}function vS(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(nu.lastIndex=0;r>=0&&nu.test(e);)e=e.replace(nu,n),nu.lastIndex=0,r-=1;return e}var zM={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 UM(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(Jg).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var VM="Invalid date";function WM(){return this._invalidDate}var $M="%d",BM=/\d{1,2}/;function HM(e){return this._ordinal.replace("%d",e)}var YM={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 ZM(e,t,r,n){var s=this._relativeTime[r];return Un(s)?s(e,t,r,n):s.replace(/%d/i,e)}function GM(e,t){var r=this._relativeTime[e>0?"future":"past"];return Un(r)?r(t):r.replace(/%s/i,t)}var q0={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 Jr(e){return typeof e=="string"?q0[e]||q0[e.toLowerCase()]:void 0}function ev(e){var t={},r,n;for(n in e)at(e,n)&&(r=Jr(n),r&&(t[r]=e[n]));return t}var KM={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 qM(e){var t=[],r;for(r in e)at(e,r)&&t.push({unit:r,priority:KM[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var yS=/\d/,Ur=/\d\d/,wS=/\d{3}/,tv=/\d{4}/,hf=/[+-]?\d{6}/,St=/\d\d?/,xS=/\d\d\d\d?/,_S=/\d\d\d\d\d\d?/,pf=/\d{1,3}/,rv=/\d{1,4}/,mf=/[+-]?\d{1,6}/,ga=/\d+/,gf=/[+-]?\d+/,XM=/Z|[+-]\d\d:?\d\d/gi,vf=/Z|[+-]\d\d(?::?\d\d)?/gi,QM=/[+-]?\d+(\.\d{1,3})?/,mc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,va=/^[1-9]\d?/,nv=/^([1-9]\d|\d)/,hd;hd={};function we(e,t,r){hd[e]=Un(t)?t:function(n,s){return n&&r?r:t}}function JM(e,t){return at(hd,e)?hd[e](t._strict,t._locale):new RegExp(eI(e))}function eI(e){return as(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,o){return r||n||s||o}))}function as(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Hr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function tt(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Hr(t)),r}var Bp={};function pt(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),gs(t)&&(n=function(o,i){i[t]=tt(o)}),s=e.length,r=0;r<s;r++)Bp[e[r]]=n}function gc(e,t){pt(e,function(r,n,s,o){s._w=s._w||{},t(r,s._w,s,o)})}function tI(e,t,r){t!=null&&at(Bp,e)&&Bp[e](t,r._a,r,e)}function yf(e){return e%4===0&&e%100!==0||e%400===0}var ar=0,ns=1,Tn=2,Gt=3,ln=4,ss=5,Po=6,rI=7,nI=8;Re("Y",0,0,function(){var e=this.year();return e<=9999?In(e,4):"+"+e});Re(0,["YY",2],0,function(){return this.year()%100});Re(0,["YYYY",4],0,"year");Re(0,["YYYYY",5],0,"year");Re(0,["YYYYYY",6,!0],0,"year");we("Y",gf);we("YY",St,Ur);we("YYYY",rv,tv);we("YYYYY",mf,hf);we("YYYYYY",mf,hf);pt(["YYYYY","YYYYYY"],ar);pt("YYYY",function(e,t){t[ar]=e.length===2?me.parseTwoDigitYear(e):tt(e)});pt("YY",function(e,t){t[ar]=me.parseTwoDigitYear(e)});pt("Y",function(e,t){t[ar]=parseInt(e,10)});function tl(e){return yf(e)?366:365}me.parseTwoDigitYear=function(e){return tt(e)+(tt(e)>68?1900:2e3)};var bS=ya("FullYear",!0);function sI(){return yf(this.year())}function ya(e,t){return function(r){return r!=null?(SS(this,e,r),me.updateOffset(this,t),this):Al(this,e)}}function Al(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 SS(e,t,r){var n,s,o,i,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}o=r,i=e.month(),a=e.date(),a=a===29&&i===1&&!yf(o)?28:a,s?n.setUTCFullYear(o,i,a):n.setFullYear(o,i,a)}}function oI(e){return e=Jr(e),Un(this[e])?this[e]():this}function iI(e,t){if(typeof e=="object"){e=ev(e);var r=qM(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=Jr(e),Un(this[e]))return this[e](t);return this}function aI(e,t){return(e%t+t)%t}var Ft;Array.prototype.indexOf?Ft=Array.prototype.indexOf:Ft=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function sv(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=aI(t,12);return e+=(t-r)/12,r===1?yf(e)?29:28:31-r%7%2}Re("M",["MM",2],"Mo",function(){return this.month()+1});Re("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Re("MMMM",0,0,function(e){return this.localeData().months(this,e)});we("M",St,va);we("MM",St,Ur);we("MMM",function(e,t){return t.monthsShortRegex(e)});we("MMMM",function(e,t){return t.monthsRegex(e)});pt(["M","MM"],function(e,t){t[ns]=tt(e)-1});pt(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[ns]=s:$e(r).invalidMonth=e});var lI="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),kS="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),CS=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,cI=mc,uI=mc;function dI(e,t){return e?gn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||CS).test(t)?"format":"standalone"][e.month()]:gn(this._months)?this._months:this._months.standalone}function fI(e,t){return e?gn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[CS.test(t)?"format":"standalone"][e.month()]:gn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function hI(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=zn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?t==="MMM"?(s=Ft.call(this._shortMonthsParse,i),s!==-1?s:null):(s=Ft.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=Ft.call(this._shortMonthsParse,i),s!==-1?s:(s=Ft.call(this._longMonthsParse,i),s!==-1?s:null)):(s=Ft.call(this._longMonthsParse,i),s!==-1?s:(s=Ft.call(this._shortMonthsParse,i),s!==-1?s:null))}function pI(e,t,r){var n,s,o;if(this._monthsParseExact)return hI.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=zn([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function ES(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=tt(t);else if(t=e.localeData().monthsParse(t),!gs(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,sv(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function TS(e){return e!=null?(ES(this,e),me.updateOffset(this,!0),this):Al(this,"Month")}function mI(){return sv(this.year(),this.month())}function gI(e){return this._monthsParseExact?(at(this,"_monthsRegex")||RS.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(at(this,"_monthsShortRegex")||(this._monthsShortRegex=cI),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function vI(e){return this._monthsParseExact?(at(this,"_monthsRegex")||RS.call(this),e?this._monthsStrictRegex:this._monthsRegex):(at(this,"_monthsRegex")||(this._monthsRegex=uI),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function RS(){function e(l,c){return c.length-l.length}var t=[],r=[],n=[],s,o,i,a;for(s=0;s<12;s++)o=zn([2e3,s]),i=as(this.monthsShort(o,"")),a=as(this.months(o,"")),t.push(i),r.push(a),n.push(a),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function yI(e,t,r,n,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,s,o,i),a}function Ml(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function pd(e,t,r){var n=7+t-r,s=(7+Ml(e,0,n).getUTCDay()-t)%7;return-s+n-1}function NS(e,t,r,n,s){var o=(7+r-n)%7,i=pd(e,n,s),a=1+7*(t-1)+o+i,l,c;return a<=0?(l=e-1,c=tl(l)+a):a>tl(e)?(l=e+1,c=a-tl(e)):(l=e,c=a),{year:l,dayOfYear:c}}function Il(e,t,r){var n=pd(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+ls(i,t,r)):s>ls(e.year(),t,r)?(o=s-ls(e.year(),t,r),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function ls(e,t,r){var n=pd(e,t,r),s=pd(e+1,t,r);return(tl(e)-n+s)/7}Re("w",["ww",2],"wo","week");Re("W",["WW",2],"Wo","isoWeek");we("w",St,va);we("ww",St,Ur);we("W",St,va);we("WW",St,Ur);gc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=tt(e)});function wI(e){return Il(e,this._week.dow,this._week.doy).week}var xI={dow:0,doy:6};function _I(){return this._week.dow}function bI(){return this._week.doy}function SI(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function kI(e){var t=Il(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Re("d",0,"do","day");Re("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Re("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Re("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Re("e",0,0,"weekday");Re("E",0,0,"isoWeekday");we("d",St);we("e",St);we("E",St);we("dd",function(e,t){return t.weekdaysMinRegex(e)});we("ddd",function(e,t){return t.weekdaysShortRegex(e)});we("dddd",function(e,t){return t.weekdaysRegex(e)});gc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:$e(r).invalidWeekday=e});gc(["d","e","E"],function(e,t,r,n){t[n]=tt(e)});function CI(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function EI(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ov(e,t){return e.slice(t,7).concat(e.slice(0,t))}var TI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),PS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),RI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),NI=mc,PI=mc,jI=mc;function DI(e,t){var r=gn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ov(r,this._week.dow):e?r[e.day()]:r}function OI(e){return e===!0?ov(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function AI(e){return e===!0?ov(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function MI(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=zn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?t==="dddd"?(s=Ft.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=Ft.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=Ft.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=Ft.call(this._weekdaysParse,i),s!==-1||(s=Ft.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=Ft.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=Ft.call(this._shortWeekdaysParse,i),s!==-1||(s=Ft.call(this._weekdaysParse,i),s!==-1)?s:(s=Ft.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=Ft.call(this._minWeekdaysParse,i),s!==-1||(s=Ft.call(this._weekdaysParse,i),s!==-1)?s:(s=Ft.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function II(e,t,r){var n,s,o;if(this._weekdaysParseExact)return MI.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=zn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function LI(e){if(!this.isValid())return e!=null?this:NaN;var t=Al(this,"Day");return e!=null?(e=CI(e,this.localeData()),this.add(e-t,"d")):t}function FI(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 zI(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=EI(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function UI(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||iv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(at(this,"_weekdaysRegex")||(this._weekdaysRegex=NI),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function VI(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||iv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(at(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=PI),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function WI(e){return this._weekdaysParseExact?(at(this,"_weekdaysRegex")||iv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(at(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jI),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function iv(){function e(f,d){return d.length-f.length}var t=[],r=[],n=[],s=[],o,i,a,l,c;for(o=0;o<7;o++)i=zn([2e3,1]).day(o),a=as(this.weekdaysMin(i,"")),l=as(this.weekdaysShort(i,"")),c=as(this.weekdays(i,"")),t.push(a),r.push(l),n.push(c),s.push(a),s.push(l),s.push(c);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 av(){return this.hours()%12||12}function $I(){return this.hours()||24}Re("H",["HH",2],0,"hour");Re("h",["hh",2],0,av);Re("k",["kk",2],0,$I);Re("hmm",0,0,function(){return""+av.apply(this)+In(this.minutes(),2)});Re("hmmss",0,0,function(){return""+av.apply(this)+In(this.minutes(),2)+In(this.seconds(),2)});Re("Hmm",0,0,function(){return""+this.hours()+In(this.minutes(),2)});Re("Hmmss",0,0,function(){return""+this.hours()+In(this.minutes(),2)+In(this.seconds(),2)});function jS(e,t){Re(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}jS("a",!0);jS("A",!1);function DS(e,t){return t._meridiemParse}we("a",DS);we("A",DS);we("H",St,nv);we("h",St,va);we("k",St,va);we("HH",St,Ur);we("hh",St,Ur);we("kk",St,Ur);we("hmm",xS);we("hmmss",_S);we("Hmm",xS);we("Hmmss",_S);pt(["H","HH"],Gt);pt(["k","kk"],function(e,t,r){var n=tt(e);t[Gt]=n===24?0:n});pt(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});pt(["h","hh"],function(e,t,r){t[Gt]=tt(e),$e(r).bigHour=!0});pt("hmm",function(e,t,r){var n=e.length-2;t[Gt]=tt(e.substr(0,n)),t[ln]=tt(e.substr(n)),$e(r).bigHour=!0});pt("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=tt(e.substr(0,n)),t[ln]=tt(e.substr(n,2)),t[ss]=tt(e.substr(s)),$e(r).bigHour=!0});pt("Hmm",function(e,t,r){var n=e.length-2;t[Gt]=tt(e.substr(0,n)),t[ln]=tt(e.substr(n))});pt("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Gt]=tt(e.substr(0,n)),t[ln]=tt(e.substr(n,2)),t[ss]=tt(e.substr(s))});function BI(e){return(e+"").toLowerCase().charAt(0)==="p"}var HI=/[ap]\.?m?\.?/i,YI=ya("Hours",!0);function ZI(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var OS={calendar:MM,longDateFormat:zM,invalidDate:VM,ordinal:$M,dayOfMonthOrdinalParse:BM,relativeTime:YM,months:lI,monthsShort:kS,week:xI,weekdays:TI,weekdaysMin:RI,weekdaysShort:PS,meridiemParse:HI},Et={},Aa={},Ll;function GI(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 X0(e){return e&&e.toLowerCase().replace("_","-")}function KI(e){for(var t=0,r,n,s,o;t<e.length;){for(o=X0(e[t]).split("-"),r=o.length,n=X0(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=wf(o.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&GI(o,n)>=r-1)break;r--}t++}return Ll}function qI(e){return!!(e&&e.match("^[^/\\\\]*$"))}function wf(e){var t=null,r;if(Et[e]===void 0&&typeof Ou<"u"&&Ou&&Ou.exports&&qI(e))try{t=Ll._abbr,r=require,r("./locale/"+e),Qs(t)}catch{Et[e]=null}return Et[e]}function Qs(e,t){var r;return e&&(yr(t)?r=ks(e):r=lv(e,t),r?Ll=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ll._abbr}function lv(e,t){if(t!==null){var r,n=OS;if(t.abbr=e,Et[e]!=null)gS("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=Et[e]._config;else if(t.parentLocale!=null)if(Et[t.parentLocale]!=null)n=Et[t.parentLocale]._config;else if(r=wf(t.parentLocale),r!=null)n=r._config;else return Aa[t.parentLocale]||(Aa[t.parentLocale]=[]),Aa[t.parentLocale].push({name:e,config:t}),null;return Et[e]=new Qg(Wp(n,t)),Aa[e]&&Aa[e].forEach(function(s){lv(s.name,s.config)}),Qs(e),Et[e]}else return delete Et[e],null}function XI(e,t){if(t!=null){var r,n,s=OS;Et[e]!=null&&Et[e].parentLocale!=null?Et[e].set(Wp(Et[e]._config,t)):(n=wf(e),n!=null&&(s=n._config),t=Wp(s,t),n==null&&(t.abbr=e),r=new Qg(t),r.parentLocale=Et[e],Et[e]=r),Qs(e)}else Et[e]!=null&&(Et[e].parentLocale!=null?(Et[e]=Et[e].parentLocale,e===Qs()&&Qs(e)):Et[e]!=null&&delete Et[e]);return Et[e]}function ks(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ll;if(!gn(e)){if(t=wf(e),t)return t;e=[e]}return KI(e)}function QI(){return $p(Et)}function cv(e){var t,r=e._a;return r&&$e(e).overflow===-2&&(t=r[ns]<0||r[ns]>11?ns:r[Tn]<1||r[Tn]>sv(r[ar],r[ns])?Tn:r[Gt]<0||r[Gt]>24||r[Gt]===24&&(r[ln]!==0||r[ss]!==0||r[Po]!==0)?Gt:r[ln]<0||r[ln]>59?ln:r[ss]<0||r[ss]>59?ss:r[Po]<0||r[Po]>999?Po:-1,$e(e)._overflowDayOfYear&&(t<ar||t>Tn)&&(t=Tn),$e(e)._overflowWeeks&&t===-1&&(t=rI),$e(e)._overflowWeekday&&t===-1&&(t=nI),$e(e).overflow=t),e}var JI=/^\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)?)?$/,eL=/^\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)?)?$/,tL=/Z|[+-]\d\d(?::?\d\d)?/,su=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Th=[["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/]],rL=/^\/?Date\((-?\d+)/i,nL=/^(?:(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}))$/,sL={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 AS(e){var t,r,n=e._i,s=JI.exec(n)||eL.exec(n),o,i,a,l,c=su.length,f=Th.length;if(s){for($e(e).iso=!0,t=0,r=c;t<r;t++)if(su[t][1].exec(s[1])){i=su[t][0],o=su[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=f;t<r;t++)if(Th[t][1].exec(s[3])){a=(s[2]||" ")+Th[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(tL.exec(s[4]))l="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(l||""),dv(e)}else e._isValid=!1}function oL(e,t,r,n,s,o){var i=[iL(e),kS.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function iL(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function aL(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function lL(e,t,r){if(e){var n=PS.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return $e(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function cL(e,t,r){if(e)return sL[e];if(t)return 0;var n=parseInt(r,10),s=n%100,o=(n-s)/100;return o*60+s}function MS(e){var t=nL.exec(aL(e._i)),r;if(t){if(r=oL(t[4],t[3],t[2],t[5],t[6],t[7]),!lL(t[1],r,e))return;e._a=r,e._tzm=cL(t[8],t[9],t[10]),e._d=Ml.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),$e(e).rfc2822=!0}else e._isValid=!1}function uL(e){var t=rL.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(AS(e),e._isValid===!1)delete e._isValid;else return;if(MS(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:me.createFromInputFallback(e)}me.createFromInputFallback=Qr("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 pi(e,t,r){return e??t??r}function dL(e){var t=new Date(me.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function uv(e){var t,r,n=[],s,o,i;if(!e._d){for(s=dL(e),e._w&&e._a[Tn]==null&&e._a[ns]==null&&fL(e),e._dayOfYear!=null&&(i=pi(e._a[ar],s[ar]),(e._dayOfYear>tl(i)||e._dayOfYear===0)&&($e(e)._overflowDayOfYear=!0),r=Ml(i,0,e._dayOfYear),e._a[ns]=r.getUTCMonth(),e._a[Tn]=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[ln]===0&&e._a[ss]===0&&e._a[Po]===0&&(e._nextDay=!0,e._a[Gt]=0),e._d=(e._useUTC?Ml:yI).apply(null,n),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Gt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&($e(e).weekdayMismatch=!0)}}function fL(e){var t,r,n,s,o,i,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,r=pi(t.GG,e._a[ar],Il(bt(),1,4).year),n=pi(t.W,1),s=pi(t.E,1),(s<1||s>7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,c=Il(bt(),o,i),r=pi(t.gg,e._a[ar],c.year),n=pi(t.w,c.week),t.d!=null?(s=t.d,(s<0||s>6)&&(l=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(l=!0)):s=o),n<1||n>ls(r,o,i)?$e(e)._overflowWeeks=!0:l!=null?$e(e)._overflowWeekday=!0:(a=NS(r,n,s,o,i),e._a[ar]=a.year,e._dayOfYear=a.dayOfYear)}me.ISO_8601=function(){};me.RFC_2822=function(){};function dv(e){if(e._f===me.ISO_8601){AS(e);return}if(e._f===me.RFC_2822){MS(e);return}e._a=[],$e(e).empty=!0;var t=""+e._i,r,n,s,o,i,a=t.length,l=0,c,f;for(s=vS(e._f,e._locale).match(Jg)||[],f=s.length,r=0;r<f;r++)o=s[r],n=(t.match(JM(o,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&$e(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),l+=n.length),Wi[o]?(n?$e(e).empty=!1:$e(e).unusedTokens.push(o),tI(o,n,e)):e._strict&&!n&&$e(e).unusedTokens.push(o);$e(e).charsLeftOver=a-l,t.length>0&&$e(e).unusedInput.push(t),e._a[Gt]<=12&&$e(e).bigHour===!0&&e._a[Gt]>0&&($e(e).bigHour=void 0),$e(e).parsedDateParts=e._a.slice(0),$e(e).meridiem=e._meridiem,e._a[Gt]=hL(e._locale,e._a[Gt],e._meridiem),c=$e(e).era,c!==null&&(e._a[ar]=e._locale.erasConvertYear(c,e._a[ar])),uv(e),cv(e)}function hL(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 pL(e){var t,r,n,s,o,i,a=!1,l=e._f.length;if(l===0){$e(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<l;s++)o=0,i=!1,t=Xg({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],dv(t),qg(t)&&(i=!0),o+=$e(t).charsLeftOver,o+=$e(t).unusedTokens.length*10,$e(t).score=o,a?o<n&&(n=o,r=t):(n==null||o<n||i)&&(n=o,r=t,i&&(a=!0));Vs(e,r||t)}function mL(e){if(!e._d){var t=ev(e._i),r=t.day===void 0?t.date:t.day;e._a=pS([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),uv(e)}}function gL(e){var t=new pc(cv(IS(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function IS(e){var t=e._i,r=e._f;return e._locale=e._locale||ks(e._l),t===null||r===void 0&&t===""?ff({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),vn(t)?new pc(cv(t)):(hc(t)?e._d=t:gn(r)?pL(e):r?dv(e):vL(e),qg(e)||(e._d=null),e))}function vL(e){var t=e._i;yr(t)?e._d=new Date(me.now()):hc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?uL(e):gn(t)?(e._a=pS(t.slice(0),function(r){return parseInt(r,10)}),uv(e)):Ao(t)?mL(e):gs(t)?e._d=new Date(t):me.createFromInputFallback(e)}function LS(e,t,r,n,s){var o={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Ao(e)&&Kg(e)||gn(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=r,o._i=e,o._f=t,o._strict=n,gL(o)}function bt(e,t,r,n){return LS(e,t,r,n,!1)}var yL=Qr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:ff()}),wL=Qr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:ff()});function FS(e,t){var r,n;if(t.length===1&&gn(t[0])&&(t=t[0]),!t.length)return bt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function xL(){var e=[].slice.call(arguments,0);return FS("isBefore",e)}function _L(){var e=[].slice.call(arguments,0);return FS("isAfter",e)}var bL=function(){return Date.now?Date.now():+new Date},Ma=["year","quarter","month","week","day","hour","minute","second","millisecond"];function SL(e){var t,r=!1,n,s=Ma.length;for(t in e)if(at(e,t)&&!(Ft.call(Ma,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Ma[n]]){if(r)return!1;parseFloat(e[Ma[n]])!==tt(e[Ma[n]])&&(r=!0)}return!0}function kL(){return this._isValid}function CL(){return xn(NaN)}function xf(e){var t=ev(e),r=t.year||0,n=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,f=t.millisecond||0;this._isValid=SL(t),this._milliseconds=+f+c*1e3+l*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+n*3+r*12,this._data={},this._locale=ks(),this._bubble()}function Cu(e){return e instanceof xf}function Hp(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function EL(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<n;i++)tt(e[i])!==tt(t[i])&&o++;return o+s}function zS(e,t){Re(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+In(~~(r/60),2)+t+In(~~r%60,2)})}zS("Z",":");zS("ZZ","");we("Z",vf);we("ZZ",vf);pt(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=fv(vf,e)});var TL=/([\+\-]|\d\d)/gi;function fv(e,t){var r=(t||"").match(e),n,s,o;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(TL)||["-",0,0],o=+(s[1]*60)+tt(s[2]),o===0?0:s[0]==="+"?o:-o)}function hv(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(vn(e)||hc(e)?e.valueOf():bt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),me.updateOffset(r,!1),r):bt(e).local()}function Yp(e){return-Math.round(e._d.getTimezoneOffset())}me.updateOffset=function(){};function RL(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=fv(vf,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Yp(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?WS(this,xn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,me.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Yp(this)}function NL(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function PL(e){return this.utcOffset(0,e)}function jL(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Yp(this),"m")),this}function DL(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=fv(XM,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function OL(e){return this.isValid()?(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function AL(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ML(){if(!yr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Xg(e,this),e=IS(e),e._a?(t=e._isUTC?zn(e._a):bt(e._a),this._isDSTShifted=this.isValid()&&EL(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function IL(){return this.isValid()?!this._isUTC:!1}function LL(){return this.isValid()?this._isUTC:!1}function US(){return this.isValid()?this._isUTC&&this._offset===0:!1}var FL=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zL=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xn(e,t){var r=e,n=null,s,o,i;return Cu(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:gs(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=FL.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:tt(n[Tn])*s,h:tt(n[Gt])*s,m:tt(n[ln])*s,s:tt(n[ss])*s,ms:tt(Hp(n[Po]*1e3))*s}):(n=zL.exec(e))?(s=n[1]==="-"?-1:1,r={y:xo(n[2],s),M:xo(n[3],s),w:xo(n[4],s),d:xo(n[5],s),h:xo(n[6],s),m:xo(n[7],s),s:xo(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=UL(bt(r.from),bt(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),o=new xf(r),Cu(e)&&at(e,"_locale")&&(o._locale=e._locale),Cu(e)&&at(e,"_isValid")&&(o._isValid=e._isValid),o}xn.fn=xf.prototype;xn.invalid=CL;function xo(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Q0(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 UL(e,t){var r;return e.isValid()&&t.isValid()?(t=hv(t,e),e.isBefore(t)?r=Q0(e,t):(r=Q0(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function VS(e,t){return function(r,n){var s,o;return n!==null&&!isNaN(+n)&&(gS(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),s=xn(r,n),WS(this,s,e),this}}function WS(e,t,r,n){var s=t._milliseconds,o=Hp(t._days),i=Hp(t._months);e.isValid()&&(n=n??!0,i&&ES(e,Al(e,"Month")+i*r),o&&SS(e,"Date",Al(e,"Date")+o*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&me.updateOffset(e,o||i))}var VL=VS(1,"add"),WL=VS(-1,"subtract");function $S(e){return typeof e=="string"||e instanceof String}function $L(e){return vn(e)||hc(e)||$S(e)||gs(e)||HL(e)||BL(e)||e===null||e===void 0}function BL(e){var t=Ao(e)&&!Kg(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=n.length;for(s=0;s<i;s+=1)o=n[s],r=r||at(e,o);return t&&r}function HL(e){var t=gn(e),r=!1;return t&&(r=e.filter(function(n){return!gs(n)&&$S(e)}).length===0),t&&r}function YL(e){var t=Ao(e)&&!Kg(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<n.length;s+=1)o=n[s],r=r||at(e,o);return t&&r}function ZL(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 GL(e,t){arguments.length===1&&(arguments[0]?$L(arguments[0])?(e=arguments[0],t=void 0):YL(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||bt(),n=hv(r,this).startOf("day"),s=me.calendarFormat(this,n)||"sameElse",o=t&&(Un(t[s])?t[s].call(this,r):t[s]);return this.format(o||this.localeData().calendar(s,this,bt(r)))}function KL(){return new pc(this)}function qL(e,t){var r=vn(e)?e:bt(e);return this.isValid()&&r.isValid()?(t=Jr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function XL(e,t){var r=vn(e)?e:bt(e);return this.isValid()&&r.isValid()?(t=Jr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function QL(e,t,r,n){var s=vn(e)?e:bt(e),o=vn(t)?t:bt(t);return this.isValid()&&s.isValid()&&o.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(o,r):!this.isAfter(o,r))):!1}function JL(e,t){var r=vn(e)?e:bt(e),n;return this.isValid()&&r.isValid()?(t=Jr(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 eF(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function tF(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function rF(e,t,r){var n,s,o;if(!this.isValid())return NaN;if(n=hv(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=Jr(t),t){case"year":o=Eu(this,n)/12;break;case"month":o=Eu(this,n);break;case"quarter":o=Eu(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-s)/864e5;break;case"week":o=(this-n-s)/6048e5;break;default:o=this-n}return r?o:Hr(o)}function Eu(e,t){if(e.date()<t.date())return-Eu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,o;return t-n<0?(s=e.clone().add(r-1,"months"),o=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),o=(t-n)/(s-n)),-(r+o)||0}me.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";me.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function nF(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function sF(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?ku(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Un(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ku(r,"Z")):ku(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function oF(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(r+n+s+o)}function iF(e){e||(e=this.isUtc()?me.defaultFormatUtc:me.defaultFormat);var t=ku(this,e);return this.localeData().postformat(t)}function aF(e,t){return this.isValid()&&(vn(e)&&e.isValid()||bt(e).isValid())?xn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function lF(e){return this.from(bt(),e)}function cF(e,t){return this.isValid()&&(vn(e)&&e.isValid()||bt(e).isValid())?xn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function uF(e){return this.to(bt(),e)}function BS(e){var t;return e===void 0?this._locale._abbr:(t=ks(e),t!=null&&(this._locale=t),this)}var HS=Qr("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 YS(){return this._locale}var md=1e3,$i=60*md,gd=60*$i,ZS=(365*400+97)*24*gd;function Bi(e,t){return(e%t+t)%t}function GS(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-ZS:new Date(e,t,r).valueOf()}function KS(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-ZS:Date.UTC(e,t,r)}function dF(e){var t,r;if(e=Jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?KS:GS,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-=Bi(t+(this._isUTC?0:this.utcOffset()*$i),gd);break;case"minute":t=this._d.valueOf(),t-=Bi(t,$i);break;case"second":t=this._d.valueOf(),t-=Bi(t,md);break}return this._d.setTime(t),me.updateOffset(this,!0),this}function fF(e){var t,r;if(e=Jr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?KS:GS,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+=gd-Bi(t+(this._isUTC?0:this.utcOffset()*$i),gd)-1;break;case"minute":t=this._d.valueOf(),t+=$i-Bi(t,$i)-1;break;case"second":t=this._d.valueOf(),t+=md-Bi(t,md)-1;break}return this._d.setTime(t),me.updateOffset(this,!0),this}function hF(){return this._d.valueOf()-(this._offset||0)*6e4}function pF(){return Math.floor(this.valueOf()/1e3)}function mF(){return new Date(this.valueOf())}function gF(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function vF(){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 yF(){return this.isValid()?this.toISOString():null}function wF(){return qg(this)}function xF(){return Vs({},$e(this))}function _F(){return $e(this).overflow}function bF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Re("N",0,0,"eraAbbr");Re("NN",0,0,"eraAbbr");Re("NNN",0,0,"eraAbbr");Re("NNNN",0,0,"eraName");Re("NNNNN",0,0,"eraNarrow");Re("y",["y",1],"yo","eraYear");Re("y",["yy",2],0,"eraYear");Re("y",["yyy",3],0,"eraYear");Re("y",["yyyy",4],0,"eraYear");we("N",pv);we("NN",pv);we("NNN",pv);we("NNNN",OF);we("NNNNN",AF);pt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?$e(r).era=s:$e(r).invalidEra=e});we("y",ga);we("yy",ga);we("yyy",ga);we("yyyy",ga);we("yo",MF);pt(["y","yy","yyy","yyyy"],ar);pt(["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 SF(e,t){var r,n,s,o=this._eras||ks("en")._eras;for(r=0,n=o.length;r<n;++r){switch(typeof o[r].since){case"string":s=me(o[r].since).startOf("day"),o[r].since=s.valueOf();break}switch(typeof o[r].until){case"undefined":o[r].until=1/0;break;case"string":s=me(o[r].until).startOf("day").valueOf(),o[r].until=s.valueOf();break}}return o}function kF(e,t,r){var n,s,o=this.eras(),i,a,l;for(e=e.toUpperCase(),n=0,s=o.length;n<s;++n)if(i=o[n].name.toUpperCase(),a=o[n].abbr.toUpperCase(),l=o[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[n];break;case"NNNN":if(i===e)return o[n];break;case"NNNNN":if(l===e)return o[n];break}else if([i,a,l].indexOf(e)>=0)return o[n]}function CF(e,t){var r=e.since<=e.until?1:-1;return t===void 0?me(e.since).year():me(e.since).year()+(t-e.offset)*r}function EF(){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 TF(){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 RF(){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 NF(){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()-me(s[e].since).year())*r+s[e].offset;return this.year()}function PF(e){return at(this,"_erasNameRegex")||mv.call(this),e?this._erasNameRegex:this._erasRegex}function jF(e){return at(this,"_erasAbbrRegex")||mv.call(this),e?this._erasAbbrRegex:this._erasRegex}function DF(e){return at(this,"_erasNarrowRegex")||mv.call(this),e?this._erasNarrowRegex:this._erasRegex}function pv(e,t){return t.erasAbbrRegex(e)}function OF(e,t){return t.erasNameRegex(e)}function AF(e,t){return t.erasNarrowRegex(e)}function MF(e,t){return t._eraYearOrdinalRegex||ga}function mv(){var e=[],t=[],r=[],n=[],s,o,i,a,l,c=this.eras();for(s=0,o=c.length;s<o;++s)i=as(c[s].name),a=as(c[s].abbr),l=as(c[s].narrow),t.push(i),e.push(a),r.push(l),n.push(i),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")}Re(0,["gg",2],0,function(){return this.weekYear()%100});Re(0,["GG",2],0,function(){return this.isoWeekYear()%100});function _f(e,t){Re(0,[e,e.length],0,t)}_f("gggg","weekYear");_f("ggggg","weekYear");_f("GGGG","isoWeekYear");_f("GGGGG","isoWeekYear");we("G",gf);we("g",gf);we("GG",St,Ur);we("gg",St,Ur);we("GGGG",rv,tv);we("gggg",rv,tv);we("GGGGG",mf,hf);we("ggggg",mf,hf);gc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=tt(e)});gc(["gg","GG"],function(e,t,r,n){t[n]=me.parseTwoDigitYear(e)});function IF(e){return qS.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function LF(e){return qS.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function FF(){return ls(this.year(),1,4)}function zF(){return ls(this.isoWeekYear(),1,4)}function UF(){var e=this.localeData()._week;return ls(this.year(),e.dow,e.doy)}function VF(){var e=this.localeData()._week;return ls(this.weekYear(),e.dow,e.doy)}function qS(e,t,r,n,s){var o;return e==null?Il(this,n,s).year:(o=ls(e,n,s),t>o&&(t=o),WF.call(this,e,t,r,n,s))}function WF(e,t,r,n,s){var o=NS(e,t,r,n,s),i=Ml(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Re("Q",0,"Qo","quarter");we("Q",yS);pt("Q",function(e,t){t[ns]=(tt(e)-1)*3});function $F(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Re("D",["DD",2],"Do","date");we("D",St,va);we("DD",St,Ur);we("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});pt(["D","DD"],Tn);pt("Do",function(e,t){t[Tn]=tt(e.match(St)[0])});var XS=ya("Date",!0);Re("DDD",["DDDD",3],"DDDo","dayOfYear");we("DDD",pf);we("DDDD",wS);pt(["DDD","DDDD"],function(e,t,r){r._dayOfYear=tt(e)});function BF(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Re("m",["mm",2],0,"minute");we("m",St,nv);we("mm",St,Ur);pt(["m","mm"],ln);var HF=ya("Minutes",!1);Re("s",["ss",2],0,"second");we("s",St,nv);we("ss",St,Ur);pt(["s","ss"],ss);var YF=ya("Seconds",!1);Re("S",0,0,function(){return~~(this.millisecond()/100)});Re(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Re(0,["SSS",3],0,"millisecond");Re(0,["SSSS",4],0,function(){return this.millisecond()*10});Re(0,["SSSSS",5],0,function(){return this.millisecond()*100});Re(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Re(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Re(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Re(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});we("S",pf,yS);we("SS",pf,Ur);we("SSS",pf,wS);var Ws,QS;for(Ws="SSSS";Ws.length<=9;Ws+="S")we(Ws,ga);function ZF(e,t){t[Po]=tt(("0."+e)*1e3)}for(Ws="S";Ws.length<=9;Ws+="S")pt(Ws,ZF);QS=ya("Milliseconds",!1);Re("z",0,0,"zoneAbbr");Re("zz",0,0,"zoneName");function GF(){return this._isUTC?"UTC":""}function KF(){return this._isUTC?"Coordinated Universal Time":""}var ae=pc.prototype;ae.add=VL;ae.calendar=GL;ae.clone=KL;ae.diff=rF;ae.endOf=fF;ae.format=iF;ae.from=aF;ae.fromNow=lF;ae.to=cF;ae.toNow=uF;ae.get=oI;ae.invalidAt=_F;ae.isAfter=qL;ae.isBefore=XL;ae.isBetween=QL;ae.isSame=JL;ae.isSameOrAfter=eF;ae.isSameOrBefore=tF;ae.isValid=wF;ae.lang=HS;ae.locale=BS;ae.localeData=YS;ae.max=wL;ae.min=yL;ae.parsingFlags=xF;ae.set=iI;ae.startOf=dF;ae.subtract=WL;ae.toArray=gF;ae.toObject=vF;ae.toDate=mF;ae.toISOString=sF;ae.inspect=oF;typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});ae.toJSON=yF;ae.toString=nF;ae.unix=pF;ae.valueOf=hF;ae.creationData=bF;ae.eraName=EF;ae.eraNarrow=TF;ae.eraAbbr=RF;ae.eraYear=NF;ae.year=bS;ae.isLeapYear=sI;ae.weekYear=IF;ae.isoWeekYear=LF;ae.quarter=ae.quarters=$F;ae.month=TS;ae.daysInMonth=mI;ae.week=ae.weeks=SI;ae.isoWeek=ae.isoWeeks=kI;ae.weeksInYear=UF;ae.weeksInWeekYear=VF;ae.isoWeeksInYear=FF;ae.isoWeeksInISOWeekYear=zF;ae.date=XS;ae.day=ae.days=LI;ae.weekday=FI;ae.isoWeekday=zI;ae.dayOfYear=BF;ae.hour=ae.hours=YI;ae.minute=ae.minutes=HF;ae.second=ae.seconds=YF;ae.millisecond=ae.milliseconds=QS;ae.utcOffset=RL;ae.utc=PL;ae.local=jL;ae.parseZone=DL;ae.hasAlignedHourOffset=OL;ae.isDST=AL;ae.isLocal=IL;ae.isUtcOffset=LL;ae.isUtc=US;ae.isUTC=US;ae.zoneAbbr=GF;ae.zoneName=KF;ae.dates=Qr("dates accessor is deprecated. Use date instead.",XS);ae.months=Qr("months accessor is deprecated. Use month instead",TS);ae.years=Qr("years accessor is deprecated. Use year instead",bS);ae.zone=Qr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",NL);ae.isDSTShifted=Qr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ML);function qF(e){return bt(e*1e3)}function XF(){return bt.apply(null,arguments).parseZone()}function JS(e){return e}var lt=Qg.prototype;lt.calendar=IM;lt.longDateFormat=UM;lt.invalidDate=WM;lt.ordinal=HM;lt.preparse=JS;lt.postformat=JS;lt.relativeTime=ZM;lt.pastFuture=GM;lt.set=AM;lt.eras=SF;lt.erasParse=kF;lt.erasConvertYear=CF;lt.erasAbbrRegex=jF;lt.erasNameRegex=PF;lt.erasNarrowRegex=DF;lt.months=dI;lt.monthsShort=fI;lt.monthsParse=pI;lt.monthsRegex=vI;lt.monthsShortRegex=gI;lt.week=wI;lt.firstDayOfYear=bI;lt.firstDayOfWeek=_I;lt.weekdays=DI;lt.weekdaysMin=AI;lt.weekdaysShort=OI;lt.weekdaysParse=II;lt.weekdaysRegex=UI;lt.weekdaysShortRegex=VI;lt.weekdaysMinRegex=WI;lt.isPM=BI;lt.meridiem=ZI;function vd(e,t,r,n){var s=ks(),o=zn().set(n,t);return s[r](o,e)}function ek(e,t,r){if(gs(e)&&(t=e,e=void 0),e=e||"",t!=null)return vd(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=vd(e,n,r,"month");return s}function gv(e,t,r,n){typeof e=="boolean"?(gs(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,gs(t)&&(r=t,t=void 0),t=t||"");var s=ks(),o=e?s._week.dow:0,i,a=[];if(r!=null)return vd(t,(r+o)%7,n,"day");for(i=0;i<7;i++)a[i]=vd(t,(i+o)%7,n,"day");return a}function QF(e,t){return ek(e,t,"months")}function JF(e,t){return ek(e,t,"monthsShort")}function e4(e,t,r){return gv(e,t,r,"weekdays")}function t4(e,t,r){return gv(e,t,r,"weekdaysShort")}function r4(e,t,r){return gv(e,t,r,"weekdaysMin")}Qs("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=tt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});me.lang=Qr("moment.lang is deprecated. Use moment.locale instead.",Qs);me.langData=Qr("moment.langData is deprecated. Use moment.localeData instead.",ks);var Zn=Math.abs;function n4(){var e=this._data;return this._milliseconds=Zn(this._milliseconds),this._days=Zn(this._days),this._months=Zn(this._months),e.milliseconds=Zn(e.milliseconds),e.seconds=Zn(e.seconds),e.minutes=Zn(e.minutes),e.hours=Zn(e.hours),e.months=Zn(e.months),e.years=Zn(e.years),this}function tk(e,t,r,n){var s=xn(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function s4(e,t){return tk(this,e,t,1)}function o4(e,t){return tk(this,e,t,-1)}function J0(e){return e<0?Math.floor(e):Math.ceil(e)}function i4(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,o,i,a,l;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=J0(Zp(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Hr(e/1e3),n.seconds=s%60,o=Hr(s/60),n.minutes=o%60,i=Hr(o/60),n.hours=i%24,t+=Hr(i/24),l=Hr(rk(t)),r+=l,t-=J0(Zp(l)),a=Hr(r/12),r%=12,n.days=t,n.months=r,n.years=a,this}function rk(e){return e*4800/146097}function Zp(e){return e*146097/4800}function a4(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Jr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+rk(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Zp(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 Cs(e){return function(){return this.as(e)}}var nk=Cs("ms"),l4=Cs("s"),c4=Cs("m"),u4=Cs("h"),d4=Cs("d"),f4=Cs("w"),h4=Cs("M"),p4=Cs("Q"),m4=Cs("y"),g4=nk;function v4(){return xn(this)}function y4(e){return e=Jr(e),this.isValid()?this[e+"s"]():NaN}function ei(e){return function(){return this.isValid()?this._data[e]:NaN}}var w4=ei("milliseconds"),x4=ei("seconds"),_4=ei("minutes"),b4=ei("hours"),S4=ei("days"),k4=ei("months"),C4=ei("years");function E4(){return Hr(this.days()/7)}var Qn=Math.round,Ni={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function T4(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function R4(e,t,r,n){var s=xn(e).abs(),o=Qn(s.as("s")),i=Qn(s.as("m")),a=Qn(s.as("h")),l=Qn(s.as("d")),c=Qn(s.as("M")),f=Qn(s.as("w")),d=Qn(s.as("y")),h=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||i<=1&&["m"]||i<r.m&&["mm",i]||a<=1&&["h"]||a<r.h&&["hh",a]||l<=1&&["d"]||l<r.d&&["dd",l];return r.w!=null&&(h=h||f<=1&&["w"]||f<r.w&&["ww",f]),h=h||c<=1&&["M"]||c<r.M&&["MM",c]||d<=1&&["y"]||["yy",d],h[2]=t,h[3]=+e>0,h[4]=n,T4.apply(null,h)}function N4(e){return e===void 0?Qn:typeof e=="function"?(Qn=e,!0):!1}function P4(e,t){return Ni[e]===void 0?!1:t===void 0?Ni[e]:(Ni[e]=t,e==="s"&&(Ni.ss=t-1),!0)}function j4(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Ni,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Ni,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),o=R4(this,!r,n,s),r&&(o=s.pastFuture(+this,o)),s.postformat(o)}var Rh=Math.abs;function fi(e){return(e>0)-(e<0)||+e}function bf(){if(!this.isValid())return this.localeData().invalidDate();var e=Rh(this._milliseconds)/1e3,t=Rh(this._days),r=Rh(this._months),n,s,o,i,a=this.asSeconds(),l,c,f,d;return a?(n=Hr(e/60),s=Hr(n/60),e%=60,n%=60,o=Hr(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=fi(this._months)!==fi(a)?"-":"",f=fi(this._days)!==fi(a)?"-":"",d=fi(this._milliseconds)!==fi(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(r?c+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+i+"S":"")):"P0D"}var st=xf.prototype;st.isValid=kL;st.abs=n4;st.add=s4;st.subtract=o4;st.as=a4;st.asMilliseconds=nk;st.asSeconds=l4;st.asMinutes=c4;st.asHours=u4;st.asDays=d4;st.asWeeks=f4;st.asMonths=h4;st.asQuarters=p4;st.asYears=m4;st.valueOf=g4;st._bubble=i4;st.clone=v4;st.get=y4;st.milliseconds=w4;st.seconds=x4;st.minutes=_4;st.hours=b4;st.days=S4;st.weeks=E4;st.months=k4;st.years=C4;st.humanize=j4;st.toISOString=bf;st.toString=bf;st.toJSON=bf;st.locale=BS;st.localeData=YS;st.toIsoString=Qr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bf);st.lang=HS;Re("X",0,0,"unix");Re("x",0,0,"valueOf");we("x",gf);we("X",QM);pt("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});pt("x",function(e,t,r){r._d=new Date(tt(e))});//! moment.js
me.version="2.30.1";DM(bt);me.fn=ae;me.min=xL;me.max=_L;me.now=bL;me.utc=zn;me.unix=qF;me.months=QF;me.isDate=hc;me.locale=Qs;me.invalid=ff;me.duration=xn;me.isMoment=vn;me.weekdays=e4;me.parseZone=XF;me.localeData=ks;me.isDuration=Cu;me.monthsShort=JF;me.weekdaysMin=r4;me.defineLocale=lv;me.updateLocale=XI;me.locales=QI;me.weekdaysShort=t4;me.normalizeUnits=Jr;me.relativeTimeRounding=N4;me.relativeTimeThreshold=P4;me.calendarFormat=ZL;me.prototype=ae;me.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 D4=async()=>await Dt().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),vc=async e=>e.id?await Dt().collection("access").update(e.id,e):await Dt().collection("access").create(e),O4=async e=>(e.deleted=me.utc().format("YYYY-MM-DD HH:mm:ss"),await Dt().collection("access").update(e.id,e)),A4=(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)};default:return e}},sk=y.createContext({}),ti=()=>y.useContext(sk),M4=({children:e})=>{const[t,r]=y.useReducer(A4,{accesses:[]});y.useEffect(()=>{(async()=>{const a=await D4();r({type:"SET_ACCESSES",payload:a})})()},[]);const n=y.useCallback(i=>{r({type:"DELETE_ACCESS",payload:i})},[]),s=y.useCallback(i=>{r({type:"ADD_ACCESS",payload:i})},[]),o=y.useCallback(i=>{r({type:"UPDATE_ACCESS",payload:i})},[]);return u.jsx(sk.Provider,{value:{config:{accesses:t.accesses},deleteAccess:n,addAccess:s,updateAccess:o},children:e&&e})},I4={theme:"system",setTheme:()=>null},ok=y.createContext(I4);function L4({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...n}){const[s,o]=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 i={theme:s,setTheme:a=>{localStorage.setItem(r,a),o(a)}};return u.jsx(ok.Provider,{...n,value:i,children:e})}const F4=()=>{const e=y.useContext(ok);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function z4(){const{setTheme:e}=F4();return u.jsxs(Lb,{children:[u.jsx(Fb,{asChild:!0,children:u.jsxs(xt,{variant:"outline",size:"icon",children:[u.jsx(PP,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),u.jsx(RP,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),u.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),u.jsxs(zg,{align:"end",children:[u.jsx(Ui,{onClick:()=>e("light"),children:"浅色"}),u.jsx(Ui,{onClick:()=>e("dark"),children:"暗黑"}),u.jsx(Ui,{onClick:()=>e("system"),children:"系统"})]})]})}var U4="Separator",ew="horizontal",V4=["horizontal","vertical"],ik=y.forwardRef((e,t)=>{const{decorative:r,orientation:n=ew,...s}=e,o=W4(n)?n:ew,a=r?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return u.jsx(Me.div,{"data-orientation":o,...a,...s,ref:t})});ik.displayName=U4;function W4(e){return V4.includes(e)}var ak=ik;const Ht=y.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},s)=>u.jsx(ak,{ref:s,decorative:r,orientation:t,className:_e("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Ht.displayName=ak.displayName;function $4(){const e=bs(),t=po();if(!Dt().authStore.isValid||!Dt().authStore.isAdmin)return u.jsx(Z_,{to:"/login"});const r=t.pathname,n=i=>(console.log(r),i==r?"bg-muted text-primary":"text-muted-foreground"),s=()=>{Dt().authStore.clear(),e("/login")},o=()=>{e("/setting/password")};return u.jsx(u.Fragment,{children:u.jsx(M4,{children:u.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[220px_1fr] lg:grid-cols-[280px_1fr]",children:[u.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:u.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[u.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:u.jsxs(Kn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[u.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),u.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),u.jsx("div",{className:"flex-1",children:u.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[u.jsxs(Kn,{to:"/",className:_e("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/")),children:[u.jsx(Dp,{className:"h-4 w-4"}),"域名列表"]}),u.jsxs(Kn,{to:"/access",className:_e("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/access")),children:[u.jsx(y0,{className:"h-4 w-4"}),"授权管理"]}),u.jsxs(Kn,{to:"/history",className:_e("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",n("/history")),children:[u.jsx(g0,{className:"h-4 w-4"}),"部署历史"]})]})})]})}),u.jsxs("div",{className:"flex flex-col",children:[u.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:[u.jsxs(sS,{children:[u.jsx(oS,{asChild:!0,children:u.jsxs(xt,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[u.jsx(TP,{className:"h-5 w-5 dark:text-white"}),u.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),u.jsx(Zg,{side:"left",className:"flex flex-col",children:u.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[u.jsxs(Kn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[u.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),u.jsx("span",{className:"dark:text-white",children:"Certimate"}),u.jsx("span",{className:"sr-only",children:"Certimate"})]}),u.jsxs(Kn,{to:"/",className:_e("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/")),children:[u.jsx(Dp,{className:"h-5 w-5"}),"域名列表"]}),u.jsxs(Kn,{to:"/access",className:_e("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/dns_provider")),children:[u.jsx(y0,{className:"h-5 w-5"}),"授权管理"]}),u.jsxs(Kn,{to:"/history",className:_e("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",n("/history")),children:[u.jsx(g0,{className:"h-5 w-5"}),"部署历史"]})]})})]}),u.jsx("div",{className:"w-full flex-1"}),u.jsx(z4,{}),u.jsxs(Lb,{children:[u.jsx(Fb,{asChild:!0,children:u.jsxs(xt,{variant:"secondary",size:"icon",className:"rounded-full",children:[u.jsx(kP,{className:"h-5 w-5"}),u.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),u.jsxs(zg,{align:"end",children:[u.jsx(zb,{children:"账户"}),u.jsx(Ub,{}),u.jsx(Ui,{onClick:o,children:"设置"}),u.jsx(Ui,{onClick:s,children:"退出"})]})]})]}),u.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[u.jsx(dg,{}),u.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[u.jsx("div",{className:""}),u.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[u.jsx("a",{href:"https://docs.certimate.fun",target:"_blank",children:"文档"}),u.jsx(Ht,{orientation:"vertical",className:"mx-2"}),u.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:"Certimate v0.0.13"})]})]})]})]})]})})})}const lk=({phase:e,phaseSuccess:t})=>{let r=u.jsx(u.Fragment,{children:" "});return e==="check"&&(t?r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="apply"&&(t?r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]}):r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow"}),u.jsx("div",{className:"text-xs text-nowrap text-muted-foreground",children:"部署"})]})),e==="deploy"&&(t?r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"部署"})]}):r=u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"检查 "}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-green-600",children:"获取"}),u.jsx(Ht,{className:"h-1 grow bg-green-600"}),u.jsx("div",{className:"text-xs text-nowrap text-red-600",children:"部署"})]})),r},tw=({when:e,children:t,fallback:r})=>e?t:r;var ck="AlertDialog",[B4,X6]=Xr(ck,[Wb]),Es=Wb(),uk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Es(t);return u.jsx(Bg,{...n,...r,modal:!0})};uk.displayName=ck;var H4="AlertDialogTrigger",dk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Es(r);return u.jsx(Hg,{...s,...n,ref:t})});dk.displayName=H4;var Y4="AlertDialogPortal",fk=e=>{const{__scopeAlertDialog:t,...r}=e,n=Es(t);return u.jsx(Yg,{...n,...r})};fk.displayName=Y4;var Z4="AlertDialogOverlay",hk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Es(r);return u.jsx(cc,{...s,...n,ref:t})});hk.displayName=Z4;var Hi="AlertDialogContent",[G4,K4]=B4(Hi),pk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=Es(r),i=y.useRef(null),a=Ke(t,i),l=y.useRef(null);return u.jsx(aM,{contentName:Hi,titleName:mk,docsSlug:"alert-dialog",children:u.jsx(G4,{scope:r,cancelRef:l,children:u.jsxs(uc,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,c=>{var f;c.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[u.jsx(hg,{children:n}),u.jsx(X4,{contentRef:i})]})})})});pk.displayName=Hi;var mk="AlertDialogTitle",gk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Es(r);return u.jsx(dc,{...s,...n,ref:t})});gk.displayName=mk;var vk="AlertDialogDescription",yk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Es(r);return u.jsx(fc,{...s,...n,ref:t})});yk.displayName=vk;var q4="AlertDialogAction",wk=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=Es(r);return u.jsx(df,{...s,...n,ref:t})});wk.displayName=q4;var xk="AlertDialogCancel",_k=y.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=K4(xk,r),o=Es(r),i=Ke(t,s);return u.jsx(df,{...o,...n,ref:i})});_k.displayName=xk;var X4=({contentRef:e})=>{const t=`\`${Hi}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${Hi}\` by passing a \`${vk}\` 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 \`${Hi}\`. 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},Q4=uk,J4=dk,e3=fk,bk=hk,Sk=pk,kk=wk,Ck=_k,Ek=gk,Tk=yk;const t3=Q4,r3=J4,n3=e3,Rk=y.forwardRef(({className:e,...t},r)=>u.jsx(bk,{className:_e("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}));Rk.displayName=bk.displayName;const Nk=y.forwardRef(({className:e,...t},r)=>u.jsxs(n3,{children:[u.jsx(Rk,{}),u.jsx(Sk,{ref:r,className:_e("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})]}));Nk.displayName=Sk.displayName;const Pk=({className:e,...t})=>u.jsx("div",{className:_e("flex flex-col space-y-2 text-center sm:text-left",e),...t});Pk.displayName="AlertDialogHeader";const jk=({className:e,...t})=>u.jsx("div",{className:_e("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jk.displayName="AlertDialogFooter";const Dk=y.forwardRef(({className:e,...t},r)=>u.jsx(Ek,{ref:r,className:_e("text-lg font-semibold",e),...t}));Dk.displayName=Ek.displayName;const Ok=y.forwardRef(({className:e,...t},r)=>u.jsx(Tk,{ref:r,className:_e("text-sm text-muted-foreground",e),...t}));Ok.displayName=Tk.displayName;const Ak=y.forwardRef(({className:e,...t},r)=>u.jsx(kk,{ref:r,className:_e(mg(),e),...t}));Ak.displayName=kk.displayName;const Mk=y.forwardRef(({className:e,...t},r)=>u.jsx(Ck,{ref:r,className:_e(mg({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Mk.displayName=Ck.displayName;function Ik(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 vv="Switch",[s3,Q6]=Xr(vv),[o3,i3]=s3(vv),Lk=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:c,...f}=e,[d,h]=y.useState(null),p=Ke(t,v=>h(v)),w=y.useRef(!1),m=d?!!d.closest("form"):!0,[x=!1,g]=to({prop:s,defaultProp:o,onChange:c});return u.jsxs(o3,{scope:r,checked:x,disabled:a,children:[u.jsx(Me.button,{type:"button",role:"switch","aria-checked":x,"aria-required":i,"data-state":Uk(x),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:p,onClick:ue(e.onClick,v=>{g(_=>!_),m&&(w.current=v.isPropagationStopped(),w.current||v.stopPropagation())})}),m&&u.jsx(a3,{control:d,bubbles:!w.current,name:n,value:l,checked:x,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});Lk.displayName=vv;var Fk="SwitchThumb",zk=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=i3(Fk,r);return u.jsx(Me.span,{"data-state":Uk(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});zk.displayName=Fk;var a3=e=>{const{control:t,checked:r,bubbles:n=!0,...s}=e,o=y.useRef(null),i=Ik(r),a=x1(t);return y.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==r&&d){const h=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(h)}},[i,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Uk(e){return e?"checked":"unchecked"}var Vk=Lk,l3=zk;const Wk=y.forwardRef(({className:e,...t},r)=>u.jsx(Vk,{className:_e("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:u.jsx(l3,{className:_e("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")})}));Wk.displayName=Vk.displayName;var c3="VisuallyHidden",yc=y.forwardRef((e,t)=>u.jsx(Me.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}}));yc.displayName=c3;var u3=yc,yv="ToastProvider",[wv,d3,f3]=ef("Toast"),[$k,J6]=Xr("Toast",[f3]),[h3,Sf]=$k(yv),Bk=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=y.useState(null),[c,f]=y.useState(0),d=y.useRef(!1),h=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${yv}\`. Expected non-empty \`string\`.`),u.jsx(wv.Provider,{scope:t,children:u.jsx(h3,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>f(p=>p+1),[]),onToastRemove:y.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:i})})};Bk.displayName=yv;var Hk="ToastViewport",p3=["F8"],Gp="toast.viewportPause",Kp="toast.viewportResume",Yk=y.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=p3,label:s="Notifications ({hotkey})",...o}=e,i=Sf(Hk,r),a=d3(r),l=y.useRef(null),c=y.useRef(null),f=y.useRef(null),d=y.useRef(null),h=Ke(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;y.useEffect(()=>{const x=g=>{var _;n.every(C=>g[C]||g.code===C)&&((_=d.current)==null||_.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),y.useEffect(()=>{const x=l.current,g=d.current;if(w&&x&&g){const v=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Gp);g.dispatchEvent(T),i.isClosePausedRef.current=!0}},_=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Kp);g.dispatchEvent(T),i.isClosePausedRef.current=!1}},C=T=>{!x.contains(T.relatedTarget)&&_()},E=()=>{x.contains(document.activeElement)||_()};return x.addEventListener("focusin",v),x.addEventListener("focusout",C),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",_),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",C),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",_)}}},[w,i.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:x})=>{const v=a().map(_=>{const C=_.ref.current,E=[C,...T3(C)];return x==="forwards"?E:E.reverse()});return(x==="forwards"?v.reverse():v).flat()},[a]);return y.useEffect(()=>{const x=d.current;if(x){const g=v=>{var E,T,P;const _=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!_){const O=document.activeElement,j=v.shiftKey;if(v.target===x&&j){(E=c.current)==null||E.focus();return}const R=m({tabbingDirection:j?"backwards":"forwards"}),F=R.findIndex(b=>b===O);Nh(R.slice(F+1))?v.preventDefault():j?(T=c.current)==null||T.focus():(P=f.current)==null||P.focus()}};return x.addEventListener("keydown",g),()=>x.removeEventListener("keydown",g)}},[a,m]),u.jsxs(Rj,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&u.jsx(qp,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});Nh(x)}}),u.jsx(wv.Slot,{scope:r,children:u.jsx(Me.ol,{tabIndex:-1,...o,ref:h})}),w&&u.jsx(qp,{ref:f,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});Nh(x)}})]})});Yk.displayName=Hk;var Zk="ToastFocusProxy",qp=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Sf(Zk,r);return u.jsx(yc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&n()}})});qp.displayName=Zk;var kf="Toast",m3="toast.swipeStart",g3="toast.swipeMove",v3="toast.swipeCancel",y3="toast.swipeEnd",Gk=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,l]=to({prop:n,defaultProp:s,onChange:o});return u.jsx(Cr,{present:r||a,children:u.jsx(_3,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:jt(e.onPause),onResume:jt(e.onResume),onSwipeStart:ue(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,c=>{const{x:f,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ue(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,c=>{const{x:f,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Gk.displayName=kf;var[w3,x3]=$k(kf,{onClose(){}}),_3=y.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p,...w}=e,m=Sf(kf,r),[x,g]=y.useState(null),v=Ke(t,b=>g(b)),_=y.useRef(null),C=y.useRef(null),E=s||m.duration,T=y.useRef(0),P=y.useRef(E),O=y.useRef(0),{onToastAdd:j,onToastRemove:L}=m,q=jt(()=>{var W;(x==null?void 0:x.contains(document.activeElement))&&((W=m.viewport)==null||W.focus()),i()}),R=y.useCallback(b=>{!b||b===1/0||(window.clearTimeout(O.current),T.current=new Date().getTime(),O.current=window.setTimeout(q,b))},[q]);y.useEffect(()=>{const b=m.viewport;if(b){const W=()=>{R(P.current),c==null||c()},te=()=>{const $=new Date().getTime()-T.current;P.current=P.current-$,window.clearTimeout(O.current),l==null||l()};return b.addEventListener(Gp,te),b.addEventListener(Kp,W),()=>{b.removeEventListener(Gp,te),b.removeEventListener(Kp,W)}}},[m.viewport,E,l,c,R]),y.useEffect(()=>{o&&!m.isClosePausedRef.current&&R(E)},[o,E,m.isClosePausedRef,R]),y.useEffect(()=>(j(),()=>L()),[j,L]);const F=y.useMemo(()=>x?tC(x):null,[x]);return m.viewport?u.jsxs(u.Fragment,{children:[F&&u.jsx(b3,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),u.jsx(w3,{scope:r,onClose:q,children:ws.createPortal(u.jsx(wv.ItemSlot,{scope:r,children:u.jsx(Tj,{asChild:!0,onEscapeKeyDown:ue(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||q(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(Me.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,b=>{b.key==="Escape"&&(a==null||a(b.nativeEvent),b.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:ue(e.onPointerDown,b=>{b.button===0&&(_.current={x:b.clientX,y:b.clientY})}),onPointerMove:ue(e.onPointerMove,b=>{if(!_.current)return;const W=b.clientX-_.current.x,te=b.clientY-_.current.y,$=!!C.current,Z=["left","right"].includes(m.swipeDirection),I=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,Q=Z?I(0,W):0,z=Z?0:I(0,te),V=b.pointerType==="touch"?10:2,de={x:Q,y:z},ne={originalEvent:b,delta:de};$?(C.current=de,ou(g3,d,ne,{discrete:!1})):rw(de,m.swipeDirection,V)?(C.current=de,ou(m3,f,ne,{discrete:!1}),b.target.setPointerCapture(b.pointerId)):(Math.abs(W)>V||Math.abs(te)>V)&&(_.current=null)}),onPointerUp:ue(e.onPointerUp,b=>{const W=C.current,te=b.target;if(te.hasPointerCapture(b.pointerId)&&te.releasePointerCapture(b.pointerId),C.current=null,_.current=null,W){const $=b.currentTarget,Z={originalEvent:b,delta:W};rw(W,m.swipeDirection,m.swipeThreshold)?ou(y3,p,Z,{discrete:!0}):ou(v3,h,Z,{discrete:!0}),$.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),b3=e=>{const{__scopeToast:t,children:r,...n}=e,s=Sf(kf,t),[o,i]=y.useState(!1),[a,l]=y.useState(!1);return C3(()=>i(!0)),y.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(ic,{asChild:!0,children:u.jsx(yc,{...n,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",r]})})})},S3="ToastTitle",Kk=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(Me.div,{...n,ref:t})});Kk.displayName=S3;var k3="ToastDescription",qk=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(Me.div,{...n,ref:t})});qk.displayName=k3;var Xk="ToastAction",Qk=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(eC,{altText:r,asChild:!0,children:u.jsx(xv,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Xk}\`. Expected non-empty \`string\`.`),null)});Qk.displayName=Xk;var Jk="ToastClose",xv=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=x3(Jk,r);return u.jsx(eC,{asChild:!0,children:u.jsx(Me.button,{type:"button",...n,ref:t,onClick:ue(e.onClick,s.onClose)})})});xv.displayName=Jk;var eC=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return u.jsx(Me.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function tC(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),E3(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...tC(n))}}),t}function ou(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?gg(s,o):s.dispatchEvent(o)}var rw=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function C3(e=()=>{}){const t=jt(e);nr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function E3(e){return e.nodeType===e.ELEMENT_NODE}function T3(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 Nh(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var R3=Bk,rC=Yk,nC=Gk,sC=Kk,oC=qk,iC=Qk,aC=xv;const N3=R3,lC=y.forwardRef(({className:e,...t},r)=>u.jsx(rC,{ref:r,className:_e("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}));lC.displayName=rC.displayName;const P3=sc("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),cC=y.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(nC,{ref:n,className:_e(P3({variant:t}),e),...r}));cC.displayName=nC.displayName;const j3=y.forwardRef(({className:e,...t},r)=>u.jsx(iC,{ref:r,className:_e("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}));j3.displayName=iC.displayName;const uC=y.forwardRef(({className:e,...t},r)=>u.jsx(aC,{ref:r,className:_e("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:u.jsx(fg,{className:"h-4 w-4"})}));uC.displayName=aC.displayName;const dC=y.forwardRef(({className:e,...t},r)=>u.jsx(sC,{ref:r,className:_e("text-sm font-semibold",e),...t}));dC.displayName=sC.displayName;const fC=y.forwardRef(({className:e,...t},r)=>u.jsx(oC,{ref:r,className:_e("text-sm opacity-90",e),...t}));fC.displayName=oC.displayName;const D3=1,O3=1e6;let Ph=0;function A3(){return Ph=(Ph+1)%Number.MAX_SAFE_INTEGER,Ph.toString()}const jh=new Map,nw=e=>{if(jh.has(e))return;const t=setTimeout(()=>{jh.delete(e),rl({type:"REMOVE_TOAST",toastId:e})},O3);jh.set(e,t)},M3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,D3)};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?nw(r):e.toasts.forEach(n=>{nw(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)}}},Tu=[];let Ru={toasts:[]};function rl(e){Ru=M3(Ru,e),Tu.forEach(t=>{t(Ru)})}function I3({...e}){const t=A3(),r=s=>rl({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>rl({type:"DISMISS_TOAST",toastId:t});return rl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Cf(){const[e,t]=y.useState(Ru);return y.useEffect(()=>(Tu.push(t),()=>{const r=Tu.indexOf(t);r>-1&&Tu.splice(r,1)}),[e]),{...e,toast:I3,dismiss:r=>rl({type:"DISMISS_TOAST",toastId:r})}}function _v(){const{toasts:e}=Cf();return u.jsxs(N3,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return u.jsxs(cC,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(dC,{children:r}),n&&u.jsx(fC,{children:n})]}),s,u.jsx(uC,{})]},t)}),u.jsx(lC,{})]})}var[Ef,eU]=Xr("Tooltip",[ma]),Tf=ma(),hC="TooltipProvider",L3=700,Xp="tooltip.open",[F3,bv]=Ef(hC),pC=e=>{const{__scopeTooltip:t,delayDuration:r=L3,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=y.useState(!0),l=y.useRef(!1),c=y.useRef(0);return y.useEffect(()=>{const f=c.current;return()=>window.clearTimeout(f)},[]),u.jsx(F3,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(f=>{l.current=f},[]),disableHoverableContent:s,children:o})};pC.displayName=hC;var Rf="Tooltip",[z3,Nf]=Ef(Rf),mC=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=bv(Rf,e.__scopeTooltip),c=Tf(t),[f,d]=y.useState(null),h=On(),p=y.useRef(0),w=i??l.disableHoverableContent,m=a??l.delayDuration,x=y.useRef(!1),[g=!1,v]=to({prop:n,defaultProp:s,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(Xp))):l.onClose(),o==null||o(P)}}),_=y.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),C=y.useCallback(()=>{window.clearTimeout(p.current),x.current=!1,v(!0)},[v]),E=y.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),T=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,v(!0)},m)},[m,v]);return y.useEffect(()=>()=>window.clearTimeout(p.current),[]),u.jsx(Eg,{...c,children:u.jsx(z3,{scope:t,contentId:h,open:g,stateAttribute:_,trigger:f,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayed?T():C()},[l.isOpenDelayed,T,C]),onTriggerLeave:y.useCallback(()=>{w?E():window.clearTimeout(p.current)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:r})})};mC.displayName=Rf;var Qp="TooltipTrigger",gC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Nf(Qp,r),o=bv(Qp,r),i=Tf(r),a=y.useRef(null),l=Ke(t,a,s.onTriggerChange),c=y.useRef(!1),f=y.useRef(!1),d=y.useCallback(()=>c.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),u.jsx(Tg,{asChild:!0,...i,children:u.jsx(Me.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ue(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});gC.displayName=Qp;var U3="TooltipPortal",[tU,V3]=Ef(U3,{forceMount:void 0}),ta="TooltipContent",Sv=y.forwardRef((e,t)=>{const r=V3(ta,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Nf(ta,e.__scopeTooltip);return u.jsx(Cr,{present:n||i.open,children:i.disableHoverableContent?u.jsx(vC,{side:s,...o,ref:t}):u.jsx(W3,{side:s,...o,ref:t})})}),W3=y.forwardRef((e,t)=>{const r=Nf(ta,e.__scopeTooltip),n=bv(ta,e.__scopeTooltip),s=y.useRef(null),o=Ke(t,s),[i,a]=y.useState(null),{trigger:l,onClose:c}=r,f=s.current,{onPointerInTransitChange:d}=n,h=y.useCallback(()=>{a(null),d(!1)},[d]),p=y.useCallback((w,m)=>{const x=w.currentTarget,g={x:w.clientX,y:w.clientY},v=Y3(g,x.getBoundingClientRect()),_=Z3(g,v),C=G3(m.getBoundingClientRect()),E=q3([..._,...C]);a(E),d(!0)},[d]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(l&&f){const w=x=>p(x,f),m=x=>p(x,l);return l.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[l,f,p,h]),y.useEffect(()=>{if(i){const w=m=>{const x=m.target,g={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(x))||(f==null?void 0:f.contains(x)),_=!K3(g,i);v?h():_&&(h(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,f,i,c,h]),u.jsx(vC,{...e,ref:o})}),[$3,B3]=Ef(Rf,{isInside:!1}),vC=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=Nf(ta,r),c=Tf(r),{onClose:f}=l;return y.useEffect(()=>(document.addEventListener(Xp,f),()=>document.removeEventListener(Xp,f)),[f]),y.useEffect(()=>{if(l.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),u.jsx(fa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:u.jsxs(Rg,{"data-state":l.stateAttribute,...c,...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:[u.jsx(hg,{children:n}),u.jsx($3,{scope:r,isInside:!0,children:u.jsx(u3,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Sv.displayName=ta;var yC="TooltipArrow",H3=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Tf(r);return B3(yC,r).isInside?null:u.jsx(Ng,{...s,...n,ref:t})});H3.displayName=yC;function Y3(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Z3(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 G3(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 K3(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,l=t[o].y,c=t[i].x,f=t[i].y;l>n!=f>n&&r<(c-a)*(n-l)/(f-l)+a&&(s=!s)}return s}function q3(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),X3(t)}function X3(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Q3=mC,J3=gC,wC=Sv;const e5=Q3,t5=J3,r5=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(wC,{ref:n,sideOffset:t,className:_e("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}));r5.displayName=wC.displayName;function iu(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 xC={exports:{}};/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,o){function i(c,f){if(!s[c]){if(!n[c]){var d=typeof iu=="function"&&iu;if(!f&&d)return d(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=s[c]={exports:{}};n[c][0].call(p.exports,function(w){var m=n[c][1][w];return i(m||w)},p,p.exports,r,n,s,o)}return s[c].exports}for(var a=typeof iu=="function"&&iu,l=0;l<o.length;l++)i(o[l]);return i}({1:[function(r,n,s){var o=r("./utils"),i=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(l){for(var c,f,d,h,p,w,m,x=[],g=0,v=l.length,_=v,C=o.getTypeOf(l)!=="string";g<l.length;)_=v-g,d=C?(c=l[g++],f=g<v?l[g++]:0,g<v?l[g++]:0):(c=l.charCodeAt(g++),f=g<v?l.charCodeAt(g++):0,g<v?l.charCodeAt(g++):0),h=c>>2,p=(3&c)<<4|f>>4,w=1<_?(15&f)<<2|d>>6:64,m=2<_?63&d:64,x.push(a.charAt(h)+a.charAt(p)+a.charAt(w)+a.charAt(m));return x.join("")},s.decode=function(l){var c,f,d,h,p,w,m=0,x=0,g="data:";if(l.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var v,_=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&_--,l.charAt(l.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|_):new Array(0|_);m<l.length;)c=a.indexOf(l.charAt(m++))<<2|(h=a.indexOf(l.charAt(m++)))>>4,f=(15&h)<<4|(p=a.indexOf(l.charAt(m++)))>>2,d=(3&p)<<6|(w=a.indexOf(l.charAt(m++))),v[x++]=c,p!==64&&(v[x++]=f),w!==64&&(v[x++]=d);return v}},{"./support":30,"./utils":32}],2:[function(r,n,s){var o=r("./external"),i=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function c(f,d,h,p,w){this.compressedSize=f,this.uncompressedSize=d,this.crc32=h,this.compression=p,this.compressedContent=w}c.prototype={getContentWorker:function(){var f=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),d=this;return f.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(f,d,h){return f.pipe(new a).pipe(new l("uncompressedSize")).pipe(d.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",d)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,s){var o=r("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,s){var o=r("./utils"),i=function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l}();n.exports=function(a,l){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(c,f,d,h){var p=i,w=h+d;c^=-1;for(var m=h;m<w;m++)c=c>>>8^p[255&(c^f[m])];return-1^c}(0|l,a,a.length,0):function(c,f,d,h){var p=i,w=h+d;c^=-1;for(var m=h;m<w;m++)c=c>>>8^p[255&(c^f.charCodeAt(m))];return-1^c}(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 o=null;o=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:o}},{lie:37}],7:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),c=o?"uint8array":"array";function f(d,h){l.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(f,l),f.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,d.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(h){d.push({data:h,meta:d.meta})}},s.compressWorker=function(d){return new f("Deflate",d)},s.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,s){function o(p,w){var m,x="";for(m=0;m<w;m++)x+=String.fromCharCode(255&p),p>>>=8;return x}function i(p,w,m,x,g,v){var _,C,E=p.file,T=p.compression,P=v!==c.utf8encode,O=a.transformTo("string",v(E.name)),j=a.transformTo("string",c.utf8encode(E.name)),L=E.comment,q=a.transformTo("string",v(L)),R=a.transformTo("string",c.utf8encode(L)),F=j.length!==E.name.length,b=R.length!==L.length,W="",te="",$="",Z=E.dir,I=E.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};w&&!m||(Q.crc32=p.crc32,Q.compressedSize=p.compressedSize,Q.uncompressedSize=p.uncompressedSize);var z=0;w&&(z|=8),P||!F&&!b||(z|=2048);var V=0,de=0;Z&&(V|=16),g==="UNIX"?(de=798,V|=function(se,Ee){var fe=se;return se||(fe=Ee?16893:33204),(65535&fe)<<16}(E.unixPermissions,Z)):(de=20,V|=function(se){return 63&(se||0)}(E.dosPermissions)),_=I.getUTCHours(),_<<=6,_|=I.getUTCMinutes(),_<<=5,_|=I.getUTCSeconds()/2,C=I.getUTCFullYear()-1980,C<<=4,C|=I.getUTCMonth()+1,C<<=5,C|=I.getUTCDate(),F&&(te=o(1,1)+o(f(O),4)+j,W+="up"+o(te.length,2)+te),b&&($=o(1,1)+o(f(q),4)+R,W+="uc"+o($.length,2)+$);var ne="";return ne+=`
\0`,ne+=o(z,2),ne+=T.magic,ne+=o(_,2),ne+=o(C,2),ne+=o(Q.crc32,4),ne+=o(Q.compressedSize,4),ne+=o(Q.uncompressedSize,4),ne+=o(O.length,2),ne+=o(W.length,2),{fileRecord:d.LOCAL_FILE_HEADER+ne+O+W,dirRecord:d.CENTRAL_FILE_HEADER+o(de,2)+ne+o(q.length,2)+"\0\0\0\0"+o(V,4)+o(x,4)+O+W+q}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),f=r("../crc32"),d=r("../signature");function h(p,w,m,x){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=m,this.encodeFileName=x,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,l),h.prototype.push=function(p){var w=p.meta.percent||0,m=this.entriesCount,x=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:m?(w+100*(m-x-1))/m:100}}))},h.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var w=this.streamFiles&&!p.file.dir;if(w){var m=i(p,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(p){this.accumulate=!1;var w=this.streamFiles&&!p.file.dir,m=i(p,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),w)this.push({data:function(x){return d.DATA_DESCRIPTOR+o(x.crc32,4)+o(x.compressedSize,4)+o(x.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var p=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var m=this.bytesWritten-p,x=function(g,v,_,C,E){var T=a.transformTo("string",E(C));return d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(g,2)+o(g,2)+o(v,4)+o(_,4)+o(T.length,2)+T}(this.dirRecords.length,m,p,this.zipComment,this.encodeFileName);this.push({data:x,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(p){this._sources.push(p);var w=this;return p.on("data",function(m){w.processChunk(m)}),p.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),p.on("error",function(m){w.error(m)}),this},h.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))},h.prototype.error=function(p){var w=this._sources;if(!l.prototype.error.call(this,p))return!1;for(var m=0;m<w.length;m++)try{w[m].error(p)}catch{}return!0},h.prototype.lock=function(){l.prototype.lock.call(this);for(var p=this._sources,w=0;w<p.length;w++)p[w].lock()},n.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,s){var o=r("../compressions"),i=r("./ZipFileWorker");s.generateWorker=function(a,l,c){var f=new i(l.streamFiles,c,l.platform,l.encodeFileName),d=0;try{a.forEach(function(h,p){d++;var w=function(v,_){var C=v||_,E=o[C];if(!E)throw new Error(C+" is not a valid compression method !");return E}(p.options.compression,l.compression),m=p.options.compressionOptions||l.compressionOptions||{},x=p.dir,g=p.date;p._compressWorker(w,m).withStreamInfo("file",{name:h,dir:x,date:g,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(f)}),f.entriesCount=d}catch(h){f.error(h)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,s){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new o;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(o.prototype=r("./object")).loadAsync=r("./load"),o.support=r("./support"),o.defaults=r("./defaults"),o.version="3.10.1",o.loadAsync=function(i,a){return new o().loadAsync(i,a)},o.external=r("./external"),n.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,s){var o=r("./utils"),i=r("./external"),a=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),f=r("./nodejsUtils");function d(h){return new i.Promise(function(p,w){var m=h.decompressed.getContentWorker().pipe(new c);m.on("error",function(x){w(x)}).on("end",function(){m.streamInfo.crc32!==h.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}n.exports=function(h,p){var w=this;return p=o.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),f.isNode&&f.isStream(h)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",h,!0,p.optimizedBinaryString,p.base64).then(function(m){var x=new l(p);return x.load(m),x}).then(function(m){var x=[i.Promise.resolve(m)],g=m.files;if(p.checkCRC32)for(var v=0;v<g.length;v++)x.push(d(g[v]));return i.Promise.all(x)}).then(function(m){for(var x=m.shift(),g=x.files,v=0;v<g.length;v++){var _=g[v],C=_.fileNameStr,E=o.resolve(_.fileNameStr);w.file(E,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:p.createFolders}),_.dir||(w.file(E).unsafeOriginalName=C)}return x.zipComment.length&&(w.comment=x.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,s){var o=r("../utils"),i=r("../stream/GenericWorker");function a(l,c){i.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}o.inherits(a,i),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(f){c.push({data:f,meta:{percent:0}})}).on("error",function(f){c.isPaused?this.generatedError=f:c.error(f)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.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 o=r("readable-stream").Readable;function i(a,l,c){o.call(this,l),this._helper=a;var f=this;a.on("data",function(d,h){f.push(d)||f._helper.pause(),c&&c(h)}).on("error",function(d){f.emit("error",d)}).on("end",function(){f.push(null)})}r("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},n.exports=i},{"../utils":32,"readable-stream":16}],14:[function(r,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,i);if(typeof o=="number")throw new Error('The "data" argument must not be a number');return new Buffer(o,i)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var i=new Buffer(o);return i.fill(0),i},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(r,n,s){function o(E,T,P){var O,j=a.getTypeOf(T),L=a.extend(P||{},f);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=g(E)),L.createFolders&&(O=x(E))&&v.call(this,O,!0);var q=j==="string"&&L.binary===!1&&L.base64===!1;P&&P.binary!==void 0||(L.binary=!q),(T instanceof d&&T.uncompressedSize===0||L.dir||!T||T.length===0)&&(L.base64=!1,L.binary=!0,T="",L.compression="STORE",j="string");var R=null;R=T instanceof d||T instanceof l?T:w.isNode&&w.isStream(T)?new m(E,T):a.prepareContent(E,T,L.binary,L.optimizedBinaryString,L.base64);var F=new h(E,R,L);this.files[E]=F}var i=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),f=r("./defaults"),d=r("./compressedObject"),h=r("./zipObject"),p=r("./generate"),w=r("./nodejsUtils"),m=r("./nodejs/NodejsStreamInputAdapter"),x=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var T=E.lastIndexOf("/");return 0<T?E.substring(0,T):""},g=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},v=function(E,T){return T=T!==void 0?T:f.createFolders,E=g(E),this.files[E]||o.call(this,E,null,{dir:!0,createFolders:T}),this.files[E]};function _(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 T,P,O;for(T in this.files)O=this.files[T],(P=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&E(P,O)},filter:function(E){var T=[];return this.forEach(function(P,O){E(P,O)&&T.push(O)}),T},file:function(E,T,P){if(arguments.length!==1)return E=this.root+E,o.call(this,E,T,P),this;if(_(E)){var O=E;return this.filter(function(L,q){return!q.dir&&O.test(L)})}var j=this.files[this.root+E];return j&&!j.dir?j:null},folder:function(E){if(!E)return this;if(_(E))return this.filter(function(j,L){return L.dir&&E.test(j)});var T=this.root+E,P=v.call(this,T),O=this.clone();return O.root=P.name,O},remove:function(E){E=this.root+E;var T=this.files[E];if(T||(E.slice(-1)!=="/"&&(E+="/"),T=this.files[E]),T&&!T.dir)delete this.files[E];else for(var P=this.filter(function(j,L){return L.name.slice(0,E.length)===E}),O=0;O<P.length;O++)delete this.files[P[O].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 T,P={};try{if((P=a.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=P.type.toLowerCase(),P.compression=P.compression.toUpperCase(),P.type==="binarystring"&&(P.type="string"),!P.type)throw new Error("No output type specified.");a.checkSupport(P.type),P.platform!=="darwin"&&P.platform!=="freebsd"&&P.platform!=="linux"&&P.platform!=="sunos"||(P.platform="UNIX"),P.platform==="win32"&&(P.platform="DOS");var O=P.comment||this.comment||"";T=p.generateWorker(this,P,O)}catch(j){(T=new l("error")).error(j)}return new c(T,P.type||"string",P.mimeType)},generateAsync:function(E,T){return this.generateInternalStream(E).accumulate(T)},generateNodeStream:function(E,T){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).toNodejsStream(T)}};n.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,n,s){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),f=a.charCodeAt(2),d=a.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===l&&this.data[h+1]===c&&this.data[h+2]===f&&this.data[h+3]===d)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),f=a.charCodeAt(2),d=a.charCodeAt(3),h=this.readData(4);return l===h[0]&&c===h[1]&&f===h[2]&&d===h[3]},i.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=i},{"../utils":32,"./DataReader":18}],18:[function(r,n,s){var o=r("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.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,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return o.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=i},{"../utils":32}],19:[function(r,n,s){var o=r("./Uint8ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.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=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,s){var o=r("./DataReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.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=i},{"../utils":32,"./DataReader":18}],21:[function(r,n,s){var o=r("./ArrayReader");function i(a){o.call(this,a)}r("../utils").inherits(i,o),i.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=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,s){var o=r("../utils"),i=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");n.exports=function(d){var h=o.getTypeOf(d);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new c(d):i.uint8array?new f(o.transformTo("uint8array",d)):new a(o.transformTo("array",d)):new l(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,s){var o=r("./GenericWorker"),i=r("../utils");function a(l){o.call(this,"ConvertWorker to "+l),this.destType=l}i.inherits(a,o),a.prototype.processChunk=function(l){this.push({data:i.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,s){var o=r("./GenericWorker"),i=r("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,o),a.prototype.processChunk=function(l){this.streamInfo.crc32=i(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}o.inherits(a,i),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}i.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,s){var o=r("../utils"),i=r("./GenericWorker");function a(l){i.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){c.dataIsReady=!0,c.data=f,c.max=f&&f.length||0,c.type=o.getTypeOf(f),c.isPaused||c._tickAndRepeat()},function(f){c.error(f)})}o.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=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,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,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 o(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var l=0;l<this._listeners[i].length;l++)this._listeners[i][l].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(l){a.processChunk(l)}),i.on("end",function(){a.end()}),i.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 i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},n.exports=o},{}],29:[function(r,n,s){var o=r("../utils"),i=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),f=r("../external"),d=null;if(c.nodestream)try{d=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(w,m){return new f.Promise(function(x,g){var v=[],_=w._internalType,C=w._outputType,E=w._mimeType;w.on("data",function(T,P){v.push(T),m&&m(P)}).on("error",function(T){v=[],g(T)}).on("end",function(){try{var T=function(P,O,j){switch(P){case"blob":return o.newBlob(o.transformTo("arraybuffer",O),j);case"base64":return l.encode(O);default:return o.transformTo(P,O)}}(C,function(P,O){var j,L=0,q=null,R=0;for(j=0;j<O.length;j++)R+=O[j].length;switch(P){case"string":return O.join("");case"array":return Array.prototype.concat.apply([],O);case"uint8array":for(q=new Uint8Array(R),j=0;j<O.length;j++)q.set(O[j],L),L+=O[j].length;return q;case"nodebuffer":return Buffer.concat(O);default:throw new Error("concat : unsupported type '"+P+"'")}}(_,v),E);x(T)}catch(P){g(P)}v=[]}).resume()})}function p(w,m,x){var g=m;switch(m){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=m,this._mimeType=x,o.checkSupport(g),this._worker=w.pipe(new i(g)),w.lock()}catch(v){this._worker=new a("error"),this._worker.error(v)}}p.prototype={accumulate:function(w){return h(this,w)},on:function(w,m){var x=this;return w==="data"?this._worker.on(w,function(g){m.call(x,g.data,g.meta)}):this._worker.on(w,function(){o.delay(m,arguments,x)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},w)}},n.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(o),s.blob=i.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!r("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,s){for(var o=r("./utils"),i=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),f=0;f<256;f++)c[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;c[254]=c[254]=1;function d(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}s.utf8encode=function(p){return i.nodebuffer?a.newBufferFrom(p,"utf-8"):function(w){var m,x,g,v,_,C=w.length,E=0;for(v=0;v<C;v++)(64512&(x=w.charCodeAt(v)))==55296&&v+1<C&&(64512&(g=w.charCodeAt(v+1)))==56320&&(x=65536+(x-55296<<10)+(g-56320),v++),E+=x<128?1:x<2048?2:x<65536?3:4;for(m=i.uint8array?new Uint8Array(E):new Array(E),v=_=0;_<E;v++)(64512&(x=w.charCodeAt(v)))==55296&&v+1<C&&(64512&(g=w.charCodeAt(v+1)))==56320&&(x=65536+(x-55296<<10)+(g-56320),v++),x<128?m[_++]=x:(x<2048?m[_++]=192|x>>>6:(x<65536?m[_++]=224|x>>>12:(m[_++]=240|x>>>18,m[_++]=128|x>>>12&63),m[_++]=128|x>>>6&63),m[_++]=128|63&x);return m}(p)},s.utf8decode=function(p){return i.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):function(w){var m,x,g,v,_=w.length,C=new Array(2*_);for(m=x=0;m<_;)if((g=w[m++])<128)C[x++]=g;else if(4<(v=c[g]))C[x++]=65533,m+=v-1;else{for(g&=v===2?31:v===3?15:7;1<v&&m<_;)g=g<<6|63&w[m++],v--;1<v?C[x++]=65533:g<65536?C[x++]=g:(g-=65536,C[x++]=55296|g>>10&1023,C[x++]=56320|1023&g)}return C.length!==x&&(C.subarray?C=C.subarray(0,x):C.length=x),o.applyFromCharCode(C)}(p=o.transformTo(i.uint8array?"uint8array":"array",p))},o.inherits(d,l),d.prototype.processChunk=function(p){var w=o.transformTo(i.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=w;(w=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),w.set(m,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var x=function(v,_){var C;for((_=_||v.length)>v.length&&(_=v.length),C=_-1;0<=C&&(192&v[C])==128;)C--;return C<0||C===0?_:C+c[v[C]]>_?C:_}(w),g=w;x!==w.length&&(i.uint8array?(g=w.subarray(0,x),this.leftOver=w.subarray(x,w.length)):(g=w.slice(0,x),this.leftOver=w.slice(x,w.length))),this.push({data:s.utf8decode(g),meta:p.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(h,l),h.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,s){var o=r("./support"),i=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(m){return m}function f(m,x){for(var g=0;g<m.length;++g)x[g]=255&m.charCodeAt(g);return x}r("setimmediate"),s.newBlob=function(m,x){s.checkSupport("blob");try{return new Blob([m],{type:x})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(m),g.getBlob(x)}catch{throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(m,x,g){var v=[],_=0,C=m.length;if(C<=g)return String.fromCharCode.apply(null,m);for(;_<C;)x==="array"||x==="nodebuffer"?v.push(String.fromCharCode.apply(null,m.slice(_,Math.min(_+g,C)))):v.push(String.fromCharCode.apply(null,m.subarray(_,Math.min(_+g,C)))),_+=g;return v.join("")},stringifyByChar:function(m){for(var x="",g=0;g<m.length;g++)x+=String.fromCharCode(m[g]);return x},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function h(m){var x=65536,g=s.getTypeOf(m),v=!0;if(g==="uint8array"?v=d.applyCanBeUsed.uint8array:g==="nodebuffer"&&(v=d.applyCanBeUsed.nodebuffer),v)for(;1<x;)try{return d.stringifyByChunk(m,g,x)}catch{x=Math.floor(x/2)}return d.stringifyByChar(m)}function p(m,x){for(var g=0;g<m.length;g++)x[g]=m[g];return x}s.applyFromCharCode=h;var w={};w.string={string:c,array:function(m){return f(m,new Array(m.length))},arraybuffer:function(m){return w.string.uint8array(m).buffer},uint8array:function(m){return f(m,new Uint8Array(m.length))},nodebuffer:function(m){return f(m,a.allocBuffer(m.length))}},w.array={string:h,array:c,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(m)}},w.arraybuffer={string:function(m){return h(new Uint8Array(m))},array:function(m){return p(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:c,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(new Uint8Array(m))}},w.uint8array={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:c,nodebuffer:function(m){return a.newBufferFrom(m)}},w.nodebuffer={string:h,array:function(m){return p(m,new Array(m.length))},arraybuffer:function(m){return w.nodebuffer.uint8array(m).buffer},uint8array:function(m){return p(m,new Uint8Array(m.length))},nodebuffer:c},s.transformTo=function(m,x){if(x=x||"",!m)return x;s.checkSupport(m);var g=s.getTypeOf(x);return w[g][m](x)},s.resolve=function(m){for(var x=m.split("/"),g=[],v=0;v<x.length;v++){var _=x[v];_==="."||_===""&&v!==0&&v!==x.length-1||(_===".."?g.pop():g.push(_))}return g.join("/")},s.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(m)?"nodebuffer":o.uint8array&&m instanceof Uint8Array?"uint8array":o.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(m){if(!o[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(m){var x,g,v="";for(g=0;g<(m||"").length;g++)v+="\\x"+((x=m.charCodeAt(g))<16?"0":"")+x.toString(16).toUpperCase();return v},s.delay=function(m,x,g){setImmediate(function(){m.apply(g||null,x||[])})},s.inherits=function(m,x){function g(){}g.prototype=x.prototype,m.prototype=new g},s.extend=function(){var m,x,g={};for(m=0;m<arguments.length;m++)for(x in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],x)&&g[x]===void 0&&(g[x]=arguments[m][x]);return g},s.prepareContent=function(m,x,g,v,_){return l.Promise.resolve(x).then(function(C){return o.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(E,T){var P=new FileReader;P.onload=function(O){E(O.target.result)},P.onerror=function(O){T(O.target.error)},P.readAsArrayBuffer(C)}):C}).then(function(C){var E=s.getTypeOf(C);return E?(E==="arraybuffer"?C=s.transformTo("uint8array",C):E==="string"&&(_?C=i.decode(C):g&&v!==!0&&(C=function(T){return f(T,o.uint8array?new Uint8Array(T.length):new Array(T.length))}(C))),C):l.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,s){var o=r("./reader/readerFor"),i=r("./utils"),a=r("./signature"),l=r("./zipEntry"),c=r("./support");function f(d){this.files=[],this.loadOptions=d}f.prototype={checkSignature:function(d){if(!this.reader.readAndCheckSignature(d)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(h)+", expected "+i.pretty(d)+")")}},isSignature:function(d,h){var p=this.reader.index;this.reader.setIndex(d);var w=this.reader.readString(4)===h;return this.reader.setIndex(p),w},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 d=this.reader.readData(this.zipCommentLength),h=c.uint8array?"uint8array":"array",p=i.transformTo(h,d);this.zipComment=this.loadOptions.decodeFileName(p)},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 d,h,p,w=this.zip64EndOfCentralSize-44;0<w;)d=this.reader.readInt(2),h=this.reader.readInt(4),p=this.reader.readData(h),this.zip64ExtensibleData[d]={id:d,length:h,value:p}},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 d,h;for(d=0;d<this.files.length;d++)h=this.files[d],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var d;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(d=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(d);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 d=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(d<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(d);var h=d;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(d=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(d),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 p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var w=h-p;if(0<w)this.isSignature(h,a.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(d){this.reader=o(d)},load:function(d){this.prepareReader(d),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,s){var o=r("./reader/readerFor"),i=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),f=r("./compressions"),d=r("./support");function h(p,w){this.options=p,this.loadOptions=w}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var w,m;if(p.skip(22),this.fileNameLength=p.readInt(2),m=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(m),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((w=function(x){for(var g in f)if(Object.prototype.hasOwnProperty.call(f,g)&&f[g].magic===x)return f[g];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,w,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var w=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(w),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var w,m,x,g=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<g;)w=p.readInt(2),m=p.readInt(2),x=p.readData(m),this.extraFields[w]={id:w,length:m,value:x};p.setIndex(g)},handleUTF8:function(){var p=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var m=i.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var x=this.findExtraFieldUnicodeComment();if(x!==null)this.fileCommentStr=x;else{var g=i.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var w=o(p.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:c.utf8decode(w.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var w=o(p.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:c.utf8decode(w.readData(p.length-5))}return null}},n.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,s){function o(w,m,x){this.name=w,this.dir=x.dir,this.date=x.date,this.comment=x.comment,this.unixPermissions=x.unixPermissions,this.dosPermissions=x.dosPermissions,this._data=m,this._dataBinary=x.binary,this.options={compression:x.compression,compressionOptions:x.compressionOptions}}var i=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),f=r("./stream/GenericWorker");o.prototype={internalStream:function(w){var m=null,x="string";try{if(!w)throw new Error("No output type specified.");var g=(x=w.toLowerCase())==="string"||x==="text";x!=="binarystring"&&x!=="text"||(x="string"),m=this._decompressWorker();var v=!this._dataBinary;v&&!g&&(m=m.pipe(new l.Utf8EncodeWorker)),!v&&g&&(m=m.pipe(new l.Utf8DecodeWorker))}catch(_){(m=new f("error")).error(_)}return new i(m,x,"")},async:function(w,m){return this.internalStream(w).accumulate(m)},nodeStream:function(w,m){return this.internalStream(w||"nodebuffer").toNodejsStream(m)},_compressWorker:function(w,m){if(this._data instanceof c&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var x=this._decompressWorker();return this._dataBinary||(x=x.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(x,w,m)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof f?this._data:new a(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<d.length;p++)o.prototype[d[p]]=h;n.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,s){(function(o){var i,a,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var c=0,f=new l(w),d=o.document.createTextNode("");f.observe(d,{characterData:!0}),i=function(){d.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var m=o.document.createElement("script");m.onreadystatechange=function(){w(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},o.document.documentElement.appendChild(m)}:function(){setTimeout(w,0)};else{var h=new o.MessageChannel;h.port1.onmessage=w,i=function(){h.port2.postMessage(0)}}var p=[];function w(){var m,x;a=!0;for(var g=p.length;g;){for(x=p,p=[],m=-1;++m<g;)x[m]();g=p.length}a=!1}n.exports=function(m){p.push(m)!==1||a||i()}}).call(this,typeof Pc<"u"?Pc:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,s){var o=r("immediate");function i(){}var a={},l=["REJECTED"],c=["FULFILLED"],f=["PENDING"];function d(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,g!==i&&m(this,g)}function h(g,v,_){this.promise=g,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function p(g,v,_){o(function(){var C;try{C=v(_)}catch(E){return a.reject(g,E)}C===g?a.reject(g,new TypeError("Cannot resolve promise with itself")):a.resolve(g,C)})}function w(g){var v=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof v=="function")return function(){v.apply(g,arguments)}}function m(g,v){var _=!1;function C(P){_||(_=!0,a.reject(g,P))}function E(P){_||(_=!0,a.resolve(g,P))}var T=x(function(){v(E,C)});T.status==="error"&&C(T.value)}function x(g,v){var _={};try{_.value=g(v),_.status="success"}catch(C){_.status="error",_.value=C}return _}(n.exports=d).prototype.finally=function(g){if(typeof g!="function")return this;var v=this.constructor;return this.then(function(_){return v.resolve(g()).then(function(){return _})},function(_){return v.resolve(g()).then(function(){throw _})})},d.prototype.catch=function(g){return this.then(null,g)},d.prototype.then=function(g,v){if(typeof g!="function"&&this.state===c||typeof v!="function"&&this.state===l)return this;var _=new this.constructor(i);return this.state!==f?p(_,this.state===c?g:v,this.outcome):this.queue.push(new h(_,g,v)),_},h.prototype.callFulfilled=function(g){a.resolve(this.promise,g)},h.prototype.otherCallFulfilled=function(g){p(this.promise,this.onFulfilled,g)},h.prototype.callRejected=function(g){a.reject(this.promise,g)},h.prototype.otherCallRejected=function(g){p(this.promise,this.onRejected,g)},a.resolve=function(g,v){var _=x(w,v);if(_.status==="error")return a.reject(g,_.value);var C=_.value;if(C)m(g,C);else{g.state=c,g.outcome=v;for(var E=-1,T=g.queue.length;++E<T;)g.queue[E].callFulfilled(v)}return g},a.reject=function(g,v){g.state=l,g.outcome=v;for(var _=-1,C=g.queue.length;++_<C;)g.queue[_].callRejected(v);return g},d.resolve=function(g){return g instanceof this?g:a.resolve(new this(i),g)},d.reject=function(g){var v=new this(i);return a.reject(v,g)},d.all=function(g){var v=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=g.length,C=!1;if(!_)return this.resolve([]);for(var E=new Array(_),T=0,P=-1,O=new this(i);++P<_;)j(g[P],P);return O;function j(L,q){v.resolve(L).then(function(R){E[q]=R,++T!==_||C||(C=!0,a.resolve(O,E))},function(R){C||(C=!0,a.reject(O,R))})}},d.race=function(g){var v=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=g.length,C=!1;if(!_)return this.resolve([]);for(var E=-1,T=new this(i);++E<_;)P=g[E],v.resolve(P).then(function(O){C||(C=!0,a.resolve(T,O))},function(O){C||(C=!0,a.reject(T,O))});var P;return T}},{immediate:36}],38:[function(r,n,s){var o={};(0,r("./lib/utils/common").assign)(o,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,s){var o=r("./zlib/deflate"),i=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),f=Object.prototype.toString,d=0,h=-1,p=0,w=8;function m(g){if(!(this instanceof m))return new m(g);this.options=i.assign({level:h,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},g||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var _=o.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(_!==d)throw new Error(l[_]);if(v.header&&o.deflateSetHeader(this.strm,v.header),v.dictionary){var C;if(C=typeof v.dictionary=="string"?a.string2buf(v.dictionary):f.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(_=o.deflateSetDictionary(this.strm,C))!==d)throw new Error(l[_]);this._dict_set=!0}}function x(g,v){var _=new m(v);if(_.push(g,!0),_.err)throw _.msg||l[_.err];return _.result}m.prototype.push=function(g,v){var _,C,E=this.strm,T=this.options.chunkSize;if(this.ended)return!1;C=v===~~v?v:v===!0?4:0,typeof g=="string"?E.input=a.string2buf(g):f.call(g)==="[object ArrayBuffer]"?E.input=new Uint8Array(g):E.input=g,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new i.Buf8(T),E.next_out=0,E.avail_out=T),(_=o.deflate(E,C))!==1&&_!==d)return this.onEnd(_),!(this.ended=!0);E.avail_out!==0&&(E.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(E.output,E.next_out))):this.onData(i.shrinkBuf(E.output,E.next_out)))}while((0<E.avail_in||E.avail_out===0)&&_!==1);return C===4?(_=o.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===d):C!==2||(this.onEnd(d),!(E.avail_out=0))},m.prototype.onData=function(g){this.chunks.push(g)},m.prototype.onEnd=function(g){g===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Deflate=m,s.deflate=x,s.deflateRaw=function(g,v){return(v=v||{}).raw=!0,x(g,v)},s.gzip=function(g,v){return(v=v||{}).gzip=!0,x(g,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,s){var o=r("./zlib/inflate"),i=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),f=r("./zlib/zstream"),d=r("./zlib/gzheader"),h=Object.prototype.toString;function p(m){if(!(this instanceof p))return new p(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var x=this.options;x.raw&&0<=x.windowBits&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),!(0<=x.windowBits&&x.windowBits<16)||m&&m.windowBits||(x.windowBits+=32),15<x.windowBits&&x.windowBits<48&&!(15&x.windowBits)&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var g=o.inflateInit2(this.strm,x.windowBits);if(g!==l.Z_OK)throw new Error(c[g]);this.header=new d,o.inflateGetHeader(this.strm,this.header)}function w(m,x){var g=new p(x);if(g.push(m,!0),g.err)throw g.msg||c[g.err];return g.result}p.prototype.push=function(m,x){var g,v,_,C,E,T,P=this.strm,O=this.options.chunkSize,j=this.options.dictionary,L=!1;if(this.ended)return!1;v=x===~~x?x:x===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof m=="string"?P.input=a.binstring2buf(m):h.call(m)==="[object ArrayBuffer]"?P.input=new Uint8Array(m):P.input=m,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new i.Buf8(O),P.next_out=0,P.avail_out=O),(g=o.inflate(P,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&j&&(T=typeof j=="string"?a.string2buf(j):h.call(j)==="[object ArrayBuffer]"?new Uint8Array(j):j,g=o.inflateSetDictionary(this.strm,T)),g===l.Z_BUF_ERROR&&L===!0&&(g=l.Z_OK,L=!1),g!==l.Z_STREAM_END&&g!==l.Z_OK)return this.onEnd(g),!(this.ended=!0);P.next_out&&(P.avail_out!==0&&g!==l.Z_STREAM_END&&(P.avail_in!==0||v!==l.Z_FINISH&&v!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=a.utf8border(P.output,P.next_out),C=P.next_out-_,E=a.buf2string(P.output,_),P.next_out=C,P.avail_out=O-C,C&&i.arraySet(P.output,P.output,_,C,0),this.onData(E)):this.onData(i.shrinkBuf(P.output,P.next_out)))),P.avail_in===0&&P.avail_out===0&&(L=!0)}while((0<P.avail_in||P.avail_out===0)&&g!==l.Z_STREAM_END);return g===l.Z_STREAM_END&&(v=l.Z_FINISH),v===l.Z_FINISH?(g=o.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===l.Z_OK):v!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(P.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},s.Inflate=p,s.inflate=w,s.inflateRaw=function(m,x){return(x=x||{}).raw=!0,w(m,x)},s.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var f=c.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var d in f)f.hasOwnProperty(d)&&(l[d]=f[d])}}return l},s.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var i={arraySet:function(l,c,f,d,h){if(c.subarray&&l.subarray)l.set(c.subarray(f,f+d),h);else for(var p=0;p<d;p++)l[h+p]=c[f+p]},flattenChunks:function(l){var c,f,d,h,p,w;for(c=d=0,f=l.length;c<f;c++)d+=l[c].length;for(w=new Uint8Array(d),c=h=0,f=l.length;c<f;c++)p=l[c],w.set(p,h),h+=p.length;return w}},a={arraySet:function(l,c,f,d,h){for(var p=0;p<d;p++)l[h+p]=c[f+p]},flattenChunks:function(l){return[].concat.apply([],l)}};s.setTyped=function(l){l?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(o)},{}],42:[function(r,n,s){var o=r("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new o.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function f(d,h){if(h<65537&&(d.subarray&&a||!d.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(d,h));for(var p="",w=0;w<h;w++)p+=String.fromCharCode(d[w]);return p}l[254]=l[254]=1,s.string2buf=function(d){var h,p,w,m,x,g=d.length,v=0;for(m=0;m<g;m++)(64512&(p=d.charCodeAt(m)))==55296&&m+1<g&&(64512&(w=d.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(w-56320),m++),v+=p<128?1:p<2048?2:p<65536?3:4;for(h=new o.Buf8(v),m=x=0;x<v;m++)(64512&(p=d.charCodeAt(m)))==55296&&m+1<g&&(64512&(w=d.charCodeAt(m+1)))==56320&&(p=65536+(p-55296<<10)+(w-56320),m++),p<128?h[x++]=p:(p<2048?h[x++]=192|p>>>6:(p<65536?h[x++]=224|p>>>12:(h[x++]=240|p>>>18,h[x++]=128|p>>>12&63),h[x++]=128|p>>>6&63),h[x++]=128|63&p);return h},s.buf2binstring=function(d){return f(d,d.length)},s.binstring2buf=function(d){for(var h=new o.Buf8(d.length),p=0,w=h.length;p<w;p++)h[p]=d.charCodeAt(p);return h},s.buf2string=function(d,h){var p,w,m,x,g=h||d.length,v=new Array(2*g);for(p=w=0;p<g;)if((m=d[p++])<128)v[w++]=m;else if(4<(x=l[m]))v[w++]=65533,p+=x-1;else{for(m&=x===2?31:x===3?15:7;1<x&&p<g;)m=m<<6|63&d[p++],x--;1<x?v[w++]=65533:m<65536?v[w++]=m:(m-=65536,v[w++]=55296|m>>10&1023,v[w++]=56320|1023&m)}return f(v,w)},s.utf8border=function(d,h){var p;for((h=h||d.length)>d.length&&(h=d.length),p=h-1;0<=p&&(192&d[p])==128;)p--;return p<0||p===0?h:p+l[d[p]]>h?p:h}},{"./common":41}],43:[function(r,n,s){n.exports=function(o,i,a,l){for(var c=65535&o|0,f=o>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3<a?2e3:a;f=f+(c=c+i[l++]|0)|0,--d;);c%=65521,f%=65521}return c|f<<16|0}},{}],44:[function(r,n,s){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,n,s){var o=function(){for(var i,a=[],l=0;l<256;l++){i=l;for(var c=0;c<8;c++)i=1&i?3988292384^i>>>1:i>>>1;a[l]=i}return a}();n.exports=function(i,a,l,c){var f=o,d=c+l;i^=-1;for(var h=c;h<d;h++)i=i>>>8^f[255&(i^a[h])];return-1^i}},{}],46:[function(r,n,s){var o,i=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),f=r("./messages"),d=0,h=4,p=0,w=-2,m=-1,x=4,g=2,v=8,_=9,C=286,E=30,T=19,P=2*C+1,O=15,j=3,L=258,q=L+j+1,R=42,F=113,b=1,W=2,te=3,$=4;function Z(k,J){return k.msg=f[J],J}function I(k){return(k<<1)-(4<k?9:0)}function Q(k){for(var J=k.length;0<=--J;)k[J]=0}function z(k){var J=k.state,G=J.pending;G>k.avail_out&&(G=k.avail_out),G!==0&&(i.arraySet(k.output,J.pending_buf,J.pending_out,G,k.next_out),k.next_out+=G,J.pending_out+=G,k.total_out+=G,k.avail_out-=G,J.pending-=G,J.pending===0&&(J.pending_out=0))}function 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 de(k,J){k.pending_buf[k.pending++]=J}function ne(k,J){k.pending_buf[k.pending++]=J>>>8&255,k.pending_buf[k.pending++]=255&J}function se(k,J){var G,D,S=k.max_chain_length,N=k.strstart,A=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,he=k.strstart+L,Fe=H[N+A-1],De=H[N+A];k.prev_length>=k.good_match&&(S>>=2),Y>k.lookahead&&(Y=k.lookahead);do if(H[(G=J)+A]===De&&H[G+A-1]===Fe&&H[G]===H[N]&&H[++G]===H[N+1]){N+=2,G++;do;while(H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&H[++N]===H[++G]&&N<he);if(D=L-(he-N),N=he-L,A<D){if(k.match_start=J,Y<=(A=D))break;Fe=H[N+A-1],De=H[N+A]}}while((J=ee[J&X])>M&&--S!=0);return A<=k.lookahead?A:k.lookahead}function Ee(k){var J,G,D,S,N,A,Y,M,H,X,ee=k.w_size;do{if(S=k.window_size-k.lookahead-k.strstart,k.strstart>=ee+(ee-q)){for(i.arraySet(k.window,k.window,ee,ee,0),k.match_start-=ee,k.strstart-=ee,k.block_start-=ee,J=G=k.hash_size;D=k.head[--J],k.head[J]=ee<=D?D-ee:0,--G;);for(J=G=ee;D=k.prev[--J],k.prev[J]=ee<=D?D-ee:0,--G;);S+=ee}if(k.strm.avail_in===0)break;if(A=k.strm,Y=k.window,M=k.strstart+k.lookahead,H=S,X=void 0,X=A.avail_in,H<X&&(X=H),G=X===0?0:(A.avail_in-=X,i.arraySet(Y,A.input,A.next_in,X,M),A.state.wrap===1?A.adler=l(A.adler,Y,X,M):A.state.wrap===2&&(A.adler=c(A.adler,Y,X,M)),A.next_in+=X,A.total_in+=X,X),k.lookahead+=G,k.lookahead+k.insert>=j)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+j-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<j)););}while(k.lookahead<q&&k.strm.avail_in!==0)}function fe(k,J){for(var G,D;;){if(k.lookahead<q){if(Ee(k),k.lookahead<q&&J===d)return b;if(k.lookahead===0)break}if(G=0,k.lookahead>=j&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+j-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),G!==0&&k.strstart-G<=k.w_size-q&&(k.match_length=se(k,G)),k.match_length>=j)if(D=a._tr_tally(k,k.strstart-k.match_start,k.match_length-j),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=j){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+j-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else D=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<j-1?k.strstart:j-1,J===h?(V(k,!0),k.strm.avail_out===0?te:$):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:W}function ge(k,J){for(var G,D,S;;){if(k.lookahead<q){if(Ee(k),k.lookahead<q&&J===d)return b;if(k.lookahead===0)break}if(G=0,k.lookahead>=j&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+j-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=j-1,G!==0&&k.prev_length<k.max_lazy_match&&k.strstart-G<=k.w_size-q&&(k.match_length=se(k,G),k.match_length<=5&&(k.strategy===1||k.match_length===j&&4096<k.strstart-k.match_start)&&(k.match_length=j-1)),k.prev_length>=j&&k.match_length<=k.prev_length){for(S=k.strstart+k.lookahead-j,D=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-j),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+j-1])&k.hash_mask,G=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=j-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<j-1?k.strstart:j-1,J===h?(V(k,!0),k.strm.avail_out===0?te:$):k.last_lit&&(V(k,!1),k.strm.avail_out===0)?b:W}function be(k,J,G,D,S){this.good_length=k,this.max_lazy=J,this.nice_length=G,this.max_chain=D,this.func=S}function Pe(){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=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*P),this.dyn_dtree=new i.Buf16(2*(2*E+1)),this.bl_tree=new i.Buf16(2*(2*T+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(O+1),this.heap=new i.Buf16(2*C+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*C+1),Q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Te(k){var J;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=g,(J=k.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?R:F,k.adler=J.wrap===2?0:1,J.last_flush=d,a._tr_init(J),p):Z(k,w)}function Se(k){var J=Te(k);return J===p&&function(G){G.window_size=2*G.w_size,Q(G.head),G.max_lazy_match=o[G.level].max_lazy,G.good_match=o[G.level].good_length,G.nice_match=o[G.level].nice_length,G.max_chain_length=o[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=j-1,G.match_available=0,G.ins_h=0}(k.state),J}function rt(k,J,G,D,S,N){if(!k)return w;var A=1;if(J===m&&(J=6),D<0?(A=0,D=-D):15<D&&(A=2,D-=16),S<1||_<S||G!==v||D<8||15<D||J<0||9<J||N<0||x<N)return Z(k,w);D===8&&(D=9);var Y=new Pe;return(k.state=Y).strm=k,Y.wrap=A,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+j-1)/j),Y.window=new i.Buf8(2*Y.w_size),Y.head=new i.Buf16(Y.hash_size),Y.prev=new i.Buf16(Y.w_size),Y.lit_bufsize=1<<S+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new i.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=J,Y.strategy=N,Y.method=G,Se(k)}o=[new be(0,0,0,0,function(k,J){var G=65535;for(G>k.pending_buf_size-5&&(G=k.pending_buf_size-5);;){if(k.lookahead<=1){if(Ee(k),k.lookahead===0&&J===d)return b;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var D=k.block_start+G;if((k.strstart===0||k.strstart>=D)&&(k.lookahead=k.strstart-D,k.strstart=D,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===h?(V(k,!0),k.strm.avail_out===0?te:$):(k.strstart>k.block_start&&(V(k,!1),k.strm.avail_out),b)}),new be(4,4,8,4,fe),new be(4,5,16,8,fe),new be(4,6,32,32,fe),new be(4,4,16,16,ge),new be(8,16,32,32,ge),new be(8,16,128,128,ge),new be(8,32,128,256,ge),new be(32,128,258,1024,ge),new be(32,258,258,4096,ge)],s.deflateInit=function(k,J){return rt(k,J,v,15,8,0)},s.deflateInit2=rt,s.deflateReset=Se,s.deflateResetKeep=Te,s.deflateSetHeader=function(k,J){return k&&k.state?k.state.wrap!==2?w:(k.state.gzhead=J,p):w},s.deflate=function(k,J){var G,D,S,N;if(!k||!k.state||5<J||J<0)return k?Z(k,w):w;if(D=k.state,!k.output||!k.input&&k.avail_in!==0||D.status===666&&J!==h)return Z(k,k.avail_out===0?-5:w);if(D.strm=k,G=D.last_flush,D.last_flush=J,D.status===R)if(D.wrap===2)k.adler=0,de(D,31),de(D,139),de(D,8),D.gzhead?(de(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)),de(D,255&D.gzhead.time),de(D,D.gzhead.time>>8&255),de(D,D.gzhead.time>>16&255),de(D,D.gzhead.time>>24&255),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(de(D,255&D.gzhead.extra.length),de(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(k.adler=c(k.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(de(D,0),de(D,0),de(D,0),de(D,0),de(D,0),de(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),de(D,3),D.status=F);else{var A=v+(D.w_bits-8<<4)<<8;A|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(A|=32),A+=31-A%31,D.status=F,ne(D,A),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=c(k.adler,D.pending_buf,D.pending-S,S)),z(k),S=D.pending,D.pending!==D.pending_buf_size));)de(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>S&&(k.adler=c(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=c(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,de(D,N)}while(N!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=c(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=c(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,de(D,N)}while(N!==0);D.gzhead.hcrc&&D.pending>S&&(k.adler=c(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&&(de(D,255&k.adler),de(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,p}else if(k.avail_in===0&&I(J)<=I(G)&&J!==h)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!==d&&D.status!==666){var Y=D.strategy===2?function(M,H){for(var X;;){if(M.lookahead===0&&(Ee(M),M.lookahead===0)){if(H===d)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===h?(V(M,!0),M.strm.avail_out===0?te:$):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:W}(D,J):D.strategy===3?function(M,H){for(var X,ee,he,Fe,De=M.window;;){if(M.lookahead<=L){if(Ee(M),M.lookahead<=L&&H===d)return b;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=j&&0<M.strstart&&(ee=De[he=M.strstart-1])===De[++he]&&ee===De[++he]&&ee===De[++he]){Fe=M.strstart+L;do;while(ee===De[++he]&&ee===De[++he]&&ee===De[++he]&&ee===De[++he]&&ee===De[++he]&&ee===De[++he]&&ee===De[++he]&&ee===De[++he]&&he<Fe);M.match_length=L-(Fe-he),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=j?(X=a._tr_tally(M,1,M.match_length-j),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===h?(V(M,!0),M.strm.avail_out===0?te:$):M.last_lit&&(V(M,!1),M.strm.avail_out===0)?b:W}(D,J):o[D.level].func(D,J);if(Y!==te&&Y!==$||(D.status=666),Y===b||Y===te)return k.avail_out===0&&(D.last_flush=-1),p;if(Y===W&&(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,p}return J!==h?p:D.wrap<=0?1:(D.wrap===2?(de(D,255&k.adler),de(D,k.adler>>8&255),de(D,k.adler>>16&255),de(D,k.adler>>24&255),de(D,255&k.total_in),de(D,k.total_in>>8&255),de(D,k.total_in>>16&255),de(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?p:1)},s.deflateEnd=function(k){var J;return k&&k.state?(J=k.state.status)!==R&&J!==69&&J!==73&&J!==91&&J!==103&&J!==F&&J!==666?Z(k,w):(k.state=null,J===F?Z(k,-3):p):w},s.deflateSetDictionary=function(k,J){var G,D,S,N,A,Y,M,H,X=J.length;if(!k||!k.state||(N=(G=k.state).wrap)===2||N===1&&G.status!==R||G.lookahead)return w;for(N===1&&(k.adler=l(k.adler,J,X,0)),G.wrap=0,X>=G.w_size&&(N===0&&(Q(G.head),G.strstart=0,G.block_start=0,G.insert=0),H=new i.Buf8(G.w_size),i.arraySet(H,J,X-G.w_size,G.w_size,0),J=H,X=G.w_size),A=k.avail_in,Y=k.next_in,M=k.input,k.avail_in=X,k.next_in=0,k.input=J,Ee(G);G.lookahead>=j;){for(D=G.strstart,S=G.lookahead-(j-1);G.ins_h=(G.ins_h<<G.hash_shift^G.window[D+j-1])&G.hash_mask,G.prev[D&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=D,D++,--S;);G.strstart=D,G.lookahead=j-1,Ee(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=j-1,G.match_available=0,k.next_in=Y,k.input=M,k.avail_in=A,G.wrap=N,p},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,s){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,n,s){n.exports=function(o,i){var a,l,c,f,d,h,p,w,m,x,g,v,_,C,E,T,P,O,j,L,q,R,F,b,W;a=o.state,l=o.next_in,b=o.input,c=l+(o.avail_in-5),f=o.next_out,W=o.output,d=f-(i-o.avail_out),h=f+(o.avail_out-257),p=a.dmax,w=a.wsize,m=a.whave,x=a.wnext,g=a.window,v=a.hold,_=a.bits,C=a.lencode,E=a.distcode,T=(1<<a.lenbits)-1,P=(1<<a.distbits)-1;e:do{_<15&&(v+=b[l++]<<_,_+=8,v+=b[l++]<<_,_+=8),O=C[v&T];t:for(;;){if(v>>>=j=O>>>24,_-=j,(j=O>>>16&255)===0)W[f++]=65535&O;else{if(!(16&j)){if(!(64&j)){O=C[(65535&O)+(v&(1<<j)-1)];continue t}if(32&j){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}L=65535&O,(j&=15)&&(_<j&&(v+=b[l++]<<_,_+=8),L+=v&(1<<j)-1,v>>>=j,_-=j),_<15&&(v+=b[l++]<<_,_+=8,v+=b[l++]<<_,_+=8),O=E[v&P];r:for(;;){if(v>>>=j=O>>>24,_-=j,!(16&(j=O>>>16&255))){if(!(64&j)){O=E[(65535&O)+(v&(1<<j)-1)];continue r}o.msg="invalid distance code",a.mode=30;break e}if(q=65535&O,_<(j&=15)&&(v+=b[l++]<<_,(_+=8)<j&&(v+=b[l++]<<_,_+=8)),p<(q+=v&(1<<j)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(v>>>=j,_-=j,(j=f-d)<q){if(m<(j=q-j)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(F=g,(R=0)===x){if(R+=w-j,j<L){for(L-=j;W[f++]=g[R++],--j;);R=f-q,F=W}}else if(x<j){if(R+=w+x-j,(j-=x)<L){for(L-=j;W[f++]=g[R++],--j;);if(R=0,x<L){for(L-=j=x;W[f++]=g[R++],--j;);R=f-q,F=W}}}else if(R+=x-j,j<L){for(L-=j;W[f++]=g[R++],--j;);R=f-q,F=W}for(;2<L;)W[f++]=F[R++],W[f++]=F[R++],W[f++]=F[R++],L-=3;L&&(W[f++]=F[R++],1<L&&(W[f++]=F[R++]))}else{for(R=f-q;W[f++]=W[R++],W[f++]=W[R++],W[f++]=W[R++],2<(L-=3););L&&(W[f++]=W[R++],1<L&&(W[f++]=W[R++]))}break}}break}}while(l<c&&f<h);l-=L=_>>3,v&=(1<<(_-=L<<3))-1,o.next_in=l,o.next_out=f,o.avail_in=l<c?c-l+5:5-(l-c),o.avail_out=f<h?h-f+257:257-(f-h),a.hold=v,a.bits=_}},{}],49:[function(r,n,s){var o=r("../utils/common"),i=r("./adler32"),a=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),f=1,d=2,h=0,p=-2,w=1,m=852,x=592;function g(R){return(R>>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(R){var F;return R&&R.state?(F=R.state,R.total_in=R.total_out=F.total=0,R.msg="",F.wrap&&(R.adler=1&F.wrap),F.mode=w,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new o.Buf32(m),F.distcode=F.distdyn=new o.Buf32(x),F.sane=1,F.back=-1,h):p}function C(R){var F;return R&&R.state?((F=R.state).wsize=0,F.whave=0,F.wnext=0,_(R)):p}function E(R,F){var b,W;return R&&R.state?(W=R.state,F<0?(b=0,F=-F):(b=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?p:(W.window!==null&&W.wbits!==F&&(W.window=null),W.wrap=b,W.wbits=F,C(R))):p}function T(R,F){var b,W;return R?(W=new v,(R.state=W).window=null,(b=E(R,F))!==h&&(R.state=null),b):p}var P,O,j=!0;function L(R){if(j){var F;for(P=new o.Buf32(512),O=new o.Buf32(32),F=0;F<144;)R.lens[F++]=8;for(;F<256;)R.lens[F++]=9;for(;F<280;)R.lens[F++]=7;for(;F<288;)R.lens[F++]=8;for(c(f,R.lens,0,288,P,0,R.work,{bits:9}),F=0;F<32;)R.lens[F++]=5;c(d,R.lens,0,32,O,0,R.work,{bits:5}),j=!1}R.lencode=P,R.lenbits=9,R.distcode=O,R.distbits=5}function q(R,F,b,W){var te,$=R.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new o.Buf8($.wsize)),W>=$.wsize?(o.arraySet($.window,F,b-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(W<(te=$.wsize-$.wnext)&&(te=W),o.arraySet($.window,F,b-W,te,$.wnext),(W-=te)?(o.arraySet($.window,F,b-W,W,0),$.wnext=W,$.whave=$.wsize):($.wnext+=te,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=te))),0}s.inflateReset=C,s.inflateReset2=E,s.inflateResetKeep=_,s.inflateInit=function(R){return T(R,15)},s.inflateInit2=T,s.inflate=function(R,F){var b,W,te,$,Z,I,Q,z,V,de,ne,se,Ee,fe,ge,be,Pe,Te,Se,rt,k,J,G,D,S=0,N=new o.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!R||!R.state||!R.output||!R.input&&R.avail_in!==0)return p;(b=R.state).mode===12&&(b.mode=13),Z=R.next_out,te=R.output,Q=R.avail_out,$=R.next_in,W=R.input,I=R.avail_in,z=b.hold,V=b.bits,de=I,ne=Q,J=h;e:for(;;)switch(b.mode){case w:if(b.wrap===0){b.mode=13;break}for(;V<16;){if(I===0)break e;I--,z+=W[$++]<<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){R.msg="incorrect header check",b.mode=30;break}if((15&z)!=8){R.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){R.msg="invalid window size",b.mode=30;break}b.dmax=1<<k,R.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+=W[$++]<<V,V+=8}if(b.flags=z,(255&b.flags)!=8){R.msg="unknown compression method",b.mode=30;break}if(57344&b.flags){R.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+=W[$++]<<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+=W[$++]<<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+=W[$++]<<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)),o.arraySet(b.head.extra,W,$,se,k)),512&b.flags&&(b.check=a(b.check,W,se,$)),I-=se,$+=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=W[$+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,W,se,$)),I-=se,$+=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=W[$+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,W,se,$)),I-=se,$+=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+=W[$++]<<V,V+=8}if(z!==(65535&b.check)){R.msg="header crc mismatch",b.mode=30;break}V=z=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0),R.adler=b.check=0,b.mode=12;break;case 10:for(;V<32;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}R.adler=b.check=g(z),V=z=0,b.mode=11;case 11:if(b.havedict===0)return R.next_out=Z,R.avail_out=Q,R.next_in=$,R.avail_in=I,b.hold=z,b.bits=V,2;R.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+=W[$++]<<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:R.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+=W[$++]<<V,V+=8}if((65535&z)!=(z>>>16^65535)){R.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;o.arraySet(te,W,$,se,Z),I-=se,$+=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+=W[$++]<<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){R.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+=W[$++]<<V,V+=8}b.lens[A[b.have++]]=7&z,z>>>=3,V-=3}for(;b.have<19;)b.lens[A[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,G={bits:b.lenbits},J=c(0,b.lens,0,19,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.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(;be=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Pe=65535&S,!((ge=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(Pe<16)z>>>=ge,V-=ge,b.lens[b.have++]=Pe;else{if(Pe===16){for(D=ge+2;V<D;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(z>>>=ge,V-=ge,b.have===0){R.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(Pe===17){for(D=ge+3;V<D;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}V-=ge,k=0,se=3+(7&(z>>>=ge)),z>>>=3,V-=3}else{for(D=ge+7;V<D;){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}V-=ge,k=0,se=11+(127&(z>>>=ge)),z>>>=7,V-=7}if(b.have+se>b.nlen+b.ndist){R.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){R.msg="invalid code -- missing end-of-block",b.mode=30;break}if(b.lenbits=9,G={bits:b.lenbits},J=c(f,b.lens,0,b.nlen,b.lencode,0,b.work,G),b.lenbits=G.bits,J){R.msg="invalid literal/lengths set",b.mode=30;break}if(b.distbits=6,b.distcode=b.distdyn,G={bits:b.distbits},J=c(d,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,G),b.distbits=G.bits,J){R.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){R.next_out=Z,R.avail_out=Q,R.next_in=$,R.avail_in=I,b.hold=z,b.bits=V,l(R,ne),Z=R.next_out,te=R.output,Q=R.avail_out,$=R.next_in,W=R.input,I=R.avail_in,z=b.hold,V=b.bits,b.mode===12&&(b.back=-1);break}for(b.back=0;be=(S=b.lencode[z&(1<<b.lenbits)-1])>>>16&255,Pe=65535&S,!((ge=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(be&&!(240&be)){for(Te=ge,Se=be,rt=Pe;be=(S=b.lencode[rt+((z&(1<<Te+Se)-1)>>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}z>>>=Te,V-=Te,b.back+=Te}if(z>>>=ge,V-=ge,b.back+=ge,b.length=Pe,be===0){b.mode=26;break}if(32&be){b.back=-1,b.mode=12;break}if(64&be){R.msg="invalid literal/length code",b.mode=30;break}b.extra=15&be,b.mode=22;case 22:if(b.extra){for(D=b.extra;V<D;){if(I===0)break e;I--,z+=W[$++]<<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(;be=(S=b.distcode[z&(1<<b.distbits)-1])>>>16&255,Pe=65535&S,!((ge=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}if(!(240&be)){for(Te=ge,Se=be,rt=Pe;be=(S=b.distcode[rt+((z&(1<<Te+Se)-1)>>Te)])>>>16&255,Pe=65535&S,!(Te+(ge=S>>>24)<=V);){if(I===0)break e;I--,z+=W[$++]<<V,V+=8}z>>>=Te,V-=Te,b.back+=Te}if(z>>>=ge,V-=ge,b.back+=ge,64&be){R.msg="invalid distance code",b.mode=30;break}b.offset=Pe,b.extra=15&be,b.mode=24;case 24:if(b.extra){for(D=b.extra;V<D;){if(I===0)break e;I--,z+=W[$++]<<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){R.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){R.msg="invalid distance too far back",b.mode=30;break}Ee=se>b.wnext?(se-=b.wnext,b.wsize-se):b.wnext-se,se>b.length&&(se=b.length),fe=b.window}else fe=te,Ee=Z-b.offset,se=b.length;for(Q<se&&(se=Q),Q-=se,b.length-=se;te[Z++]=fe[Ee++],--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|=W[$++]<<V,V+=8}if(ne-=Q,R.total_out+=ne,b.total+=ne,ne&&(R.adler=b.check=b.flags?a(b.check,te,ne,Z-ne):i(b.check,te,ne,Z-ne)),ne=Q,(b.flags?z:g(z))!==b.check){R.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+=W[$++]<<V,V+=8}if(z!==(4294967295&b.total)){R.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 p}return R.next_out=Z,R.avail_out=Q,R.next_in=$,R.avail_in=I,b.hold=z,b.bits=V,(b.wsize||ne!==R.avail_out&&b.mode<30&&(b.mode<27||F!==4))&&q(R,R.output,R.next_out,ne-R.avail_out)?(b.mode=31,-4):(de-=R.avail_in,ne-=R.avail_out,R.total_in+=de,R.total_out+=ne,b.total+=ne,b.wrap&&ne&&(R.adler=b.check=b.flags?a(b.check,te,ne,R.next_out-ne):i(b.check,te,ne,R.next_out-ne)),R.data_type=b.bits+(b.last?64:0)+(b.mode===12?128:0)+(b.mode===20||b.mode===15?256:0),(de==0&&ne===0||F===4)&&J===h&&(J=-5),J)},s.inflateEnd=function(R){if(!R||!R.state)return p;var F=R.state;return F.window&&(F.window=null),R.state=null,h},s.inflateGetHeader=function(R,F){var b;return R&&R.state&&2&(b=R.state).wrap?((b.head=F).done=!1,h):p},s.inflateSetDictionary=function(R,F){var b,W=F.length;return R&&R.state?(b=R.state).wrap!==0&&b.mode!==11?p:b.mode===11&&i(1,F,W,0)!==b.check?-3:q(R,F,W,W)?(b.mode=31,-4):(b.havedict=1,h):p},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,s){var o=r("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],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],c=[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(f,d,h,p,w,m,x,g){var v,_,C,E,T,P,O,j,L,q=g.bits,R=0,F=0,b=0,W=0,te=0,$=0,Z=0,I=0,Q=0,z=0,V=null,de=0,ne=new o.Buf16(16),se=new o.Buf16(16),Ee=null,fe=0;for(R=0;R<=15;R++)ne[R]=0;for(F=0;F<p;F++)ne[d[h+F]]++;for(te=q,W=15;1<=W&&ne[W]===0;W--);if(W<te&&(te=W),W===0)return w[m++]=20971520,w[m++]=20971520,g.bits=1,0;for(b=1;b<W&&ne[b]===0;b++);for(te<b&&(te=b),R=I=1;R<=15;R++)if(I<<=1,(I-=ne[R])<0)return-1;if(0<I&&(f===0||W!==1))return-1;for(se[1]=0,R=1;R<15;R++)se[R+1]=se[R]+ne[R];for(F=0;F<p;F++)d[h+F]!==0&&(x[se[d[h+F]]++]=F);if(P=f===0?(V=Ee=x,19):f===1?(V=i,de-=257,Ee=a,fe-=257,256):(V=l,Ee=c,-1),R=b,T=m,Z=F=z=0,C=-1,E=(Q=1<<($=te))-1,f===1&&852<Q||f===2&&592<Q)return 1;for(;;){for(O=R-Z,L=x[F]<P?(j=0,x[F]):x[F]>P?(j=Ee[fe+x[F]],V[de+x[F]]):(j=96,0),v=1<<R-Z,b=_=1<<$;w[T+(z>>Z)+(_-=v)]=O<<24|j<<16|L|0,_!==0;);for(v=1<<R-1;z&v;)v>>=1;if(v!==0?(z&=v-1,z+=v):z=0,F++,--ne[R]==0){if(R===W)break;R=d[h+x[F]]}if(te<R&&(z&E)!==C){for(Z===0&&(Z=te),T+=b,I=1<<($=R-Z);$+Z<W&&!((I-=ne[$+Z])<=0);)$++,I<<=1;if(Q+=1<<$,f===1&&852<Q||f===2&&592<Q)return 1;w[C=z&E]=te<<24|$<<16|T-m|0}}return z!==0&&(w[T+z]=R-Z<<24|64<<16|0),g.bits=te,0}},{"../utils/common":41}],51:[function(r,n,s){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,n,s){var o=r("../utils/common"),i=0,a=1;function l(S){for(var N=S.length;0<=--N;)S[N]=0}var c=0,f=29,d=256,h=d+1+f,p=30,w=19,m=2*h+1,x=15,g=16,v=7,_=256,C=16,E=17,T=18,P=[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],O=[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],j=[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*(h+2));l(q);var R=new Array(2*p);l(R);var F=new Array(512);l(F);var b=new Array(256);l(b);var W=new Array(f);l(W);var te,$,Z,I=new Array(p);function Q(S,N,A,Y,M){this.static_tree=S,this.extra_bits=N,this.extra_base=A,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 de(S,N){S.pending_buf[S.pending++]=255&N,S.pending_buf[S.pending++]=N>>>8&255}function ne(S,N,A){S.bi_valid>g-A?(S.bi_buf|=N<<S.bi_valid&65535,de(S,S.bi_buf),S.bi_buf=N>>g-S.bi_valid,S.bi_valid+=A-g):(S.bi_buf|=N<<S.bi_valid&65535,S.bi_valid+=A)}function se(S,N,A){ne(S,A[2*N],A[2*N+1])}function Ee(S,N){for(var A=0;A|=1&S,S>>>=1,A<<=1,0<--N;);return A>>>1}function fe(S,N,A){var Y,M,H=new Array(x+1),X=0;for(Y=1;Y<=x;Y++)H[Y]=X=X+A[Y-1]<<1;for(M=0;M<=N;M++){var ee=S[2*M+1];ee!==0&&(S[2*M]=Ee(H[ee]++,ee))}}function ge(S){var N;for(N=0;N<h;N++)S.dyn_ltree[2*N]=0;for(N=0;N<p;N++)S.dyn_dtree[2*N]=0;for(N=0;N<w;N++)S.bl_tree[2*N]=0;S.dyn_ltree[2*_]=1,S.opt_len=S.static_len=0,S.last_lit=S.matches=0}function be(S){8<S.bi_valid?de(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 Pe(S,N,A,Y){var M=2*N,H=2*A;return S[M]<S[H]||S[M]===S[H]&&Y[N]<=Y[A]}function Te(S,N,A){for(var Y=S.heap[A],M=A<<1;M<=S.heap_len&&(M<S.heap_len&&Pe(N,S.heap[M+1],S.heap[M],S.depth)&&M++,!Pe(N,Y,S.heap[M],S.depth));)S.heap[A]=S.heap[M],A=M,M<<=1;S.heap[A]=Y}function Se(S,N,A){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])+d+1,N),(X=P[H])!==0&&ne(S,M-=W[H],X),se(S,H=V(--Y),A),(X=O[H])!==0&&ne(S,Y-=I[H],X)),ee<S.last_lit;);se(S,_,N)}function rt(S,N){var A,Y,M,H=N.dyn_tree,X=N.stat_desc.static_tree,ee=N.stat_desc.has_stree,he=N.stat_desc.elems,Fe=-1;for(S.heap_len=0,S.heap_max=m,A=0;A<he;A++)H[2*A]!==0?(S.heap[++S.heap_len]=Fe=A,S.depth[A]=0):H[2*A+1]=0;for(;S.heap_len<2;)H[2*(M=S.heap[++S.heap_len]=Fe<2?++Fe:0)]=1,S.depth[M]=0,S.opt_len--,ee&&(S.static_len-=X[2*M+1]);for(N.max_code=Fe,A=S.heap_len>>1;1<=A;A--)Te(S,H,A);for(M=he;A=S.heap[1],S.heap[1]=S.heap[S.heap_len--],Te(S,H,1),Y=S.heap[1],S.heap[--S.heap_max]=A,S.heap[--S.heap_max]=Y,H[2*M]=H[2*A]+H[2*Y],S.depth[M]=(S.depth[A]>=S.depth[Y]?S.depth[A]:S.depth[Y])+1,H[2*A+1]=H[2*Y+1]=M,S.heap[1]=M++,Te(S,H,1),2<=S.heap_len;);S.heap[--S.heap_max]=S.heap[1],function(De,kt){var Vr,$t,Wn,ot,$n,Bn,Wr=kt.dyn_tree,Sc=kt.max_code,kc=kt.stat_desc.static_tree,ri=kt.stat_desc.has_stree,Cc=kt.stat_desc.extra_bits,ni=kt.stat_desc.extra_base,_n=kt.stat_desc.max_length,Ts=0;for(ot=0;ot<=x;ot++)De.bl_count[ot]=0;for(Wr[2*De.heap[De.heap_max]+1]=0,Vr=De.heap_max+1;Vr<m;Vr++)_n<(ot=Wr[2*Wr[2*($t=De.heap[Vr])+1]+1]+1)&&(ot=_n,Ts++),Wr[2*$t+1]=ot,Sc<$t||(De.bl_count[ot]++,$n=0,ni<=$t&&($n=Cc[$t-ni]),Bn=Wr[2*$t],De.opt_len+=Bn*(ot+$n),ri&&(De.static_len+=Bn*(kc[2*$t+1]+$n)));if(Ts!==0){do{for(ot=_n-1;De.bl_count[ot]===0;)ot--;De.bl_count[ot]--,De.bl_count[ot+1]+=2,De.bl_count[_n]--,Ts-=2}while(0<Ts);for(ot=_n;ot!==0;ot--)for($t=De.bl_count[ot];$t!==0;)Sc<(Wn=De.heap[--Vr])||(Wr[2*Wn+1]!==ot&&(De.opt_len+=(ot-Wr[2*Wn+1])*Wr[2*Wn],Wr[2*Wn+1]=ot),$t--)}}(S,N),fe(H,Fe,S.bl_count)}function k(S,N,A){var Y,M,H=-1,X=N[1],ee=0,he=7,Fe=4;for(X===0&&(he=138,Fe=3),N[2*(A+1)+1]=65535,Y=0;Y<=A;Y++)M=X,X=N[2*(Y+1)+1],++ee<he&&M===X||(ee<Fe?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*T]++,H=M,Fe=(ee=0)===X?(he=138,3):M===X?(he=6,3):(he=7,4))}function J(S,N,A){var Y,M,H=-1,X=N[1],ee=0,he=7,Fe=4;for(X===0&&(he=138,Fe=3),Y=0;Y<=A;Y++)if(M=X,X=N[2*(Y+1)+1],!(++ee<he&&M===X)){if(ee<Fe)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,T,S.bl_tree),ne(S,ee-11,7));H=M,Fe=(ee=0)===X?(he=138,3):M===X?(he=6,3):(he=7,4)}}l(I);var G=!1;function D(S,N,A,Y){ne(S,(c<<1)+(Y?1:0),3),function(M,H,X,ee){be(M),de(M,X),de(M,~X),o.arraySet(M.pending_buf,M.window,H,X,M.pending),M.pending+=X}(S,N,A)}s._tr_init=function(S){G||(function(){var N,A,Y,M,H,X=new Array(x+1);for(M=Y=0;M<f-1;M++)for(W[M]=Y,N=0;N<1<<P[M];N++)b[Y++]=M;for(b[Y-1]=M,M=H=0;M<16;M++)for(I[M]=H,N=0;N<1<<O[M];N++)F[H++]=M;for(H>>=7;M<p;M++)for(I[M]=H<<7,N=0;N<1<<O[M]-7;N++)F[256+H++]=M;for(A=0;A<=x;A++)X[A]=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(fe(q,h+1,X),N=0;N<p;N++)R[2*N+1]=5,R[2*N]=Ee(N,5);te=new Q(q,P,d+1,h,x),$=new Q(R,O,0,p,x),Z=new Q(new Array(0),j,0,w,v)}(),G=!0),S.l_desc=new z(S.dyn_ltree,te),S.d_desc=new z(S.dyn_dtree,$),S.bl_desc=new z(S.bl_tree,Z),S.bi_buf=0,S.bi_valid=0,ge(S)},s._tr_stored_block=D,s._tr_flush_block=function(S,N,A,Y){var M,H,X=0;0<S.level?(S.strm.data_type===2&&(S.strm.data_type=function(ee){var he,Fe=4093624447;for(he=0;he<=31;he++,Fe>>>=1)if(1&Fe&&ee.dyn_ltree[2*he]!==0)return i;if(ee.dyn_ltree[18]!==0||ee.dyn_ltree[20]!==0||ee.dyn_ltree[26]!==0)return a;for(he=32;he<d;he++)if(ee.dyn_ltree[2*he]!==0)return a;return i}(S)),rt(S,S.l_desc),rt(S,S.d_desc),X=function(ee){var he;for(k(ee,ee.dyn_ltree,ee.l_desc.max_code),k(ee,ee.dyn_dtree,ee.d_desc.max_code),rt(ee,ee.bl_desc),he=w-1;3<=he&&ee.bl_tree[2*L[he]+1]===0;he--);return ee.opt_len+=3*(he+1)+5+5+4,he}(S),M=S.opt_len+3+7>>>3,(H=S.static_len+3+7>>>3)<=M&&(M=H)):M=H=A+5,A+4<=M&&N!==-1?D(S,N,A,Y):S.strategy===4||H===M?(ne(S,2+(Y?1:0),3),Se(S,q,R)):(ne(S,4+(Y?1:0),3),function(ee,he,Fe,De){var kt;for(ne(ee,he-257,5),ne(ee,Fe-1,5),ne(ee,De-4,4),kt=0;kt<De;kt++)ne(ee,ee.bl_tree[2*L[kt]+1],3);J(ee,ee.dyn_ltree,he-1),J(ee,ee.dyn_dtree,Fe-1)}(S,S.l_desc.max_code+1,S.d_desc.max_code+1,X+1),Se(S,S.dyn_ltree,S.dyn_dtree)),ge(S),Y&&be(S)},s._tr_tally=function(S,N,A){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&A,S.last_lit++,N===0?S.dyn_ltree[2*A]++:(S.matches++,N--,S.dyn_ltree[2*(b[A]+d+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,_,q),function(N){N.bi_valid===16?(de(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(o){(function(i,a){if(!i.setImmediate){var l,c,f,d,h=1,p={},w=!1,m=i.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(i);x=x&&x.setTimeout?x:i,l={}.toString.call(i.process)==="[object process]"?function(C){process.nextTick(function(){v(C)})}:function(){if(i.postMessage&&!i.importScripts){var C=!0,E=i.onmessage;return i.onmessage=function(){C=!1},i.postMessage("","*"),i.onmessage=E,C}}()?(d="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(C){i.postMessage(d+C,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(C){v(C.data)},function(C){f.port2.postMessage(C)}):m&&"onreadystatechange"in m.createElement("script")?(c=m.documentElement,function(C){var E=m.createElement("script");E.onreadystatechange=function(){v(C),E.onreadystatechange=null,c.removeChild(E),E=null},c.appendChild(E)}):function(C){setTimeout(v,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var E=new Array(arguments.length-1),T=0;T<E.length;T++)E[T]=arguments[T+1];var P={callback:C,args:E};return p[h]=P,l(h),h++},x.clearImmediate=g}function g(C){delete p[C]}function v(C){if(w)setTimeout(v,0,C);else{var E=p[C];if(E){w=!0;try{(function(T){var P=T.callback,O=T.args;switch(O.length){case 0:P();break;case 1:P(O[0]);break;case 2:P(O[0],O[1]);break;case 3:P(O[0],O[1],O[2]);break;default:P.apply(a,O)}})(E)}finally{g(C),w=!1}}}}function _(C){C.source===i&&typeof C.data=="string"&&C.data.indexOf(d)===0&&v(+C.data.slice(d.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Pc<"u"?Pc:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(xC);var n5=xC.exports;const s5=fm(n5);function o5(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 i5=async(e,t)=>{const r=new s5;t.forEach(o=>{r.file(o.name,o.content)});const n=await r.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=e,s.click()},Fl=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)},a5=e=>Fl(e).split(" ")[0],l5=async()=>Dt().collection("domains").getFullList({sort:"-created",expand:"lastDeployment"}),c5=async e=>await Dt().collection("domains").getOne(e),Jp=async e=>e.id?await Dt().collection("domains").update(e.id,e):await Dt().collection("domains").create(e),u5=async e=>await Dt().collection("domains").delete(e),d5=(e,t)=>Dt().collection("domains").subscribe(e,r=>{r.action==="update"&&t(r.record)},{expand:"lastDeployment"}),f5=e=>{Dt().collection("domains").unsubscribe(e)},h5=()=>{const e=Cf(),t=bs(),r=()=>{t("/edit")},n=d=>{t(`/edit?id=${d}`)},s=d=>{t(`/history?domain=${d}`)},o=async d=>{try{await u5(d),a(i.filter(h=>h.id!==d))}catch(h){console.error("Error deleting domain:",h)}},[i,a]=y.useState([]);y.useEffect(()=>{(async()=>{const h=await l5();a(h)})()},[]);const l=async d=>{const h=i.filter(x=>x.id===d),p=h[0].enabled,w=h[0];w.enabled=!p,await Jp(w);const m=i.map(x=>x.id===d?{...x,checked:!p}:x);a(m)},c=async d=>{try{f5(d.id),d5(d.id,h=>{console.log(h);const p=i.map(w=>w.id===h.id?{...h}:w);a(p)}),d.rightnow=!0,await Jp(d),e.toast({title:"操作成功",description:"已发起部署,请稍后查看部署日志。"})}catch{e.toast({title:"执行失败",description:u.jsxs(u.Fragment,{children:["执行失败,请查看",u.jsx(Kn,{to:`/history?domain=${d.id}`,className:"underline text-blue-500",children:"部署日志"}),"查看详情。"]}),variant:"destructive"})}},f=async d=>{const h=`${d.id}-${d.domain}.zip`,p=[{name:`${d.domain}.pem`,content:d.certificate?d.certificate:""},{name:`${d.domain}.key`,content:d.privateKey?d.privateKey:""}];await i5(h,p)};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(_v,{}),u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"域名列表"}),u.jsx(xt,{onClick:r,children:"新增域名"})]}),i.length?u.jsxs(u.Fragment,{children:[u.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:[u.jsx("div",{className:"w-40",children:"域名"}),u.jsx("div",{className:"w-48",children:"有效期限"}),u.jsx("div",{className:"w-32",children:"最近执行状态"}),u.jsx("div",{className:"w-64",children:"最近执行阶段"}),u.jsx("div",{className:"w-40 sm:ml-2",children:"最近执行时间"}),u.jsx("div",{className:"w-32",children:"是否启用"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"域名"}),i.map(d=>{var h,p,w,m,x,g;return u.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:[u.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:d.domain}),u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx("div",{children:d.expiredAt?u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"有效期90天"}),u.jsxs("div",{children:[a5(d.expiredAt),"到期"]})]}):"---"})}),u.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((h=d.expand)!=null&&h.lastDeployment)?u.jsx(u.Fragment,{children:((p=d.expand.lastDeployment)==null?void 0:p.phase)==="deploy"&&((w=d.expand.lastDeployment)!=null&&w.phaseSuccess)?u.jsx(X_,{size:16,className:"text-green-700"}):u.jsx(Q_,{size:16,className:"text-red-700"})}):"---"}),u.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:d.lastDeployedAt&&((m=d.expand)!=null&&m.lastDeployment)?u.jsx(lk,{phase:(x=d.expand.lastDeployment)==null?void 0:x.phase,phaseSuccess:(g=d.expand.lastDeployment)==null?void 0:g.phaseSuccess}):"---"}),u.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:d.lastDeployedAt?Fl(d.lastDeployedAt):"---"}),u.jsx("div",{className:"sm:w-32 flex items-center",children:u.jsx(pC,{children:u.jsxs(e5,{children:[u.jsx(t5,{children:u.jsx(Wk,{checked:d.enabled,onCheckedChange:()=>{l(d.id)}})}),u.jsx(Sv,{children:u.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:d.enabled?"禁用":"启用"})})]})})}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(xt,{variant:"link",className:"p-0",onClick:()=>s(d.id),children:"部署历史"}),u.jsxs(tw,{when:!!d.enabled,children:[u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(xt,{variant:"link",className:"p-0",onClick:()=>c(d),children:"立即部署"})]}),u.jsxs(tw,{when:!!d.expiredAt,children:[u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(xt,{variant:"link",className:"p-0",onClick:()=>f(d),children:"下载"})]}),!d.enabled&&u.jsxs(u.Fragment,{children:[u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsxs(t3,{children:[u.jsx(r3,{asChild:!0,children:u.jsx(xt,{variant:"link",className:"p-0",children:"删除"})}),u.jsxs(Nk,{children:[u.jsxs(Pk,{children:[u.jsx(Dk,{children:"删除域名"}),u.jsx(Ok,{children:"确定要删除域名吗?"})]}),u.jsxs(jk,{children:[u.jsx(Mk,{children:"取消"}),u.jsx(Ak,{onClick:()=>{o(d.id)},children:"确认"})]})]})]}),u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(xt,{variant:"link",className:"p-0",onClick:()=>n(d.id),children:"编辑"})]})]})]},d.id)})]}):u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(Dp,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加域名开始部署证书吧。"}),u.jsx(xt,{onClick:r,className:"mt-3",children:"添加域名"})]})})]})})},Je=y.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:_e("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}));Je.displayName="Input";var wc=e=>e.type==="checkbox",Pi=e=>e instanceof Date,fr=e=>e==null;const _C=e=>typeof e=="object";var Kt=e=>!fr(e)&&!Array.isArray(e)&&_C(e)&&!Pi(e),bC=e=>Kt(e)&&e.target?wc(e.target)?e.target.checked:e.target.value:e,p5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,SC=(e,t)=>e.has(p5(t)),m5=e=>{const t=e.constructor&&e.constructor.prototype;return Kt(t)&&t.hasOwnProperty("isPrototypeOf")},kv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function wr(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(!(kv&&(e instanceof Blob||e instanceof FileList))&&(r||Kt(e)))if(t=r?[]:{},!r&&!m5(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=wr(e[n]));else return e;return t}var Pf=e=>Array.isArray(e)?e.filter(Boolean):[],Lt=e=>e===void 0,le=(e,t,r)=>{if(!t||!Kt(e))return r;const n=Pf(t.split(/[,[\].]+?/)).reduce((s,o)=>fr(s)?s:s[o],e);return Lt(n)||n===e?Lt(e[t])?r:e[t]:n},Rn=e=>typeof e=="boolean",Cv=e=>/^\w*$/.test(e),kC=e=>Pf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ut=(e,t,r)=>{let n=-1;const s=Cv(t)?[t]:kC(t),o=s.length,i=o-1;for(;++n<o;){const a=s[n];let l=r;if(n!==i){const c=e[a];l=Kt(c)||Array.isArray(c)?c:isNaN(+s[n+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const yd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},an={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Gn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},CC=et.createContext(null),jf=()=>et.useContext(CC),g5=e=>{const{children:t,...r}=e;return et.createElement(CC.Provider,{value:r},t)};var EC=(e,t,r,n=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==an.all&&(t._proxyFormState[i]=!n||an.all),r&&(r[i]=!0),e[i]}});return s},Rr=e=>Kt(e)&&!Object.keys(e).length,TC=(e,t,r,n)=>{r(e);const{name:s,...o}=e;return Rr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!n||an.all))},nl=e=>Array.isArray(e)?e:[e],RC=(e,t,r)=>!e||!t||e===t||nl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function Ev(e){const t=et.useRef(e);t.current=e,et.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function v5(e){const t=jf(),{control:r=t.control,disabled:n,name:s,exact:o}=e||{},[i,a]=et.useState(r._formState),l=et.useRef(!0),c=et.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=et.useRef(s);return f.current=s,Ev({disabled:n,next:d=>l.current&&RC(f.current,d.name,o)&&TC(d,c.current,r._updateFormState)&&a({...r._formState,...d}),subject:r._subjects.state}),et.useEffect(()=>(l.current=!0,c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),EC(i,r,c.current,!1)}var Pn=e=>typeof e=="string",NC=(e,t,r,n,s)=>Pn(e)?(n&&t.watch.add(e),le(r,e,s)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),le(r,o))):(n&&(t.watchAll=!0),r);function y5(e){const t=jf(),{control:r=t.control,name:n,defaultValue:s,disabled:o,exact:i}=e||{},a=et.useRef(n);a.current=n,Ev({disabled:o,subject:r._subjects.values,next:f=>{RC(a.current,f.name,i)&&c(wr(NC(a.current,r._names,f.values||r._formValues,!1,s)))}});const[l,c]=et.useState(r._getWatch(n,s));return et.useEffect(()=>r._removeUnmounted()),l}function w5(e){const t=jf(),{name:r,disabled:n,control:s=t.control,shouldUnregister:o}=e,i=SC(s._names.array,r),a=y5({control:s,name:r,defaultValue:le(s._formValues,r,le(s._defaultValues,r,e.defaultValue)),exact:!0}),l=v5({control:s,name:r}),c=et.useRef(s.register(r,{...e.rules,value:a,...Rn(e.disabled)?{disabled:e.disabled}:{}}));return et.useEffect(()=>{const f=s._options.shouldUnregister||o,d=(h,p)=>{const w=le(s._fields,h);w&&w._f&&(w._f.mount=p)};if(d(r,!0),f){const h=wr(le(s._options.defaultValues,r));ut(s._defaultValues,r,h),Lt(le(s._formValues,r))&&ut(s._formValues,r,h)}return()=>{(i?f&&!s._state.action:f)?s.unregister(r):d(r,!1)}},[r,s,i,o]),et.useEffect(()=>{le(s._fields,r)&&s._updateDisabledField({disabled:n,fields:s._fields,name:r,value:le(s._fields,r)._f.value})},[n,r,s]),{field:{name:r,value:a,...Rn(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:et.useCallback(f=>c.current.onChange({target:{value:bC(f),name:r},type:yd.CHANGE}),[r]),onBlur:et.useCallback(()=>c.current.onBlur({target:{value:le(s._formValues,r),name:r},type:yd.BLUR}),[r,s]),ref:f=>{const d=le(s._fields,r);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!le(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!le(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!le(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!le(l.validatingFields,r)},error:{enumerable:!0,get:()=>le(l.errors,r)}})}}const x5=e=>e.render(w5(e));var PC=(e,t,r,n,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:s||!0}}:{},sw=e=>({isOnSubmit:!e||e===an.onSubmit,isOnBlur:e===an.onBlur,isOnChange:e===an.onChange,isOnAll:e===an.all,isOnTouch:e===an.onTouched}),ow=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const sl=(e,t,r,n)=>{for(const s of r||Object.keys(e)){const o=le(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!n)break;if(i.ref&&t(i.ref,i.name)&&!n)break;sl(a,t)}else Kt(a)&&sl(a,t)}}};var _5=(e,t,r)=>{const n=nl(le(e,r));return ut(n,"root",t[r]),ut(e,r,n),e},Tv=e=>e.type==="file",$s=e=>typeof e=="function",wd=e=>{if(!kv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Nu=e=>Pn(e),Rv=e=>e.type==="radio",xd=e=>e instanceof RegExp;const iw={value:!1,isValid:!1},aw={value:!0,isValid:!0};var jC=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&&!Lt(e[0].attributes.value)?Lt(e[0].value)||e[0].value===""?aw:{value:e[0].value,isValid:!0}:aw:iw}return iw};const lw={isValid:!1,value:null};var DC=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,lw):lw;function cw(e,t,r="validate"){if(Nu(e)||Array.isArray(e)&&e.every(Nu)||Rn(e)&&!e)return{type:r,message:Nu(e)?e:"",ref:t}}var hi=e=>Kt(e)&&!xd(e)?e:{value:e,message:""},uw=async(e,t,r,n,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:f,max:d,pattern:h,validate:p,name:w,valueAsNumber:m,mount:x,disabled:g}=e._f,v=le(t,w);if(!x||g)return{};const _=i?i[0]:o,C=R=>{n&&_.reportValidity&&(_.setCustomValidity(Rn(R)?"":R||""),_.reportValidity())},E={},T=Rv(o),P=wc(o),O=T||P,j=(m||Tv(o))&&Lt(o.value)&&Lt(v)||wd(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,L=PC.bind(null,w,r,E),q=(R,F,b,W=Gn.maxLength,te=Gn.minLength)=>{const $=R?F:b;E[w]={type:R?W:te,message:$,ref:o,...L(R?W:te,$)}};if(s?!Array.isArray(v)||!v.length:a&&(!O&&(j||fr(v))||Rn(v)&&!v||P&&!jC(i).isValid||T&&!DC(i).isValid)){const{value:R,message:F}=Nu(a)?{value:!!a,message:a}:hi(a);if(R&&(E[w]={type:Gn.required,message:F,ref:_,...L(Gn.required,F)},!r))return C(F),E}if(!j&&(!fr(f)||!fr(d))){let R,F;const b=hi(d),W=hi(f);if(!fr(v)&&!isNaN(v)){const te=o.valueAsNumber||v&&+v;fr(b.value)||(R=te>b.value),fr(W.value)||(F=te<W.value)}else{const te=o.valueAsDate||new Date(v),$=Q=>new Date(new Date().toDateString()+" "+Q),Z=o.type=="time",I=o.type=="week";Pn(b.value)&&v&&(R=Z?$(v)>$(b.value):I?v>b.value:te>new Date(b.value)),Pn(W.value)&&v&&(F=Z?$(v)<$(W.value):I?v<W.value:te<new Date(W.value))}if((R||F)&&(q(!!R,b.message,W.message,Gn.max,Gn.min),!r))return C(E[w].message),E}if((l||c)&&!j&&(Pn(v)||s&&Array.isArray(v))){const R=hi(l),F=hi(c),b=!fr(R.value)&&v.length>+R.value,W=!fr(F.value)&&v.length<+F.value;if((b||W)&&(q(b,R.message,F.message),!r))return C(E[w].message),E}if(h&&!j&&Pn(v)){const{value:R,message:F}=hi(h);if(xd(R)&&!v.match(R)&&(E[w]={type:Gn.pattern,message:F,ref:o,...L(Gn.pattern,F)},!r))return C(F),E}if(p){if($s(p)){const R=await p(v,t),F=cw(R,_);if(F&&(E[w]={...F,...L(Gn.validate,F.message)},!r))return C(F.message),E}else if(Kt(p)){let R={};for(const F in p){if(!Rr(R)&&!r)break;const b=cw(await p[F](v,t),_,F);b&&(R={...b,...L(F,b.message)},C(b.message),r&&(E[w]=R))}if(!Rr(R)&&(E[w]={ref:_,...R},!r))return E}}return C(!0),E};function b5(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Lt(e)?n++:e[t[n++]];return e}function S5(e){for(const t in e)if(e.hasOwnProperty(t)&&!Lt(e[t]))return!1;return!0}function Bt(e,t){const r=Array.isArray(t)?t:Cv(t)?[t]:kC(t),n=r.length===1?e:b5(e,r),s=r.length-1,o=r[s];return n&&delete n[o],s!==0&&(Kt(n)&&Rr(n)||Array.isArray(n)&&S5(n))&&Bt(e,r.slice(0,-1)),e}var Dh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const o of e)o.next&&o.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(o=>o!==s)}}),unsubscribe:()=>{e=[]}}},_d=e=>fr(e)||!_C(e);function jo(e,t){if(_d(e)||_d(t))return e===t;if(Pi(e)&&Pi(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const s of r){const o=e[s];if(!n.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Pi(o)&&Pi(i)||Kt(o)&&Kt(i)||Array.isArray(o)&&Array.isArray(i)?!jo(o,i):o!==i)return!1}}return!0}var OC=e=>e.type==="select-multiple",k5=e=>Rv(e)||wc(e),Oh=e=>wd(e)&&e.isConnected,AC=e=>{for(const t in e)if($s(e[t]))return!0;return!1};function bd(e,t={}){const r=Array.isArray(e);if(Kt(e)||r)for(const n in e)Array.isArray(e[n])||Kt(e[n])&&!AC(e[n])?(t[n]=Array.isArray(e[n])?[]:{},bd(e[n],t[n])):fr(e[n])||(t[n]=!0);return t}function MC(e,t,r){const n=Array.isArray(e);if(Kt(e)||n)for(const s in e)Array.isArray(e[s])||Kt(e[s])&&!AC(e[s])?Lt(t)||_d(r[s])?r[s]=Array.isArray(e[s])?bd(e[s],[]):{...bd(e[s])}:MC(e[s],fr(t)?{}:t[s],r[s]):r[s]=!jo(e[s],t[s]);return r}var au=(e,t)=>MC(e,t,bd(t)),IC=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Lt(e)?e:t?e===""?NaN:e&&+e:r&&Pn(e)?new Date(e):n?n(e):e;function Ah(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Tv(t)?t.files:Rv(t)?DC(e.refs).value:OC(t)?[...t.selectedOptions].map(({value:r})=>r):wc(t)?jC(e.refs).value:IC(Lt(t.value)?e.ref.value:t.value,e)}var C5=(e,t,r,n)=>{const s={};for(const o of e){const i=le(t,o);i&&ut(s,o,i._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:n}},Ia=e=>Lt(e)?e:xd(e)?e.source:Kt(e)?xd(e.value)?e.value.source:e.value:e,E5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function dw(e,t,r){const n=le(e,r);if(n||Cv(r))return{error:n,name:r};const s=r.split(".");for(;s.length;){const o=s.join("."),i=le(t,o),a=le(e,o);if(i&&!Array.isArray(i)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:r}}var T5=(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,R5=(e,t)=>!Pf(le(e,t)).length&&Bt(e,t);const N5={mode:an.onSubmit,reValidateMode:an.onChange,shouldFocusError:!0};function P5(e={}){let t={...N5,...e},r={submitCount:0,isDirty:!1,isLoading:$s(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},s=Kt(t.defaultValues)||Kt(t.values)?wr(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:wr(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Dh(),array:Dh(),state:Dh()},h=sw(t.mode),p=sw(t.reValidateMode),w=t.criteriaMode===an.all,m=S=>N=>{clearTimeout(c),c=setTimeout(S,N)},x=async S=>{if(f.isValid||S){const N=t.resolver?Rr((await O()).errors):await L(n,!0);N!==r.isValid&&d.state.next({isValid:N})}},g=(S,N)=>{(f.isValidating||f.validatingFields)&&((S||Array.from(a.mount)).forEach(A=>{A&&(N?ut(r.validatingFields,A,N):Bt(r.validatingFields,A))}),d.state.next({validatingFields:r.validatingFields,isValidating:!Rr(r.validatingFields)}))},v=(S,N=[],A,Y,M=!0,H=!0)=>{if(Y&&A){if(i.action=!0,H&&Array.isArray(le(n,S))){const X=A(le(n,S),Y.argA,Y.argB);M&&ut(n,S,X)}if(H&&Array.isArray(le(r.errors,S))){const X=A(le(r.errors,S),Y.argA,Y.argB);M&&ut(r.errors,S,X),R5(r.errors,S)}if(f.touchedFields&&H&&Array.isArray(le(r.touchedFields,S))){const X=A(le(r.touchedFields,S),Y.argA,Y.argB);M&&ut(r.touchedFields,S,X)}f.dirtyFields&&(r.dirtyFields=au(s,o)),d.state.next({name:S,isDirty:R(S,N),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ut(o,S,N)},_=(S,N)=>{ut(r.errors,S,N),d.state.next({errors:r.errors})},C=S=>{r.errors=S,d.state.next({errors:r.errors,isValid:!1})},E=(S,N,A,Y)=>{const M=le(n,S);if(M){const H=le(o,S,Lt(A)?le(s,S):A);Lt(H)||Y&&Y.defaultChecked||N?ut(o,S,N?H:Ah(M._f)):W(S,H),i.mount&&x()}},T=(S,N,A,Y,M)=>{let H=!1,X=!1;const ee={name:S},he=!!(le(n,S)&&le(n,S)._f&&le(n,S)._f.disabled);if(!A||Y){f.isDirty&&(X=r.isDirty,r.isDirty=ee.isDirty=R(),H=X!==ee.isDirty);const Fe=he||jo(le(s,S),N);X=!!(!he&&le(r.dirtyFields,S)),Fe||he?Bt(r.dirtyFields,S):ut(r.dirtyFields,S,!0),ee.dirtyFields=r.dirtyFields,H=H||f.dirtyFields&&X!==!Fe}if(A){const Fe=le(r.touchedFields,S);Fe||(ut(r.touchedFields,S,A),ee.touchedFields=r.touchedFields,H=H||f.touchedFields&&Fe!==A)}return H&&M&&d.state.next(ee),H?ee:{}},P=(S,N,A,Y)=>{const M=le(r.errors,S),H=f.isValid&&Rn(N)&&r.isValid!==N;if(e.delayError&&A?(l=m(()=>_(S,A)),l(e.delayError)):(clearTimeout(c),l=null,A?ut(r.errors,S,A):Bt(r.errors,S)),(A?!jo(M,A):M)||!Rr(Y)||H){const X={...Y,...H&&Rn(N)?{isValid:N}:{},errors:r.errors,name:S};r={...r,...X},d.state.next(X)}},O=async S=>{g(S,!0);const N=await t.resolver(o,t.context,C5(S||a.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return g(S),N},j=async S=>{const{errors:N}=await O(S);if(S)for(const A of S){const Y=le(N,A);Y?ut(r.errors,A,Y):Bt(r.errors,A)}else r.errors=N;return N},L=async(S,N,A={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);g([Y],!0);const he=await uw(M,o,w,t.shouldUseNativeValidation&&!N,ee);if(g([Y]),he[H.name]&&(A.valid=!1,N))break;!N&&(le(he,H.name)?ee?_5(r.errors,he,H.name):ut(r.errors,H.name,he[H.name]):Bt(r.errors,H.name))}X&&await L(X,N,A)}}return A.valid},q=()=>{for(const S of a.unMount){const N=le(n,S);N&&(N._f.refs?N._f.refs.every(A=>!Oh(A)):!Oh(N._f.ref))&&Ee(S)}a.unMount=new Set},R=(S,N)=>(S&&N&&ut(o,S,N),!jo(z(),s)),F=(S,N,A)=>NC(S,a,{...i.mount?o:Lt(N)?s:Pn(S)?{[S]:N}:N},A,N),b=S=>Pf(le(i.mount?o:s,S,e.shouldUnregister?le(s,S,[]):[])),W=(S,N,A={})=>{const Y=le(n,S);let M=N;if(Y){const H=Y._f;H&&(!H.disabled&&ut(o,S,IC(N,H)),M=wd(H.ref)&&fr(N)?"":N,OC(H.ref)?[...H.ref.options].forEach(X=>X.selected=M.includes(X.value)):H.refs?wc(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):Tv(H.ref)?H.ref.value="":(H.ref.value=M,H.ref.type||d.values.next({name:S,values:{...o}})))}(A.shouldDirty||A.shouldTouch)&&T(S,M,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&Q(S)},te=(S,N,A)=>{for(const Y in N){const M=N[Y],H=`${S}.${Y}`,X=le(n,H);(a.array.has(S)||!_d(M)||X&&!X._f)&&!Pi(M)?te(H,M,A):W(H,M,A)}},$=(S,N,A={})=>{const Y=le(n,S),M=a.array.has(S),H=wr(N);ut(o,S,H),M?(d.array.next({name:S,values:{...o}}),(f.isDirty||f.dirtyFields)&&A.shouldDirty&&d.state.next({name:S,dirtyFields:au(s,o),isDirty:R(S,H)})):Y&&!Y._f&&!fr(H)?te(S,H,A):W(S,H,A),ow(S,a)&&d.state.next({...r}),d.values.next({name:i.mount?S:void 0,values:{...o}})},Z=async S=>{i.mount=!0;const N=S.target;let A=N.name,Y=!0;const M=le(n,A),H=()=>N.type?Ah(M._f):bC(S),X=ee=>{Y=Number.isNaN(ee)||ee===le(o,A,ee)};if(M){let ee,he;const Fe=H(),De=S.type===yd.BLUR||S.type===yd.FOCUS_OUT,kt=!E5(M._f)&&!t.resolver&&!le(r.errors,A)&&!M._f.deps||T5(De,le(r.touchedFields,A),r.isSubmitted,p,h),Vr=ow(A,a,De);ut(o,A,Fe),De?(M._f.onBlur&&M._f.onBlur(S),l&&l(0)):M._f.onChange&&M._f.onChange(S);const $t=T(A,Fe,De,!1),Wn=!Rr($t)||Vr;if(!De&&d.values.next({name:A,type:S.type,values:{...o}}),kt)return f.isValid&&x(),Wn&&d.state.next({name:A,...Vr?{}:$t});if(!De&&Vr&&d.state.next({...r}),t.resolver){const{errors:ot}=await O([A]);if(X(Fe),Y){const $n=dw(r.errors,n,A),Bn=dw(ot,n,$n.name||A);ee=Bn.error,A=Bn.name,he=Rr(ot)}}else g([A],!0),ee=(await uw(M,o,w,t.shouldUseNativeValidation))[A],g([A]),X(Fe),Y&&(ee?he=!1:f.isValid&&(he=await L(n,!0)));Y&&(M._f.deps&&Q(M._f.deps),P(A,he,ee,$t))}},I=(S,N)=>{if(le(r.errors,N)&&S.focus)return S.focus(),1},Q=async(S,N={})=>{let A,Y;const M=nl(S);if(t.resolver){const H=await j(Lt(S)?S:M);A=Rr(H),Y=S?!M.some(X=>le(H,X)):A}else S?(Y=(await Promise.all(M.map(async H=>{const X=le(n,H);return await L(X&&X._f?{[H]:X}:X)}))).every(Boolean),!(!Y&&!r.isValid)&&x()):Y=A=await L(n);return d.state.next({...!Pn(S)||f.isValid&&A!==r.isValid?{}:{name:S},...t.resolver||!S?{isValid:A}:{},errors:r.errors}),N.shouldFocus&&!Y&&sl(n,I,S?M:a.mount),Y},z=S=>{const N={...i.mount?o:s};return Lt(S)?N:Pn(S)?le(N,S):S.map(A=>le(N,A))},V=(S,N)=>({invalid:!!le((N||r).errors,S),isDirty:!!le((N||r).dirtyFields,S),error:le((N||r).errors,S),isValidating:!!le(r.validatingFields,S),isTouched:!!le((N||r).touchedFields,S)}),de=S=>{S&&nl(S).forEach(N=>Bt(r.errors,N)),d.state.next({errors:S?r.errors:{}})},ne=(S,N,A)=>{const Y=(le(n,S,{_f:{}})._f||{}).ref,M=le(r.errors,S)||{},{ref:H,message:X,type:ee,...he}=M;ut(r.errors,S,{...he,...N,ref:Y}),d.state.next({name:S,errors:r.errors,isValid:!1}),A&&A.shouldFocus&&Y&&Y.focus&&Y.focus()},se=(S,N)=>$s(S)?d.values.subscribe({next:A=>S(F(void 0,N),A)}):F(S,N,!0),Ee=(S,N={})=>{for(const A of S?nl(S):a.mount)a.mount.delete(A),a.array.delete(A),N.keepValue||(Bt(n,A),Bt(o,A)),!N.keepError&&Bt(r.errors,A),!N.keepDirty&&Bt(r.dirtyFields,A),!N.keepTouched&&Bt(r.touchedFields,A),!N.keepIsValidating&&Bt(r.validatingFields,A),!t.shouldUnregister&&!N.keepDefaultValue&&Bt(s,A);d.values.next({values:{...o}}),d.state.next({...r,...N.keepDirty?{isDirty:R()}:{}}),!N.keepIsValid&&x()},fe=({disabled:S,name:N,field:A,fields:Y,value:M})=>{if(Rn(S)&&i.mount||S){const H=S?void 0:Lt(M)?Ah(A?A._f:le(Y,N)._f):M;ut(o,N,H),T(N,H,!1,!1,!0)}},ge=(S,N={})=>{let A=le(n,S);const Y=Rn(N.disabled);return ut(n,S,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:S}},name:S,mount:!0,...N}}),a.mount.add(S),A?fe({field:A,disabled:N.disabled,name:S,value:N.value}):E(S,!0,N.value),{...Y?{disabled:N.disabled}:{},...t.progressive?{required:!!N.required,min:Ia(N.min),max:Ia(N.max),minLength:Ia(N.minLength),maxLength:Ia(N.maxLength),pattern:Ia(N.pattern)}:{},name:S,onChange:Z,onBlur:Z,ref:M=>{if(M){ge(S,N),A=le(n,S);const H=Lt(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=k5(H),ee=A._f.refs||[];if(X?ee.find(he=>he===H):H===A._f.ref)return;ut(n,S,{_f:{...A._f,...X?{refs:[...ee.filter(Oh),H,...Array.isArray(le(s,S))?[{}]:[]],ref:{type:H.type,name:S}}:{ref:H}}}),E(S,!1,void 0,H)}else A=le(n,S,{}),A._f&&(A._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(SC(a.array,S)&&i.action)&&a.unMount.add(S)}}},be=()=>t.shouldFocusError&&sl(n,I,a.mount),Pe=S=>{Rn(S)&&(d.state.next({disabled:S}),sl(n,(N,A)=>{const Y=le(n,A);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))},Te=(S,N)=>async A=>{let Y;A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let M=wr(o);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:H,values:X}=await O();r.errors=H,M=X}else await L(n);if(Bt(r.errors,"root"),Rr(r.errors)){d.state.next({errors:{}});try{await S(M,A)}catch(H){Y=H}}else N&&await N({...r.errors},A),be(),setTimeout(be);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Rr(r.errors)&&!Y,submitCount:r.submitCount+1,errors:r.errors}),Y)throw Y},Se=(S,N={})=>{le(n,S)&&(Lt(N.defaultValue)?$(S,wr(le(s,S))):($(S,N.defaultValue),ut(s,S,wr(N.defaultValue))),N.keepTouched||Bt(r.touchedFields,S),N.keepDirty||(Bt(r.dirtyFields,S),r.isDirty=N.defaultValue?R(S,wr(le(s,S))):R()),N.keepError||(Bt(r.errors,S),f.isValid&&x()),d.state.next({...r}))},rt=(S,N={})=>{const A=S?wr(S):s,Y=wr(A),M=Rr(S),H=M?s:Y;if(N.keepDefaultValues||(s=A),!N.keepValues){if(N.keepDirtyValues)for(const X of a.mount)le(r.dirtyFields,X)?ut(H,X,le(o,X)):$(X,le(H,X));else{if(kv&&Lt(S))for(const X of a.mount){const ee=le(n,X);if(ee&&ee._f){const he=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(wd(he)){const Fe=he.closest("form");if(Fe){Fe.reset();break}}}}n={}}o=e.shouldUnregister?N.keepDefaultValues?wr(s):{}:wr(H),d.array.next({values:{...H}}),d.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!N.keepIsValid||!!N.keepDirtyValues,i.watch=!!e.shouldUnregister,d.state.next({submitCount:N.keepSubmitCount?r.submitCount:0,isDirty:M?!1:N.keepDirty?r.isDirty:!!(N.keepDefaultValues&&!jo(S,s)),isSubmitted:N.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M?{}:N.keepDirtyValues?N.keepDefaultValues&&o?au(s,o):r.dirtyFields:N.keepDefaultValues&&S?au(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)=>rt($s(S)?S(o):S,N);return{control:{register:ge,unregister:Ee,getFieldState:V,handleSubmit:Te,setError:ne,_executeSchema:O,_getWatch:F,_getDirty:R,_updateValid:x,_removeUnmounted:q,_updateFieldArray:v,_updateDisabledField:fe,_getFieldArray:b,_reset:rt,_resetDefaultValues:()=>$s(t.defaultValues)&&t.defaultValues().then(S=>{k(S,t.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:S=>{r={...r,...S}},_disableForm:Pe,_subjects:d,_proxyFormState:f,_setErrors:C,get _fields(){return n},get _formValues(){return o},get _state(){return i},set _state(S){i=S},get _defaultValues(){return s},get _names(){return 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:ge,handleSubmit:Te,watch:se,setValue:$,getValues:z,reset:k,resetField:Se,clearErrors:de,unregister:Ee,setError:ne,setFocus:(S,N={})=>{const A=le(n,S),Y=A&&A._f;if(Y){const M=Y.refs?Y.refs[0]:Y.ref;M.focus&&(M.focus(),N.shouldSelect&&M.select())}},getFieldState:V}}function mo(e={}){const t=et.useRef(),r=et.useRef(),[n,s]=et.useState({isDirty:!1,isValidating:!1,isLoading:$s(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:$s(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...P5(e),formState:n});const o=t.current.control;return o._options=e,Ev({subject:o._subjects.state,next:i=>{TC(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),et.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),et.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==n.isDirty&&o._subjects.state.next({isDirty:i})}},[o,n.isDirty]),et.useEffect(()=>{e.values&&!jo(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),et.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),et.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),et.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=EC(n,o),t.current}const fw=(e,t,r)=>{if(e&&"reportValidity"in e){const n=le(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},LC=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?fw(n.ref,r,e):n.refs&&n.refs.forEach(s=>fw(s,r,e))}},j5=(e,t)=>{t.shouldUseNativeValidation&&LC(e,t);const r={};for(const n in e){const s=le(t.fields,n),o=Object.assign(e[n]||{},{ref:s&&s.ref});if(D5(t.names||Object.keys(e),n)){const i=Object.assign({},le(r,n));ut(i,"root",o),ut(r,n,i)}else ut(r,n,o)}return r},D5=(e,t)=>e.some(r=>r.startsWith(t+"."));var O5=function(e,t){for(var r={};e.length;){var n=e[0],s=n.code,o=n.message,i=n.path.join(".");if(!r[i])if("unionErrors"in n){var a=n.unionErrors[0].errors[0];r[i]={message:a.message,type:a.code}}else r[i]={message:o,type:s};if("unionErrors"in n&&n.unionErrors.forEach(function(f){return f.errors.forEach(function(d){return e.push(d)})}),t){var l=r[i].types,c=l&&l[n.code];r[i]=PC(i,t,r,s,c?[].concat(c,n.message):n.message)}e.shift()}return r},go=function(e,t,r){return r===void 0&&(r={}),function(n,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(c){return o.shouldUseNativeValidation&&LC({},o),{errors:{},values:r.raw?n:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:j5(O5(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},nt;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},e.find=(s,o)=>{for(const i of s)if(o(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(nt||(nt={}));var em;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(em||(em={}));const ye=nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Fs=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},ie=nt.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"]),A5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ir extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(o){return o.message},n={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),n}static assert(t){if(!(t instanceof Ir))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.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()}}Ir.create=e=>new Ir(e);const ra=(e,t)=>{let r;switch(e.code){case ie.invalid_type:e.received===ye.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,nt.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${nt.joinValues(e.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${nt.joinValues(e.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${nt.joinValues(e.options)}, received '${e.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.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}"`:nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ie.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 ie.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 ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=t.defaultError,nt.assertNever(e)}return{message:r}};let FC=ra;function M5(e){FC=e}function Sd(){return FC}const kd=e=>{const{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},I5=[];function pe(e,t){const r=Sd(),n=kd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ra?void 0:ra].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 Le;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const s of r){const o=await s.key,i=await s.value;n.push({key:o,value:i})}return cr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const s of r){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[o.value]=i.value)}return{status:t.value,value:n}}}const Le=Object.freeze({status:"aborted"}),ji=e=>({status:"dirty",value:e}),pr=e=>({status:"valid",value:e}),tm=e=>e.status==="aborted",rm=e=>e.status==="dirty",zl=e=>e.status==="valid",Ul=e=>typeof Promise<"u"&&e instanceof Promise;function Cd(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 zC(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 Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));var $a,Ba;class Ln{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 hw=(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 Ir(e.common.issues);return this._error=r,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(i,a)=>{var l,c;const{message:f}=e;return i.code==="invalid_enum_value"?{message:f??a.defaultError}:typeof a.data>"u"?{message:(l=f??n)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=f??r)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Ge{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 Fs(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Fs(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:Fs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Ul(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:Fs(t)},o=this._parseSync({data:t,path:s.path,parent:s});return hw(s,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Fs(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(Ul(s)?s:Promise.resolve(s));return hw(n,o)}refine(t,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ie.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!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 yn({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return An.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fn.create(this,this._def)}promise(){return sa.create(this,this._def)}or(t){return Bl.create([this,t],this._def)}and(t){return Hl.create(this,t,this._def)}transform(t){return new yn({...Ue(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new ql({...Ue(this._def),innerType:this,defaultValue:r,typeName:Ae.ZodDefault})}brand(){return new Nv({typeName:Ae.ZodBranded,type:this,...Ue(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Xl({...Ue(this._def),innerType:this,catchValue:r,typeName:Ae.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return xc.create(this,t)}readonly(){return Ql.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const L5=/^c[^\s-]{8,}$/i,F5=/^[0-9a-z]+$/,z5=/^[0-9A-HJKMNP-TV-Z]{26}$/,U5=/^[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,V5=/^[a-z0-9_-]{21}$/i,W5=/^[-+]?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)?)??$/,$5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,B5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mh;const H5=/^(?:(?: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])$/,Y5=/^(([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})))$/,Z5=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,UC="((\\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])))",G5=new RegExp(`^${UC}$`);function VC(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 K5(e){return new RegExp(`^${VC(e)}$`)}function WC(e){let t=`${UC}T${VC(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 q5(e,t){return!!((t==="v4"||!t)&&H5.test(e)||(t==="v6"||!t)&&Y5.test(e))}class cn extends Ge{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.string,received:o.parsedType}),Le}const n=new cr;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const i=t.data.length>o.value,a=t.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(t,s),i?pe(s,{code:ie.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&pe(s,{code:ie.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")$5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"email",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Mh||(Mh=new RegExp(B5,"u")),Mh.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"emoji",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")U5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"uuid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")V5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"nanoid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")L5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"cuid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")F5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"cuid2",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")z5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"ulid",code:ie.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),pe(s,{validation:"url",code:ie.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"regex",code:ie.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?WC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?G5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?K5(o).test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?W5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"duration",code:ie.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?q5(t.data,o.version)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"ip",code:ie.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?Z5.test(t.data)||(s=this._getOrReturnCtx(t,s),pe(s,{validation:"base64",code:ie.invalid_string,message:o.message}),n.dirty()):nt.assertNever(o);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:ie.invalid_string,...Ce.errToObj(n)})}_addCheck(t){return new cn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.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,...Ce.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,...Ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ce.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ce.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ce.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ce.errToObj(r)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new cn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new cn({...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}}cn.create=e=>{var t;return new cn({checks:[],typeName:Ae.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ue(e)})};function X5(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class oo extends Ge{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)!==ye.number){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.number,received:o.parsedType}),Le}let n;const s=new cr;for(const o of this._def.checks)o.kind==="int"?nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?X5(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_finite,message:o.message}),s.dirty()):nt.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new oo({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new oo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.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"&&nt.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)}}oo.create=e=>new oo({checks:[],typeName:Ae.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ue(e)});class io extends Ge{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)!==ye.bigint){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.bigint,received:o.parsedType}),Le}let n;const s=new cr;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),pe(n,{code:ie.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):nt.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ce.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ce.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ce.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ce.toString(r))}setLimit(t,r,n,s){return new io({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ce.toString(s)}]})}_addCheck(t){return new io({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ce.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}}io.create=e=>{var t;return new io({checks:[],typeName:Ae.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ue(e)})};class Vl extends Ge{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.boolean,received:n.parsedType}),Le}return pr(t.data)}}Vl.create=e=>new Vl({typeName:Ae.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ue(e)});class Yo extends Ge{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_type,expected:ye.date,received:o.parsedType}),Le}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return pe(o,{code:ie.invalid_date}),Le}const n=new cr;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),pe(s,{code:ie.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):nt.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yo({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.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}}Yo.create=e=>new Yo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ae.ZodDate,...Ue(e)});class Ed extends Ge{_parse(t){if(this._getType(t)!==ye.symbol){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.symbol,received:n.parsedType}),Le}return pr(t.data)}}Ed.create=e=>new Ed({typeName:Ae.ZodSymbol,...Ue(e)});class Wl extends Ge{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.undefined,received:n.parsedType}),Le}return pr(t.data)}}Wl.create=e=>new Wl({typeName:Ae.ZodUndefined,...Ue(e)});class $l extends Ge{_parse(t){if(this._getType(t)!==ye.null){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.null,received:n.parsedType}),Le}return pr(t.data)}}$l.create=e=>new $l({typeName:Ae.ZodNull,...Ue(e)});class na extends Ge{constructor(){super(...arguments),this._any=!0}_parse(t){return pr(t.data)}}na.create=e=>new na({typeName:Ae.ZodAny,...Ue(e)});class Mo extends Ge{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pr(t.data)}}Mo.create=e=>new Mo({typeName:Ae.ZodUnknown,...Ue(e)});class vs extends Ge{_parse(t){const r=this._getOrReturnCtx(t);return pe(r,{code:ie.invalid_type,expected:ye.never,received:r.parsedType}),Le}}vs.create=e=>new vs({typeName:Ae.ZodNever,...Ue(e)});class Td extends Ge{_parse(t){if(this._getType(t)!==ye.undefined){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.void,received:n.parsedType}),Le}return pr(t.data)}}Td.create=e=>new Td({typeName:Ae.ZodVoid,...Ue(e)});class fn extends Ge{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ye.array)return pe(r,{code:ie.invalid_type,expected:ye.array,received:r.parsedType}),Le;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(i||a)&&(pe(r,{code:i?ie.too_big:ie.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(pe(r,{code:ie.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&&(pe(r,{code:ie.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>s.type._parseAsync(new Ln(r,i,r.path,a)))).then(i=>cr.mergeArray(n,i));const o=[...r.data].map((i,a)=>s.type._parseSync(new Ln(r,i,r.path,a)));return cr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new fn({...this._def,minLength:{value:t,message:Ce.toString(r)}})}max(t,r){return new fn({...this._def,maxLength:{value:t,message:Ce.toString(r)}})}length(t,r){return new fn({...this._def,exactLength:{value:t,message:Ce.toString(r)}})}nonempty(t){return this.min(1,t)}}fn.create=(e,t)=>new fn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...Ue(t)});function mi(e){if(e instanceof Rt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=An.create(mi(n))}return new Rt({...e._def,shape:()=>t})}else return e instanceof fn?new fn({...e._def,type:mi(e.element)}):e instanceof An?An.create(mi(e.unwrap())):e instanceof lo?lo.create(mi(e.unwrap())):e instanceof Fn?Fn.create(e.items.map(t=>mi(t))):e}class Rt extends Ge{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=nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return pe(c,{code:ie.invalid_type,expected:ye.object,received:c.parsedType}),Le}const{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof vs&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const f=o[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:f._parse(new Ln(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof vs){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of a)l.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(c==="strict")a.length>0&&(pe(s,{code:ie.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of a){const d=s.data[f];l.push({key:{status:"valid",value:f},value:c._parse(new Ln(s,d,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of l){const d=await f.key,h=await f.value;c.push({key:d,value:h,alwaysSet:f.alwaysSet})}return c}).then(c=>cr.mergeObjectSync(n,c)):cr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=Ce.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:Ae.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const r={};return nt.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 nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new Rt({...this._def,shape:()=>r})}deepPartial(){return mi(this)}partial(t){const r={};return nt.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 nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof An;)o=o._def.innerType;r[n]=o}}),new Rt({...this._def,shape:()=>r})}keyof(){return $C(nt.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:vs.create(),typeName:Ae.ZodObject,...Ue(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:vs.create(),typeName:Ae.ZodObject,...Ue(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:vs.create(),typeName:Ae.ZodObject,...Ue(t)});class Bl extends Ge{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Ir(a.ctx.common.issues));return pe(r,{code:ie.invalid_union,unionErrors:i}),Le}if(r.common.async)return Promise.all(n.map(async o=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},f=l._parseSync({data:r.data,path:r.path,parent:c});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new Ir(l));return pe(r,{code:ie.invalid_union,unionErrors:a}),Le}}get options(){return this._def.options}}Bl.create=(e,t)=>new Bl({options:e,typeName:Ae.ZodUnion,...Ue(t)});const qn=e=>e instanceof Zl?qn(e.schema):e instanceof yn?qn(e.innerType()):e instanceof Gl?[e.value]:e instanceof ao?e.options:e instanceof Kl?nt.objectValues(e.enum):e instanceof ql?qn(e._def.innerType):e instanceof Wl?[void 0]:e instanceof $l?[null]:e instanceof An?[void 0,...qn(e.unwrap())]:e instanceof lo?[null,...qn(e.unwrap())]:e instanceof Nv||e instanceof Ql?qn(e.unwrap()):e instanceof Xl?qn(e._def.innerType):[];class Df extends Ge{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return pe(r,{code:ie.invalid_type,expected:ye.object,received:r.parsedType}),Le;const n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(pe(r,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const s=new Map;for(const o of r){const i=qn(o.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,o)}}return new Df({typeName:Ae.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Ue(n)})}}function nm(e,t){const r=Fs(e),n=Fs(t);if(e===t)return{valid:!0,data:e};if(r===ye.object&&n===ye.object){const s=nt.objectKeys(t),o=nt.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const l=nm(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(r===ye.array&&n===ye.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const i=e[o],a=t[o],l=nm(i,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===ye.date&&n===ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Hl extends Ge{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(tm(o)||tm(i))return Le;const a=nm(o.value,i.value);return a.valid?((rm(o)||rm(i))&&r.dirty(),{status:r.value,value:a.data}):(pe(n,{code:ie.invalid_intersection_types}),Le)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Hl.create=(e,t,r)=>new Hl({left:e,right:t,typeName:Ae.ZodIntersection,...Ue(r)});class Fn extends Ge{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.array)return pe(n,{code:ie.invalid_type,expected:ye.array,received:n.parsedType}),Le;if(n.data.length<this._def.items.length)return pe(n,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&n.data.length>this._def.items.length&&(pe(n,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ln(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(o).then(i=>cr.mergeArray(r,i)):cr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Fn({...this._def,rest:t})}}Fn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:e,typeName:Ae.ZodTuple,rest:null,...Ue(t)})};class Yl extends Ge{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!==ye.object)return pe(n,{code:ie.invalid_type,expected:ye.object,received:n.parsedType}),Le;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in n.data)s.push({key:o._parse(new Ln(n,a,n.path,a)),value:i._parse(new Ln(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 Ge?new Yl({keyType:t,valueType:r,typeName:Ae.ZodRecord,...Ue(n)}):new Yl({keyType:cn.create(),valueType:t,typeName:Ae.ZodRecord,...Ue(r)})}}class Rd extends Ge{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!==ye.map)return pe(n,{code:ie.invalid_type,expected:ye.map,received:n.parsedType}),Le;const s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new Ln(n,a,n.path,[c,"key"])),value:o._parse(new Ln(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,f=await l.value;if(c.status==="aborted"||f.status==="aborted")return Le;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,f=l.value;if(c.status==="aborted"||f.status==="aborted")return Le;(c.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(c.value,f.value)}return{status:r.value,value:a}}}}Rd.create=(e,t,r)=>new Rd({valueType:t,keyType:e,typeName:Ae.ZodMap,...Ue(r)});class Zo extends Ge{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.set)return pe(n,{code:ie.invalid_type,expected:ye.set,received:n.parsedType}),Le;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(pe(n,{code:ie.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&&(pe(n,{code:ie.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const f of l){if(f.status==="aborted")return Le;f.status==="dirty"&&r.dirty(),c.add(f.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>o._parse(new Ln(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,r){return new Zo({...this._def,minSize:{value:t,message:Ce.toString(r)}})}max(t,r){return new Zo({...this._def,maxSize:{value:t,message:Ce.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Zo.create=(e,t)=>new Zo({valueType:e,minSize:null,maxSize:null,typeName:Ae.ZodSet,...Ue(t)});class Yi extends Ge{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.function)return pe(r,{code:ie.invalid_type,expected:ye.function,received:r.parsedType}),Le;function n(a,l){return kd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sd(),ra].filter(c=>!!c),issueData:{code:ie.invalid_arguments,argumentsError:l}})}function s(a,l){return kd({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sd(),ra].filter(c=>!!c),issueData:{code:ie.invalid_return_type,returnTypeError:l}})}const o={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof sa){const a=this;return pr(async function(...l){const c=new Ir([]),f=await a._def.args.parseAsync(l,o).catch(p=>{throw c.addIssue(n(l,p)),c}),d=await Reflect.apply(i,this,f);return await a._def.returns._def.type.parseAsync(d,o).catch(p=>{throw c.addIssue(s(d,p)),c})})}else{const a=this;return pr(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Ir([n(l,c.error)]);const f=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(f,o);if(!d.success)throw new Ir([s(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Yi({...this._def,args:Fn.create(t).rest(Mo.create())})}returns(t){return new Yi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Yi({args:t||Fn.create([]).rest(Mo.create()),returns:r||Mo.create(),typeName:Ae.ZodFunction,...Ue(n)})}}class Zl extends Ge{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})}}Zl.create=(e,t)=>new Zl({getter:e,typeName:Ae.ZodLazy,...Ue(t)});class Gl extends Ge{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return pe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}Gl.create=(e,t)=>new Gl({value:e,typeName:Ae.ZodLiteral,...Ue(t)});function $C(e,t){return new ao({values:e,typeName:Ae.ZodEnum,...Ue(t)})}class ao extends Ge{constructor(){super(...arguments),$a.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{expected:nt.joinValues(n),received:r.parsedType,code:ie.invalid_type}),Le}if(Cd(this,$a)||zC(this,$a,new Set(this._def.values)),!Cd(this,$a).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return pe(r,{received:r.data,code:ie.invalid_enum_value,options:n}),Le}return pr(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 ao.create(t,{...this._def,...r})}exclude(t,r=this._def){return ao.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}$a=new WeakMap;ao.create=$C;class Kl extends Ge{constructor(){super(...arguments),Ba.set(this,void 0)}_parse(t){const r=nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ye.string&&n.parsedType!==ye.number){const s=nt.objectValues(r);return pe(n,{expected:nt.joinValues(s),received:n.parsedType,code:ie.invalid_type}),Le}if(Cd(this,Ba)||zC(this,Ba,new Set(nt.getValidEnumValues(this._def.values))),!Cd(this,Ba).has(t.data)){const s=nt.objectValues(r);return pe(n,{received:n.data,code:ie.invalid_enum_value,options:s}),Le}return pr(t.data)}get enum(){return this._def.values}}Ba=new WeakMap;Kl.create=(e,t)=>new Kl({values:e,typeName:Ae.ZodNativeEnum,...Ue(t)});class sa extends Ge{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.promise&&r.common.async===!1)return pe(r,{code:ie.invalid_type,expected:ye.promise,received:r.parsedType}),Le;const n=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return pr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}sa.create=(e,t)=>new sa({type:e,typeName:Ae.ZodPromise,...Ue(t)});class yn extends Ge{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{pe(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(n.data,o);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?Le:l.status==="dirty"||r.value==="dirty"?ji(l.value):l});{if(r.value==="aborted")return Le;const a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?Le:a.status==="dirty"||r.value==="dirty"?ji(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);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"?Le:(a.status==="dirty"&&r.dirty(),i(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"?Le:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!zl(i))return i;const a=s.transform(i.value,o);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(i=>zl(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);nt.assertNever(s)}}yn.create=(e,t,r)=>new yn({schema:e,typeName:Ae.ZodEffects,effect:t,...Ue(r)});yn.createWithPreprocess=(e,t,r)=>new yn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ae.ZodEffects,...Ue(r)});class An extends Ge{_parse(t){return this._getType(t)===ye.undefined?pr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}An.create=(e,t)=>new An({innerType:e,typeName:Ae.ZodOptional,...Ue(t)});class lo extends Ge{_parse(t){return this._getType(t)===ye.null?pr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}lo.create=(e,t)=>new lo({innerType:e,typeName:Ae.ZodNullable,...Ue(t)});class ql extends Ge{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===ye.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}ql.create=(e,t)=>new ql({innerType:e,typeName:Ae.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class Xl extends Ge{_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 Ul(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ir(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ir(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Xl.create=(e,t)=>new Xl({innerType:e,typeName:Ae.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class Nd extends Ge{_parse(t){if(this._getType(t)!==ye.nan){const n=this._getOrReturnCtx(t);return pe(n,{code:ie.invalid_type,expected:ye.nan,received:n.parsedType}),Le}return{status:"valid",value:t.data}}}Nd.create=e=>new Nd({typeName:Ae.ZodNaN,...Ue(e)});const Q5=Symbol("zod_brand");class Nv extends Ge{_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 xc extends Ge{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Le:o.status==="dirty"?(r.dirty(),ji(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Le: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 xc({in:t,out:r,typeName:Ae.ZodPipeline})}}class Ql extends Ge{_parse(t){const r=this._def.innerType._parse(t),n=s=>(zl(s)&&(s.value=Object.freeze(s.value)),s);return Ul(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Ql.create=(e,t)=>new Ql({innerType:e,typeName:Ae.ZodReadonly,...Ue(t)});function BC(e,t={},r){return e?na.create().superRefine((n,s)=>{var o,i;if(!e(n)){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,l=(i=(o=a.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):na.create()}const J5={object:Rt.lazycreate};var Ae;(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"})(Ae||(Ae={}));const ez=(e,t={message:`Input not instance of ${e.name}`})=>BC(r=>r instanceof e,t),HC=cn.create,YC=oo.create,tz=Nd.create,rz=io.create,ZC=Vl.create,nz=Yo.create,sz=Ed.create,oz=Wl.create,iz=$l.create,az=na.create,lz=Mo.create,cz=vs.create,uz=Td.create,dz=fn.create,fz=Rt.create,hz=Rt.strictCreate,pz=Bl.create,mz=Df.create,gz=Hl.create,vz=Fn.create,yz=Yl.create,wz=Rd.create,xz=Zo.create,_z=Yi.create,bz=Zl.create,Sz=Gl.create,kz=ao.create,Cz=Kl.create,Ez=sa.create,pw=yn.create,Tz=An.create,Rz=lo.create,Nz=yn.createWithPreprocess,Pz=xc.create,jz=()=>HC().optional(),Dz=()=>YC().optional(),Oz=()=>ZC().optional(),Az={string:e=>cn.create({...e,coerce:!0}),number:e=>oo.create({...e,coerce:!0}),boolean:e=>Vl.create({...e,coerce:!0}),bigint:e=>io.create({...e,coerce:!0}),date:e=>Yo.create({...e,coerce:!0})},Mz=Le;var Oe=Object.freeze({__proto__:null,defaultErrorMap:ra,setErrorMap:M5,getErrorMap:Sd,makeIssue:kd,EMPTY_PATH:I5,addIssueToContext:pe,ParseStatus:cr,INVALID:Le,DIRTY:ji,OK:pr,isAborted:tm,isDirty:rm,isValid:zl,isAsync:Ul,get util(){return nt},get objectUtil(){return em},ZodParsedType:ye,getParsedType:Fs,ZodType:Ge,datetimeRegex:WC,ZodString:cn,ZodNumber:oo,ZodBigInt:io,ZodBoolean:Vl,ZodDate:Yo,ZodSymbol:Ed,ZodUndefined:Wl,ZodNull:$l,ZodAny:na,ZodUnknown:Mo,ZodNever:vs,ZodVoid:Td,ZodArray:fn,ZodObject:Rt,ZodUnion:Bl,ZodDiscriminatedUnion:Df,ZodIntersection:Hl,ZodTuple:Fn,ZodRecord:Yl,ZodMap:Rd,ZodSet:Zo,ZodFunction:Yi,ZodLazy:Zl,ZodLiteral:Gl,ZodEnum:ao,ZodNativeEnum:Kl,ZodPromise:sa,ZodEffects:yn,ZodTransformer:yn,ZodOptional:An,ZodNullable:lo,ZodDefault:ql,ZodCatch:Xl,ZodNaN:Nd,BRAND:Q5,ZodBranded:Nv,ZodPipeline:xc,ZodReadonly:Ql,custom:BC,Schema:Ge,ZodSchema:Ge,late:J5,get ZodFirstPartyTypeKind(){return Ae},coerce:Az,any:az,array:dz,bigint:rz,boolean:ZC,date:nz,discriminatedUnion:mz,effect:pw,enum:kz,function:_z,instanceof:ez,intersection:gz,lazy:bz,literal:Sz,map:wz,nan:tz,nativeEnum:Cz,never:cz,null:iz,nullable:Rz,number:YC,object:fz,oboolean:Oz,onumber:Dz,optional:Tz,ostring:jz,pipeline:Pz,preprocess:Nz,promise:Ez,record:yz,set:xz,strictObject:hz,string:HC,symbol:sz,transformer:pw,tuple:vz,undefined:oz,union:pz,unknown:lz,void:uz,NEVER:Mz,ZodIssueCode:ie,quotelessJson:A5,ZodError:Ir}),Iz="Label",GC=y.forwardRef((e,t)=>u.jsx(Me.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())}}));GC.displayName=Iz;var KC=GC;const Lz=sc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Pv=y.forwardRef(({className:e,...t},r)=>u.jsx(KC,{ref:r,className:_e(Lz(),e),...t}));Pv.displayName=KC.displayName;const vo=g5,qC=y.createContext({}),qe=({...e})=>u.jsx(qC.Provider,{value:{name:e.name},children:u.jsx(x5,{...e})}),Of=()=>{const e=y.useContext(qC),t=y.useContext(XC),{getFieldState:r,formState:n}=jf(),s=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},XC=y.createContext({}),He=y.forwardRef(({className:e,...t},r)=>{const n=y.useId();return u.jsx(XC.Provider,{value:{id:n},children:u.jsx("div",{ref:r,className:_e("space-y-2",e),...t})})});He.displayName="FormItem";const Ye=y.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:s}=Of();return u.jsx(Pv,{ref:r,className:_e(n&&"text-destructive",e),htmlFor:s,...t})});Ye.displayName="FormLabel";const Ze=y.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:s,formMessageId:o}=Of();return u.jsx(hs,{ref:t,id:n,"aria-describedby":r?`${s} ${o}`:`${s}`,"aria-invalid":!!r,...e})});Ze.displayName="FormControl";const Fz=y.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=Of();return u.jsx("p",{ref:r,id:n,className:_e("text-sm text-muted-foreground",e),...t})});Fz.displayName="FormDescription";const ze=y.forwardRef(({className:e,children:t,...r},n)=>{const{error:s,formMessageId:o}=Of(),i=s?String(s==null?void 0:s.message):t;return i?u.jsx("p",{ref:n,id:o,className:_e("text-sm font-medium text-destructive",e),...r,children:i}):null});ze.displayName="FormMessage";function sm(e,[t,r]){return Math.min(r,Math.max(t,e))}var zz=[" ","Enter","ArrowUp","ArrowDown"],Uz=[" ","Enter"],_c="Select",[Af,Mf,Vz]=ef(_c),[wa,rU]=Xr(_c,[Vz,ma]),If=ma(),[Wz,yo]=wa(_c),[$z,Bz]=wa(_c),QC=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:d,disabled:h,required:p}=e,w=If(t),[m,x]=y.useState(null),[g,v]=y.useState(null),[_,C]=y.useState(!1),E=tf(c),[T=!1,P]=to({prop:n,defaultProp:s,onChange:o}),[O,j]=to({prop:i,defaultProp:a,onChange:l}),L=y.useRef(null),q=m?!!m.closest("form"):!0,[R,F]=y.useState(new Set),b=Array.from(R).map(W=>W.props.value).join(";");return u.jsx(Eg,{...w,children:u.jsxs(Wz,{required:p,scope:t,trigger:m,onTriggerChange:x,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:On(),value:O,onValueChange:j,open:T,onOpenChange:P,dir:E,triggerPointerDownPosRef:L,disabled:h,children:[u.jsx(Af.Provider,{scope:t,children:u.jsx($z,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(W=>{F(te=>new Set(te).add(W))},[]),onNativeOptionRemove:y.useCallback(W=>{F(te=>{const $=new Set(te);return $.delete(W),$})},[]),children:r})}),q?u.jsxs(kE,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:O,onChange:W=>j(W.target.value),disabled:h,children:[O===void 0?u.jsx("option",{value:""}):null,Array.from(R)]},b):null]})})};QC.displayName=_c;var JC="SelectTrigger",eE=y.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...s}=e,o=If(r),i=yo(JC,r),a=i.disabled||n,l=Ke(t,i.onTriggerChange),c=Mf(r),[f,d,h]=CE(w=>{const m=c().filter(v=>!v.disabled),x=m.find(v=>v.value===i.value),g=EE(m,w,x);g!==void 0&&i.onValueChange(g.value)}),p=()=>{a||(i.onOpenChange(!0),h())};return u.jsx(Tg,{asChild:!0,...o,children:u.jsx(Me.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":SE(i.value)?"":void 0,...s,ref:l,onClick:ue(s.onClick,w=>{w.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,w=>{const m=w.target;m.hasPointerCapture(w.pointerId)&&m.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)},w.preventDefault())}),onKeyDown:ue(s.onKeyDown,w=>{const m=f.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&d(w.key),!(m&&w.key===" ")&&zz.includes(w.key)&&(p(),w.preventDefault())})})})});eE.displayName=JC;var tE="SelectValue",rE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,children:o,placeholder:i="",...a}=e,l=yo(tE,r),{onValueNodeHasChildrenChange:c}=l,f=o!==void 0,d=Ke(t,l.onValueNodeChange);return nr(()=>{c(f)},[c,f]),u.jsx(Me.span,{...a,ref:d,style:{pointerEvents:"none"},children:SE(l.value)?u.jsx(u.Fragment,{children:i}):o})});rE.displayName=tE;var Hz="SelectIcon",nE=y.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...s}=e;return u.jsx(Me.span,{"aria-hidden":!0,...s,ref:t,children:n||"▼"})});nE.displayName=Hz;var Yz="SelectPortal",sE=e=>u.jsx(ic,{asChild:!0,...e});sE.displayName=Yz;var Go="SelectContent",oE=y.forwardRef((e,t)=>{const r=yo(Go,e.__scopeSelect),[n,s]=y.useState();if(nr(()=>{s(new DocumentFragment)},[]),!r.open){const o=n;return o?ws.createPortal(u.jsx(iE,{scope:e.__scopeSelect,children:u.jsx(Af.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(aE,{...e,ref:t})});oE.displayName=Go;var Jn=10,[iE,wo]=wa(Go),Zz="SelectContentImpl",aE=y.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:w,hideWhenDetached:m,avoidCollisions:x,...g}=e,v=yo(Go,r),[_,C]=y.useState(null),[E,T]=y.useState(null),P=Ke(t,fe=>C(fe)),[O,j]=y.useState(null),[L,q]=y.useState(null),R=Mf(r),[F,b]=y.useState(!1),W=y.useRef(!1);y.useEffect(()=>{if(_)return Pg(_)},[_]),vg();const te=y.useCallback(fe=>{const[ge,...be]=R().map(Se=>Se.ref.current),[Pe]=be.slice(-1),Te=document.activeElement;for(const Se of fe)if(Se===Te||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===ge&&E&&(E.scrollTop=0),Se===Pe&&E&&(E.scrollTop=E.scrollHeight),Se==null||Se.focus(),document.activeElement!==Te))return},[R,E]),$=y.useCallback(()=>te([O,_]),[te,O,_]);y.useEffect(()=>{F&&$()},[F,$]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=v;y.useEffect(()=>{if(_){let fe={x:0,y:0};const ge=Pe=>{var Te,Se;fe={x:Math.abs(Math.round(Pe.pageX)-(((Te=I.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((Se=I.current)==null?void 0:Se.y)??0))}},be=Pe=>{fe.x<=10&&fe.y<=10?Pe.preventDefault():_.contains(Pe.target)||Z(!1),document.removeEventListener("pointermove",ge),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,Z,I]),y.useEffect(()=>{const fe=()=>Z(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[Z]);const[Q,z]=CE(fe=>{const ge=R().filter(Te=>!Te.disabled),be=ge.find(Te=>Te.ref.current===document.activeElement),Pe=EE(ge,fe,be);Pe&&setTimeout(()=>Pe.ref.current.focus())}),V=y.useCallback((fe,ge,be)=>{const Pe=!W.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&(j(fe),Pe&&(W.current=!0))},[v.value]),de=y.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=y.useCallback((fe,ge,be)=>{const Pe=!W.current&&!be;(v.value!==void 0&&v.value===ge||Pe)&&q(fe)},[v.value]),se=n==="popper"?om:lE,Ee=se===om?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:w,hideWhenDetached:m,avoidCollisions:x}:{};return u.jsx(iE,{scope:r,content:_,viewport:E,onViewportChange:T,itemRefCallback:V,selectedItem:O,onItemLeave:de,itemTextRefCallback:ne,focusSelectedItem:$,selectedItemText:L,position:n,isPositioned:F,searchRef:Q,children:u.jsx(lf,{as:hs,allowPinchZoom:!0,children:u.jsx(rf,{asChild:!0,trapped:v.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:ue(s,fe=>{var ge;(ge=v.trigger)==null||ge.focus({preventScroll:!0}),fe.preventDefault()}),children:u.jsx(fa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:u.jsx(se,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:fe=>fe.preventDefault(),...g,...Ee,onPlaced:()=>b(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ue(g.onKeyDown,fe=>{const ge=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!ge&&fe.key.length===1&&z(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let Pe=R().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(Pe=Pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const Te=fe.target,Se=Pe.indexOf(Te);Pe=Pe.slice(Se+1)}setTimeout(()=>te(Pe)),fe.preventDefault()}})})})})})})});aE.displayName=Zz;var Gz="SelectItemAlignedPosition",lE=y.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...s}=e,o=yo(Go,r),i=wo(Go,r),[a,l]=y.useState(null),[c,f]=y.useState(null),d=Ke(t,P=>f(P)),h=Mf(r),p=y.useRef(!1),w=y.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:g,focusSelectedItem:v}=i,_=y.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&m&&x&&g){const P=o.trigger.getBoundingClientRect(),O=c.getBoundingClientRect(),j=o.valueNode.getBoundingClientRect(),L=g.getBoundingClientRect();if(o.dir!=="rtl"){const Te=L.left-O.left,Se=j.left-Te,rt=P.left-Se,k=P.width+rt,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=sm(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.left=D+"px"}else{const Te=O.right-L.right,Se=window.innerWidth-j.right-Te,rt=window.innerWidth-P.right-Se,k=P.width+rt,J=Math.max(k,O.width),G=window.innerWidth-Jn,D=sm(Se,[Jn,G-J]);a.style.minWidth=k+"px",a.style.right=D+"px"}const q=h(),R=window.innerHeight-Jn*2,F=m.scrollHeight,b=window.getComputedStyle(c),W=parseInt(b.borderTopWidth,10),te=parseInt(b.paddingTop,10),$=parseInt(b.borderBottomWidth,10),Z=parseInt(b.paddingBottom,10),I=W+te+F+Z+$,Q=Math.min(x.offsetHeight*5,I),z=window.getComputedStyle(m),V=parseInt(z.paddingTop,10),de=parseInt(z.paddingBottom,10),ne=P.top+P.height/2-Jn,se=R-ne,Ee=x.offsetHeight/2,fe=x.offsetTop+Ee,ge=W+te+fe,be=I-ge;if(ge<=ne){const Te=x===q[q.length-1].ref.current;a.style.bottom="0px";const Se=c.clientHeight-m.offsetTop-m.offsetHeight,rt=Math.max(se,Ee+(Te?de:0)+Se+$),k=ge+rt;a.style.height=k+"px"}else{const Te=x===q[0].ref.current;a.style.top="0px";const rt=Math.max(ne,W+m.offsetTop+(Te?V:0)+Ee)+be;a.style.height=rt+"px",m.scrollTop=ge-ne+m.offsetTop}a.style.margin=`${Jn}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=R+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,a,c,m,x,g,o.dir,n]);nr(()=>_(),[_]);const[C,E]=y.useState();nr(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const T=y.useCallback(P=>{P&&w.current===!0&&(_(),v==null||v(),w.current=!1)},[_,v]);return u.jsx(qz,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:T,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:u.jsx(Me.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});lE.displayName=Gz;var Kz="SelectPopperPosition",om=y.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Jn,...o}=e,i=If(r);return u.jsx(Rg,{...i,...o,ref:t,align:n,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});om.displayName=Kz;var[qz,jv]=wa(Go,{}),im="SelectViewport",cE=y.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...s}=e,o=wo(im,r),i=jv(im,r),a=Ke(t,o.onViewportChange),l=y.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(Af.Slot,{scope:r,children:u.jsx(Me.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,c=>{const f=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const p=Math.abs(l.current-f.scrollTop);if(p>0){const w=window.innerHeight-Jn*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),g=Math.max(m,x);if(g<w){const v=g+p,_=Math.min(w,v),C=v-_;d.style.height=_+"px",d.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});cE.displayName=im;var uE="SelectGroup",[Xz,Qz]=wa(uE),dE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=On();return u.jsx(Xz,{scope:r,id:s,children:u.jsx(Me.div,{role:"group","aria-labelledby":s,...n,ref:t})})});dE.displayName=uE;var fE="SelectLabel",hE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=Qz(fE,r);return u.jsx(Me.div,{id:s.id,...n,ref:t})});hE.displayName=fE;var Pd="SelectItem",[Jz,pE]=wa(Pd),mE=y.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:o,...i}=e,a=yo(Pd,r),l=wo(Pd,r),c=a.value===n,[f,d]=y.useState(o??""),[h,p]=y.useState(!1),w=Ke(t,g=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,g,n,s)}),m=On(),x=()=>{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 u.jsx(Jz,{scope:r,value:n,disabled:s,textId:m,isSelected:c,onItemTextChange:y.useCallback(g=>{d(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(Af.ItemSlot,{scope:r,value:n,disabled:s,textValue:f,children:u.jsx(Me.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:w,onFocus:ue(i.onFocus,()=>p(!0)),onBlur:ue(i.onBlur,()=>p(!1)),onPointerUp:ue(i.onPointerUp,x),onPointerMove:ue(i.onPointerMove,g=>{var v;s?(v=l.onItemLeave)==null||v.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:ue(i.onKeyDown,g=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&g.key===" "||(Uz.includes(g.key)&&x(),g.key===" "&&g.preventDefault())})})})})});mE.displayName=Pd;var Ha="SelectItemText",gE=y.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:s,...o}=e,i=yo(Ha,r),a=wo(Ha,r),l=pE(Ha,r),c=Bz(Ha,r),[f,d]=y.useState(null),h=Ke(t,g=>d(g),l.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,l.value,l.disabled)}),p=f==null?void 0:f.textContent,w=y.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=c;return nr(()=>(m(w),()=>x(w)),[m,x,w]),u.jsxs(u.Fragment,{children:[u.jsx(Me.span,{id:l.textId,...o,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ws.createPortal(o.children,i.valueNode):null]})});gE.displayName=Ha;var vE="SelectItemIndicator",yE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return pE(vE,r).isSelected?u.jsx(Me.span,{"aria-hidden":!0,...n,ref:t}):null});yE.displayName=vE;var am="SelectScrollUpButton",wE=y.forwardRef((e,t)=>{const r=wo(am,e.__scopeSelect),n=jv(am,e.__scopeSelect),[s,o]=y.useState(!1),i=Ke(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(_E,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});wE.displayName=am;var lm="SelectScrollDownButton",xE=y.forwardRef((e,t)=>{const r=wo(lm,e.__scopeSelect),n=jv(lm,e.__scopeSelect),[s,o]=y.useState(!1),i=Ke(t,n.onScrollButtonChange);return nr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;o(f)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?u.jsx(_E,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});xE.displayName=lm;var _E=y.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=e,o=wo("SelectScrollButton",r),i=y.useRef(null),a=Mf(r),l=y.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),nr(()=>{var f;const c=a().find(d=>d.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),u.jsx(Me.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:ue(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{l()})})}),e6="SelectSeparator",bE=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return u.jsx(Me.div,{"aria-hidden":!0,...n,ref:t})});bE.displayName=e6;var cm="SelectArrow",t6=y.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,s=If(r),o=yo(cm,r),i=wo(cm,r);return o.open&&i.position==="popper"?u.jsx(Ng,{...s,...n,ref:t}):null});t6.displayName=cm;function SE(e){return e===""||e===void 0}var kE=y.forwardRef((e,t)=>{const{value:r,...n}=e,s=y.useRef(null),o=Ke(t,s),i=Ik(r);return y.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==r&&f){const d=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(d)}},[i,r]),u.jsx(yc,{asChild:!0,children:u.jsx("select",{...n,ref:o,defaultValue:r})})});kE.displayName="BubbleSelect";function CE(e){const t=jt(e),r=y.useRef(""),n=y.useRef(0),s=y.useCallback(i=>{const a=r.current+i;t(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=y.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,o]}function EE(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=r6(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function r6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var n6=QC,TE=eE,s6=rE,o6=nE,i6=sE,RE=oE,a6=cE,l6=dE,NE=hE,PE=mE,c6=gE,u6=yE,jE=wE,DE=xE,OE=bE;const Pu=n6,ju=l6,Du=s6,ol=y.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(TE,{ref:n,className:_e("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,u.jsx(o6,{asChild:!0,children:u.jsx(q_,{className:"h-4 w-4 opacity-50"})})]}));ol.displayName=TE.displayName;const AE=y.forwardRef(({className:e,...t},r)=>u.jsx(jE,{ref:r,className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(SP,{className:"h-4 w-4"})}));AE.displayName=jE.displayName;const ME=y.forwardRef(({className:e,...t},r)=>u.jsx(DE,{ref:r,className:_e("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(q_,{className:"h-4 w-4"})}));ME.displayName=DE.displayName;const il=y.forwardRef(({className:e,children:t,position:r="popper",...n},s)=>u.jsx(i6,{children:u.jsxs(RE,{ref:s,className:_e("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:[u.jsx(AE,{}),u.jsx(a6,{className:_e("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(ME,{})]})}));il.displayName=RE.displayName;const al=y.forwardRef(({className:e,...t},r)=>u.jsx(NE,{ref:r,className:_e("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));al.displayName=NE.displayName;const ll=y.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(PE,{ref:n,className:_e("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:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(u6,{children:u.jsx(K_,{className:"h-4 w-4"})})}),u.jsx(c6,{children:t})]}));ll.displayName=PE.displayName;const d6=y.forwardRef(({className:e,...t},r)=>u.jsx(OE,{ref:r,className:_e("-mx-1 my-1 h-px bg-muted",e),...t}));d6.displayName=OE.displayName;const um=new Map([["aliyun-cdn",["阿里云-CDN","/imgs/providers/aliyun.svg"]],["aliyun-oss",["阿里云-OSS","/imgs/providers/aliyun.svg"]],["tencent-cdn",["腾讯云-CDN","/imgs/providers/tencent.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),f6=Array.from(um.keys()),h6=Bg,p6=Hg,m6=Yg,IE=y.forwardRef(({className:e,...t},r)=>u.jsx(cc,{ref:r,className:_e("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}));IE.displayName=cc.displayName;const LE=y.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(m6,{children:[u.jsx(IE,{}),u.jsxs(uc,{ref:n,className:_e("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,u.jsxs(df,{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:[u.jsx(fg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));LE.displayName=uc.displayName;const FE=({className:e,...t})=>u.jsx("div",{className:_e("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});FE.displayName="DialogHeader";const zE=y.forwardRef(({className:e,...t},r)=>u.jsx(dc,{ref:r,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t}));zE.displayName=dc.displayName;const g6=y.forwardRef(({className:e,...t},r)=>u.jsx(fc,{ref:r,className:_e("text-sm text-muted-foreground",e),...t}));g6.displayName=fc.displayName;const Io=new Map([["tencent",["腾讯云","/imgs/providers/tencent.svg"]],["aliyun",["阿里云","/imgs/providers/aliyun.svg"]],["cloudflare",["Cloudflare","/imgs/providers/cloudflare.svg"]],["ssh",["SSH部署","/imgs/providers/ssh.svg"]],["webhook",["Webhook","/imgs/providers/webhook.svg"]]]),bc=Oe.union([Oe.literal("aliyun"),Oe.literal("tencent"),Oe.literal("ssh"),Oe.literal("webhook"),Oe.literal("cloudflare")],{message:"请选择云服务商"}),v6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=ti(),s=Oe.object({id:Oe.string().optional(),name:Oe.string().min(1).max(64),configType:bc,secretId:Oe.string().min(1).max(64),secretKey:Oe.string().min(1).max(64)});let o={secretId:"",secretKey:""};e&&(o=e.config);const i=mo({resolver:go(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"tencent",secretId:o.secretId,secretKey:o.secretKey}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{secretId:l.secretId,secretKey:l.secretKey}};try{const f=await vc(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,p])=>{i.setError(h,{type:"manual",message:p.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(vo,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(qe,{control:i.control,name:"name",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"名称"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入授权名称",...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"id",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"secretId",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"SecretId"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入SecretId",...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"secretKey",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"SecretKey"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入SecretKey",...l})}),u.jsx(ze,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"保存"})})]})})})})},y6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=ti(),s=Oe.object({id:Oe.string().optional(),name:Oe.string().min(1).max(64),configType:bc,accessKeyId:Oe.string().min(1).max(64),accessSecretId:Oe.string().min(1).max(64)});let o={accessKeyId:"",accessKeySecret:""};e&&(o=e.config);const i=mo({resolver:go(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"aliyun",accessKeyId:o.accessKeyId,accessSecretId:o.accessKeySecret}}),a=async l=>{const c={id:l.id,name:l.name,configType:l.configType,config:{accessKeyId:l.accessKeyId,accessKeySecret:l.accessSecretId}};try{const f=await vc(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,p])=>{i.setError(h,{type:"manual",message:p.message})});return}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(vo,{...i,children:u.jsxs("form",{onSubmit:l=>{l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(qe,{control:i.control,name:"name",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"名称"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入授权名称",...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"id",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"accessKeyId",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"AccessKeyId"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入AccessKeyId",...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"accessSecretId",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"AccessKeySecret"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入AccessKeySecret",...l})}),u.jsx(ze,{})]})}),u.jsx(ze,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"保存"})})]})})})})},UE=y.forwardRef(({className:e,...t},r)=>u.jsx("textarea",{className:_e("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}));UE.displayName="Textarea";const w6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=ti(),s=Oe.object({id:Oe.string().optional(),name:Oe.string().min(1).max(64),configType:bc,host:Oe.string().ip({message:"请输入合法的IP地址"}),port:Oe.string().min(1).max(5),username:Oe.string().min(1).max(64),password:Oe.string().min(0).max(64),key:Oe.string().min(0).max(20480),keyFile:Oe.string().optional(),command:Oe.string().min(1).max(2048),certPath:Oe.string().min(0).max(2048),keyPath:Oe.string().min(0).max(2048)});let o={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&&(o=e.config);const i=mo({resolver:go(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"ssh",host:o.host,port:o.port,username:o.username,password:o.password,key:o.key,keyFile:o.keyFile,certPath:o.certPath,keyPath:o.keyPath,command:o.command}}),a=async c=>{console.log(c);const f={id:c.id,name:c.name,configType:c.configType,config:{host:c.host,port:c.port,username:c.username,password:c.password,key:c.key,command:c.command,certPath:c.certPath,keyPath:c.keyPath}};try{const d=await vc(f);if(t(),f.id=d.id,f.created=d.created,f.updated=d.updated,c.id){n(f);return}r(f)}catch(d){Object.entries(d.response.data).forEach(([p,w])=>{i.setError(p,{type:"manual",message:w.message})});return}},l=async c=>{var h;const f=(h=c.target.files)==null?void 0:h[0];if(!f)return;const d=await o5(f);i.setValue("key",d),i.setValue("keyFile","")};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(vo,{...i,children:u.jsxs("form",{onSubmit:c=>{c.stopPropagation(),i.handleSubmit(a)(c)},className:"space-y-3",children:[u.jsx(qe,{control:i.control,name:"name",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"名称"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入授权名称",...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"id",render:({field:c})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"configType",render:({field:c})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...c})}),u.jsx(ze,{})]})}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx(qe,{control:i.control,name:"host",render:({field:c})=>u.jsxs(He,{className:"grow",children:[u.jsx(Ye,{children:"服务器IP"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入Host",...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"port",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"SSH端口"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入Port",...c,type:"number"})}),u.jsx(ze,{})]})})]}),u.jsx(qe,{control:i.control,name:"username",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"用户名"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入用户名",...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"password",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"密码"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入密码",...c,type:"password"})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"key",render:({field:c})=>u.jsxs(He,{hidden:!0,children:[u.jsx(Ye,{children:"Key使用证书登录"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入Key",...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"keyFile",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"Key使用证书登录"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入Key",...c,type:"file",onChange:l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"certPath",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"证书上传路径"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入证书上传路径",...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"keyPath",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"私钥上传路径"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入私钥上传路径",...c})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"command",render:({field:c})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"Command"}),u.jsx(Ze,{children:u.jsx(UE,{placeholder:"请输入要执行的命令",...c})}),u.jsx(ze,{})]})}),u.jsx(ze,{}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"保存"})})]})})})})},x6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=ti(),s=Oe.object({id:Oe.string().optional(),name:Oe.string().min(1).max(64),configType:bc,url:Oe.string().url()});let o={url:""};e&&(o=e.config);const i=mo({resolver:go(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"webhook",url:o.url}}),a=async l=>{console.log(l);const c={id:l.id,name:l.name,configType:l.configType,config:{url:l.url}};try{const f=await vc(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,p])=>{i.setError(h,{type:"manual",message:p.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(vo,{...i,children:u.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(qe,{control:i.control,name:"name",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"名称"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入授权名称",...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"id",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"url",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"Webhook Url"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入Webhook Url",...l})}),u.jsx(ze,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"保存"})})]})})})})},_6=({data:e,onAfterReq:t})=>{const{addAccess:r,updateAccess:n}=ti(),s=Oe.object({id:Oe.string().optional(),name:Oe.string().min(1).max(64),configType:bc,dnsApiToken:Oe.string().min(1).max(64)});let o={dnsApiToken:""};e&&(o=e.config);const i=mo({resolver:go(s),defaultValues:{id:e==null?void 0:e.id,name:e==null?void 0:e.name,configType:"cloudflare",dnsApiToken:o.dnsApiToken}}),a=async l=>{console.log(l);const c={id:l.id,name:l.name,configType:l.configType,config:{dnsApiToken:l.dnsApiToken}};try{const f=await vc(c);if(t(),c.id=f.id,c.created=f.created,c.updated=f.updated,l.id){n(c);return}r(c)}catch(f){Object.entries(f.response.data).forEach(([h,p])=>{i.setError(h,{type:"manual",message:p.message})})}};return u.jsx(u.Fragment,{children:u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(vo,{...i,children:u.jsxs("form",{onSubmit:l=>{console.log(l),l.stopPropagation(),i.handleSubmit(a)(l)},className:"space-y-8",children:[u.jsx(qe,{control:i.control,name:"name",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"名称"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入授权名称",...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"id",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"configType",render:({field:l})=>u.jsxs(He,{className:"hidden",children:[u.jsx(Ye,{children:"配置类型"}),u.jsx(Ze,{children:u.jsx(Je,{...l})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:i.control,name:"dnsApiToken",render:({field:l})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"CLOUD_DNS_API_TOKEN"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入CLOUD_DNS_API_TOKEN",...l})}),u.jsx(ze,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"保存"})})]})})})})};function cl({trigger:e,op:t,data:r,className:n}){const[s,o]=y.useState(!1),i=Array.from(Io.keys()),[a,l]=y.useState((r==null?void 0:r.configType)||"");let c=u.jsx(u.Fragment,{children:" "});switch(a){case"tencent":c=u.jsx(v6,{data:r,onAfterReq:()=>{o(!1)}});break;case"aliyun":c=u.jsx(y6,{data:r,onAfterReq:()=>{o(!1)}});break;case"ssh":c=u.jsx(w6,{data:r,onAfterReq:()=>{o(!1)}});break;case"webhook":c=u.jsx(x6,{data:r,onAfterReq:()=>{o(!1)}});break;case"cloudflare":c=u.jsx(_6,{data:r,onAfterReq:()=>{o(!1)}});break}const f=d=>d==a?"border-primary":"";return u.jsxs(h6,{onOpenChange:o,open:s,children:[u.jsx(p6,{asChild:!0,className:_e(n),children:e}),u.jsxs(LE,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[u.jsx(FE,{children:u.jsxs(zE,{children:[t=="add"?"添加":"编辑","授权"]})}),u.jsxs("div",{className:"container",children:[u.jsx(Pv,{children:"服务商"}),u.jsxs(Pu,{onValueChange:d=>{console.log(d),l(d)},children:[u.jsx(ol,{className:"mt-3",children:u.jsx(Du,{placeholder:"请选择服务商"})}),u.jsx(il,{children:u.jsxs(ju,{children:[u.jsx(al,{children:"服务商"}),i.map(d=>{var h,p;return u.jsx(ll,{value:d,children:u.jsxs("div",{className:_e("flex items-center space-x-2 rounded cursor-pointer",f(d)),children:[u.jsx("img",{src:(h=Io.get(d))==null?void 0:h[1],className:"h-6 w-6"}),u.jsx("div",{children:(p=Io.get(d))==null?void 0:p[0]})]})})})]})})]}),c]})]})]})}const b6=()=>{const{config:{accesses:e}}=ti(),[t,r]=y.useState(),n=po();y.useEffect(()=>{const p=new URLSearchParams(n.search).get("id");p&&(async()=>{const m=await c5(p);r(m)})()},[n.search]);const s=Oe.object({id:Oe.string().optional(),domain:Oe.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:"请输入正确的域名"}),access:Oe.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择DNS服务商授权配置"}),targetAccess:Oe.string().regex(/^[a-zA-Z0-9]+$/,{message:"请选择部署服务商配置"}),targetType:Oe.string().regex(/^[a-zA-Z0-9-]+$/,{message:"请选择部署服务类型"})}),o=mo({resolver:go(s),defaultValues:{id:"",domain:"",access:"",targetAccess:"",targetType:""}});y.useEffect(()=>{t&&o.reset({id:t.id,domain:t.domain,access:t.access,targetAccess:t.targetAccess,targetType:t.targetType})},[t,o]);const[i,a]=y.useState(t?t.targetType:""),l=e.filter(h=>{if(i=="")return!0;const p=o.getValues().targetType.split("-");return h.configType===p[0]}),{toast:c}=Cf(),f=bs(),d=async h=>{const p={id:h.id,crontab:"0 0 * * *",domain:h.domain,access:h.access,targetAccess:h.targetAccess,targetType:h.targetType};try{await Jp(p);let w="域名编辑成功";p.id==""&&(w="域名添加成功"),c({title:"成功",description:w}),f("/")}catch(w){Object.entries(w.response.data).forEach(([x,g])=>{o.setError(x,{type:"manual",message:g.message})});return}};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"",children:[u.jsx(_v,{}),u.jsxs("div",{className:"border-b dark:border-stone-500 h-10 text-muted-foreground",children:[t!=null&&t.id?"编辑":"新增","域名"]}),u.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:u.jsx(vo,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(d),className:"space-y-8 dark:text-stone-200",children:[u.jsx(qe,{control:o.control,name:"domain",render:({field:h})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"域名"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"请输入域名",...h})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:o.control,name:"access",render:({field:h})=>u.jsxs(He,{children:[u.jsxs(Ye,{className:"flex w-full justify-between",children:[u.jsx("div",{children:"DNS 服务商授权配置"}),u.jsx(cl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(v0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(Ze,{children:u.jsxs(Pu,{...h,value:h.value,onValueChange:p=>{o.setValue("access",p)},children:[u.jsx(ol,{children:u.jsx(Du,{placeholder:"请选择授权配置"})}),u.jsx(il,{children:u.jsxs(ju,{children:[u.jsx(al,{children:"服务商授权配置"}),e.map(p=>{var w;return u.jsx(ll,{value:p.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(w=Io.get(p.configType))==null?void 0:w[1]}),u.jsx("div",{children:p.name})]})},p.id)})]})})]})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:o.control,name:"targetType",render:({field:h})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"部署服务类型"}),u.jsx(Ze,{children:u.jsxs(Pu,{...h,onValueChange:p=>{a(p),o.setValue("targetType",p)},children:[u.jsx(ol,{children:u.jsx(Du,{placeholder:"请选择部署服务类型"})}),u.jsx(il,{children:u.jsxs(ju,{children:[u.jsx(al,{children:"部署服务类型"}),f6.map(p=>{var w,m;return u.jsx(ll,{value:p,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(w=um.get(p))==null?void 0:w[1]}),u.jsx("div",{children:(m=um.get(p))==null?void 0:m[0]})]})},p)})]})})]})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:o.control,name:"targetAccess",render:({field:h})=>u.jsxs(He,{children:[u.jsxs(Ye,{className:"w-full flex justify-between",children:[u.jsx("div",{children:"部署服务商授权配置"}),u.jsx(cl,{trigger:u.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[u.jsx(v0,{size:14}),"新增"]}),op:"add"})]}),u.jsx(Ze,{children:u.jsxs(Pu,{...h,onValueChange:p=>{o.setValue("targetAccess",p)},children:[u.jsx(ol,{children:u.jsx(Du,{placeholder:"请选择授权配置"})}),u.jsx(il,{children:u.jsxs(ju,{children:[u.jsx(al,{children:"服务商授权配置"}),l.map(p=>{var w;return u.jsx(ll,{value:p.id,children:u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("img",{className:"w-6",src:(w=Io.get(p.configType))==null?void 0:w[1]}),u.jsx("div",{children:p.name})]})},p.id)})]})})]})}),u.jsx(ze,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"保存"})})]})})})]})})},S6=()=>{const{config:e,deleteAccess:t}=ti(),{accesses:r}=e,n=async s=>{const o=await O4(s);t(o.id)};return u.jsxs("div",{className:"",children:[u.jsxs("div",{className:"flex justify-between items-center",children:[u.jsx("div",{className:"text-muted-foreground",children:"授权管理"}),u.jsx(cl,{trigger:u.jsx(xt,{children:"添加授权"}),op:"add"})]}),r.length===0?u.jsxs("div",{className:"flex flex-col items-center mt-10",children:[u.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:u.jsx(EP,{size:40,className:"text-primary"})}),u.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:"请添加授权开始部署证书吧。"}),u.jsx(cl,{trigger:u.jsx(xt,{children:"添加授权"}),op:"add",className:"mt-3"})]}):u.jsxs(u.Fragment,{children:[u.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:[u.jsx("div",{className:"w-48",children:"名称"}),u.jsx("div",{className:"w-48",children:"服务商"}),u.jsx("div",{className:"w-52",children:"创建时间"}),u.jsx("div",{className:"w-52",children:"更新时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"授权列表"}),r.map(s=>{var o,i;return u.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:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:s.name}),u.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[u.jsx("img",{src:(o=Io.get(s.configType))==null?void 0:o[1],className:"w-6"}),u.jsx("div",{children:(i=Io.get(s.configType))==null?void 0:i[0]})]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["创建于 ",s.created&&Fl(s.created)]}),u.jsxs("div",{className:"sm:w-52 w-full pt-1 sm:pt-0 flex items-center",children:["更新于 ",s.updated&&Fl(s.updated)]}),u.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[u.jsx(cl,{trigger:u.jsx(xt,{variant:"link",className:"p-0",children:"编辑"}),op:"edit",data:s}),u.jsx(Ht,{orientation:"vertical",className:"h-4 mx-2"}),u.jsx(xt,{variant:"link",className:"p-0",onClick:()=>{n(s)},children:"删除"})]})]},s.id)})]})]})},k6=sc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),VE=y.forwardRef(({className:e,variant:t,...r},n)=>u.jsx("div",{ref:n,role:"alert",className:_e(k6({variant:t}),e),...r}));VE.displayName="Alert";const WE=y.forwardRef(({className:e,...t},r)=>u.jsx("h5",{ref:r,className:_e("mb-1 font-medium leading-none tracking-tight",e),...t}));WE.displayName="AlertTitle";const $E=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:_e("text-sm [&_p]:leading-relaxed",e),...t}));$E.displayName="AlertDescription";function C6(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Dv="ScrollArea",[BE,nU]=Xr(Dv),[E6,en]=BE(Dv),HE=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,l]=y.useState(null),[c,f]=y.useState(null),[d,h]=y.useState(null),[p,w]=y.useState(null),[m,x]=y.useState(null),[g,v]=y.useState(0),[_,C]=y.useState(0),[E,T]=y.useState(!1),[P,O]=y.useState(!1),j=Ke(t,q=>l(q)),L=tf(s);return u.jsx(E6,{scope:r,type:n,dir:L,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:f,content:d,onContentChange:h,scrollbarX:p,onScrollbarXChange:w,scrollbarXEnabled:E,onScrollbarXEnabledChange:T,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:P,onScrollbarYEnabledChange:O,onCornerWidthChange:v,onCornerHeightChange:C,children:u.jsx(Me.div,{dir:L,...i,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});HE.displayName=Dv;var YE="ScrollAreaViewport",ZE=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=en(YE,r),a=y.useRef(null),l=Ke(t,a,i.onViewportChange);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(Me.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});ZE.displayName=YE;var Vn="ScrollAreaScrollbar",Ov=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en(Vn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?u.jsx(T6,{...n,ref:t,forceMount:r}):s.type==="scroll"?u.jsx(R6,{...n,ref:t,forceMount:r}):s.type==="auto"?u.jsx(GE,{...n,ref:t,forceMount:r}):s.type==="always"?u.jsx(Av,{...n,ref:t}):null});Ov.displayName=Vn;var T6=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en(Vn,e.__scopeScrollArea),[o,i]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},f=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),u.jsx(Cr,{present:r||o,children:u.jsx(GE,{"data-state":o?"visible":"hidden",...n,ref:t})})}),R6=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=en(Vn,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Ff(()=>l("SCROLL_END"),100),[a,l]=C6("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 c=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const c=s.viewport,f=o?"scrollLeft":"scrollTop";if(c){let d=c[f];const h=()=>{const p=c[f];d!==p&&(l("SCROLL"),i()),d=p};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[s.viewport,o,l,i]),u.jsx(Cr,{present:r||a!=="hidden",children:u.jsx(Av,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),GE=y.forwardRef((e,t)=>{const r=en(Vn,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=y.useState(!1),a=e.orientation==="horizontal",l=Ff(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;i(a?c:f)}},10);return oa(r.viewport,l),oa(r.content,l),u.jsx(Cr,{present:n||o,children:u.jsx(Av,{"data-state":o?"visible":"hidden",...s,ref:t})})}),Av=y.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=en(Vn,e.__scopeScrollArea),o=y.useRef(null),i=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=JE(a.viewport,a.content),f={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function d(h,p){return A6(h,i.current,a,p)}return r==="horizontal"?u.jsx(N6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,p=mw(h,a,s.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=d(h,s.dir))}}):r==="vertical"?u.jsx(P6,{...f,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,p=mw(h,a);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=d(h))}}):null}),N6=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en(Vn,e.__scopeScrollArea),[i,a]=y.useState(),l=y.useRef(null),c=Ke(t,l,o.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(qE,{"data-orientation":"horizontal",...s,ref:c,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Lf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollLeft+f.deltaX;e.onWheelScroll(h),tT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Dd(i.paddingLeft),paddingEnd:Dd(i.paddingRight)}})}})}),P6=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=en(Vn,e.__scopeScrollArea),[i,a]=y.useState(),l=y.useRef(null),c=Ke(t,l,o.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(qE,{"data-orientation":"vertical",...s,ref:c,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Lf(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(o.viewport){const h=o.viewport.scrollTop+f.deltaY;e.onWheelScroll(h),tT(h,d)&&f.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Dd(i.paddingTop),paddingEnd:Dd(i.paddingBottom)}})}})}),[j6,KE]=BE(Vn),qE=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:f,onResize:d,...h}=e,p=en(Vn,r),[w,m]=y.useState(null),x=Ke(t,j=>m(j)),g=y.useRef(null),v=y.useRef(""),_=p.viewport,C=n.content-n.viewport,E=jt(f),T=jt(l),P=Ff(d,10);function O(j){if(g.current){const L=j.clientX-g.current.left,q=j.clientY-g.current.top;c({x:L,y:q})}}return y.useEffect(()=>{const j=L=>{const q=L.target;(w==null?void 0:w.contains(q))&&E(L,C)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[_,w,C,E]),y.useEffect(T,[n,T]),oa(w,P),oa(p.content,P),u.jsx(j6,{scope:r,scrollbar:w,hasThumb:s,onThumbChange:jt(o),onThumbPointerUp:jt(i),onThumbPositionChange:T,onThumbPointerDown:jt(a),children:u.jsx(Me.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),g.current=w.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),O(j))}),onPointerMove:ue(e.onPointerMove,O),onPointerUp:ue(e.onPointerUp,j=>{const L=j.target;L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),jd="ScrollAreaThumb",XE=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=KE(jd,e.__scopeScrollArea);return u.jsx(Cr,{present:r||s.hasThumb,children:u.jsx(D6,{ref:t,...n})})}),D6=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=en(jd,r),i=KE(jd,r),{onThumbPositionChange:a}=i,l=Ke(t,d=>i.onThumbChange(d)),c=y.useRef(),f=Ff(()=>{c.current&&(c.current(),c.current=void 0)},100);return y.useEffect(()=>{const d=o.viewport;if(d){const h=()=>{if(f(),!c.current){const p=M6(d,a);c.current=p,a()}};return a(),d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[o.viewport,f,a]),u.jsx(Me.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ue(e.onPointerDownCapture,d=>{const p=d.target.getBoundingClientRect(),w=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:w,y:m})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});XE.displayName=jd;var Mv="ScrollAreaCorner",QE=y.forwardRef((e,t)=>{const r=en(Mv,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?u.jsx(O6,{...e,ref:t}):null});QE.displayName=Mv;var O6=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=en(Mv,r),[o,i]=y.useState(0),[a,l]=y.useState(0),c=!!(o&&a);return oa(s.scrollbarX,()=>{var d;const f=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(f),l(f)}),oa(s.scrollbarY,()=>{var d;const f=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(f),i(f)}),c?u.jsx(Me.div,{...n,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Dd(e){return e?parseInt(e,10):0}function JE(e,t){const r=e/t;return isNaN(r)?0:r}function Lf(e){const t=JE(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function A6(e,t,r,n="ltr"){const s=Lf(r),o=s/2,i=t||o,a=s-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return eT([l,c],d)(e)}function mw(e,t,r="ltr"){const n=Lf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,l=r==="ltr"?[0,i]:[i*-1,0],c=sm(e,l);return eT([0,i],[0,a])(c)}function eT(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 tT(e,t){return e>0&&e<t}var M6=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,a=r.top!==o.top;(i||a)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Ff(e,t){const r=jt(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 oa(e,t){const r=jt(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 rT=HE,I6=ZE,L6=QE;const nT=y.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(rT,{ref:n,className:_e("relative overflow-hidden",e),...r,children:[u.jsx(I6,{className:"h-full w-full rounded-[inherit]",children:t}),u.jsx(sT,{}),u.jsx(L6,{})]}));nT.displayName=rT.displayName;const sT=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>u.jsx(Ov,{ref:n,orientation:t,className:_e("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:u.jsx(XE,{className:"relative flex-1 rounded-full bg-border"})}));sT.displayName=Ov.displayName;const F6=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 Dt().collection("deployments").getList(t,r,{filter:n,sort:"-deployedAt",expand:"domain"})},z6=()=>{const e=bs(),[t,r]=y.useState(),[n]=yP(),s=n.get("domain");return y.useEffect(()=>{(async()=>{const i={};s&&(i.domain=s);const a=await F6(i);r(a.items)})()},[s]),u.jsxs(nT,{className:"h-[80vh] overflow-hidden",children:[u.jsx("div",{className:"text-muted-foreground",children:"部署历史"}),t!=null&&t.length?u.jsxs(u.Fragment,{children:[u.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:[u.jsx("div",{className:"w-48",children:"域名"}),u.jsx("div",{className:"w-24",children:"状态"}),u.jsx("div",{className:"w-56",children:"阶段"}),u.jsx("div",{className:"w-56 sm:ml-2 text-center",children:"最近执行时间"}),u.jsx("div",{className:"grow",children:"操作"})]}),u.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:"部署历史"}),t==null?void 0:t.map(o=>{var i,a;return u.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:[u.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(i=o.expand.domain)==null?void 0:i.domain}),u.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:o.phase==="deploy"&&o.phaseSuccess?u.jsx(X_,{size:16,className:"text-green-700"}):u.jsx(Q_,{size:16,className:"text-red-700"})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:u.jsx(lk,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),u.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Fl(o.deployedAt)}),u.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:u.jsxs(sS,{children:[u.jsx(oS,{asChild:!0,children:u.jsx(xt,{variant:"link",className:"p-0",children:"日志"})}),u.jsxs(Zg,{className:"sm:max-w-5xl",children:[u.jsx(aS,{children:u.jsxs(lS,{children:[(a=o.expand.domain)==null?void 0:a.domain,"-",o.id,"部署详情"]})}),u.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&u.jsx(u.Fragment,{children:o.log.check.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.apply&&u.jsx(u.Fragment,{children:o.log.apply.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.info&&l.info.map(c=>u.jsx("div",{className:"mt-1 text-green-600",children:c})),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))}),o.log.deploy&&u.jsx(u.Fragment,{children:o.log.deploy.map(l=>u.jsxs("div",{className:"flex flex-col mt-2",children:[u.jsxs("div",{className:"flex",children:[u.jsxs("div",{children:["[",l.time,"]"]}),u.jsx("div",{className:"ml-2",children:l.message})]}),l.error&&u.jsx("div",{className:"mt-1 text-red-600",children:l.error})]}))})]})]})]})})]},o.id)})]}):u.jsx(u.Fragment,{children:u.jsxs(VE,{className:"max-w-[40em] mx-auto mt-20",children:[u.jsx(WE,{children:"暂无数据"}),u.jsxs($E,{children:[u.jsxs("div",{className:"flex items-center mt-5",children:[u.jsx("div",{children:u.jsx(NP,{className:"text-yellow-400",size:36})}),u.jsxs("div",{className:"ml-2",children:[" ","你暂未创建任何部署,请先添加域名进行部署吧!"]})]}),u.jsx("div",{className:"mt-2 flex justify-end",children:u.jsx(xt,{onClick:()=>{e("/")},children:"添加域名"})})]})]})})]})},dm=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",U6=Oe.object({username:Oe.string().email({message:"请输入正确的邮箱地址"}),password:Oe.string().min(10,{message:"密码至少10个字符"})}),V6=()=>{const e=mo({resolver:go(U6),defaultValues:{username:"",password:""}}),t=async n=>{try{await Dt().admins.authWithPassword(n.username,n.password),r("/")}catch(s){const o=dm(s);e.setError("username",{message:o}),e.setError("password",{message:o})}},r=bs();return u.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[u.jsx("div",{className:"flex justify-center mb-10",children:u.jsx("img",{src:"/vite.svg",className:"w-16"})}),u.jsx(vo,{...e,children:u.jsxs("form",{onSubmit:e.handleSubmit(t),className:"space-y-8 dark:text-stone-200",children:[u.jsx(qe,{control:e.control,name:"username",render:({field:n})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"用户名"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"email",...n})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:e.control,name:"password",render:({field:n})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"密码"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"shadcn",...n,type:"password"})}),u.jsx(ze,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"登录"})})]})})]})},W6=()=>Dt().authStore.isValid&&Dt().authStore.isAdmin?u.jsx(Z_,{to:"/"}):u.jsx("div",{className:"container",children:u.jsx(dg,{})}),$6=Oe.object({oldPassword:Oe.string().min(10,{message:"密码至少10个字符"}),newPassword:Oe.string().min(10,{message:"密码至少10个字符"}),confirmPassword:Oe.string().min(10,{message:"密码至少10个字符"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"两次密码不一致",path:["confirmPassword"]}),B6=()=>{const{toast:e}=Cf(),t=bs(),r=mo({resolver:go($6),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),n=async s=>{var o,i;try{await Dt().admins.authWithPassword((o=Dt().authStore.model)==null?void 0:o.email,s.oldPassword)}catch(a){const l=dm(a);r.setError("oldPassword",{message:l})}try{await Dt().admins.update((i=Dt().authStore.model)==null?void 0:i.id,{password:s.newPassword,passwordConfirm:s.confirmPassword}),Dt().authStore.clear(),e({title:"修改密码成功",description:"请重新登录"}),setTimeout(()=>{t("/login")},500)}catch(a){const l=dm(a);e({title:"修改密码失败",description:l,variant:"destructive"})}};return u.jsx(u.Fragment,{children:u.jsx(vo,{...r,children:u.jsxs("form",{onSubmit:r.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[u.jsx(qe,{control:r.control,name:"oldPassword",render:({field:s})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"当前密码"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"当前密码",...s,type:"password"})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:r.control,name:"newPassword",render:({field:s})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"新密码"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"newPassword",...s,type:"password"})}),u.jsx(ze,{})]})}),u.jsx(qe,{control:r.control,name:"confirmPassword",render:({field:s})=>u.jsxs(He,{children:[u.jsx(Ye,{children:"确认密码"}),u.jsx(Ze,{children:u.jsx(Je,{placeholder:"confirmPassword",...s,type:"password"})}),u.jsx(ze,{})]})}),u.jsx("div",{className:"flex justify-end",children:u.jsx(xt,{type:"submit",children:"确认修改"})})]})})})},H6=()=>u.jsxs("div",{children:[u.jsx(_v,{}),u.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:"设置密码"}),u.jsx("div",{className:"w-full sm:w-[35em] mt-10 flex flex-col p-3 mx-auto",children:u.jsx(dg,{})})]}),Y6=nP([{path:"/",element:u.jsx($4,{}),children:[{path:"/",element:u.jsx(h5,{})},{path:"/edit",element:u.jsx(b6,{})},{path:"/access",element:u.jsx(S6,{})},{path:"/history",element:u.jsx(z6,{})},{path:"/setting",element:u.jsx(H6,{}),children:[{path:"/setting/password",element:u.jsx(B6,{})}]}]},{path:"/login",element:u.jsx(W6,{}),children:[{path:"/login",element:u.jsx(V6,{})}]},{path:"/about",element:u.jsx("div",{children:"About"})}]);Ih.createRoot(document.getElementById("root")).render(u.jsx(et.StrictMode,{children:u.jsx(L4,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:u.jsx(fP,{router:Y6})})}))});export default Z6();