certimate/ui/dist/assets/index-C9iolg9g.js
2024-10-15 21:15:21 +08:00

325 lines
883 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 pP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var VH=pP((n9,Ed)=>{function g1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[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"]'))r(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"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(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 r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Cu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y1={exports:{}},Vf={},v1={exports:{}},nt={};/**
* @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 Gc=Symbol.for("react.element"),gP=Symbol.for("react.portal"),yP=Symbol.for("react.fragment"),vP=Symbol.for("react.strict_mode"),xP=Symbol.for("react.profiler"),wP=Symbol.for("react.provider"),bP=Symbol.for("react.context"),_P=Symbol.for("react.forward_ref"),SP=Symbol.for("react.suspense"),kP=Symbol.for("react.memo"),CP=Symbol.for("react.lazy"),l0=Symbol.iterator;function jP(e){return e===null||typeof e!="object"?null:(e=l0&&e[l0]||e["@@iterator"],typeof e=="function"?e:null)}var x1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w1=Object.assign,b1={};function Ya(e,t,n){this.props=e,this.context=t,this.refs=b1,this.updater=n||x1}Ya.prototype.isReactComponent={};Ya.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")};Ya.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _1(){}_1.prototype=Ya.prototype;function ry(e,t,n){this.props=e,this.context=t,this.refs=b1,this.updater=n||x1}var sy=ry.prototype=new _1;sy.constructor=ry;w1(sy,Ya.prototype);sy.isPureReactComponent=!0;var c0=Array.isArray,S1=Object.prototype.hasOwnProperty,oy={current:null},k1={key:!0,ref:!0,__self:!0,__source:!0};function C1(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)S1.call(t,r)&&!k1.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Gc,type:e,key:o,ref:i,props:s,_owner:oy.current}}function EP(e,t){return{$$typeof:Gc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function iy(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gc}function NP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var u0=/\/+/g;function fm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?NP(""+e.key):t.toString(36)}function sd(e,t,n,r,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 Gc:case gP:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+fm(i,0):r,c0(s)?(n="",e!=null&&(n=e.replace(u0,"$&/")+"/"),sd(s,t,n,"",function(u){return u})):s!=null&&(iy(s)&&(s=EP(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(u0,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",c0(e))for(var a=0;a<e.length;a++){o=e[a];var c=r+fm(o,a);i+=sd(o,t,n,c,s)}else if(c=jP(e),typeof c=="function")for(e=c.call(e),a=0;!(o=e.next()).done;)o=o.value,c=r+fm(o,a++),i+=sd(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ju(e,t,n){if(e==null)return e;var r=[],s=0;return sd(e,r,"","",function(o){return t.call(n,o,s++)}),r}function TP(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Cn={current:null},od={transition:null},PP={ReactCurrentDispatcher:Cn,ReactCurrentBatchConfig:od,ReactCurrentOwner:oy};function j1(){throw Error("act(...) is not supported in production builds of React.")}nt.Children={map:ju,forEach:function(e,t,n){ju(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ju(e,function(){t++}),t},toArray:function(e){return ju(e,function(t){return t})||[]},only:function(e){if(!iy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};nt.Component=Ya;nt.Fragment=yP;nt.Profiler=xP;nt.PureComponent=ry;nt.StrictMode=vP;nt.Suspense=SP;nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PP;nt.act=j1;nt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=w1({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=oy.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)S1.call(t,c)&&!k1.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Gc,type:e.type,key:s,ref:o,props:r,_owner:i}};nt.createContext=function(e){return e={$$typeof:bP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:wP,_context:e},e.Consumer=e};nt.createElement=C1;nt.createFactory=function(e){var t=C1.bind(null,e);return t.type=e,t};nt.createRef=function(){return{current:null}};nt.forwardRef=function(e){return{$$typeof:_P,render:e}};nt.isValidElement=iy;nt.lazy=function(e){return{$$typeof:CP,_payload:{_status:-1,_result:e},_init:TP}};nt.memo=function(e,t){return{$$typeof:kP,type:e,compare:t===void 0?null:t}};nt.startTransition=function(e){var t=od.transition;od.transition={};try{e()}finally{od.transition=t}};nt.unstable_act=j1;nt.useCallback=function(e,t){return Cn.current.useCallback(e,t)};nt.useContext=function(e){return Cn.current.useContext(e)};nt.useDebugValue=function(){};nt.useDeferredValue=function(e){return Cn.current.useDeferredValue(e)};nt.useEffect=function(e,t){return Cn.current.useEffect(e,t)};nt.useId=function(){return Cn.current.useId()};nt.useImperativeHandle=function(e,t,n){return Cn.current.useImperativeHandle(e,t,n)};nt.useInsertionEffect=function(e,t){return Cn.current.useInsertionEffect(e,t)};nt.useLayoutEffect=function(e,t){return Cn.current.useLayoutEffect(e,t)};nt.useMemo=function(e,t){return Cn.current.useMemo(e,t)};nt.useReducer=function(e,t,n){return Cn.current.useReducer(e,t,n)};nt.useRef=function(e){return Cn.current.useRef(e)};nt.useState=function(e){return Cn.current.useState(e)};nt.useSyncExternalStore=function(e,t,n){return Cn.current.useSyncExternalStore(e,t,n)};nt.useTransition=function(){return Cn.current.useTransition()};nt.version="18.3.1";v1.exports=nt;var y=v1.exports;const We=Uf(y),E1=g1({__proto__:null,default:We},[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 RP=y,AP=Symbol.for("react.element"),DP=Symbol.for("react.fragment"),OP=Object.prototype.hasOwnProperty,IP=RP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,MP={key:!0,ref:!0,__self:!0,__source:!0};function N1(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)OP.call(t,r)&&!MP.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:AP,type:e,key:o,ref:i,props:s,_owner:IP.current}}Vf.Fragment=DP;Vf.jsx=N1;Vf.jsxs=N1;y1.exports=Vf;var l=y1.exports,yp={},T1={exports:{}},Xn={},P1={exports:{}},R1={};/**
* @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(W,I){var X=W.length;W.push(I);e:for(;0<X;){var $=X-1>>>1,B=W[$];if(0<s(B,I))W[$]=I,W[X]=B,X=$;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var I=W[0],X=W.pop();if(X!==I){W[0]=X;e:for(var $=0,B=W.length,he=B>>>1;$<he;){var se=2*($+1)-1,oe=W[se],Oe=se+1,me=W[Oe];if(0>s(oe,X))Oe<B&&0>s(me,oe)?(W[$]=me,W[Oe]=X,$=Oe):(W[$]=oe,W[se]=X,$=se);else if(Oe<B&&0>s(me,X))W[$]=me,W[Oe]=X,$=Oe;else break e}}return I}function s(W,I){var X=W.sortIndex-I.sortIndex;return X!==0?X:W.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 c=[],u=[],d=1,f=null,h=3,m=!1,x=!1,p=!1,w=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 b(W){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=W)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function _(W){if(p=!1,b(W),!x)if(n(c)!==null)x=!0,J(C);else{var I=n(u);I!==null&&F(_,I.startTime-W)}}function C(W,I){x=!1,p&&(p=!1,g(R),R=-1),m=!0;var X=h;try{for(b(I),f=n(c);f!==null&&(!(f.expirationTime>I)||W&&!G());){var $=f.callback;if(typeof $=="function"){f.callback=null,h=f.priorityLevel;var B=$(f.expirationTime<=I);I=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(I)}else r(c);f=n(c)}if(f!==null)var he=!0;else{var se=n(u);se!==null&&F(_,se.startTime-I),he=!1}return he}finally{f=null,h=X,m=!1}}var j=!1,T=null,R=-1,A=5,O=-1;function G(){return!(e.unstable_now()-O<A)}function N(){if(T!==null){var W=e.unstable_now();O=W;var I=!0;try{I=T(!0,W)}finally{I?z():(j=!1,T=null)}}else j=!1}var z;if(typeof v=="function")z=function(){v(N)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,U=S.port2;S.port1.onmessage=N,z=function(){U.postMessage(null)}}else z=function(){w(N,0)};function J(W){T=W,j||(j=!0,z())}function F(W,I){R=w(function(){W(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(W){W.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,J(C))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(W){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var X=h;h=I;try{return W()}finally{h=X}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,I){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var X=h;h=W;try{return I()}finally{h=X}},e.unstable_scheduleCallback=function(W,I,X){var $=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?$+X:$):X=$,W){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=X+B,W={id:d++,callback:I,priorityLevel:W,startTime:X,expirationTime:B,sortIndex:-1},X>$?(W.sortIndex=X,t(u,W),n(c)===null&&W===n(u)&&(p?(g(R),R=-1):p=!0,F(_,X-$))):(W.sortIndex=B,t(c,W),x||m||(x=!0,J(C))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var I=h;return function(){var X=h;h=I;try{return W.apply(this,arguments)}finally{h=X}}}})(R1);P1.exports=R1;var LP=P1.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 zP=y,Kn=LP;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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 A1=new Set,nc={};function bi(e,t){ja(e,t),ja(e+"Capture",t)}function ja(e,t){for(nc[e]=t,e=0;e<t.length;e++)A1.add(t[e])}var As=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vp=Object.prototype.hasOwnProperty,FP=/^[: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]*$/,d0={},f0={};function $P(e){return vp.call(f0,e)?!0:vp.call(d0,e)?!1:FP.test(e)?f0[e]=!0:(d0[e]=!0,!1)}function UP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function VP(e,t,n,r){if(t===null||typeof t>"u"||UP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 jn(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var sn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sn[e]=new jn(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){sn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var ay=/[\-:]([a-z])/g;function ly(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(ay,ly);sn[t]=new jn(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(ay,ly);sn[t]=new jn(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(ay,ly);sn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});sn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function cy(e,t,n,r){var s=sn.hasOwnProperty(t)?sn[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(VP(t,n,s,r)&&(n=null),r||s===null?$P(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Us=zP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Eu=Symbol.for("react.element"),Ki=Symbol.for("react.portal"),Gi=Symbol.for("react.fragment"),uy=Symbol.for("react.strict_mode"),xp=Symbol.for("react.profiler"),D1=Symbol.for("react.provider"),O1=Symbol.for("react.context"),dy=Symbol.for("react.forward_ref"),wp=Symbol.for("react.suspense"),bp=Symbol.for("react.suspense_list"),fy=Symbol.for("react.memo"),ro=Symbol.for("react.lazy"),I1=Symbol.for("react.offscreen"),h0=Symbol.iterator;function dl(e){return e===null||typeof e!="object"?null:(e=h0&&e[h0]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,hm;function Pl(e){if(hm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);hm=t&&t[1]||""}return`
`+hm+e}var mm=!1;function pm(e,t){if(!e||mm)return"";mm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),o=r.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 c=`
`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=a);break}}}finally{mm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pl(e):""}function BP(e){switch(e.tag){case 5:return Pl(e.type);case 16:return Pl("Lazy");case 13:return Pl("Suspense");case 19:return Pl("SuspenseList");case 0:case 2:case 15:return e=pm(e.type,!1),e;case 11:return e=pm(e.type.render,!1),e;case 1:return e=pm(e.type,!0),e;default:return""}}function _p(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 Gi:return"Fragment";case Ki:return"Portal";case xp:return"Profiler";case uy:return"StrictMode";case wp:return"Suspense";case bp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case O1:return(e.displayName||"Context")+".Consumer";case D1:return(e._context.displayName||"Context")+".Provider";case dy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fy:return t=e.displayName||null,t!==null?t:_p(e.type)||"Memo";case ro:t=e._payload,e=e._init;try{return _p(e(t))}catch{}}return null}function WP(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 _p(t);case 8:return t===uy?"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 So(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function M1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function HP(e){var t=M1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=HP(e))}function L1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=M1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nd(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 Sp(e,t){var n=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function m0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=So(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function z1(e,t){t=t.checked,t!=null&&cy(e,"checked",t,!1)}function kp(e,t){z1(e,t);var n=So(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cp(e,t.type,So(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function p0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cp(e,t,n){(t!=="number"||Nd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rl=Array.isArray;function fa(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+So(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function jp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function g0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ie(92));if(Rl(n)){if(1<n.length)throw Error(ie(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:So(n)}}function F1(e,t){var n=So(t.value),r=So(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function y0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $1(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 Ep(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tu,U1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tu=Tu||document.createElement("div"),Tu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vl={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},YP=["Webkit","ms","Moz","O"];Object.keys(Vl).forEach(function(e){YP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vl[t]=Vl[e]})});function V1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vl.hasOwnProperty(e)&&Vl[e]?(""+t).trim():t+"px"}function B1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=V1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var KP=Mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Np(e,t){if(t){if(KP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function Tp(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 Pp=null;function hy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rp=null,ha=null,ma=null;function v0(e){if(e=Xc(e)){if(typeof Rp!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=Kf(t),Rp(e.stateNode,e.type,t))}}function W1(e){ha?ma?ma.push(e):ma=[e]:ha=e}function H1(){if(ha){var e=ha,t=ma;if(ma=ha=null,v0(e),t)for(e=0;e<t.length;e++)v0(t[e])}}function Y1(e,t){return e(t)}function K1(){}var gm=!1;function G1(e,t,n){if(gm)return e(t,n);gm=!0;try{return Y1(e,t,n)}finally{gm=!1,(ha!==null||ma!==null)&&(K1(),H1())}}function sc(e,t){var n=e.stateNode;if(n===null)return null;var r=Kf(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ie(231,t,typeof n));return n}var Ap=!1;if(As)try{var fl={};Object.defineProperty(fl,"passive",{get:function(){Ap=!0}}),window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{Ap=!1}function GP(e,t,n,r,s,o,i,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Bl=!1,Td=null,Pd=!1,Dp=null,ZP={onError:function(e){Bl=!0,Td=e}};function qP(e,t,n,r,s,o,i,a,c){Bl=!1,Td=null,GP.apply(ZP,arguments)}function XP(e,t,n,r,s,o,i,a,c){if(qP.apply(this,arguments),Bl){if(Bl){var u=Td;Bl=!1,Td=null}else throw Error(ie(198));Pd||(Pd=!0,Dp=u)}}function _i(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Z1(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 x0(e){if(_i(e)!==e)throw Error(ie(188))}function QP(e){var t=e.alternate;if(!t){if(t=_i(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return x0(s),e;if(o===r)return x0(s),t;o=o.sibling}throw Error(ie(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(ie(189))}}if(n.alternate!==r)throw Error(ie(190))}if(n.tag!==3)throw Error(ie(188));return n.stateNode.current===n?e:t}function q1(e){return e=QP(e),e!==null?X1(e):null}function X1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=X1(e);if(t!==null)return t;e=e.sibling}return null}var Q1=Kn.unstable_scheduleCallback,w0=Kn.unstable_cancelCallback,JP=Kn.unstable_shouldYield,eR=Kn.unstable_requestPaint,Ut=Kn.unstable_now,tR=Kn.unstable_getCurrentPriorityLevel,my=Kn.unstable_ImmediatePriority,J1=Kn.unstable_UserBlockingPriority,Rd=Kn.unstable_NormalPriority,nR=Kn.unstable_LowPriority,e_=Kn.unstable_IdlePriority,Bf=null,Xr=null;function rR(e){if(Xr&&typeof Xr.onCommitFiberRoot=="function")try{Xr.onCommitFiberRoot(Bf,e,void 0,(e.current.flags&128)===128)}catch{}}var jr=Math.clz32?Math.clz32:iR,sR=Math.log,oR=Math.LN2;function iR(e){return e>>>=0,e===0?32:31-(sR(e)/oR|0)|0}var Pu=64,Ru=4194304;function Al(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 Ad(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Al(a):(o&=i,o!==0&&(r=Al(o)))}else i=n&~s,i!==0?r=Al(i):o!==0&&(r=Al(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jr(t),s=1<<n,r|=e[n],t&=~s;return r}function aR(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 lR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-jr(o),a=1<<i,c=s[i];c===-1?(!(a&n)||a&r)&&(s[i]=aR(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}function Op(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function t_(){var e=Pu;return Pu<<=1,!(Pu&4194240)&&(Pu=64),e}function ym(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jr(t),e[t]=n}function cR(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-jr(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function py(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var gt=0;function n_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var r_,gy,s_,o_,i_,Ip=!1,Au=[],mo=null,po=null,go=null,oc=new Map,ic=new Map,oo=[],uR="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 b0(e,t){switch(e){case"focusin":case"focusout":mo=null;break;case"dragenter":case"dragleave":po=null;break;case"mouseover":case"mouseout":go=null;break;case"pointerover":case"pointerout":oc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ic.delete(t.pointerId)}}function hl(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Xc(t),t!==null&&gy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function dR(e,t,n,r,s){switch(t){case"focusin":return mo=hl(mo,e,t,n,r,s),!0;case"dragenter":return po=hl(po,e,t,n,r,s),!0;case"mouseover":return go=hl(go,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return oc.set(o,hl(oc.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,ic.set(o,hl(ic.get(o)||null,e,t,n,r,s)),!0}return!1}function a_(e){var t=Wo(e.target);if(t!==null){var n=_i(t);if(n!==null){if(t=n.tag,t===13){if(t=Z1(n),t!==null){e.blockedOn=t,i_(e.priority,function(){s_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function id(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Pp=r,n.target.dispatchEvent(r),Pp=null}else return t=Xc(n),t!==null&&gy(t),e.blockedOn=n,!1;t.shift()}return!0}function _0(e,t,n){id(e)&&n.delete(t)}function fR(){Ip=!1,mo!==null&&id(mo)&&(mo=null),po!==null&&id(po)&&(po=null),go!==null&&id(go)&&(go=null),oc.forEach(_0),ic.forEach(_0)}function ml(e,t){e.blockedOn===t&&(e.blockedOn=null,Ip||(Ip=!0,Kn.unstable_scheduleCallback(Kn.unstable_NormalPriority,fR)))}function ac(e){function t(s){return ml(s,e)}if(0<Au.length){ml(Au[0],e);for(var n=1;n<Au.length;n++){var r=Au[n];r.blockedOn===e&&(r.blockedOn=null)}}for(mo!==null&&ml(mo,e),po!==null&&ml(po,e),go!==null&&ml(go,e),oc.forEach(t),ic.forEach(t),n=0;n<oo.length;n++)r=oo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<oo.length&&(n=oo[0],n.blockedOn===null);)a_(n),n.blockedOn===null&&oo.shift()}var pa=Us.ReactCurrentBatchConfig,Dd=!0;function hR(e,t,n,r){var s=gt,o=pa.transition;pa.transition=null;try{gt=1,yy(e,t,n,r)}finally{gt=s,pa.transition=o}}function mR(e,t,n,r){var s=gt,o=pa.transition;pa.transition=null;try{gt=4,yy(e,t,n,r)}finally{gt=s,pa.transition=o}}function yy(e,t,n,r){if(Dd){var s=Mp(e,t,n,r);if(s===null)Em(e,t,r,Od,n),b0(e,r);else if(dR(s,e,t,n,r))r.stopPropagation();else if(b0(e,r),t&4&&-1<uR.indexOf(e)){for(;s!==null;){var o=Xc(s);if(o!==null&&r_(o),o=Mp(e,t,n,r),o===null&&Em(e,t,r,Od,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Em(e,t,r,null,n)}}var Od=null;function Mp(e,t,n,r){if(Od=null,e=hy(r),e=Wo(e),e!==null)if(t=_i(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Z1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Od=e,null}function l_(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(tR()){case my:return 1;case J1:return 4;case Rd:case nR:return 16;case e_:return 536870912;default:return 16}default:return 16}}var lo=null,vy=null,ad=null;function c_(){if(ad)return ad;var e,t=vy,n=t.length,r,s="value"in lo?lo.value:lo.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return ad=s.slice(e,1<r?1-r:void 0)}function ld(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 Du(){return!0}function S0(){return!1}function Qn(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Du:S0,this.isPropagationStopped=S0,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Du)},persist:function(){},isPersistent:Du}),t}var Ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xy=Qn(Ka),qc=Mt({},Ka,{view:0,detail:0}),pR=Qn(qc),vm,xm,pl,Wf=Mt({},qc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wy,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!==pl&&(pl&&e.type==="mousemove"?(vm=e.screenX-pl.screenX,xm=e.screenY-pl.screenY):xm=vm=0,pl=e),vm)},movementY:function(e){return"movementY"in e?e.movementY:xm}}),k0=Qn(Wf),gR=Mt({},Wf,{dataTransfer:0}),yR=Qn(gR),vR=Mt({},qc,{relatedTarget:0}),wm=Qn(vR),xR=Mt({},Ka,{animationName:0,elapsedTime:0,pseudoElement:0}),wR=Qn(xR),bR=Mt({},Ka,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_R=Qn(bR),SR=Mt({},Ka,{data:0}),C0=Qn(SR),kR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},CR={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"},jR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ER(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jR[e])?!!t[e]:!1}function wy(){return ER}var NR=Mt({},qc,{key:function(e){if(e.key){var t=kR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ld(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?CR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wy,charCode:function(e){return e.type==="keypress"?ld(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ld(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TR=Qn(NR),PR=Mt({},Wf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j0=Qn(PR),RR=Mt({},qc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wy}),AR=Qn(RR),DR=Mt({},Ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),OR=Qn(DR),IR=Mt({},Wf,{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}),MR=Qn(IR),LR=[9,13,27,32],by=As&&"CompositionEvent"in window,Wl=null;As&&"documentMode"in document&&(Wl=document.documentMode);var zR=As&&"TextEvent"in window&&!Wl,u_=As&&(!by||Wl&&8<Wl&&11>=Wl),E0=" ",N0=!1;function d_(e,t){switch(e){case"keyup":return LR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function FR(e,t){switch(e){case"compositionend":return f_(t);case"keypress":return t.which!==32?null:(N0=!0,E0);case"textInput":return e=t.data,e===E0&&N0?null:e;default:return null}}function $R(e,t){if(Zi)return e==="compositionend"||!by&&d_(e,t)?(e=c_(),ad=vy=lo=null,Zi=!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 u_&&t.locale!=="ko"?null:t.data;default:return null}}var UR={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 T0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UR[e.type]:t==="textarea"}function h_(e,t,n,r){W1(r),t=Id(t,"onChange"),0<t.length&&(n=new xy("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hl=null,lc=null;function VR(e){k_(e,0)}function Hf(e){var t=Qi(e);if(L1(t))return e}function BR(e,t){if(e==="change")return t}var m_=!1;if(As){var bm;if(As){var _m="oninput"in document;if(!_m){var P0=document.createElement("div");P0.setAttribute("oninput","return;"),_m=typeof P0.oninput=="function"}bm=_m}else bm=!1;m_=bm&&(!document.documentMode||9<document.documentMode)}function R0(){Hl&&(Hl.detachEvent("onpropertychange",p_),lc=Hl=null)}function p_(e){if(e.propertyName==="value"&&Hf(lc)){var t=[];h_(t,lc,e,hy(e)),G1(VR,t)}}function WR(e,t,n){e==="focusin"?(R0(),Hl=t,lc=n,Hl.attachEvent("onpropertychange",p_)):e==="focusout"&&R0()}function HR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hf(lc)}function YR(e,t){if(e==="click")return Hf(t)}function KR(e,t){if(e==="input"||e==="change")return Hf(t)}function GR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tr=typeof Object.is=="function"?Object.is:GR;function cc(e,t){if(Tr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!vp.call(t,s)||!Tr(e[s],t[s]))return!1}return!0}function A0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function D0(e,t){var n=A0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=A0(n)}}function g_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?g_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function y_(){for(var e=window,t=Nd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nd(e.document)}return t}function _y(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 ZR(e){var t=y_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&g_(n.ownerDocument.documentElement,n)){if(r!==null&&_y(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=D0(n,o);var i=D0(n,r);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>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var qR=As&&"documentMode"in document&&11>=document.documentMode,qi=null,Lp=null,Yl=null,zp=!1;function O0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zp||qi==null||qi!==Nd(r)||(r=qi,"selectionStart"in r&&_y(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Yl&&cc(Yl,r)||(Yl=r,r=Id(Lp,"onSelect"),0<r.length&&(t=new xy("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qi)))}function Ou(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xi={animationend:Ou("Animation","AnimationEnd"),animationiteration:Ou("Animation","AnimationIteration"),animationstart:Ou("Animation","AnimationStart"),transitionend:Ou("Transition","TransitionEnd")},Sm={},v_={};As&&(v_=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 Yf(e){if(Sm[e])return Sm[e];if(!Xi[e])return e;var t=Xi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in v_)return Sm[e]=t[n];return e}var x_=Yf("animationend"),w_=Yf("animationiteration"),b_=Yf("animationstart"),__=Yf("transitionend"),S_=new Map,I0="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 Do(e,t){S_.set(e,t),bi(t,[e])}for(var km=0;km<I0.length;km++){var Cm=I0[km],XR=Cm.toLowerCase(),QR=Cm[0].toUpperCase()+Cm.slice(1);Do(XR,"on"+QR)}Do(x_,"onAnimationEnd");Do(w_,"onAnimationIteration");Do(b_,"onAnimationStart");Do("dblclick","onDoubleClick");Do("focusin","onFocus");Do("focusout","onBlur");Do(__,"onTransitionEnd");ja("onMouseEnter",["mouseout","mouseover"]);ja("onMouseLeave",["mouseout","mouseover"]);ja("onPointerEnter",["pointerout","pointerover"]);ja("onPointerLeave",["pointerout","pointerover"]);bi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bi("onBeforeInput",["compositionend","keypress","textInput","paste"]);bi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),JR=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dl));function M0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,XP(r,t,void 0,e),e.currentTarget=null}function k_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==o&&s.isPropagationStopped())break e;M0(s,a,u),o=c}else for(i=0;i<r.length;i++){if(a=r[i],c=a.instance,u=a.currentTarget,a=a.listener,c!==o&&s.isPropagationStopped())break e;M0(s,a,u),o=c}}}if(Pd)throw e=Dp,Pd=!1,Dp=null,e}function St(e,t){var n=t[Bp];n===void 0&&(n=t[Bp]=new Set);var r=e+"__bubble";n.has(r)||(C_(t,e,2,!1),n.add(r))}function jm(e,t,n){var r=0;t&&(r|=4),C_(n,e,r,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function uc(e){if(!e[Iu]){e[Iu]=!0,A1.forEach(function(n){n!=="selectionchange"&&(JR.has(n)||jm(n,!1,e),jm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,jm("selectionchange",!1,t))}}function C_(e,t,n,r){switch(l_(t)){case 1:var s=hR;break;case 4:s=mR;break;default:s=yy}n=s.bind(null,t,n,e),s=void 0,!Ap||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Em(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Wo(a),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}a=a.parentNode}}r=r.return}G1(function(){var u=o,d=hy(n),f=[];e:{var h=S_.get(e);if(h!==void 0){var m=xy,x=e;switch(e){case"keypress":if(ld(n)===0)break e;case"keydown":case"keyup":m=TR;break;case"focusin":x="focus",m=wm;break;case"focusout":x="blur",m=wm;break;case"beforeblur":case"afterblur":m=wm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=k0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=yR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=AR;break;case x_:case w_:case b_:m=wR;break;case __:m=OR;break;case"scroll":m=pR;break;case"wheel":m=MR;break;case"copy":case"cut":case"paste":m=_R;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=j0}var p=(t&4)!==0,w=!p&&e==="scroll",g=p?h!==null?h+"Capture":null:h;p=[];for(var v=u,b;v!==null;){b=v;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,g!==null&&(_=sc(v,g),_!=null&&p.push(dc(v,_,b)))),w)break;v=v.return}0<p.length&&(h=new m(h,x,null,n,d),f.push({event:h,listeners:p}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Pp&&(x=n.relatedTarget||n.fromElement)&&(Wo(x)||x[Ds]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(x=n.relatedTarget||n.toElement,m=u,x=x?Wo(x):null,x!==null&&(w=_i(x),x!==w||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(p=k0,_="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(p=j0,_="onPointerLeave",g="onPointerEnter",v="pointer"),w=m==null?h:Qi(m),b=x==null?h:Qi(x),h=new p(_,v+"leave",m,n,d),h.target=w,h.relatedTarget=b,_=null,Wo(d)===u&&(p=new p(g,v+"enter",x,n,d),p.target=b,p.relatedTarget=w,_=p),w=_,m&&x)t:{for(p=m,g=x,v=0,b=p;b;b=Mi(b))v++;for(b=0,_=g;_;_=Mi(_))b++;for(;0<v-b;)p=Mi(p),v--;for(;0<b-v;)g=Mi(g),b--;for(;v--;){if(p===g||g!==null&&p===g.alternate)break t;p=Mi(p),g=Mi(g)}p=null}else p=null;m!==null&&L0(f,h,m,p,!1),x!==null&&w!==null&&L0(f,w,x,p,!0)}}e:{if(h=u?Qi(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var C=BR;else if(T0(h))if(m_)C=KR;else{C=HR;var j=WR}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=YR);if(C&&(C=C(e,u))){h_(f,C,n,d);break e}j&&j(e,h,u),e==="focusout"&&(j=h._wrapperState)&&j.controlled&&h.type==="number"&&Cp(h,"number",h.value)}switch(j=u?Qi(u):window,e){case"focusin":(T0(j)||j.contentEditable==="true")&&(qi=j,Lp=u,Yl=null);break;case"focusout":Yl=Lp=qi=null;break;case"mousedown":zp=!0;break;case"contextmenu":case"mouseup":case"dragend":zp=!1,O0(f,n,d);break;case"selectionchange":if(qR)break;case"keydown":case"keyup":O0(f,n,d)}var T;if(by)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Zi?d_(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(u_&&n.locale!=="ko"&&(Zi||R!=="onCompositionStart"?R==="onCompositionEnd"&&Zi&&(T=c_()):(lo=d,vy="value"in lo?lo.value:lo.textContent,Zi=!0)),j=Id(u,R),0<j.length&&(R=new C0(R,e,null,n,d),f.push({event:R,listeners:j}),T?R.data=T:(T=f_(n),T!==null&&(R.data=T)))),(T=zR?FR(e,n):$R(e,n))&&(u=Id(u,"onBeforeInput"),0<u.length&&(d=new C0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=T))}k_(f,t)})}function dc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=sc(e,n),o!=null&&r.unshift(dc(e,o,s)),o=sc(e,t),o!=null&&r.push(dc(e,o,s))),e=e.return}return r}function Mi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function L0(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=sc(n,o),c!=null&&i.unshift(dc(n,c,a))):s||(c=sc(n,o),c!=null&&i.push(dc(n,c,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var eA=/\r\n?/g,tA=/\u0000|\uFFFD/g;function z0(e){return(typeof e=="string"?e:""+e).replace(eA,`
`).replace(tA,"")}function Mu(e,t,n){if(t=z0(t),z0(e)!==t&&n)throw Error(ie(425))}function Md(){}var Fp=null,$p=null;function Up(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 Vp=typeof setTimeout=="function"?setTimeout:void 0,nA=typeof clearTimeout=="function"?clearTimeout:void 0,F0=typeof Promise=="function"?Promise:void 0,rA=typeof queueMicrotask=="function"?queueMicrotask:typeof F0<"u"?function(e){return F0.resolve(null).then(e).catch(sA)}:Vp;function sA(e){setTimeout(function(){throw e})}function Nm(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ac(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ac(t)}function yo(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 $0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ga=Math.random().toString(36).slice(2),Br="__reactFiber$"+Ga,fc="__reactProps$"+Ga,Ds="__reactContainer$"+Ga,Bp="__reactEvents$"+Ga,oA="__reactListeners$"+Ga,iA="__reactHandles$"+Ga;function Wo(e){var t=e[Br];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ds]||n[Br]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$0(e);e!==null;){if(n=e[Br])return n;e=$0(e)}return t}e=n,n=e.parentNode}return null}function Xc(e){return e=e[Br]||e[Ds],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function Kf(e){return e[fc]||null}var Wp=[],Ji=-1;function Oo(e){return{current:e}}function kt(e){0>Ji||(e.current=Wp[Ji],Wp[Ji]=null,Ji--)}function bt(e,t){Ji++,Wp[Ji]=e.current,e.current=t}var ko={},gn=Oo(ko),An=Oo(!1),si=ko;function Ea(e,t){var n=e.type.contextTypes;if(!n)return ko;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Dn(e){return e=e.childContextTypes,e!=null}function Ld(){kt(An),kt(gn)}function U0(e,t,n){if(gn.current!==ko)throw Error(ie(168));bt(gn,t),bt(An,n)}function j_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(ie(108,WP(e)||"Unknown",s));return Mt({},n,r)}function zd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ko,si=gn.current,bt(gn,e),bt(An,An.current),!0}function V0(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=j_(e,t,si),r.__reactInternalMemoizedMergedChildContext=e,kt(An),kt(gn),bt(gn,e)):kt(An),bt(An,n)}var _s=null,Gf=!1,Tm=!1;function E_(e){_s===null?_s=[e]:_s.push(e)}function aA(e){Gf=!0,E_(e)}function Io(){if(!Tm&&_s!==null){Tm=!0;var e=0,t=gt;try{var n=_s;for(gt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}_s=null,Gf=!1}catch(s){throw _s!==null&&(_s=_s.slice(e+1)),Q1(my,Io),s}finally{gt=t,Tm=!1}}return null}var ea=[],ta=0,Fd=null,$d=0,rr=[],sr=0,oi=null,Ss=1,ks="";function $o(e,t){ea[ta++]=$d,ea[ta++]=Fd,Fd=e,$d=t}function N_(e,t,n){rr[sr++]=Ss,rr[sr++]=ks,rr[sr++]=oi,oi=e;var r=Ss;e=ks;var s=32-jr(r)-1;r&=~(1<<s),n+=1;var o=32-jr(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Ss=1<<32-jr(t)+s|n<<s|r,ks=o+e}else Ss=1<<o|n<<s|r,ks=e}function Sy(e){e.return!==null&&($o(e,1),N_(e,1,0))}function ky(e){for(;e===Fd;)Fd=ea[--ta],ea[ta]=null,$d=ea[--ta],ea[ta]=null;for(;e===oi;)oi=rr[--sr],rr[sr]=null,ks=rr[--sr],rr[sr]=null,Ss=rr[--sr],rr[sr]=null}var Vn=null,Un=null,Pt=!1,wr=null;function T_(e,t){var n=ir(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function B0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Vn=e,Un=yo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Vn=e,Un=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=oi!==null?{id:Ss,overflow:ks}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ir(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Vn=e,Un=null,!0):!1;default:return!1}}function Hp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yp(e){if(Pt){var t=Un;if(t){var n=t;if(!B0(e,t)){if(Hp(e))throw Error(ie(418));t=yo(n.nextSibling);var r=Vn;t&&B0(e,t)?T_(r,n):(e.flags=e.flags&-4097|2,Pt=!1,Vn=e)}}else{if(Hp(e))throw Error(ie(418));e.flags=e.flags&-4097|2,Pt=!1,Vn=e}}}function W0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Vn=e}function Lu(e){if(e!==Vn)return!1;if(!Pt)return W0(e),Pt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Up(e.type,e.memoizedProps)),t&&(t=Un)){if(Hp(e))throw P_(),Error(ie(418));for(;t;)T_(e,t),t=yo(t.nextSibling)}if(W0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Un=yo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Un=null}}else Un=Vn?yo(e.stateNode.nextSibling):null;return!0}function P_(){for(var e=Un;e;)e=yo(e.nextSibling)}function Na(){Un=Vn=null,Pt=!1}function Cy(e){wr===null?wr=[e]:wr.push(e)}var lA=Us.ReactCurrentBatchConfig;function gl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ie(309));var r=n.stateNode}if(!r)throw Error(ie(147,e));var s=r,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(ie(284));if(!n._owner)throw Error(ie(290,e))}return e}function zu(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function H0(e){var t=e._init;return t(e._payload)}function R_(e){function t(g,v){if(e){var b=g.deletions;b===null?(g.deletions=[v],g.flags|=16):b.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function r(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=bo(g,v),g.index=0,g.sibling=null,g}function o(g,v,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<v?(g.flags|=2,v):b):(g.flags|=2,v)):(g.flags|=1048576,v)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,v,b,_){return v===null||v.tag!==6?(v=Mm(b,g.mode,_),v.return=g,v):(v=s(v,b),v.return=g,v)}function c(g,v,b,_){var C=b.type;return C===Gi?d(g,v,b.props.children,_,b.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ro&&H0(C)===v.type)?(_=s(v,b.props),_.ref=gl(g,v,b),_.return=g,_):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=gl(g,v,b),_.return=g,_)}function u(g,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Lm(b,g.mode,_),v.return=g,v):(v=s(v,b.children||[]),v.return=g,v)}function d(g,v,b,_,C){return v===null||v.tag!==7?(v=ei(b,g.mode,_,C),v.return=g,v):(v=s(v,b),v.return=g,v)}function f(g,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Mm(""+v,g.mode,b),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Eu:return b=pd(v.type,v.key,v.props,null,g.mode,b),b.ref=gl(g,null,v),b.return=g,b;case Ki:return v=Lm(v,g.mode,b),v.return=g,v;case ro:var _=v._init;return f(g,_(v._payload),b)}if(Rl(v)||dl(v))return v=ei(v,g.mode,b,null),v.return=g,v;zu(g,v)}return null}function h(g,v,b,_){var C=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:a(g,v,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:return b.key===C?c(g,v,b,_):null;case Ki:return b.key===C?u(g,v,b,_):null;case ro:return C=b._init,h(g,v,C(b._payload),_)}if(Rl(b)||dl(b))return C!==null?null:d(g,v,b,_,null);zu(g,b)}return null}function m(g,v,b,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(b)||null,a(v,g,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Eu:return g=g.get(_.key===null?b:_.key)||null,c(v,g,_,C);case Ki:return g=g.get(_.key===null?b:_.key)||null,u(v,g,_,C);case ro:var j=_._init;return m(g,v,b,j(_._payload),C)}if(Rl(_)||dl(_))return g=g.get(b)||null,d(v,g,_,C,null);zu(v,_)}return null}function x(g,v,b,_){for(var C=null,j=null,T=v,R=v=0,A=null;T!==null&&R<b.length;R++){T.index>R?(A=T,T=null):A=T.sibling;var O=h(g,T,b[R],_);if(O===null){T===null&&(T=A);break}e&&T&&O.alternate===null&&t(g,T),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O,T=A}if(R===b.length)return n(g,T),Pt&&$o(g,R),C;if(T===null){for(;R<b.length;R++)T=f(g,b[R],_),T!==null&&(v=o(T,v,R),j===null?C=T:j.sibling=T,j=T);return Pt&&$o(g,R),C}for(T=r(g,T);R<b.length;R++)A=m(T,g,R,b[R],_),A!==null&&(e&&A.alternate!==null&&T.delete(A.key===null?R:A.key),v=o(A,v,R),j===null?C=A:j.sibling=A,j=A);return e&&T.forEach(function(G){return t(g,G)}),Pt&&$o(g,R),C}function p(g,v,b,_){var C=dl(b);if(typeof C!="function")throw Error(ie(150));if(b=C.call(b),b==null)throw Error(ie(151));for(var j=C=null,T=v,R=v=0,A=null,O=b.next();T!==null&&!O.done;R++,O=b.next()){T.index>R?(A=T,T=null):A=T.sibling;var G=h(g,T,O.value,_);if(G===null){T===null&&(T=A);break}e&&T&&G.alternate===null&&t(g,T),v=o(G,v,R),j===null?C=G:j.sibling=G,j=G,T=A}if(O.done)return n(g,T),Pt&&$o(g,R),C;if(T===null){for(;!O.done;R++,O=b.next())O=f(g,O.value,_),O!==null&&(v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return Pt&&$o(g,R),C}for(T=r(g,T);!O.done;R++,O=b.next())O=m(T,g,R,O.value,_),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),v=o(O,v,R),j===null?C=O:j.sibling=O,j=O);return e&&T.forEach(function(N){return t(g,N)}),Pt&&$o(g,R),C}function w(g,v,b,_){if(typeof b=="object"&&b!==null&&b.type===Gi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Eu:e:{for(var C=b.key,j=v;j!==null;){if(j.key===C){if(C=b.type,C===Gi){if(j.tag===7){n(g,j.sibling),v=s(j,b.props.children),v.return=g,g=v;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ro&&H0(C)===j.type){n(g,j.sibling),v=s(j,b.props),v.ref=gl(g,j,b),v.return=g,g=v;break e}n(g,j);break}else t(g,j);j=j.sibling}b.type===Gi?(v=ei(b.props.children,g.mode,_,b.key),v.return=g,g=v):(_=pd(b.type,b.key,b.props,null,g.mode,_),_.ref=gl(g,v,b),_.return=g,g=_)}return i(g);case Ki:e:{for(j=b.key;v!==null;){if(v.key===j)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=s(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=Lm(b,g.mode,_),v.return=g,g=v}return i(g);case ro:return j=b._init,w(g,v,j(b._payload),_)}if(Rl(b))return x(g,v,b,_);if(dl(b))return p(g,v,b,_);zu(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,b),v.return=g,g=v):(n(g,v),v=Mm(b,g.mode,_),v.return=g,g=v),i(g)):n(g,v)}return w}var Ta=R_(!0),A_=R_(!1),Ud=Oo(null),Vd=null,na=null,jy=null;function Ey(){jy=na=Vd=null}function Ny(e){var t=Ud.current;kt(Ud),e._currentValue=t}function Kp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ga(e,t){Vd=e,jy=na=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Rn=!0),e.firstContext=null)}function dr(e){var t=e._currentValue;if(jy!==e)if(e={context:e,memoizedValue:t,next:null},na===null){if(Vd===null)throw Error(ie(308));na=e,Vd.dependencies={lanes:0,firstContext:e}}else na=na.next=e;return t}var Ho=null;function Ty(e){Ho===null?Ho=[e]:Ho.push(e)}function D_(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ty(t)):(n.next=s.next,s.next=n),t.interleaved=n,Os(e,r)}function Os(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var so=!1;function Py(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function O_(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 Es(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ct&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Os(e,n)}return s=r.interleaved,s===null?(t.next=t,Ty(r)):(t.next=s.next,s.next=t),r.interleaved=t,Os(e,n)}function cd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,py(e,n)}}function Y0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bd(e,t,n,r){var s=e.updateQueue;so=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(o!==null){var f=s.baseState;i=0,d=u=c=null,a=o;do{var h=a.lane,m=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,p=a;switch(h=t,m=n,p.tag){case 1:if(x=p.payload,typeof x=="function"){f=x.call(m,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=p.payload,h=typeof x=="function"?x.call(m,f,h):x,h==null)break e;f=Mt({},f,h);break e;case 2:so=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,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(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ai|=i,e.lanes=i,e.memoizedState=f}}function K0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(ie(191,s));s.call(r)}}}var Qc={},Qr=Oo(Qc),hc=Oo(Qc),mc=Oo(Qc);function Yo(e){if(e===Qc)throw Error(ie(174));return e}function Ry(e,t){switch(bt(mc,t),bt(hc,e),bt(Qr,Qc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ep(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ep(t,e)}kt(Qr),bt(Qr,t)}function Pa(){kt(Qr),kt(hc),kt(mc)}function I_(e){Yo(mc.current);var t=Yo(Qr.current),n=Ep(t,e.type);t!==n&&(bt(hc,e),bt(Qr,n))}function Ay(e){hc.current===e&&(kt(Qr),kt(hc))}var Dt=Oo(0);function Wd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 Pm=[];function Dy(){for(var e=0;e<Pm.length;e++)Pm[e]._workInProgressVersionPrimary=null;Pm.length=0}var ud=Us.ReactCurrentDispatcher,Rm=Us.ReactCurrentBatchConfig,ii=0,It=null,Gt=null,Qt=null,Hd=!1,Kl=!1,pc=0,cA=0;function fn(){throw Error(ie(321))}function Oy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function Iy(e,t,n,r,s,o){if(ii=o,It=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ud.current=e===null||e.memoizedState===null?hA:mA,e=n(r,s),Kl){o=0;do{if(Kl=!1,pc=0,25<=o)throw Error(ie(301));o+=1,Qt=Gt=null,t.updateQueue=null,ud.current=pA,e=n(r,s)}while(Kl)}if(ud.current=Yd,t=Gt!==null&&Gt.next!==null,ii=0,Qt=Gt=It=null,Hd=!1,t)throw Error(ie(300));return e}function My(){var e=pc!==0;return pc=0,e}function Vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?It.memoizedState=Qt=e:Qt=Qt.next=e,Qt}function fr(){if(Gt===null){var e=It.alternate;e=e!==null?e.memoizedState:null}else e=Gt.next;var t=Qt===null?It.memoizedState:Qt.next;if(t!==null)Qt=t,Gt=e;else{if(e===null)throw Error(ie(310));Gt=e,e={memoizedState:Gt.memoizedState,baseState:Gt.baseState,baseQueue:Gt.baseQueue,queue:Gt.queue,next:null},Qt===null?It.memoizedState=Qt=e:Qt=Qt.next=e}return Qt}function gc(e,t){return typeof t=="function"?t(e):t}function Am(e){var t=fr(),n=t.queue;if(n===null)throw Error(ie(311));n.lastRenderedReducer=e;var r=Gt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,c=null,u=o;do{var d=u.lane;if((ii&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,i=r):c=c.next=f,It.lanes|=d,ai|=d}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=a,Tr(r,t.memoizedState)||(Rn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,It.lanes|=o,ai|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Dm(e){var t=fr(),n=t.queue;if(n===null)throw Error(ie(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Tr(o,t.memoizedState)||(Rn=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function M_(){}function L_(e,t){var n=It,r=fr(),s=t(),o=!Tr(r.memoizedState,s);if(o&&(r.memoizedState=s,Rn=!0),r=r.queue,Ly($_.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Qt!==null&&Qt.memoizedState.tag&1){if(n.flags|=2048,yc(9,F_.bind(null,n,r,s,t),void 0,null),Jt===null)throw Error(ie(349));ii&30||z_(n,t,s)}return s}function z_(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=It.updateQueue,t===null?(t={lastEffect:null,stores:null},It.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function F_(e,t,n,r){t.value=n,t.getSnapshot=r,U_(t)&&V_(e)}function $_(e,t,n){return n(function(){U_(t)&&V_(e)})}function U_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function V_(e){var t=Os(e,1);t!==null&&Er(t,e,1,-1)}function G0(e){var t=Vr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gc,lastRenderedState:e},t.queue=e,e=e.dispatch=fA.bind(null,It,e),[t.memoizedState,e]}function yc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=It.updateQueue,t===null?(t={lastEffect:null,stores:null},It.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function B_(){return fr().memoizedState}function dd(e,t,n,r){var s=Vr();It.flags|=e,s.memoizedState=yc(1|t,n,void 0,r===void 0?null:r)}function Zf(e,t,n,r){var s=fr();r=r===void 0?null:r;var o=void 0;if(Gt!==null){var i=Gt.memoizedState;if(o=i.destroy,r!==null&&Oy(r,i.deps)){s.memoizedState=yc(t,n,o,r);return}}It.flags|=e,s.memoizedState=yc(1|t,n,o,r)}function Z0(e,t){return dd(8390656,8,e,t)}function Ly(e,t){return Zf(2048,8,e,t)}function W_(e,t){return Zf(4,2,e,t)}function H_(e,t){return Zf(4,4,e,t)}function Y_(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 K_(e,t,n){return n=n!=null?n.concat([e]):null,Zf(4,4,Y_.bind(null,t,e),n)}function zy(){}function G_(e,t){var n=fr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oy(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Z_(e,t){var n=fr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oy(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function q_(e,t,n){return ii&21?(Tr(n,t)||(n=t_(),It.lanes|=n,ai|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Rn=!0),e.memoizedState=n)}function uA(e,t){var n=gt;gt=n!==0&&4>n?n:4,e(!0);var r=Rm.transition;Rm.transition={};try{e(!1),t()}finally{gt=n,Rm.transition=r}}function X_(){return fr().memoizedState}function dA(e,t,n){var r=wo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Q_(e))J_(t,n);else if(n=D_(e,t,n,r),n!==null){var s=Sn();Er(n,e,r,s),eS(n,t,r)}}function fA(e,t,n){var r=wo(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Q_(e))J_(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,n);if(s.hasEagerState=!0,s.eagerState=a,Tr(a,i)){var c=t.interleaved;c===null?(s.next=s,Ty(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=D_(e,t,s,r),n!==null&&(s=Sn(),Er(n,e,r,s),eS(n,t,r))}}function Q_(e){var t=e.alternate;return e===It||t!==null&&t===It}function J_(e,t){Kl=Hd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,py(e,n)}}var Yd={readContext:dr,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},hA={readContext:dr,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:dr,useEffect:Z0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dd(4194308,4,Y_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dd(4194308,4,e,t)},useInsertionEffect:function(e,t){return dd(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=dA.bind(null,It,e),[r.memoizedState,e]},useRef:function(e){var t=Vr();return e={current:e},t.memoizedState=e},useState:G0,useDebugValue:zy,useDeferredValue:function(e){return Vr().memoizedState=e},useTransition:function(){var e=G0(!1),t=e[0];return e=uA.bind(null,e[1]),Vr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=It,s=Vr();if(Pt){if(n===void 0)throw Error(ie(407));n=n()}else{if(n=t(),Jt===null)throw Error(ie(349));ii&30||z_(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Z0($_.bind(null,r,o,e),[e]),r.flags|=2048,yc(9,F_.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Vr(),t=Jt.identifierPrefix;if(Pt){var n=ks,r=Ss;n=(r&~(1<<32-jr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=cA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mA={readContext:dr,useCallback:G_,useContext:dr,useEffect:Ly,useImperativeHandle:K_,useInsertionEffect:W_,useLayoutEffect:H_,useMemo:Z_,useReducer:Am,useRef:B_,useState:function(){return Am(gc)},useDebugValue:zy,useDeferredValue:function(e){var t=fr();return q_(t,Gt.memoizedState,e)},useTransition:function(){var e=Am(gc)[0],t=fr().memoizedState;return[e,t]},useMutableSource:M_,useSyncExternalStore:L_,useId:X_,unstable_isNewReconciler:!1},pA={readContext:dr,useCallback:G_,useContext:dr,useEffect:Ly,useImperativeHandle:K_,useInsertionEffect:W_,useLayoutEffect:H_,useMemo:Z_,useReducer:Dm,useRef:B_,useState:function(){return Dm(gc)},useDebugValue:zy,useDeferredValue:function(e){var t=fr();return Gt===null?t.memoizedState=e:q_(t,Gt.memoizedState,e)},useTransition:function(){var e=Dm(gc)[0],t=fr().memoizedState;return[e,t]},useMutableSource:M_,useSyncExternalStore:L_,useId:X_,unstable_isNewReconciler:!1};function yr(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Gp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qf={isMounted:function(e){return(e=e._reactInternals)?_i(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=wo(e),o=Es(r,s);o.payload=t,n!=null&&(o.callback=n),t=vo(e,o,s),t!==null&&(Er(t,e,s,r),cd(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Sn(),s=wo(e),o=Es(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=vo(e,o,s),t!==null&&(Er(t,e,s,r),cd(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),r=wo(e),s=Es(n,r);s.tag=2,t!=null&&(s.callback=t),t=vo(e,s,r),t!==null&&(Er(t,e,r,n),cd(t,e,r))}};function q0(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!cc(n,r)||!cc(s,o):!0}function tS(e,t,n){var r=!1,s=ko,o=t.contextType;return typeof o=="object"&&o!==null?o=dr(o):(s=Dn(t)?si:gn.current,r=t.contextTypes,o=(r=r!=null)?Ea(e,s):ko),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function X0(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qf.enqueueReplaceState(t,t.state,null)}function Zp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Py(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=dr(o):(o=Dn(t)?si:gn.current,s.context=Ea(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Gp(e,t,o,n),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&&qf.enqueueReplaceState(s,s.state,null),Bd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ra(e,t){try{var n="",r=t;do n+=BP(r),r=r.return;while(r);var s=n}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Om(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function qp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var gA=typeof WeakMap=="function"?WeakMap:Map;function nS(e,t,n){n=Es(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gd||(Gd=!0,ig=r),qp(e,t)},n}function rS(e,t,n){n=Es(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){qp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){qp(e,t),typeof r!="function"&&(xo===null?xo=new Set([this]):xo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Q0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new gA;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=PA.bind(null,e,t,n),t.then(e,e))}function J0(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 ew(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Es(-1,1),t.tag=2,vo(n,t,1))),n.lanes|=1),e)}var yA=Us.ReactCurrentOwner,Rn=!1;function bn(e,t,n,r){t.child=e===null?A_(t,null,n,r):Ta(t,e.child,n,r)}function tw(e,t,n,r,s){n=n.render;var o=t.ref;return ga(t,s),r=Iy(e,t,n,r,o,s),n=My(),e!==null&&!Rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Is(e,t,s)):(Pt&&n&&Sy(t),t.flags|=1,bn(e,t,r,s),t.child)}function nw(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Yy(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,sS(e,t,o,r,s)):(e=pd(n.type,null,r,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(n=n.compare,n=n!==null?n:cc,n(i,r)&&e.ref===t.ref)return Is(e,t,s)}return t.flags|=1,e=bo(o,r),e.ref=t.ref,e.return=t,t.child=e}function sS(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(cc(o,r)&&e.ref===t.ref)if(Rn=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Rn=!0);else return t.lanes=e.lanes,Is(e,t,s)}return Xp(e,t,n,r,s)}function oS(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(sa,zn),zn|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bt(sa,zn),zn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,bt(sa,zn),zn|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,bt(sa,zn),zn|=r;return bn(e,t,s,n),t.child}function iS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xp(e,t,n,r,s){var o=Dn(n)?si:gn.current;return o=Ea(t,o),ga(t,s),n=Iy(e,t,n,r,o,s),r=My(),e!==null&&!Rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Is(e,t,s)):(Pt&&r&&Sy(t),t.flags|=1,bn(e,t,n,s),t.child)}function rw(e,t,n,r,s){if(Dn(n)){var o=!0;zd(t)}else o=!1;if(ga(t,s),t.stateNode===null)fd(e,t),tS(t,n,r),Zp(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=dr(u):(u=Dn(n)?si:gn.current,u=Ea(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||c!==u)&&X0(t,i,r,u),so=!1;var h=t.memoizedState;i.state=h,Bd(t,r,i,s),c=t.memoizedState,a!==r||h!==c||An.current||so?(typeof d=="function"&&(Gp(t,n,d,r),c=t.memoizedState),(a=so||q0(t,n,a,r,h,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,O_(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:yr(t.type,a),i.props=u,f=t.pendingProps,h=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=dr(c):(c=Dn(n)?si:gn.current,c=Ea(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||h!==c)&&X0(t,i,r,c),so=!1,h=t.memoizedState,i.state=h,Bd(t,r,i,s);var x=t.memoizedState;a!==f||h!==x||An.current||so?(typeof m=="function"&&(Gp(t,n,m,r),x=t.memoizedState),(u=so||q0(t,n,u,r,h,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),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=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(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),r=!1)}return Qp(e,t,n,r,o,s)}function Qp(e,t,n,r,s,o){iS(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&V0(t,n,!1),Is(e,t,o);r=t.stateNode,yA.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Ta(t,e.child,null,o),t.child=Ta(t,null,a,o)):bn(e,t,a,o),t.memoizedState=r.state,s&&V0(t,n,!0),t.child}function aS(e){var t=e.stateNode;t.pendingContext?U0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&U0(e,t.context,!1),Ry(e,t.containerInfo)}function sw(e,t,n,r,s){return Na(),Cy(s),t.flags|=256,bn(e,t,n,r),t.child}var Jp={dehydrated:null,treeContext:null,retryLane:0};function eg(e){return{baseLanes:e,cachePool:null,transitions:null}}function lS(e,t,n){var r=t.pendingProps,s=Dt.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),bt(Dt,s&1),e===null)return Yp(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=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Jf(i,r,0,null),e=ei(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=eg(n),t.memoizedState=Jp,e):Fy(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return vA(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=bo(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=bo(a,o):(o=ei(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?eg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Jp,r}return o=e.child,e=o.sibling,r=bo(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Fy(e,t){return t=Jf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fu(e,t,n,r){return r!==null&&Cy(r),Ta(t,e.child,null,n),e=Fy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vA(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Om(Error(ie(422))),Fu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Jf({mode:"visible",children:r.children},s,0,null),o=ei(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ta(t,e.child,null,i),t.child.memoizedState=eg(i),t.memoizedState=Jp,o);if(!(t.mode&1))return Fu(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ie(419)),r=Om(o,r,void 0),Fu(e,t,i,r)}if(a=(i&e.childLanes)!==0,Rn||a){if(r=Jt,r!==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&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Os(e,s),Er(r,e,s,-1))}return Hy(),r=Om(Error(ie(421))),Fu(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=RA.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Un=yo(s.nextSibling),Vn=t,Pt=!0,wr=null,e!==null&&(rr[sr++]=Ss,rr[sr++]=ks,rr[sr++]=oi,Ss=e.id,ks=e.overflow,oi=t),t=Fy(t,r.children),t.flags|=4096,t)}function ow(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Kp(e.return,t,n)}function Im(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function cS(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(bn(e,t,r.children,n),r=Dt.current,r&2)r=r&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&&ow(e,n,t);else if(e.tag===19)ow(e,n,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}r&=1}if(bt(Dt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Wd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Im(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Im(t,!0,n,null,o);break;case"together":Im(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Is(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ai|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,n=bo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xA(e,t,n){switch(t.tag){case 3:aS(t),Na();break;case 5:I_(t);break;case 1:Dn(t.type)&&zd(t);break;case 4:Ry(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;bt(Ud,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(bt(Dt,Dt.current&1),t.flags|=128,null):n&t.child.childLanes?lS(e,t,n):(bt(Dt,Dt.current&1),e=Is(e,t,n),e!==null?e.sibling:null);bt(Dt,Dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return cS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(Dt,Dt.current),r)break;return null;case 22:case 23:return t.lanes=0,oS(e,t,n)}return Is(e,t,n)}var uS,tg,dS,fS;uS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};tg=function(){};dS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Yo(Qr.current);var o=null;switch(n){case"input":s=Sp(e,s),r=Sp(e,r),o=[];break;case"select":s=Mt({},s,{value:void 0}),r=Mt({},r,{value:void 0}),o=[];break;case"textarea":s=jp(e,s),r=jp(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Md)}Np(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(nc.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(i in a)!a.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&a[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(nc.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&St("scroll",e),o||a===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};fS=function(e,t,n,r){n!==r&&(t.flags|=4)};function yl(e,t){if(!Pt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function wA(e,t,n){var r=t.pendingProps;switch(ky(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(t),null;case 1:return Dn(t.type)&&Ld(),hn(t),null;case 3:return r=t.stateNode,Pa(),kt(An),kt(gn),Dy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wr!==null&&(cg(wr),wr=null))),tg(e,t),hn(t),null;case 5:Ay(t);var s=Yo(mc.current);if(n=t.type,e!==null&&t.stateNode!=null)dS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ie(166));return hn(t),null}if(e=Yo(Qr.current),Lu(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Br]=t,r[fc]=o,e=(t.mode&1)!==0,n){case"dialog":St("cancel",r),St("close",r);break;case"iframe":case"object":case"embed":St("load",r);break;case"video":case"audio":for(s=0;s<Dl.length;s++)St(Dl[s],r);break;case"source":St("error",r);break;case"img":case"image":case"link":St("error",r),St("load",r);break;case"details":St("toggle",r);break;case"input":m0(r,o),St("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},St("invalid",r);break;case"textarea":g0(r,o),St("invalid",r)}Np(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Mu(r.textContent,a,e),s=["children",""+a]):nc.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&St("scroll",r)}switch(n){case"input":Nu(r),p0(r,o,!0);break;case"textarea":Nu(r),y0(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Md)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Br]=t,e[fc]=r,uS(e,t,!1,!1),t.stateNode=e;e:{switch(i=Tp(n,r),n){case"dialog":St("cancel",e),St("close",e),s=r;break;case"iframe":case"object":case"embed":St("load",e),s=r;break;case"video":case"audio":for(s=0;s<Dl.length;s++)St(Dl[s],e);s=r;break;case"source":St("error",e),s=r;break;case"img":case"image":case"link":St("error",e),St("load",e),s=r;break;case"details":St("toggle",e),s=r;break;case"input":m0(e,r),s=Sp(e,r),St("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Mt({},r,{value:void 0}),St("invalid",e);break;case"textarea":g0(e,r),s=jp(e,r),St("invalid",e);break;default:s=r}Np(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var c=a[o];o==="style"?B1(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&U1(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&rc(e,c):typeof c=="number"&&rc(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(nc.hasOwnProperty(o)?c!=null&&o==="onScroll"&&St("scroll",e):c!=null&&cy(e,o,c,i))}switch(n){case"input":Nu(e),p0(e,r,!1);break;case"textarea":Nu(e),y0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+So(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?fa(e,!!r.multiple,o,!1):r.defaultValue!=null&&fa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Md)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return hn(t),null;case 6:if(e&&t.stateNode!=null)fS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ie(166));if(n=Yo(mc.current),Yo(Qr.current),Lu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Br]=t,(o=r.nodeValue!==n)&&(e=Vn,e!==null))switch(e.tag){case 3:Mu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mu(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Br]=t,t.stateNode=r}return hn(t),null;case 13:if(kt(Dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pt&&Un!==null&&t.mode&1&&!(t.flags&128))P_(),Na(),t.flags|=98560,o=!1;else if(o=Lu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ie(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ie(317));o[Br]=t}else Na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hn(t),o=!1}else wr!==null&&(cg(wr),wr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Dt.current&1?Zt===0&&(Zt=3):Hy())),t.updateQueue!==null&&(t.flags|=4),hn(t),null);case 4:return Pa(),tg(e,t),e===null&&uc(t.stateNode.containerInfo),hn(t),null;case 10:return Ny(t.type._context),hn(t),null;case 17:return Dn(t.type)&&Ld(),hn(t),null;case 19:if(kt(Dt),o=t.memoizedState,o===null)return hn(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)yl(o,!1);else{if(Zt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Wd(e),i!==null){for(t.flags|=128,yl(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,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}),n=n.sibling;return bt(Dt,Dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ut()>Aa&&(t.flags|=128,r=!0,yl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Wd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Pt)return hn(t),null}else 2*Ut()-o.renderingStartTime>Aa&&n!==1073741824&&(t.flags|=128,r=!0,yl(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ut(),t.sibling=null,n=Dt.current,bt(Dt,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Wy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zn&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function bA(e,t){switch(ky(t),t.tag){case 1:return Dn(t.type)&&Ld(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pa(),kt(An),kt(gn),Dy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ay(t),null;case 13:if(kt(Dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt(Dt),null;case 4:return Pa(),null;case 10:return Ny(t.type._context),null;case 22:case 23:return Wy(),null;case 24:return null;default:return null}}var $u=!1,mn=!1,_A=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ra(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){zt(e,t,r)}else n.current=null}function ng(e,t,n){try{n()}catch(r){zt(e,t,r)}}var iw=!1;function SA(e,t){if(Fp=Dd,e=y_(),_y(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=i),h===o&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for($p={focusedElem:e,selectionRange:n},Dd=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var p=x.memoizedProps,w=x.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:yr(t.type,p),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(_){zt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return x=iw,iw=!1,x}function Gl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&ng(t,n,o)}s=s.next}while(s!==r)}}function Xf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function hS(e){var t=e.alternate;t!==null&&(e.alternate=null,hS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Br],delete t[fc],delete t[Bp],delete t[oA],delete t[iA])),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 mS(e){return e.tag===5||e.tag===3||e.tag===4}function aw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mS(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 sg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Md));else if(r!==4&&(e=e.child,e!==null))for(sg(e,t,n),e=e.sibling;e!==null;)sg(e,t,n),e=e.sibling}function og(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(og(e,t,n),e=e.sibling;e!==null;)og(e,t,n),e=e.sibling}var nn=null,vr=!1;function Qs(e,t,n){for(n=n.child;n!==null;)pS(e,t,n),n=n.sibling}function pS(e,t,n){if(Xr&&typeof Xr.onCommitFiberUnmount=="function")try{Xr.onCommitFiberUnmount(Bf,n)}catch{}switch(n.tag){case 5:mn||ra(n,t);case 6:var r=nn,s=vr;nn=null,Qs(e,t,n),nn=r,vr=s,nn!==null&&(vr?(e=nn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):nn.removeChild(n.stateNode));break;case 18:nn!==null&&(vr?(e=nn,n=n.stateNode,e.nodeType===8?Nm(e.parentNode,n):e.nodeType===1&&Nm(e,n),ac(e)):Nm(nn,n.stateNode));break;case 4:r=nn,s=vr,nn=n.stateNode.containerInfo,vr=!0,Qs(e,t,n),nn=r,vr=s;break;case 0:case 11:case 14:case 15:if(!mn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ng(n,t,i),s=s.next}while(s!==r)}Qs(e,t,n);break;case 1:if(!mn&&(ra(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){zt(n,t,a)}Qs(e,t,n);break;case 21:Qs(e,t,n);break;case 22:n.mode&1?(mn=(r=mn)||n.memoizedState!==null,Qs(e,t,n),mn=r):Qs(e,t,n);break;default:Qs(e,t,n)}}function lw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _A),t.forEach(function(r){var s=AA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function gr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:nn=a.stateNode,vr=!1;break e;case 3:nn=a.stateNode.containerInfo,vr=!0;break e;case 4:nn=a.stateNode.containerInfo,vr=!0;break e}a=a.return}if(nn===null)throw Error(ie(160));pS(o,i,s),nn=null,vr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){zt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gS(t,e),t=t.sibling}function gS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gr(t,e),Ur(e),r&4){try{Gl(3,e,e.return),Xf(3,e)}catch(p){zt(e,e.return,p)}try{Gl(5,e,e.return)}catch(p){zt(e,e.return,p)}}break;case 1:gr(t,e),Ur(e),r&512&&n!==null&&ra(n,n.return);break;case 5:if(gr(t,e),Ur(e),r&512&&n!==null&&ra(n,n.return),e.flags&32){var s=e.stateNode;try{rc(s,"")}catch(p){zt(e,e.return,p)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&z1(s,o),Tp(a,i);var u=Tp(a,o);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?B1(s,f):d==="dangerouslySetInnerHTML"?U1(s,f):d==="children"?rc(s,f):cy(s,d,f,u)}switch(a){case"input":kp(s,o);break;case"textarea":F1(s,o);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?fa(s,!!o.multiple,m,!1):h!==!!o.multiple&&(o.defaultValue!=null?fa(s,!!o.multiple,o.defaultValue,!0):fa(s,!!o.multiple,o.multiple?[]:"",!1))}s[fc]=o}catch(p){zt(e,e.return,p)}}break;case 6:if(gr(t,e),Ur(e),r&4){if(e.stateNode===null)throw Error(ie(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(p){zt(e,e.return,p)}}break;case 3:if(gr(t,e),Ur(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ac(t.containerInfo)}catch(p){zt(e,e.return,p)}break;case 4:gr(t,e),Ur(e);break;case 13:gr(t,e),Ur(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Vy=Ut())),r&4&&lw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mn=(u=mn)||d,gr(t,e),mn=u):gr(t,e),Ur(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ne=e,d=e.child;d!==null;){for(f=Ne=d;Ne!==null;){switch(h=Ne,m=h.child,h.tag){case 0:case 11:case 14:case 15:Gl(4,h,h.return);break;case 1:ra(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(p){zt(r,n,p)}}break;case 5:ra(h,h.return);break;case 22:if(h.memoizedState!==null){uw(f);continue}}m!==null?(m.return=h,Ne=m):uw(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=V1("display",i))}catch(p){zt(e,e.return,p)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){zt(e,e.return,p)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:gr(t,e),Ur(e),r&4&&lw(e);break;case 21:break;default:gr(t,e),Ur(e)}}function Ur(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mS(n)){var r=n;break e}n=n.return}throw Error(ie(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(rc(s,""),r.flags&=-33);var o=aw(e);og(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=aw(e);sg(e,a,i);break;default:throw Error(ie(161))}}catch(c){zt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kA(e,t,n){Ne=e,yS(e)}function yS(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var s=Ne,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||$u;if(!i){var a=s.alternate,c=a!==null&&a.memoizedState!==null||mn;a=$u;var u=mn;if($u=i,(mn=c)&&!u)for(Ne=s;Ne!==null;)i=Ne,c=i.child,i.tag===22&&i.memoizedState!==null?dw(s):c!==null?(c.return=i,Ne=c):dw(s);for(;o!==null;)Ne=o,yS(o),o=o.sibling;Ne=s,$u=a,mn=u}cw(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Ne=o):cw(e)}}function cw(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mn||Xf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mn)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:yr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&K0(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}K0(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&ac(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}mn||t.flags&512&&rg(t)}catch(h){zt(t,t.return,h)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function uw(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function dw(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xf(4,t)}catch(c){zt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){zt(t,s,c)}}var o=t.return;try{rg(t)}catch(c){zt(t,o,c)}break;case 5:var i=t.return;try{rg(t)}catch(c){zt(t,i,c)}}}catch(c){zt(t,t.return,c)}if(t===e){Ne=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Ne=a;break}Ne=t.return}}var CA=Math.ceil,Kd=Us.ReactCurrentDispatcher,$y=Us.ReactCurrentOwner,ar=Us.ReactCurrentBatchConfig,ct=0,Jt=null,Ht=null,rn=0,zn=0,sa=Oo(0),Zt=0,vc=null,ai=0,Qf=0,Uy=0,Zl=null,Pn=null,Vy=0,Aa=1/0,xs=null,Gd=!1,ig=null,xo=null,Uu=!1,co=null,Zd=0,ql=0,ag=null,hd=-1,md=0;function Sn(){return ct&6?Ut():hd!==-1?hd:hd=Ut()}function wo(e){return e.mode&1?ct&2&&rn!==0?rn&-rn:lA.transition!==null?(md===0&&(md=t_()),md):(e=gt,e!==0||(e=window.event,e=e===void 0?16:l_(e.type)),e):1}function Er(e,t,n,r){if(50<ql)throw ql=0,ag=null,Error(ie(185));Zc(e,n,r),(!(ct&2)||e!==Jt)&&(e===Jt&&(!(ct&2)&&(Qf|=n),Zt===4&&io(e,rn)),On(e,r),n===1&&ct===0&&!(t.mode&1)&&(Aa=Ut()+500,Gf&&Io()))}function On(e,t){var n=e.callbackNode;lR(e,t);var r=Ad(e,e===Jt?rn:0);if(r===0)n!==null&&w0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&w0(n),t===1)e.tag===0?aA(fw.bind(null,e)):E_(fw.bind(null,e)),rA(function(){!(ct&6)&&Io()}),n=null;else{switch(n_(r)){case 1:n=my;break;case 4:n=J1;break;case 16:n=Rd;break;case 536870912:n=e_;break;default:n=Rd}n=CS(n,vS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vS(e,t){if(hd=-1,md=0,ct&6)throw Error(ie(327));var n=e.callbackNode;if(ya()&&e.callbackNode!==n)return null;var r=Ad(e,e===Jt?rn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=qd(e,r);else{t=r;var s=ct;ct|=2;var o=wS();(Jt!==e||rn!==t)&&(xs=null,Aa=Ut()+500,Jo(e,t));do try{NA();break}catch(a){xS(e,a)}while(!0);Ey(),Kd.current=o,ct=s,Ht!==null?t=0:(Jt=null,rn=0,t=Zt)}if(t!==0){if(t===2&&(s=Op(e),s!==0&&(r=s,t=lg(e,s))),t===1)throw n=vc,Jo(e,0),io(e,r),On(e,Ut()),n;if(t===6)io(e,r);else{if(s=e.current.alternate,!(r&30)&&!jA(s)&&(t=qd(e,r),t===2&&(o=Op(e),o!==0&&(r=o,t=lg(e,o))),t===1))throw n=vc,Jo(e,0),io(e,r),On(e,Ut()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(ie(345));case 2:Uo(e,Pn,xs);break;case 3:if(io(e,r),(r&130023424)===r&&(t=Vy+500-Ut(),10<t)){if(Ad(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Sn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Vp(Uo.bind(null,e,Pn,xs),t);break}Uo(e,Pn,xs);break;case 4:if(io(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-jr(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*CA(r/1960))-r,10<r){e.timeoutHandle=Vp(Uo.bind(null,e,Pn,xs),r);break}Uo(e,Pn,xs);break;case 5:Uo(e,Pn,xs);break;default:throw Error(ie(329))}}}return On(e,Ut()),e.callbackNode===n?vS.bind(null,e):null}function lg(e,t){var n=Zl;return e.current.memoizedState.isDehydrated&&(Jo(e,t).flags|=256),e=qd(e,t),e!==2&&(t=Pn,Pn=n,t!==null&&cg(t)),e}function cg(e){Pn===null?Pn=e:Pn.push.apply(Pn,e)}function jA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Tr(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 io(e,t){for(t&=~Uy,t&=~Qf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jr(t),r=1<<n;e[n]=-1,t&=~r}}function fw(e){if(ct&6)throw Error(ie(327));ya();var t=Ad(e,0);if(!(t&1))return On(e,Ut()),null;var n=qd(e,t);if(e.tag!==0&&n===2){var r=Op(e);r!==0&&(t=r,n=lg(e,r))}if(n===1)throw n=vc,Jo(e,0),io(e,t),On(e,Ut()),n;if(n===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Uo(e,Pn,xs),On(e,Ut()),null}function By(e,t){var n=ct;ct|=1;try{return e(t)}finally{ct=n,ct===0&&(Aa=Ut()+500,Gf&&Io())}}function li(e){co!==null&&co.tag===0&&!(ct&6)&&ya();var t=ct;ct|=1;var n=ar.transition,r=gt;try{if(ar.transition=null,gt=1,e)return e()}finally{gt=r,ar.transition=n,ct=t,!(ct&6)&&Io()}}function Wy(){zn=sa.current,kt(sa)}function Jo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,nA(n)),Ht!==null)for(n=Ht.return;n!==null;){var r=n;switch(ky(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ld();break;case 3:Pa(),kt(An),kt(gn),Dy();break;case 5:Ay(r);break;case 4:Pa();break;case 13:kt(Dt);break;case 19:kt(Dt);break;case 10:Ny(r.type._context);break;case 22:case 23:Wy()}n=n.return}if(Jt=e,Ht=e=bo(e.current,null),rn=zn=t,Zt=0,vc=null,Uy=Qf=ai=0,Pn=Zl=null,Ho!==null){for(t=0;t<Ho.length;t++)if(n=Ho[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Ho=null}return e}function xS(e,t){do{var n=Ht;try{if(Ey(),ud.current=Yd,Hd){for(var r=It.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Hd=!1}if(ii=0,Qt=Gt=It=null,Kl=!1,pc=0,$y.current=null,n===null||n.return===null){Zt=1,vc=t,Ht=null;break}e:{var o=e,i=n.return,a=n,c=t;if(t=rn,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=J0(i);if(m!==null){m.flags&=-257,ew(m,i,a,o,t),m.mode&1&&Q0(o,u,t),t=m,c=u;var x=t.updateQueue;if(x===null){var p=new Set;p.add(c),t.updateQueue=p}else x.add(c);break e}else{if(!(t&1)){Q0(o,u,t),Hy();break e}c=Error(ie(426))}}else if(Pt&&a.mode&1){var w=J0(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ew(w,i,a,o,t),Cy(Ra(c,a));break e}}o=c=Ra(c,a),Zt!==4&&(Zt=2),Zl===null?Zl=[o]:Zl.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=nS(o,c,t);Y0(o,g);break e;case 1:a=c;var v=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(xo===null||!xo.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=rS(o,a,t);Y0(o,_);break e}}o=o.return}while(o!==null)}_S(n)}catch(C){t=C,Ht===n&&n!==null&&(Ht=n=n.return);continue}break}while(!0)}function wS(){var e=Kd.current;return Kd.current=Yd,e===null?Yd:e}function Hy(){(Zt===0||Zt===3||Zt===2)&&(Zt=4),Jt===null||!(ai&268435455)&&!(Qf&268435455)||io(Jt,rn)}function qd(e,t){var n=ct;ct|=2;var r=wS();(Jt!==e||rn!==t)&&(xs=null,Jo(e,t));do try{EA();break}catch(s){xS(e,s)}while(!0);if(Ey(),ct=n,Kd.current=r,Ht!==null)throw Error(ie(261));return Jt=null,rn=0,Zt}function EA(){for(;Ht!==null;)bS(Ht)}function NA(){for(;Ht!==null&&!JP();)bS(Ht)}function bS(e){var t=kS(e.alternate,e,zn);e.memoizedProps=e.pendingProps,t===null?_S(e):Ht=t,$y.current=null}function _S(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=bA(n,t),n!==null){n.flags&=32767,Ht=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Zt=6,Ht=null;return}}else if(n=wA(n,t,zn),n!==null){Ht=n;return}if(t=t.sibling,t!==null){Ht=t;return}Ht=t=e}while(t!==null);Zt===0&&(Zt=5)}function Uo(e,t,n){var r=gt,s=ar.transition;try{ar.transition=null,gt=1,TA(e,t,n,r)}finally{ar.transition=s,gt=r}return null}function TA(e,t,n,r){do ya();while(co!==null);if(ct&6)throw Error(ie(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(cR(e,o),e===Jt&&(Ht=Jt=null,rn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Uu||(Uu=!0,CS(Rd,function(){return ya(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ar.transition,ar.transition=null;var i=gt;gt=1;var a=ct;ct|=4,$y.current=null,SA(e,n),gS(n,e),ZR($p),Dd=!!Fp,$p=Fp=null,e.current=n,kA(n),eR(),ct=a,gt=i,ar.transition=o}else e.current=n;if(Uu&&(Uu=!1,co=e,Zd=s),o=e.pendingLanes,o===0&&(xo=null),rR(n.stateNode),On(e,Ut()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Gd)throw Gd=!1,e=ig,ig=null,e;return Zd&1&&e.tag!==0&&ya(),o=e.pendingLanes,o&1?e===ag?ql++:(ql=0,ag=e):ql=0,Io(),null}function ya(){if(co!==null){var e=n_(Zd),t=ar.transition,n=gt;try{if(ar.transition=null,gt=16>e?16:e,co===null)var r=!1;else{if(e=co,co=null,Zd=0,ct&6)throw Error(ie(331));var s=ct;for(ct|=4,Ne=e.current;Ne!==null;){var o=Ne,i=o.child;if(Ne.flags&16){var a=o.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(Ne=u;Ne!==null;){var d=Ne;switch(d.tag){case 0:case 11:case 15:Gl(8,d,o)}var f=d.child;if(f!==null)f.return=d,Ne=f;else for(;Ne!==null;){d=Ne;var h=d.sibling,m=d.return;if(hS(d),d===u){Ne=null;break}if(h!==null){h.return=m,Ne=h;break}Ne=m}}}var x=o.alternate;if(x!==null){var p=x.child;if(p!==null){x.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}Ne=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,Ne=i;else e:for(;Ne!==null;){if(o=Ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Gl(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,Ne=g;break e}Ne=o.return}}var v=e.current;for(Ne=v;Ne!==null;){i=Ne;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,Ne=b;else e:for(i=v;Ne!==null;){if(a=Ne,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xf(9,a)}}catch(C){zt(a,a.return,C)}if(a===i){Ne=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Ne=_;break e}Ne=a.return}}if(ct=s,Io(),Xr&&typeof Xr.onPostCommitFiberRoot=="function")try{Xr.onPostCommitFiberRoot(Bf,e)}catch{}r=!0}return r}finally{gt=n,ar.transition=t}}return!1}function hw(e,t,n){t=Ra(n,t),t=nS(e,t,1),e=vo(e,t,1),t=Sn(),e!==null&&(Zc(e,1,t),On(e,t))}function zt(e,t,n){if(e.tag===3)hw(e,e,n);else for(;t!==null;){if(t.tag===3){hw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xo===null||!xo.has(r))){e=Ra(n,e),e=rS(t,e,1),t=vo(t,e,1),e=Sn(),t!==null&&(Zc(t,1,e),On(t,e));break}}t=t.return}}function PA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Sn(),e.pingedLanes|=e.suspendedLanes&n,Jt===e&&(rn&n)===n&&(Zt===4||Zt===3&&(rn&130023424)===rn&&500>Ut()-Vy?Jo(e,0):Uy|=n),On(e,t)}function SS(e,t){t===0&&(e.mode&1?(t=Ru,Ru<<=1,!(Ru&130023424)&&(Ru=4194304)):t=1);var n=Sn();e=Os(e,t),e!==null&&(Zc(e,t,n),On(e,n))}function RA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),SS(e,n)}function AA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ie(314))}r!==null&&r.delete(t),SS(e,n)}var kS;kS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||An.current)Rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Rn=!1,xA(e,t,n);Rn=!!(e.flags&131072)}else Rn=!1,Pt&&t.flags&1048576&&N_(t,$d,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fd(e,t),e=t.pendingProps;var s=Ea(t,gn.current);ga(t,n),s=Iy(null,t,r,e,s,n);var o=My();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,Dn(r)?(o=!0,zd(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Py(t),s.updater=qf,t.stateNode=s,s._reactInternals=t,Zp(t,r,e,n),t=Qp(null,t,r,!0,o,n)):(t.tag=0,Pt&&o&&Sy(t),bn(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=OA(r),e=yr(r,e),s){case 0:t=Xp(null,t,r,e,n);break e;case 1:t=rw(null,t,r,e,n);break e;case 11:t=tw(null,t,r,e,n);break e;case 14:t=nw(null,t,r,yr(r.type,e),n);break e}throw Error(ie(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yr(r,s),Xp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yr(r,s),rw(e,t,r,s,n);case 3:e:{if(aS(t),e===null)throw Error(ie(387));r=t.pendingProps,o=t.memoizedState,s=o.element,O_(e,t),Bd(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Ra(Error(ie(423)),t),t=sw(e,t,r,n,s);break e}else if(r!==s){s=Ra(Error(ie(424)),t),t=sw(e,t,r,n,s);break e}else for(Un=yo(t.stateNode.containerInfo.firstChild),Vn=t,Pt=!0,wr=null,n=A_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Na(),r===s){t=Is(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 5:return I_(t),e===null&&Yp(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Up(r,s)?i=null:o!==null&&Up(r,o)&&(t.flags|=32),iS(e,t),bn(e,t,i,n),t.child;case 6:return e===null&&Yp(t),null;case 13:return lS(e,t,n);case 4:return Ry(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ta(t,null,r,n):bn(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yr(r,s),tw(e,t,r,s,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,bt(Ud,r._currentValue),r._currentValue=i,o!==null)if(Tr(o.value,i)){if(o.children===s.children&&!An.current){t=Is(e,t,n);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 c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Es(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Kp(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(ie(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Kp(i,n,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}bn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ga(t,n),s=dr(s),r=r(s),t.flags|=1,bn(e,t,r,n),t.child;case 14:return r=t.type,s=yr(r,t.pendingProps),s=yr(r.type,s),nw(e,t,r,s,n);case 15:return sS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yr(r,s),fd(e,t),t.tag=1,Dn(r)?(e=!0,zd(t)):e=!1,ga(t,n),tS(t,r,s),Zp(t,r,s,n),Qp(null,t,r,!0,e,n);case 19:return cS(e,t,n);case 22:return oS(e,t,n)}throw Error(ie(156,t.tag))};function CS(e,t){return Q1(e,t)}function DA(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ir(e,t,n,r){return new DA(e,t,n,r)}function Yy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OA(e){if(typeof e=="function")return Yy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dy)return 11;if(e===fy)return 14}return 2}function bo(e,t){var n=e.alternate;return n===null?(n=ir(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pd(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Yy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Gi:return ei(n.children,s,o,t);case uy:i=8,s|=8;break;case xp:return e=ir(12,n,t,s|2),e.elementType=xp,e.lanes=o,e;case wp:return e=ir(13,n,t,s),e.elementType=wp,e.lanes=o,e;case bp:return e=ir(19,n,t,s),e.elementType=bp,e.lanes=o,e;case I1:return Jf(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D1:i=10;break e;case O1:i=9;break e;case dy:i=11;break e;case fy:i=14;break e;case ro:i=16,r=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=ir(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function ei(e,t,n,r){return e=ir(7,e,r,t),e.lanes=n,e}function Jf(e,t,n,r){return e=ir(22,e,r,t),e.elementType=I1,e.lanes=n,e.stateNode={isHidden:!1},e}function Mm(e,t,n){return e=ir(6,e,null,t),e.lanes=n,e}function Lm(e,t,n){return t=ir(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function IA(e,t,n,r,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=ym(0),this.expirationTimes=ym(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ym(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ky(e,t,n,r,s,o,i,a,c){return e=new IA(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ir(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Py(o),e}function MA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ki,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function jS(e){if(!e)return ko;e=e._reactInternals;e:{if(_i(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var n=e.type;if(Dn(n))return j_(e,n,t)}return t}function ES(e,t,n,r,s,o,i,a,c){return e=Ky(n,r,!0,e,s,o,i,a,c),e.context=jS(null),n=e.current,r=Sn(),s=wo(n),o=Es(r,s),o.callback=t??null,vo(n,o,s),e.current.lanes=s,Zc(e,s,r),On(e,r),e}function eh(e,t,n,r){var s=t.current,o=Sn(),i=wo(s);return n=jS(n),t.context===null?t.context=n:t.pendingContext=n,t=Es(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=vo(s,t,i),e!==null&&(Er(e,s,i,o),cd(e,s,i)),i}function Xd(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 mw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gy(e,t){mw(e,t),(e=e.alternate)&&mw(e,t)}function LA(){return null}var NS=typeof reportError=="function"?reportError:function(e){console.error(e)};function Zy(e){this._internalRoot=e}th.prototype.render=Zy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));eh(e,t,null,null)};th.prototype.unmount=Zy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;li(function(){eh(null,e,null,null)}),t[Ds]=null}};function th(e){this._internalRoot=e}th.prototype.unstable_scheduleHydration=function(e){if(e){var t=o_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oo.length&&t!==0&&t<oo[n].priority;n++);oo.splice(n,0,e),n===0&&a_(e)}};function qy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pw(){}function zA(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=Xd(i);o.call(u)}}var i=ES(t,r,e,0,null,!1,!1,"",pw);return e._reactRootContainer=i,e[Ds]=i.current,uc(e.nodeType===8?e.parentNode:e),li(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Xd(c);a.call(u)}}var c=Ky(e,0,!1,null,null,!1,!1,"",pw);return e._reactRootContainer=c,e[Ds]=c.current,uc(e.nodeType===8?e.parentNode:e),li(function(){eh(t,c,n,r)}),c}function rh(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var c=Xd(i);a.call(c)}}eh(t,i,e,s)}else i=zA(n,t,e,s,r);return Xd(i)}r_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Al(t.pendingLanes);n!==0&&(py(t,n|1),On(t,Ut()),!(ct&6)&&(Aa=Ut()+500,Io()))}break;case 13:li(function(){var r=Os(e,1);if(r!==null){var s=Sn();Er(r,e,1,s)}}),Gy(e,1)}};gy=function(e){if(e.tag===13){var t=Os(e,134217728);if(t!==null){var n=Sn();Er(t,e,134217728,n)}Gy(e,134217728)}};s_=function(e){if(e.tag===13){var t=wo(e),n=Os(e,t);if(n!==null){var r=Sn();Er(n,e,t,r)}Gy(e,t)}};o_=function(){return gt};i_=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}};Rp=function(e,t,n){switch(t){case"input":if(kp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Kf(r);if(!s)throw Error(ie(90));L1(r),kp(r,s)}}}break;case"textarea":F1(e,n);break;case"select":t=n.value,t!=null&&fa(e,!!n.multiple,t,!1)}};Y1=By;K1=li;var FA={usingClientEntryPoint:!1,Events:[Xc,Qi,Kf,W1,H1,By]},vl={findFiberByHostInstance:Wo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$A={bundleType:vl.bundleType,version:vl.version,rendererPackageName:vl.rendererPackageName,rendererConfig:vl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Us.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=q1(e),e===null?null:e.stateNode},findFiberByHostInstance:vl.findFiberByHostInstance||LA,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 Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Bf=Vu.inject($A),Xr=Vu}catch{}}Xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FA;Xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qy(t))throw Error(ie(200));return MA(e,t,null,n)};Xn.createRoot=function(e,t){if(!qy(e))throw Error(ie(299));var n=!1,r="",s=NS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ky(e,1,!1,null,null,n,!1,r,s),e[Ds]=t.current,uc(e.nodeType===8?e.parentNode:e),new Zy(t)};Xn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=q1(t),e=e===null?null:e.stateNode,e};Xn.flushSync=function(e){return li(e)};Xn.hydrate=function(e,t,n){if(!nh(t))throw Error(ie(200));return rh(null,e,t,!0,n)};Xn.hydrateRoot=function(e,t,n){if(!qy(e))throw Error(ie(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=NS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=ES(t,null,e,1,n??null,s,!1,o,i),e[Ds]=t.current,uc(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new th(t)};Xn.render=function(e,t,n){if(!nh(t))throw Error(ie(200));return rh(null,e,t,!1,n)};Xn.unmountComponentAtNode=function(e){if(!nh(e))throw Error(ie(40));return e._reactRootContainer?(li(function(){rh(null,null,e,!1,function(){e._reactRootContainer=null,e[Ds]=null})}),!0):!1};Xn.unstable_batchedUpdates=By;Xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nh(n))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return rh(e,t,n,!1,r)};Xn.version="18.3.1-next-f1338f8080-20240426";function TS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TS)}catch(e){console.error(e)}}TS(),T1.exports=Xn;var Vs=T1.exports;const PS=Uf(Vs),UA=g1({__proto__:null,default:PS},[Vs]);var gw=Vs;yp.createRoot=gw.createRoot,yp.hydrateRoot=gw.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 At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}var Wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wt||(Wt={}));const yw="popstate";function VA(e){e===void 0&&(e={});function t(s,o){let{pathname:i="/",search:a="",hash:c=""}=Bs(s.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),xc("",{pathname:i,search:a,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(s,o){let i=s.document.querySelector("base"),a="";if(i&&i.getAttribute("href")){let c=s.location.href,u=c.indexOf("#");a=u===-1?c:c.slice(0,u)}return a+"#"+(typeof o=="string"?o:ui(o))}function r(s,o){ci(s.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return WA(t,n,r,e)}function tt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ci(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function BA(){return Math.random().toString(36).substr(2,8)}function vw(e,t){return{usr:e.state,key:e.key,idx:t}}function xc(e,t,n,r){return n===void 0&&(n=null),At({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Bs(t):t,{state:n,key:t&&t.key||r||BA()})}function ui(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Bs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function WA(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=Wt.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(At({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=Wt.Pop;let w=d(),g=w==null?null:w-u;u=w,c&&c({action:a,location:p.location,delta:g})}function h(w,g){a=Wt.Push;let v=xc(p.location,w,g);n&&n(v,w),u=d()+1;let b=vw(v,u),_=p.createHref(v);try{i.pushState(b,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(_)}o&&c&&c({action:a,location:p.location,delta:1})}function m(w,g){a=Wt.Replace;let v=xc(p.location,w,g);n&&n(v,w),u=d();let b=vw(v,u),_=p.createHref(v);i.replaceState(b,"",_),o&&c&&c({action:a,location:p.location,delta:0})}function x(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:ui(w);return v=v.replace(/ $/,"%20"),tt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let p={get action(){return a},get location(){return e(s,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(yw,f),c=w,()=>{s.removeEventListener(yw,f),c=null}},createHref(w){return t(s,w)},createURL:x,encodeLocation(w){let g=x(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:m,go(w){return i.go(w)}};return p}var wt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(wt||(wt={}));const HA=new Set(["lazy","caseSensitive","path","id","index","children"]);function YA(e){return e.index===!0}function wc(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(tt(s.index!==!0||!s.children,"Cannot specify children on an index route"),tt(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),YA(s)){let c=At({},s,t(s),{id:a});return r[a]=c,c}else{let c=At({},s,t(s),{id:a,children:void 0});return r[a]=c,s.children&&(c.children=wc(s.children,t,i,r)),c}})}function Bo(e,t,n){return n===void 0&&(n="/"),gd(e,t,n,!1)}function gd(e,t,n,r){let s=typeof t=="string"?Bs(t):t,o=Za(s.pathname||"/",n);if(o==null)return null;let i=RS(e);GA(i);let a=null;for(let c=0;a==null&&c<i.length;++c){let u=oD(o);a=rD(i[c],u,r)}return a}function KA(e,t){let{route:n,pathname:r,params:s}=e;return{id:n.id,pathname:r,params:s,data:t[n.id],handle:n.handle}}function RS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(tt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ns([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(tt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),RS(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:tD(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let c of AS(o.path))s(o,i,c)}),t}function AS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=AS(r.join("/")),a=[];return a.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&a.push(...i),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function GA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ZA=/^:[\w-]+$/,qA=3,XA=2,QA=1,JA=10,eD=-2,xw=e=>e==="*";function tD(e,t){let n=e.split("/"),r=n.length;return n.some(xw)&&(r+=eD),t&&(r+=XA),n.filter(s=>!xw(s)).reduce((s,o)=>s+(ZA.test(o)?qA:o===""?QA:JA),r)}function nD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function rD(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=ww({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=ww({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:Ns([o,f.pathname]),pathnameBase:lD(Ns([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=Ns([o,f.pathnameBase]))}return i}function ww(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=sD(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=a[f]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const x=a[f];return m&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function sD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ci(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 r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function oD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ci(!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 Za(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function iD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Bs(e):e;return{pathname:n?n.startsWith("/")?n:aD(n,t):t,search:cD(r),hash:uD(s)}}function aD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function zm(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function DS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sh(e,t){let n=DS(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function oh(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Bs(e):(s=At({},e),tt(!s.pathname||!s.pathname.includes("?"),zm("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),zm("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),zm("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let c=iD(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ns=e=>e.join("/").replace(/\/\/+/g,"/"),lD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,uD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Xy{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ih(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const OS=["post","put","patch","delete"],dD=new Set(OS),fD=["get",...OS],hD=new Set(fD),mD=new Set([301,302,303,307,308]),pD=new Set([307,308]),Fm={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Qy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),IS="remix-router-transitions";function vD(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;tt(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 V=e.detectErrorBoundary;s=H=>({hasErrorBoundary:V(H)})}else s=yD;let o={},i=wc(e.routes,s,void 0,o),a,c=e.basename||"/",u=e.unstable_dataStrategy||SD,d=e.unstable_patchRoutesOnMiss,f=At({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,m=new Set,x=null,p=null,w=null,g=e.hydrationData!=null,v=Bo(i,e.history.location,c),b=null;if(v==null&&!d){let V=xn(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=Pw(i);v=H,b={[q.id]:V}}v&&d&&!e.hydrationData&&dm(v,i,e.history.location.pathname).active&&(v=null);let _;if(!v)_=!1,v=[];else if(v.some(V=>V.route.lazy))_=!1;else if(!v.some(V=>V.route.loader))_=!0;else if(f.v7_partialHydration){let V=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,q=ne=>ne.route.loader?typeof ne.route.loader=="function"&&ne.route.loader.hydrate===!0?!1:V&&V[ne.route.id]!==void 0||H&&H[ne.route.id]!==void 0:!0;if(H){let ne=v.findIndex(be=>H[be.route.id]!==void 0);_=v.slice(0,ne+1).every(q)}else _=v.every(q)}else _=e.hydrationData!=null;let C,j={historyAction:e.history.action,location:e.history.location,matches:v,initialized:_,navigation:Fm,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||b,fetchers:new Map,blockers:new Map},T=Wt.Pop,R=!1,A,O=!1,G=new Map,N=null,z=!1,S=!1,U=[],J=[],F=new Map,W=0,I=-1,X=new Map,$=new Set,B=new Map,he=new Map,se=new Set,oe=new Map,Oe=new Map,me=new Map,we=!1;function Te(){if(h=e.history.listen(V=>{let{action:H,location:q,delta:ne}=V;if(we){we=!1;return}ci(Oe.size===0||ne!=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 be=wu({currentLocation:j.location,nextLocation:q,historyAction:H});if(be&&ne!=null){we=!0,e.history.go(ne*-1),Ri(be,{state:"blocked",location:q,proceed(){Ri(be,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),e.history.go(ne)},reset(){let Ae=new Map(j.blockers);Ae.set(be,xl),Re({blockers:Ae})}});return}return Z(H,q)}),n){MD(t,G);let V=()=>LD(t,G);t.addEventListener("pagehide",V),N=()=>t.removeEventListener("pagehide",V)}return j.initialized||Z(Wt.Pop,j.location,{initialHydration:!0}),C}function Fe(){h&&h(),N&&N(),m.clear(),A&&A.abort(),j.fetchers.forEach((V,H)=>Yt(H)),j.blockers.forEach((V,H)=>xu(H))}function Ie(V){return m.add(V),()=>m.delete(V)}function Re(V,H){H===void 0&&(H={}),j=At({},j,V);let q=[],ne=[];f.v7_fetcherPersist&&j.fetchers.forEach((be,Ae)=>{be.state==="idle"&&(se.has(Ae)?ne.push(Ae):q.push(Ae))}),[...m].forEach(be=>be(j,{deletedFetchers:ne,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),f.v7_fetcherPersist&&(q.forEach(be=>j.fetchers.delete(be)),ne.forEach(be=>Yt(be)))}function st(V,H,q){var ne,be;let{flushSync:Ae}=q===void 0?{}:q,Be=j.actionData!=null&&j.navigation.formMethod!=null&&xr(j.navigation.formMethod)&&j.navigation.state==="loading"&&((ne=V.state)==null?void 0:ne._isRedirect)!==!0,fe;H.actionData?Object.keys(H.actionData).length>0?fe=H.actionData:fe=null:Be?fe=j.actionData:fe=null;let qe=H.loaderData?Nw(j.loaderData,H.loaderData,H.matches||[],H.errors):j.loaderData,ze=j.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((pt,xt)=>ze.set(xt,xl)));let $e=R===!0||j.navigation.formMethod!=null&&xr(j.navigation.formMethod)&&((be=V.state)==null?void 0:be._isRedirect)!==!0;a&&(i=a,a=void 0),z||T===Wt.Pop||(T===Wt.Push?e.history.push(V,V.state):T===Wt.Replace&&e.history.replace(V,V.state));let yt;if(T===Wt.Pop){let pt=G.get(j.location.pathname);pt&&pt.has(V.pathname)?yt={currentLocation:j.location,nextLocation:V}:G.has(V.pathname)&&(yt={currentLocation:V,nextLocation:j.location})}else if(O){let pt=G.get(j.location.pathname);pt?pt.add(V.pathname):(pt=new Set([V.pathname]),G.set(j.location.pathname,pt)),yt={currentLocation:j.location,nextLocation:V}}Re(At({},H,{actionData:fe,loaderData:qe,historyAction:T,location:V,initialized:!0,navigation:Fm,revalidation:"idle",restoreScrollPosition:i0(V,H.matches||j.matches),preventScrollReset:$e,blockers:ze}),{viewTransitionOpts:yt,flushSync:Ae===!0}),T=Wt.Pop,R=!1,O=!1,z=!1,S=!1,U=[],J=[]}async function E(V,H){if(typeof V=="number"){e.history.go(V);return}let q=ug(j.location,j.matches,c,f.v7_prependBasename,V,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ne,submission:be,error:Ae}=bw(f.v7_normalizeFormMethod,!1,q,H),Be=j.location,fe=xc(j.location,ne,H&&H.state);fe=At({},fe,e.history.encodeLocation(fe));let qe=H&&H.replace!=null?H.replace:void 0,ze=Wt.Push;qe===!0?ze=Wt.Replace:qe===!1||be!=null&&xr(be.formMethod)&&be.formAction===j.location.pathname+j.location.search&&(ze=Wt.Replace);let $e=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,yt=(H&&H.unstable_flushSync)===!0,pt=wu({currentLocation:Be,nextLocation:fe,historyAction:ze});if(pt){Ri(pt,{state:"blocked",location:fe,proceed(){Ri(pt,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),E(V,H)},reset(){let xt=new Map(j.blockers);xt.set(pt,xl),Re({blockers:xt})}});return}return await Z(ze,fe,{submission:be,pendingError:Ae,preventScrollReset:$e,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:yt})}function ee(){if(Ke(),Re({revalidation:"loading"}),j.navigation.state!=="submitting"){if(j.navigation.state==="idle"){Z(j.historyAction,j.location,{startUninterruptedRevalidation:!0});return}Z(T||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation})}}async function Z(V,H,q){A&&A.abort(),A=null,T=V,z=(q&&q.startUninterruptedRevalidation)===!0,dP(j.location,j.matches),R=(q&&q.preventScrollReset)===!0,O=(q&&q.enableViewTransition)===!0;let ne=a||i,be=q&&q.overrideNavigation,Ae=Bo(ne,H,c),Be=(q&&q.flushSync)===!0,fe=dm(Ae,ne,H.pathname);if(fe.active&&fe.matches&&(Ae=fe.matches),!Ae){let{error:ht,notFoundMatches:tn,route:Bt}=Ai(H.pathname);st(H,{matches:tn,loaderData:{},errors:{[Bt.id]:ht}},{flushSync:Be});return}if(j.initialized&&!S&&TD(j.location,H)&&!(q&&q.submission&&xr(q.submission.formMethod))){st(H,{matches:Ae},{flushSync:Be});return}A=new AbortController;let qe=Li(e.history,H,A.signal,q&&q.submission),ze;if(q&&q.pendingError)ze=[oa(Ae).route.id,{type:wt.error,error:q.pendingError}];else if(q&&q.submission&&xr(q.submission.formMethod)){let ht=await D(qe,H,q.submission,Ae,fe.active,{replace:q.replace,flushSync:Be});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[tn,Bt]=ht.pendingActionResult;if(Fn(Bt)&&ih(Bt.error)&&Bt.error.status===404){A=null,st(H,{matches:ht.matches,loaderData:{},errors:{[tn]:Bt.error}});return}}Ae=ht.matches||Ae,ze=ht.pendingActionResult,be=$m(H,q.submission),Be=!1,fe.active=!1,qe=Li(e.history,qe.url,qe.signal)}let{shortCircuited:$e,matches:yt,loaderData:pt,errors:xt}=await k(qe,H,Ae,fe.active,be,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Be,ze);$e||(A=null,st(H,At({matches:yt||Ae},Tw(ze),{loaderData:pt,errors:xt})))}async function D(V,H,q,ne,be,Ae){Ae===void 0&&(Ae={}),Ke();let Be=OD(H,q);if(Re({navigation:Be},{flushSync:Ae.flushSync===!0}),be){let ze=await bu(ne,H.pathname,V.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){let{boundaryId:$e,error:yt}=Fr(H.pathname,ze);return{matches:ze.partialMatches,pendingActionResult:[$e,{type:wt.error,error:yt}]}}else if(ze.matches)ne=ze.matches;else{let{notFoundMatches:$e,error:yt,route:pt}=Ai(H.pathname);return{matches:$e,pendingActionResult:[pt.id,{type:wt.error,error:yt}]}}}let fe,qe=Ol(ne,H);if(!qe.route.action&&!qe.route.lazy)fe={type:wt.error,error:xn(405,{method:V.method,pathname:H.pathname,routeId:qe.route.id})};else if(fe=(await te("action",V,[qe],ne))[0],V.signal.aborted)return{shortCircuited:!0};if(Go(fe)){let ze;return Ae&&Ae.replace!=null?ze=Ae.replace:ze=Cw(fe.response.headers.get("Location"),new URL(V.url),c)===j.location.pathname+j.location.search,await Q(V,fe,{submission:q,replace:ze}),{shortCircuited:!0}}if(Ko(fe))throw xn(400,{type:"defer-action"});if(Fn(fe)){let ze=oa(ne,qe.route.id);return(Ae&&Ae.replace)!==!0&&(T=Wt.Push),{matches:ne,pendingActionResult:[ze.route.id,fe]}}return{matches:ne,pendingActionResult:[qe.route.id,fe]}}async function k(V,H,q,ne,be,Ae,Be,fe,qe,ze,$e){let yt=be||$m(H,Ae),pt=Ae||Be||Dw(yt),xt=!z&&(!f.v7_partialHydration||!qe);if(ne){if(xt){let Lt=P($e);Re(At({navigation:yt},Lt!==void 0?{actionData:Lt}:{}),{flushSync:ze})}let Je=await bu(q,H.pathname,V.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let{boundaryId:Lt,error:In}=Fr(H.pathname,Je);return{matches:Je.partialMatches,loaderData:{},errors:{[Lt]:In}}}else if(Je.matches)q=Je.matches;else{let{error:Lt,notFoundMatches:In,route:Nt}=Ai(H.pathname);return{matches:In,loaderData:{},errors:{[Nt.id]:Lt}}}}let ht=a||i,[tn,Bt]=_w(e.history,j,q,pt,H,f.v7_partialHydration&&qe===!0,f.v7_skipActionErrorRevalidation,S,U,J,se,B,$,ht,c,$e);if(qs(Je=>!(q&&q.some(Lt=>Lt.route.id===Je))||tn&&tn.some(Lt=>Lt.route.id===Je)),I=++W,tn.length===0&&Bt.length===0){let Je=hs();return st(H,At({matches:q,loaderData:{},errors:$e&&Fn($e[1])?{[$e[0]]:$e[1].error}:null},Tw($e),Je?{fetchers:new Map(j.fetchers)}:{}),{flushSync:ze}),{shortCircuited:!0}}if(xt){let Je={};if(!ne){Je.navigation=yt;let Lt=P($e);Lt!==void 0&&(Je.actionData=Lt)}Bt.length>0&&(Je.fetchers=M(Bt)),Re(Je,{flushSync:ze})}Bt.forEach(Je=>{F.has(Je.key)&&lt(Je.key),Je.controller&&F.set(Je.key,Je.controller)});let ul=()=>Bt.forEach(Je=>lt(Je.key));A&&A.signal.addEventListener("abort",ul);let{loaderResults:Xs,fetcherResults:Di}=await ge(j.matches,q,tn,Bt,V);if(V.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",ul),Bt.forEach(Je=>F.delete(Je.key));let Oi=Rw([...Xs,...Di]);if(Oi){if(Oi.idx>=tn.length){let Je=Bt[Oi.idx-tn.length].key;$.add(Je)}return await Q(V,Oi.result,{replace:fe}),{shortCircuited:!0}}let{loaderData:Ii,errors:$r}=Ew(j,q,tn,Xs,$e,Bt,Di,oe);oe.forEach((Je,Lt)=>{Je.subscribe(In=>{(In||Je.done)&&oe.delete(Lt)})}),f.v7_partialHydration&&qe&&j.errors&&Object.entries(j.errors).filter(Je=>{let[Lt]=Je;return!tn.some(In=>In.route.id===Lt)}).forEach(Je=>{let[Lt,In]=Je;$r=Object.assign($r||{},{[Lt]:In})});let _u=hs(),Su=nr(I),ku=_u||Su||Bt.length>0;return At({matches:q,loaderData:Ii,errors:$r},ku?{fetchers:new Map(j.fetchers)}:{})}function P(V){if(V&&!Fn(V[1]))return{[V[0]]:V[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function M(V){return V.forEach(H=>{let q=j.fetchers.get(H.key),ne=wl(void 0,q?q.data:void 0);j.fetchers.set(H.key,ne)}),new Map(j.fetchers)}function K(V,H,q,ne){if(r)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.");F.has(V)&&lt(V);let be=(ne&&ne.unstable_flushSync)===!0,Ae=a||i,Be=ug(j.location,j.matches,c,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,ne==null?void 0:ne.relative),fe=Bo(Ae,Be,c),qe=dm(fe,Ae,Be);if(qe.active&&qe.matches&&(fe=qe.matches),!fe){Et(V,H,xn(404,{pathname:Be}),{flushSync:be});return}let{path:ze,submission:$e,error:yt}=bw(f.v7_normalizeFormMethod,!0,Be,ne);if(yt){Et(V,H,yt,{flushSync:be});return}let pt=Ol(fe,ze);if(R=(ne&&ne.preventScrollReset)===!0,$e&&xr($e.formMethod)){L(V,H,ze,pt,fe,qe.active,be,$e);return}B.set(V,{routeId:H,path:ze}),Y(V,H,ze,pt,fe,qe.active,be,$e)}async function L(V,H,q,ne,be,Ae,Be,fe){Ke(),B.delete(V);function qe(Nt){if(!Nt.route.action&&!Nt.route.lazy){let ms=xn(405,{method:fe.formMethod,pathname:q,routeId:H});return Et(V,H,ms,{flushSync:Be}),!0}return!1}if(!Ae&&qe(ne))return;let ze=j.fetchers.get(V);Ue(V,ID(fe,ze),{flushSync:Be});let $e=new AbortController,yt=Li(e.history,q,$e.signal,fe);if(Ae){let Nt=await bu(be,q,yt.signal);if(Nt.type==="aborted")return;if(Nt.type==="error"){let{error:ms}=Fr(q,Nt);Et(V,H,ms,{flushSync:Be});return}else if(Nt.matches){if(be=Nt.matches,ne=Ol(be,q),qe(ne))return}else{Et(V,H,xn(404,{pathname:q}),{flushSync:Be});return}}F.set(V,$e);let pt=W,ht=(await te("action",yt,[ne],be))[0];if(yt.signal.aborted){F.get(V)===$e&&F.delete(V);return}if(f.v7_fetcherPersist&&se.has(V)){if(Go(ht)||Fn(ht)){Ue(V,to(void 0));return}}else{if(Go(ht))if(F.delete(V),I>pt){Ue(V,to(void 0));return}else return $.add(V),Ue(V,wl(fe)),Q(yt,ht,{fetcherSubmission:fe});if(Fn(ht)){Et(V,H,ht.error);return}}if(Ko(ht))throw xn(400,{type:"defer-action"});let tn=j.navigation.location||j.location,Bt=Li(e.history,tn,$e.signal),ul=a||i,Xs=j.navigation.state!=="idle"?Bo(ul,j.navigation.location,c):j.matches;tt(Xs,"Didn't find any matches after fetcher action");let Di=++W;X.set(V,Di);let Oi=wl(fe,ht.data);j.fetchers.set(V,Oi);let[Ii,$r]=_w(e.history,j,Xs,fe,tn,!1,f.v7_skipActionErrorRevalidation,S,U,J,se,B,$,ul,c,[ne.route.id,ht]);$r.filter(Nt=>Nt.key!==V).forEach(Nt=>{let ms=Nt.key,a0=j.fetchers.get(ms),mP=wl(void 0,a0?a0.data:void 0);j.fetchers.set(ms,mP),F.has(ms)&&lt(ms),Nt.controller&&F.set(ms,Nt.controller)}),Re({fetchers:new Map(j.fetchers)});let _u=()=>$r.forEach(Nt=>lt(Nt.key));$e.signal.addEventListener("abort",_u);let{loaderResults:Su,fetcherResults:ku}=await ge(j.matches,Xs,Ii,$r,Bt);if($e.signal.aborted)return;$e.signal.removeEventListener("abort",_u),X.delete(V),F.delete(V),$r.forEach(Nt=>F.delete(Nt.key));let Je=Rw([...Su,...ku]);if(Je){if(Je.idx>=Ii.length){let Nt=$r[Je.idx-Ii.length].key;$.add(Nt)}return Q(Bt,Je.result)}let{loaderData:Lt,errors:In}=Ew(j,j.matches,Ii,Su,void 0,$r,ku,oe);if(j.fetchers.has(V)){let Nt=to(ht.data);j.fetchers.set(V,Nt)}nr(Di),j.navigation.state==="loading"&&Di>I?(tt(T,"Expected pending action"),A&&A.abort(),st(j.navigation.location,{matches:Xs,loaderData:Lt,errors:In,fetchers:new Map(j.fetchers)})):(Re({errors:In,loaderData:Nw(j.loaderData,Lt,Xs,In),fetchers:new Map(j.fetchers)}),S=!1)}async function Y(V,H,q,ne,be,Ae,Be,fe){let qe=j.fetchers.get(V);Ue(V,wl(fe,qe?qe.data:void 0),{flushSync:Be});let ze=new AbortController,$e=Li(e.history,q,ze.signal);if(Ae){let ht=await bu(be,q,$e.signal);if(ht.type==="aborted")return;if(ht.type==="error"){let{error:tn}=Fr(q,ht);Et(V,H,tn,{flushSync:Be});return}else if(ht.matches)be=ht.matches,ne=Ol(be,q);else{Et(V,H,xn(404,{pathname:q}),{flushSync:Be});return}}F.set(V,ze);let yt=W,xt=(await te("loader",$e,[ne],be))[0];if(Ko(xt)&&(xt=await $S(xt,$e.signal,!0)||xt),F.get(V)===ze&&F.delete(V),!$e.signal.aborted){if(se.has(V)){Ue(V,to(void 0));return}if(Go(xt))if(I>yt){Ue(V,to(void 0));return}else{$.add(V),await Q($e,xt);return}if(Fn(xt)){Et(V,H,xt.error);return}tt(!Ko(xt),"Unhandled fetcher deferred data"),Ue(V,to(xt.data))}}async function Q(V,H,q){let{submission:ne,fetcherSubmission:be,replace:Ae}=q===void 0?{}:q;H.response.headers.has("X-Remix-Revalidate")&&(S=!0);let Be=H.response.headers.get("Location");tt(Be,"Expected a Location header on the redirect Response"),Be=Cw(Be,new URL(V.url),c);let fe=xc(j.location,Be,{_isRedirect:!0});if(n){let xt=!1;if(H.response.headers.has("X-Remix-Reload-Document"))xt=!0;else if(Qy.test(Be)){const ht=e.history.createURL(Be);xt=ht.origin!==t.location.origin||Za(ht.pathname,c)==null}if(xt){Ae?t.location.replace(Be):t.location.assign(Be);return}}A=null;let qe=Ae===!0?Wt.Replace:Wt.Push,{formMethod:ze,formAction:$e,formEncType:yt}=j.navigation;!ne&&!be&&ze&&$e&&yt&&(ne=Dw(j.navigation));let pt=ne||be;if(pD.has(H.response.status)&&pt&&xr(pt.formMethod))await Z(qe,fe,{submission:At({},pt,{formAction:Be}),preventScrollReset:R});else{let xt=$m(fe,ne);await Z(qe,fe,{overrideNavigation:xt,fetcherSubmission:be,preventScrollReset:R})}}async function te(V,H,q,ne){try{let be=await kD(u,V,H,q,ne,o,s);return await Promise.all(be.map((Ae,Be)=>{if(RD(Ae)){let fe=Ae.result;return{type:wt.redirect,response:ED(fe,H,q[Be].route.id,ne,c,f.v7_relativeSplatPath)}}return jD(Ae)}))}catch(be){return q.map(()=>({type:wt.error,error:be}))}}async function ge(V,H,q,ne,be){let[Ae,...Be]=await Promise.all([q.length?te("loader",be,q,H):[],...ne.map(fe=>{if(fe.matches&&fe.match&&fe.controller){let qe=Li(e.history,fe.path,fe.controller.signal);return te("loader",qe,[fe.match],fe.matches).then(ze=>ze[0])}else return Promise.resolve({type:wt.error,error:xn(404,{pathname:fe.path})})})]);return await Promise.all([Aw(V,q,Ae,Ae.map(()=>be.signal),!1,j.loaderData),Aw(V,ne.map(fe=>fe.match),Be,ne.map(fe=>fe.controller?fe.controller.signal:null),!0)]),{loaderResults:Ae,fetcherResults:Be}}function Ke(){S=!0,U.push(...qs()),B.forEach((V,H)=>{F.has(H)&&(J.push(H),lt(H))})}function Ue(V,H,q){q===void 0&&(q={}),j.fetchers.set(V,H),Re({fetchers:new Map(j.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Et(V,H,q,ne){ne===void 0&&(ne={});let be=oa(j.matches,H);Yt(V),Re({errors:{[be.route.id]:q},fetchers:new Map(j.fetchers)},{flushSync:(ne&&ne.flushSync)===!0})}function tr(V){return f.v7_fetcherPersist&&(he.set(V,(he.get(V)||0)+1),se.has(V)&&se.delete(V)),j.fetchers.get(V)||gD}function Yt(V){let H=j.fetchers.get(V);F.has(V)&&!(H&&H.state==="loading"&&X.has(V))&&lt(V),B.delete(V),X.delete(V),$.delete(V),se.delete(V),j.fetchers.delete(V)}function ds(V){if(f.v7_fetcherPersist){let H=(he.get(V)||0)-1;H<=0?(he.delete(V),se.add(V)):he.set(V,H)}else Yt(V);Re({fetchers:new Map(j.fetchers)})}function lt(V){let H=F.get(V);tt(H,"Expected fetch controller: "+V),H.abort(),F.delete(V)}function fs(V){for(let H of V){let q=tr(H),ne=to(q.data);j.fetchers.set(H,ne)}}function hs(){let V=[],H=!1;for(let q of $){let ne=j.fetchers.get(q);tt(ne,"Expected fetcher: "+q),ne.state==="loading"&&($.delete(q),V.push(q),H=!0)}return fs(V),H}function nr(V){let H=[];for(let[q,ne]of X)if(ne<V){let be=j.fetchers.get(q);tt(be,"Expected fetcher: "+q),be.state==="loading"&&(lt(q),X.delete(q),H.push(q))}return fs(H),H.length>0}function vu(V,H){let q=j.blockers.get(V)||xl;return Oe.get(V)!==H&&Oe.set(V,H),q}function xu(V){j.blockers.delete(V),Oe.delete(V)}function Ri(V,H){let q=j.blockers.get(V)||xl;tt(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let ne=new Map(j.blockers);ne.set(V,H),Re({blockers:ne})}function wu(V){let{currentLocation:H,nextLocation:q,historyAction:ne}=V;if(Oe.size===0)return;Oe.size>1&&ci(!1,"A router only supports one blocker at a time");let be=Array.from(Oe.entries()),[Ae,Be]=be[be.length-1],fe=j.blockers.get(Ae);if(!(fe&&fe.state==="proceeding")&&Be({currentLocation:H,nextLocation:q,historyAction:ne}))return Ae}function Ai(V){let H=xn(404,{pathname:V}),q=a||i,{matches:ne,route:be}=Pw(q);return qs(),{notFoundMatches:ne,route:be,error:H}}function Fr(V,H){return{boundaryId:oa(H.partialMatches).route.id,error:xn(400,{type:"route-discovery",pathname:V,message:H.error!=null&&"message"in H.error?H.error:String(H.error)})}}function qs(V){let H=[];return oe.forEach((q,ne)=>{(!V||V(ne))&&(q.cancel(),H.push(ne),oe.delete(ne))}),H}function uP(V,H,q){if(x=V,w=H,p=q||null,!g&&j.navigation===Fm){g=!0;let ne=i0(j.location,j.matches);ne!=null&&Re({restoreScrollPosition:ne})}return()=>{x=null,w=null,p=null}}function o0(V,H){return p&&p(V,H.map(ne=>KA(ne,j.loaderData)))||V.key}function dP(V,H){if(x&&w){let q=o0(V,H);x[q]=w()}}function i0(V,H){if(x){let q=o0(V,H),ne=x[q];if(typeof ne=="number")return ne}return null}function dm(V,H,q){if(d)if(V){let ne=V[V.length-1].route;if(ne.path&&(ne.path==="*"||ne.path.endsWith("/*")))return{active:!0,matches:gd(H,q,c,!0)}}else return{active:!0,matches:gd(H,q,c,!0)||[]};return{active:!1,matches:null}}async function bu(V,H,q){let ne=V,be=ne.length>0?ne[ne.length-1].route:null;for(;;){let Ae=a==null,Be=a||i;try{await _D(d,H,ne,Be,o,s,me,q)}catch($e){return{type:"error",error:$e,partialMatches:ne}}finally{Ae&&(i=[...i])}if(q.aborted)return{type:"aborted"};let fe=Bo(Be,H,c),qe=!1;if(fe){let $e=fe[fe.length-1].route;if($e.index)return{type:"success",matches:fe};if($e.path&&$e.path.length>0)if($e.path==="*")qe=!0;else return{type:"success",matches:fe}}let ze=gd(Be,H,c,!0);if(!ze||ne.map($e=>$e.route.id).join("-")===ze.map($e=>$e.route.id).join("-"))return{type:"success",matches:qe?fe:null};if(ne=ze,be=ne[ne.length-1].route,be.path==="*")return{type:"success",matches:ne}}}function fP(V){o={},a=wc(V,s,void 0,o)}function hP(V,H){let q=a==null;LS(V,H,a||i,o,s),q&&(i=[...i],Re({}))}return C={get basename(){return c},get future(){return f},get state(){return j},get routes(){return i},get window(){return t},initialize:Te,subscribe:Ie,enableScrollRestoration:uP,navigate:E,fetch:K,revalidate:ee,createHref:V=>e.history.createHref(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:tr,deleteFetcher:ds,dispose:Fe,getBlocker:vu,deleteBlocker:xu,patchRoutes:hP,_internalFetchControllers:F,_internalActiveDeferreds:oe,_internalSetRoutes:fP},C}function xD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ug(e,t,n,r,s,o,i,a){let c,u;if(i){c=[];for(let f of t)if(c.push(f),f.route.id===i){u=f;break}}else c=t,u=t[t.length-1];let d=oh(s||".",sh(c,o),Za(e.pathname,n)||e.pathname,a==="path");return s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u&&u.route.index&&!Jy(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Ns([n,d.pathname])),ui(d)}function bw(e,t,n,r){if(!r||!xD(r))return{path:n};if(r.formMethod&&!DD(r.formMethod))return{path:n,error:xn(405,{method:r.formMethod})};let s=()=>({path:n,error:xn(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=zS(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!xr(i))return s();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,x)=>{let[p,w]=x;return""+m+p+"="+w+`
`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!xr(i))return s();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}tt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=dg(r.formData),u=r.formData;else if(r.body instanceof FormData)c=dg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=jw(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=jw(c)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(xr(d.formMethod))return{path:n,submission:d};let f=Bs(n);return t&&f.search&&Jy(f.search)&&c.append("index",""),f.search="?"+c,{path:ui(f),submission:d}}function wD(e,t){let n=e;if(t){let r=e.findIndex(s=>s.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function _w(e,t,n,r,s,o,i,a,c,u,d,f,h,m,x,p){let w=p?Fn(p[1])?p[1].error:p[1].data:void 0,g=e.createURL(t.location),v=e.createURL(s),b=p&&Fn(p[1])?p[0]:void 0,_=b?wD(n,b):n,C=p?p[1].statusCode:void 0,j=i&&C&&C>=400,T=_.filter((A,O)=>{let{route:G}=A;if(G.lazy)return!0;if(G.loader==null)return!1;if(o)return typeof G.loader!="function"||G.loader.hydrate?!0:t.loaderData[G.id]===void 0&&(!t.errors||t.errors[G.id]===void 0);if(bD(t.loaderData,t.matches[O],A)||c.some(S=>S===A.route.id))return!0;let N=t.matches[O],z=A;return Sw(A,At({currentUrl:g,currentParams:N.params,nextUrl:v,nextParams:z.params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||MS(N,z)}))}),R=[];return f.forEach((A,O)=>{if(o||!n.some(U=>U.route.id===A.routeId)||d.has(O))return;let G=Bo(m,A.path,x);if(!G){R.push({key:O,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),z=Ol(G,A.path),S=!1;h.has(O)?S=!1:u.includes(O)?S=!0:N&&N.state!=="idle"&&N.data===void 0?S=a:S=Sw(z,At({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:C,defaultShouldRevalidate:j?!1:a})),S&&R.push({key:O,routeId:A.routeId,path:A.path,matches:G,match:z,controller:new AbortController})}),[T,R]}function bD(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function MS(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Sw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function _D(e,t,n,r,s,o,i,a){let c=[t,...n.map(u=>u.route.id)].join("-");try{let u=i.get(c);u||(u=e({path:t,matches:n,patch:(d,f)=>{a.aborted||LS(d,f,r,s,o)}}),i.set(c,u)),u&&PD(u)&&await u}finally{i.delete(c)}}function LS(e,t,n,r,s){if(e){var o;let i=r[e];tt(i,"No route found to patch children into: routeId = "+e);let a=wc(t,s,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=wc(t,s,["patch",String(n.length||"0")],r);n.push(...i)}}async function kw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];tt(s,"No route found in manifest");let o={};for(let i in r){let c=s[i]!==void 0&&i!=="hasErrorBoundary";ci(!c,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!HA.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,At({},t(s),{lazy:void 0}))}function SD(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function kD(e,t,n,r,s,o,i,a){let c=r.reduce((f,h)=>f.add(h.route.id),new Set),u=new Set,d=await e({matches:s.map(f=>{let h=c.has(f.route.id);return At({},f,{shouldLoad:h,resolve:x=>(u.add(f.route.id),h?CD(t,n,f,o,i,x,a):Promise.resolve({type:wt.data,result:void 0}))})}),request:n,params:s[0].params,context:a});return s.forEach(f=>tt(u.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((f,h)=>c.has(s[h].route.id))}async function CD(e,t,n,r,s,o,i){let a,c,u=d=>{let f,h=new Promise((p,w)=>f=w);c=()=>f(),t.signal.addEventListener("abort",c);let m=p=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...p!==void 0?[p]:[]),x;return o?x=o(p=>m(p)):x=(async()=>{try{return{type:"data",result:await m()}}catch(p){return{type:"error",result:p}}})(),Promise.race([x,h])};try{let d=n.route[e];if(n.route.lazy)if(d){let f,[h]=await Promise.all([u(d).catch(m=>{f=m}),kw(n.route,s,r)]);if(f!==void 0)throw f;a=h}else if(await kw(n.route,s,r),d=n.route[e],d)a=await u(d);else if(e==="action"){let f=new URL(t.url),h=f.pathname+f.search;throw xn(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:wt.data,result:void 0};else if(d)a=await u(d);else{let f=new URL(t.url),h=f.pathname+f.search;throw xn(404,{pathname:h})}tt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:wt.error,result:d}}finally{c&&t.signal.removeEventListener("abort",c)}return a}async function jD(e){let{result:t,type:n,status:r}=e;if(FS(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:wt.error,error:a}}return n===wt.error?{type:wt.error,error:new Xy(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:wt.data,data:i,statusCode:t.status,headers:t.headers}}if(n===wt.error)return{type:wt.error,error:t,statusCode:ih(t)?t.status:r};if(AD(t)){var s,o;return{type:wt.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:wt.data,data:t,statusCode:r}}function ED(e,t,n,r,s,o){let i=e.headers.get("Location");if(tt(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Qy.test(i)){let a=r.slice(0,r.findIndex(c=>c.route.id===n)+1);i=ug(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function Cw(e,t,n){if(Qy.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Za(s.pathname,n)!=null;if(s.origin===t.origin&&o)return s.pathname+s.search+s.hash}return e}function Li(e,t,n,r){let s=e.createURL(zS(t)).toString(),o={signal:n};if(r&&xr(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=dg(r.formData):o.body=r.formData}return new Request(s,o)}function dg(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function jw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function ND(e,t,n,r,s,o){let i={},a=null,c,u=!1,d={},f=r&&Fn(r[1])?r[1].error:void 0;return n.forEach((h,m)=>{let x=t[m].route.id;if(tt(!Go(h),"Cannot handle redirect results in processLoaderData"),Fn(h)){let p=h.error;f!==void 0&&(p=f,f=void 0),a=a||{};{let w=oa(e,x);a[w.route.id]==null&&(a[w.route.id]=p)}i[x]=void 0,u||(u=!0,c=ih(h.error)?h.error.status:500),h.headers&&(d[x]=h.headers)}else Ko(h)?(s.set(x,h.deferredData),i[x]=h.deferredData.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers)):(i[x]=h.data,h.statusCode&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(d[x]=h.headers))}),f!==void 0&&r&&(a={[r[0]]:f},i[r[0]]=void 0),{loaderData:i,errors:a,statusCode:c||200,loaderHeaders:d}}function Ew(e,t,n,r,s,o,i,a){let{loaderData:c,errors:u}=ND(t,n,r,s,a);for(let d=0;d<o.length;d++){let{key:f,match:h,controller:m}=o[d];tt(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let x=i[d];if(!(m&&m.signal.aborted))if(Fn(x)){let p=oa(e.matches,h==null?void 0:h.route.id);u&&u[p.route.id]||(u=At({},u,{[p.route.id]:x.error})),e.fetchers.delete(f)}else if(Go(x))tt(!1,"Unhandled fetcher revalidation redirect");else if(Ko(x))tt(!1,"Unhandled fetcher deferred data");else{let p=to(x.data);e.fetchers.set(f,p)}}return{loaderData:c,errors:u}}function Nw(e,t,n,r){let s=At({},t);for(let o of n){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]),r&&r.hasOwnProperty(i))break}return s}function Tw(e){return e?Fn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function oa(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Pw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function xn(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?c='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
`+i):s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?c="defer() is not supported in actions":o==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",c='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new Xy(e||500,a,new Error(c),!0)}function Rw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Go(n))return{result:n,idx:t}}}function zS(e){let t=typeof e=="string"?Bs(e):e;return ui(At({},t,{hash:""}))}function TD(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function PD(e){return typeof e=="object"&&e!=null&&"then"in e}function RD(e){return FS(e.result)&&mD.has(e.result.status)}function Ko(e){return e.type===wt.deferred}function Fn(e){return e.type===wt.error}function Go(e){return(e&&e.type)===wt.redirect}function AD(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 FS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function DD(e){return hD.has(e.toLowerCase())}function xr(e){return dD.has(e.toLowerCase())}async function Aw(e,t,n,r,s,o){for(let i=0;i<n.length;i++){let a=n[i],c=t[i];if(!c)continue;let u=e.find(f=>f.route.id===c.route.id),d=u!=null&&!MS(u,c)&&(o&&o[c.route.id])!==void 0;if(Ko(a)&&(s||d)){let f=r[i];tt(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await $S(a,f,s).then(h=>{h&&(n[i]=h||n[i])})}}}async function $S(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:wt.data,data:e.deferredData.unwrappedData}}catch(s){return{type:wt.error,error:s}}return{type:wt.data,data:e.deferredData.data}}}function Jy(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ol(e,t){let n=typeof t=="string"?Bs(t).search:t.search;if(e[e.length-1].route.index&&Jy(n||""))return e[e.length-1];let r=DS(e);return r[r.length-1]}function Dw(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function $m(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 OD(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 wl(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 ID(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 to(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 MD(e,t){try{let n=e.sessionStorage.getItem(IS);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function LD(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(IS,JSON.stringify(n))}catch(r){ci(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
* 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 Qd(){return Qd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qd.apply(this,arguments)}const ah=y.createContext(null),US=y.createContext(null),Mo=y.createContext(null),ev=y.createContext(null),Ws=y.createContext({outlet:null,matches:[],isDataRoute:!1}),VS=y.createContext(null);function zD(e,t){let{relative:n}=t===void 0?{}:t;qa()||tt(!1);let{basename:r,navigator:s}=y.useContext(Mo),{hash:o,pathname:i,search:a}=WS(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:Ns([r,i])),s.createHref({pathname:c,search:a,hash:o})}function qa(){return y.useContext(ev)!=null}function Ir(){return qa()||tt(!1),y.useContext(ev).location}function BS(e){y.useContext(Mo).static||y.useLayoutEffect(e)}function Jn(){let{isDataRoute:e}=y.useContext(Ws);return e?QD():FD()}function FD(){qa()||tt(!1);let e=y.useContext(ah),{basename:t,future:n,navigator:r}=y.useContext(Mo),{matches:s}=y.useContext(Ws),{pathname:o}=Ir(),i=JSON.stringify(sh(s,n.v7_relativeSplatPath)),a=y.useRef(!1);return BS(()=>{a.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=oh(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ns([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,i,o,e])}const $D=y.createContext(null);function UD(e){let t=y.useContext(Ws).outlet;return t&&y.createElement($D.Provider,{value:e},t)}function WS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(Mo),{matches:s}=y.useContext(Ws),{pathname:o}=Ir(),i=JSON.stringify(sh(s,r.v7_relativeSplatPath));return y.useMemo(()=>oh(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function VD(e,t,n,r){qa()||tt(!1);let{navigator:s}=y.useContext(Mo),{matches:o}=y.useContext(Ws),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Ir(),d;d=u;let f=d.pathname||"/",h=f;if(c!=="/"){let p=c.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(p.length).join("/")}let m=Bo(e,{pathname:h});return KD(m&&m.map(p=>Object.assign({},p,{params:Object.assign({},a,p.params),pathname:Ns([c,s.encodeLocation?s.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:Ns([c,s.encodeLocation?s.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),o,n,r)}function BD(){let e=XD(),t=ih(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=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),n?y.createElement("pre",{style:s},n):null,null)}const WD=y.createElement(BD,null);class HD 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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Ws.Provider,{value:this.props.routeContext},y.createElement(VS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function YD(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(ah);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ws.Provider,{value:t},r)}function KD(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||tt(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:m}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,f,h)=>{let m,x=!1,p=null,w=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,p=f.route.errorElement||WD,c&&(u<0&&h===0?(JD("route-fallback"),x=!0,w=null):u===h&&(x=!0,w=f.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),v=()=>{let b;return m?b=p:x?b=w:f.route.Component?b=y.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,y.createElement(YD,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(HD,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var HS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(HS||{}),Jd=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}(Jd||{});function GD(e){let t=y.useContext(ah);return t||tt(!1),t}function ZD(e){let t=y.useContext(US);return t||tt(!1),t}function qD(e){let t=y.useContext(Ws);return t||tt(!1),t}function YS(e){let t=qD(),n=t.matches[t.matches.length-1];return n.route.id||tt(!1),n.route.id}function XD(){var e;let t=y.useContext(VS),n=ZD(Jd.UseRouteError),r=YS(Jd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function QD(){let{router:e}=GD(HS.UseNavigateStable),t=YS(Jd.UseNavigateStable),n=y.useRef(!1);return BS(()=>{n.current=!0}),y.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Qd({fromRouteId:t},o)))},[e,t])}const Ow={};function JD(e,t,n){Ow[e]||(Ow[e]=!0)}function KS(e){let{to:t,replace:n,state:r,relative:s}=e;qa()||tt(!1);let{future:o,static:i}=y.useContext(Mo),{matches:a}=y.useContext(Ws),{pathname:c}=Ir(),u=Jn(),d=oh(t,sh(a,o.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function tv(e){return UD(e.context)}function eO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wt.Pop,navigator:o,static:i=!1,future:a}=e;qa()&&tt(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:o,static:i,future:Qd({v7_relativeSplatPath:!1},a)}),[c,a,o,i]);typeof r=="string"&&(r=Bs(r));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:x="default"}=r,p=y.useMemo(()=>{let w=Za(d,c);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:x},navigationType:s}},[c,d,f,h,m,x,s]);return p==null?null:y.createElement(Mo.Provider,{value:u},y.createElement(ev.Provider,{children:n,value:p}))}new Promise(()=>{});function tO(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 bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bc.apply(this,arguments)}function nO(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function rO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sO(e,t){return e.button===0&&(!t||t==="_self")&&!rO(e)}function fg(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function oO(e,t){let n=fg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const iO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],aO="6";try{window.__reactRouterVersion=aO}catch{}function lO(e,t){return vD({basename:void 0,future:bc({},void 0,{v7_prependBasename:!0}),history:VA({window:void 0}),hydrationData:cO(),routes:e,mapRouteProperties:tO,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize()}function cO(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=bc({},t,{errors:uO(t.errors)})),t}function uO(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Xy(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="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const dO=y.createContext({isTransitioning:!1}),fO=y.createContext(new Map),hO="startTransition",Iw=E1[hO],mO="flushSync",Mw=UA[mO];function pO(e){Iw?Iw(e):e()}function bl(e){Mw?Mw(e):e()}class gO{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function yO(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=y.useState(n.state),[i,a]=y.useState(),[c,u]=y.useState({isTransitioning:!1}),[d,f]=y.useState(),[h,m]=y.useState(),[x,p]=y.useState(),w=y.useRef(new Map),{v7_startTransition:g}=r||{},v=y.useCallback(R=>{g?pO(R):R()},[g]),b=y.useCallback((R,A)=>{let{deletedFetchers:O,unstable_flushSync:G,unstable_viewTransitionOpts:N}=A;O.forEach(S=>w.current.delete(S)),R.fetchers.forEach((S,U)=>{S.data!==void 0&&w.current.set(U,S.data)});let z=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||z){G?bl(()=>o(R)):v(()=>o(R));return}if(G){bl(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let S=n.window.document.startViewTransition(()=>{bl(()=>o(R))});S.finished.finally(()=>{bl(()=>{f(void 0),m(void 0),a(void 0),u({isTransitioning:!1})})}),bl(()=>m(S));return}h?(d&&d.resolve(),h.skipTransition(),p({state:R,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(R),u({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,h,d,w,v]);y.useLayoutEffect(()=>n.subscribe(b),[n,b]),y.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new gO)},[c]),y.useEffect(()=>{if(d&&i&&n.window){let R=i,A=d.promise,O=n.window.document.startViewTransition(async()=>{v(()=>o(R)),await A});O.finished.finally(()=>{f(void 0),m(void 0),a(void 0),u({isTransitioning:!1})}),m(O)}},[v,i,d,n.window]),y.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,h,s.location,i]),y.useEffect(()=>{!c.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),p(void 0))},[c.isTransitioning,x]),y.useEffect(()=>{},[]);let _=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:R=>n.navigate(R),push:(R,A,O)=>n.navigate(R,{state:A,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(R,A,O)=>n.navigate(R,{replace:!0,state:A,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",j=y.useMemo(()=>({router:n,navigator:_,static:!1,basename:C}),[n,_,C]),T=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(ah.Provider,{value:j},y.createElement(US.Provider,{value:s},y.createElement(fO.Provider,{value:w.current},y.createElement(dO.Provider,{value:c},y.createElement(eO,{basename:C,location:s.location,navigationType:s.historyAction,navigator:_,future:T},s.initialized||n.future.v7_partialHydration?y.createElement(vO,{routes:n.routes,future:n.future,state:s}):t))))),null)}const vO=y.memo(xO);function xO(e){let{routes:t,future:n,state:r}=e;return VD(t,void 0,r,n)}const wO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wn=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=t,h=nO(t,iO),{basename:m}=y.useContext(Mo),x,p=!1;if(typeof u=="string"&&bO.test(u)&&(x=u,wO))try{let b=new URL(window.location.href),_=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=Za(_.pathname,m);_.origin===b.origin&&C!=null?u=C+_.search+_.hash:p=!0}catch{}let w=zD(u,{relative:s}),g=_O(u,{replace:i,state:a,target:c,preventScrollReset:d,relative:s,unstable_viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||g(b)}return y.createElement("a",bc({},h,{href:x||w,onClick:p||o?r:v,ref:n,target:c}))});var Lw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Lw||(Lw={}));var zw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(zw||(zw={}));function _O(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=t===void 0?{}:t,c=Jn(),u=Ir(),d=WS(e,{relative:i});return y.useCallback(f=>{if(sO(f,n)){f.preventDefault();let h=r!==void 0?r:ui(u)===ui(d);c(e,{replace:h,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[u,c,d,r,s,n,e,o,i,a])}function SO(e){let t=y.useRef(fg(e)),n=y.useRef(!1),r=Ir(),s=y.useMemo(()=>oO(r.search,n.current?null:t.current),[r.search]),o=Jn(),i=y.useCallback((a,c)=>{const u=fg(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var kO={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const CO=Uf(kO);var jO=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Fw(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(CO[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var s=new RegExp(jO),o=null;(o=s.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),a=[i,""];i.indexOf("=")>-1&&(a=i.split("=")),t.attrs[a[0]]=a[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var EO=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,NO=/^\s*$/,TO=Object.create(null);function GS(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(GS,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var PO={parse:function(e,t){t||(t={}),t.components||(t.components=TO);var n,r=[],s=[],o=-1,i=!1;if(e.indexOf("<")!==0){var a=e.indexOf("<");r.push({type:"text",content:a===-1?e:e.substring(0,a)})}return e.replace(EO,function(c,u){if(i){if(c!=="</"+n.name+">")return;i=!1}var d,f=c.charAt(1)!=="/",h=c.startsWith("<!--"),m=u+c.length,x=e.charAt(m);if(h){var p=Fw(c);return o<0?(r.push(p),r):((d=s[o]).children.push(p),r)}if(f&&(o++,(n=Fw(c)).type==="tag"&&t.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!x||x==="<"||n.children.push({type:"text",content:e.slice(m,e.indexOf("<",m))}),o===0&&r.push(n),(d=s[o-1])&&d.children.push(n),s[o]=n),(!f||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:s[o]),!i&&x!=="<"&&x)){d=o===-1?r:s[o].children;var w=e.indexOf("<",m),g=e.slice(m,w===-1?void 0:w);NO.test(g)&&(g=" "),(w>-1&&o+d.length>=0||g!==" ")&&d.push({type:"text",content:g})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+GS("",n)},"")}};const yd=(...e)=>{console!=null&&console.warn&&(lr(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},$w={},ef=(...e)=>{lr(e[0])&&$w[e[0]]||(lr(e[0])&&($w[e[0]]=new Date),yd(...e))},ZS=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Uw=(e,t,n)=>{e.loadNamespaces(t,ZS(e,n))},Vw=(e,t,n,r)=>{lr(n)&&(n=[n]),n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,ZS(e,r))},RO=(e,t,n={})=>!t.languages||!t.languages.length?(ef("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{var o;if(((o=n.bindI18n)==null?void 0:o.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),lr=e=>typeof e=="string",ia=e=>typeof e=="object"&&e!==null,AO=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,DO={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},OO=e=>DO[e],IO=e=>e.replace(AO,OO);let hg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:IO};const MO=(e={})=>{hg={...hg,...e}},qS=()=>hg;let XS;const LO=e=>{XS=e},nv=()=>XS,Um=(e,t)=>{var r;if(!e)return!1;const n=((r=e.props)==null?void 0:r.children)??e.children;return t?n.length>0:!!n},Vm=e=>{var n,r;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(r=e.props)!=null&&r.i18nIsDynamicList?aa(t):t},zO=e=>Array.isArray(e)&&e.every(y.isValidElement),aa=e=>Array.isArray(e)?e:[e],FO=(e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n},QS=(e,t)=>{if(!e)return"";let n="";const r=aa(e),s=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,i)=>{if(lr(o))n+=`${o}`;else if(y.isValidElement(o)){const{props:a,type:c}=o,u=Object.keys(a).length,d=s.indexOf(c)>-1,f=a.children;if(!f&&d&&!u)n+=`<${c}/>`;else if(!f&&(!d||u)||a.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(d&&u===1&&lr(f))n+=`<${c}>${f}</${c}>`;else{const h=QS(f,t);n+=`<${i}>${h}</${i}>`}}else if(o===null)yd("Trans: the passed in value is invalid - seems you passed in a null child.");else if(ia(o)){const{format:a,...c}=o,u=Object.keys(c);if(u.length===1){const d=a?`${u[0]}, ${a}`:u[0];n+=`{{${d}}}`}else yd("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else yd("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),n},$O=(e,t,n,r,s,o)=>{if(t==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],a=t&&new RegExp(i.map(w=>`<${w}`).join("|")).test(t);if(!e&&!a&&!o)return[t];const c={},u=w=>{aa(w).forEach(v=>{lr(v)||(Um(v)?u(Vm(v)):ia(v)&&!y.isValidElement(v)&&Object.assign(c,v))})};u(e);const d=PO.parse(`<0>${t}</0>`),f={...c,...s},h=(w,g,v)=>{var C;const b=Vm(w),_=x(b,g.children,v);return zO(b)&&_.length===0||(C=w.props)!=null&&C.i18nIsDynamicList?b:_},m=(w,g,v,b,_)=>{w.dummy?(w.children=g,v.push(y.cloneElement(w,{key:b},_?void 0:g))):v.push(...y.Children.map([w],C=>{const j={...C.props};return delete j.i18nIsDynamicList,y.createElement(C.type,{...j,key:b,ref:C.ref},_?null:g)}))},x=(w,g,v)=>{const b=aa(w);return aa(g).reduce((C,j,T)=>{var A,O;const R=((O=(A=j.children)==null?void 0:A[0])==null?void 0:O.content)&&n.services.interpolator.interpolate(j.children[0].content,f,n.language);if(j.type==="tag"){let G=b[parseInt(j.name,10)];v.length===1&&!G&&(G=v[0][j.name]),G||(G={});const N=Object.keys(j.attrs).length!==0?FO({props:j.attrs},G):G,z=y.isValidElement(N),S=z&&Um(j,!0)&&!j.voidElement,U=a&&ia(N)&&N.dummy&&!z,J=ia(e)&&Object.hasOwnProperty.call(e,j.name);if(lr(N)){const F=n.services.interpolator.interpolate(N,f,n.language);C.push(F)}else if(Um(N)||S){const F=h(N,j,v);m(N,F,C,T)}else if(U){const F=x(b,j.children,v);m(N,F,C,T)}else if(Number.isNaN(parseFloat(j.name)))if(J){const F=h(N,j,v);m(N,F,C,T,j.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(j.name)>-1)if(j.voidElement)C.push(y.createElement(j.name,{key:`${j.name}-${T}`}));else{const F=x(b,j.children,v);C.push(y.createElement(j.name,{key:`${j.name}-${T}`},F))}else if(j.voidElement)C.push(`<${j.name} />`);else{const F=x(b,j.children,v);C.push(`<${j.name}>${F}</${j.name}>`)}else if(ia(N)&&!z){const F=j.children[0]?R:null;F&&C.push(F)}else m(N,R,C,T,j.children.length!==1||!R)}else if(j.type==="text"){const G=r.transWrapTextNodes,N=o?r.unescape(n.services.interpolator.interpolate(j.content,f,n.language)):n.services.interpolator.interpolate(j.content,f,n.language);G?C.push(y.createElement(G,{key:`${j.name}-${T}`},N)):C.push(N)}return C},[])},p=x([{dummy:!0,children:e||[]}],d,aa(e||[]));return Vm(p[0])};function UO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var G,N,z,S,U,J;const x=d||nv();if(!x)return ef("You will need to pass in an i18next instance by using i18nextReactModule"),e;const p=f||x.t.bind(x)||(F=>F),w={...qS(),...(G=x.options)==null?void 0:G.react};let g=u||p.ns||((N=x.options)==null?void 0:N.defaultNS);g=lr(g)?[g]:g||["translation"];const v=QS(e,w),b=a||v||w.transEmptyNodeValue||r,{hashTransKey:_}=w,C=r||(_?_(v||b):v||b);(S=(z=x.options)==null?void 0:z.interpolation)!=null&&S.defaultVariables&&(i=i&&Object.keys(i).length>0?{...i,...x.options.interpolation.defaultVariables}:{...x.options.interpolation.defaultVariables});const j=i||t!==void 0&&!((J=(U=x.options)==null?void 0:U.interpolation)!=null&&J.alwaysFormat)||!e?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},T={...o,context:s||o.context,count:t,...i,...j,defaultValue:b,ns:g},R=C?p(C,T):b;c&&Object.keys(c).forEach(F=>{const W=c[F];if(typeof W.type=="function"||!W.props||!W.props.children||R.indexOf(`${F}/>`)<0&&R.indexOf(`${F} />`)<0)return;function I(){return y.createElement(y.Fragment,null,W)}c[F]=y.createElement(I)});const A=$O(c||e,R,x,w,T,h),O=n??w.defaultTransParent;return O?y.createElement(O,m,A):A}const VO={type:"3rdParty",init(e){MO(e.options.react),LO(e)}},JS=y.createContext();class BO{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function WO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o={},values:i,defaults:a,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...m}){var v;const{i18n:x,defaultNS:p}=y.useContext(JS)||{},w=d||x||nv(),g=f||(w==null?void 0:w.t.bind(w));return UO({children:e,count:t,parent:n,i18nKey:r,context:s,tOptions:o,values:i,defaults:a,components:c,ns:u||(g==null?void 0:g.ns)||p||((v=w==null?void 0:w.options)==null?void 0:v.defaultNS),i18n:w,t:f,shouldUnescape:h,...m})}const HO=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},ek=(e,t,n,r)=>e.getFixedT(t,n,r),YO=(e,t,n,r)=>y.useCallback(ek(e,t,n,r),[e,t,n,r]),Ye=(e,t={})=>{var _,C,j,T;const{i18n:n}=t,{i18n:r,defaultNS:s}=y.useContext(JS)||{},o=n||r||nv();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new BO),!o){ef("You will need to pass in an i18next instance by using initReactI18next");const R=(O,G)=>lr(G)?G:ia(G)&&lr(G.defaultValue)?G.defaultValue:Array.isArray(O)?O[O.length-1]:O,A=[R,{},!1];return A.t=R,A.i18n={},A.ready=!1,A}(_=o.options.react)!=null&&_.wait&&ef("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...qS(),...o.options.react,...t},{useSuspense:a,keyPrefix:c}=i;let u=s||((C=o.options)==null?void 0:C.defaultNS);u=lr(u)?[u]:u||["translation"],(T=(j=o.reportNamespaces).addUsedNamespaces)==null||T.call(j,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(R=>RO(R,o,i)),f=YO(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),h=()=>f,m=()=>ek(o,t.lng||null,i.nsMode==="fallback"?u:u[0],c),[x,p]=y.useState(h);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const g=HO(w),v=y.useRef(!0);y.useEffect(()=>{const{bindI18n:R,bindI18nStore:A}=i;v.current=!0,!d&&!a&&(t.lng?Vw(o,t.lng,u,()=>{v.current&&p(m)}):Uw(o,u,()=>{v.current&&p(m)})),d&&g&&g!==w&&v.current&&p(m);const O=()=>{v.current&&p(m)};return R&&(o==null||o.on(R,O)),A&&(o==null||o.store.on(A,O)),()=>{v.current=!1,o&&(R==null||R.split(" ").forEach(G=>o.off(G,O))),A&&o&&A.split(" ").forEach(G=>o.store.off(G,O))}},[o,w]),y.useEffect(()=>{v.current&&d&&p(h)},[o,c,d]);const b=[x,o,d];if(b.t=x,b.i18n=o,b.ready=d,d||!d&&!a)return b;throw new Promise(R=>{t.lng?Vw(o,t.lng,u,()=>R()):Uw(o,u,()=>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 KO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tk=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).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 GO={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 ZO=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>y.createElement("svg",{ref:c,...GO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tk("lucide",s),...a},[...i.map(([u,d])=>y.createElement(u,d)),...Array.isArray(o)?o:[o]]));/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ut=(e,t)=>{const n=y.forwardRef(({className:r,...s},o)=>y.createElement(ZO,{ref:o,iconNode:t,className:tk(`lucide-${KO(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
* @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 qO=ut("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const XO=ut("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const QO=ut("CalendarX2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nk=ut("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 rv=ut("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 rk=ut("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 JO=ut("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 eI=ut("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 tI=ut("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 Bw=ut("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 sk=ut("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 mg=ut("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 nI=ut("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ww=ut("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hw=ut("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 Yw=ut("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rI=ut("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sI=ut("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 oI=ut("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
* @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 iI=ut("LoaderPinwheel",[["path",{d:"M2 12c0-2.8 2.2-5 5-5s5 2.2 5 5 2.2 5 5 5 5-2.2 5-5",key:"1cg5zf"}],["path",{d:"M7 20.7a1 1 0 1 1 5-8.7 1 1 0 1 0 5-8.6",key:"1gnrpi"}],["path",{d:"M7 3.3a1 1 0 1 1 5 8.6 1 1 0 1 0 5 8.6",key:"u9yy5q"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aI=ut("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lI=ut("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 cI=ut("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 di=ut("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 Kw=ut("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 uI=ut("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ok=ut("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 sv=ut("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @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 dI=ut("SquareSigma",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M16 8.9V7H8l4 5-4 5h8v-1.9",key:"9nih0i"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fI=ut("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 ov=ut("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @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 hI=ut("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
* @license lucide-react v0.417.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iv=ut("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function mI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function lh(...e){return t=>e.forEach(n=>mI(n,t))}function Ge(...e){return y.useCallback(lh(...e),e)}var es=y.forwardRef((e,t)=>{const{children:n,...r}=e,s=y.Children.toArray(n),o=s.find(pI);if(o){const i=o.props.children,a=s.map(c=>c===o?y.Children.count(i)>1?y.Children.only(null):y.isValidElement(i)?i.props.children:null:c);return l.jsx(pg,{...r,ref:t,children:y.isValidElement(i)?y.cloneElement(i,void 0,a):null})}return l.jsx(pg,{...r,ref:t,children:n})});es.displayName="Slot";var pg=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const s=yI(n);return y.cloneElement(n,{...gI(r,n.props),ref:t?lh(t,s):s})}return y.Children.count(n)>1?y.Children.only(null):null});pg.displayName="SlotClone";var av=({children:e})=>l.jsx(l.Fragment,{children:e});function pI(e){return y.isValidElement(e)&&e.type===av}function gI(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function yI(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ik(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ik(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function vI(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ik(e))&&(r&&(r+=" "),r+=t);return r}const Gw=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zw=vI,Jc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=o==null?void 0:o[u];if(d===null)return null;const h=Gw(d)||Gw(f);return s[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(x=>{let[p,w]=x;return Array.isArray(w)?w.includes({...o,...a}[p]):{...o,...a}[p]===w})?[...u,f,h]:u},[]);return Zw(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function ak(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=ak(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xI(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=ak(e))&&(r&&(r+=" "),r+=t);return r}const lv="-";function wI(e){const t=_I(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const a=i.split(lv);return a[0]===""&&a.length!==1&&a.shift(),lk(a,t)||bI(i)}function o(i,a){const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function lk(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?lk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(lv);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId}const qw=/^\[(.+)\]$/;function bI(e){if(qw.test(e)){const t=qw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function _I(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return kI(Object.entries(e.classGroups),n).forEach(([o,i])=>{gg(i,r,o,t)}),r}function gg(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Xw(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(SI(s)){gg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{gg(i,Xw(t,o),n,r)})})}function Xw(e,t){let n=e;return t.split(lv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function SI(e){return e.isThemeGetter}function kI(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e}function CI(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const ck="!";function jI(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length;function i(a){const c=[];let u=0,d=0,f;for(let w=0;w<a.length;w++){let g=a[w];if(u===0){if(g===s&&(r||a.slice(w,w+o)===t)){c.push(a.slice(d,w)),d=w+o;continue}if(g==="/"){f=w;continue}}g==="["?u++:g==="]"&&u--}const h=c.length===0?a:a.substring(d),m=h.startsWith(ck),x=m?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:p}}return n?function(c){return n({className:c,parseClassName:i})}:i}function EI(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function NI(e){return{cache:CI(e.cacheSize),parseClassName:jI(e),...wI(e)}}const TI=/\s+/;function PI(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(TI).map(i=>{const{modifiers:a,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(i);let f=!!d,h=r(f?u.substring(0,d):u);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:i};if(h=r(u),!h)return{isTailwindClass:!1,originalClassName:i};f=!1}const m=EI(a).join(":");return{isTailwindClass:!0,modifierId:c?m+ck:m,classGroupId:h,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:c,hasPostfixModifier:u}=i,d=a+c;return o.has(d)?!1:(o.add(d),s(c,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function RI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=uk(t))&&(r&&(r+=" "),r+=n);return r}function uk(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=uk(e[r]))&&(n&&(n+=" "),n+=t);return n}function AI(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((d,f)=>f(d),e());return n=NI(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=PI(c,n);return s(c,d),d}return function(){return o(RI.apply(null,arguments))}}function _t(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const dk=/^\[(?:([a-z-]+):)?(.+)\]$/i,DI=/^\d+\/\d+$/,OI=new Set(["px","full","screen"]),II=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MI=/\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$/,LI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function ps(e){return Zo(e)||OI.has(e)||DI.test(e)}function Js(e){return Xa(e,"length",KI)}function Zo(e){return!!e&&!Number.isNaN(Number(e))}function Bu(e){return Xa(e,"number",Zo)}function _l(e){return!!e&&Number.isInteger(Number(e))}function $I(e){return e.endsWith("%")&&Zo(e.slice(0,-1))}function Xe(e){return dk.test(e)}function eo(e){return II.test(e)}const UI=new Set(["length","size","percentage"]);function VI(e){return Xa(e,UI,fk)}function BI(e){return Xa(e,"position",fk)}const WI=new Set(["image","url"]);function HI(e){return Xa(e,WI,ZI)}function YI(e){return Xa(e,"",GI)}function Sl(){return!0}function Xa(e,t,n){const r=dk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function KI(e){return MI.test(e)&&!LI.test(e)}function fk(){return!1}function GI(e){return zI.test(e)}function ZI(e){return FI.test(e)}function qI(){const e=_t("colors"),t=_t("spacing"),n=_t("blur"),r=_t("brightness"),s=_t("borderColor"),o=_t("borderRadius"),i=_t("borderSpacing"),a=_t("borderWidth"),c=_t("contrast"),u=_t("grayscale"),d=_t("hueRotate"),f=_t("invert"),h=_t("gap"),m=_t("gradientColorStops"),x=_t("gradientColorStopPositions"),p=_t("inset"),w=_t("margin"),g=_t("opacity"),v=_t("padding"),b=_t("saturate"),_=_t("scale"),C=_t("sepia"),j=_t("skew"),T=_t("space"),R=_t("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto",Xe,t],N=()=>[Xe,t],z=()=>["",ps,Js],S=()=>["auto",Zo,Xe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],J=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Xe],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Zo,Bu],B=()=>[Zo,Xe];return{cacheSize:500,separator:":",theme:{colors:[Sl],spacing:[ps,Js],blur:["none","",eo,Xe],brightness:$(),borderColor:[e],borderRadius:["none","","full",eo,Xe],borderSpacing:N(),borderWidth:z(),contrast:$(),grayscale:I(),hueRotate:B(),invert:I(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[$I,Js],inset:G(),margin:G(),opacity:$(),padding:N(),saturate:$(),scale:$(),sepia:I(),skew:B(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Xe]}],container:["container"],columns:[{columns:[eo]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:[...U(),Xe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_l,Xe]}],basis:[{basis:G()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xe]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",_l,Xe]}],"grid-cols":[{"grid-cols":[Sl]}],"col-start-end":[{col:["auto",{span:["full",_l,Xe]},Xe]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Sl]}],"row-start-end":[{row:["auto",{span:[_l,Xe]},Xe]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xe,t]}],"min-w":[{"min-w":[Xe,t,"min","max","fit"]}],"max-w":[{"max-w":[Xe,t,"none","full","min","max","fit","prose",{screen:[eo]},eo]}],h:[{h:[Xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",eo,Js]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bu]}],"font-family":[{font:[Sl]}],"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",Xe]}],"line-clamp":[{"line-clamp":["none",Zo,Bu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ps,Xe]}],"list-image":[{"list-image":["none",Xe]}],"list-style-type":[{list:["none","disc","decimal",Xe]}],"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:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ps,Js]}],"underline-offset":[{"underline-offset":["auto",ps,Xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xe]}],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",Xe]}],"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:[...U(),BI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",VI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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:[...J(),"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:J()}],"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:["",...J()]}],"outline-offset":[{"outline-offset":[ps,Xe]}],"outline-w":[{outline:[ps,Js]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[ps,Js]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",eo,YI]}],"shadow-color":[{shadow:[Sl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",eo,Xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"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",Xe]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Xe]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[_l,Xe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xe]}],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",Xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ps,Js,Bu]}],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 XI=AI(qI);function re(...e){return XI(xI(e))}const ch=Jc("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"}}),Me=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?es:"button";return l.jsx(i,{className:re(ch({variant:t,size:n,className:e})),ref:o,...s})});Me.displayName="Button";function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function QI(e,t){const n=y.createContext(t);function r(o){const{children:i,...a}=o,c=y.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:i})}function s(o){const i=y.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function on(e,t=[]){let n=[];function r(o,i){const a=y.createContext(i),c=n.length;n=[...n,i];function u(f){const{scope:h,children:m,...x}=f,p=(h==null?void 0:h[e][c])||a,w=y.useMemo(()=>x,Object.values(x));return l.jsx(p.Provider,{value:w,children:m})}function d(f,h){const m=(h==null?void 0:h[e][c])||a,x=y.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const s=()=>{const o=n.map(i=>y.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,JI(s,...t)]}function JI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const f=c(o)[`__scope${u}`];return{...a,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ot(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Gn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=eM({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,a=Ot(n),c=y.useCallback(u=>{if(o){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[o,e,s,a]);return[i,c]}function eM({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,s=y.useRef(r),o=Ot(t);return y.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var tM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Pe=tM.reduce((e,t)=>{const n=y.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?es:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cv(e,t){e&&Vs.flushSync(()=>e.dispatchEvent(t))}function eu(e){const t=e+"CollectionProvider",[n,r]=on(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:x,children:p}=m,w=We.useRef(null),g=We.useRef(new Map).current;return l.jsx(s,{scope:x,itemMap:g,collectionRef:w,children:p})};i.displayName=t;const a=e+"CollectionSlot",c=We.forwardRef((m,x)=>{const{scope:p,children:w}=m,g=o(a,p),v=Ge(x,g.collectionRef);return l.jsx(es,{ref:v,children:w})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=We.forwardRef((m,x)=>{const{scope:p,children:w,...g}=m,v=We.useRef(null),b=Ge(x,v),_=o(u,p);return We.useEffect(()=>(_.itemMap.set(v,{ref:v,...g}),()=>void _.itemMap.delete(v))),l.jsx(es,{[d]:"",ref:b,children:w})});f.displayName=u;function h(m){const x=o(e+"CollectionConsumer",m);return We.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const g=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,C)=>g.indexOf(_.ref.current)-g.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},h,r]}var nM=y.createContext(void 0);function Si(e){const t=y.useContext(nM);return e||t||"ltr"}function rM(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e);y.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var sM="DismissableLayer",yg="dismissableLayer.update",oM="dismissableLayer.pointerDownOutside",iM="dismissableLayer.focusOutside",Qw,hk=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qa=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,u=y.useContext(hk),[d,f]=y.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=y.useState({}),x=Ge(t,T=>f(T)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(w),v=d?p.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=g,C=lM(T=>{const R=T.target,A=[...u.branches].some(O=>O.contains(R));!_||A||(s==null||s(T),i==null||i(T),T.defaultPrevented||a==null||a())},h),j=cM(T=>{const R=T.target;[...u.branches].some(O=>O.contains(R))||(o==null||o(T),i==null||i(T),T.defaultPrevented||a==null||a())},h);return rM(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),y.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qw=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Jw(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Qw)}},[d,h,n,u]),y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Jw())},[d,u]),y.useEffect(()=>{const T=()=>m({});return document.addEventListener(yg,T),()=>document.removeEventListener(yg,T)},[]),l.jsx(Pe.div,{...c,ref:x,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,C.onPointerDownCapture)})});Qa.displayName=sM;var aM="DismissableLayerBranch",mk=y.forwardRef((e,t)=>{const n=y.useContext(hk),r=y.useRef(null),s=Ge(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),l.jsx(Pe.div,{...e,ref:s})});mk.displayName=aM;function lM(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){pk(oM,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cM(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),r=y.useRef(!1);return y.useEffect(()=>{const s=o=>{o.target&&!r.current&&pk(iM,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Jw(){const e=new CustomEvent(yg);document.dispatchEvent(e)}function pk(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?cv(s,o):s.dispatchEvent(o)}var uM=Qa,dM=mk,Bm=0;function uv(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eb()),document.body.insertAdjacentElement("beforeend",e[1]??eb()),Bm++,()=>{Bm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bm--}},[])}function eb(){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 Wm="focusScope.autoFocusOnMount",Hm="focusScope.autoFocusOnUnmount",tb={bubbles:!1,cancelable:!0},fM="FocusScope",uh=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=y.useState(null),u=Ot(s),d=Ot(o),f=y.useRef(null),h=Ge(t,p=>c(p)),m=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let p=function(b){if(m.paused||!a)return;const _=b.target;a.contains(_)?f.current=_:no(f.current,{select:!0})},w=function(b){if(m.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||no(f.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&no(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,m.paused]),y.useEffect(()=>{if(a){rb.add(m);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(Wm,tb);a.addEventListener(Wm,u),a.dispatchEvent(g),g.defaultPrevented||(hM(vM(gk(a)),{select:!0}),document.activeElement===p&&no(a))}return()=>{a.removeEventListener(Wm,u),setTimeout(()=>{const g=new CustomEvent(Hm,tb);a.addEventListener(Hm,d),a.dispatchEvent(g),g.defaultPrevented||no(p??document.body,{select:!0}),a.removeEventListener(Hm,d),rb.remove(m)},0)}}},[a,u,d,m]);const x=y.useCallback(p=>{if(!n&&!r||m.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(w&&g){const v=p.currentTarget,[b,_]=mM(v);b&&_?!p.shiftKey&&g===_?(p.preventDefault(),n&&no(b,{select:!0})):p.shiftKey&&g===b&&(p.preventDefault(),n&&no(_,{select:!0})):g===v&&p.preventDefault()}},[n,r,m.paused]);return l.jsx(Pe.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});uh.displayName=fM;function hM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(no(r,{select:t}),document.activeElement!==n)return}function mM(e){const t=gk(e),n=nb(t,e),r=nb(t.reverse(),e);return[n,r]}function gk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function nb(e,t){for(const n of e)if(!pM(n,{upTo:t}))return n}function pM(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 gM(e){return e instanceof HTMLInputElement&&"select"in e}function no(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gM(e)&&t&&e.select()}}var rb=yM();function yM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sb(e,t),e.unshift(t)},remove(t){var n;e=sb(e,t),(n=e[0])==null||n.resume()}}}function sb(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function vM(e){return e.filter(t=>t.tagName!=="A")}var en=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},xM=E1.useId||(()=>{}),wM=0;function Bn(e){const[t,n]=y.useState(xM());return en(()=>{n(r=>r??String(wM++))},[e]),t?`radix-${t}`:""}const bM=["top","right","bottom","left"],Kr=Math.min,$n=Math.max,tf=Math.round,Wu=Math.floor,Co=e=>({x:e,y:e}),_M={left:"right",right:"left",bottom:"top",top:"bottom"},SM={start:"end",end:"start"};function vg(e,t,n){return $n(e,Kr(t,n))}function Ms(e,t){return typeof e=="function"?e(t):e}function Ls(e){return e.split("-")[0]}function Ja(e){return e.split("-")[1]}function dv(e){return e==="x"?"y":"x"}function fv(e){return e==="y"?"height":"width"}function jo(e){return["top","bottom"].includes(Ls(e))?"y":"x"}function hv(e){return dv(jo(e))}function kM(e,t,n){n===void 0&&(n=!1);const r=Ja(e),s=hv(e),o=fv(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nf(i)),[i,nf(i)]}function CM(e){const t=nf(e);return[xg(e),t,xg(t)]}function xg(e){return e.replace(/start|end/g,t=>SM[t])}function jM(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:i;default:return[]}}function EM(e,t,n,r){const s=Ja(e);let o=jM(Ls(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(xg)))),o}function nf(e){return e.replace(/left|right|bottom|top/g,t=>_M[t])}function NM(e){return{top:0,right:0,bottom:0,left:0,...e}}function yk(e){return typeof e!="number"?NM(e):{top:e,right:e,bottom:e,left:e}}function rf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ob(e,t,n){let{reference:r,floating:s}=e;const o=jo(t),i=hv(t),a=fv(i),c=Ls(t),u=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Ja(t)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}const TM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=ob(u,r,c),h=r,m={},x=0;for(let p=0;p<a.length;p++){const{name:w,fn:g}=a[p],{x:v,y:b,data:_,reset:C}=await g({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});d=v??d,f=b??f,m={...m,[w]:{...m[w],..._}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:d,y:f}=ob(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:m}};async function _c(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Ms(t,e),x=yk(m),w=a[h?f==="floating"?"reference":"floating":f],g=rf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},C=rf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:c}):v);return{top:(g.top-C.top+x.top)/_.y,bottom:(C.bottom-g.bottom+x.bottom)/_.y,left:(g.left-C.left+x.left)/_.x,right:(C.right-g.right+x.right)/_.x}}const PM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=Ms(e,t)||{};if(u==null)return{};const f=yk(d),h={x:n,y:r},m=hv(s),x=fv(m),p=await i.getDimensions(u),w=m==="y",g=w?"top":"left",v=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[m]-h[m]-o.floating[x],C=h[m]-o.reference[m],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[b]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=a.floating[b]||o.floating[x]);const R=_/2-C/2,A=T/2-p[x]/2-1,O=Kr(f[g],A),G=Kr(f[v],A),N=O,z=T-p[x]-G,S=T/2-p[x]/2+R,U=vg(N,S,z),J=!c.arrow&&Ja(s)!=null&&S!==U&&o.reference[x]/2-(S<N?O:G)-p[x]/2<0,F=J?S<N?S-N:S-z:0;return{[m]:h[m]+F,data:{[m]:U,centerOffset:S-U-F,...J&&{alignmentOffset:F}},reset:J}}}),RM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:p=!0,...w}=Ms(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Ls(s),v=jo(a),b=Ls(a)===a,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(b||!p?[nf(a)]:CM(a)),j=x!=="none";!h&&j&&C.push(...EM(a,p,x,_));const T=[a,...C],R=await _c(t,w),A=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&A.push(R[g]),f){const S=kM(s,i,_);A.push(R[S[0]],R[S[1]])}if(O=[...O,{placement:s,overflows:A}],!A.every(S=>S<=0)){var G,N;const S=(((G=o.flip)==null?void 0:G.index)||0)+1,U=T[S];if(U)return{data:{index:S,overflows:O},reset:{placement:U}};let J=(N=O.filter(F=>F.overflows[0]<=0).sort((F,W)=>F.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!J)switch(m){case"bestFit":{var z;const F=(z=O.filter(W=>{if(j){const I=jo(W.placement);return I===v||I==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(I=>I>0).reduce((I,X)=>I+X,0)]).sort((W,I)=>W[1]-I[1])[0])==null?void 0:z[0];F&&(J=F);break}case"initialPlacement":J=a;break}if(s!==J)return{reset:{placement:J}}}return{}}}};function ib(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ab(e){return bM.some(t=>e[t]>=0)}const AM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ms(e,t);switch(r){case"referenceHidden":{const o=await _c(t,{...s,elementContext:"reference"}),i=ib(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ab(i)}}}case"escaped":{const o=await _c(t,{...s,altBoundary:!0}),i=ib(o,n.floating);return{data:{escapedOffsets:i,escaped:ab(i)}}}default:return{}}}}};async function DM(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Ls(n),a=Ja(n),c=jo(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&c?-1:1,f=Ms(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof x=="number"&&(m=a==="end"?x*-1:x),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const OM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await DM(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},IM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:g,y:v}=w;return{x:g,y:v}}},...c}=Ms(e,t),u={x:n,y:r},d=await _c(t,c),f=jo(Ls(s)),h=dv(f);let m=u[h],x=u[f];if(o){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",v=m+d[w],b=m-d[g];m=vg(v,m,b)}if(i){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=x+d[w],b=x-d[g];x=vg(v,x,b)}const p=a.fn({...t,[h]:m,[f]:x});return{...p,data:{x:p.x-n,y:p.y-r}}}}},MM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Ms(e,t),d={x:n,y:r},f=jo(s),h=dv(f);let m=d[h],x=d[f];const p=Ms(a,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=h==="y"?"height":"width",_=o.reference[h]-o.floating[b]+w.mainAxis,C=o.reference[h]+o.reference[b]-w.mainAxis;m<_?m=_:m>C&&(m=C)}if(u){var g,v;const b=h==="y"?"width":"height",_=["top","left"].includes(Ls(s)),C=o.reference[f]-o.floating[b]+(_&&((g=i.offset)==null?void 0:g[f])||0)+(_?0:w.crossAxis),j=o.reference[f]+o.reference[b]+(_?0:((v=i.offset)==null?void 0:v[f])||0)-(_?w.crossAxis:0);x<C?x=C:x>j&&(x=j)}return{[h]:m,[f]:x}}}},LM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:o}=t,{apply:i=()=>{},...a}=Ms(e,t),c=await _c(t,a),u=Ls(n),d=Ja(n),f=jo(n)==="y",{width:h,height:m}=r.floating;let x,p;u==="top"||u==="bottom"?(x=u,p=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(p=u,x=d==="end"?"top":"bottom");const w=m-c.top-c.bottom,g=h-c.left-c.right,v=Kr(m-c[x],w),b=Kr(h-c[p],g),_=!t.middlewareData.shift;let C=v,j=b;if(f?j=d||_?Kr(b,g):g:C=d||_?Kr(v,w):w,_&&!d){const R=$n(c.left,0),A=$n(c.right,0),O=$n(c.top,0),G=$n(c.bottom,0);f?j=h-2*(R!==0||A!==0?R+A:$n(c.left,c.right)):C=m-2*(O!==0||G!==0?O+G:$n(c.top,c.bottom))}await i({...t,availableWidth:j,availableHeight:C});const T=await s.getDimensions(o.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function el(e){return vk(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){var t;return(t=(vk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vk(e){return e instanceof Node||e instanceof Wn(e).Node}function Pr(e){return e instanceof Element||e instanceof Wn(e).Element}function ts(e){return e instanceof HTMLElement||e instanceof Wn(e).HTMLElement}function lb(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function tu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function zM(e){return["table","td","th"].includes(el(e))}function dh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function mv(e){const t=pv(),n=Pr(e)?Rr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FM(e){let t=Eo(e);for(;ts(t)&&!Da(t);){if(mv(t))return t;if(dh(t))return null;t=Eo(t)}return null}function pv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Da(e){return["html","body","#document"].includes(el(e))}function Rr(e){return Wn(e).getComputedStyle(e)}function fh(e){return Pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Eo(e){if(el(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lb(e)&&e.host||Hs(e);return lb(t)?t.host:t}function xk(e){const t=Eo(e);return Da(t)?e.ownerDocument?e.ownerDocument.body:e.body:ts(t)&&tu(t)?t:xk(t)}function Sc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=xk(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Wn(s);return o?t.concat(i,i.visualViewport||[],tu(s)?s:[],i.frameElement&&n?Sc(i.frameElement):[]):t.concat(s,Sc(s,[],n))}function wk(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ts(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=tf(n)!==o||tf(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function gv(e){return Pr(e)?e:e.contextElement}function va(e){const t=gv(e);if(!ts(t))return Co(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=wk(t);let i=(o?tf(n.width):n.width)/r,a=(o?tf(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const $M=Co(0);function bk(e){const t=Wn(e);return!pv()||!t.visualViewport?$M:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wn(e)?!1:t}function fi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=gv(e);let i=Co(1);t&&(r?Pr(r)&&(i=va(r)):i=va(e));const a=UM(o,n,r)?bk(o):Co(0);let c=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const h=Wn(o),m=r&&Pr(r)?Wn(r):r;let x=h,p=x.frameElement;for(;p&&r&&m!==x;){const w=va(p),g=p.getBoundingClientRect(),v=Rr(p),b=g.left+(p.clientLeft+parseFloat(v.paddingLeft))*w.x,_=g.top+(p.clientTop+parseFloat(v.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,f*=w.y,c+=b,u+=_,x=Wn(p),p=x.frameElement}}return rf({width:d,height:f,x:c,y:u})}function VM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Hs(r),a=t?dh(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=Co(1);const d=Co(0),f=ts(r);if((f||!f&&!o)&&((el(r)!=="body"||tu(i))&&(c=fh(r)),ts(r))){const h=fi(r);u=va(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function BM(e){return Array.from(e.getClientRects())}function _k(e){return fi(Hs(e)).left+fh(e).scrollLeft}function WM(e){const t=Hs(e),n=fh(e),r=e.ownerDocument.body,s=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+_k(e);const a=-n.scrollTop;return Rr(r).direction==="rtl"&&(i+=$n(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function HM(e,t){const n=Wn(e),r=Hs(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const u=pv();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}function YM(e,t){const n=fi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=ts(e)?va(e):Co(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,u=r*o.y;return{width:i,height:a,x:c,y:u}}function cb(e,t,n){let r;if(t==="viewport")r=HM(e,n);else if(t==="document")r=WM(Hs(e));else if(Pr(t))r=YM(t,n);else{const s=bk(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return rf(r)}function Sk(e,t){const n=Eo(e);return n===t||!Pr(n)||Da(n)?!1:Rr(n).position==="fixed"||Sk(n,t)}function KM(e,t){const n=t.get(e);if(n)return n;let r=Sc(e,[],!1).filter(a=>Pr(a)&&el(a)!=="body"),s=null;const o=Rr(e).position==="fixed";let i=o?Eo(e):e;for(;Pr(i)&&!Da(i);){const a=Rr(i),c=mv(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||tu(i)&&!c&&Sk(e,i))?r=r.filter(d=>d!==i):s=a,i=Eo(i)}return t.set(e,r),r}function GM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?dh(t)?[]:KM(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((u,d)=>{const f=cb(t,d,s);return u.top=$n(f.top,u.top),u.right=Kr(f.right,u.right),u.bottom=Kr(f.bottom,u.bottom),u.left=$n(f.left,u.left),u},cb(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ZM(e){const{width:t,height:n}=wk(e);return{width:t,height:n}}function qM(e,t,n){const r=ts(t),s=Hs(t),o=n==="fixed",i=fi(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=Co(0);if(r||!r&&!o)if((el(t)!=="body"||tu(s))&&(a=fh(t)),r){const f=fi(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=_k(s));const u=i.left+a.scrollLeft-c.x,d=i.top+a.scrollTop-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Ym(e){return Rr(e).position==="static"}function ub(e,t){return!ts(e)||Rr(e).position==="fixed"?null:t?t(e):e.offsetParent}function kk(e,t){const n=Wn(e);if(dh(e))return n;if(!ts(e)){let s=Eo(e);for(;s&&!Da(s);){if(Pr(s)&&!Ym(s))return s;s=Eo(s)}return n}let r=ub(e,t);for(;r&&zM(r)&&Ym(r);)r=ub(r,t);return r&&Da(r)&&Ym(r)&&!mv(r)?n:r||FM(e)||n}const XM=async function(e){const t=this.getOffsetParent||kk,n=this.getDimensions,r=await n(e.floating);return{reference:qM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QM(e){return Rr(e).direction==="rtl"}const JM={convertOffsetParentRelativeRectToViewportRelativeRect:VM,getDocumentElement:Hs,getClippingRect:GM,getOffsetParent:kk,getElementRects:XM,getClientRects:BM,getDimensions:ZM,getScale:va,isElement:Pr,isRTL:QM};function eL(e,t){let n=null,r;const s=Hs(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=Wu(d),x=Wu(s.clientWidth-(u+f)),p=Wu(s.clientHeight-(d+h)),w=Wu(u),v={rootMargin:-m+"px "+-x+"px "+-p+"px "+-w+"px",threshold:$n(0,Kr(1,c))||1};let b=!0;function _(C){const j=C[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return i(!0),o}function tL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=gv(e),d=s||o?[...u?Sc(u):[],...Sc(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=u&&a?eL(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let x,p=c?fi(e):null;c&&w();function w(){const g=fi(e);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&n(),p=g,x=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(v=>{s&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),f==null||f(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(x)}}const nL=OM,rL=IM,sL=RM,oL=LM,iL=AM,db=PM,aL=MM,lL=(e,t,n)=>{const r=new Map,s={platform:JM,...n},o={...s.platform,_c:r};return TM(e,t,{...s,platform:o})};var vd=typeof document<"u"?y.useLayoutEffect:y.useEffect;function sf(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 n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!sf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ck(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fb(e,t){const n=Ck(e);return Math.round(t*n)/n}function hb(e){const t=y.useRef(e);return vd(()=>{t.current=e}),t}function cL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=y.useState(r);sf(h,r)||m(r);const[x,p]=y.useState(null),[w,g]=y.useState(null),v=y.useCallback(F=>{F!==j.current&&(j.current=F,p(F))},[]),b=y.useCallback(F=>{F!==T.current&&(T.current=F,g(F))},[]),_=o||x,C=i||w,j=y.useRef(null),T=y.useRef(null),R=y.useRef(d),A=c!=null,O=hb(c),G=hb(s),N=y.useCallback(()=>{if(!j.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};G.current&&(F.platform=G.current),lL(j.current,T.current,F).then(W=>{const I={...W,isPositioned:!0};z.current&&!sf(R.current,I)&&(R.current=I,Vs.flushSync(()=>{f(I)}))})},[h,t,n,G]);vd(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(F=>({...F,isPositioned:!1})))},[u]);const z=y.useRef(!1);vd(()=>(z.current=!0,()=>{z.current=!1}),[]),vd(()=>{if(_&&(j.current=_),C&&(T.current=C),_&&C){if(O.current)return O.current(_,C,N);N()}},[_,C,N,O,A]);const S=y.useMemo(()=>({reference:j,floating:T,setReference:v,setFloating:b}),[v,b]),U=y.useMemo(()=>({reference:_,floating:C}),[_,C]),J=y.useMemo(()=>{const F={position:n,left:0,top:0};if(!U.floating)return F;const W=fb(U.floating,d.x),I=fb(U.floating,d.y);return a?{...F,transform:"translate("+W+"px, "+I+"px)",...Ck(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,a,U.floating,d.x,d.y]);return y.useMemo(()=>({...d,update:N,refs:S,elements:U,floatingStyles:J}),[d,N,S,U,J])}const uL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?db({element:r.current,padding:s}).fn(n):{}:r?db({element:r,padding:s}).fn(n):{}}}},dL=(e,t)=>({...nL(e),options:[e,t]}),fL=(e,t)=>({...rL(e),options:[e,t]}),hL=(e,t)=>({...aL(e),options:[e,t]}),mL=(e,t)=>({...sL(e),options:[e,t]}),pL=(e,t)=>({...oL(e),options:[e,t]}),gL=(e,t)=>({...iL(e),options:[e,t]}),yL=(e,t)=>({...uL(e),options:[e,t]});var vL="Arrow",jk=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return l.jsx(Pe.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});jk.displayName=vL;var xL=jk;function yv(e){const[t,n]=y.useState(void 0);return en(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var vv="Popper",[Ek,tl]=on(vv),[wL,Nk]=Ek(vv),Tk=e=>{const{__scopePopper:t,children:n}=e,[r,s]=y.useState(null);return l.jsx(wL,{scope:t,anchor:r,onAnchorChange:s,children:n})};Tk.displayName=vv;var Pk="PopperAnchor",Rk=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=Nk(Pk,n),i=y.useRef(null),a=Ge(t,i);return y.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:l.jsx(Pe.div,{...s,ref:a})});Rk.displayName=Pk;var xv="PopperContent",[bL,_L]=Ek(xv),Ak=y.forwardRef((e,t)=>{var me,we,Te,Fe,Ie,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:x,...p}=e,w=Nk(xv,n),[g,v]=y.useState(null),b=Ge(t,st=>v(st)),[_,C]=y.useState(null),j=yv(_),T=(j==null?void 0:j.width)??0,R=(j==null?void 0:j.height)??0,A=r+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(u)?u:[u],N=G.length>0,z={padding:O,boundary:G.filter(kL),altBoundary:N},{refs:S,floatingStyles:U,placement:J,isPositioned:F,middlewareData:W}=cL({strategy:"fixed",placement:A,whileElementsMounted:(...st)=>tL(...st,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[dL({mainAxis:s+R,alignmentAxis:i}),c&&fL({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?hL():void 0,...z}),c&&mL({...z}),pL({...z,apply:({elements:st,rects:E,availableWidth:ee,availableHeight:Z})=>{const{width:D,height:k}=E.reference,P=st.floating.style;P.setProperty("--radix-popper-available-width",`${ee}px`),P.setProperty("--radix-popper-available-height",`${Z}px`),P.setProperty("--radix-popper-anchor-width",`${D}px`),P.setProperty("--radix-popper-anchor-height",`${k}px`)}}),_&&yL({element:_,padding:a}),CL({arrowWidth:T,arrowHeight:R}),h&&gL({strategy:"referenceHidden",...z})]}),[I,X]=Ik(J),$=Ot(x);en(()=>{F&&($==null||$())},[F,$]);const B=(me=W.arrow)==null?void 0:me.x,he=(we=W.arrow)==null?void 0:we.y,se=((Te=W.arrow)==null?void 0:Te.centerOffset)!==0,[oe,Oe]=y.useState();return en(()=>{g&&Oe(window.getComputedStyle(g).zIndex)},[g]),l.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:F?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Fe=W.transformOrigin)==null?void 0:Fe.x,(Ie=W.transformOrigin)==null?void 0:Ie.y].join(" "),...((Re=W.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(bL,{scope:n,placedSide:I,onArrowChange:C,arrowX:B,arrowY:he,shouldHideArrow:se,children:l.jsx(Pe.div,{"data-side":I,"data-align":X,...p,ref:b,style:{...p.style,animation:F?void 0:"none"}})})})});Ak.displayName=xv;var Dk="PopperArrow",SL={top:"bottom",right:"left",bottom:"top",left:"right"},Ok=y.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=_L(Dk,r),i=SL[o.placedSide];return l.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:l.jsx(xL,{...s,ref:n,style:{...s.style,display:"block"}})})});Ok.displayName=Dk;function kL(e){return e!==null}var CL=e=>({name:"transformOrigin",options:e,fn(t){var w,g,v;const{placement:n,rects:r,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=Ik(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let x="",p="";return u==="bottom"?(x=i?f:`${h}px`,p=`${-c}px`):u==="top"?(x=i?f:`${h}px`,p=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,p=i?f:`${m}px`):u==="left"&&(x=`${r.floating.width+c}px`,p=i?f:`${m}px`),{data:{x,y:p}}}});function Ik(e){const[t,n="center"]=e.split("-");return[t,n]}var wv=Tk,bv=Rk,_v=Ak,Sv=Ok,jL="Portal",nu=y.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=y.useState(!1);en(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?PS.createPortal(l.jsx(Pe.div,{...r,ref:t}),i):null});nu.displayName=jL;function EL(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var an=e=>{const{present:t,children:n}=e,r=NL(t),s=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Ge(r.ref,TL(s));return typeof n=="function"||r.isPresent?y.cloneElement(s,{ref:o}):null};an.displayName="Presence";function NL(e){const[t,n]=y.useState(),r=y.useRef({}),s=y.useRef(e),o=y.useRef("none"),i=e?"mounted":"unmounted",[a,c]=EL(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Hu(r.current);o.current=a==="mounted"?u:"none"},[a]),en(()=>{const u=r.current,d=s.current;if(d!==e){const h=o.current,m=Hu(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),en(()=>{if(t){const u=f=>{const m=Hu(r.current).includes(f.animationName);f.target===t&&m&&Vs.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(o.current=Hu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Hu(e){return(e==null?void 0:e.animationName)||"none"}function TL(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Km="rovingFocusGroup.onEntryFocus",PL={bubbles:!1,cancelable:!0},hh="RovingFocusGroup",[wg,Mk,RL]=eu(hh),[AL,nl]=on(hh,[RL]),[DL,OL]=AL(hh),Lk=y.forwardRef((e,t)=>l.jsx(wg.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(wg.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(IL,{...e,ref:t})})}));Lk.displayName=hh;var IL=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=y.useRef(null),m=Ge(t,h),x=Si(o),[p=null,w]=Gn({prop:i,defaultProp:a,onChange:c}),[g,v]=y.useState(!1),b=Ot(u),_=Mk(n),C=y.useRef(!1),[j,T]=y.useState(0);return y.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(Km,b),()=>R.removeEventListener(Km,b)},[b]),l.jsx(DL,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:p,onItemFocus:y.useCallback(R=>w(R),[w]),onItemShiftTab:y.useCallback(()=>v(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:y.useCallback(()=>T(R=>R-1),[]),children:l.jsx(Pe.div,{tabIndex:g||j===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{C.current=!0}),onFocus:ue(e.onFocus,R=>{const A=!C.current;if(R.target===R.currentTarget&&A&&!g){const O=new CustomEvent(Km,PL);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const G=_().filter(J=>J.focusable),N=G.find(J=>J.active),z=G.find(J=>J.id===p),U=[N,z,...G].filter(Boolean).map(J=>J.ref.current);$k(U,d)}}C.current=!1}),onBlur:ue(e.onBlur,()=>v(!1))})})}),zk="RovingFocusGroupItem",Fk=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,a=Bn(),c=o||a,u=OL(zk,n),d=u.currentTabStopId===c,f=Mk(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return y.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),l.jsx(wg.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:l.jsx(Pe.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:ue(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ue(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const p=zL(x,u.orientation,u.dir);if(p!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let g=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const v=g.indexOf(x.currentTarget);g=u.loop?FL(g,v+1):g.slice(v+1)}setTimeout(()=>$k(g))}})})})});Fk.displayName=zk;var ML={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function LL(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zL(e,t,n){const r=LL(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ML[r]}function $k(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kv=Lk,Cv=Fk,$L=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zi=new WeakMap,Yu=new WeakMap,Ku={},Gm=0,Uk=function(e){return e&&(e.host||Uk(e.parentNode))},UL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Uk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},VL=function(e,t,n,r){var s=UL(t,Array.isArray(e)?e:[e]);Ku[n]||(Ku[n]=new WeakMap);var o=Ku[n],i=[],a=new Set,c=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),x=m!==null&&m!=="false",p=(zi.get(h)||0)+1,w=(o.get(h)||0)+1;zi.set(h,p),o.set(h,w),i.push(h),p===1&&x&&Yu.set(h,!0),w===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return d(t),a.clear(),Gm++,function(){i.forEach(function(f){var h=zi.get(f)-1,m=o.get(f)-1;zi.set(f,h),o.set(f,m),h||(Yu.has(f)||f.removeAttribute(r),Yu.delete(f)),m||f.removeAttribute(n)}),Gm--,Gm||(zi=new WeakMap,zi=new WeakMap,Yu=new WeakMap,Ku={})}},jv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=$L(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),VL(r,s,n,"aria-hidden")):function(){return null}},Wr=function(){return Wr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Wr.apply(this,arguments)};function Vk(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function BL(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var xd="right-scroll-bar-position",wd="width-before-scroll-bar",WL="with-scroll-bars-hidden",HL="--removed-body-scroll-bar-size";function Zm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function YL(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var KL=typeof window<"u"?y.useLayoutEffect:y.useEffect,mb=new WeakMap;function GL(e,t){var n=YL(null,function(r){return e.forEach(function(s){return Zm(s,r)})});return KL(function(){var r=mb.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||Zm(a,null)}),o.forEach(function(a){s.has(a)||Zm(a,i)})}mb.set(n,e)},[e]),n}function ZL(e){return e}function qL(e,t){t===void 0&&(t=ZL);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return s}function XL(e){e===void 0&&(e={});var t=qL(null);return t.options=Wr({async:!0,ssr:!1},e),t}var Bk=function(e){var t=e.sideCar,n=Vk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Wr({},n))};Bk.isSideCarExport=!0;function QL(e,t){return e.useMedium(t),Bk}var Wk=XL(),qm=function(){},mh=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:qm,onWheelCapture:qm,onTouchMoveCapture:qm}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noIsolation,x=e.inert,p=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,v=e.gapMode,b=Vk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,C=GL([n,t]),j=Wr(Wr({},b),s);return y.createElement(y.Fragment,null,d&&y.createElement(_,{sideCar:Wk,removeScrollBar:u,shards:f,noIsolation:m,inert:x,setCallbacks:o,allowPinchZoom:!!p,lockRef:n,gapMode:v}),i?y.cloneElement(y.Children.only(a),Wr(Wr({},j),{ref:C})):y.createElement(g,Wr({},j,{className:c,ref:C}),a))});mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mh.classNames={fullWidth:wd,zeroRight:xd};var JL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ez(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=JL();return t&&e.setAttribute("nonce",t),e}function tz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ez())&&(tz(t,n),nz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sz=function(){var e=rz();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hk=function(){var e=sz(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},oz={left:0,top:0,right:0,gap:0},Xm=function(e){return parseInt(e||"",10)||0},iz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Xm(n),Xm(r),Xm(s)]},az=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oz;var t=iz(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},lz=Hk(),xa="data-scroll-locked",cz=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
.`.concat(WL,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(a,"px ").concat(r,`;
}
body[`).concat(xa,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="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(r,`;
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(xd,` {
right: `).concat(a,"px ").concat(r,`;
}
.`).concat(wd,` {
margin-right: `).concat(a,"px ").concat(r,`;
}
.`).concat(xd," .").concat(xd,` {
right: 0 `).concat(r,`;
}
.`).concat(wd," .").concat(wd,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(xa,`] {
`).concat(HL,": ").concat(a,`px;
}
`)},pb=function(){var e=parseInt(document.body.getAttribute(xa)||"0",10);return isFinite(e)?e:0},uz=function(){y.useEffect(function(){return document.body.setAttribute(xa,(pb()+1).toString()),function(){var e=pb()-1;e<=0?document.body.removeAttribute(xa):document.body.setAttribute(xa,e.toString())}},[])},dz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;uz();var o=y.useMemo(function(){return az(s)},[s]);return y.createElement(lz,{styles:cz(o,!t,s,n?"":"!important")})},bg=!1;if(typeof window<"u")try{var Gu=Object.defineProperty({},"passive",{get:function(){return bg=!0,!0}});window.addEventListener("test",Gu,Gu),window.removeEventListener("test",Gu,Gu)}catch{bg=!1}var Fi=bg?{passive:!1}:!1,fz=function(e){return e.tagName==="TEXTAREA"},Yk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fz(e)&&n[t]==="visible")},hz=function(e){return Yk(e,"overflowY")},mz=function(e){return Yk(e,"overflowX")},gb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Kk(e,r);if(s){var o=Gk(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Kk=function(e,t){return e==="v"?hz(t):mz(t)},Gk=function(e,t){return e==="v"?pz(t):gz(t)},yz=function(e,t){return e==="h"&&t==="rtl"?-1:1},vz=function(e,t,n,r,s){var o=yz(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),u=!1,d=i>0,f=0,h=0;do{var m=Gk(e,a),x=m[0],p=m[1],w=m[2],g=p-w-o*x;(x||g)&&Kk(e,a)&&(f+=g,h+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},Zu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yb=function(e){return[e.deltaX,e.deltaY]},vb=function(e){return e&&"current"in e?e.current:e},xz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wz=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},bz=0,$i=[];function _z(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),s=y.useState(bz++)[0],o=y.useState(Hk)[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 p=BL([e.lockRef.current],(e.shards||[]).map(vb),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(p,w){if("touches"in p&&p.touches.length===2)return!i.current.allowPinchZoom;var g=Zu(p),v=n.current,b="deltaX"in p?p.deltaX:v[0]-g[0],_="deltaY"in p?p.deltaY:v[1]-g[1],C,j=p.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in p&&T==="h"&&j.type==="range")return!1;var R=gb(T,j);if(!R)return!0;if(R?C=T:(C=T==="v"?"h":"v",R=gb(T,j)),!R)return!1;if(!r.current&&"changedTouches"in p&&(b||_)&&(r.current=C),!C)return!0;var A=r.current||C;return vz(A,w,p,A==="h"?b:_,!0)},[]),c=y.useCallback(function(p){var w=p;if(!(!$i.length||$i[$i.length-1]!==o)){var g="deltaY"in w?yb(w):Zu(w),v=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&xz(C.delta,g)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(vb).filter(Boolean).filter(function(C){return C.contains(w.target)}),_=b.length>0?a(w,b[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=y.useCallback(function(p,w,g,v){var b={name:p,delta:w,target:g,should:v,shadowParent:Sz(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),d=y.useCallback(function(p){n.current=Zu(p),r.current=void 0},[]),f=y.useCallback(function(p){u(p.type,yb(p),p.target,a(p,e.lockRef.current))},[]),h=y.useCallback(function(p){u(p.type,Zu(p),p.target,a(p,e.lockRef.current))},[]);y.useEffect(function(){return $i.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Fi),document.addEventListener("touchmove",c,Fi),document.addEventListener("touchstart",d,Fi),function(){$i=$i.filter(function(p){return p!==o}),document.removeEventListener("wheel",c,Fi),document.removeEventListener("touchmove",c,Fi),document.removeEventListener("touchstart",d,Fi)}},[]);var m=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(o,{styles:wz(s)}):null,m?y.createElement(dz,{gapMode:e.gapMode}):null)}function Sz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const kz=QL(Wk,_z);var ph=y.forwardRef(function(e,t){return y.createElement(mh,Wr({},e,{ref:t,sideCar:kz}))});ph.classNames=mh.classNames;var _g=["Enter"," "],Cz=["ArrowDown","PageUp","Home"],Zk=["ArrowUp","PageDown","End"],jz=[...Cz,...Zk],Ez={ltr:[..._g,"ArrowRight"],rtl:[..._g,"ArrowLeft"]},Nz={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ru="Menu",[kc,Tz,Pz]=eu(ru),[ki,qk]=on(ru,[Pz,tl,nl]),gh=tl(),Xk=nl(),[Rz,Ci]=ki(ru),[Az,su]=ki(ru),Qk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:i=!0}=e,a=gh(t),[c,u]=y.useState(null),d=y.useRef(!1),f=Ot(o),h=Si(s);return y.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),l.jsx(wv,{...a,children:l.jsx(Rz,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(Az,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};Qk.displayName=ru;var Dz="MenuAnchor",Ev=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=gh(n);return l.jsx(bv,{...s,...r,ref:t})});Ev.displayName=Dz;var Nv="MenuPortal",[Oz,Jk]=ki(Nv,{forceMount:void 0}),eC=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Ci(Nv,t);return l.jsx(Oz,{scope:t,forceMount:n,children:l.jsx(an,{present:n||o.open,children:l.jsx(nu,{asChild:!0,container:s,children:r})})})};eC.displayName=Nv;var cr="MenuContent",[Iz,Tv]=ki(cr),tC=y.forwardRef((e,t)=>{const n=Jk(cr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ci(cr,e.__scopeMenu),i=su(cr,e.__scopeMenu);return l.jsx(kc.Provider,{scope:e.__scopeMenu,children:l.jsx(an,{present:r||o.open,children:l.jsx(kc.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(Mz,{...s,ref:t}):l.jsx(Lz,{...s,ref:t})})})})}),Mz=y.forwardRef((e,t)=>{const n=Ci(cr,e.__scopeMenu),r=y.useRef(null),s=Ge(t,r);return y.useEffect(()=>{const o=r.current;if(o)return jv(o)},[]),l.jsx(Pv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Lz=y.forwardRef((e,t)=>{const n=Ci(cr,e.__scopeMenu);return l.jsx(Pv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Pv=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:x,...p}=e,w=Ci(cr,n),g=su(cr,n),v=gh(n),b=Xk(n),_=Tz(n),[C,j]=y.useState(null),T=y.useRef(null),R=Ge(t,T,w.onContentChange),A=y.useRef(0),O=y.useRef(""),G=y.useRef(0),N=y.useRef(null),z=y.useRef("right"),S=y.useRef(0),U=x?ph:y.Fragment,J=x?{as:es,allowPinchZoom:!0}:void 0,F=I=>{var me,we;const X=O.current+I,$=_().filter(Te=>!Te.disabled),B=document.activeElement,he=(me=$.find(Te=>Te.ref.current===B))==null?void 0:me.textValue,se=$.map(Te=>Te.textValue),oe=Zz(se,X,he),Oe=(we=$.find(Te=>Te.textValue===oe))==null?void 0:we.ref.current;(function Te(Fe){O.current=Fe,window.clearTimeout(A.current),Fe!==""&&(A.current=window.setTimeout(()=>Te(""),1e3))})(X),Oe&&setTimeout(()=>Oe.focus())};y.useEffect(()=>()=>window.clearTimeout(A.current),[]),uv();const W=y.useCallback(I=>{var $,B;return z.current===(($=N.current)==null?void 0:$.side)&&Xz(I,(B=N.current)==null?void 0:B.area)},[]);return l.jsx(Iz,{scope:n,searchRef:O,onItemEnter:y.useCallback(I=>{W(I)&&I.preventDefault()},[W]),onItemLeave:y.useCallback(I=>{var X;W(I)||((X=T.current)==null||X.focus(),j(null))},[W]),onTriggerLeave:y.useCallback(I=>{W(I)&&I.preventDefault()},[W]),pointerGraceTimerRef:G,onPointerGraceIntentChange:y.useCallback(I=>{N.current=I},[]),children:l.jsx(U,{...J,children:l.jsx(uh,{asChild:!0,trapped:s,onMountAutoFocus:ue(o,I=>{var X;I.preventDefault(),(X=T.current)==null||X.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Qa,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:l.jsx(kv,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:j,onEntryFocus:ue(c,I=>{g.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(_v,{role:"menu","aria-orientation":"vertical","data-state":yC(w.open),"data-radix-menu-content":"",dir:g.dir,...v,...p,ref:R,style:{outline:"none",...p.style},onKeyDown:ue(p.onKeyDown,I=>{const $=I.target.closest("[data-radix-menu-content]")===I.currentTarget,B=I.ctrlKey||I.altKey||I.metaKey,he=I.key.length===1;$&&(I.key==="Tab"&&I.preventDefault(),!B&&he&&F(I.key));const se=T.current;if(I.target!==se||!jz.includes(I.key))return;I.preventDefault();const Oe=_().filter(me=>!me.disabled).map(me=>me.ref.current);Zk.includes(I.key)&&Oe.reverse(),Kz(Oe)}),onBlur:ue(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:ue(e.onPointerMove,Cc(I=>{const X=I.target,$=S.current!==I.clientX;if(I.currentTarget.contains(X)&&$){const B=I.clientX>S.current?"right":"left";z.current=B,S.current=I.clientX}}))})})})})})})});tC.displayName=cr;var zz="MenuGroup",Rv=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Pe.div,{role:"group",...r,ref:t})});Rv.displayName=zz;var Fz="MenuLabel",nC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});nC.displayName=Fz;var of="MenuItem",xb="menu.itemSelect",yh=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=y.useRef(null),i=su(of,e.__scopeMenu),a=Tv(of,e.__scopeMenu),c=Ge(t,o),u=y.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(xb,{bubbles:!0,cancelable:!0});f.addEventListener(xb,m=>r==null?void 0:r(m),{once:!0}),cv(f,h),h.defaultPrevented?u.current=!1:i.onClose()}};return l.jsx(rC,{...s,ref:c,disabled:n,onClick:ue(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ue(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ue(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||_g.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});yh.displayName=of;var rC=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,i=Tv(of,n),a=Xk(n),c=y.useRef(null),u=Ge(t,c),[d,f]=y.useState(!1),[h,m]=y.useState("");return y.useEffect(()=>{const x=c.current;x&&m((x.textContent??"").trim())},[o.children]),l.jsx(kc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:l.jsx(Cv,{asChild:!0,...a,focusable:!r,children:l.jsx(Pe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:u,onPointerMove:ue(e.onPointerMove,Cc(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(e.onPointerLeave,Cc(x=>i.onItemLeave(x))),onFocus:ue(e.onFocus,()=>f(!0)),onBlur:ue(e.onBlur,()=>f(!1))})})})}),$z="MenuCheckboxItem",sC=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return l.jsx(cC,{scope:e.__scopeMenu,checked:n,children:l.jsx(yh,{role:"menuitemcheckbox","aria-checked":af(n)?"mixed":n,...s,ref:t,"data-state":Dv(n),onSelect:ue(s.onSelect,()=>r==null?void 0:r(af(n)?!0:!n),{checkForDefaultPrevented:!1})})})});sC.displayName=$z;var oC="MenuRadioGroup",[Uz,Vz]=ki(oC,{value:void 0,onValueChange:()=>{}}),iC=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Ot(r);return l.jsx(Uz,{scope:e.__scopeMenu,value:n,onValueChange:o,children:l.jsx(Rv,{...s,ref:t})})});iC.displayName=oC;var aC="MenuRadioItem",lC=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=Vz(aC,e.__scopeMenu),o=n===s.value;return l.jsx(cC,{scope:e.__scopeMenu,checked:o,children:l.jsx(yh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Dv(o),onSelect:ue(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});lC.displayName=aC;var Av="MenuItemIndicator",[cC,Bz]=ki(Av,{checked:!1}),uC=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=Bz(Av,n);return l.jsx(an,{present:r||af(o.checked)||o.checked===!0,children:l.jsx(Pe.span,{...s,ref:t,"data-state":Dv(o.checked)})})});uC.displayName=Av;var Wz="MenuSeparator",dC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return l.jsx(Pe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});dC.displayName=Wz;var Hz="MenuArrow",fC=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=gh(n);return l.jsx(Sv,{...s,...r,ref:t})});fC.displayName=Hz;var Yz="MenuSub",[WH,hC]=ki(Yz),Il="MenuSubTrigger",mC=y.forwardRef((e,t)=>{const n=Ci(Il,e.__scopeMenu),r=su(Il,e.__scopeMenu),s=hC(Il,e.__scopeMenu),o=Tv(Il,e.__scopeMenu),i=y.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},d=y.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return y.useEffect(()=>d,[d]),y.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),l.jsx(Ev,{asChild:!0,...u,children:l.jsx(rC,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":yC(n.open),...e,ref:lh(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(e.onPointerMove,Cc(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ue(e.onPointerLeave,Cc(f=>{var m,x;d();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(x=n.content)==null?void 0:x.dataset.side,w=p==="right",g=w?-5:5,v=h[w?"left":"right"],b=h[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:v,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:v,y:h.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ue(e.onKeyDown,f=>{var m;const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Ez[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});mC.displayName=Il;var pC="MenuSubContent",gC=y.forwardRef((e,t)=>{const n=Jk(cr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ci(cr,e.__scopeMenu),i=su(cr,e.__scopeMenu),a=hC(pC,e.__scopeMenu),c=y.useRef(null),u=Ge(t,c);return l.jsx(kc.Provider,{scope:e.__scopeMenu,children:l.jsx(an,{present:r||o.open,children:l.jsx(kc.Slot,{scope:e.__scopeMenu,children:l.jsx(Pv,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ue(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ue(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:ue(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=Nz[i.dir].includes(d.key);f&&h&&(o.onOpenChange(!1),(m=a.trigger)==null||m.focus(),d.preventDefault())})})})})})});gC.displayName=pC;function yC(e){return e?"open":"closed"}function af(e){return e==="indeterminate"}function Dv(e){return af(e)?"indeterminate":e?"checked":"unchecked"}function Kz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Gz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zz(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=Gz(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function qz(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function Xz(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return qz(n,t)}function Cc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Qz=Qk,Jz=Ev,eF=eC,tF=tC,nF=Rv,rF=nC,sF=yh,oF=sC,iF=iC,aF=lC,lF=uC,cF=dC,uF=fC,dF=mC,fF=gC,Ov="DropdownMenu",[hF,HH]=on(Ov,[qk]),En=qk(),[mF,vC]=hF(Ov),xC=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=En(t),u=y.useRef(null),[d=!1,f]=Gn({prop:s,defaultProp:o,onChange:i});return l.jsx(mF,{scope:t,triggerId:Bn(),triggerRef:u,contentId:Bn(),open:d,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:a,children:l.jsx(Qz,{...c,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};xC.displayName=Ov;var wC="DropdownMenuTrigger",bC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=vC(wC,n),i=En(n);return l.jsx(Jz,{asChild:!0,...i,children:l.jsx(Pe.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":r?"":void 0,disabled:r,...s,ref:lh(t,o.triggerRef),onPointerDown:ue(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ue(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});bC.displayName=wC;var pF="DropdownMenuPortal",_C=e=>{const{__scopeDropdownMenu:t,...n}=e,r=En(t);return l.jsx(eF,{...r,...n})};_C.displayName=pF;var SC="DropdownMenuContent",kC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=vC(SC,n),o=En(n),i=y.useRef(!1);return l.jsx(tF,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ue(e.onCloseAutoFocus,a=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:ue(e.onInteractOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kC.displayName=SC;var gF="DropdownMenuGroup",yF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(nF,{...s,...r,ref:t})});yF.displayName=gF;var vF="DropdownMenuLabel",CC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(rF,{...s,...r,ref:t})});CC.displayName=vF;var xF="DropdownMenuItem",jC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(sF,{...s,...r,ref:t})});jC.displayName=xF;var wF="DropdownMenuCheckboxItem",EC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(oF,{...s,...r,ref:t})});EC.displayName=wF;var bF="DropdownMenuRadioGroup",_F=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(iF,{...s,...r,ref:t})});_F.displayName=bF;var SF="DropdownMenuRadioItem",NC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(aF,{...s,...r,ref:t})});NC.displayName=SF;var kF="DropdownMenuItemIndicator",TC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(lF,{...s,...r,ref:t})});TC.displayName=kF;var CF="DropdownMenuSeparator",PC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(cF,{...s,...r,ref:t})});PC.displayName=CF;var jF="DropdownMenuArrow",EF=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(uF,{...s,...r,ref:t})});EF.displayName=jF;var NF="DropdownMenuSubTrigger",RC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(dF,{...s,...r,ref:t})});RC.displayName=NF;var TF="DropdownMenuSubContent",AC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=En(n);return l.jsx(fF,{...s,...r,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)"}})});AC.displayName=TF;var PF=xC,RF=bC,AF=_C,DC=kC,OC=CC,IC=jC,MC=EC,LC=NC,zC=TC,FC=PC,$C=RC,UC=AC;const Iv=PF,Mv=RF,DF=y.forwardRef(({className:e,inset:t,children:n,...r},s)=>l.jsxs($C,{ref:s,className:re("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),...r,children:[n,l.jsx(rk,{className:"ml-auto h-4 w-4"})]}));DF.displayName=$C.displayName;const OF=y.forwardRef(({className:e,...t},n)=>l.jsx(UC,{ref:n,className:re("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}));OF.displayName=UC.displayName;const vh=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(AF,{children:l.jsx(DC,{ref:r,sideOffset:t,className:re("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),...n})}));vh.displayName=DC.displayName;const ti=y.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(IC,{ref:r,className:re("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),...n}));ti.displayName=IC.displayName;const IF=y.forwardRef(({className:e,children:t,checked:n,...r},s)=>l.jsxs(MC,{ref:s,className:re("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:n,...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zC,{children:l.jsx(nk,{className:"h-4 w-4"})})}),t]}));IF.displayName=MC.displayName;const MF=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(LC,{ref:r,className:re("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),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(zC,{children:l.jsx(sk,{className:"h-2 w-2 fill-current"})})}),t]}));MF.displayName=LC.displayName;const LF=y.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(OC,{ref:r,className:re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));LF.displayName=OC.displayName;const zF=y.forwardRef(({className:e,...t},n)=>l.jsx(FC,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));zF.displayName=FC.displayName;function FF(){const{i18n:e}=Ye();return l.jsxs(Iv,{children:[l.jsx(Mv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(oI,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(vh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(ti,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}const $F={theme:"system",setTheme:()=>null},VC=y.createContext($F);function UF({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=y.useState(()=>localStorage.getItem(n)||t);y.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return l.jsx(VC.Provider,{...r,value:i,children:e})}const VF=()=>{const e=y.useContext(VC);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function BF(){const{setTheme:e}=VF(),{t}=Ye();return l.jsxs(Iv,{children:[l.jsx(Mv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(fI,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(cI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(vh,{align:"end",children:[l.jsx(ti,{onClick:()=>e("light"),children:t("common.theme.light")}),l.jsx(ti,{onClick:()=>e("dark"),children:t("common.theme.dark")}),l.jsx(ti,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}var Lv="Dialog",[BC,WC]=on(Lv),[WF,Mr]=BC(Lv),HC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=y.useRef(null),c=y.useRef(null),[u=!1,d]=Gn({prop:r,defaultProp:s,onChange:o});return l.jsx(WF,{scope:t,triggerRef:a,contentRef:c,contentId:Bn(),titleId:Bn(),descriptionId:Bn(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};HC.displayName=Lv;var YC="DialogTrigger",KC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Mr(YC,n),o=Ge(t,s.triggerRef);return l.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":$v(s.open),...r,ref:o,onClick:ue(e.onClick,s.onOpenToggle)})});KC.displayName=YC;var zv="DialogPortal",[HF,GC]=BC(zv,{forceMount:void 0}),ZC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Mr(zv,t);return l.jsx(HF,{scope:t,forceMount:n,children:y.Children.map(r,i=>l.jsx(an,{present:n||o.open,children:l.jsx(nu,{asChild:!0,container:s,children:i})}))})};ZC.displayName=zv;var lf="DialogOverlay",qC=y.forwardRef((e,t)=>{const n=GC(lf,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Mr(lf,e.__scopeDialog);return o.modal?l.jsx(an,{present:r||o.open,children:l.jsx(YF,{...s,ref:t})}):null});qC.displayName=lf;var YF=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Mr(lf,n);return l.jsx(ph,{as:es,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Pe.div,{"data-state":$v(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),hi="DialogContent",XC=y.forwardRef((e,t)=>{const n=GC(hi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Mr(hi,e.__scopeDialog);return l.jsx(an,{present:r||o.open,children:o.modal?l.jsx(KF,{...s,ref:t}):l.jsx(GF,{...s,ref:t})})});XC.displayName=hi;var KF=y.forwardRef((e,t)=>{const n=Mr(hi,e.__scopeDialog),r=y.useRef(null),s=Ge(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return jv(o)},[]),l.jsx(QC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.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())})}),GF=y.forwardRef((e,t)=>{const n=Mr(hi,e.__scopeDialog),r=y.useRef(!1),s=y.useRef(!1);return l.jsx(QC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),QC=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Mr(hi,n),c=y.useRef(null),u=Ge(t,c);return uv(),l.jsxs(l.Fragment,{children:[l.jsx(uh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:l.jsx(Qa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":$v(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(qF,{titleId:a.titleId}),l.jsx(QF,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Fv="DialogTitle",JC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Mr(Fv,n);return l.jsx(Pe.h2,{id:s.titleId,...r,ref:t})});JC.displayName=Fv;var ej="DialogDescription",tj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Mr(ej,n);return l.jsx(Pe.p,{id:s.descriptionId,...r,ref:t})});tj.displayName=ej;var nj="DialogClose",rj=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Mr(nj,n);return l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>s.onOpenChange(!1))})});rj.displayName=nj;function $v(e){return e?"open":"closed"}var sj="DialogTitleWarning",[ZF,oj]=QI(sj,{contentName:hi,titleName:Fv,docsSlug:"dialog"}),qF=({titleId:e})=>{const t=oj(sj),n=`\`${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(n))},[n,e]),null},XF="DialogDescriptionWarning",QF=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oj(XF).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(r))},[r,e,t]),null},Uv=HC,Vv=KC,Bv=ZC,ou=qC,iu=XC,au=JC,lu=tj,xh=rj;const Wv=Uv,Hv=Vv,JF=Bv,ij=y.forwardRef(({className:e,...t},n)=>l.jsx(ou,{className:re("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:n}));ij.displayName=ou.displayName;const e4=Jc("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"}}),wh=y.forwardRef(({side:e="right",className:t,children:n,...r},s)=>l.jsxs(JF,{children:[l.jsx(ij,{}),l.jsxs(iu,{ref:s,className:re(e4({side:e}),t),...r,children:[n,l.jsxs(xh,{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:[l.jsx(iv,{className:"h-4 w-4 dark:text-stone-200"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wh.displayName=iu.displayName;const Yv=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yv.displayName="SheetHeader";const Kv=y.forwardRef(({className:e,...t},n)=>l.jsx(au,{ref:n,className:re("text-lg font-semibold text-foreground",e),...t}));Kv.displayName=au.displayName;const t4=y.forwardRef(({className:e,...t},n)=>l.jsx(lu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));t4.displayName=lu.displayName;class Hn extends Error{constructor(t){var n,r,s,o;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Hn.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 Hn||(this.originalError=t),typeof DOMException<"u"&&t instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(n=this.response)==null?void 0:n.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=(r=this.originalError)==null?void 0:r.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 qu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n4(e,t){const n={};if(typeof e!="string")return n;const r=Object.assign({},{}).decode||r4;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(n[a]===void 0){let c=e.slice(o+1,i).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1));try{n[a]=r(c)}catch{n[a]=c}}s=i+1}return n}function wb(e,t,n){const r=Object.assign({},n||{}),s=r.encode||s4;if(!qu.test(e))throw new TypeError("argument name is invalid");const o=s(t);if(o&&!qu.test(o))throw new TypeError("argument val is invalid");let i=e+"="+o;if(r.maxAge!=null){const a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(a)}if(r.domain){if(!qu.test(r.domain))throw new TypeError("option domain is invalid");i+="; Domain="+r.domain}if(r.path){if(!qu.test(r.path))throw new TypeError("option path is invalid");i+="; Path="+r.path}if(r.expires){if(!function(c){return Object.prototype.toString.call(c)==="[object Date]"||c instanceof Date}(r.expires)||isNaN(r.expires.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():r.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(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.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 r4(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function s4(e){return encodeURIComponent(e)}const o4=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal;let aj;function wa(e){if(e)try{const t=decodeURIComponent(aj(e.split(".")[1]).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(t)||{}}catch{}return{}}function lj(e,t=0){let n=wa(e);return!(Object.keys(n).length>0&&(!n.exp||n.exp-t>Date.now()/1e3))}aj=typeof atob!="function"||o4?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 n,r,s=0,o=0,i="";r=t.charAt(o++);~r&&(n=s%4?64*n+r:r,s++%4)?i+=String.fromCharCode(255&n>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i}:atob;const bb="pb_auth";class i4{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!lj(this.token)}get isAdmin(){return wa(this.token).type==="admin"}get isAuthRecord(){return wa(this.token).type==="authRecord"}save(t,n){this.baseToken=t||"",this.baseModel=n||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,n=bb){const r=n4(t||"")[n]||"";let s={};try{s=JSON.parse(r),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(t,n=bb){var c,u;const r={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},s=wa(this.token);r.expires=s!=null&&s.exp?new Date(1e3*s.exp):new Date("1970-01-01"),t=Object.assign({},r,t);const o={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let i=wb(n,JSON.stringify(o),t);const a=typeof Blob<"u"?new Blob([i]).size:i.length;if(o.model&&a>4096){o.model={id:(c=o==null?void 0:o.model)==null?void 0:c.id,email:(u=o==null?void 0:o.model)==null?void 0:u.email};const d=["collectionId","username","verified"];for(const f in this.model)d.includes(f)&&(o.model[f]=this.model[f]);i=wb(n,JSON.stringify(o),t)}return i}onChange(t,n=!1){return this._onChangeCallbacks.push(t),n&&t(this.token,this.model),()=>{for(let r=this._onChangeCallbacks.length-1;r>=0;r--)if(this._onChangeCallbacks[r]==t)return delete this._onChangeCallbacks[r],void this._onChangeCallbacks.splice(r,1)}}triggerChange(){for(const t of this._onChangeCallbacks)t&&t(this.token,this.model)}}class a4 extends i4{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,n){this._storageSet(this.storageKey,{token:t,model:n}),super.save(t,n)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&(window!=null&&window.localStorage)){const n=window.localStorage.getItem(t)||"";try{return JSON.parse(n)}catch{return n}}return this.storageFallback[t]}_storageSet(t,n){if(typeof window<"u"&&(window!=null&&window.localStorage)){let r=n;typeof n!="string"&&(r=JSON.stringify(n)),window.localStorage.setItem(t,r)}else this.storageFallback[t]=n}_storageRemove(t){var n;typeof window<"u"&&(window!=null&&window.localStorage)&&((n=window.localStorage)==null||n.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 n=this._storageGet(this.storageKey)||{};super.save(n.token||"",n.model||null)})}}class ji{constructor(t){this.client=t}}class l4 extends ji{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,n){return n=Object.assign({method:"PATCH",body:t},n),this.client.send("/api/settings",n)}async testS3(t="storage",n){return n=Object.assign({method:"POST",body:{filesystem:t}},n),this.client.send("/api/settings/test/s3",n).then(()=>!0)}async testEmail(t,n,r){return r=Object.assign({method:"POST",body:{email:t,template:n}},r),this.client.send("/api/settings/test/email",r).then(()=>!0)}async generateAppleClientSecret(t,n,r,s,o,i){return i=Object.assign({method:"POST",body:{clientId:t,teamId:n,keyId:r,privateKey:s,duration:o}},i),this.client.send("/api/settings/apple/generate-client-secret",i)}}class Gv extends ji{decode(t){return t}async getFullList(t,n){if(typeof t=="number")return this._getFullList(t,n);let r=500;return(n=Object.assign({},t,n)).batch&&(r=n.batch,delete n.batch),this._getFullList(r,n)}async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send(this.baseCrudPath,r).then(s=>{var o;return s.items=((o=s.items)==null?void 0:o.map(i=>this.decode(i)))||[],s})}async getFirstListItem(t,n){return(n=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},n)).query=Object.assign({filter:t,skipTotal:1},n.query),this.getList(1,1,n).then(r=>{var s;if(!((s=r==null?void 0:r.items)!=null&&s.length))throw new Hn({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return r.items[0]})}async getOne(t,n){if(!t)throw new Hn({url:this.client.buildUrl(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(r=>this.decode(r))}async create(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send(this.baseCrudPath,n).then(r=>this.decode(r))}async update(t,n,r){return r=Object.assign({method:"PATCH",body:n},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then(s=>this.decode(s))}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),n).then(()=>!0)}_getFullList(t=500,n){(n=n||{}).query=Object.assign({skipTotal:1},n.query);let r=[],s=async o=>this.getList(o,t||500,n).then(i=>{const a=i.items;return r=r.concat(a),a.length==i.perPage?s(o+1):r});return s(1)}}function Mn(e,t,n,r){const s=r!==void 0;return s||n!==void 0?s?(console.warn(e),t.body=Object.assign({},t.body,n),t.query=Object.assign({},t.query,r),t):Object.assign(t,n):t}function Qm(e){var t;(t=e._resetAutoRefresh)==null||t.call(e)}class c4 extends Gv{get baseCrudPath(){return"/api/admins"}async update(t,n,r){return super.update(t,n,r).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,n){return super.delete(t,n).then(r=>{var s,o;return r&&((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(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.admin)||{});return t!=null&&t.token&&(t!=null&&t.admin)&&this.client.authStore.save(t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",admin:n})}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};o=Mn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",o,r,s);const i=o.autoRefreshThreshold;delete o.autoRefreshThreshold,o.autoRefresh||Qm(this.client);let a=await this.client.send(this.baseCrudPath+"/auth-with-password",o);return a=this.authResponse(a),i&&function(u,d,f,h){Qm(u);const m=u.beforeSend,x=u.authStore.model,p=u.authStore.onChange((w,g)=>{(!w||(g==null?void 0:g.id)!=(x==null?void 0:x.id)||(g!=null&&g.collectionId||x!=null&&x.collectionId)&&(g==null?void 0:g.collectionId)!=(x==null?void 0:x.collectionId))&&Qm(u)});u._resetAutoRefresh=function(){p(),u.beforeSend=m,delete u._resetAutoRefresh},u.beforeSend=async(w,g)=>{var C;const v=u.authStore.token;if((C=g.query)!=null&&C.autoRefresh)return m?m(w,g):{url:w,sendOptions:g};let b=u.authStore.isValid;if(b&&lj(u.authStore.token,d))try{await f()}catch{b=!1}b||await h();const _=g.headers||{};for(let j in _)if(j.toLowerCase()=="authorization"&&v==_[j]&&u.authStore.token){_[j]=u.authStore.token;break}return g.headers=_,m?m(w,g):{url:w,sendOptions:g}}}(this.client,i,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(t,n,Object.assign({autoRefresh:!0},o))),a}async authRefresh(t,n){let r={method:"POST"};return r=Mn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCrudPath+"/auth-refresh",r).then(this.authResponse.bind(this))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Mn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Mn("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 u4=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function cj(e){if(e){e.query=e.query||{};for(let t in e)u4.includes(t)||(e.query[t]=e[t],delete e[t])}}class uj extends ji{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,n,r){var i;if(!t)throw new Error("topic must be set.");let s=t;if(r){cj(r);const a="options="+encodeURIComponent(JSON.stringify({query:r.query,headers:r.headers}));s+=(s.includes("?")?"&":"?")+a}const o=function(a){const c=a;let u;try{u=JSON.parse(c==null?void 0:c.data)}catch{}n(u||{})};return this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(o),this.isConnected?this.subscriptions[s].length===1?await this.submitSubscriptions():(i=this.eventSource)==null||i.addEventListener(s,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){var r;let n=!1;if(t){const s=this.getSubscriptionsByTopic(t);for(let o in s)if(this.hasSubscriptionListeners(o)){for(let i of this.subscriptions[o])(r=this.eventSource)==null||r.removeEventListener(o,i);delete this.subscriptions[o],n||(n=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?n&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){var r;let n=!1;for(let s in this.subscriptions)if((s+"?").startsWith(t)){n=!0;for(let o of this.subscriptions[s])(r=this.eventSource)==null||r.removeEventListener(s,o);delete this.subscriptions[s]}n&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,n){var o;let r=!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 c=this.subscriptions[i].length-1;c>=0;c--)this.subscriptions[i][c]===n&&(a=!0,delete this.subscriptions[i][c],this.subscriptions[i].splice(c,1),(o=this.eventSource)==null||o.removeEventListener(i,n));a&&(this.subscriptions[i].length||delete this.subscriptions[i],r||this.hasSubscriptionListeners(i)||(r=!0))}this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){var n,r;if(this.subscriptions=this.subscriptions||{},t)return!!((n=this.subscriptions[t])!=null&&n.length);for(let s in this.subscriptions)if((r=this.subscriptions[s])!=null&&r.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 n={};t=t.includes("?")?t:t+"?";for(let r in this.subscriptions)(r+"?").startsWith(t)&&(n[r]=this.subscriptions[r]);return n}getNonEmptySubscriptionKeys(){const t=[];for(let n in this.subscriptions)this.subscriptions[n].length&&t.push(n);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.addEventListener(t,n)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let n of this.subscriptions[t])this.eventSource.removeEventListener(t,n)}async connect(){if(!(this.reconnectAttempts>0))return new Promise((t,n)=>{this.pendingConnects.push({resolve:t,reject:n}),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 n=t;this.clientId=n==null?void 0:n.lastEventId,this.submitSubscriptions().then(async()=>{let r=3;for(;this.hasUnsentSubscriptions()&&r>0;)r--,await this.submitSubscriptions()}).then(()=>{for(let s of this.pendingConnects)s.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);const r=this.getSubscriptionsByTopic("PB_CONNECT");for(let s in r)for(let o of r[s])o(t)}).catch(r=>{this.clientId="",this.connectErrorHandler(r)})})}hasUnsentSubscriptions(){const t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(const n of t)if(!this.lastSentSubscriptions.includes(n))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let r of this.pendingConnects)r.reject(new Hn(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const n=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},n)}disconnect(t=!1){var n;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(n=this.eventSource)==null||n.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}}class d4 extends Gv{constructor(t,n){super(t),this.collectionIdOrName=n}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}async subscribe(t,n,r){if(!t)throw new Error("Missing topic.");if(!n)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,n,r)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,n){if(typeof t=="number")return super.getFullList(t,n);const r=Object.assign({},t,n);return super.getFullList(r)}async getList(t=1,n=30,r){return super.getList(t,n,r)}async getFirstListItem(t,n){return super.getFirstListItem(t,n)}async getOne(t,n){return super.getOne(t,n)}async create(t,n){return super.create(t,n)}async update(t,n,r){return super.update(t,n,r).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,n){return super.delete(t,n).then(r=>{var s,o,i;return!r||((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(),r})}authResponse(t){const n=this.decode((t==null?void 0:t.record)||{});return this.client.authStore.save(t==null?void 0:t.token,n),Object.assign({},t,{token:(t==null?void 0:t.token)||"",record:n})}async listAuthMethods(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t).then(n=>Object.assign({},n,{usernamePassword:!!(n!=null&&n.usernamePassword),emailPassword:!!(n!=null&&n.emailPassword),authProviders:Array.isArray(n==null?void 0:n.authProviders)?n==null?void 0:n.authProviders:[]}))}async authWithPassword(t,n,r,s){let o={method:"POST",body:{identity:t,password:n}};return o=Mn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/auth-with-password",o).then(i=>this.authResponse(i))}async authWithOAuth2Code(t,n,r,s,o,i,a){let c={method:"POST",body:{provider:t,code:n,codeVerifier:r,redirectUrl:s,createData:o}};return c=Mn("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",c,i,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",c).then(u=>this.authResponse(u))}authWithOAuth2(...t){if(t.length>1||typeof(t==null?void 0:t[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{});const n=(t==null?void 0:t[0])||{};let r=null;n.urlCallback||(r=_b(void 0));const s=new uj(this.client);function o(){r==null||r.close(),s.unsubscribe()}const i={},a=n.requestKey;return a&&(i.requestKey=a),this.listAuthMethods(i).then(c=>{var h;const u=c.authProviders.find(m=>m.name===n.provider);if(!u)throw new Hn(new Error(`Missing or invalid provider "${n.provider}".`));const d=this.client.buildUrl("/api/oauth2-redirect"),f=a?(h=this.client.cancelControllers)==null?void 0:h[a]:void 0;return f&&(f.signal.onabort=()=>{o()}),new Promise(async(m,x)=>{var p;try{await s.subscribe("@oauth2",async b=>{var C;const _=s.clientId;try{if(!b.state||_!==b.state)throw new Error("State parameters don't match.");if(b.error||!b.code)throw new Error("OAuth2 redirect error or missing code: "+b.error);const j=Object.assign({},n);delete j.provider,delete j.scopes,delete j.createData,delete j.urlCallback,(C=f==null?void 0:f.signal)!=null&&C.onabort&&(f.signal.onabort=null);const T=await this.authWithOAuth2Code(u.name,b.code,u.codeVerifier,d,n.createData,j);m(T)}catch(j){x(new Hn(j))}o()});const w={state:s.clientId};(p=n.scopes)!=null&&p.length&&(w.scope=n.scopes.join(" "));const g=this._replaceQueryParams(u.authUrl+d,w);await(n.urlCallback||function(b){r?r.location.href=b:r=_b(b)})(g)}catch(w){o(),x(new Hn(w))}})}).catch(c=>{throw o(),c})}async authRefresh(t,n){let r={method:"POST"};return r=Mn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",r,t,n),this.client.send(this.baseCollectionPath+"/auth-refresh",r).then(s=>this.authResponse(s))}async requestPasswordReset(t,n,r){let s={method:"POST",body:{email:t}};return s=Mn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}async confirmPasswordReset(t,n,r,s,o){let i={method:"POST",body:{token:t,password:n,passwordConfirm:r}};return i=Mn("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,n,r){let s={method:"POST",body:{email:t}};return s=Mn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}async confirmVerification(t,n,r){let s={method:"POST",body:{token:t}};return s=Mn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>{const o=wa(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,n,r){let s={method:"POST",body:{newEmail:t}};return s=Mn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,n,r),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}async confirmEmailChange(t,n,r,s){let o={method:"POST",body:{token:t,password:n}};return o=Mn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,r,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then(()=>{const i=wa(t),a=this.client.authStore.model;return a&&a.id===i.id&&a.collectionId===i.collectionId&&this.client.authStore.clear(),!0})}async listExternalAuths(t,n){return n=Object.assign({method:"GET"},n),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",n)}async unlinkExternalAuth(t,n,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths/"+encodeURIComponent(n),r).then(()=>!0)}_replaceQueryParams(t,n={}){let r=t,s="";t.indexOf("?")>=0&&(r=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 c=a.split("=");o[decodeURIComponent(c[0].replace(/\+/g," "))]=decodeURIComponent((c[1]||"").replace(/\+/g," "))}for(let a in n)n.hasOwnProperty(a)&&(n[a]==null?delete o[a]:o[a]=n[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!=""?r+"?"+s:r}}function _b(e){if(typeof window>"u"||!(window!=null&&window.open))throw new Hn(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,n=768,r=window.innerWidth,s=window.innerHeight;t=t>r?r:t,n=n>s?s:n;let o=r/2-t/2,i=s/2-n/2;return window.open(e,"popup_window","width="+t+",height="+n+",top="+i+",left="+o+",resizable,menubar=no")}class f4 extends Gv{get baseCrudPath(){return"/api/collections"}async import(t,n=!1,r){return r=Object.assign({method:"PUT",body:{collections:t,deleteMissing:n}},r),this.client.send(this.baseCrudPath+"/import",r).then(()=>!0)}}class h4 extends ji{async getList(t=1,n=30,r){return(r=Object.assign({method:"GET"},r)).query=Object.assign({page:t,perPage:n},r.query),this.client.send("/api/logs",r)}async getOne(t,n){if(!t)throw new Hn({url:this.client.buildUrl("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return n=Object.assign({method:"GET"},n),this.client.send("/api/logs/"+encodeURIComponent(t),n)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}}class m4 extends ji{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}}class p4 extends ji{getUrl(t,n,r={}){if(!n||!(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(n));let o=this.client.buildUrl(s.join("/"));if(Object.keys(r).length){r.download===!1&&delete r.download;const i=new URLSearchParams(r);o+=(o.includes("?")?"&":"?")+i}return o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then(n=>(n==null?void 0:n.token)||"")}}class g4 extends ji{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,n){return n=Object.assign({method:"POST",body:{name:t}},n),this.client.send("/api/backups",n).then(()=>!0)}async upload(t,n){return n=Object.assign({method:"POST",body:t},n),this.client.send("/api/backups/upload",n).then(()=>!0)}async delete(t,n){return n=Object.assign({method:"DELETE"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}`,n).then(()=>!0)}async restore(t,n){return n=Object.assign({method:"POST"},n),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,n).then(()=>!0)}getDownloadUrl(t,n){return this.client.buildUrl(`/api/backups/${encodeURIComponent(n)}?token=${encodeURIComponent(t)}`)}}class y4{constructor(t="/",n,r="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=t,this.lang=r,this.authStore=n||new a4,this.admins=new c4(this),this.collections=new f4(this),this.files=new p4(this),this.logs=new h4(this),this.settings=new l4(this),this.realtime=new uj(this),this.health=new m4(this),this.backups=new g4(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new d4(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,n){if(!n)return t;for(let r in n){let s=n[r];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("{:"+r+"}",s)}return t}getFileUrl(t,n,r={}){return this.files.getUrl(t,n,r)}buildUrl(t){var r;let n=this.baseUrl;return typeof window>"u"||!window.location||n.startsWith("https://")||n.startsWith("http://")||(n=(r=window.location.origin)!=null&&r.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(n+=window.location.pathname||"/",n+=n.endsWith("/")?"":"/"),n+=this.baseUrl),t&&(n+=n.endsWith("/")?"":"/",n+=t.startsWith("/")?t.substring(1):t),n}async send(t,n){n=this.initSendOptions(t,n);let r=this.buildUrl(t);if(this.beforeSend){const s=Object.assign({},await this.beforeSend(r,n));s.url!==void 0||s.options!==void 0?(r=s.url||r,n=s.options||n):Object.keys(s).length&&(n=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(n.query!==void 0){const s=this.serializeQueryParams(n.query);s&&(r+=(r.includes("?")?"&":"?")+s),delete n.query}return this.getHeader(n.headers,"Content-Type")=="application/json"&&n.body&&typeof n.body!="string"&&(n.body=JSON.stringify(n.body)),(n.fetch||fetch)(r,n).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 Hn({url:s.url,status:s.status,data:o});return o}).catch(s=>{throw new Hn(s)})}initSendOptions(t,n){if((n=Object.assign({method:"GET"},n)).body=this.convertToFormDataIfNeeded(n.body),cj(n),n.query=Object.assign({},n.params,n.query),n.requestKey===void 0&&(n.$autoCancel===!1||n.query.$autoCancel===!1?n.requestKey=null:(n.$cancelKey||n.query.$cancelKey)&&(n.requestKey=n.$cancelKey||n.query.$cancelKey)),delete n.$autoCancel,delete n.query.$autoCancel,delete n.$cancelKey,delete n.query.$cancelKey,this.getHeader(n.headers,"Content-Type")!==null||this.isFormData(n.body)||(n.headers=Object.assign({},n.headers,{"Content-Type":"application/json"})),this.getHeader(n.headers,"Accept-Language")===null&&(n.headers=Object.assign({},n.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(n.headers,"Authorization")===null&&(n.headers=Object.assign({},n.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&n.requestKey!==null){const r=n.requestKey||(n.method||"GET")+t;delete n.requestKey,this.cancelRequest(r);const s=new AbortController;this.cancelControllers[r]=s,n.signal=s.signal}return n}convertToFormDataIfNeeded(t){if(typeof FormData>"u"||t===void 0||typeof t!="object"||t===null||this.isFormData(t)||!this.hasBlobField(t))return t;const n=new FormData;for(const r in t){const s=t[r];if(typeof s!="object"||this.hasBlobField({data:s})){const o=Array.isArray(s)?s:[s];for(let i of o)n.append(r,i)}else{let o={};o[r]=s,n.append("@jsonPayload",JSON.stringify(o))}}return n}hasBlobField(t){for(const n in t){const r=Array.isArray(t[n])?t[n]:[t[n]];for(const s of r)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(t,n){t=t||{},n=n.toLowerCase();for(let r in t)if(r.toLowerCase()==n)return t[r];return null}isFormData(t){return t&&(t.constructor.name==="FormData"||typeof FormData<"u"&&t instanceof FormData)}serializeQueryParams(t){const n=[];for(const r in t){if(t[r]===null)continue;const s=t[r],o=encodeURIComponent(r);if(Array.isArray(s))for(const i of s)n.push(o+"="+encodeURIComponent(i));else s instanceof Date?n.push(o+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?n.push(o+"="+encodeURIComponent(JSON.stringify(s))):n.push(o+"="+encodeURIComponent(s))}return n.join("&")}}const v4=void 0;console.log(v4);let Xu;const ot=()=>Xu||(Xu=new y4("/"),Xu);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var dj;function xe(){return dj.apply(null,arguments)}function x4(e){dj=e}function Ar(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ni(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function dt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zv(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(dt(e,t))return!1;return!0}function Nn(e){return e===void 0}function zs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function cu(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function fj(e,t){var n=[],r,s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function uo(e,t){for(var n in t)dt(t,n)&&(e[n]=t[n]);return dt(t,"toString")&&(e.toString=t.toString),dt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function os(e,t,n,r){return Ij(e,t,n,r,!0).utc()}function w4(){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 Qe(e){return e._pf==null&&(e._pf=w4()),e._pf}var Sg;Array.prototype.some?Sg=Array.prototype.some:Sg=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function qv(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Qe(e),n=Sg.call(t.parsedDateParts,function(s){return s!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function bh(e){var t=os(NaN);return e!=null?uo(Qe(t),e):Qe(t).userInvalidated=!0,t}var Sb=xe.momentProperties=[],Jm=!1;function Xv(e,t){var n,r,s,o=Sb.length;if(Nn(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Nn(t._i)||(e._i=t._i),Nn(t._f)||(e._f=t._f),Nn(t._l)||(e._l=t._l),Nn(t._strict)||(e._strict=t._strict),Nn(t._tzm)||(e._tzm=t._tzm),Nn(t._isUTC)||(e._isUTC=t._isUTC),Nn(t._offset)||(e._offset=t._offset),Nn(t._pf)||(e._pf=Qe(t)),Nn(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=Sb[n],s=t[r],Nn(s)||(e[r]=s);return e}function uu(e){Xv(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Jm===!1&&(Jm=!0,xe.updateOffset(this),Jm=!1)}function Dr(e){return e instanceof uu||e!=null&&e._isAMomentObject!=null}function hj(e){xe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function hr(e,t){var n=!0;return uo(function(){if(xe.deprecationHandler!=null&&xe.deprecationHandler(null,e),n){var r=[],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])dt(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}hj(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var kb={};function mj(e,t){xe.deprecationHandler!=null&&xe.deprecationHandler(e,t),kb[e]||(hj(t),kb[e]=!0)}xe.suppressDeprecationWarnings=!1;xe.deprecationHandler=null;function is(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function b4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],is(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function kg(e,t){var n=uo({},e),r;for(r in t)dt(t,r)&&(ni(e[r])&&ni(t[r])?(n[r]={},uo(n[r],e[r]),uo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&ni(e[r])&&(n[r]=uo({},n[r]));return n}function Qv(e){e!=null&&this.set(e)}var Cg;Object.keys?Cg=Object.keys:Cg=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var _4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function S4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return is(r)?r.call(t,n):r}function ns(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var Jv=/(\[[^\[]*\])|(\\)?([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,Qu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ep={},ba={};function Le(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(ba[e]=s),t&&(ba[t[0]]=function(){return ns(s.apply(this,arguments),t[1],t[2])}),n&&(ba[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function k4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function C4(e){var t=e.match(Jv),n,r;for(n=0,r=t.length;n<r;n++)ba[t[n]]?t[n]=ba[t[n]]:t[n]=k4(t[n]);return function(s){var o="",i;for(i=0;i<r;i++)o+=is(t[i])?t[i].call(s,e):t[i];return o}}function bd(e,t){return e.isValid()?(t=pj(t,e.localeData()),ep[t]=ep[t]||C4(t),ep[t](e)):e.localeData().invalidDate()}function pj(e,t){var n=5;function r(s){return t.longDateFormat(s)||s}for(Qu.lastIndex=0;n>=0&&Qu.test(e);)e=e.replace(Qu,r),Qu.lastIndex=0,n-=1;return e}var j4={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 E4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Jv).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var N4="Invalid date";function T4(){return this._invalidDate}var P4="%d",R4=/\d{1,2}/;function A4(e){return this._ordinal.replace("%d",e)}var D4={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 O4(e,t,n,r){var s=this._relativeTime[n];return is(s)?s(e,t,n,r):s.replace(/%d/i,e)}function I4(e,t){var n=this._relativeTime[e>0?"future":"past"];return is(n)?n(t):n.replace(/%s/i,t)}var Cb={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 mr(e){return typeof e=="string"?Cb[e]||Cb[e.toLowerCase()]:void 0}function ex(e){var t={},n,r;for(r in e)dt(e,r)&&(n=mr(r),n&&(t[n]=e[r]));return t}var M4={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 L4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:M4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var gj=/\d/,er=/\d\d/,yj=/\d{3}/,tx=/\d{4}/,_h=/[+-]?\d{6}/,jt=/\d\d?/,vj=/\d\d\d\d?/,xj=/\d\d\d\d\d\d?/,Sh=/\d{1,3}/,nx=/\d{1,4}/,kh=/[+-]?\d{1,6}/,rl=/\d+/,Ch=/[+-]?\d+/,z4=/Z|[+-]\d\d:?\d\d/gi,jh=/Z|[+-]\d\d(?::?\d\d)?/gi,F4=/[+-]?\d+(\.\d{1,3})?/,du=/[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,sl=/^[1-9]\d?/,rx=/^([1-9]\d|\d)/,cf;cf={};function Ee(e,t,n){cf[e]=is(t)?t:function(r,s){return r&&n?n:t}}function $4(e,t){return dt(cf,e)?cf[e](t._strict,t._locale):new RegExp(U4(e))}function U4(e){return Ts(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function Ts(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function or(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=or(t)),n}var jg={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),zs(t)&&(r=function(o,i){i[t]=rt(o)}),s=e.length,n=0;n<s;n++)jg[e[n]]=r}function fu(e,t){vt(e,function(n,r,s,o){s._w=s._w||{},t(n,s._w,s,o)})}function V4(e,t,n){t!=null&&dt(jg,e)&&jg[e](t,n._a,n,e)}function Eh(e){return e%4===0&&e%100!==0||e%400===0}var pn=0,Cs=1,Hr=2,qt=3,kr=4,js=5,qo=6,B4=7,W4=8;Le("Y",0,0,function(){var e=this.year();return e<=9999?ns(e,4):"+"+e});Le(0,["YY",2],0,function(){return this.year()%100});Le(0,["YYYY",4],0,"year");Le(0,["YYYYY",5],0,"year");Le(0,["YYYYYY",6,!0],0,"year");Ee("Y",Ch);Ee("YY",jt,er);Ee("YYYY",nx,tx);Ee("YYYYY",kh,_h);Ee("YYYYYY",kh,_h);vt(["YYYYY","YYYYYY"],pn);vt("YYYY",function(e,t){t[pn]=e.length===2?xe.parseTwoDigitYear(e):rt(e)});vt("YY",function(e,t){t[pn]=xe.parseTwoDigitYear(e)});vt("Y",function(e,t){t[pn]=parseInt(e,10)});function Xl(e){return Eh(e)?366:365}xe.parseTwoDigitYear=function(e){return rt(e)+(rt(e)>68?1900:2e3)};var wj=ol("FullYear",!0);function H4(){return Eh(this.year())}function ol(e,t){return function(n){return n!=null?(bj(this,e,n),xe.updateOffset(this,t),this):jc(this,e)}}function jc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function bj(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Eh(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function Y4(e){return e=mr(e),is(this[e])?this[e]():this}function K4(e,t){if(typeof e=="object"){e=ex(e);var n=L4(e),r,s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(e=mr(e),is(this[e]))return this[e](t);return this}function G4(e,t){return(e%t+t)%t}var $t;Array.prototype.indexOf?$t=Array.prototype.indexOf:$t=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function sx(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=G4(t,12);return e+=(t-n)/12,n===1?Eh(e)?29:28:31-n%7%2}Le("M",["MM",2],"Mo",function(){return this.month()+1});Le("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Le("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ee("M",jt,sl);Ee("MM",jt,er);Ee("MMM",function(e,t){return t.monthsShortRegex(e)});Ee("MMMM",function(e,t){return t.monthsRegex(e)});vt(["M","MM"],function(e,t){t[Cs]=rt(e)-1});vt(["MMM","MMMM"],function(e,t,n,r){var s=n._locale.monthsParse(e,r,n._strict);s!=null?t[Cs]=s:Qe(n).invalidMonth=e});var Z4="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),_j="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Sj=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,q4=du,X4=du;function Q4(e,t){return e?Ar(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Sj).test(t)?"format":"standalone"][e.month()]:Ar(this._months)?this._months:this._months.standalone}function J4(e,t){return e?Ar(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Sj.test(t)?"format":"standalone"][e.month()]:Ar(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function e3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=os([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(s=$t.call(this._shortMonthsParse,i),s!==-1?s:null):(s=$t.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=$t.call(this._shortMonthsParse,i),s!==-1?s:(s=$t.call(this._longMonthsParse,i),s!==-1?s:null)):(s=$t.call(this._longMonthsParse,i),s!==-1?s:(s=$t.call(this._shortMonthsParse,i),s!==-1?s:null))}function t3(e,t,n){var r,s,o;if(this._monthsParseExact)return e3.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(s=os([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function kj(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=rt(t);else if(t=e.localeData().monthsParse(t),!zs(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,sx(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Cj(e){return e!=null?(kj(this,e),xe.updateOffset(this,!0),this):jc(this,"Month")}function n3(){return sx(this.year(),this.month())}function r3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||jj.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(dt(this,"_monthsShortRegex")||(this._monthsShortRegex=q4),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function s3(e){return this._monthsParseExact?(dt(this,"_monthsRegex")||jj.call(this),e?this._monthsStrictRegex:this._monthsRegex):(dt(this,"_monthsRegex")||(this._monthsRegex=X4),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function jj(){function e(c,u){return u.length-c.length}var t=[],n=[],r=[],s,o,i,a;for(s=0;s<12;s++)o=os([2e3,s]),i=Ts(this.monthsShort(o,"")),a=Ts(this.months(o,"")),t.push(i),n.push(a),r.push(a),r.push(i);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function o3(e,t,n,r,s,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function Ec(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function uf(e,t,n){var r=7+t-n,s=(7+Ec(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Ej(e,t,n,r,s){var o=(7+n-r)%7,i=uf(e,r,s),a=1+7*(t-1)+o+i,c,u;return a<=0?(c=e-1,u=Xl(c)+a):a>Xl(e)?(c=e+1,u=a-Xl(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Nc(e,t,n){var r=uf(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Ps(i,t,n)):s>Ps(e.year(),t,n)?(o=s-Ps(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Ps(e,t,n){var r=uf(e,t,n),s=uf(e+1,t,n);return(Xl(e)-r+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");Ee("w",jt,sl);Ee("ww",jt,er);Ee("W",jt,sl);Ee("WW",jt,er);fu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=rt(e)});function i3(e){return Nc(e,this._week.dow,this._week.doy).week}var a3={dow:0,doy:6};function l3(){return this._week.dow}function c3(){return this._week.doy}function u3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function d3(e){var t=Nc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Le("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Le("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");Ee("d",jt);Ee("e",jt);Ee("E",jt);Ee("dd",function(e,t){return t.weekdaysMinRegex(e)});Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ee("dddd",function(e,t){return t.weekdaysRegex(e)});fu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Qe(n).invalidWeekday=e});fu(["d","e","E"],function(e,t,n,r){t[r]=rt(e)});function f3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function h3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ox(e,t){return e.slice(t,7).concat(e.slice(0,t))}var m3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Nj="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),p3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),g3=du,y3=du,v3=du;function x3(e,t){var n=Ar(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ox(n,this._week.dow):e?n[e.day()]:n}function w3(e){return e===!0?ox(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function b3(e){return e===!0?ox(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function _3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=os([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1||(s=$t.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=$t.call(this._minWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function S3(e,t,n){var r,s,o;if(this._weekdaysParseExact)return _3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=os([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function k3(e){if(!this.isValid())return e!=null?this:NaN;var t=jc(this,"Day");return e!=null?(e=f3(e,this.localeData()),this.add(e-t,"d")):t}function C3(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 j3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=h3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function E3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ix.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=g3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function N3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ix.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=y3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function T3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ix.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=v3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ix(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,c,u;for(o=0;o<7;o++)i=os([2e3,1]).day(o),a=Ts(this.weekdaysMin(i,"")),c=Ts(this.weekdaysShort(i,"")),u=Ts(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),s.push(a),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ax(){return this.hours()%12||12}function P3(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,ax);Le("k",["kk",2],0,P3);Le("hmm",0,0,function(){return""+ax.apply(this)+ns(this.minutes(),2)});Le("hmmss",0,0,function(){return""+ax.apply(this)+ns(this.minutes(),2)+ns(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+ns(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+ns(this.minutes(),2)+ns(this.seconds(),2)});function Tj(e,t){Le(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Tj("a",!0);Tj("A",!1);function Pj(e,t){return t._meridiemParse}Ee("a",Pj);Ee("A",Pj);Ee("H",jt,rx);Ee("h",jt,sl);Ee("k",jt,sl);Ee("HH",jt,er);Ee("hh",jt,er);Ee("kk",jt,er);Ee("hmm",vj);Ee("hmmss",xj);Ee("Hmm",vj);Ee("Hmmss",xj);vt(["H","HH"],qt);vt(["k","kk"],function(e,t,n){var r=rt(e);t[qt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[qt]=rt(e),Qe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[qt]=rt(e.substr(0,r)),t[kr]=rt(e.substr(r)),Qe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=rt(e.substr(0,r)),t[kr]=rt(e.substr(r,2)),t[js]=rt(e.substr(s)),Qe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[qt]=rt(e.substr(0,r)),t[kr]=rt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=rt(e.substr(0,r)),t[kr]=rt(e.substr(r,2)),t[js]=rt(e.substr(s))});function R3(e){return(e+"").toLowerCase().charAt(0)==="p"}var A3=/[ap]\.?m?\.?/i,D3=ol("Hours",!0);function O3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Rj={calendar:_4,longDateFormat:j4,invalidDate:N4,ordinal:P4,dayOfMonthOrdinalParse:R4,relativeTime:D4,months:Z4,monthsShort:_j,week:a3,weekdays:m3,weekdaysMin:p3,weekdaysShort:Nj,meridiemParse:A3},Tt={},kl={},Tc;function I3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function jb(e){return e&&e.toLowerCase().replace("_","-")}function M3(e){for(var t=0,n,r,s,o;t<e.length;){for(o=jb(e[t]).split("-"),n=o.length,r=jb(e[t+1]),r=r?r.split("-"):null;n>0;){if(s=Nh(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&I3(o,r)>=n-1)break;n--}t++}return Tc}function L3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Nh(e){var t=null,n;if(Tt[e]===void 0&&typeof Ed<"u"&&Ed&&Ed.exports&&L3(e))try{t=Tc._abbr,n=require,n("./locale/"+e),_o(t)}catch{Tt[e]=null}return Tt[e]}function _o(e,t){var n;return e&&(Nn(t)?n=Ys(e):n=lx(e,t),n?Tc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Tc._abbr}function lx(e,t){if(t!==null){var n,r=Rj;if(t.abbr=e,Tt[e]!=null)mj("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."),r=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)r=Tt[t.parentLocale]._config;else if(n=Nh(t.parentLocale),n!=null)r=n._config;else return kl[t.parentLocale]||(kl[t.parentLocale]=[]),kl[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new Qv(kg(r,t)),kl[e]&&kl[e].forEach(function(s){lx(s.name,s.config)}),_o(e),Tt[e]}else return delete Tt[e],null}function z3(e,t){if(t!=null){var n,r,s=Rj;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(kg(Tt[e]._config,t)):(r=Nh(e),r!=null&&(s=r._config),t=kg(s,t),r==null&&(t.abbr=e),n=new Qv(t),n.parentLocale=Tt[e],Tt[e]=n),_o(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===_o()&&_o(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ys(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Tc;if(!Ar(e)){if(t=Nh(e),t)return t;e=[e]}return M3(e)}function F3(){return Cg(Tt)}function cx(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[Cs]<0||n[Cs]>11?Cs:n[Hr]<1||n[Hr]>sx(n[pn],n[Cs])?Hr:n[qt]<0||n[qt]>24||n[qt]===24&&(n[kr]!==0||n[js]!==0||n[qo]!==0)?qt:n[kr]<0||n[kr]>59?kr:n[js]<0||n[js]>59?js:n[qo]<0||n[qo]>999?qo:-1,Qe(e)._overflowDayOfYear&&(t<pn||t>Hr)&&(t=Hr),Qe(e)._overflowWeeks&&t===-1&&(t=B4),Qe(e)._overflowWeekday&&t===-1&&(t=W4),Qe(e).overflow=t),e}var $3=/^\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)?)?$/,U3=/^\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)?)?$/,V3=/Z|[+-]\d\d(?::?\d\d)?/,Ju=[["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]],tp=[["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/]],B3=/^\/?Date\((-?\d+)/i,W3=/^(?:(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}))$/,H3={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 Aj(e){var t,n,r=e._i,s=$3.exec(r)||U3.exec(r),o,i,a,c,u=Ju.length,d=tp.length;if(s){for(Qe(e).iso=!0,t=0,n=u;t<n;t++)if(Ju[t][1].exec(s[1])){i=Ju[t][0],o=Ju[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,n=d;t<n;t++)if(tp[t][1].exec(s[3])){a=(s[2]||" ")+tp[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(s[4])if(V3.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=i+(a||"")+(c||""),dx(e)}else e._isValid=!1}function Y3(e,t,n,r,s,o){var i=[K3(e),_j.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function K3(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function G3(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Z3(e,t,n){if(e){var r=Nj.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(r!==s)return Qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function q3(e,t,n){if(e)return H3[e];if(t)return 0;var r=parseInt(n,10),s=r%100,o=(r-s)/100;return o*60+s}function Dj(e){var t=W3.exec(G3(e._i)),n;if(t){if(n=Y3(t[4],t[3],t[2],t[5],t[6],t[7]),!Z3(t[1],n,e))return;e._a=n,e._tzm=q3(t[8],t[9],t[10]),e._d=Ec.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Qe(e).rfc2822=!0}else e._isValid=!1}function X3(e){var t=B3.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Aj(e),e._isValid===!1)delete e._isValid;else return;if(Dj(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:xe.createFromInputFallback(e)}xe.createFromInputFallback=hr("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 Hi(e,t,n){return e??t??n}function Q3(e){var t=new Date(xe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ux(e){var t,n,r=[],s,o,i;if(!e._d){for(s=Q3(e),e._w&&e._a[Hr]==null&&e._a[Cs]==null&&J3(e),e._dayOfYear!=null&&(i=Hi(e._a[pn],s[pn]),(e._dayOfYear>Xl(i)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Ec(i,0,e._dayOfYear),e._a[Cs]=n.getUTCMonth(),e._a[Hr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[qt]===24&&e._a[kr]===0&&e._a[js]===0&&e._a[qo]===0&&(e._nextDay=!0,e._a[qt]=0),e._d=(e._useUTC?Ec:o3).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Qe(e).weekdayMismatch=!0)}}function J3(e){var t,n,r,s,o,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Hi(t.GG,e._a[pn],Nc(Ct(),1,4).year),r=Hi(t.W,1),s=Hi(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Nc(Ct(),o,i),n=Hi(t.gg,e._a[pn],u.year),r=Hi(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),r<1||r>Ps(n,o,i)?Qe(e)._overflowWeeks=!0:c!=null?Qe(e)._overflowWeekday=!0:(a=Ej(n,r,s,o,i),e._a[pn]=a.year,e._dayOfYear=a.dayOfYear)}xe.ISO_8601=function(){};xe.RFC_2822=function(){};function dx(e){if(e._f===xe.ISO_8601){Aj(e);return}if(e._f===xe.RFC_2822){Dj(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,c=0,u,d;for(s=pj(e._f,e._locale).match(Jv)||[],d=s.length,n=0;n<d;n++)o=s[n],r=(t.match($4(o,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&Qe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),ba[o]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(o),V4(o,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(o);Qe(e).charsLeftOver=a-c,t.length>0&&Qe(e).unusedInput.push(t),e._a[qt]<=12&&Qe(e).bigHour===!0&&e._a[qt]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[qt]=e5(e._locale,e._a[qt],e._meridiem),u=Qe(e).era,u!==null&&(e._a[pn]=e._locale.erasConvertYear(u,e._a[pn])),ux(e),cx(e)}function e5(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function t5(e){var t,n,r,s,o,i,a=!1,c=e._f.length;if(c===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)o=0,i=!1,t=Xv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],dx(t),qv(t)&&(i=!0),o+=Qe(t).charsLeftOver,o+=Qe(t).unusedTokens.length*10,Qe(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||i)&&(r=o,n=t,i&&(a=!0));uo(e,n||t)}function n5(e){if(!e._d){var t=ex(e._i),n=t.day===void 0?t.date:t.day;e._a=fj([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),ux(e)}}function r5(e){var t=new uu(cx(Oj(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Oj(e){var t=e._i,n=e._f;return e._locale=e._locale||Ys(e._l),t===null||n===void 0&&t===""?bh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Dr(t)?new uu(cx(t)):(cu(t)?e._d=t:Ar(n)?t5(e):n?dx(e):s5(e),qv(e)||(e._d=null),e))}function s5(e){var t=e._i;Nn(t)?e._d=new Date(xe.now()):cu(t)?e._d=new Date(t.valueOf()):typeof t=="string"?X3(e):Ar(t)?(e._a=fj(t.slice(0),function(n){return parseInt(n,10)}),ux(e)):ni(t)?n5(e):zs(t)?e._d=new Date(t):xe.createFromInputFallback(e)}function Ij(e,t,n,r,s){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ni(e)&&Zv(e)||Ar(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=n,o._i=e,o._f=t,o._strict=r,r5(o)}function Ct(e,t,n,r){return Ij(e,t,n,r,!1)}var o5=hr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:bh()}),i5=hr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:bh()});function Mj(e,t){var n,r;if(t.length===1&&Ar(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function a5(){var e=[].slice.call(arguments,0);return Mj("isBefore",e)}function l5(){var e=[].slice.call(arguments,0);return Mj("isAfter",e)}var c5=function(){return Date.now?Date.now():+new Date},Cl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function u5(e){var t,n=!1,r,s=Cl.length;for(t in e)if(dt(e,t)&&!($t.call(Cl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<s;++r)if(e[Cl[r]]){if(n)return!1;parseFloat(e[Cl[r]])!==rt(e[Cl[r]])&&(n=!0)}return!0}function d5(){return this._isValid}function f5(){return Lr(NaN)}function Th(e){var t=ex(e),n=t.year||0,r=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,a=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=u5(t),this._milliseconds=+d+u*1e3+c*6e4+a*1e3*60*60,this._days=+i+o*7,this._months=+s+r*3+n*12,this._data={},this._locale=Ys(),this._bubble()}function _d(e){return e instanceof Th}function Eg(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function h5(e,t,n){var r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<r;i++)rt(e[i])!==rt(t[i])&&o++;return o+s}function Lj(e,t){Le(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+ns(~~(n/60),2)+t+ns(~~n%60,2)})}Lj("Z",":");Lj("ZZ","");Ee("Z",jh);Ee("ZZ",jh);vt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=fx(jh,e)});var m5=/([\+\-]|\d\d)/gi;function fx(e,t){var n=(t||"").match(e),r,s,o;return n===null?null:(r=n[n.length-1]||[],s=(r+"").match(m5)||["-",0,0],o=+(s[1]*60)+rt(s[2]),o===0?0:s[0]==="+"?o:-o)}function hx(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(Dr(e)||cu(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),xe.updateOffset(n,!1),n):Ct(e).local()}function Ng(e){return-Math.round(e._d.getTimezoneOffset())}xe.updateOffset=function(){};function p5(e,t,n){var r=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=fx(jh,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=Ng(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),r!==e&&(!t||this._changeInProgress?$j(this,Lr(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,xe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:Ng(this)}function g5(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function y5(e){return this.utcOffset(0,e)}function v5(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ng(this),"m")),this}function x5(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=fx(z4,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function w5(e){return this.isValid()?(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function b5(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _5(){if(!Nn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Xv(e,this),e=Oj(e),e._a?(t=e._isUTC?os(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&h5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function S5(){return this.isValid()?!this._isUTC:!1}function k5(){return this.isValid()?this._isUTC:!1}function zj(){return this.isValid()?this._isUTC&&this._offset===0:!1}var C5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,j5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Lr(e,t){var n=e,r=null,s,o,i;return _d(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:zs(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=C5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:rt(r[Hr])*s,h:rt(r[qt])*s,m:rt(r[kr])*s,s:rt(r[js])*s,ms:rt(Eg(r[qo]*1e3))*s}):(r=j5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Fo(r[2],s),M:Fo(r[3],s),w:Fo(r[4],s),d:Fo(r[5],s),h:Fo(r[6],s),m:Fo(r[7],s),s:Fo(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=E5(Ct(n.from),Ct(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Th(n),_d(e)&&dt(e,"_locale")&&(o._locale=e._locale),_d(e)&&dt(e,"_isValid")&&(o._isValid=e._isValid),o}Lr.fn=Th.prototype;Lr.invalid=f5;function Fo(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Eb(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function E5(e,t){var n;return e.isValid()&&t.isValid()?(t=hx(t,e),e.isBefore(t)?n=Eb(e,t):(n=Eb(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Fj(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(mj(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=n,n=r,r=o),s=Lr(n,r),$j(this,s,e),this}}function $j(e,t,n,r){var s=t._milliseconds,o=Eg(t._days),i=Eg(t._months);e.isValid()&&(r=r??!0,i&&kj(e,jc(e,"Month")+i*n),o&&bj(e,"Date",jc(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&xe.updateOffset(e,o||i))}var N5=Fj(1,"add"),T5=Fj(-1,"subtract");function Uj(e){return typeof e=="string"||e instanceof String}function P5(e){return Dr(e)||cu(e)||Uj(e)||zs(e)||A5(e)||R5(e)||e===null||e===void 0}function R5(e){var t=ni(e)&&!Zv(e),n=!1,r=["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=r.length;for(s=0;s<i;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function A5(e){var t=Ar(e),n=!1;return t&&(n=e.filter(function(r){return!zs(r)&&Uj(e)}).length===0),t&&n}function D5(e){var t=ni(e)&&!Zv(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<r.length;s+=1)o=r[s],n=n||dt(e,o);return t&&n}function O5(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function I5(e,t){arguments.length===1&&(arguments[0]?P5(arguments[0])?(e=arguments[0],t=void 0):D5(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ct(),r=hx(n,this).startOf("day"),s=xe.calendarFormat(this,r)||"sameElse",o=t&&(is(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,Ct(n)))}function M5(){return new uu(this)}function L5(e,t){var n=Dr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=mr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function z5(e,t){var n=Dr(e)?e:Ct(e);return this.isValid()&&n.isValid()?(t=mr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function F5(e,t,n,r){var s=Dr(e)?e:Ct(e),o=Dr(t)?t:Ct(t);return this.isValid()&&s.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function $5(e,t){var n=Dr(e)?e:Ct(e),r;return this.isValid()&&n.isValid()?(t=mr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function U5(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function V5(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function B5(e,t,n){var r,s,o;if(!this.isValid())return NaN;if(r=hx(e,this),!r.isValid())return NaN;switch(s=(r.utcOffset()-this.utcOffset())*6e4,t=mr(t),t){case"year":o=Sd(this,r)/12;break;case"month":o=Sd(this,r);break;case"quarter":o=Sd(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-s)/864e5;break;case"week":o=(this-r-s)/6048e5;break;default:o=this-r}return n?o:or(o)}function Sd(e,t){if(e.date()<t.date())return-Sd(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),s,o;return t-r<0?(s=e.clone().add(n-1,"months"),o=(t-r)/(r-s)):(s=e.clone().add(n+1,"months"),o=(t-r)/(s-r)),-(n+o)||0}xe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";xe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function W5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function H5(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?bd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):is(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",bd(n,"Z")):bd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Y5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function K5(e){e||(e=this.isUtc()?xe.defaultFormatUtc:xe.defaultFormat);var t=bd(this,e);return this.localeData().postformat(t)}function G5(e,t){return this.isValid()&&(Dr(e)&&e.isValid()||Ct(e).isValid())?Lr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Z5(e){return this.from(Ct(),e)}function q5(e,t){return this.isValid()&&(Dr(e)&&e.isValid()||Ct(e).isValid())?Lr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function X5(e){return this.to(Ct(),e)}function Vj(e){var t;return e===void 0?this._locale._abbr:(t=Ys(e),t!=null&&(this._locale=t),this)}var Bj=hr("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 Wj(){return this._locale}var df=1e3,_a=60*df,ff=60*_a,Hj=(365*400+97)*24*ff;function Sa(e,t){return(e%t+t)%t}function Yj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Hj:new Date(e,t,n).valueOf()}function Kj(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Hj:Date.UTC(e,t,n)}function Q5(e){var t,n;if(e=mr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kj:Yj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Sa(t+(this._isUTC?0:this.utcOffset()*_a),ff);break;case"minute":t=this._d.valueOf(),t-=Sa(t,_a);break;case"second":t=this._d.valueOf(),t-=Sa(t,df);break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function J5(e){var t,n;if(e=mr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kj:Yj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ff-Sa(t+(this._isUTC?0:this.utcOffset()*_a),ff)-1;break;case"minute":t=this._d.valueOf(),t+=_a-Sa(t,_a)-1;break;case"second":t=this._d.valueOf(),t+=df-Sa(t,df)-1;break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function e6(){return this._d.valueOf()-(this._offset||0)*6e4}function t6(){return Math.floor(this.valueOf()/1e3)}function n6(){return new Date(this.valueOf())}function r6(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function s6(){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 o6(){return this.isValid()?this.toISOString():null}function i6(){return qv(this)}function a6(){return uo({},Qe(this))}function l6(){return Qe(this).overflow}function c6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");Ee("N",mx);Ee("NN",mx);Ee("NNN",mx);Ee("NNNN",w6);Ee("NNNNN",b6);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Qe(n).era=s:Qe(n).invalidEra=e});Ee("y",rl);Ee("yy",rl);Ee("yyy",rl);Ee("yyyy",rl);Ee("yo",_6);vt(["y","yy","yyy","yyyy"],pn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pn]=n._locale.eraYearOrdinalParse(e,s):t[pn]=parseInt(e,10)});function u6(e,t){var n,r,s,o=this._eras||Ys("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":s=xe(o[n].since).startOf("day"),o[n].since=s.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=xe(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf();break}}return o}function d6(e,t,n){var r,s,o=this.eras(),i,a,c;for(e=e.toUpperCase(),r=0,s=o.length;r<s;++r)if(i=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),c=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(i===e)return o[r];break;case"NNNNN":if(c===e)return o[r];break}else if([i,a,c].indexOf(e)>=0)return o[r]}function f6(e,t){var n=e.since<=e.until?1:-1;return t===void 0?xe(e.since).year():xe(e.since).year()+(t-e.offset)*n}function h6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function m6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function p6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function g6(){var e,t,n,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return(this.year()-xe(s[e].since).year())*n+s[e].offset;return this.year()}function y6(e){return dt(this,"_erasNameRegex")||px.call(this),e?this._erasNameRegex:this._erasRegex}function v6(e){return dt(this,"_erasAbbrRegex")||px.call(this),e?this._erasAbbrRegex:this._erasRegex}function x6(e){return dt(this,"_erasNarrowRegex")||px.call(this),e?this._erasNarrowRegex:this._erasRegex}function mx(e,t){return t.erasAbbrRegex(e)}function w6(e,t){return t.erasNameRegex(e)}function b6(e,t){return t.erasNarrowRegex(e)}function _6(e,t){return t._eraYearOrdinalRegex||rl}function px(){var e=[],t=[],n=[],r=[],s,o,i,a,c,u=this.eras();for(s=0,o=u.length;s<o;++s)i=Ts(u[s].name),a=Ts(u[s].abbr),c=Ts(u[s].narrow),t.push(i),e.push(a),n.push(c),r.push(i),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Le(0,["gg",2],0,function(){return this.weekYear()%100});Le(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ph(e,t){Le(0,[e,e.length],0,t)}Ph("gggg","weekYear");Ph("ggggg","weekYear");Ph("GGGG","isoWeekYear");Ph("GGGGG","isoWeekYear");Ee("G",Ch);Ee("g",Ch);Ee("GG",jt,er);Ee("gg",jt,er);Ee("GGGG",nx,tx);Ee("gggg",nx,tx);Ee("GGGGG",kh,_h);Ee("ggggg",kh,_h);fu(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=rt(e)});fu(["gg","GG"],function(e,t,n,r){t[r]=xe.parseTwoDigitYear(e)});function S6(e){return Gj.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function k6(e){return Gj.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function C6(){return Ps(this.year(),1,4)}function j6(){return Ps(this.isoWeekYear(),1,4)}function E6(){var e=this.localeData()._week;return Ps(this.year(),e.dow,e.doy)}function N6(){var e=this.localeData()._week;return Ps(this.weekYear(),e.dow,e.doy)}function Gj(e,t,n,r,s){var o;return e==null?Nc(this,r,s).year:(o=Ps(e,r,s),t>o&&(t=o),T6.call(this,e,t,n,r,s))}function T6(e,t,n,r,s){var o=Ej(e,t,n,r,s),i=Ec(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Le("Q",0,"Qo","quarter");Ee("Q",gj);vt("Q",function(e,t){t[Cs]=(rt(e)-1)*3});function P6(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");Ee("D",jt,sl);Ee("DD",jt,er);Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Hr);vt("Do",function(e,t){t[Hr]=rt(e.match(jt)[0])});var Zj=ol("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");Ee("DDD",Sh);Ee("DDDD",yj);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=rt(e)});function R6(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Le("m",["mm",2],0,"minute");Ee("m",jt,rx);Ee("mm",jt,er);vt(["m","mm"],kr);var A6=ol("Minutes",!1);Le("s",["ss",2],0,"second");Ee("s",jt,rx);Ee("ss",jt,er);vt(["s","ss"],js);var D6=ol("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ee("S",Sh,gj);Ee("SS",Sh,er);Ee("SSS",Sh,yj);var fo,qj;for(fo="SSSS";fo.length<=9;fo+="S")Ee(fo,rl);function O6(e,t){t[qo]=rt(("0."+e)*1e3)}for(fo="S";fo.length<=9;fo+="S")vt(fo,O6);qj=ol("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function I6(){return this._isUTC?"UTC":""}function M6(){return this._isUTC?"Coordinated Universal Time":""}var le=uu.prototype;le.add=N5;le.calendar=I5;le.clone=M5;le.diff=B5;le.endOf=J5;le.format=K5;le.from=G5;le.fromNow=Z5;le.to=q5;le.toNow=X5;le.get=Y4;le.invalidAt=l6;le.isAfter=L5;le.isBefore=z5;le.isBetween=F5;le.isSame=$5;le.isSameOrAfter=U5;le.isSameOrBefore=V5;le.isValid=i6;le.lang=Bj;le.locale=Vj;le.localeData=Wj;le.max=i5;le.min=o5;le.parsingFlags=a6;le.set=K4;le.startOf=Q5;le.subtract=T5;le.toArray=r6;le.toObject=s6;le.toDate=n6;le.toISOString=H5;le.inspect=Y5;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=o6;le.toString=W5;le.unix=t6;le.valueOf=e6;le.creationData=c6;le.eraName=h6;le.eraNarrow=m6;le.eraAbbr=p6;le.eraYear=g6;le.year=wj;le.isLeapYear=H4;le.weekYear=S6;le.isoWeekYear=k6;le.quarter=le.quarters=P6;le.month=Cj;le.daysInMonth=n3;le.week=le.weeks=u3;le.isoWeek=le.isoWeeks=d3;le.weeksInYear=E6;le.weeksInWeekYear=N6;le.isoWeeksInYear=C6;le.isoWeeksInISOWeekYear=j6;le.date=Zj;le.day=le.days=k3;le.weekday=C3;le.isoWeekday=j3;le.dayOfYear=R6;le.hour=le.hours=D3;le.minute=le.minutes=A6;le.second=le.seconds=D6;le.millisecond=le.milliseconds=qj;le.utcOffset=p5;le.utc=y5;le.local=v5;le.parseZone=x5;le.hasAlignedHourOffset=w5;le.isDST=b5;le.isLocal=S5;le.isUtcOffset=k5;le.isUtc=zj;le.isUTC=zj;le.zoneAbbr=I6;le.zoneName=M6;le.dates=hr("dates accessor is deprecated. Use date instead.",Zj);le.months=hr("months accessor is deprecated. Use month instead",Cj);le.years=hr("years accessor is deprecated. Use year instead",wj);le.zone=hr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",g5);le.isDSTShifted=hr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_5);function L6(e){return Ct(e*1e3)}function z6(){return Ct.apply(null,arguments).parseZone()}function Xj(e){return e}var ft=Qv.prototype;ft.calendar=S4;ft.longDateFormat=E4;ft.invalidDate=T4;ft.ordinal=A4;ft.preparse=Xj;ft.postformat=Xj;ft.relativeTime=O4;ft.pastFuture=I4;ft.set=b4;ft.eras=u6;ft.erasParse=d6;ft.erasConvertYear=f6;ft.erasAbbrRegex=v6;ft.erasNameRegex=y6;ft.erasNarrowRegex=x6;ft.months=Q4;ft.monthsShort=J4;ft.monthsParse=t3;ft.monthsRegex=s3;ft.monthsShortRegex=r3;ft.week=i3;ft.firstDayOfYear=c3;ft.firstDayOfWeek=l3;ft.weekdays=x3;ft.weekdaysMin=b3;ft.weekdaysShort=w3;ft.weekdaysParse=S3;ft.weekdaysRegex=E3;ft.weekdaysShortRegex=N3;ft.weekdaysMinRegex=T3;ft.isPM=R3;ft.meridiem=O3;function hf(e,t,n,r){var s=Ys(),o=os().set(r,t);return s[n](o,e)}function Qj(e,t,n){if(zs(e)&&(t=e,e=void 0),e=e||"",t!=null)return hf(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=hf(e,r,n,"month");return s}function gx(e,t,n,r){typeof e=="boolean"?(zs(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,zs(t)&&(n=t,t=void 0),t=t||"");var s=Ys(),o=e?s._week.dow:0,i,a=[];if(n!=null)return hf(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=hf(t,(i+o)%7,r,"day");return a}function F6(e,t){return Qj(e,t,"months")}function $6(e,t){return Qj(e,t,"monthsShort")}function U6(e,t,n){return gx(e,t,n,"weekdays")}function V6(e,t,n){return gx(e,t,n,"weekdaysShort")}function B6(e,t,n){return gx(e,t,n,"weekdaysMin")}_o("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,n=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});xe.lang=hr("moment.lang is deprecated. Use moment.locale instead.",_o);xe.langData=hr("moment.langData is deprecated. Use moment.localeData instead.",Ys);var gs=Math.abs;function W6(){var e=this._data;return this._milliseconds=gs(this._milliseconds),this._days=gs(this._days),this._months=gs(this._months),e.milliseconds=gs(e.milliseconds),e.seconds=gs(e.seconds),e.minutes=gs(e.minutes),e.hours=gs(e.hours),e.months=gs(e.months),e.years=gs(e.years),this}function Jj(e,t,n,r){var s=Lr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function H6(e,t){return Jj(this,e,t,1)}function Y6(e,t){return Jj(this,e,t,-1)}function Nb(e){return e<0?Math.floor(e):Math.ceil(e)}function K6(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Nb(Tg(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=or(e/1e3),r.seconds=s%60,o=or(s/60),r.minutes=o%60,i=or(o/60),r.hours=i%24,t+=or(i/24),c=or(eE(t)),n+=c,t-=Nb(Tg(c)),a=or(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function eE(e){return e*4800/146097}function Tg(e){return e*146097/4800}function G6(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=mr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+eE(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Tg(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Ks(e){return function(){return this.as(e)}}var tE=Ks("ms"),Z6=Ks("s"),q6=Ks("m"),X6=Ks("h"),Q6=Ks("d"),J6=Ks("w"),e$=Ks("M"),t$=Ks("Q"),n$=Ks("y"),r$=tE;function s$(){return Lr(this)}function o$(e){return e=mr(e),this.isValid()?this[e+"s"]():NaN}function Ei(e){return function(){return this.isValid()?this._data[e]:NaN}}var i$=Ei("milliseconds"),a$=Ei("seconds"),l$=Ei("minutes"),c$=Ei("hours"),u$=Ei("days"),d$=Ei("months"),f$=Ei("years");function h$(){return or(this.days()/7)}var ws=Math.round,la={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function m$(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function p$(e,t,n,r){var s=Lr(e).abs(),o=ws(s.as("s")),i=ws(s.as("m")),a=ws(s.as("h")),c=ws(s.as("d")),u=ws(s.as("M")),d=ws(s.as("w")),f=ws(s.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||i<=1&&["m"]||i<n.m&&["mm",i]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=r,m$.apply(null,h)}function g$(e){return e===void 0?ws:typeof e=="function"?(ws=e,!0):!1}function y$(e,t){return la[e]===void 0?!1:t===void 0?la[e]:(la[e]=t,e==="s"&&(la.ss=t-1),!0)}function v$(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=la,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},la,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=p$(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var np=Math.abs;function Ui(e){return(e>0)-(e<0)||+e}function Rh(){if(!this.isValid())return this.localeData().invalidDate();var e=np(this._milliseconds)/1e3,t=np(this._days),n=np(this._months),r,s,o,i,a=this.asSeconds(),c,u,d,f;return a?(r=or(e/60),s=or(r/60),e%=60,r%=60,o=or(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Ui(this._months)!==Ui(a)?"-":"",d=Ui(this._days)!==Ui(a)?"-":"",f=Ui(this._milliseconds)!==Ui(a)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var at=Th.prototype;at.isValid=d5;at.abs=W6;at.add=H6;at.subtract=Y6;at.as=G6;at.asMilliseconds=tE;at.asSeconds=Z6;at.asMinutes=q6;at.asHours=X6;at.asDays=Q6;at.asWeeks=J6;at.asMonths=e$;at.asQuarters=t$;at.asYears=n$;at.valueOf=r$;at._bubble=K6;at.clone=s$;at.get=o$;at.milliseconds=i$;at.seconds=a$;at.minutes=l$;at.hours=c$;at.days=u$;at.weeks=h$;at.months=d$;at.years=f$;at.humanize=v$;at.toISOString=Rh;at.toString=Rh;at.toJSON=Rh;at.locale=Vj;at.localeData=Wj;at.toIsoString=hr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rh);at.lang=Bj;Le("X",0,0,"unix");Le("x",0,0,"valueOf");Ee("x",Ch);Ee("X",F4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(rt(e))});//! moment.js
xe.version="2.30.1";x4(Ct);xe.fn=le;xe.min=a5;xe.max=l5;xe.now=c5;xe.utc=os;xe.unix=L6;xe.months=F6;xe.isDate=cu;xe.locale=_o;xe.invalid=bh;xe.duration=Lr;xe.isMoment=Dr;xe.weekdays=U6;xe.parseZone=z6;xe.localeData=Ys;xe.isDuration=_d;xe.monthsShort=$6;xe.weekdaysMin=B6;xe.defineLocale=lx;xe.updateLocale=z3;xe.locales=F3;xe.weekdaysShort=V6;xe.normalizeUnits=mr;xe.relativeTimeRounding=g$;xe.relativeTimeThreshold=y$;xe.calendarFormat=O5;xe.prototype=le;xe.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 x$=async()=>await ot().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),as=async e=>e.id?await ot().collection("access").update(e.id,e):await ot().collection("access").create(e),w$=async e=>(e.deleted=xe.utc().format("YYYY-MM-DD HH:mm:ss"),await ot().collection("access").update(e.id,e)),Tb=async()=>await ot().collection("access_groups").getFullList({sort:"-created",expand:"access"}),b$=async e=>{const t=ot();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},_$=async e=>{const t=ot();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Pb=async e=>await ot().collection("access_groups").update(e.id,e),S$=async()=>{try{return await ot().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},yx=async e=>{try{return await ot().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},il=async e=>{const t=ot();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},k$=(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(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},nE=y.createContext({}),ln=()=>y.useContext(nE),C$=({children:e})=>{const[t,n]=y.useReducer(k$,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});y.useEffect(()=>{(async()=>{const d=await x$();n({type:"SET_ACCESSES",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await S$();n({type:"SET_EMAILS",payload:d})})()},[]),y.useEffect(()=>{(async()=>{const d=await Tb();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=y.useCallback(async()=>{const u=await Tb();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=y.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=y.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=y.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=y.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=y.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(nE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})};var j$="Separator",Rb="horizontal",E$=["horizontal","vertical"],rE=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=Rb,...s}=e,o=N$(r)?r:Rb,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Pe.div,{"data-orientation":o,...a,...s,ref:t})});rE.displayName=j$;function N$(e){return E$.includes(e)}var sE=rE;const br=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(sE,{ref:s,decorative:n,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));br.displayName=sE.displayName;const T$="Certimate v0.2.0",oE=()=>{const{t:e}=Ye();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(XO,{size:16}),l.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),l.jsx(br,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:T$})]})]})};function P$(){const e=Jn(),t=Ir(),{t:n}=Ye();if(!ot().authStore.isValid||!ot().authStore.isAdmin)return l.jsx(KS,{to:"/login"});const r=t.pathname,s=a=>a==r?"bg-muted text-primary":"text-muted-foreground",o=()=>{ot().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(C$,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(wn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(wn,{to:"/",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(Yw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),l.jsxs(wn,{to:"/domains",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx(mg,{className:"h-4 w-4"}),n("domain.page.title")]}),l.jsxs(wn,{to:"/access",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(Kw,{className:"h-4 w-4"}),n("access.page.title")]}),l.jsxs(wn,{to:"/history",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(Hw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.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:[l.jsxs(Wv,{children:[l.jsx(Hv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(lI,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(wh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(wn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(wn,{to:"/",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(Yw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),l.jsxs(wn,{to:"/domains",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx(mg,{className:"h-5 w-5"}),n("domain.page.title")]}),l.jsxs(wn,{to:"/access",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(Kw,{className:"h-5 w-5"}),n("access.page.title")]}),l.jsxs(wn,{to:"/history",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(Hw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(BF,{}),l.jsx(FF,{}),l.jsxs(Iv,{children:[l.jsx(Mv,{asChild:!0,children:l.jsxs(Me,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(tI,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(vh,{align:"end",children:[l.jsx(ti,{onClick:i,children:n("common.menu.settings")}),l.jsx(ti,{onClick:o,children:n("common.menu.logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(tv,{}),l.jsx(oE,{})]})]})]})})})}var R$="VisuallyHidden",hu=y.forwardRef((e,t)=>l.jsx(Pe.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}}));hu.displayName=R$;var A$=hu,[Ah,YH]=on("Tooltip",[tl]),Dh=tl(),iE="TooltipProvider",D$=700,Pg="tooltip.open",[O$,vx]=Ah(iE),xx=e=>{const{__scopeTooltip:t,delayDuration:n=D$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=y.useState(!0),c=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(O$,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};xx.displayName=iE;var Oh="Tooltip",[I$,Ih]=Ah(Oh),aE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=vx(Oh,e.__scopeTooltip),u=Dh(t),[d,f]=y.useState(null),h=Bn(),m=y.useRef(0),x=i??c.disableHoverableContent,p=a??c.delayDuration,w=y.useRef(!1),[g=!1,v]=Gn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Pg))):c.onClose(),o==null||o(T)}}),b=y.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),_=y.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,v(!0)},[v]),C=y.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),j=y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0)},p)},[p,v]);return y.useEffect(()=>()=>window.clearTimeout(m.current),[]),l.jsx(wv,{...u,children:l.jsx(I$,{scope:t,contentId:h,open:g,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:y.useCallback(()=>{x?C():window.clearTimeout(m.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};aE.displayName=Oh;var Rg="TooltipTrigger",lE=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ih(Rg,n),o=vx(Rg,n),i=Dh(n),a=y.useRef(null),c=Ge(t,a,s.onTriggerChange),u=y.useRef(!1),d=y.useRef(!1),f=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(bv,{asChild:!0,...i,children:l.jsx(Pe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});lE.displayName=Rg;var M$="TooltipPortal",[KH,L$]=Ah(M$,{forceMount:void 0}),Oa="TooltipContent",wx=y.forwardRef((e,t)=>{const n=L$(Oa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Ih(Oa,e.__scopeTooltip);return l.jsx(an,{present:r||i.open,children:i.disableHoverableContent?l.jsx(cE,{side:s,...o,ref:t}):l.jsx(z$,{side:s,...o,ref:t})})}),z$=y.forwardRef((e,t)=>{const n=Ih(Oa,e.__scopeTooltip),r=vx(Oa,e.__scopeTooltip),s=y.useRef(null),o=Ge(t,s),[i,a]=y.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{a(null),f(!1)},[f]),m=y.useCallback((x,p)=>{const w=x.currentTarget,g={x:x.clientX,y:x.clientY},v=V$(g,w.getBoundingClientRect()),b=B$(g,v),_=W$(p.getBoundingClientRect()),C=Y$([...b,..._]);a(C),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(c&&d){const x=w=>m(w,d),p=w=>m(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),y.useEffect(()=>{if(i){const x=p=>{const w=p.target,g={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!H$(g,i);v?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),l.jsx(cE,{...e,ref:o})}),[F$,$$]=Ah(Oh,{isInside:!1}),cE=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Ih(Oa,n),u=Dh(n),{onClose:d}=c;return y.useEffect(()=>(document.addEventListener(Pg,d),()=>document.removeEventListener(Pg,d)),[d]),y.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Qa,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(_v,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(av,{children:r}),l.jsx(F$,{scope:n,isInside:!0,children:l.jsx(A$,{id:c.contentId,role:"tooltip",children:s||r})})]})})});wx.displayName=Oa;var uE="TooltipArrow",U$=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Dh(n);return $$(uE,n).isInside?null:l.jsx(Sv,{...s,...r,ref:t})});U$.displayName=uE;function V$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function B$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function W$(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function H$(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o].x,c=t[o].y,u=t[i].x,d=t[i].y;c>r!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function Y$(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),K$(t)}function K$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];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 n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var G$=xx,Z$=aE,q$=lE,dE=wx;const ur=({when:e,children:t,fallback:n})=>e?t:n,bx=({phase:e,phaseSuccess:t})=>{const{t:n}=Ye();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:re("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),l.jsx(br,{className:re("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("history.props.stage.progress.apply")}),l.jsx(br,{className:re("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("history.props.stage.progress.deploy")})]})},X$=G$,fE=Z$,hE=q$,mE=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(dE,{ref:r,sideOffset:t,className:re("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),...n}));mE.displayName=dE.displayName;const _x=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(eI,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(X$,{children:l.jsxs(fE,{children:[l.jsx(hE,{asChild:!0,className:"cursor-pointer",children:l.jsx(Bw,{size:16,className:"text-red-700"})}),l.jsx(mE,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(Bw,{size:16,className:"text-red-700"})})})},pE=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:re("mx-auto flex w-full justify-center",e),...t});pE.displayName="Pagination";const gE=y.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:re("flex flex-row items-center gap-1",e),...t}));gE.displayName="PaginationContent";const Ag=y.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("",e),...t}));Ag.displayName="PaginationItem";const yE=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:re(ch({variant:t?"outline":"ghost",size:n}),e),...r});yE.displayName="PaginationLink";const vE=({className:e,...t})=>{const{t:n}=Ye();return l.jsxs("span",{"aria-hidden":!0,className:re("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(nI,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};vE.displayName="PaginationEllipsis";const xE=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t<h-1&&u.push("..."),u.unshift(1),u.push(e),u}return o(1,e)},o=(a,c,u=1)=>{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(pE,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(gE,{children:i.map((a,c)=>a==="..."?l.jsx(Ag,{children:l.jsx(vE,{})},c):l.jsx(Ag,{children:l.jsx(yE,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})};var wE="AlertDialog",[Q$,GH]=on(wE,[WC]),Gs=WC(),bE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Gs(t);return l.jsx(Uv,{...r,...n,modal:!0})};bE.displayName=wE;var J$="AlertDialogTrigger",_E=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Gs(n);return l.jsx(Vv,{...s,...r,ref:t})});_E.displayName=J$;var eU="AlertDialogPortal",SE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Gs(t);return l.jsx(Bv,{...r,...n})};SE.displayName=eU;var tU="AlertDialogOverlay",kE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Gs(n);return l.jsx(ou,{...s,...r,ref:t})});kE.displayName=tU;var ka="AlertDialogContent",[nU,rU]=Q$(ka),CE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Gs(n),i=y.useRef(null),a=Ge(t,i),c=y.useRef(null);return l.jsx(ZF,{contentName:ka,titleName:jE,docsSlug:"alert-dialog",children:l.jsx(nU,{scope:n,cancelRef:c,children:l.jsxs(iu,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(av,{children:r}),l.jsx(oU,{contentRef:i})]})})})});CE.displayName=ka;var jE="AlertDialogTitle",EE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Gs(n);return l.jsx(au,{...s,...r,ref:t})});EE.displayName=jE;var NE="AlertDialogDescription",TE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Gs(n);return l.jsx(lu,{...s,...r,ref:t})});TE.displayName=NE;var sU="AlertDialogAction",PE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Gs(n);return l.jsx(xh,{...s,...r,ref:t})});PE.displayName=sU;var RE="AlertDialogCancel",AE=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=rU(RE,n),o=Gs(n),i=Ge(t,s);return l.jsx(xh,{...o,...r,ref:i})});AE.displayName=RE;var oU=({contentRef:e})=>{const t=`\`${ka}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${ka}\` by passing a \`${NE}\` 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 \`${ka}\`. 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 r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},iU=bE,aU=_E,lU=SE,DE=kE,OE=CE,IE=PE,ME=AE,LE=EE,zE=TE;const Sx=iU,kx=aU,cU=lU,FE=y.forwardRef(({className:e,...t},n)=>l.jsx(DE,{className:re("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:n}));FE.displayName=DE.displayName;const Mh=y.forwardRef(({className:e,...t},n)=>l.jsxs(cU,{children:[l.jsx(FE,{}),l.jsx(OE,{ref:n,className:re("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})]}));Mh.displayName=OE.displayName;const Lh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-2 text-center sm:text-left",e),...t});Lh.displayName="AlertDialogHeader";const zh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zh.displayName="AlertDialogFooter";const Fh=y.forwardRef(({className:e,...t},n)=>l.jsx(LE,{ref:n,className:re("text-lg font-semibold",e),...t}));Fh.displayName=LE.displayName;const $h=y.forwardRef(({className:e,...t},n)=>l.jsx(zE,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));$h.displayName=zE.displayName;const Uh=y.forwardRef(({className:e,...t},n)=>l.jsx(IE,{ref:n,className:re(ch(),e),...t}));Uh.displayName=IE.displayName;const Vh=y.forwardRef(({className:e,...t},n)=>l.jsx(ME,{ref:n,className:re(ch({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vh.displayName=ME.displayName;function Cx(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 jx="Switch",[uU,ZH]=on(jx),[dU,fU]=uU(jx),$E=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:i,disabled:a,value:c="on",onCheckedChange:u,...d}=e,[f,h]=y.useState(null),m=Ge(t,v=>h(v)),x=y.useRef(!1),p=f?!!f.closest("form"):!0,[w=!1,g]=Gn({prop:s,defaultProp:o,onChange:u});return l.jsxs(dU,{scope:n,checked:w,disabled:a,children:[l.jsx(Pe.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":BE(w),"data-disabled":a?"":void 0,disabled:a,value:c,...d,ref:m,onClick:ue(e.onClick,v=>{g(b=>!b),p&&(x.current=v.isPropagationStopped(),x.current||v.stopPropagation())})}),p&&l.jsx(hU,{control:f,bubbles:!x.current,name:r,value:c,checked:w,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});$E.displayName=jx;var UE="SwitchThumb",VE=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=fU(UE,n);return l.jsx(Pe.span,{"data-state":BE(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});VE.displayName=UE;var hU=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=y.useRef(null),i=Cx(n),a=yv(t);return y.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function BE(e){return e?"checked":"unchecked"}var WE=$E,mU=VE;const mu=y.forwardRef(({className:e,...t},n)=>l.jsx(WE,{className:re("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:n,children:l.jsx(mU,{className:re("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")})}));mu.displayName=WE.displayName;var Ex="ToastProvider",[Nx,pU,gU]=eu("Toast"),[HE,qH]=on("Toast",[gU]),[yU,Bh]=HE(Ex),YE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,c]=y.useState(null),[u,d]=y.useState(0),f=y.useRef(!1),h=y.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ex}\`. Expected non-empty \`string\`.`),l.jsx(Nx.Provider,{scope:t,children:l.jsx(yU,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:y.useCallback(()=>d(m=>m+1),[]),onToastRemove:y.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};YE.displayName=Ex;var KE="ToastViewport",vU=["F8"],Dg="toast.viewportPause",Og="toast.viewportResume",GE=y.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=vU,label:s="Notifications ({hotkey})",...o}=e,i=Bh(KE,n),a=pU(n),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),h=Ge(t,f,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;y.useEffect(()=>{const w=g=>{var b;r.every(_=>g[_]||g.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),y.useEffect(()=>{const w=c.current,g=f.current;if(x&&w&&g){const v=()=>{if(!i.isClosePausedRef.current){const j=new CustomEvent(Dg);g.dispatchEvent(j),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const j=new CustomEvent(Og);g.dispatchEvent(j),i.isClosePausedRef.current=!1}},_=j=>{!w.contains(j.relatedTarget)&&b()},C=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",v),w.addEventListener("focusout",_),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const p=y.useCallback(({tabbingDirection:w})=>{const v=a().map(b=>{const _=b.ref.current,C=[_,...RU(_)];return w==="forwards"?C:C.reverse()});return(w==="forwards"?v.reverse():v).flat()},[a]);return y.useEffect(()=>{const w=f.current;if(w){const g=v=>{var C,j,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const R=document.activeElement,A=v.shiftKey;if(v.target===w&&A){(C=u.current)==null||C.focus();return}const N=p({tabbingDirection:A?"backwards":"forwards"}),z=N.findIndex(S=>S===R);rp(N.slice(z+1))?v.preventDefault():A?(j=u.current)==null||j.focus():(T=d.current)==null||T.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[a,p]),l.jsxs(dM,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&l.jsx(Ig,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});rp(w)}}),l.jsx(Nx.Slot,{scope:n,children:l.jsx(Pe.ol,{tabIndex:-1,...o,ref:h})}),x&&l.jsx(Ig,{ref:d,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});rp(w)}})]})});GE.displayName=KE;var ZE="ToastFocusProxy",Ig=y.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Bh(ZE,n);return l.jsx(hu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&r()}})});Ig.displayName=ZE;var Wh="Toast",xU="toast.swipeStart",wU="toast.swipeMove",bU="toast.swipeCancel",_U="toast.swipeEnd",qE=y.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=e,[a=!0,c]=Gn({prop:r,defaultProp:s,onChange:o});return l.jsx(an,{present:n||a,children:l.jsx(CU,{open:a,...i,ref:t,onClose:()=>c(!1),onPause:Ot(e.onPause),onResume:Ot(e.onResume),onSwipeStart:ue(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ue(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ue(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ue(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});qE.displayName=Wh;var[SU,kU]=HE(Wh,{onClose(){}}),CU=y.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...x}=e,p=Bh(Wh,n),[w,g]=y.useState(null),v=Ge(t,S=>g(S)),b=y.useRef(null),_=y.useRef(null),C=s||p.duration,j=y.useRef(0),T=y.useRef(C),R=y.useRef(0),{onToastAdd:A,onToastRemove:O}=p,G=Ot(()=>{var U;(w==null?void 0:w.contains(document.activeElement))&&((U=p.viewport)==null||U.focus()),i()}),N=y.useCallback(S=>{!S||S===1/0||(window.clearTimeout(R.current),j.current=new Date().getTime(),R.current=window.setTimeout(G,S))},[G]);y.useEffect(()=>{const S=p.viewport;if(S){const U=()=>{N(T.current),u==null||u()},J=()=>{const F=new Date().getTime()-j.current;T.current=T.current-F,window.clearTimeout(R.current),c==null||c()};return S.addEventListener(Dg,J),S.addEventListener(Og,U),()=>{S.removeEventListener(Dg,J),S.removeEventListener(Og,U)}}},[p.viewport,C,c,u,N]),y.useEffect(()=>{o&&!p.isClosePausedRef.current&&N(C)},[o,C,p.isClosePausedRef,N]),y.useEffect(()=>(A(),()=>O()),[A,O]);const z=y.useMemo(()=>w?rN(w):null,[w]);return p.viewport?l.jsxs(l.Fragment,{children:[z&&l.jsx(jU,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),l.jsx(SU,{scope:n,onClose:G,children:Vs.createPortal(l.jsx(Nx.ItemSlot,{scope:n,children:l.jsx(uM,{asChild:!0,onEscapeKeyDown:ue(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||G(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Pe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ue(e.onKeyDown,S=>{S.key==="Escape"&&(a==null||a(S.nativeEvent),S.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:ue(e.onPointerDown,S=>{S.button===0&&(b.current={x:S.clientX,y:S.clientY})}),onPointerMove:ue(e.onPointerMove,S=>{if(!b.current)return;const U=S.clientX-b.current.x,J=S.clientY-b.current.y,F=!!_.current,W=["left","right"].includes(p.swipeDirection),I=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,X=W?I(0,U):0,$=W?0:I(0,J),B=S.pointerType==="touch"?10:2,he={x:X,y:$},se={originalEvent:S,delta:he};F?(_.current=he,ed(wU,f,se,{discrete:!1})):Ab(he,p.swipeDirection,B)?(_.current=he,ed(xU,d,se,{discrete:!1}),S.target.setPointerCapture(S.pointerId)):(Math.abs(U)>B||Math.abs(J)>B)&&(b.current=null)}),onPointerUp:ue(e.onPointerUp,S=>{const U=_.current,J=S.target;if(J.hasPointerCapture(S.pointerId)&&J.releasePointerCapture(S.pointerId),_.current=null,b.current=null,U){const F=S.currentTarget,W={originalEvent:S,delta:U};Ab(U,p.swipeDirection,p.swipeThreshold)?ed(_U,m,W,{discrete:!0}):ed(bU,h,W,{discrete:!0}),F.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),jU=e=>{const{__scopeToast:t,children:n,...r}=e,s=Bh(Wh,t),[o,i]=y.useState(!1),[a,c]=y.useState(!1);return TU(()=>i(!0)),y.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(nu,{asChild:!0,children:l.jsx(hu,{...r,children:o&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},EU="ToastTitle",XE=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});XE.displayName=EU;var NU="ToastDescription",QE=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});QE.displayName=NU;var JE="ToastAction",eN=y.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(nN,{altText:n,asChild:!0,children:l.jsx(Tx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${JE}\`. Expected non-empty \`string\`.`),null)});eN.displayName=JE;var tN="ToastClose",Tx=y.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=kU(tN,n);return l.jsx(nN,{asChild:!0,children:l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,s.onClose)})})});Tx.displayName=tN;var nN=y.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(Pe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function rN(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),PU(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...rN(r))}}),t}function ed(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?cv(s,o):s.dispatchEvent(o)}var Ab=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function TU(e=()=>{}){const t=Ot(e);en(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function PU(e){return e.nodeType===e.ELEMENT_NODE}function RU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var AU=YE,sN=GE,oN=qE,iN=XE,aN=QE,lN=eN,cN=Tx;const DU=AU,uN=y.forwardRef(({className:e,...t},n)=>l.jsx(sN,{ref:n,className:re("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}));uN.displayName=sN.displayName;const OU=Jc("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"}}),dN=y.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(oN,{ref:r,className:re(OU({variant:t}),e),...n}));dN.displayName=oN.displayName;const IU=y.forwardRef(({className:e,...t},n)=>l.jsx(lN,{ref:n,className:re("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}));IU.displayName=lN.displayName;const fN=y.forwardRef(({className:e,...t},n)=>l.jsx(cN,{ref:n,className:re("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:l.jsx(iv,{className:"h-4 w-4"})}));fN.displayName=cN.displayName;const hN=y.forwardRef(({className:e,...t},n)=>l.jsx(iN,{ref:n,className:re("text-sm font-semibold",e),...t}));hN.displayName=iN.displayName;const mN=y.forwardRef(({className:e,...t},n)=>l.jsx(aN,{ref:n,className:re("text-sm opacity-90",e),...t}));mN.displayName=aN.displayName;const MU=1,LU=1e6;let sp=0;function zU(){return sp=(sp+1)%Number.MAX_SAFE_INTEGER,sp.toString()}const op=new Map,Db=e=>{if(op.has(e))return;const t=setTimeout(()=>{op.delete(e),Ql({type:"REMOVE_TOAST",toastId:e})},LU);op.set(e,t)},FU=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,MU)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Db(n):e.toasts.forEach(r=>{Db(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kd=[];let Cd={toasts:[]};function Ql(e){Cd=FU(Cd,e),kd.forEach(t=>{t(Cd)})}function $U({...e}){const t=zU(),n=s=>Ql({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Ql({type:"DISMISS_TOAST",toastId:t});return Ql({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function zr(){const[e,t]=y.useState(Cd);return y.useEffect(()=>(kd.push(t),()=>{const n=kd.indexOf(t);n>-1&&kd.splice(n,1)}),[e]),{...e,toast:$U,dismiss:n=>Ql({type:"DISMISS_TOAST",toastId:n})}}function Px(){const{toasts:e}=zr();return l.jsxs(DU,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return l.jsxs(dN,{...o,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(hN,{children:n}),r&&l.jsx(mN,{children:r})]}),s,l.jsx(fN,{})]},t)}),l.jsx(uN,{})]})}function td(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 pN={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(n){e.exports=n()})(function(){return function n(r,s,o){function i(u,d){if(!s[u]){if(!r[u]){var f=typeof td=="function"&&td;if(!d&&f)return f(u,!0);if(a)return a(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var m=s[u]={exports:{}};r[u][0].call(m.exports,function(x){var p=r[u][1][x];return i(p||x)},m,m.exports,n,r,s,o)}return s[u].exports}for(var a=typeof td=="function"&&td,c=0;c<o.length;c++)i(o[c]);return i}({1:[function(n,r,s){var o=n("./utils"),i=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var u,d,f,h,m,x,p,w=[],g=0,v=c.length,b=v,_=o.getTypeOf(c)!=="string";g<c.length;)b=v-g,f=_?(u=c[g++],d=g<v?c[g++]:0,g<v?c[g++]:0):(u=c.charCodeAt(g++),d=g<v?c.charCodeAt(g++):0,g<v?c.charCodeAt(g++):0),h=u>>2,m=(3&u)<<4|d>>4,x=1<b?(15&d)<<2|f>>6:64,p=2<b?63&f:64,w.push(a.charAt(h)+a.charAt(m)+a.charAt(x)+a.charAt(p));return w.join("")},s.decode=function(c){var u,d,f,h,m,x,p=0,w=0,g="data:";if(c.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var v,b=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&b--,c.charAt(c.length-2)===a.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|b):new Array(0|b);p<c.length;)u=a.indexOf(c.charAt(p++))<<2|(h=a.indexOf(c.charAt(p++)))>>4,d=(15&h)<<4|(m=a.indexOf(c.charAt(p++)))>>2,f=(3&m)<<6|(x=a.indexOf(c.charAt(p++))),v[w++]=u,m!==64&&(v[w++]=d),x!==64&&(v[w++]=f);return v}},{"./support":30,"./utils":32}],2:[function(n,r,s){var o=n("./external"),i=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,m,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=m,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new i(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new i(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new a).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var o=n("./utils"),i=function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();r.exports=function(a,c){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d[p])];return-1^u}(0|c,a,a.length,0):function(u,d,f,h){var m=i,x=h+f;u^=-1;for(var p=h;p<x;p++)u=u>>>8^m[255&(u^d.charCodeAt(p))];return-1^u}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,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(n,r,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:o}},{lie:37}],7:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function o(m,x){var p,w="";for(p=0;p<x;p++)w+=String.fromCharCode(255&m),m>>>=8;return w}function i(m,x,p,w,g,v){var b,_,C=m.file,j=m.compression,T=v!==u.utf8encode,R=a.transformTo("string",v(C.name)),A=a.transformTo("string",u.utf8encode(C.name)),O=C.comment,G=a.transformTo("string",v(O)),N=a.transformTo("string",u.utf8encode(O)),z=A.length!==C.name.length,S=N.length!==O.length,U="",J="",F="",W=C.dir,I=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!p||(X.crc32=m.crc32,X.compressedSize=m.compressedSize,X.uncompressedSize=m.uncompressedSize);var $=0;x&&($|=8),T||!z&&!S||($|=2048);var B=0,he=0;W&&(B|=16),g==="UNIX"?(he=798,B|=function(oe,Oe){var me=oe;return oe||(me=Oe?16893:33204),(65535&me)<<16}(C.unixPermissions,W)):(he=20,B|=function(oe){return 63&(oe||0)}(C.dosPermissions)),b=I.getUTCHours(),b<<=6,b|=I.getUTCMinutes(),b<<=5,b|=I.getUTCSeconds()/2,_=I.getUTCFullYear()-1980,_<<=4,_|=I.getUTCMonth()+1,_<<=5,_|=I.getUTCDate(),z&&(J=o(1,1)+o(d(R),4)+A,U+="up"+o(J.length,2)+J),S&&(F=o(1,1)+o(d(G),4)+N,U+="uc"+o(F.length,2)+F);var se="";return se+=`
\0`,se+=o($,2),se+=j.magic,se+=o(b,2),se+=o(_,2),se+=o(X.crc32,4),se+=o(X.compressedSize,4),se+=o(X.uncompressedSize,4),se+=o(R.length,2),se+=o(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+se+R+U,dirRecord:f.CENTRAL_FILE_HEADER+o(he,2)+se+o(G.length,2)+"\0\0\0\0"+o(B,4)+o(w,4)+R+U+G}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(m,x,p,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=p,this.encodeFileName=w,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,c),h.prototype.push=function(m){var x=m.meta.percent||0,p=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,c.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:p?(x+100*(p-w-1))/p:100}}))},h.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var x=this.streamFiles&&!m.file.dir;if(x){var p=i(m,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(m){this.accumulate=!1;var x=this.streamFiles&&!m.file.dir,p=i(m,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+o(w.crc32,4)+o(w.compressedSize,4)+o(w.uncompressedSize,4)}(m),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var m=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var p=this.bytesWritten-m,w=function(g,v,b,_,C){var j=a.transformTo("string",C(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+o(g,2)+o(g,2)+o(v,4)+o(b,4)+o(j.length,2)+j}(this.dirRecords.length,p,m,this.zipComment,this.encodeFileName);this.push({data:w,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(m){this._sources.push(m);var x=this;return m.on("data",function(p){x.processChunk(p)}),m.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),m.on("error",function(p){x.error(p)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(m){var x=this._sources;if(!c.prototype.error.call(this,m))return!1;for(var p=0;p<x.length;p++)try{x[p].error(m)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var m=this._sources,x=0;x<m.length;x++)m[x].lock()},r.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,s){var o=n("../compressions"),i=n("./ZipFileWorker");s.generateWorker=function(a,c,u){var d=new i(c.streamFiles,u,c.platform,c.encodeFileName),f=0;try{a.forEach(function(h,m){f++;var x=function(v,b){var _=v||b,C=o[_];if(!C)throw new Error(_+" is not a valid compression method !");return C}(m.options.compression,c.compression),p=m.options.compressionOptions||c.compressionOptions||{},w=m.dir,g=m.date;m._compressWorker(x,p).withStreamInfo("file",{name:h,dir:w,date:g,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,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=n("./object")).loadAsync=n("./load"),o.support=n("./support"),o.defaults=n("./defaults"),o.version="3.10.1",o.loadAsync=function(i,a){return new o().loadAsync(i,a)},o.external=n("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,s){var o=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),u=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(h){return new i.Promise(function(m,x){var p=h.decompressed.getContentWorker().pipe(new u);p.on("error",function(w){x(w)}).on("end",function(){p.streamInfo.crc32!==h.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(h,m){var x=this;return m=o.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.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,m.optimizedBinaryString,m.base64).then(function(p){var w=new c(m);return w.load(p),w}).then(function(p){var w=[i.Promise.resolve(p)],g=p.files;if(m.checkCRC32)for(var v=0;v<g.length;v++)w.push(f(g[v]));return i.Promise.all(w)}).then(function(p){for(var w=p.shift(),g=w.files,v=0;v<g.length;v++){var b=g[v],_=b.fileNameStr,C=o.resolve(b.fileNameStr);x.file(C,b.decompressed,{binary:!0,optimizedBinaryString:!0,date:b.date,dir:b.dir,comment:b.fileCommentStr.length?b.fileCommentStr:null,unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions,createFolders:m.createFolders}),b.dir||(x.file(C).unsafeOriginalName=_)}return w.zipComment.length&&(x.comment=w.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,s){var o=n("../utils"),i=n("../stream/GenericWorker");function a(c,u){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(u)}o.inherits(a,i),a.prototype._bindStream=function(c){var u=this;(this._stream=c).pause(),c.on("data",function(d){u.push({data:d,meta:{percent:0}})}).on("error",function(d){u.isPaused?this.generatedError=d:u.error(d)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},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)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var o=n("readable-stream").Readable;function i(a,c,u){o.call(this,c),this._helper=a;var d=this;a.on("data",function(f,h){d.push(f)||d._helper.pause(),u&&u(h)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(i,o),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,s){r.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(n,r,s){function o(C,j,T){var R,A=a.getTypeOf(j),O=a.extend(T||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(C=g(C)),O.createFolders&&(R=w(C))&&v.call(this,R,!0);var G=A==="string"&&O.binary===!1&&O.base64===!1;T&&T.binary!==void 0||(O.binary=!G),(j instanceof f&&j.uncompressedSize===0||O.dir||!j||j.length===0)&&(O.base64=!1,O.binary=!0,j="",O.compression="STORE",A="string");var N=null;N=j instanceof f||j instanceof c?j:x.isNode&&x.isStream(j)?new p(C,j):a.prepareContent(C,j,O.binary,O.optimizedBinaryString,O.base64);var z=new h(C,N,O);this.files[C]=z}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),h=n("./zipObject"),m=n("./generate"),x=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),w=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var j=C.lastIndexOf("/");return 0<j?C.substring(0,j):""},g=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},v=function(C,j){return j=j!==void 0?j:d.createFolders,C=g(C),this.files[C]||o.call(this,C,null,{dir:!0,createFolders:j}),this.files[C]};function b(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var j,T,R;for(j in this.files)R=this.files[j],(T=j.slice(this.root.length,j.length))&&j.slice(0,this.root.length)===this.root&&C(T,R)},filter:function(C){var j=[];return this.forEach(function(T,R){C(T,R)&&j.push(R)}),j},file:function(C,j,T){if(arguments.length!==1)return C=this.root+C,o.call(this,C,j,T),this;if(b(C)){var R=C;return this.filter(function(O,G){return!G.dir&&R.test(O)})}var A=this.files[this.root+C];return A&&!A.dir?A:null},folder:function(C){if(!C)return this;if(b(C))return this.filter(function(A,O){return O.dir&&C.test(A)});var j=this.root+C,T=v.call(this,j),R=this.clone();return R.root=T.name,R},remove:function(C){C=this.root+C;var j=this.files[C];if(j||(C.slice(-1)!=="/"&&(C+="/"),j=this.files[C]),j&&!j.dir)delete this.files[C];else for(var T=this.filter(function(A,O){return O.name.slice(0,C.length)===C}),R=0;R<T.length;R++)delete this.files[T[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var j,T={};try{if((T=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");a.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var R=T.comment||this.comment||"";j=m.generateWorker(this,T,R)}catch(A){(j=new c("error")).error(A)}return new u(j,T.type||"string",T.mimeType)},generateAsync:function(C,j){return this.generateInternalStream(C).accumulate(j)},generateNodeStream:function(C,j){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(j)}};r.exports=_},{"./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(n,r,s){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,o),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===u&&this.data[h+2]===d&&this.data[h+3]===f)return h-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),u=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),h=this.readData(4);return c===h[0]&&u===h[1]&&d===h[2]&&f===h[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var o=n("../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 c,u=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},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))}},r.exports=i},{"../utils":32}],19:[function(n,r,s){var o=n("./Uint8ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var o=n("./DataReader");function i(a){o.call(this,a)}n("../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 c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var o=n("./ArrayReader");function i(a){o.call(this,a)}n("../utils").inherits(i,o),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var o=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=o.getTypeOf(f);return o.checkSupport(h),h!=="string"||i.uint8array?h==="nodebuffer"?new u(f):i.uint8array?new d(o.transformTo("uint8array",f)):new a(o.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,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(n,r,s){var o=n("./GenericWorker"),i=n("../utils");function a(c){o.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,o),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var o=n("./GenericWorker"),i=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(a,i),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var o=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=o.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}o.inherits(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 c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,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 c=0;c<this._listeners[i].length;c++)this._listeners[i][c].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(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,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}},r.exports=o},{}],29:[function(n,r,s){var o=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,p){return new d.Promise(function(w,g){var v=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){v.push(j),p&&p(T)}).on("error",function(j){v=[],g(j)}).on("end",function(){try{var j=function(T,R,A){switch(T){case"blob":return o.newBlob(o.transformTo("arraybuffer",R),A);case"base64":return c.encode(R);default:return o.transformTo(T,R)}}(_,function(T,R){var A,O=0,G=null,N=0;for(A=0;A<R.length;A++)N+=R[A].length;switch(T){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(G=new Uint8Array(N),A=0;A<R.length;A++)G.set(R[A],O),O+=R[A].length;return G;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+T+"'")}}(b,v),C);w(j)}catch(T){g(T)}v=[]}).resume()})}function m(x,p,w){var g=p;switch(p){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=p,this._mimeType=w,o.checkSupport(g),this._worker=x.pipe(new i(g)),x.lock()}catch(v){this._worker=new a("error"),this._worker.error(v)}}m.prototype={accumulate:function(x){return h(this,x)},on:function(x,p){var w=this;return x==="data"?this._worker.on(x,function(g){p.call(w,g.data,g.meta)}):this._worker.on(x,function(){o.delay(p,arguments,w)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},r.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,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=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var o=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(m){return i.nodebuffer?a.newBufferFrom(m,"utf-8"):function(x){var p,w,g,v,b,_=x.length,C=0;for(v=0;v<_;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(g=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(g-56320),v++),C+=w<128?1:w<2048?2:w<65536?3:4;for(p=i.uint8array?new Uint8Array(C):new Array(C),v=b=0;b<C;v++)(64512&(w=x.charCodeAt(v)))==55296&&v+1<_&&(64512&(g=x.charCodeAt(v+1)))==56320&&(w=65536+(w-55296<<10)+(g-56320),v++),w<128?p[b++]=w:(w<2048?p[b++]=192|w>>>6:(w<65536?p[b++]=224|w>>>12:(p[b++]=240|w>>>18,p[b++]=128|w>>>12&63),p[b++]=128|w>>>6&63),p[b++]=128|63&w);return p}(m)},s.utf8decode=function(m){return i.nodebuffer?o.transformTo("nodebuffer",m).toString("utf-8"):function(x){var p,w,g,v,b=x.length,_=new Array(2*b);for(p=w=0;p<b;)if((g=x[p++])<128)_[w++]=g;else if(4<(v=u[g]))_[w++]=65533,p+=v-1;else{for(g&=v===2?31:v===3?15:7;1<v&&p<b;)g=g<<6|63&x[p++],v--;1<v?_[w++]=65533:g<65536?_[w++]=g:(g-=65536,_[w++]=55296|g>>10&1023,_[w++]=56320|1023&g)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),o.applyFromCharCode(_)}(m=o.transformTo(i.uint8array?"uint8array":"array",m))},o.inherits(f,c),f.prototype.processChunk=function(m){var x=o.transformTo(i.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var p=x;(x=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),x.set(p,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(v,b){var _;for((b=b||v.length)>v.length&&(b=v.length),_=b-1;0<=_&&(192&v[_])==128;)_--;return _<0||_===0?b:_+u[v[_]]>b?_:b}(x),g=x;w!==x.length&&(i.uint8array?(g=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(g=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(g),meta:m.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,o.inherits(h,c),h.prototype.processChunk=function(m){this.push({data:s.utf8encode(m.data),meta:m.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var o=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(p){return p}function d(p,w){for(var g=0;g<p.length;++g)w[g]=255&p.charCodeAt(g);return w}n("setimmediate"),s.newBlob=function(p,w){s.checkSupport("blob");try{return new Blob([p],{type:w})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(p),g.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,w,g){var v=[],b=0,_=p.length;if(_<=g)return String.fromCharCode.apply(null,p);for(;b<_;)w==="array"||w==="nodebuffer"?v.push(String.fromCharCode.apply(null,p.slice(b,Math.min(b+g,_)))):v.push(String.fromCharCode.apply(null,p.subarray(b,Math.min(b+g,_)))),b+=g;return v.join("")},stringifyByChar:function(p){for(var w="",g=0;g<p.length;g++)w+=String.fromCharCode(p[g]);return w},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(p){var w=65536,g=s.getTypeOf(p),v=!0;if(g==="uint8array"?v=f.applyCanBeUsed.uint8array:g==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<w;)try{return f.stringifyByChunk(p,g,w)}catch{w=Math.floor(w/2)}return f.stringifyByChar(p)}function m(p,w){for(var g=0;g<p.length;g++)w[g]=p[g];return w}s.applyFromCharCode=h;var x={};x.string={string:u,array:function(p){return d(p,new Array(p.length))},arraybuffer:function(p){return x.string.uint8array(p).buffer},uint8array:function(p){return d(p,new Uint8Array(p.length))},nodebuffer:function(p){return d(p,a.allocBuffer(p.length))}},x.array={string:h,array:u,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(p)}},x.arraybuffer={string:function(p){return h(new Uint8Array(p))},array:function(p){return m(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:u,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return a.newBufferFrom(new Uint8Array(p))}},x.uint8array={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:u,nodebuffer:function(p){return a.newBufferFrom(p)}},x.nodebuffer={string:h,array:function(p){return m(p,new Array(p.length))},arraybuffer:function(p){return x.nodebuffer.uint8array(p).buffer},uint8array:function(p){return m(p,new Uint8Array(p.length))},nodebuffer:u},s.transformTo=function(p,w){if(w=w||"",!p)return w;s.checkSupport(p);var g=s.getTypeOf(w);return x[g][p](w)},s.resolve=function(p){for(var w=p.split("/"),g=[],v=0;v<w.length;v++){var b=w[v];b==="."||b===""&&v!==0&&v!==w.length-1||(b===".."?g.pop():g.push(b))}return g.join("/")},s.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":o.nodebuffer&&a.isBuffer(p)?"nodebuffer":o.uint8array&&p instanceof Uint8Array?"uint8array":o.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(p){if(!o[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(p){var w,g,v="";for(g=0;g<(p||"").length;g++)v+="\\x"+((w=p.charCodeAt(g))<16?"0":"")+w.toString(16).toUpperCase();return v},s.delay=function(p,w,g){setImmediate(function(){p.apply(g||null,w||[])})},s.inherits=function(p,w){function g(){}g.prototype=w.prototype,p.prototype=new g},s.extend=function(){var p,w,g={};for(p=0;p<arguments.length;p++)for(w in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],w)&&g[w]===void 0&&(g[w]=arguments[p][w]);return g},s.prepareContent=function(p,w,g,v,b){return c.Promise.resolve(w).then(function(_){return o.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,j){var T=new FileReader;T.onload=function(R){C(R.target.result)},T.onerror=function(R){j(R.target.error)},T.readAsArrayBuffer(_)}):_}).then(function(_){var C=s.getTypeOf(_);return C?(C==="arraybuffer"?_=s.transformTo("uint8array",_):C==="string"&&(b?_=i.decode(_):g&&v!==!0&&(_=function(j){return d(j,o.uint8array?new Uint8Array(j.length):new Array(j.length))}(_))),_):c.Promise.reject(new Error("Can't read the data of '"+p+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),u=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){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(f)+")")}},isSignature:function(f,h){var m=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===h;return this.reader.setIndex(m),x},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),h=u.uint8array?"uint8array":"array",m=i.transformTo(h,f);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,h,m,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),h=this.reader.readInt(4),m=this.reader.readData(h),this.zip64ExtensibleData[f]={id:f,length:h,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,h;for(f=0;f<this.files.length;f++)h=this.files[f],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var h=f;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,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var x=h-m;if(0<x)this.isSignature(h,a.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=o(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,s){var o=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),u=n("./utf8"),d=n("./compressions"),f=n("./support");function h(m,x){this.options=m,this.loadOptions=x}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var x,p;if(m.skip(22),this.fileNameLength=m.readInt(2),p=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(p),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((x=function(w){for(var g in d)if(Object.prototype.hasOwnProperty.call(d,g)&&d[g].magic===w)return d[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,x,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var x=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(x),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=o(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var x,p,w,g=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<g;)x=m.readInt(2),p=m.readInt(2),w=m.readData(p),this.extraFields[x]={id:x,length:p,value:w};m.setIndex(g)},handleUTF8:function(){var m=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var p=i.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var g=i.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileName)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var x=o(m.value);return x.readInt(1)!==1||c(this.fileComment)!==x.readInt(4)?null:u.utf8decode(x.readData(m.length-5))}return null}},r.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,s){function o(x,p,w){this.name=x,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=p,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),u=n("./compressedObject"),d=n("./stream/GenericWorker");o.prototype={internalStream:function(x){var p=null,w="string";try{if(!x)throw new Error("No output type specified.");var g=(w=x.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),p=this._decompressWorker();var v=!this._dataBinary;v&&!g&&(p=p.pipe(new c.Utf8EncodeWorker)),!v&&g&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(b){(p=new d("error")).error(b)}return new i(p,w,"")},async:function(x,p){return this.internalStream(x).accumulate(p)},nodeStream:function(x,p){return this.internalStream(x||"nodebuffer").toNodejsStream(p)},_compressWorker:function(x,p){if(this._data instanceof u&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new c.Utf8EncodeWorker)),u.createWorkerFrom(w,x,p)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<f.length;m++)o.prototype[f[m]]=h;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,s){(function(o){var i,a,c=o.MutationObserver||o.WebKitMutationObserver;if(c){var u=0,d=new c(x),f=o.document.createTextNode("");d.observe(f,{characterData:!0}),i=function(){f.data=u=++u%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var p=o.document.createElement("script");p.onreadystatechange=function(){x(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},o.document.documentElement.appendChild(p)}:function(){setTimeout(x,0)};else{var h=new o.MessageChannel;h.port1.onmessage=x,i=function(){h.port2.postMessage(0)}}var m=[];function x(){var p,w;a=!0;for(var g=m.length;g;){for(w=m,m=[],p=-1;++p<g;)w[p]();g=m.length}a=!1}r.exports=function(p){m.push(p)!==1||a||i()}}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var o=n("immediate");function i(){}var a={},c=["REJECTED"],u=["FULFILLED"],d=["PENDING"];function f(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,g!==i&&p(this,g)}function h(g,v,b){this.promise=g,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof b=="function"&&(this.onRejected=b,this.callRejected=this.otherCallRejected)}function m(g,v,b){o(function(){var _;try{_=v(b)}catch(C){return a.reject(g,C)}_===g?a.reject(g,new TypeError("Cannot resolve promise with itself")):a.resolve(g,_)})}function x(g){var v=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof v=="function")return function(){v.apply(g,arguments)}}function p(g,v){var b=!1;function _(T){b||(b=!0,a.reject(g,T))}function C(T){b||(b=!0,a.resolve(g,T))}var j=w(function(){v(C,_)});j.status==="error"&&_(j.value)}function w(g,v){var b={};try{b.value=g(v),b.status="success"}catch(_){b.status="error",b.value=_}return b}(r.exports=f).prototype.finally=function(g){if(typeof g!="function")return this;var v=this.constructor;return this.then(function(b){return v.resolve(g()).then(function(){return b})},function(b){return v.resolve(g()).then(function(){throw b})})},f.prototype.catch=function(g){return this.then(null,g)},f.prototype.then=function(g,v){if(typeof g!="function"&&this.state===u||typeof v!="function"&&this.state===c)return this;var b=new this.constructor(i);return this.state!==d?m(b,this.state===u?g:v,this.outcome):this.queue.push(new h(b,g,v)),b},h.prototype.callFulfilled=function(g){a.resolve(this.promise,g)},h.prototype.otherCallFulfilled=function(g){m(this.promise,this.onFulfilled,g)},h.prototype.callRejected=function(g){a.reject(this.promise,g)},h.prototype.otherCallRejected=function(g){m(this.promise,this.onRejected,g)},a.resolve=function(g,v){var b=w(x,v);if(b.status==="error")return a.reject(g,b.value);var _=b.value;if(_)p(g,_);else{g.state=u,g.outcome=v;for(var C=-1,j=g.queue.length;++C<j;)g.queue[C].callFulfilled(v)}return g},a.reject=function(g,v){g.state=c,g.outcome=v;for(var b=-1,_=g.queue.length;++b<_;)g.queue[b].callRejected(v);return g},f.resolve=function(g){return g instanceof this?g:a.resolve(new this(i),g)},f.reject=function(g){var v=new this(i);return a.reject(v,g)},f.all=function(g){var v=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=g.length,_=!1;if(!b)return this.resolve([]);for(var C=new Array(b),j=0,T=-1,R=new this(i);++T<b;)A(g[T],T);return R;function A(O,G){v.resolve(O).then(function(N){C[G]=N,++j!==b||_||(_=!0,a.resolve(R,C))},function(N){_||(_=!0,a.reject(R,N))})}},f.race=function(g){var v=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var b=g.length,_=!1;if(!b)return this.resolve([]);for(var C=-1,j=new this(i);++C<b;)T=g[C],v.resolve(T).then(function(R){_||(_=!0,a.resolve(j,R))},function(R){_||(_=!0,a.reject(j,R))});var T;return j}},{immediate:36}],38:[function(n,r,s){var o={};(0,n("./lib/utils/common").assign)(o,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,s){var o=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),u=n("./zlib/zstream"),d=Object.prototype.toString,f=0,h=-1,m=0,x=8;function p(g){if(!(this instanceof p))return new p(g);this.options=i.assign({level:h,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,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 u,this.strm.avail_out=0;var b=o.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(b!==f)throw new Error(c[b]);if(v.header&&o.deflateSetHeader(this.strm,v.header),v.dictionary){var _;if(_=typeof v.dictionary=="string"?a.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(b=o.deflateSetDictionary(this.strm,_))!==f)throw new Error(c[b]);this._dict_set=!0}}function w(g,v){var b=new p(v);if(b.push(g,!0),b.err)throw b.msg||c[b.err];return b.result}p.prototype.push=function(g,v){var b,_,C=this.strm,j=this.options.chunkSize;if(this.ended)return!1;_=v===~~v?v:v===!0?4:0,typeof g=="string"?C.input=a.string2buf(g):d.call(g)==="[object ArrayBuffer]"?C.input=new Uint8Array(g):C.input=g,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(j),C.next_out=0,C.avail_out=j),(b=o.deflate(C,_))!==1&&b!==f)return this.onEnd(b),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&b!==1);return _===4?(b=o.deflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===f):_!==2||(this.onEnd(f),!(C.avail_out=0))},p.prototype.onData=function(g){this.chunks.push(g)},p.prototype.onEnd=function(g){g===f&&(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=p,s.deflate=w,s.deflateRaw=function(g,v){return(v=v||{}).raw=!0,w(g,v)},s.gzip=function(g,v){return(v=v||{}).gzip=!0,w(g,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,s){var o=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),u=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),h=Object.prototype.toString;function m(p){if(!(this instanceof m))return new m(p);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},p||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||p&&p.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&!(15&w.windowBits)&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var g=o.inflateInit2(this.strm,w.windowBits);if(g!==c.Z_OK)throw new Error(u[g]);this.header=new f,o.inflateGetHeader(this.strm,this.header)}function x(p,w){var g=new m(w);if(g.push(p,!0),g.err)throw g.msg||u[g.err];return g.result}m.prototype.push=function(p,w){var g,v,b,_,C,j,T=this.strm,R=this.options.chunkSize,A=this.options.dictionary,O=!1;if(this.ended)return!1;v=w===~~w?w:w===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?T.input=a.binstring2buf(p):h.call(p)==="[object ArrayBuffer]"?T.input=new Uint8Array(p):T.input=p,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(R),T.next_out=0,T.avail_out=R),(g=o.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&A&&(j=typeof A=="string"?a.string2buf(A):h.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,g=o.inflateSetDictionary(this.strm,j)),g===c.Z_BUF_ERROR&&O===!0&&(g=c.Z_OK,O=!1),g!==c.Z_STREAM_END&&g!==c.Z_OK)return this.onEnd(g),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&g!==c.Z_STREAM_END&&(T.avail_in!==0||v!==c.Z_FINISH&&v!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(b=a.utf8border(T.output,T.next_out),_=T.next_out-b,C=a.buf2string(T.output,b),T.next_out=_,T.avail_out=R-_,_&&i.arraySet(T.output,T.output,b,_,0),this.onData(C)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(O=!0)}while((0<T.avail_in||T.avail_out===0)&&g!==c.Z_STREAM_END);return g===c.Z_STREAM_END&&(v=c.Z_FINISH),v===c.Z_FINISH?(g=o.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===c.Z_OK):v!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},m.prototype.onData=function(p){this.chunks.push(p)},m.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Inflate=m,s.inflate=x,s.inflateRaw=function(p,w){return(w=w||{}).raw=!0,x(p,w)},s.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var d=u.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,u){return c.length===u?c:c.subarray?c.subarray(0,u):(c.length=u,c)};var i={arraySet:function(c,u,d,f,h){if(u.subarray&&c.subarray)c.set(u.subarray(d,d+f),h);else for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){var u,d,f,h,m,x;for(u=f=0,d=c.length;u<d;u++)f+=c[u].length;for(x=new Uint8Array(f),u=h=0,d=c.length;u<d;u++)m=c[u],x.set(m,h),h+=m.length;return x}},a={arraySet:function(c,u,d,f,h){for(var m=0;m<f;m++)c[h+m]=u[d+m]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,i)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,a))},s.setTyped(o)},{}],42:[function(n,r,s){var o=n("./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 c=new o.Buf8(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function d(f,h){if(h<65537&&(f.subarray&&a||!f.subarray&&i))return String.fromCharCode.apply(null,o.shrinkBuf(f,h));for(var m="",x=0;x<h;x++)m+=String.fromCharCode(f[x]);return m}c[254]=c[254]=1,s.string2buf=function(f){var h,m,x,p,w,g=f.length,v=0;for(p=0;p<g;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<g&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),v+=m<128?1:m<2048?2:m<65536?3:4;for(h=new o.Buf8(v),p=w=0;w<v;p++)(64512&(m=f.charCodeAt(p)))==55296&&p+1<g&&(64512&(x=f.charCodeAt(p+1)))==56320&&(m=65536+(m-55296<<10)+(x-56320),p++),m<128?h[w++]=m:(m<2048?h[w++]=192|m>>>6:(m<65536?h[w++]=224|m>>>12:(h[w++]=240|m>>>18,h[w++]=128|m>>>12&63),h[w++]=128|m>>>6&63),h[w++]=128|63&m);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new o.Buf8(f.length),m=0,x=h.length;m<x;m++)h[m]=f.charCodeAt(m);return h},s.buf2string=function(f,h){var m,x,p,w,g=h||f.length,v=new Array(2*g);for(m=x=0;m<g;)if((p=f[m++])<128)v[x++]=p;else if(4<(w=c[p]))v[x++]=65533,m+=w-1;else{for(p&=w===2?31:w===3?15:7;1<w&&m<g;)p=p<<6|63&f[m++],w--;1<w?v[x++]=65533:p<65536?v[x++]=p:(p-=65536,v[x++]=55296|p>>10&1023,v[x++]=56320|1023&p)}return d(v,x)},s.utf8border=function(f,h){var m;for((h=h||f.length)>f.length&&(h=f.length),m=h-1;0<=m&&(192&f[m])==128;)m--;return m<0||m===0?h:m+c[f[m]]>h?m:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(o,i,a,c){for(var u=65535&o|0,d=o>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(u=u+i[c++]|0)|0,--f;);u%=65521,d%=65521}return u|d<<16|0}},{}],44:[function(n,r,s){r.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(n,r,s){var o=function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a}();r.exports=function(i,a,c,u){var d=o,f=u+c;i^=-1;for(var h=u;h<f;h++)i=i>>>8^d[255&(i^a[h])];return-1^i}},{}],46:[function(n,r,s){var o,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,m=0,x=-2,p=-1,w=4,g=2,v=8,b=9,_=286,C=30,j=19,T=2*_+1,R=15,A=3,O=258,G=O+A+1,N=42,z=113,S=1,U=2,J=3,F=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4<E?9:0)}function X(E){for(var ee=E.length;0<=--ee;)E[ee]=0}function $(E){var ee=E.state,Z=ee.pending;Z>E.avail_out&&(Z=E.avail_out),Z!==0&&(i.arraySet(E.output,ee.pending_buf,ee.pending_out,Z,E.next_out),E.next_out+=Z,ee.pending_out+=Z,E.total_out+=Z,E.avail_out-=Z,ee.pending-=Z,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function he(E,ee){E.pending_buf[E.pending++]=ee}function se(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function oe(E,ee){var Z,D,k=E.max_chain_length,P=E.strstart,M=E.prev_length,K=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,Y=E.window,Q=E.w_mask,te=E.prev,ge=E.strstart+O,Ke=Y[P+M-1],Ue=Y[P+M];E.prev_length>=E.good_match&&(k>>=2),K>E.lookahead&&(K=E.lookahead);do if(Y[(Z=ee)+M]===Ue&&Y[Z+M-1]===Ke&&Y[Z]===Y[P]&&Y[++Z]===Y[P+1]){P+=2,Z++;do;while(Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&Y[++P]===Y[++Z]&&P<ge);if(D=O-(ge-P),P=ge-O,M<D){if(E.match_start=ee,K<=(M=D))break;Ke=Y[P+M-1],Ue=Y[P+M]}}while((ee=te[ee&Q])>L&&--k!=0);return M<=E.lookahead?M:E.lookahead}function Oe(E){var ee,Z,D,k,P,M,K,L,Y,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-G)){for(i.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=Z=E.hash_size;D=E.head[--ee],E.head[ee]=te<=D?D-te:0,--Z;);for(ee=Z=te;D=E.prev[--ee],E.prev[ee]=te<=D?D-te:0,--Z;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,K=E.window,L=E.strstart+E.lookahead,Y=k,Q=void 0,Q=M.avail_in,Y<Q&&(Q=Y),Z=Q===0?0:(M.avail_in-=Q,i.arraySet(K,M.input,M.next_in,Q,L),M.state.wrap===1?M.adler=c(M.adler,K,Q,L):M.state.wrap===2&&(M.adler=u(M.adler,K,Q,L)),M.next_in+=Q,M.total_in+=Q,Q),E.lookahead+=Z,E.lookahead+E.insert>=A)for(P=E.strstart-E.insert,E.ins_h=E.window[P],E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[P+A-1])&E.hash_mask,E.prev[P&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=P,P++,E.insert--,!(E.lookahead+E.insert<A)););}while(E.lookahead<G&&E.strm.avail_in!==0)}function me(E,ee){for(var Z,D;;){if(E.lookahead<G){if(Oe(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),Z!==0&&E.strstart-Z<=E.w_size-G&&(E.match_length=oe(E,Z)),E.match_length>=A)if(D=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else D=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(D&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function we(E,ee){for(var Z,D,k;;){if(E.lookahead<G){if(Oe(E),E.lookahead<G&&ee===f)return S;if(E.lookahead===0)break}if(Z=0,E.lookahead>=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=A-1,Z!==0&&E.prev_length<E.max_lazy_match&&E.strstart-Z<=E.w_size-G&&(E.match_length=oe(E,Z),E.match_length<=5&&(E.strategy===1||E.match_length===A&&4096<E.strstart-E.match_start)&&(E.match_length=A-1)),E.prev_length>=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,D=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+A-1])&E.hash_mask,Z=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=A-1,E.strstart++,D&&(B(E,!1),E.strm.avail_out===0))return S}else if(E.match_available){if((D=a._tr_tally(E,0,E.window[E.strstart-1]))&&B(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return S}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(D=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<A-1?E.strstart:A-1,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):E.last_lit&&(B(E,!1),E.strm.avail_out===0)?S:U}function Te(E,ee,Z,D,k){this.good_length=E,this.max_lazy=ee,this.nice_length=Z,this.max_chain=D,this.func=k}function Fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=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*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*j+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(R+1),this.heap=new i.Buf16(2*_+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*_+1),X(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 Ie(E){var ee;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=g,(ee=E.state).pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?N:z,E.adler=ee.wrap===2?0:1,ee.last_flush=f,a._tr_init(ee),m):W(E,x)}function Re(E){var ee=Ie(E);return ee===m&&function(Z){Z.window_size=2*Z.w_size,X(Z.head),Z.max_lazy_match=o[Z.level].max_lazy,Z.good_match=o[Z.level].good_length,Z.nice_match=o[Z.level].nice_length,Z.max_chain_length=o[Z.level].max_chain,Z.strstart=0,Z.block_start=0,Z.lookahead=0,Z.insert=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,Z.ins_h=0}(E.state),ee}function st(E,ee,Z,D,k,P){if(!E)return x;var M=1;if(ee===p&&(ee=6),D<0?(M=0,D=-D):15<D&&(M=2,D-=16),k<1||b<k||Z!==v||D<8||15<D||ee<0||9<ee||P<0||w<P)return W(E,x);D===8&&(D=9);var K=new Fe;return(E.state=K).strm=E,K.wrap=M,K.gzhead=null,K.w_bits=D,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=k+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+A-1)/A),K.window=new i.Buf8(2*K.w_size),K.head=new i.Buf16(K.hash_size),K.prev=new i.Buf16(K.w_size),K.lit_bufsize=1<<k+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new i.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=ee,K.strategy=P,K.method=Z,Re(E)}o=[new Te(0,0,0,0,function(E,ee){var Z=65535;for(Z>E.pending_buf_size-5&&(Z=E.pending_buf_size-5);;){if(E.lookahead<=1){if(Oe(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var D=E.block_start+Z;if((E.strstart===0||E.strstart>=D)&&(E.lookahead=E.strstart-D,E.strstart=D,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-G&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:F):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Te(4,4,8,4,me),new Te(4,5,16,8,me),new Te(4,6,32,32,me),new Te(4,4,16,16,we),new Te(8,16,32,32,we),new Te(8,16,128,128,we),new Te(8,32,128,256,we),new Te(32,128,258,1024,we),new Te(32,258,258,4096,we)],s.deflateInit=function(E,ee){return st(E,ee,v,15,8,0)},s.deflateInit2=st,s.deflateReset=Re,s.deflateResetKeep=Ie,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,m):x},s.deflate=function(E,ee){var Z,D,k,P;if(!E||!E.state||5<ee||ee<0)return E?W(E,x):x;if(D=E.state,!E.output||!E.input&&E.avail_in!==0||D.status===666&&ee!==h)return W(E,E.avail_out===0?-5:x);if(D.strm=E,Z=D.last_flush,D.last_flush=ee,D.status===N)if(D.wrap===2)E.adler=0,he(D,31),he(D,139),he(D,8),D.gzhead?(he(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),he(D,255&D.gzhead.time),he(D,D.gzhead.time>>8&255),he(D,D.gzhead.time>>16&255),he(D,D.gzhead.time>>24&255),he(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),he(D,255&D.gzhead.os),D.gzhead.extra&&D.gzhead.extra.length&&(he(D,255&D.gzhead.extra.length),he(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&(E.adler=u(E.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=69):(he(D,0),he(D,0),he(D,0),he(D,0),he(D,0),he(D,D.level===9?2:2<=D.strategy||D.level<2?4:0),he(D,3),D.status=z);else{var M=v+(D.w_bits-8<<4)<<8;M|=(2<=D.strategy||D.level<2?0:D.level<6?1:D.level===6?2:3)<<6,D.strstart!==0&&(M|=32),M+=31-M%31,D.status=z,se(D,M),D.strstart!==0&&(se(D,E.adler>>>16),se(D,65535&E.adler)),E.adler=1}if(D.status===69)if(D.gzhead.extra){for(k=D.pending;D.gzindex<(65535&D.gzhead.extra.length)&&(D.pending!==D.pending_buf_size||(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending!==D.pending_buf_size));)he(D,255&D.gzhead.extra[D.gzindex]),D.gzindex++;D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),D.gzindex===D.gzhead.extra.length&&(D.gzindex=0,D.status=73)}else D.status=73;if(D.status===73)if(D.gzhead.name){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.name.length?255&D.gzhead.name.charCodeAt(D.gzindex++):0,he(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.gzindex=0,D.status=91)}else D.status=91;if(D.status===91)if(D.gzhead.comment){k=D.pending;do{if(D.pending===D.pending_buf_size&&(D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),$(E),k=D.pending,D.pending===D.pending_buf_size)){P=1;break}P=D.gzindex<D.gzhead.comment.length?255&D.gzhead.comment.charCodeAt(D.gzindex++):0,he(D,P)}while(P!==0);D.gzhead.hcrc&&D.pending>k&&(E.adler=u(E.adler,D.pending_buf,D.pending-k,k)),P===0&&(D.status=103)}else D.status=103;if(D.status===103&&(D.gzhead.hcrc?(D.pending+2>D.pending_buf_size&&$(E),D.pending+2<=D.pending_buf_size&&(he(D,255&E.adler),he(D,E.adler>>8&255),E.adler=0,D.status=z)):D.status=z),D.pending!==0){if($(E),E.avail_out===0)return D.last_flush=-1,m}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(D.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||D.lookahead!==0||ee!==f&&D.status!==666){var K=D.strategy===2?function(L,Y){for(var Q;;){if(L.lookahead===0&&(Oe(L),L.lookahead===0)){if(Y===f)return S;break}if(L.match_length=0,Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):D.strategy===3?function(L,Y){for(var Q,te,ge,Ke,Ue=L.window;;){if(L.lookahead<=O){if(Oe(L),L.lookahead<=O&&Y===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0<L.strstart&&(te=Ue[ge=L.strstart-1])===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]){Ke=L.strstart+O;do;while(te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&te===Ue[++ge]&&ge<Ke);L.match_length=O-(Ke-ge),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=a._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:F):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(D,ee):o[D.level].func(D,ee);if(K!==J&&K!==F||(D.status=666),K===S||K===J)return E.avail_out===0&&(D.last_flush=-1),m;if(K===U&&(ee===1?a._tr_align(D):ee!==5&&(a._tr_stored_block(D,0,0,!1),ee===3&&(X(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),$(E),E.avail_out===0))return D.last_flush=-1,m}return ee!==h?m:D.wrap<=0?1:(D.wrap===2?(he(D,255&E.adler),he(D,E.adler>>8&255),he(D,E.adler>>16&255),he(D,E.adler>>24&255),he(D,255&E.total_in),he(D,E.total_in>>8&255),he(D,E.total_in>>16&255),he(D,E.total_in>>24&255)):(se(D,E.adler>>>16),se(D,65535&E.adler)),$(E),0<D.wrap&&(D.wrap=-D.wrap),D.pending!==0?m:1)},s.deflateEnd=function(E){var ee;return E&&E.state?(ee=E.state.status)!==N&&ee!==69&&ee!==73&&ee!==91&&ee!==103&&ee!==z&&ee!==666?W(E,x):(E.state=null,ee===z?W(E,-3):m):x},s.deflateSetDictionary=function(E,ee){var Z,D,k,P,M,K,L,Y,Q=ee.length;if(!E||!E.state||(P=(Z=E.state).wrap)===2||P===1&&Z.status!==N||Z.lookahead)return x;for(P===1&&(E.adler=c(E.adler,ee,Q,0)),Z.wrap=0,Q>=Z.w_size&&(P===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),Y=new i.Buf8(Z.w_size),i.arraySet(Y,ee,Q-Z.w_size,Z.w_size,0),ee=Y,Q=Z.w_size),M=E.avail_in,K=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,Oe(Z);Z.lookahead>=A;){for(D=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<<Z.hash_shift^Z.window[D+A-1])&Z.hash_mask,Z.prev[D&Z.w_mask]=Z.head[Z.ins_h],Z.head[Z.ins_h]=D,D++,--k;);Z.strstart=D,Z.lookahead=A-1,Oe(Z)}return Z.strstart+=Z.lookahead,Z.block_start=Z.strstart,Z.insert=Z.lookahead,Z.lookahead=0,Z.match_length=Z.prev_length=A-1,Z.match_available=0,E.next_in=K,E.input=L,E.avail_in=M,Z.wrap=P,m},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,s){r.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(n,r,s){r.exports=function(o,i){var a,c,u,d,f,h,m,x,p,w,g,v,b,_,C,j,T,R,A,O,G,N,z,S,U;a=o.state,c=o.next_in,S=o.input,u=c+(o.avail_in-5),d=o.next_out,U=o.output,f=d-(i-o.avail_out),h=d+(o.avail_out-257),m=a.dmax,x=a.wsize,p=a.whave,w=a.wnext,g=a.window,v=a.hold,b=a.bits,_=a.lencode,C=a.distcode,j=(1<<a.lenbits)-1,T=(1<<a.distbits)-1;e:do{b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=_[v&j];t:for(;;){if(v>>>=A=R>>>24,b-=A,(A=R>>>16&255)===0)U[d++]=65535&R;else{if(!(16&A)){if(!(64&A)){R=_[(65535&R)+(v&(1<<A)-1)];continue t}if(32&A){a.mode=12;break e}o.msg="invalid literal/length code",a.mode=30;break e}O=65535&R,(A&=15)&&(b<A&&(v+=S[c++]<<b,b+=8),O+=v&(1<<A)-1,v>>>=A,b-=A),b<15&&(v+=S[c++]<<b,b+=8,v+=S[c++]<<b,b+=8),R=C[v&T];n:for(;;){if(v>>>=A=R>>>24,b-=A,!(16&(A=R>>>16&255))){if(!(64&A)){R=C[(65535&R)+(v&(1<<A)-1)];continue n}o.msg="invalid distance code",a.mode=30;break e}if(G=65535&R,b<(A&=15)&&(v+=S[c++]<<b,(b+=8)<A&&(v+=S[c++]<<b,b+=8)),m<(G+=v&(1<<A)-1)){o.msg="invalid distance too far back",a.mode=30;break e}if(v>>>=A,b-=A,(A=d-f)<G){if(p<(A=G-A)&&a.sane){o.msg="invalid distance too far back",a.mode=30;break e}if(z=g,(N=0)===w){if(N+=x-A,A<O){for(O-=A;U[d++]=g[N++],--A;);N=d-G,z=U}}else if(w<A){if(N+=x+w-A,(A-=w)<O){for(O-=A;U[d++]=g[N++],--A;);if(N=0,w<O){for(O-=A=w;U[d++]=g[N++],--A;);N=d-G,z=U}}}else if(N+=w-A,A<O){for(O-=A;U[d++]=g[N++],--A;);N=d-G,z=U}for(;2<O;)U[d++]=z[N++],U[d++]=z[N++],U[d++]=z[N++],O-=3;O&&(U[d++]=z[N++],1<O&&(U[d++]=z[N++]))}else{for(N=d-G;U[d++]=U[N++],U[d++]=U[N++],U[d++]=U[N++],2<(O-=3););O&&(U[d++]=U[N++],1<O&&(U[d++]=U[N++]))}break}}break}}while(c<u&&d<h);c-=O=b>>3,v&=(1<<(b-=O<<3))-1,o.next_in=c,o.next_out=d,o.avail_in=c<u?u-c+5:5-(c-u),o.avail_out=d<h?h-d+257:257-(d-h),a.hold=v,a.bits=b}},{}],49:[function(n,r,s){var o=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),u=n("./inftrees"),d=1,f=2,h=0,m=-2,x=1,p=852,w=592;function g(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<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 b(N){var z;return N&&N.state?(z=N.state,N.total_in=N.total_out=z.total=0,N.msg="",z.wrap&&(N.adler=1&z.wrap),z.mode=x,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new o.Buf32(p),z.distcode=z.distdyn=new o.Buf32(w),z.sane=1,z.back=-1,h):m}function _(N){var z;return N&&N.state?((z=N.state).wsize=0,z.whave=0,z.wnext=0,b(N)):m}function C(N,z){var S,U;return N&&N.state?(U=N.state,z<0?(S=0,z=-z):(S=1+(z>>4),z<48&&(z&=15)),z&&(z<8||15<z)?m:(U.window!==null&&U.wbits!==z&&(U.window=null),U.wrap=S,U.wbits=z,_(N))):m}function j(N,z){var S,U;return N?(U=new v,(N.state=U).window=null,(S=C(N,z))!==h&&(N.state=null),S):m}var T,R,A=!0;function O(N){if(A){var z;for(T=new o.Buf32(512),R=new o.Buf32(32),z=0;z<144;)N.lens[z++]=8;for(;z<256;)N.lens[z++]=9;for(;z<280;)N.lens[z++]=7;for(;z<288;)N.lens[z++]=8;for(u(d,N.lens,0,288,T,0,N.work,{bits:9}),z=0;z<32;)N.lens[z++]=5;u(f,N.lens,0,32,R,0,N.work,{bits:5}),A=!1}N.lencode=T,N.lenbits=9,N.distcode=R,N.distbits=5}function G(N,z,S,U){var J,F=N.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new o.Buf8(F.wsize)),U>=F.wsize?(o.arraySet(F.window,z,S-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(U<(J=F.wsize-F.wnext)&&(J=U),o.arraySet(F.window,z,S-U,J,F.wnext),(U-=J)?(o.arraySet(F.window,z,S-U,U,0),F.wnext=U,F.whave=F.wsize):(F.wnext+=J,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=J))),0}s.inflateReset=_,s.inflateReset2=C,s.inflateResetKeep=b,s.inflateInit=function(N){return j(N,15)},s.inflateInit2=j,s.inflate=function(N,z){var S,U,J,F,W,I,X,$,B,he,se,oe,Oe,me,we,Te,Fe,Ie,Re,st,E,ee,Z,D,k=0,P=new o.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return m;(S=N.state).mode===12&&(S.mode=13),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,he=I,se=X,ee=h;e:for(;;)switch(S.mode){case x:if(S.wrap===0){S.mode=13;break}for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(2&S.wrap&&$===35615){P[S.check=0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<<E,N.adler=S.check=1,S.mode=512&$?10:12,B=$=0;break;case 2:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.flags=$,(255&S.flags)!=8){N.msg="unknown compression method",S.mode=30;break}if(57344&S.flags){N.msg="unknown header flags set",S.mode=30;break}S.head&&(S.head.text=$>>8&1),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.time=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,P[2]=$>>>16&255,P[3]=$>>>24&255,S.check=a(S.check,P,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.head&&(S.head.xflags=255&$,S.head.os=$>>8),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length=$,S.head&&(S.head.extra_len=$),512&S.flags&&(P[0]=255&$,P[1]=$>>>8&255,S.check=a(S.check,P,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(oe=S.length)&&(oe=I),oe&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),o.arraySet(S.head.extra,U,F,oe,E)),512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,S.length-=oe),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(oe=0;E=U[F+oe++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&oe<I;);if(512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,E)break e}else S.head&&(S.head.name=null);S.length=0,S.mode=8;case 8:if(4096&S.flags){if(I===0)break e;for(oe=0;E=U[F+oe++],S.head&&E&&S.length<65536&&(S.head.comment+=String.fromCharCode(E)),E&&oe<I;);if(512&S.flags&&(S.check=a(S.check,U,oe,F)),I-=oe,F+=oe,E)break e}else S.head&&(S.head.comment=null);S.mode=9;case 9:if(512&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(65535&S.check)){N.msg="header crc mismatch",S.mode=30;break}B=$=0}S.head&&(S.head.hcrc=S.flags>>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}N.adler=S.check=g($),B=$=0,S.mode=11;case 11:if(S.havedict===0)return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,2;N.adler=S.check=1,S.mode=12;case 12:if(z===5||z===6)break e;case 13:if(S.last){$>>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}switch(S.last=1&$,B-=1,3&($>>>=1)){case 0:S.mode=14;break;case 1:if(O(S),S.mode=20,z!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if((65535&$)!=($>>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,z===6)break e;case 15:S.mode=16;case 16:if(oe=S.length){if(I<oe&&(oe=I),X<oe&&(oe=X),oe===0)break e;o.arraySet(J,U,F,oe,W),I-=oe,F+=oe,X-=oe,W+=oe,S.length-=oe;break}S.mode=12;break;case 17:for(;B<14;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(S.nlen=257+(31&$),$>>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286<S.nlen||30<S.ndist){N.msg="too many length or distance symbols",S.mode=30;break}S.have=0,S.mode=18;case 18:for(;S.have<S.ncode;){for(;B<3;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.lens[M[S.have++]]=7&$,$>>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,Z={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have<S.nlen+S.ndist;){for(;Te=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Fe<16)$>>>=we,B-=we,S.lens[S.have++]=Fe;else{if(Fe===16){for(D=we+2;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($>>>=we,B-=we,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],oe=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(D=we+3;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=we,E=0,oe=3+(7&($>>>=we)),$>>>=3,B-=3}else{for(D=we+7;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}B-=we,E=0,oe=11+(127&($>>>=we)),$>>>=7,B-=7}if(S.have+oe>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;oe--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,Z={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,Z={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,Z),S.distbits=Z.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,z===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,c(N,se),W=N.next_out,J=N.output,X=N.avail_out,F=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Te=(k=S.lencode[$&(1<<S.lenbits)-1])>>>16&255,Fe=65535&k,!((we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(Te&&!(240&Te)){for(Ie=we,Re=Te,st=Fe;Te=(k=S.lencode[st+(($&(1<<Ie+Re)-1)>>Ie)])>>>16&255,Fe=65535&k,!(Ie+(we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Ie,B-=Ie,S.back+=Ie}if($>>>=we,B-=we,S.back+=we,S.length=Fe,Te===0){S.mode=26;break}if(32&Te){S.back=-1,S.mode=12;break}if(64&Te){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Te,S.mode=22;case 22:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.length+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Te=(k=S.distcode[$&(1<<S.distbits)-1])>>>16&255,Fe=65535&k,!((we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if(!(240&Te)){for(Ie=we,Re=Te,st=Fe;Te=(k=S.distcode[st+(($&(1<<Ie+Re)-1)>>Ie)])>>>16&255,Fe=65535&k,!(Ie+(we=k>>>24)<=B);){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}$>>>=Ie,B-=Ie,S.back+=Ie}if($>>>=we,B-=we,S.back+=we,64&Te){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Te,S.mode=24;case 24:if(S.extra){for(D=S.extra;B<D;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}S.offset+=$&(1<<S.extra)-1,$>>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(oe=se-X,S.offset>oe){if((oe=S.offset-oe)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}Oe=oe>S.wnext?(oe-=S.wnext,S.wsize-oe):S.wnext-oe,oe>S.length&&(oe=S.length),me=S.window}else me=J,Oe=W-S.offset,oe=S.length;for(X<oe&&(oe=X),X-=oe,S.length-=oe;J[W++]=me[Oe++],--oe;);S.length===0&&(S.mode=21);break;case 26:if(X===0)break e;J[W++]=S.length,X--,S.mode=21;break;case 27:if(S.wrap){for(;B<32;){if(I===0)break e;I--,$|=U[F++]<<B,B+=8}if(se-=X,N.total_out+=se,S.total+=se,se&&(N.adler=S.check=S.flags?a(S.check,J,se,W-se):i(S.check,J,se,W-se)),se=X,(S.flags?$:g($))!==S.check){N.msg="incorrect data check",S.mode=30;break}B=$=0}S.mode=28;case 28:if(S.wrap&&S.flags){for(;B<32;){if(I===0)break e;I--,$+=U[F++]<<B,B+=8}if($!==(4294967295&S.total)){N.msg="incorrect length check",S.mode=30;break}B=$=0}S.mode=29;case 29:ee=1;break e;case 30:ee=-3;break e;case 31:return-4;case 32:default:return m}return N.next_out=W,N.avail_out=X,N.next_in=F,N.avail_in=I,S.hold=$,S.bits=B,(S.wsize||se!==N.avail_out&&S.mode<30&&(S.mode<27||z!==4))&&G(N,N.output,N.next_out,se-N.avail_out)?(S.mode=31,-4):(he-=N.avail_in,se-=N.avail_out,N.total_in+=he,N.total_out+=se,S.total+=se,S.wrap&&se&&(N.adler=S.check=S.flags?a(S.check,J,se,N.next_out-se):i(S.check,J,se,N.next_out-se)),N.data_type=S.bits+(S.last?64:0)+(S.mode===12?128:0)+(S.mode===20||S.mode===15?256:0),(he==0&&se===0||z===4)&&ee===h&&(ee=-5),ee)},s.inflateEnd=function(N){if(!N||!N.state)return m;var z=N.state;return z.window&&(z.window=null),N.state=null,h},s.inflateGetHeader=function(N,z){var S;return N&&N.state&&2&(S=N.state).wrap?((S.head=z).done=!1,h):m},s.inflateSetDictionary=function(N,z){var S,U=z.length;return N&&N.state?(S=N.state).wrap!==0&&S.mode!==11?m:S.mode===11&&i(1,z,U,0)!==S.check?-3:G(N,z,U,U)?(S.mode=31,-4):(S.havedict=1,h):m},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,s){var o=n("../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],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,h,m,x,p,w,g){var v,b,_,C,j,T,R,A,O,G=g.bits,N=0,z=0,S=0,U=0,J=0,F=0,W=0,I=0,X=0,$=0,B=null,he=0,se=new o.Buf16(16),oe=new o.Buf16(16),Oe=null,me=0;for(N=0;N<=15;N++)se[N]=0;for(z=0;z<m;z++)se[f[h+z]]++;for(J=G,U=15;1<=U&&se[U]===0;U--);if(U<J&&(J=U),U===0)return x[p++]=20971520,x[p++]=20971520,g.bits=1,0;for(S=1;S<U&&se[S]===0;S++);for(J<S&&(J=S),N=I=1;N<=15;N++)if(I<<=1,(I-=se[N])<0)return-1;if(0<I&&(d===0||U!==1))return-1;for(oe[1]=0,N=1;N<15;N++)oe[N+1]=oe[N]+se[N];for(z=0;z<m;z++)f[h+z]!==0&&(w[oe[f[h+z]]++]=z);if(T=d===0?(B=Oe=w,19):d===1?(B=i,he-=257,Oe=a,me-=257,256):(B=c,Oe=u,-1),N=S,j=p,W=z=$=0,_=-1,C=(X=1<<(F=J))-1,d===1&&852<X||d===2&&592<X)return 1;for(;;){for(R=N-W,O=w[z]<T?(A=0,w[z]):w[z]>T?(A=Oe[me+w[z]],B[he+w[z]]):(A=96,0),v=1<<N-W,S=b=1<<F;x[j+($>>W)+(b-=v)]=R<<24|A<<16|O|0,b!==0;);for(v=1<<N-1;$&v;)v>>=1;if(v!==0?($&=v-1,$+=v):$=0,z++,--se[N]==0){if(N===U)break;N=f[h+w[z]]}if(J<N&&($&C)!==_){for(W===0&&(W=J),j+=S,I=1<<(F=N-W);F+W<U&&!((I-=se[F+W])<=0);)F++,I<<=1;if(X+=1<<F,d===1&&852<X||d===2&&592<X)return 1;x[_=$&C]=J<<24|F<<16|j-p|0}}return $!==0&&(x[j+$]=N-W<<24|64<<16|0),g.bits=J,0}},{"../utils/common":41}],51:[function(n,r,s){r.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(n,r,s){var o=n("../utils/common"),i=0,a=1;function c(k){for(var P=k.length;0<=--P;)k[P]=0}var u=0,d=29,f=256,h=f+1+d,m=30,x=19,p=2*h+1,w=15,g=16,v=7,b=256,_=16,C=17,j=18,T=[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],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=new Array(2*(h+2));c(G);var N=new Array(2*m);c(N);var z=new Array(512);c(z);var S=new Array(256);c(S);var U=new Array(d);c(U);var J,F,W,I=new Array(m);function X(k,P,M,K,L){this.static_tree=k,this.extra_bits=P,this.extra_base=M,this.elems=K,this.max_length=L,this.has_stree=k&&k.length}function $(k,P){this.dyn_tree=k,this.max_code=0,this.stat_desc=P}function B(k){return k<256?z[k]:z[256+(k>>>7)]}function he(k,P){k.pending_buf[k.pending++]=255&P,k.pending_buf[k.pending++]=P>>>8&255}function se(k,P,M){k.bi_valid>g-M?(k.bi_buf|=P<<k.bi_valid&65535,he(k,k.bi_buf),k.bi_buf=P>>g-k.bi_valid,k.bi_valid+=M-g):(k.bi_buf|=P<<k.bi_valid&65535,k.bi_valid+=M)}function oe(k,P,M){se(k,M[2*P],M[2*P+1])}function Oe(k,P){for(var M=0;M|=1&k,k>>>=1,M<<=1,0<--P;);return M>>>1}function me(k,P,M){var K,L,Y=new Array(w+1),Q=0;for(K=1;K<=w;K++)Y[K]=Q=Q+M[K-1]<<1;for(L=0;L<=P;L++){var te=k[2*L+1];te!==0&&(k[2*L]=Oe(Y[te]++,te))}}function we(k){var P;for(P=0;P<h;P++)k.dyn_ltree[2*P]=0;for(P=0;P<m;P++)k.dyn_dtree[2*P]=0;for(P=0;P<x;P++)k.bl_tree[2*P]=0;k.dyn_ltree[2*b]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function Te(k){8<k.bi_valid?he(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function Fe(k,P,M,K){var L=2*P,Y=2*M;return k[L]<k[Y]||k[L]===k[Y]&&K[P]<=K[M]}function Ie(k,P,M){for(var K=k.heap[M],L=M<<1;L<=k.heap_len&&(L<k.heap_len&&Fe(P,k.heap[L+1],k.heap[L],k.depth)&&L++,!Fe(P,K,k.heap[L],k.depth));)k.heap[M]=k.heap[L],M=L,L<<=1;k.heap[M]=K}function Re(k,P,M){var K,L,Y,Q,te=0;if(k.last_lit!==0)for(;K=k.pending_buf[k.d_buf+2*te]<<8|k.pending_buf[k.d_buf+2*te+1],L=k.pending_buf[k.l_buf+te],te++,K===0?oe(k,L,P):(oe(k,(Y=S[L])+f+1,P),(Q=T[Y])!==0&&se(k,L-=U[Y],Q),oe(k,Y=B(--K),M),(Q=R[Y])!==0&&se(k,K-=I[Y],Q)),te<k.last_lit;);oe(k,b,P)}function st(k,P){var M,K,L,Y=P.dyn_tree,Q=P.stat_desc.static_tree,te=P.stat_desc.has_stree,ge=P.stat_desc.elems,Ke=-1;for(k.heap_len=0,k.heap_max=p,M=0;M<ge;M++)Y[2*M]!==0?(k.heap[++k.heap_len]=Ke=M,k.depth[M]=0):Y[2*M+1]=0;for(;k.heap_len<2;)Y[2*(L=k.heap[++k.heap_len]=Ke<2?++Ke:0)]=1,k.depth[L]=0,k.opt_len--,te&&(k.static_len-=Q[2*L+1]);for(P.max_code=Ke,M=k.heap_len>>1;1<=M;M--)Ie(k,Y,M);for(L=ge;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Ie(k,Y,1),K=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=K,Y[2*L]=Y[2*M]+Y[2*K],k.depth[L]=(k.depth[M]>=k.depth[K]?k.depth[M]:k.depth[K])+1,Y[2*M+1]=Y[2*K+1]=L,k.heap[1]=L++,Ie(k,Y,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function(Ue,Et){var tr,Yt,ds,lt,fs,hs,nr=Et.dyn_tree,vu=Et.max_code,xu=Et.stat_desc.static_tree,Ri=Et.stat_desc.has_stree,wu=Et.stat_desc.extra_bits,Ai=Et.stat_desc.extra_base,Fr=Et.stat_desc.max_length,qs=0;for(lt=0;lt<=w;lt++)Ue.bl_count[lt]=0;for(nr[2*Ue.heap[Ue.heap_max]+1]=0,tr=Ue.heap_max+1;tr<p;tr++)Fr<(lt=nr[2*nr[2*(Yt=Ue.heap[tr])+1]+1]+1)&&(lt=Fr,qs++),nr[2*Yt+1]=lt,vu<Yt||(Ue.bl_count[lt]++,fs=0,Ai<=Yt&&(fs=wu[Yt-Ai]),hs=nr[2*Yt],Ue.opt_len+=hs*(lt+fs),Ri&&(Ue.static_len+=hs*(xu[2*Yt+1]+fs)));if(qs!==0){do{for(lt=Fr-1;Ue.bl_count[lt]===0;)lt--;Ue.bl_count[lt]--,Ue.bl_count[lt+1]+=2,Ue.bl_count[Fr]--,qs-=2}while(0<qs);for(lt=Fr;lt!==0;lt--)for(Yt=Ue.bl_count[lt];Yt!==0;)vu<(ds=Ue.heap[--tr])||(nr[2*ds+1]!==lt&&(Ue.opt_len+=(lt-nr[2*ds+1])*nr[2*ds],nr[2*ds+1]=lt),Yt--)}}(k,P),me(Y,Ke,k.bl_count)}function E(k,P,M){var K,L,Y=-1,Q=P[1],te=0,ge=7,Ke=4;for(Q===0&&(ge=138,Ke=3),P[2*(M+1)+1]=65535,K=0;K<=M;K++)L=Q,Q=P[2*(K+1)+1],++te<ge&&L===Q||(te<Ke?k.bl_tree[2*L]+=te:L!==0?(L!==Y&&k.bl_tree[2*L]++,k.bl_tree[2*_]++):te<=10?k.bl_tree[2*C]++:k.bl_tree[2*j]++,Y=L,Ke=(te=0)===Q?(ge=138,3):L===Q?(ge=6,3):(ge=7,4))}function ee(k,P,M){var K,L,Y=-1,Q=P[1],te=0,ge=7,Ke=4;for(Q===0&&(ge=138,Ke=3),K=0;K<=M;K++)if(L=Q,Q=P[2*(K+1)+1],!(++te<ge&&L===Q)){if(te<Ke)for(;oe(k,L,k.bl_tree),--te!=0;);else L!==0?(L!==Y&&(oe(k,L,k.bl_tree),te--),oe(k,_,k.bl_tree),se(k,te-3,2)):te<=10?(oe(k,C,k.bl_tree),se(k,te-3,3)):(oe(k,j,k.bl_tree),se(k,te-11,7));Y=L,Ke=(te=0)===Q?(ge=138,3):L===Q?(ge=6,3):(ge=7,4)}}c(I);var Z=!1;function D(k,P,M,K){se(k,(u<<1)+(K?1:0),3),function(L,Y,Q,te){Te(L),he(L,Q),he(L,~Q),o.arraySet(L.pending_buf,L.window,Y,Q,L.pending),L.pending+=Q}(k,P,M)}s._tr_init=function(k){Z||(function(){var P,M,K,L,Y,Q=new Array(w+1);for(L=K=0;L<d-1;L++)for(U[L]=K,P=0;P<1<<T[L];P++)S[K++]=L;for(S[K-1]=L,L=Y=0;L<16;L++)for(I[L]=Y,P=0;P<1<<R[L];P++)z[Y++]=L;for(Y>>=7;L<m;L++)for(I[L]=Y<<7,P=0;P<1<<R[L]-7;P++)z[256+Y++]=L;for(M=0;M<=w;M++)Q[M]=0;for(P=0;P<=143;)G[2*P+1]=8,P++,Q[8]++;for(;P<=255;)G[2*P+1]=9,P++,Q[9]++;for(;P<=279;)G[2*P+1]=7,P++,Q[7]++;for(;P<=287;)G[2*P+1]=8,P++,Q[8]++;for(me(G,h+1,Q),P=0;P<m;P++)N[2*P+1]=5,N[2*P]=Oe(P,5);J=new X(G,T,f+1,h,w),F=new X(N,R,0,m,w),W=new X(new Array(0),A,0,x,v)}(),Z=!0),k.l_desc=new $(k.dyn_ltree,J),k.d_desc=new $(k.dyn_dtree,F),k.bl_desc=new $(k.bl_tree,W),k.bi_buf=0,k.bi_valid=0,we(k)},s._tr_stored_block=D,s._tr_flush_block=function(k,P,M,K){var L,Y,Q=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=function(te){var ge,Ke=4093624447;for(ge=0;ge<=31;ge++,Ke>>>=1)if(1&Ke&&te.dyn_ltree[2*ge]!==0)return i;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(ge=32;ge<f;ge++)if(te.dyn_ltree[2*ge]!==0)return a;return i}(k)),st(k,k.l_desc),st(k,k.d_desc),Q=function(te){var ge;for(E(te,te.dyn_ltree,te.l_desc.max_code),E(te,te.dyn_dtree,te.d_desc.max_code),st(te,te.bl_desc),ge=x-1;3<=ge&&te.bl_tree[2*O[ge]+1]===0;ge--);return te.opt_len+=3*(ge+1)+5+5+4,ge}(k),L=k.opt_len+3+7>>>3,(Y=k.static_len+3+7>>>3)<=L&&(L=Y)):L=Y=M+5,M+4<=L&&P!==-1?D(k,P,M,K):k.strategy===4||Y===L?(se(k,2+(K?1:0),3),Re(k,G,N)):(se(k,4+(K?1:0),3),function(te,ge,Ke,Ue){var Et;for(se(te,ge-257,5),se(te,Ke-1,5),se(te,Ue-4,4),Et=0;Et<Ue;Et++)se(te,te.bl_tree[2*O[Et]+1],3);ee(te,te.dyn_ltree,ge-1),ee(te,te.dyn_dtree,Ke-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Re(k,k.dyn_ltree,k.dyn_dtree)),we(k),K&&Te(k)},s._tr_tally=function(k,P,M){return k.pending_buf[k.d_buf+2*k.last_lit]=P>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&P,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,P===0?k.dyn_ltree[2*M]++:(k.matches++,P--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(P)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){se(k,2,3),oe(k,b,G),function(P){P.bi_valid===16?(he(P,P.bi_buf),P.bi_buf=0,P.bi_valid=0):8<=P.bi_valid&&(P.pending_buf[P.pending++]=255&P.bi_buf,P.bi_buf>>=8,P.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.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(n,r,s){(function(o){(function(i,a){if(!i.setImmediate){var c,u,d,f,h=1,m={},x=!1,p=i.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(i);w=w&&w.setTimeout?w:i,c={}.toString.call(i.process)==="[object process]"?function(_){process.nextTick(function(){v(_)})}:function(){if(i.postMessage&&!i.importScripts){var _=!0,C=i.onmessage;return i.onmessage=function(){_=!1},i.postMessage("","*"),i.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",b,!1):i.attachEvent("onmessage",b),function(_){i.postMessage(f+_,"*")}):i.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){v(_.data)},function(_){d.port2.postMessage(_)}):p&&"onreadystatechange"in p.createElement("script")?(u=p.documentElement,function(_){var C=p.createElement("script");C.onreadystatechange=function(){v(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(v,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j<C.length;j++)C[j]=arguments[j+1];var T={callback:_,args:C};return m[h]=T,c(h),h++},w.clearImmediate=g}function g(_){delete m[_]}function v(_){if(x)setTimeout(v,0,_);else{var C=m[_];if(C){x=!0;try{(function(j){var T=j.callback,R=j.args;switch(R.length){case 0:T();break;case 1:T(R[0]);break;case 2:T(R[0],R[1]);break;case 3:T(R[0],R[1],R[2]);break;default:T.apply(a,R)}})(C)}finally{g(_),x=!1}}}}function b(_){_.source===i&&typeof _.data=="string"&&_.data.indexOf(f)===0&&v(+_.data.slice(f.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof Cu<"u"?Cu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(pN);var UU=pN.exports;const VU=Uf(UU);function BU(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const WU=async(e,t)=>{const n=new VU;t.forEach(o=>{n.file(o.name,o.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},Ia=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)},HU=e=>Ia(e).split(" ")[0];function gN(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${o}:${i}:${a}`}const YU=async e=>{const t=ot();let n=1;e.page&&(n=e.page);let r=2;e.perPage&&(r=e.perPage);let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=t.filter("expiredAt<{:expiredAt}",{expiredAt:gN(15)})),t.collection("domains").getList(n,r,{sort:"-created",expand:"lastDeployment",filter:s})},KU=async()=>{const e=ot(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:gN(15)})}),r=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},GU=async e=>await ot().collection("domains").getOne(e),mf=async e=>e.id?await ot().collection("domains").update(e.id,e):await ot().collection("domains").create(e),ZU=async e=>await ot().collection("domains").delete(e),qU=(e,t)=>ot().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),XU=e=>{ot().collection("domains").unsubscribe(e)},QU=()=>{const e=zr(),t=Jn(),{t:n}=Ye(),r=Ir(),s=new URLSearchParams(r.search),o=s.get("page"),i=s.get("state"),[a,c]=y.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},m=async _=>{try{await ZU(_),p(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,p]=y.useState([]);y.useEffect(()=>{(async()=>{const C=await YU({page:o?Number(o):1,perPage:10,state:i||""});p(C.items),c(C.totalPages)})()},[o,i]);const w=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await mf(T);const R=x.map(A=>A.id===_?{...A,checked:!j}:A);p(R)},g=async _=>{try{XU(_.id??""),qU(_.id??"",C=>{const j=x.map(T=>T.id===C.id?{...C}:T);p(j)}),_.rightnow=!0,await mf(_),e.toast({title:n("domain.deploy.started.message"),description:n("domain.deploy.started.tips")})}catch{e.toast({title:n("domain.deploy.failed.message"),description:l.jsxs(WO,{i18nKey:"domain.deploy.failed.tips",children:["text1",l.jsx(wn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},v=async _=>{await g({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await WU(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Px,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:n("domain.page.title")}),l.jsx(Me,{onClick:u,children:n("domain.add")})]}),x.length?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-36",children:n("common.text.domain")}),l.jsx("div",{className:"w-40",children:n("domain.props.expiry")}),l.jsx("div",{className:"w-32",children:n("domain.props.last_execution_status")}),l.jsx("div",{className:"w-64",children:n("domain.props.last_execution_stage")}),l.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.props.last_execution_time")}),l.jsx("div",{className:"w-24",children:n("domain.props.enable")}),l.jsx("div",{className:"grow",children:n("common.text.operations")})]}),x.map(_=>{var C,j,T,R;return l.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:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>l.jsxs(l.Fragment,{children:[A,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:_.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:n("domain.props.expiry.date1",{date:90})}),l.jsx("div",{children:n("domain.props.expiry.date2",{date:HU(_.expiredAt)})})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(_x,{deployment:_.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?l.jsx(bx,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(R=_.expand.lastDeployment)==null?void 0:R.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?Ia(_.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(xx,{children:l.jsxs(fE,{children:[l.jsx(hE,{children:l.jsx(mu,{checked:_.enabled,onCheckedChange:()=>{w(_.id??"")}})}),l.jsx(wx,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("domain.props.enable.disabled"):n("domain.props.enable.enabled")})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>h(_.id??""),children:n("domain.history")}),l.jsxs(ur,{when:!!_.enabled,children:[l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>g(_),children:n("domain.deploy")})]}),l.jsxs(ur,{when:!!(_.enabled&&_.deployed),children:[l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>v(_),children:n("domain.deploy_forced")})]}),l.jsxs(ur,{when:!!_.expiredAt,children:[l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("common.download")})]}),!_.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(Sx,{children:[l.jsx(kx,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:n("common.delete")})}),l.jsxs(Mh,{children:[l.jsxs(Lh,{children:[l.jsx(Fh,{children:n("domain.delete")}),l.jsx($h,{children:n("domain.delete.confirm")})]}),l.jsxs(zh,{children:[l.jsx(Vh,{children:n("common.cancel")}),l.jsx(Uh,{onClick:()=>{m(_.id??"")},children:n("common.confirm")})]})]})]}),l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Me,{variant:"link",className:"p-0",onClick:()=>f(_.id??""),children:n("common.edit")})]})]})]},_.id)}),l.jsx(xE,{totalPages:a,currentPage:o?Number(o):1,onPageChange:_=>{d(_)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(mg,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.nodata")}),l.jsx(Me,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var pu=e=>e.type==="checkbox",ca=e=>e instanceof Date,_n=e=>e==null;const yN=e=>typeof e=="object";var Xt=e=>!_n(e)&&!Array.isArray(e)&&yN(e)&&!ca(e),vN=e=>Xt(e)&&e.target?pu(e.target)?e.target.checked:e.target.value:e,JU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,xN=(e,t)=>e.has(JU(t)),e8=e=>{const t=e.constructor&&e.constructor.prototype;return Xt(t)&&t.hasOwnProperty("isPrototypeOf")},Rx=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Rx&&(e instanceof Blob||e instanceof FileList))&&(n||Xt(e)))if(t=n?[]:{},!n&&!e8(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Tn(e[r]));else return e;return t}var Hh=e=>Array.isArray(e)?e.filter(Boolean):[],Ft=e=>e===void 0,de=(e,t,n)=>{if(!t||!Xt(e))return n;const r=Hh(t.split(/[,[\].]+?/)).reduce((s,o)=>_n(s)?s:s[o],e);return Ft(r)||r===e?Ft(e[t])?n:e[t]:r},Yr=e=>typeof e=="boolean",Ax=e=>/^\w*$/.test(e),wN=e=>Hh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),mt=(e,t,n)=>{let r=-1;const s=Ax(t)?[t]:wN(t),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let c=n;if(r!==i){const u=e[a];c=Xt(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=c,e=e[a]}return e};const pf={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_r={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ys={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},bN=We.createContext(null),Yh=()=>We.useContext(bN),t8=e=>{const{children:t,...n}=e;return We.createElement(bN.Provider,{value:n},t)};var _N=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(s,o,{get:()=>{const i=o;return t._proxyFormState[i]!==_r.all&&(t._proxyFormState[i]=!r||_r.all),n&&(n[i]=!0),e[i]}});return s},Ln=e=>Xt(e)&&!Object.keys(e).length,SN=(e,t,n,r)=>{n(e);const{name:s,...o}=e;return Ln(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(i=>t[i]===(!r||_r.all))},Jl=e=>Array.isArray(e)?e:[e],kN=(e,t,n)=>!e||!t||e===t||Jl(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Dx(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function n8(e){const t=Yh(),{control:n=t.control,disabled:r,name:s,exact:o}=e||{},[i,a]=We.useState(n._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,Dx({disabled:r,next:f=>c.current&&kN(d.current,f.name,o)&&SN(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),_N(i,n,u.current,!1)}var Gr=e=>typeof e=="string",CN=(e,t,n,r,s)=>Gr(e)?(r&&t.watch.add(e),de(n,e,s)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),de(n,o))):(r&&(t.watchAll=!0),n);function r8(e){const t=Yh(),{control:n=t.control,name:r,defaultValue:s,disabled:o,exact:i}=e||{},a=We.useRef(r);a.current=r,Dx({disabled:o,subject:n._subjects.values,next:d=>{kN(a.current,d.name,i)&&u(Tn(CN(a.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=We.useState(n._getWatch(r,s));return We.useEffect(()=>n._removeUnmounted()),c}function s8(e){const t=Yh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:o}=e,i=xN(s._names.array,n),a=r8({control:s,name:n,defaultValue:de(s._formValues,n,de(s._defaultValues,n,e.defaultValue)),exact:!0}),c=n8({control:s,name:n}),u=We.useRef(s.register(n,{...e.rules,value:a,...Yr(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(h,m)=>{const x=de(s._fields,h);x&&x._f&&(x._f.mount=m)};if(f(n,!0),d){const h=Tn(de(s._options.defaultValues,n));mt(s._defaultValues,n,h),Ft(de(s._formValues,n))&&mt(s._formValues,n,h)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),We.useEffect(()=>{de(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:de(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Yr(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:vN(d),name:n},type:pf.CHANGE}),[n]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:de(s._formValues,n),name:n},type:pf.BLUR}),[n,s]),ref:d=>{const f=de(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!de(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!de(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!de(c.validatingFields,n)},error:{enumerable:!0,get:()=>de(c.errors,n)}})}}const o8=e=>e.render(s8(e));var jN=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Ob=e=>({isOnSubmit:!e||e===_r.onSubmit,isOnBlur:e===_r.onBlur,isOnChange:e===_r.onChange,isOnAll:e===_r.all,isOnTouch:e===_r.onTouched}),Ib=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ec=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const o=de(e,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],s)&&!r)break;if(i.ref&&t(i.ref,i.name)&&!r)break;ec(a,t)}else Xt(a)&&ec(a,t)}}};var i8=(e,t,n)=>{const r=Jl(de(e,n));return mt(r,"root",t[n]),mt(e,n,r),e},Ox=e=>e.type==="file",ho=e=>typeof e=="function",gf=e=>{if(!Rx)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jd=e=>Gr(e),Ix=e=>e.type==="radio",yf=e=>e instanceof RegExp;const Mb={value:!1,isValid:!1},Lb={value:!0,isValid:!0};var EN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ft(e[0].attributes.value)?Ft(e[0].value)||e[0].value===""?Lb:{value:e[0].value,isValid:!0}:Lb:Mb}return Mb};const zb={isValid:!1,value:null};var NN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,zb):zb;function Fb(e,t,n="validate"){if(jd(e)||Array.isArray(e)&&e.every(jd)||Yr(e)&&!e)return{type:n,message:jd(e)?e:"",ref:t}}var Vi=e=>Xt(e)&&!yf(e)?e:{value:e,message:""},$b=async(e,t,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:m,name:x,valueAsNumber:p,mount:w,disabled:g}=e._f,v=de(t,x);if(!w||g)return{};const b=i?i[0]:o,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Yr(N)?"":N||""),b.reportValidity())},C={},j=Ix(o),T=pu(o),R=j||T,A=(p||Ox(o))&&Ft(o.value)&&Ft(v)||gf(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,O=jN.bind(null,x,n,C),G=(N,z,S,U=ys.maxLength,J=ys.minLength)=>{const F=N?z:S;C[x]={type:N?U:J,message:F,ref:o,...O(N?U:J,F)}};if(s?!Array.isArray(v)||!v.length:a&&(!R&&(A||_n(v))||Yr(v)&&!v||T&&!EN(i).isValid||j&&!NN(i).isValid)){const{value:N,message:z}=jd(a)?{value:!!a,message:a}:Vi(a);if(N&&(C[x]={type:ys.required,message:z,ref:b,...O(ys.required,z)},!n))return _(z),C}if(!A&&(!_n(d)||!_n(f))){let N,z;const S=Vi(f),U=Vi(d);if(!_n(v)&&!isNaN(v)){const J=o.valueAsNumber||v&&+v;_n(S.value)||(N=J>S.value),_n(U.value)||(z=J<U.value)}else{const J=o.valueAsDate||new Date(v),F=X=>new Date(new Date().toDateString()+" "+X),W=o.type=="time",I=o.type=="week";Gr(S.value)&&v&&(N=W?F(v)>F(S.value):I?v>S.value:J>new Date(S.value)),Gr(U.value)&&v&&(z=W?F(v)<F(U.value):I?v<U.value:J<new Date(U.value))}if((N||z)&&(G(!!N,S.message,U.message,ys.max,ys.min),!n))return _(C[x].message),C}if((c||u)&&!A&&(Gr(v)||s&&Array.isArray(v))){const N=Vi(c),z=Vi(u),S=!_n(N.value)&&v.length>+N.value,U=!_n(z.value)&&v.length<+z.value;if((S||U)&&(G(S,N.message,z.message),!n))return _(C[x].message),C}if(h&&!A&&Gr(v)){const{value:N,message:z}=Vi(h);if(yf(N)&&!v.match(N)&&(C[x]={type:ys.pattern,message:z,ref:o,...O(ys.pattern,z)},!n))return _(z),C}if(m){if(ho(m)){const N=await m(v,t),z=Fb(N,b);if(z&&(C[x]={...z,...O(ys.validate,z.message)},!n))return _(z.message),C}else if(Xt(m)){let N={};for(const z in m){if(!Ln(N)&&!n)break;const S=Fb(await m[z](v,t),b,z);S&&(N={...S,...O(z,S.message)},_(S.message),n&&(C[x]=N))}if(!Ln(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function a8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ft(e)?r++:e[t[r++]];return e}function l8(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ft(e[t]))return!1;return!0}function Kt(e,t){const n=Array.isArray(t)?t:Ax(t)?[t]:wN(t),r=n.length===1?e:a8(e,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(Xt(r)&&Ln(r)||Array.isArray(r)&&l8(r))&&Kt(e,n.slice(0,-1)),e}var ip=()=>{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=[]}}},vf=e=>_n(e)||!yN(e);function Xo(e,t){if(vf(e)||vf(t))return e===t;if(ca(e)&&ca(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const o=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=t[s];if(ca(o)&&ca(i)||Xt(o)&&Xt(i)||Array.isArray(o)&&Array.isArray(i)?!Xo(o,i):o!==i)return!1}}return!0}var TN=e=>e.type==="select-multiple",c8=e=>Ix(e)||pu(e),ap=e=>gf(e)&&e.isConnected,PN=e=>{for(const t in e)if(ho(e[t]))return!0;return!1};function xf(e,t={}){const n=Array.isArray(e);if(Xt(e)||n)for(const r in e)Array.isArray(e[r])||Xt(e[r])&&!PN(e[r])?(t[r]=Array.isArray(e[r])?[]:{},xf(e[r],t[r])):_n(e[r])||(t[r]=!0);return t}function RN(e,t,n){const r=Array.isArray(e);if(Xt(e)||r)for(const s in e)Array.isArray(e[s])||Xt(e[s])&&!PN(e[s])?Ft(t)||vf(n[s])?n[s]=Array.isArray(e[s])?xf(e[s],[]):{...xf(e[s])}:RN(e[s],_n(t)?{}:t[s],n[s]):n[s]=!Xo(e[s],t[s]);return n}var nd=(e,t)=>RN(e,t,xf(t)),AN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ft(e)?e:t?e===""?NaN:e&&+e:n&&Gr(e)?new Date(e):r?r(e):e;function lp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ox(t)?t.files:Ix(t)?NN(e.refs).value:TN(t)?[...t.selectedOptions].map(({value:n})=>n):pu(t)?EN(e.refs).value:AN(Ft(t.value)?e.ref.value:t.value,e)}var u8=(e,t,n,r)=>{const s={};for(const o of e){const i=de(t,o);i&&mt(s,o,i._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},jl=e=>Ft(e)?e:yf(e)?e.source:Xt(e)?yf(e.value)?e.value.source:e.value:e,d8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ub(e,t,n){const r=de(e,n);if(r||Ax(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=de(t,o),a=de(e,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var f8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,h8=(e,t)=>!Hh(de(e,t)).length&&Kt(e,t);const m8={mode:_r.onSubmit,reValidateMode:_r.onChange,shouldFocusError:!0};function p8(e={}){let t={...m8,...e},n={submitCount:0,isDirty:!1,isLoading:ho(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Xt(t.defaultValues)||Xt(t.values)?Tn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:Tn(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:ip(),array:ip(),state:ip()},h=Ob(t.mode),m=Ob(t.reValidateMode),x=t.criteriaMode===_r.all,p=k=>P=>{clearTimeout(u),u=setTimeout(k,P)},w=async k=>{if(d.isValid||k){const P=t.resolver?Ln((await R()).errors):await O(r,!0);P!==n.isValid&&f.state.next({isValid:P})}},g=(k,P)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(M=>{M&&(P?mt(n.validatingFields,M,P):Kt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Ln(n.validatingFields)}))},v=(k,P=[],M,K,L=!0,Y=!0)=>{if(K&&M){if(i.action=!0,Y&&Array.isArray(de(r,k))){const Q=M(de(r,k),K.argA,K.argB);L&&mt(r,k,Q)}if(Y&&Array.isArray(de(n.errors,k))){const Q=M(de(n.errors,k),K.argA,K.argB);L&&mt(n.errors,k,Q),h8(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(de(n.touchedFields,k))){const Q=M(de(n.touchedFields,k),K.argA,K.argB);L&&mt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=nd(s,o)),f.state.next({name:k,isDirty:N(k,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else mt(o,k,P)},b=(k,P)=>{mt(n.errors,k,P),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,P,M,K)=>{const L=de(r,k);if(L){const Y=de(o,k,Ft(M)?de(s,k):M);Ft(Y)||K&&K.defaultChecked||P?mt(o,k,P?Y:lp(L._f)):U(k,Y),i.mount&&w()}},j=(k,P,M,K,L)=>{let Y=!1,Q=!1;const te={name:k},ge=!!(de(r,k)&&de(r,k)._f&&de(r,k)._f.disabled);if(!M||K){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),Y=Q!==te.isDirty);const Ke=ge||Xo(de(s,k),P);Q=!!(!ge&&de(n.dirtyFields,k)),Ke||ge?Kt(n.dirtyFields,k):mt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&Q!==!Ke}if(M){const Ke=de(n.touchedFields,k);Ke||(mt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&Ke!==M)}return Y&&L&&f.state.next(te),Y?te:{}},T=(k,P,M,K)=>{const L=de(n.errors,k),Y=d.isValid&&Yr(P)&&n.isValid!==P;if(e.delayError&&M?(c=p(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?mt(n.errors,k,M):Kt(n.errors,k)),(M?!Xo(L,M):L)||!Ln(K)||Y){const Q={...K,...Y&&Yr(P)?{isValid:P}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},R=async k=>{g(k,!0);const P=await t.resolver(o,t.context,u8(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(k),P},A=async k=>{const{errors:P}=await R(k);if(k)for(const M of k){const K=de(P,M);K?mt(n.errors,M,K):Kt(n.errors,M)}else n.errors=P;return P},O=async(k,P,M={valid:!0})=>{for(const K in k){const L=k[K];if(L){const{_f:Y,...Q}=L;if(Y){const te=a.array.has(Y.name);g([K],!0);const ge=await $b(L,o,x,t.shouldUseNativeValidation&&!P,te);if(g([K]),ge[Y.name]&&(M.valid=!1,P))break;!P&&(de(ge,Y.name)?te?i8(n.errors,ge,Y.name):mt(n.errors,Y.name,ge[Y.name]):Kt(n.errors,Y.name))}Q&&await O(Q,P,M)}}return M.valid},G=()=>{for(const k of a.unMount){const P=de(r,k);P&&(P._f.refs?P._f.refs.every(M=>!ap(M)):!ap(P._f.ref))&&Oe(k)}a.unMount=new Set},N=(k,P)=>(k&&P&&mt(o,k,P),!Xo($(),s)),z=(k,P,M)=>CN(k,a,{...i.mount?o:Ft(P)?s:Gr(k)?{[k]:P}:P},M,P),S=k=>Hh(de(i.mount?o:s,k,e.shouldUnregister?de(s,k,[]):[])),U=(k,P,M={})=>{const K=de(r,k);let L=P;if(K){const Y=K._f;Y&&(!Y.disabled&&mt(o,k,AN(P,Y)),L=gf(Y.ref)&&_n(P)?"":P,TN(Y.ref)?[...Y.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):Y.refs?pu(Y.ref)?Y.refs.length>1?Y.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):Y.refs[0]&&(Y.refs[0].checked=!!L):Y.refs.forEach(Q=>Q.checked=Q.value===L):Ox(Y.ref)?Y.ref.value="":(Y.ref.value=L,Y.ref.type||f.values.next({name:k,values:{...o}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,P,M)=>{for(const K in P){const L=P[K],Y=`${k}.${K}`,Q=de(r,Y);(a.array.has(k)||!vf(L)||Q&&!Q._f)&&!ca(L)?J(Y,L,M):U(Y,L,M)}},F=(k,P,M={})=>{const K=de(r,k),L=a.array.has(k),Y=Tn(P);mt(o,k,Y),L?(f.array.next({name:k,values:{...o}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:nd(s,o),isDirty:N(k,Y)})):K&&!K._f&&!_n(Y)?J(k,Y,M):U(k,Y,M),Ib(k,a)&&f.state.next({...n}),f.values.next({name:i.mount?k:void 0,values:{...o}})},W=async k=>{i.mount=!0;const P=k.target;let M=P.name,K=!0;const L=de(r,M),Y=()=>P.type?lp(L._f):vN(k),Q=te=>{K=Number.isNaN(te)||te===de(o,M,te)};if(L){let te,ge;const Ke=Y(),Ue=k.type===pf.BLUR||k.type===pf.FOCUS_OUT,Et=!d8(L._f)&&!t.resolver&&!de(n.errors,M)&&!L._f.deps||f8(Ue,de(n.touchedFields,M),n.isSubmitted,m,h),tr=Ib(M,a,Ue);mt(o,M,Ke),Ue?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Yt=j(M,Ke,Ue,!1),ds=!Ln(Yt)||tr;if(!Ue&&f.values.next({name:M,type:k.type,values:{...o}}),Et)return d.isValid&&w(),ds&&f.state.next({name:M,...tr?{}:Yt});if(!Ue&&tr&&f.state.next({...n}),t.resolver){const{errors:lt}=await R([M]);if(Q(Ke),K){const fs=Ub(n.errors,r,M),hs=Ub(lt,r,fs.name||M);te=hs.error,M=hs.name,ge=Ln(lt)}}else g([M],!0),te=(await $b(L,o,x,t.shouldUseNativeValidation))[M],g([M]),Q(Ke),K&&(te?ge=!1:d.isValid&&(ge=await O(r,!0)));K&&(L._f.deps&&X(L._f.deps),T(M,ge,te,Yt))}},I=(k,P)=>{if(de(n.errors,P)&&k.focus)return k.focus(),1},X=async(k,P={})=>{let M,K;const L=Jl(k);if(t.resolver){const Y=await A(Ft(k)?k:L);M=Ln(Y),K=k?!L.some(Q=>de(Y,Q)):M}else k?(K=(await Promise.all(L.map(async Y=>{const Q=de(r,Y);return await O(Q&&Q._f?{[Y]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&w()):K=M=await O(r);return f.state.next({...!Gr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),P.shouldFocus&&!K&&ec(r,I,k?L:a.mount),K},$=k=>{const P={...i.mount?o:s};return Ft(k)?P:Gr(k)?de(P,k):k.map(M=>de(P,M))},B=(k,P)=>({invalid:!!de((P||n).errors,k),isDirty:!!de((P||n).dirtyFields,k),error:de((P||n).errors,k),isValidating:!!de(n.validatingFields,k),isTouched:!!de((P||n).touchedFields,k)}),he=k=>{k&&Jl(k).forEach(P=>Kt(n.errors,P)),f.state.next({errors:k?n.errors:{}})},se=(k,P,M)=>{const K=(de(r,k,{_f:{}})._f||{}).ref,L=de(n.errors,k)||{},{ref:Y,message:Q,type:te,...ge}=L;mt(n.errors,k,{...ge,...P,ref:K}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},oe=(k,P)=>ho(k)?f.values.subscribe({next:M=>k(z(void 0,P),M)}):z(k,P,!0),Oe=(k,P={})=>{for(const M of k?Jl(k):a.mount)a.mount.delete(M),a.array.delete(M),P.keepValue||(Kt(r,M),Kt(o,M)),!P.keepError&&Kt(n.errors,M),!P.keepDirty&&Kt(n.dirtyFields,M),!P.keepTouched&&Kt(n.touchedFields,M),!P.keepIsValidating&&Kt(n.validatingFields,M),!t.shouldUnregister&&!P.keepDefaultValue&&Kt(s,M);f.values.next({values:{...o}}),f.state.next({...n,...P.keepDirty?{isDirty:N()}:{}}),!P.keepIsValid&&w()},me=({disabled:k,name:P,field:M,fields:K,value:L})=>{if(Yr(k)&&i.mount||k){const Y=k?void 0:Ft(L)?lp(M?M._f:de(K,P)._f):L;mt(o,P,Y),j(P,Y,!1,!1,!0)}},we=(k,P={})=>{let M=de(r,k);const K=Yr(P.disabled);return mt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...P}}),a.mount.add(k),M?me({field:M,disabled:P.disabled,name:k,value:P.value}):C(k,!0,P.value),{...K?{disabled:P.disabled}:{},...t.progressive?{required:!!P.required,min:jl(P.min),max:jl(P.max),minLength:jl(P.minLength),maxLength:jl(P.maxLength),pattern:jl(P.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){we(k,P),M=de(r,k);const Y=Ft(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=c8(Y),te=M._f.refs||[];if(Q?te.find(ge=>ge===Y):Y===M._f.ref)return;mt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(ap),Y,...Array.isArray(de(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else M=de(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(xN(a.array,k)&&i.action)&&a.unMount.add(k)}}},Te=()=>t.shouldFocusError&&ec(r,I,a.mount),Fe=k=>{Yr(k)&&(f.state.next({disabled:k}),ec(r,(P,M)=>{const K=de(r,M);K&&(P.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(L=>{L.disabled=K._f.disabled||k}))},0,!1))},Ie=(k,P)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Tn(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:Q}=await R();n.errors=Y,L=Q}else await O(r);if(Kt(n.errors,"root"),Ln(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(Y){K=Y}}else P&&await P({...n.errors},M),Te(),setTimeout(Te);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ln(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Re=(k,P={})=>{de(r,k)&&(Ft(P.defaultValue)?F(k,Tn(de(s,k))):(F(k,P.defaultValue),mt(s,k,Tn(P.defaultValue))),P.keepTouched||Kt(n.touchedFields,k),P.keepDirty||(Kt(n.dirtyFields,k),n.isDirty=P.defaultValue?N(k,Tn(de(s,k))):N()),P.keepError||(Kt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},st=(k,P={})=>{const M=k?Tn(k):s,K=Tn(M),L=Ln(k),Y=L?s:K;if(P.keepDefaultValues||(s=M),!P.keepValues){if(P.keepDirtyValues)for(const Q of a.mount)de(n.dirtyFields,Q)?mt(Y,Q,de(o,Q)):F(Q,de(Y,Q));else{if(Rx&&Ft(k))for(const Q of a.mount){const te=de(r,Q);if(te&&te._f){const ge=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(gf(ge)){const Ke=ge.closest("form");if(Ke){Ke.reset();break}}}}r={}}o=e.shouldUnregister?P.keepDefaultValues?Tn(s):{}:Tn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:P.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!P.keepIsValid||!!P.keepDirtyValues,i.watch=!!e.shouldUnregister,f.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:L?!1:P.keepDirty?n.isDirty:!!(P.keepDefaultValues&&!Xo(k,s)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:P.keepDirtyValues?P.keepDefaultValues&&o?nd(s,o):n.dirtyFields:P.keepDefaultValues&&k?nd(s,k):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,P)=>st(ho(k)?k(o):k,P);return{control:{register:we,unregister:Oe,getFieldState:B,handleSubmit:Ie,setError:se,_executeSchema:R,_getWatch:z,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:v,_updateDisabledField:me,_getFieldArray:S,_reset:st,_resetDefaultValues:()=>ho(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(k){i=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:we,handleSubmit:Ie,watch:oe,setValue:F,getValues:$,reset:E,resetField:Re,clearErrors:he,unregister:Oe,setError:se,setFocus:(k,P={})=>{const M=de(r,k),K=M&&M._f;if(K){const L=K.refs?K.refs[0]:K.ref;L.focus&&(L.focus(),P.shouldSelect&&L.select())}},getFieldState:B}}function cn(e={}){const t=We.useRef(),n=We.useRef(),[r,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:ho(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ho(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...p8(e),formState:r});const o=t.current.control;return o._options=e,Dx({subject:o._subjects.state,next:i=>{SN(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),We.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),We.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),We.useEffect(()=>{e.values&&!Xo(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,s(i=>({...i}))):o._resetDefaultValues()},[e.values,o]),We.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),We.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()}),We.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=_N(r,o),t.current}var it;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,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 r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(it||(it={}));var Mg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Mg||(Mg={}));const _e=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ao=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},ae=it.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"]),g8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Yn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_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)r._errors.push(n(i));else{let a=r,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof Yn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Yn.create=e=>new Yn(e);const Ma=(e,t)=>{let n;switch(e.code){case ae.invalid_type:e.received===_e.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ae.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ae.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let DN=Ma;function y8(e){DN=e}function wf(){return DN}const bf=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},v8=[];function ve(e,t){const n=wf(),r=bf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ma?void 0:Ma].filter(s=>!!s)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return He;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return He;o.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),ua=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),Lg=e=>e.status==="aborted",zg=e=>e.status==="dirty",Pc=e=>e.status==="valid",Rc=e=>typeof Promise<"u"&&e instanceof Promise;function _f(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function ON(e,t,n,r,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,n),n}var De;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(De||(De={}));var Ml,Ll;class rs{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,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 Vb=(e,t)=>{if(Pc(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 n=new Yn(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))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 c,u;const{message:d}=e;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class et{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 ao(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ao(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ao(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Rc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ao(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Vb(s,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ao(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(Rc(s)?s:Promise.resolve(s));return Vb(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=t(s),a=()=>o.addIssue({code:ae.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Or({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jr.create(this,this._def)}nullable(){return Ro.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Nr.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return Ic.create([this,t],this._def)}and(t){return Mc.create(this,t,this._def)}transform(t){return new Or({...Ze(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Uc({...Ze(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new Mx({typeName:Ve.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Vc({...Ze(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gu.create(this,t)}readonly(){return Bc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const x8=/^c[^\s-]{8,}$/i,w8=/^[0-9a-z]+$/,b8=/^[0-9A-HJKMNP-TV-Z]{26}$/,_8=/^[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,S8=/^[a-z0-9_-]{21}$/i,k8=/^[-+]?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)?)??$/,C8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cp;const E8=/^(?:(?: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])$/,N8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,T8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,IN="((\\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])))",P8=new RegExp(`^${IN}$`);function MN(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 R8(e){return new RegExp(`^${MN(e)}$`)}function LN(e){let t=`${IN}T${MN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function A8(e,t){return!!((t==="v4"||!t)&&E8.test(e)||(t==="v6"||!t)&&N8.test(e))}class Cr extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:_e.string,received:o.parsedType}),He}const r=new yn;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.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?ve(s,{code:ae.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&ve(s,{code:ae.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")C8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"email",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")cp||(cp=new RegExp(j8,"u")),cp.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"emoji",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")_8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"uuid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")S8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"nanoid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")x8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")w8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid2",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")b8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ulid",code:ae.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ve(s,{validation:"url",code:ae.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"regex",code:ae.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?LN(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?P8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?R8(o).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?k8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"duration",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?A8(t.data,o.version)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ip",code:ae.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?T8.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"base64",code:ae.invalid_string,message:o.message}),r.dirty()):it.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:ae.invalid_string,...De.errToObj(r)})}_addCheck(t){return new Cr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...De.errToObj(t)})}url(t){return this._addCheck({kind:"url",...De.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...De.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...De.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...De.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...De.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...De.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...De.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...De.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...De.errToObj(t)})}datetime(t){var n,r;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:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...De.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...De.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...De.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...De.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...De.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...De.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...De.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...De.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...De.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...De.errToObj(n)})}nonempty(t){return this.min(1,De.errToObj(t))}trim(){return new Cr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Cr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Cr({...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 n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Cr.create=e=>{var t;return new Cr({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};function D8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class No extends et{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)!==_e.number){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:_e.number,received:o.parsedType}),He}let r;const s=new yn;for(const o of this._def.checks)o.kind==="int"?it.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?D8(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.not_finite,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,r,s){return new No({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:De.toString(s)}]})}_addCheck(t){return new No({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:De.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:De.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:De.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:De.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}No.create=e=>new No({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class To extends et{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)!==_e.bigint){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:_e.bigint,received:o.parsedType}),He}let r;const s=new yn;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ve(r,{code:ae.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):it.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,De.toString(n))}gt(t,n){return this.setLimit("min",t,!1,De.toString(n))}lte(t,n){return this.setLimit("max",t,!0,De.toString(n))}lt(t,n){return this.setLimit("max",t,!1,De.toString(n))}setLimit(t,n,r,s){return new To({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:De.toString(s)}]})}_addCheck(t){return new To({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:De.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:De.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:De.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:De.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:De.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}To.create=e=>{var t;return new To({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};class Ac extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:_e.boolean,received:r.parsedType}),He}return kn(t.data)}}Ac.create=e=>new Ac({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class mi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_type,expected:_e.date,received:o.parsedType}),He}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return ve(o,{code:ae.invalid_date}),He}const r=new yn;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:ae.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):it.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:De.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:De.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}mi.create=e=>new mi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ze(e)});class Sf extends et{_parse(t){if(this._getType(t)!==_e.symbol){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:_e.symbol,received:r.parsedType}),He}return kn(t.data)}}Sf.create=e=>new Sf({typeName:Ve.ZodSymbol,...Ze(e)});class Dc extends et{_parse(t){if(this._getType(t)!==_e.undefined){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:_e.undefined,received:r.parsedType}),He}return kn(t.data)}}Dc.create=e=>new Dc({typeName:Ve.ZodUndefined,...Ze(e)});class Oc extends et{_parse(t){if(this._getType(t)!==_e.null){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:_e.null,received:r.parsedType}),He}return kn(t.data)}}Oc.create=e=>new Oc({typeName:Ve.ZodNull,...Ze(e)});class La extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}La.create=e=>new La({typeName:Ve.ZodAny,...Ze(e)});class ri extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}ri.create=e=>new ri({typeName:Ve.ZodUnknown,...Ze(e)});class Fs extends et{_parse(t){const n=this._getOrReturnCtx(t);return ve(n,{code:ae.invalid_type,expected:_e.never,received:n.parsedType}),He}}Fs.create=e=>new Fs({typeName:Ve.ZodNever,...Ze(e)});class kf extends et{_parse(t){if(this._getType(t)!==_e.undefined){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:_e.void,received:r.parsedType}),He}return kn(t.data)}}kf.create=e=>new kf({typeName:Ve.ZodVoid,...Ze(e)});class Nr extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==_e.array)return ve(n,{code:ae.invalid_type,expected:_e.array,received:n.parsedType}),He;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(ve(n,{code:i?ae.too_big:ae.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}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ve(n,{code:ae.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ve(n,{code:ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new rs(n,i,n.path,a)))).then(i=>yn.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new rs(n,i,n.path,a)));return yn.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Nr({...this._def,minLength:{value:t,message:De.toString(n)}})}max(t,n){return new Nr({...this._def,maxLength:{value:t,message:De.toString(n)}})}length(t,n){return new Nr({...this._def,exactLength:{value:t,message:De.toString(n)}})}nonempty(t){return this.min(1,t)}}Nr.create=(e,t)=>new Nr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ze(t)});function Yi(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jr.create(Yi(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof Nr?new Nr({...e._def,type:Yi(e.element)}):e instanceof Jr?Jr.create(Yi(e.unwrap())):e instanceof Ro?Ro.create(Yi(e.unwrap())):e instanceof ss?ss.create(e.items.map(t=>Yi(t))):e}class Rt extends et{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(),n=it.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==_e.object){const u=this._getOrReturnCtx(t);return ve(u,{code:ae.invalid_type,expected:_e.object,received:u.parsedType}),He}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Fs&&this._def.unknownKeys==="strip"))for(const u in s.data)i.includes(u)||a.push(u);const c=[];for(const u of i){const d=o[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new rs(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Fs){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ve(s,{code:ae.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new rs(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>yn.mergeObjectSync(r,u)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return De.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=De.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};return it.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}omit(t){const n={};return it.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}deepPartial(){return Yi(this)}partial(t){const n={};return it.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Rt({...this._def,shape:()=>n})}required(t){const n={};return it.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Jr;)o=o._def.innerType;n[r]=o}}),new Rt({...this._def,shape:()=>n})}keyof(){return zN(it.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Fs.create(),typeName:Ve.ZodObject,...Ze(t)});Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Fs.create(),typeName:Ve.ZodObject,...Ze(t)});Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Fs.create(),typeName:Ve.ZodObject,...Ze(t)});class Ic extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=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 n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new Yn(a.ctx.common.issues));return ve(n,{code:ae.invalid_union,unionErrors:i}),He}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(c=>new Yn(c));return ve(n,{code:ae.invalid_union,unionErrors:a}),He}}get options(){return this._def.options}}Ic.create=(e,t)=>new Ic({options:e,typeName:Ve.ZodUnion,...Ze(t)});const vs=e=>e instanceof zc?vs(e.schema):e instanceof Or?vs(e.innerType()):e instanceof Fc?[e.value]:e instanceof Po?e.options:e instanceof $c?it.objectValues(e.enum):e instanceof Uc?vs(e._def.innerType):e instanceof Dc?[void 0]:e instanceof Oc?[null]:e instanceof Jr?[void 0,...vs(e.unwrap())]:e instanceof Ro?[null,...vs(e.unwrap())]:e instanceof Mx||e instanceof Bc?vs(e.unwrap()):e instanceof Vc?vs(e._def.innerType):[];class Kh extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.object)return ve(n,{code:ae.invalid_type,expected:_e.object,received:n.parsedType}),He;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ve(n,{code:ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const i=vs(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 Kh({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function Fg(e,t){const n=ao(e),r=ao(t);if(e===t)return{valid:!0,data:e};if(n===_e.object&&r===_e.object){const s=it.objectKeys(t),o=it.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(const a of o){const c=Fg(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(n===_e.array&&r===_e.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],c=Fg(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===_e.date&&r===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Mc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,i)=>{if(Lg(o)||Lg(i))return He;const a=Fg(o.value,i.value);return a.valid?((zg(o)||zg(i))&&n.dirty(),{status:n.value,value:a.data}):(ve(r,{code:ae.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Mc.create=(e,t,n)=>new Mc({left:e,right:t,typeName:Ve.ZodIntersection,...Ze(n)});class ss extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.array)return ve(r,{code:ae.invalid_type,expected:_e.array,received:r.parsedType}),He;if(r.data.length<this._def.items.length)return ve(r,{code:ae.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),He;!this._def.rest&&r.data.length>this._def.items.length&&(ve(r,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new rs(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>yn.mergeArray(n,i)):yn.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ss({...this._def,rest:t})}}ss.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ss({items:e,typeName:Ve.ZodTuple,rest:null,...Ze(t)})};class Lc extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.object)return ve(r,{code:ae.invalid_type,expected:_e.object,received:r.parsedType}),He;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new rs(r,a,r.path,a)),value:i._parse(new rs(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?yn.mergeObjectAsync(n,s):yn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new Lc({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Ze(r)}):new Lc({keyType:Cr.create(),valueType:t,typeName:Ve.ZodRecord,...Ze(n)})}}class Cf extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.map)return ve(r,{code:ae.invalid_type,expected:_e.map,received:r.parsedType}),He;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,c],u)=>({key:s._parse(new rs(r,a,r.path,[u,"key"])),value:o._parse(new rs(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of i){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}Cf.create=(e,t,n)=>new Cf({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ze(n)});class pi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.set)return ve(r,{code:ae.invalid_type,expected:_e.set,received:r.parsedType}),He;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ve(r,{code:ae.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ve(r,{code:ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(c){const u=new Set;for(const d of c){if(d.status==="aborted")return He;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>o._parse(new rs(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,n){return new pi({...this._def,minSize:{value:t,message:De.toString(n)}})}max(t,n){return new pi({...this._def,maxSize:{value:t,message:De.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pi.create=(e,t)=>new pi({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ze(t)});class Ca extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.function)return ve(n,{code:ae.invalid_type,expected:_e.function,received:n.parsedType}),He;function r(a,c){return bf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wf(),Ma].filter(u=>!!u),issueData:{code:ae.invalid_arguments,argumentsError:c}})}function s(a,c){return bf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,wf(),Ma].filter(u=>!!u),issueData:{code:ae.invalid_return_type,returnTypeError:c}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof za){const a=this;return kn(async function(...c){const u=new Yn([]),d=await a._def.args.parseAsync(c,o).catch(m=>{throw u.addIssue(r(c,m)),u}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(m=>{throw u.addIssue(s(f,m)),u})})}else{const a=this;return kn(function(...c){const u=a._def.args.safeParse(c,o);if(!u.success)throw new Yn([r(c,u.error)]);const d=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new Yn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ca({...this._def,args:ss.create(t).rest(ri.create())})}returns(t){return new Ca({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ca({args:t||ss.create([]).rest(ri.create()),returns:n||ri.create(),typeName:Ve.ZodFunction,...Ze(r)})}}class zc extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}zc.create=(e,t)=>new zc({getter:e,typeName:Ve.ZodLazy,...Ze(t)});class Fc extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ve(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}Fc.create=(e,t)=>new Fc({value:e,typeName:Ve.ZodLiteral,...Ze(t)});function zN(e,t){return new Po({values:e,typeName:Ve.ZodEnum,...Ze(t)})}class Po extends et{constructor(){super(...arguments),Ml.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ve(n,{expected:it.joinValues(r),received:n.parsedType,code:ae.invalid_type}),He}if(_f(this,Ml)||ON(this,Ml,new Set(this._def.values)),!_f(this,Ml).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ve(n,{received:n.data,code:ae.invalid_enum_value,options:r}),He}return kn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Po.create(t,{...this._def,...n})}exclude(t,n=this._def){return Po.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ml=new WeakMap;Po.create=zN;class $c extends et{constructor(){super(...arguments),Ll.set(this,void 0)}_parse(t){const n=it.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==_e.string&&r.parsedType!==_e.number){const s=it.objectValues(n);return ve(r,{expected:it.joinValues(s),received:r.parsedType,code:ae.invalid_type}),He}if(_f(this,Ll)||ON(this,Ll,new Set(it.getValidEnumValues(this._def.values))),!_f(this,Ll).has(t.data)){const s=it.objectValues(n);return ve(r,{received:r.data,code:ae.invalid_enum_value,options:s}),He}return kn(t.data)}get enum(){return this._def.values}}Ll=new WeakMap;$c.create=(e,t)=>new $c({values:e,typeName:Ve.ZodNativeEnum,...Ze(t)});class za extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.promise&&n.common.async===!1)return ve(n,{code:ae.invalid_type,expected:_e.promise,received:n.parsedType}),He;const r=n.parsedType===_e.promise?n.data:Promise.resolve(n.data);return kn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:Ve.ZodPromise,...Ze(t)});class Or extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:i=>{ve(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return He;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?He:c.status==="dirty"||n.value==="dirty"?ua(c.value):c});{if(n.value==="aborted")return He;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"||n.value==="dirty"?ua(a.value):a}}if(s.type==="refinement"){const i=a=>{const c=s.refinement(a,o);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Pc(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:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Pc(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);it.assertNever(s)}}Or.create=(e,t,n)=>new Or({schema:e,typeName:Ve.ZodEffects,effect:t,...Ze(n)});Or.createWithPreprocess=(e,t,n)=>new Or({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ze(n)});class Jr extends et{_parse(t){return this._getType(t)===_e.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:Ve.ZodOptional,...Ze(t)});class Ro extends et{_parse(t){return this._getType(t)===_e.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ro.create=(e,t)=>new Ro({innerType:e,typeName:Ve.ZodNullable,...Ze(t)});class Uc extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===_e.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Uc.create=(e,t)=>new Uc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Vc extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rc(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Yn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Yn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Vc.create=(e,t)=>new Vc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class jf extends et{_parse(t){if(this._getType(t)!==_e.nan){const r=this._getOrReturnCtx(t);return ve(r,{code:ae.invalid_type,expected:_e.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}jf.create=e=>new jf({typeName:Ve.ZodNaN,...Ze(e)});const O8=Symbol("zod_brand");class Mx extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class gu extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?He:o.status==="dirty"?(n.dirty(),ua(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new gu({in:t,out:n,typeName:Ve.ZodPipeline})}}class Bc extends et{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Pc(s)&&(s.value=Object.freeze(s.value)),s);return Rc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Bc.create=(e,t)=>new Bc({innerType:e,typeName:Ve.ZodReadonly,...Ze(t)});function FN(e,t={},n){return e?La.create().superRefine((r,s)=>{var o,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:c})}}):La.create()}const I8={object:Rt.lazycreate};var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const M8=(e,t={message:`Input not instance of ${e.name}`})=>FN(n=>n instanceof e,t),$N=Cr.create,UN=No.create,L8=jf.create,z8=To.create,VN=Ac.create,F8=mi.create,$8=Sf.create,U8=Dc.create,V8=Oc.create,B8=La.create,W8=ri.create,H8=Fs.create,Y8=kf.create,K8=Nr.create,G8=Rt.create,Z8=Rt.strictCreate,q8=Ic.create,X8=Kh.create,Q8=Mc.create,J8=ss.create,eV=Lc.create,tV=Cf.create,nV=pi.create,rV=Ca.create,sV=zc.create,oV=Fc.create,iV=Po.create,aV=$c.create,lV=za.create,Bb=Or.create,cV=Jr.create,uV=Ro.create,dV=Or.createWithPreprocess,fV=gu.create,hV=()=>$N().optional(),mV=()=>UN().optional(),pV=()=>VN().optional(),gV={string:e=>Cr.create({...e,coerce:!0}),number:e=>No.create({...e,coerce:!0}),boolean:e=>Ac.create({...e,coerce:!0}),bigint:e=>To.create({...e,coerce:!0}),date:e=>mi.create({...e,coerce:!0})},yV=He;var ce=Object.freeze({__proto__:null,defaultErrorMap:Ma,setErrorMap:y8,getErrorMap:wf,makeIssue:bf,EMPTY_PATH:v8,addIssueToContext:ve,ParseStatus:yn,INVALID:He,DIRTY:ua,OK:kn,isAborted:Lg,isDirty:zg,isValid:Pc,isAsync:Rc,get util(){return it},get objectUtil(){return Mg},ZodParsedType:_e,getParsedType:ao,ZodType:et,datetimeRegex:LN,ZodString:Cr,ZodNumber:No,ZodBigInt:To,ZodBoolean:Ac,ZodDate:mi,ZodSymbol:Sf,ZodUndefined:Dc,ZodNull:Oc,ZodAny:La,ZodUnknown:ri,ZodNever:Fs,ZodVoid:kf,ZodArray:Nr,ZodObject:Rt,ZodUnion:Ic,ZodDiscriminatedUnion:Kh,ZodIntersection:Mc,ZodTuple:ss,ZodRecord:Lc,ZodMap:Cf,ZodSet:pi,ZodFunction:Ca,ZodLazy:zc,ZodLiteral:Fc,ZodEnum:Po,ZodNativeEnum:$c,ZodPromise:za,ZodEffects:Or,ZodTransformer:Or,ZodOptional:Jr,ZodNullable:Ro,ZodDefault:Uc,ZodCatch:Vc,ZodNaN:jf,BRAND:O8,ZodBranded:Mx,ZodPipeline:gu,ZodReadonly:Bc,custom:FN,Schema:et,ZodSchema:et,late:I8,get ZodFirstPartyTypeKind(){return Ve},coerce:gV,any:B8,array:K8,bigint:z8,boolean:VN,date:F8,discriminatedUnion:X8,effect:Bb,enum:iV,function:rV,instanceof:M8,intersection:Q8,lazy:sV,literal:oV,map:tV,nan:L8,nativeEnum:aV,never:H8,null:V8,nullable:uV,number:UN,object:G8,oboolean:pV,onumber:mV,optional:cV,ostring:hV,pipeline:fV,preprocess:dV,promise:lV,record:eV,set:nV,strictObject:Z8,string:$N,symbol:$8,transformer:Bb,tuple:J8,undefined:U8,union:q8,unknown:W8,void:Y8,NEVER:yV,ZodIssueCode:ae,quotelessJson:g8,ZodError:Yn});const Wb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=de(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},BN=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Wb(r.ref,n,e):r.refs&&r.refs.forEach(s=>Wb(s,n,e))}},vV=(e,t)=>{t.shouldUseNativeValidation&&BN(e,t);const n={};for(const r in e){const s=de(t.fields,r),o=Object.assign(e[r]||{},{ref:s&&s.ref});if(xV(t.names||Object.keys(e),r)){const i=Object.assign({},de(n,r));mt(i,"root",o),mt(n,r,i)}else mt(n,r,o)}return n},xV=(e,t)=>e.some(n=>n.startsWith(t+"."));var wV=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[i].types,u=c&&c[r.code];n[i]=jN(i,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},un=function(e,t,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return o.shouldUseNativeValidation&&BN({},o),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:vV(wV(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}};const WN=y.forwardRef(({...e},t)=>l.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));WN.displayName="Breadcrumb";const HN=y.forwardRef(({className:e,...t},n)=>l.jsx("ol",{ref:n,className:re("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));HN.displayName="BreadcrumbList";const $g=y.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("inline-flex items-center gap-1.5",e),...t}));$g.displayName="BreadcrumbItem";const YN=y.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?es:"a";return l.jsx(s,{ref:r,className:re("transition-colors hover:text-foreground",t),...n})});YN.displayName="BreadcrumbLink";const KN=y.forwardRef(({className:e,...t},n)=>l.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:re("font-normal text-foreground",e),...t}));KN.displayName="BreadcrumbPage";const GN=({children:e,className:t,...n})=>l.jsx("li",{role:"presentation","aria-hidden":"true",className:re("[&>svg]:size-3.5",t),...n,children:e??l.jsx(rk,{})});GN.displayName="BreadcrumbSeparator";var bV="Label",ZN=y.forwardRef((e,t)=>l.jsx(Pe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ZN.displayName=bV;var qN=ZN;const _V=Jc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Vt=y.forwardRef(({className:e,...t},n)=>l.jsx(qN,{ref:n,className:re(_V(),e),...t}));Vt.displayName=qN.displayName;const dn=t8,XN=y.createContext({}),ke=({...e})=>l.jsx(XN.Provider,{value:{name:e.name},children:l.jsx(o8,{...e})}),Gh=()=>{const e=y.useContext(XN),t=y.useContext(QN),{getFieldState:n,formState:r}=Yh(),s=n(e.name,r);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}},QN=y.createContext({}),Se=y.forwardRef(({className:e,...t},n)=>{const r=y.useId();return l.jsx(QN.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:re("space-y-2",e),...t})})});Se.displayName="FormItem";const Ce=y.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Gh();return l.jsx(Vt,{ref:n,className:re(r&&"text-destructive",e),htmlFor:s,...t})});Ce.displayName="FormLabel";const je=y.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Gh();return l.jsx(es,{ref:t,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...e})});je.displayName="FormControl";const SV=y.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Gh();return l.jsx("p",{ref:n,id:r,className:re("text-sm text-muted-foreground",e),...t})});SV.displayName="FormDescription";const ye=y.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:o}=Gh(),{t:i}=Ye(),a=s?i(String(s==null?void 0:s.message)):t;return a?l.jsx("p",{ref:r,id:o,className:re("text-sm font-medium text-destructive",e),...n,children:a}):null});ye.displayName="FormMessage";const pe=y.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:re("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:r,...n}));pe.displayName="Input";function Ug(e,[t,n]){return Math.min(n,Math.max(t,e))}var kV=[" ","Enter","ArrowUp","ArrowDown"],CV=[" ","Enter"],yu="Select",[Zh,qh,jV]=eu(yu),[al,XH]=on(yu,[jV,tl]),Xh=tl(),[EV,Lo]=al(yu),[NV,TV]=al(yu),JN=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:m}=e,x=Xh(t),[p,w]=y.useState(null),[g,v]=y.useState(null),[b,_]=y.useState(!1),C=Si(u),[j=!1,T]=Gn({prop:r,defaultProp:s,onChange:o}),[R,A]=Gn({prop:i,defaultProp:a,onChange:c}),O=y.useRef(null),G=p?!!p.closest("form"):!0,[N,z]=y.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return l.jsx(wv,{...x,children:l.jsxs(EV,{required:m,scope:t,trigger:p,onTriggerChange:w,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Bn(),value:R,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:h,children:[l.jsx(Zh.Provider,{scope:t,children:l.jsx(NV,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(U=>{z(J=>new Set(J).add(U))},[]),onNativeOptionRemove:y.useCallback(U=>{z(J=>{const F=new Set(J);return F.delete(U),F})},[]),children:n})}),G?l.jsxs(C2,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:R,onChange:U=>A(U.target.value),disabled:h,children:[R===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};JN.displayName=yu;var e2="SelectTrigger",t2=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Xh(n),i=Lo(e2,n),a=i.disabled||r,c=Ge(t,i.onTriggerChange),u=qh(n),[d,f,h]=j2(x=>{const p=u().filter(v=>!v.disabled),w=p.find(v=>v.value===i.value),g=E2(p,x,w);g!==void 0&&i.onValueChange(g.value)}),m=()=>{a||(i.onOpenChange(!0),h())};return l.jsx(bv,{asChild:!0,...o,children:l.jsx(Pe.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":k2(i.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const p=x.target;p.hasPointerCapture(x.pointerId)&&p.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const p=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(p&&x.key===" ")&&kV.includes(x.key)&&(m(),x.preventDefault())})})})});t2.displayName=e2;var n2="SelectValue",r2=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Lo(n2,n),{onValueNodeHasChildrenChange:u}=c,d=o!==void 0,f=Ge(t,c.onValueNodeChange);return en(()=>{u(d)},[u,d]),l.jsx(Pe.span,{...a,ref:f,style:{pointerEvents:"none"},children:k2(c.value)?l.jsx(l.Fragment,{children:i}):o})});r2.displayName=n2;var PV="SelectIcon",s2=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return l.jsx(Pe.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});s2.displayName=PV;var RV="SelectPortal",o2=e=>l.jsx(nu,{asChild:!0,...e});o2.displayName=RV;var gi="SelectContent",i2=y.forwardRef((e,t)=>{const n=Lo(gi,e.__scopeSelect),[r,s]=y.useState();if(en(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Vs.createPortal(l.jsx(a2,{scope:e.__scopeSelect,children:l.jsx(Zh.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),o):null}return l.jsx(l2,{...e,ref:t})});i2.displayName=gi;var bs=10,[a2,zo]=al(gi),AV="SelectContentImpl",l2=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w,...g}=e,v=Lo(gi,n),[b,_]=y.useState(null),[C,j]=y.useState(null),T=Ge(t,me=>_(me)),[R,A]=y.useState(null),[O,G]=y.useState(null),N=qh(n),[z,S]=y.useState(!1),U=y.useRef(!1);y.useEffect(()=>{if(b)return jv(b)},[b]),uv();const J=y.useCallback(me=>{const[we,...Te]=N().map(Re=>Re.ref.current),[Fe]=Te.slice(-1),Ie=document.activeElement;for(const Re of me)if(Re===Ie||(Re==null||Re.scrollIntoView({block:"nearest"}),Re===we&&C&&(C.scrollTop=0),Re===Fe&&C&&(C.scrollTop=C.scrollHeight),Re==null||Re.focus(),document.activeElement!==Ie))return},[N,C]),F=y.useCallback(()=>J([R,b]),[J,R,b]);y.useEffect(()=>{z&&F()},[z,F]);const{onOpenChange:W,triggerPointerDownPosRef:I}=v;y.useEffect(()=>{if(b){let me={x:0,y:0};const we=Fe=>{var Ie,Re;me={x:Math.abs(Math.round(Fe.pageX)-(((Ie=I.current)==null?void 0:Ie.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Re=I.current)==null?void 0:Re.y)??0))}},Te=Fe=>{me.x<=10&&me.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",we),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",Te,{capture:!0})}}},[b,W,I]),y.useEffect(()=>{const me=()=>W(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[W]);const[X,$]=j2(me=>{const we=N().filter(Ie=>!Ie.disabled),Te=we.find(Ie=>Ie.ref.current===document.activeElement),Fe=E2(we,me,Te);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=y.useCallback((me,we,Te)=>{const Fe=!U.current&&!Te;(v.value!==void 0&&v.value===we||Fe)&&(A(me),Fe&&(U.current=!0))},[v.value]),he=y.useCallback(()=>b==null?void 0:b.focus(),[b]),se=y.useCallback((me,we,Te)=>{const Fe=!U.current&&!Te;(v.value!==void 0&&v.value===we||Fe)&&G(me)},[v.value]),oe=r==="popper"?Vg:c2,Oe=oe===Vg?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:x,hideWhenDetached:p,avoidCollisions:w}:{};return l.jsx(a2,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:R,onItemLeave:he,itemTextRefCallback:se,focusSelectedItem:F,selectedItemText:O,position:r,isPositioned:z,searchRef:X,children:l.jsx(ph,{as:es,allowPinchZoom:!0,children:l.jsx(uh,{asChild:!0,trapped:v.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:ue(s,me=>{var we;(we=v.trigger)==null||we.focus({preventScroll:!0}),me.preventDefault()}),children:l.jsx(Qa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:l.jsx(oe,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:me=>me.preventDefault(),...g,...Oe,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ue(g.onKeyDown,me=>{const we=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!we&&me.key.length===1&&$(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let Fe=N().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(me.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const Ie=me.target,Re=Fe.indexOf(Ie);Fe=Fe.slice(Re+1)}setTimeout(()=>J(Fe)),me.preventDefault()}})})})})})})});l2.displayName=AV;var DV="SelectItemAlignedPosition",c2=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Lo(gi,n),i=zo(gi,n),[a,c]=y.useState(null),[u,d]=y.useState(null),f=Ge(t,T=>d(T)),h=qh(n),m=y.useRef(!1),x=y.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:g,focusSelectedItem:v}=i,b=y.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&u&&p&&w&&g){const T=o.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),O=g.getBoundingClientRect();if(o.dir!=="rtl"){const Ie=O.left-R.left,Re=A.left-Ie,st=T.left-Re,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-bs,D=Ug(Re,[bs,Z-ee]);a.style.minWidth=E+"px",a.style.left=D+"px"}else{const Ie=R.right-O.right,Re=window.innerWidth-A.right-Ie,st=window.innerWidth-T.right-Re,E=T.width+st,ee=Math.max(E,R.width),Z=window.innerWidth-bs,D=Ug(Re,[bs,Z-ee]);a.style.minWidth=E+"px",a.style.right=D+"px"}const G=h(),N=window.innerHeight-bs*2,z=p.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),F=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+z+W+F,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(p),B=parseInt($.paddingTop,10),he=parseInt($.paddingBottom,10),se=T.top+T.height/2-bs,oe=N-se,Oe=w.offsetHeight/2,me=w.offsetTop+Oe,we=U+J+me,Te=I-we;if(we<=se){const Ie=w===G[G.length-1].ref.current;a.style.bottom="0px";const Re=u.clientHeight-p.offsetTop-p.offsetHeight,st=Math.max(oe,Oe+(Ie?he:0)+Re+F),E=we+st;a.style.height=E+"px"}else{const Ie=w===G[0].ref.current;a.style.top="0px";const st=Math.max(se,U+p.offsetTop+(Ie?B:0)+Oe)+Te;a.style.height=st+"px",p.scrollTop=we-se+p.offsetTop}a.style.margin=`${bs}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,a,u,p,w,g,o.dir,r]);en(()=>b(),[b]);const[_,C]=y.useState();en(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=y.useCallback(T=>{T&&x.current===!0&&(b(),v==null||v(),x.current=!1)},[b,v]);return l.jsx(IV,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:l.jsx(Pe.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});c2.displayName=DV;var OV="SelectPopperPosition",Vg=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=bs,...o}=e,i=Xh(n);return l.jsx(_v,{...i,...o,ref:t,align:r,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)"}})});Vg.displayName=OV;var[IV,Lx]=al(gi,{}),Bg="SelectViewport",u2=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=zo(Bg,n),i=Lx(Bg,n),a=Ge(t,o.onViewportChange),c=y.useRef(0);return l.jsxs(l.Fragment,{children:[l.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:r}),l.jsx(Zh.Slot,{scope:n,children:l.jsx(Pe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const x=window.innerHeight-bs*2,p=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),g=Math.max(p,w);if(g<x){const v=g+m,b=Math.min(x,v),_=v-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});u2.displayName=Bg;var d2="SelectGroup",[MV,LV]=al(d2),f2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Bn();return l.jsx(MV,{scope:n,id:s,children:l.jsx(Pe.div,{role:"group","aria-labelledby":s,...r,ref:t})})});f2.displayName=d2;var h2="SelectLabel",m2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=LV(h2,n);return l.jsx(Pe.div,{id:s.id,...r,ref:t})});m2.displayName=h2;var Ef="SelectItem",[zV,p2]=al(Ef),g2=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Lo(Ef,n),c=zo(Ef,n),u=a.value===r,[d,f]=y.useState(o??""),[h,m]=y.useState(!1),x=Ge(t,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,r,s)}),p=Bn(),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 l.jsx(zV,{scope:n,value:r,disabled:s,textId:p,isSelected:u,onItemTextChange:y.useCallback(g=>{f(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:l.jsx(Zh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:l.jsx(Pe.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ue(i.onFocus,()=>m(!0)),onBlur:ue(i.onBlur,()=>m(!1)),onPointerUp:ue(i.onPointerUp,w),onPointerMove:ue(i.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ue(i.onKeyDown,g=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(CV.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});g2.displayName=Ef;var zl="SelectItemText",y2=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Lo(zl,n),a=zo(zl,n),c=p2(zl,n),u=TV(zl,n),[d,f]=y.useState(null),h=Ge(t,g=>f(g),c.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,c.value,c.disabled)}),m=d==null?void 0:d.textContent,x=y.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return en(()=>(p(x),()=>w(x)),[p,w,x]),l.jsxs(l.Fragment,{children:[l.jsx(Pe.span,{id:c.textId,...o,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Vs.createPortal(o.children,i.valueNode):null]})});y2.displayName=zl;var v2="SelectItemIndicator",x2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p2(v2,n).isSelected?l.jsx(Pe.span,{"aria-hidden":!0,...r,ref:t}):null});x2.displayName=v2;var Wg="SelectScrollUpButton",w2=y.forwardRef((e,t)=>{const n=zo(Wg,e.__scopeSelect),r=Lx(Wg,e.__scopeSelect),[s,o]=y.useState(!1),i=Ge(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(_2,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});w2.displayName=Wg;var Hg="SelectScrollDownButton",b2=y.forwardRef((e,t)=>{const n=zo(Hg,e.__scopeSelect),r=Lx(Hg,e.__scopeSelect),[s,o]=y.useState(!1),i=Ge(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;o(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(_2,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});b2.displayName=Hg;var _2=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=zo("SelectScrollButton",n),i=y.useRef(null),a=qh(n),c=y.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return y.useEffect(()=>()=>c(),[c]),en(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),l.jsx(Pe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),FV="SelectSeparator",S2=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Pe.div,{"aria-hidden":!0,...r,ref:t})});S2.displayName=FV;var Yg="SelectArrow",$V=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Xh(n),o=Lo(Yg,n),i=zo(Yg,n);return o.open&&i.position==="popper"?l.jsx(Sv,{...s,...r,ref:t}):null});$V.displayName=Yg;function k2(e){return e===""||e===void 0}var C2=y.forwardRef((e,t)=>{const{value:n,...r}=e,s=y.useRef(null),o=Ge(t,s),i=Cx(n);return y.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),l.jsx(hu,{asChild:!0,children:l.jsx("select",{...r,ref:o,defaultValue:n})})});C2.displayName="BubbleSelect";function j2(e){const t=Ot(e),n=y.useRef(""),r=y.useRef(0),s=y.useCallback(i=>{const a=n.current+i;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function E2(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=UV(e,Math.max(o,0));s.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function UV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VV=JN,N2=t2,BV=r2,WV=s2,HV=o2,T2=i2,YV=u2,KV=f2,P2=m2,R2=g2,GV=y2,ZV=x2,A2=w2,D2=b2,O2=S2;const Fa=VV,Wc=KV,$a=BV,yi=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(N2,{ref:r,className:re("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),...n,children:[t,l.jsx(WV,{asChild:!0,children:l.jsx(rv,{className:"h-4 w-4 opacity-50"})})]}));yi.displayName=N2.displayName;const I2=y.forwardRef(({className:e,...t},n)=>l.jsx(A2,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(JO,{className:"h-4 w-4"})}));I2.displayName=A2.displayName;const M2=y.forwardRef(({className:e,...t},n)=>l.jsx(D2,{ref:n,className:re("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(rv,{className:"h-4 w-4"})}));M2.displayName=D2.displayName;const vi=y.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>l.jsx(HV,{children:l.jsxs(T2,{ref:s,className:re("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",n==="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:n,...r,children:[l.jsx(I2,{}),l.jsx(YV,{className:re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(M2,{})]})}));vi.displayName=T2.displayName;const Ua=y.forwardRef(({className:e,...t},n)=>l.jsx(P2,{ref:n,className:re("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ua.displayName=P2.displayName;const Ao=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(R2,{ref:r,className:re("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),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(ZV,{children:l.jsx(nk,{className:"h-4 w-4"})})}),l.jsx(GV,{children:t})]}));Ao.displayName=R2.displayName;const qV=y.forwardRef(({className:e,...t},n)=>l.jsx(O2,{ref:n,className:re("-mx-1 my-1 h-px bg-muted",e),...t}));qV.displayName=O2.displayName;const ll=Uv,cl=Vv,XV=Bv,L2=y.forwardRef(({className:e,...t},n)=>l.jsx(ou,{ref:n,className:re("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}));L2.displayName=ou.displayName;const Ni=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(XV,{children:[l.jsx(L2,{}),l.jsxs(iu,{ref:r,className:re("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),...n,children:[t,l.jsxs(xh,{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:[l.jsx(iv,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ni.displayName=iu.displayName;const Ti=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ti.displayName="DialogHeader";const Qh=({className:e,...t})=>l.jsx("div",{className:re("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Qh.displayName="DialogFooter";const Pi=y.forwardRef(({className:e,...t},n)=>l.jsx(au,{ref:n,className:re("text-lg font-semibold leading-none tracking-tight",e),...t}));Pi.displayName=au.displayName;const z2=y.forwardRef(({className:e,...t},n)=>l.jsx(lu,{ref:n,className:re("text-sm text-muted-foreground",e),...t}));z2.displayName=lu.displayName;function QV(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var zx="ScrollArea",[F2,QH]=on(zx),[JV,pr]=F2(zx),$2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,c]=y.useState(null),[u,d]=y.useState(null),[f,h]=y.useState(null),[m,x]=y.useState(null),[p,w]=y.useState(null),[g,v]=y.useState(0),[b,_]=y.useState(0),[C,j]=y.useState(!1),[T,R]=y.useState(!1),A=Ge(t,G=>c(G)),O=Si(s);return l.jsx(JV,{scope:n,type:r,dir:O,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:p,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:v,onCornerHeightChange:_,children:l.jsx(Pe.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});$2.displayName=zx;var U2="ScrollAreaViewport",V2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,i=pr(U2,n),a=y.useRef(null),c=Ge(t,a,i.onViewportChange);return l.jsxs(l.Fragment,{children:[l.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}),l.jsx(Pe.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});V2.displayName=U2;var ls="ScrollAreaScrollbar",Fx=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=pr(ls,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"?l.jsx(eB,{...r,ref:t,forceMount:n}):s.type==="scroll"?l.jsx(tB,{...r,ref:t,forceMount:n}):s.type==="auto"?l.jsx(B2,{...r,ref:t,forceMount:n}):s.type==="always"?l.jsx($x,{...r,ref:t}):null});Fx.displayName=ls;var eB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=pr(ls,e.__scopeScrollArea),[o,i]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(an,{present:n||o,children:l.jsx(B2,{"data-state":o?"visible":"hidden",...r,ref:t})})}),tB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=pr(ls,e.__scopeScrollArea),o=e.orientation==="horizontal",i=em(()=>c("SCROLL_END"),100),[a,c]=QV("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),y.useEffect(()=>{const u=s.viewport,d=o?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(c("SCROLL"),i()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,o,c,i]),l.jsx(an,{present:n||a!=="hidden",children:l.jsx($x,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),B2=y.forwardRef((e,t)=>{const n=pr(ls,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,i]=y.useState(!1),a=e.orientation==="horizontal",c=em(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?u:d)}},10);return Va(n.viewport,c),Va(n.content,c),l.jsx(an,{present:r||o,children:l.jsx($x,{"data-state":o?"visible":"hidden",...s,ref:t})})}),$x=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=pr(ls,e.__scopeScrollArea),o=y.useRef(null),i=y.useRef(0),[a,c]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=G2(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,m){return aB(h,i.current,a,m)}return n==="horizontal"?l.jsx(nB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,m=Hb(h,a,s.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?l.jsx(rB,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,m=Hb(h,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),nB=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=pr(ls,e.__scopeScrollArea),[i,a]=y.useState(),c=y.useRef(null),u=Ge(t,c,o.onScrollbarXChange);return y.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(H2,{"data-orientation":"horizontal",...s,ref:u,sizes:n,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":Jh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),q2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Tf(i.paddingLeft),paddingEnd:Tf(i.paddingRight)}})}})}),rB=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=pr(ls,e.__scopeScrollArea),[i,a]=y.useState(),c=y.useRef(null),u=Ge(t,c,o.onScrollbarYChange);return y.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(H2,{"data-orientation":"vertical",...s,ref:u,sizes:n,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":Jh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const h=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),q2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Tf(i.paddingTop),paddingEnd:Tf(i.paddingBottom)}})}})}),[sB,W2]=F2(ls),H2=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=pr(ls,n),[x,p]=y.useState(null),w=Ge(t,A=>p(A)),g=y.useRef(null),v=y.useRef(""),b=m.viewport,_=r.content-r.viewport,C=Ot(d),j=Ot(c),T=em(f,10);function R(A){if(g.current){const O=A.clientX-g.current.left,G=A.clientY-g.current.top;u({x:O,y:G})}}return y.useEffect(()=>{const A=O=>{const G=O.target;(x==null?void 0:x.contains(G))&&C(O,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),y.useEffect(j,[r,j]),Va(x,T),Va(m.content,T),l.jsx(sB,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:Ot(o),onThumbPointerUp:Ot(i),onThumbPositionChange:j,onThumbPointerDown:Ot(a),children:l.jsx(Pe.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),g.current=x.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),R(A))}),onPointerMove:ue(e.onPointerMove,R),onPointerUp:ue(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),Nf="ScrollAreaThumb",Y2=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=W2(Nf,e.__scopeScrollArea);return l.jsx(an,{present:n||s.hasThumb,children:l.jsx(oB,{ref:t,...r})})}),oB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=pr(Nf,n),i=W2(Nf,n),{onThumbPositionChange:a}=i,c=Ge(t,f=>i.onThumbChange(f)),u=y.useRef(),d=em(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(d(),!u.current){const m=lB(f,a);u.current=m,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,d,a]),l.jsx(Pe.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),x=f.clientX-m.left,p=f.clientY-m.top;i.onThumbPointerDown({x,y:p})}),onPointerUp:ue(e.onPointerUp,i.onThumbPointerUp)})});Y2.displayName=Nf;var Ux="ScrollAreaCorner",K2=y.forwardRef((e,t)=>{const n=pr(Ux,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(iB,{...e,ref:t}):null});K2.displayName=Ux;var iB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=pr(Ux,n),[o,i]=y.useState(0),[a,c]=y.useState(0),u=!!(o&&a);return Va(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Va(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),i(d)}),u?l.jsx(Pe.div,{...r,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 Tf(e){return e?parseInt(e,10):0}function G2(e,t){const n=e/t;return isNaN(n)?0:n}function Jh(e){const t=G2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function aB(e,t,n,r="ltr"){const s=Jh(n),o=s/2,i=t||o,a=s-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Z2([c,u],f)(e)}function Hb(e,t,n="ltr"){const r=Jh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Ug(e,c);return Z2([0,i],[0,a])(u)}function Z2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function q2(e,t){return e>0&&e<t}var lB=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,a=n.top!==o.top;(i||a)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function em(e,t){const n=Ot(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Va(e,t){const n=Ot(t);en(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var X2=$2,cB=V2,uB=K2;const tm=y.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(X2,{ref:r,className:re("relative overflow-hidden",e),...n,children:[l.jsx(cB,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(Q2,{}),l.jsx(uB,{})]}));tm.displayName=X2.displayName;const Q2=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(Fx,{ref:r,orientation:t,className:re("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),...n,children:l.jsx(Y2,{className:"relative flex-1 rounded-full bg-border"})}));Q2.displayName=Fx.displayName;const Rs=new Map([["aliyun",["common.provider.aliyun","/imgs/providers/aliyun.svg"]],["tencent",["common.provider.tencent","/imgs/providers/tencent.svg"]],["huaweicloud",["common.provider.huaweicloud","/imgs/providers/huaweicloud.svg"]],["qiniu",["common.provider.qiniu","/imgs/providers/qiniu.svg"]],["cloudflare",["common.provider.cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["common.provider.namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["common.provider.godaddy","/imgs/providers/godaddy.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]]]),Yb=e=>Rs.get(e),cs=ce.union([ce.literal("aliyun"),ce.literal("tencent"),ce.literal("huaweicloud"),ce.literal("qiniu"),ce.literal("cloudflare"),ce.literal("namesilo"),ce.literal("godaddy"),ce.literal("local"),ce.literal("ssh"),ce.literal("webhook")],{message:"access.authorization.form.type.placeholder"}),us=e=>{switch(e){case"aliyun":case"tencent":case"huaweicloud":return"all";case"qiniu":case"local":case"ssh":case"webhook":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},dB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,accessKeyId:ce.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessSecretId:ce.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={accessKeyId:"",accessKeySecret:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:a.accessKeyId,accessSecretId:a.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessSecretId",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_secret.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},fB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,secretId:ce.string().min(1,"access.authorization.form.secret_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretKey:ce.string().min(1,"access.authorization.form.secret_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={secretId:"",secretKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:a.secretId,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretId",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.secret_id.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.secret_id.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.secret_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},hB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,region:ce.string().min(1,"access.authorization.form.region.placeholder").max(64,o("common.errmsg.string_max",{max:64})),accessKeyId:ce.string().min(1,"access.authorization.form.access_key_id.placeholder").max(64,o("common.errmsg.string_max",{max:64})),secretAccessKey:ce.string().min(1,"access.authorization.form.access_key_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={region:"cn-north-1",accessKeyId:"",secretAccessKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"huaweicloud",region:a.region,accessKeyId:a.accessKeyId,secretAccessKey:a.secretAccessKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{region:d.region,accessKeyId:d.accessKeyId,secretAccessKey:d.secretAccessKey}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"region",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.region.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.region.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_id.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_id.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretAccessKey",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key_secret.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key_secret.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},mB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,accessKey:ce.string().min(1,"access.authorization.form.access_key.placeholder").max(64),secretKey:ce.string().min(1,"access.authorization.form.secret_key.placeholder").max(64)});let a={accessKey:"",secretKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:a.accessKey,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"accessKey",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.access_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.access_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.secret_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.secret_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},pB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,dnsApiToken:ce.string().min(1,"access.authorization.form.cloud_dns_api_token.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={dnsApiToken:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:a.dnsApiToken}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"dnsApiToken",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.cloud_dns_api_token.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.cloud_dns_api_token.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},gB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,apiKey:ce.string().min(1,"access.authorization.form.namesilo_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={apiKey:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:a.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.namesilo_api_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.namesilo_api_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},yB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,apiKey:ce.string().min(1,"access.authorization.form.godaddy_api_key.placeholder").max(64,o("common.errmsg.string_max",{max:64})),apiSecret:ce.string().min(1,"access.authorization.form.godaddy_api_secret.placeholder").max(64,o("common.errmsg.string_max",{max:64}))});let a={apiKey:"",apiSecret:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:a.apiKey,apiSecret:a.apiSecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.godaddy_api_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.godaddy_api_key.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"apiSecret",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.godaddy_api_secret.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.godaddy_api_secret.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},vB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o}=ln(),{t:i}=Ye(),a=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,i("common.errmsg.string_max",{max:64})),configType:cs}),c=cn({resolver:un(a),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local"}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{}};try{f.id=t=="copy"?"":f.id;const h=await as(f);n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"?s(f):r(f),o()}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-3",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:i("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:i("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:i("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:i("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:i("common.save")})})]})})})})},Vx=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=ln(),[r,s]=y.useState(!1),{t:o}=Ye(),i=ce.object({name:ce.string().min(1,"access.group.form.name.errmsg.empty").max(64,o("common.errmsg.string_max",{max:64}))}),a=cn({resolver:un(i),defaultValues:{name:""}}),c=async u=>{try{await _$({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,m])=>{a.setError(h,{type:"manual",message:m.message})})}};return l.jsxs(ll,{onOpenChange:s,open:r,children:[l.jsx(cl,{asChild:!0,className:re(e),children:t}),l.jsxs(Ni,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ti,{children:l.jsx(Pi,{children:o("access.group.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(dn,{...a,children:l.jsxs("form",{onSubmit:u=>{u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(ke,{control:a.control,name:"name",render:({field:u})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.group.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.group.form.name.errmsg.empty"),...u,type:"text"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})]})]})},xB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:o,config:{accessGroups:i}}=ln(),a=y.useRef(null),[c,u]=y.useState(""),{t:d}=Ye(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,m=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,d("common.errmsg.string_max",{max:64})),configType:cs,host:ce.string().refine(_=>m.test(_)||h.test(_),{message:"common.errmsg.host_invalid"}),group:ce.string().optional(),port:ce.string().min(1,"access.authorization.form.ssh_port.placeholder").max(5,d("common.errmsg.string_max",{max:5})),username:ce.string().min(1,"username.not.empty").max(64,d("common.errmsg.string_max",{max:64})),password:ce.string().min(0,"password.not.empty").max(64,d("common.errmsg.string_max",{max:64})),key:ce.string().min(0,"access.authorization.form.ssh_key.placeholder").max(20480,d("common.errmsg.string_max",{max:20480})),keyFile:ce.any().optional()});let p={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:""};e&&(p=e.config);const w=cn({resolver:un(x),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"ssh",group:e==null?void 0:e.group,host:p.host,port:p.port,username:p.username,password:p.password,key:p.key,keyFile:p.keyFile}}),g=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:us(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key}};try{j.id=t=="copy"?"":j.id;const T=await as(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Pb({id:f,"access-":j.id}),C&&await Pb({id:C,"access+":j.id})),o()}catch(T){Object.entries(T.response.data).forEach(([A,O])=>{w.setError(A,{type:"manual",message:O.message})});return}},v=async _=>{var R;const C=(R=_.target.files)==null?void 0:R[0];if(!C)return;const j=C;u(j.name);const T=await BU(j);w.setValue("key",T)},b=()=>{var _;(_=a.current)==null||_.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...w,children:l.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(g)(_)},className:"space-y-3",children:[l.jsx(ke,{control:w.control,name:"name",render:({field:_})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:d("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.name.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"group",render:({field:_})=>l.jsxs(Se,{children:[l.jsxs(Ce,{className:"w-full flex justify-between",children:[l.jsx("div",{children:d("access.authorization.form.ssh_group.label")}),l.jsx(Vx,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(di,{size:14}),d("common.add")]})})]}),l.jsx(je,{children:l.jsxs(Fa,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{w.setValue("group",C)},children:[l.jsx(yi,{children:l.jsx($a,{placeholder:d("access.authorization.form.access_group.placeholder")})}),l.jsxs(vi,{children:[l.jsx(Ao,{value:"emptyId",children:l.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),i.map(C=>l.jsx(Ao,{value:C.id?C.id:"",children:l.jsx("div",{className:re("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"id",render:({field:_})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:d("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"configType",render:({field:_})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:d("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{..._})}),l.jsx(ye,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(ke,{control:w.control,name:"host",render:({field:_})=>l.jsxs(Se,{className:"grow",children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_host.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_host.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"port",render:({field:_})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_port.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_port.placeholder"),..._,type:"number"})}),l.jsx(ye,{})]})})]}),l.jsx(ke,{control:w.control,name:"username",render:({field:_})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:d("access.authorization.form.username.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.username.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"password",render:({field:_})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:d("access.authorization.form.password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.password.placeholder"),..._,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"key",render:({field:_})=>l.jsxs(Se,{hidden:!0,children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_key.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:w.control,name:"keyFile",render:({field:_})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:d("access.authorization.form.ssh_key.label")}),l.jsx(je,{children:l.jsxs("div",{children:[l.jsx(Me,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.authorization.form.ssh_key_file.placeholder")}),l.jsx(pe,{placeholder:d("access.authorization.form.ssh_key.placeholder"),..._,ref:a,className:"hidden",hidden:!0,type:"file",onChange:v})]})}),l.jsx(ye,{})]})}),l.jsx(ye,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:d("common.save")})})]})})})})},wB=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=ln(),{t:o}=Ye(),i=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.authorization.form.name.placeholder").max(64,o("common.errmsg.string_max",{max:64})),configType:cs,url:ce.string().url("common.errmsg.url_invalid")});let a={url:""};e&&(a=e.config);const c=cn({resolver:un(i),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:a.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:us(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await as(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"name",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.name.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.name.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"id",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(Se,{className:"hidden",children:[l.jsx(Ce,{children:o("access.authorization.form.config.label")}),l.jsx(je,{children:l.jsx(pe,{...d})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:c.control,name:"url",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("access.authorization.form.webhook_url.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:o("access.authorization.form.webhook_url.placeholder"),...d})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:o("common.save")})})]})})})})},da=({trigger:e,op:t,data:n,className:r})=>{const[s,o]=y.useState(!1),{t:i}=Ye(),a=Array.from(Rs.keys()),[c,u]=y.useState((n==null?void 0:n.configType)||"");let d=l.jsx(l.Fragment,{children:" "});switch(c){case"aliyun":d=l.jsx(dB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"tencent":d=l.jsx(fB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"huaweicloud":d=l.jsx(hB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"qiniu":d=l.jsx(mB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"cloudflare":d=l.jsx(pB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"namesilo":d=l.jsx(gB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"godaddy":d=l.jsx(yB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"local":d=l.jsx(vB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"ssh":d=l.jsx(xB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break;case"webhook":d=l.jsx(wB,{data:n,op:t,onAfterReq:()=>{o(!1)}});break}const f=h=>h==c?"border-primary":"";return l.jsxs(ll,{onOpenChange:o,open:s,children:[l.jsx(cl,{asChild:!0,className:re(r),children:e}),l.jsxs(Ni,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ti,{children:l.jsx(Pi,{children:t=="add"?i("access.authorization.add"):t=="edit"?i("access.authorization.edit"):i("access.authorization.copy")})}),l.jsx(tm,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Vt,{children:i("access.authorization.form.type.label")}),l.jsxs(Fa,{onValueChange:h=>{u(h)},defaultValue:c,children:[l.jsx(yi,{className:"mt-3",children:l.jsx($a,{placeholder:i("access.authorization.form.type.placeholder")})}),l.jsx(vi,{children:l.jsxs(Wc,{children:[l.jsx(Ua,{children:i("access.authorization.form.type.list")}),a.map(h=>{var m,x;return l.jsx(Ao,{value:h,children:l.jsxs("div",{className:re("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[l.jsx("img",{src:(m=Rs.get(h))==null?void 0:m[1],className:"h-6 w-6"}),l.jsx("div",{children:i(((x=Rs.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})};var J2=Symbol.for("immer-nothing"),Kb=Symbol.for("immer-draftable"),Zn=Symbol.for("immer-state");function Sr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ba=Object.getPrototypeOf;function Wa(e){return!!e&&!!e[Zn]}function xi(e){var t;return e?eT(e)||Array.isArray(e)||!!e[Kb]||!!((t=e.constructor)!=null&&t[Kb])||rm(e)||sm(e):!1}var bB=Object.prototype.constructor.toString();function eT(e){if(!e||typeof e!="object")return!1;const t=Ba(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===bB}function Pf(e,t){nm(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function nm(e){const t=e[Zn];return t?t.type_:Array.isArray(e)?1:rm(e)?2:sm(e)?3:0}function Kg(e,t){return nm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function tT(e,t,n){const r=nm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function _B(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function rm(e){return e instanceof Map}function sm(e){return e instanceof Set}function Vo(e){return e.copy_||e.base_}function Gg(e,t){if(rm(e))return new Map(e);if(sm(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=eT(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Zn];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Ba(e),r)}else{const r=Ba(e);if(r!==null&&n)return{...e};const s=Object.create(r);return Object.assign(s,e)}}function Bx(e,t=!1){return om(e)||Wa(e)||!xi(e)||(nm(e)>1&&(e.set=e.add=e.clear=e.delete=SB),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Bx(r,!0))),e}function SB(){Sr(2)}function om(e){return Object.isFrozen(e)}var kB={};function wi(e){const t=kB[e];return t||Sr(0,e),t}var Hc;function nT(){return Hc}function CB(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gb(e,t){t&&(wi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zg(e){qg(e),e.drafts_.forEach(jB),e.drafts_=null}function qg(e){e===Hc&&(Hc=e.parent_)}function Zb(e){return Hc=CB(Hc,e)}function jB(e){const t=e[Zn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qb(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Zn].modified_&&(Zg(t),Sr(4)),xi(e)&&(e=Rf(t,e),t.parent_||Af(t,e)),t.patches_&&wi("Patches").generateReplacementPatches_(n[Zn].base_,e,t.patches_,t.inversePatches_)):e=Rf(t,n,[]),Zg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==J2?e:void 0}function Rf(e,t,n){if(om(t))return t;const r=t[Zn];if(!r)return Pf(t,(s,o)=>Xb(e,r,t,s,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Af(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),Pf(o,(a,c)=>Xb(e,r,s,a,c,n,i)),Af(e,s,!1),n&&e.patches_&&wi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Xb(e,t,n,r,s,o,i){if(Wa(s)){const a=o&&t&&t.type_!==3&&!Kg(t.assigned_,r)?o.concat(r):void 0,c=Rf(e,s,a);if(tT(n,r,c),Wa(c))e.canAutoFreeze_=!1;else return}else i&&n.add(s);if(xi(s)&&!om(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rf(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Af(e,s)}}function Af(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bx(t,n)}function EB(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:nT(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=Wx;n&&(s=[r],o=Yc);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,a}var Wx={get(e,t){if(t===Zn)return e;const n=Vo(e);if(!Kg(n,t))return NB(e,n,t);const r=n[t];return e.finalized_||!xi(r)?r:r===up(e.base_,t)?(dp(e),e.copy_[t]=Qg(r,e)):r},has(e,t){return t in Vo(e)},ownKeys(e){return Reflect.ownKeys(Vo(e))},set(e,t,n){const r=rT(Vo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=up(Vo(e),t),o=s==null?void 0:s[Zn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(_B(n,s)&&(n!==void 0||Kg(e.base_,t)))return!0;dp(e),Xg(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return up(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,dp(e),Xg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Sr(11)},getPrototypeOf(e){return Ba(e.base_)},setPrototypeOf(){Sr(12)}},Yc={};Pf(Wx,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,n){return Wx.set.call(this,e[0],t,n,e[0])};function up(e,t){const n=e[Zn];return(n?Vo(n):e)[t]}function NB(e,t,n){var s;const r=rT(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function rT(e,t){if(!(t in e))return;let n=Ba(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ba(n)}}function Xg(e){e.modified_||(e.modified_=!0,e.parent_&&Xg(e.parent_))}function dp(e){e.copy_||(e.copy_=Gg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var TB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const i=this;return function(c=o,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Sr(6),r!==void 0&&typeof r!="function"&&Sr(7);let s;if(xi(t)){const o=Zb(this),i=Qg(t,void 0);let a=!0;try{s=n(i),a=!1}finally{a?Zg(o):qg(o)}return Gb(o,r),qb(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===J2&&(s=void 0),this.autoFreeze_&&Bx(s,!0),r){const o=[],i=[];wi("Patches").generateReplacementPatches_(t,s,o,i),r(o,i)}return s}else Sr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,c=>t(c,...a));let r,s;return[this.produce(t,n,(i,a)=>{r=i,s=a}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){xi(e)||Sr(8),Wa(e)&&(e=PB(e));const t=Zb(this),n=Qg(e,void 0);return n[Zn].isManual_=!0,qg(t),n}finishDraft(e,t){const n=e&&e[Zn];(!n||!n.isManual_)&&Sr(9);const{scope_:r}=n;return Gb(r,t),qb(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=wi("Patches").applyPatches_;return Wa(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Qg(e,t){const n=rm(e)?wi("MapSet").proxyMap_(e,t):sm(e)?wi("MapSet").proxySet_(e,t):EB(e,t);return(t?t.scope_:nT()).drafts_.push(n),n}function PB(e){return Wa(e)||Sr(10,e),sT(e)}function sT(e){if(!xi(e)||om(e))return e;const t=e[Zn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gg(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gg(e,!0);return Pf(n,(r,s)=>{tT(n,r,sT(s))}),t&&(t.finalized_=!1),n}var qn=new TB,Zr=qn.produce;qn.produceWithPatches.bind(qn);qn.setAutoFreeze.bind(qn);qn.setUseStrictShallowCopy.bind(qn);qn.applyPatches.bind(qn);qn.createDraft.bind(qn);qn.finishDraft.bind(qn);const RB="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let AB=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=RB[n[e]&63];return t};const DB=Jc("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"}}),im=y.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:re(DB({variant:t}),e),...n}));im.displayName="Alert";const Hx=y.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:re("mb-1 font-medium leading-none tracking-tight",e),...t}));Hx.displayName="AlertTitle";const am=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("text-sm [&_p]:leading-relaxed",e),...t}));am.displayName="AlertDescription";const Df=y.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:re("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:n,...t}));Df.displayName="Textarea";const OB=({variables:e,onValueChange:t})=>{const[n,r]=y.useState([]),{t:s}=Ye();y.useEffect(()=>{e&&r(e)},[e]);const o=c=>{const u=n.findIndex(f=>f.key===c.key),d=Zr(n,f=>{u===-1?f.push(c):f[u]=c});r(d),t==null||t(d)},i=c=>{const u=[...n];u.splice(c,1),r(u),t==null||t(u)},a=(c,u)=>{const d=[...n];d[c]=u,r(d),t==null||t(d)};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex justify-between dark:text-stone-200",children:[l.jsx(Vt,{children:s("domain.deployment.form.variables.label")}),l.jsx(ur,{when:!!(n!=null&&n.length),children:l.jsx(fp,{variable:{key:"",value:""},trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(di,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:s("common.add")})]}),onSave:c=>{o(c)}})})]}),l.jsx(ur,{when:!!(n!=null&&n.length),fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:s("domain.deployment.form.variables.empty")}),l.jsx(fp,{trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(di,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:s("common.add")})]}),variable:{key:"",value:""},onSave:c=>{o(c)}})]}),children:l.jsx("div",{className:"border p-3 rounded-md text-stone-700 text-sm dark:text-stone-200",children:n==null?void 0:n.map((c,u)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[c.key,"=",c.value]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(fp,{trigger:l.jsx(sv,{size:16,className:"cursor-pointer"}),variable:c,onSave:d=>{a(u,d)}}),l.jsx(ov,{size:16,className:"cursor-pointer",onClick:()=>{i(u)}})]})]},u))})})]})},fp=({variable:e,trigger:t,onSave:n})=>{const[r,s]=y.useState({key:"",value:""});y.useEffect(()=>{e&&s(e)},[e]);const{t:o}=Ye(),[i,a]=y.useState(!1),[c,u]=y.useState({}),d=()=>{if(!r.key){u({key:o("domain.deployment.form.variables.key.required")});return}if(!r.value){u({value:o("domain.deployment.form.variables.value.required")});return}n==null||n(r),a(!1),u({})};return l.jsxs(ll,{open:i,onOpenChange:()=>{a(!i)},children:[l.jsx(cl,{children:t}),l.jsxs(Ni,{className:"dark:text-stone-200",children:[l.jsxs(Ti,{className:"flex flex-col",children:[l.jsx(Pi,{children:o("domain.deployment.form.variables.label")}),l.jsxs("div",{className:"pt-5 flex flex-col items-start",children:[l.jsx(Vt,{children:o("domain.deployment.form.variables.key")}),l.jsx(pe,{placeholder:o("domain.deployment.form.variables.key.placeholder"),value:r==null?void 0:r.key,onChange:f=>{s({...r,key:f.target.value})},className:"w-full mt-1"}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.key})]}),l.jsxs("div",{className:"pt-2 flex flex-col items-start",children:[l.jsx(Vt,{children:o("domain.deployment.form.variables.value")}),l.jsx(pe,{placeholder:o("domain.deployment.form.variables.value.placeholder"),value:r==null?void 0:r.value,onChange:f=>{s({...r,value:f.target.value})},className:"w-full mt-1"}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c==null?void 0:c.value})]})]}),l.jsx(Qh,{children:l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{onClick:()=>{d()},children:o("common.save")})})})]})]})},Of=new Map([["aliyun-oss",["common.provider.aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-cdn",["common.provider.aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["common.provider.aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["common.provider.tencent.cdn","/imgs/providers/tencent.svg"]],["qiniu-cdn",["common.provider.qiniu.cdn","/imgs/providers/qiniu.svg"]],["local",["common.provider.local","/imgs/providers/local.svg"]],["ssh",["common.provider.ssh","/imgs/providers/ssh.svg"]],["webhook",["common.provider.webhook","/imgs/providers/webhook.svg"]]]),IB=Array.from(Of.keys()),oT=y.createContext({}),Ha=()=>y.useContext(oT),MB=({deploys:e,onChange:t})=>{const[n,r]=y.useState([]),{t:s}=Ye();y.useEffect(()=>{r(e)},[e]);const o=c=>{c.id=AB();const u=[...n,c];r(u),t(u)},i=c=>{const u=n.filter(d=>d.id!==c);r(u),t(u)},a=c=>{const u=n.map(d=>d.id===c.id?{...c}:d);r(u),t(u)};return l.jsx(l.Fragment,{children:l.jsxs(ur,{when:n.length>0,fallback:l.jsx(im,{className:"w-full border dark:border-stone-400",children:l.jsxs(am,{className:"flex flex-col items-center",children:[l.jsx("div",{children:s("domain.deployment.nodata")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Jg,{onSave:c=>{o(c)},trigger:l.jsx(Me,{size:"sm",children:s("common.add")})})})]})}),children:[l.jsx("div",{className:"flex justify-end py-2 border-b dark:border-stone-400",children:l.jsx(Jg,{trigger:l.jsx(Me,{size:"sm",children:s("common.add")}),onSave:c=>{o(c)}})}),l.jsx("div",{className:"w-full md:w-[35em] rounded mt-5 border dark:border-stone-400 dark:text-stone-200",children:l.jsx("div",{className:"",children:n.map(c=>l.jsx(LB,{item:c,onDelete:()=>{i(c.id??"")},onSave:u=>{a(u)}},c.id))})})]})})},LB=({item:e,onDelete:t,onSave:n})=>{const{config:{accesses:r}}=ln(),{t:s}=Ye(),o=r.find(c=>c.id===e.access),i=()=>{if(!o)return"";const c=Rs.get(o.configType);return c?c[1]:""},a=()=>{if(!o)return"";const c=Of.get(e.type);return c?s(c[0]):""};return l.jsxs("div",{className:"flex justify-between text-sm p-3 items-center text-stone-700 dark:text-stone-200",children:[l.jsxs("div",{className:"flex space-x-2 items-center",children:[l.jsx("div",{children:l.jsx("img",{src:i(),className:"w-9"})}),l.jsxs("div",{className:"text-stone-600 flex-col flex space-y-0 dark:text-stone-200",children:[l.jsx("div",{children:a()}),l.jsx("div",{children:o==null?void 0:o.name})]})]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Jg,{trigger:l.jsx(sv,{size:16,className:"cursor-pointer"}),deployConfig:e,onSave:c=>{n(c)}}),l.jsx(ov,{size:16,className:"cursor-pointer",onClick:()=>{t()}})]})]})},Jg=({trigger:e,deployConfig:t,onSave:n})=>{const{config:{accesses:r}}=ln(),[s,o]=y.useState(),[i,a]=y.useState({access:"",type:""}),[c,u]=y.useState({}),[d,f]=y.useState(!1);y.useEffect(()=>{a(t?{...t}:{access:"",type:""})},[t]),y.useEffect(()=>{const w=i.type.split("-");let g;w&&w.length>1?g=w[1]:g=i.type,o(g),u({})},[i.type]);const h=y.useCallback(w=>{w.type!==i.type?a({...w,access:"",config:{}}):a({...w})},[i.type]),{t:m}=Ye(),x=r.filter(w=>{if(w.usage=="apply")return!1;if(i.type=="")return!0;const g=i.type.split("-");return w.configType===g[0]}),p=()=>{const w={...c};i.type===""?w.type=m("domain.deployment.form.access.placeholder"):w.type="",i.access===""?w.access=m("domain.deployment.form.access.placeholder"):w.access="",u(w);for(const g in w)if(w[g]!=="")return;n(i),a({access:"",type:""}),u({}),f(!1)};return l.jsx(oT.Provider,{value:{deploy:i,setDeploy:h,error:c,setError:u},children:l.jsxs(ll,{open:d,onOpenChange:f,children:[l.jsx(cl,{children:e}),l.jsxs(Ni,{className:"dark:text-stone-200",children:[l.jsxs(Ti,{children:[l.jsx(Pi,{children:m("history.page.title")}),l.jsx(z2,{})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:m("domain.deployment.form.type.label")}),l.jsxs(Fa,{value:i.type,onValueChange:w=>{h({...i,type:w})},children:[l.jsx(yi,{className:"mt-2",children:l.jsx($a,{placeholder:m("domain.deployment.form.type.placeholder")})}),l.jsx(vi,{children:l.jsxs(Wc,{children:[l.jsx(Ua,{children:m("domain.deployment.form.type.list")}),IB.map(w=>{var g,v;return l.jsx(Ao,{value:w,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(g=Of.get(w))==null?void 0:g[1]}),l.jsx("div",{children:m(((v=Of.get(w))==null?void 0:v[0])??"")})]})},w)})]})})]}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.type})]}),l.jsxs("div",{children:[l.jsxs(Vt,{className:"flex justify-between",children:[l.jsx("div",{children:m("domain.deployment.form.access.label")}),l.jsx(da,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(di,{size:14}),m("common.add")]}),op:"add"})]}),l.jsxs(Fa,{value:i.access,onValueChange:w=>{h({...i,access:w})},children:[l.jsx(yi,{className:"mt-2",children:l.jsx($a,{placeholder:m("domain.deployment.form.access.placeholder")})}),l.jsx(vi,{children:l.jsxs(Wc,{children:[l.jsx(Ua,{children:m("domain.deployment.form.access.list")}),x.map(w=>{var g;return l.jsx(Ao,{value:w.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(g=Rs.get(w.configType))==null?void 0:g[1]}),l.jsx("div",{children:w.name})]})},w.id)})]})})]}),l.jsx("div",{className:"text-red-500 text-sm mt-1",children:c.access})]}),l.jsx(zB,{type:s}),l.jsx(Qh,{children:l.jsx(Me,{onClick:w=>{w.stopPropagation(),p()},children:m("common.save")})})]})]})})},zB=({type:e})=>(()=>{switch(e){case"ssh":return l.jsx(Qb,{});case"local":return l.jsx(Qb,{});case"cdn":return l.jsx(hp,{});case"dcdn":return l.jsx(hp,{});case"oss":return l.jsx(FB,{});case"webhook":return l.jsx($B,{});default:return l.jsx(hp,{})}})(),Qb=()=>{var s,o,i,a;const{t:e}=Ye(),{setError:t}=Ha();y.useEffect(()=>{t({})},[]);const{deploy:n,setDeploy:r}=Ha();return y.useEffect(()=>{n.id||r({...n,config:{certPath:"/etc/nginx/ssl/nginx.crt",keyPath:"/etc/nginx/ssl/nginx.key",preCommand:"",command:"sudo service nginx reload"}})},[]),l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col space-y-2",children:[l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_cert_path.label")}),l.jsx(pe,{placeholder:e("access.authorization.form.ssh_cert_path.label"),className:"w-full mt-1",value:(s=n==null?void 0:n.config)==null?void 0:s.certPath,onChange:c=>{const u=Zr(n,d=>{d.config||(d.config={}),d.config.certPath=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_key_path.label")}),l.jsx(pe,{placeholder:e("access.authorization.form.ssh_key_path.placeholder"),className:"w-full mt-1",value:(o=n==null?void 0:n.config)==null?void 0:o.keyPath,onChange:c=>{const u=Zr(n,d=>{d.config||(d.config={}),d.config.keyPath=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_pre_command.label")}),l.jsx(Df,{className:"mt-1",value:(i=n==null?void 0:n.config)==null?void 0:i.preCommand,placeholder:e("access.authorization.form.ssh_pre_command.placeholder"),onChange:c=>{const u=Zr(n,d=>{d.config||(d.config={}),d.config.preCommand=c.target.value});r(u)}})]}),l.jsxs("div",{children:[l.jsx(Vt,{children:e("access.authorization.form.ssh_command.label")}),l.jsx(Df,{className:"mt-1",value:(a=n==null?void 0:n.config)==null?void 0:a.command,placeholder:e("access.authorization.form.ssh_command.placeholder"),onChange:c=>{const u=Zr(n,d=>{d.config||(d.config={}),d.config.command=c.target.value});r(u)}})]})]})})},hp=()=>{var i;const{deploy:e,setDeploy:t,error:n,setError:r}=Ha(),{t:s}=Ye();y.useEffect(()=>{r({})},[]),y.useEffect(()=>{var c;const a=o.safeParse((c=e.config)==null?void 0:c.domain);a.success?r({...n,domain:""}):r({...n,domain:JSON.parse(a.error.message)[0].message})},[e]);const o=ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")});return l.jsx("div",{className:"flex flex-col space-y-2",children:l.jsxs("div",{children:[l.jsx(Vt,{children:s("domain.deployment.form.cdn_domain.label")}),l.jsx(pe,{placeholder:s("domain.deployment.form.cdn_domain.placeholder"),className:"w-full mt-1",value:(i=e==null?void 0:e.config)==null?void 0:i.domain,onChange:a=>{const c=a.target.value,u=o.safeParse(c);u.success?r({...n,domain:""}):r({...n,domain:JSON.parse(u.error.message)[0].message});const d=Zr(e,f=>{f.config||(f.config={}),f.config.domain=c});t(d)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},FB=()=>{var a,c,u;const{deploy:e,setDeploy:t,error:n,setError:r}=Ha(),{t:s}=Ye();y.useEffect(()=>{r({})},[]),y.useEffect(()=>{var f;const d=o.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,domain:""}):r({...n,domain:JSON.parse(d.error.message)[0].message})},[e]),y.useEffect(()=>{var f;const d=i.safeParse((f=e.config)==null?void 0:f.domain);d.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(d.error.message)[0].message})},[]),y.useEffect(()=>{e.id||t({...e,config:{endpoint:"oss-cn-hangzhou.aliyuncs.com",bucket:"",domain:""}})},[]);const o=ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:s("common.errmsg.domain_invalid")}),i=ce.string().min(1,{message:s("domain.deployment.form.oss_bucket.placeholder")});return l.jsx("div",{className:"flex flex-col space-y-2",children:l.jsxs("div",{children:[l.jsx(Vt,{children:s("domain.deployment.form.oss_endpoint.label")}),l.jsx(pe,{className:"w-full mt-1",value:(a=e==null?void 0:e.config)==null?void 0:a.endpoint,onChange:d=>{const f=d.target.value,h=Zr(e,m=>{m.config||(m.config={}),m.config.endpoint=f});t(h)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.endpoint}),l.jsx(Vt,{children:s("domain.deployment.form.oss_bucket")}),l.jsx(pe,{placeholder:s("domain.deployment.form.oss_bucket.placeholder"),className:"w-full mt-1",value:(c=e==null?void 0:e.config)==null?void 0:c.bucket,onChange:d=>{const f=d.target.value,h=i.safeParse(f);h.success?r({...n,bucket:""}):r({...n,bucket:JSON.parse(h.error.message)[0].message});const m=Zr(e,x=>{x.config||(x.config={}),x.config.bucket=f});t(m)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.bucket}),l.jsx(Vt,{children:s("domain.deployment.form.cdn_domain.label")}),l.jsx(pe,{placeholder:s("domain.deployment.form.cdn_domain.label"),className:"w-full mt-1",value:(u=e==null?void 0:e.config)==null?void 0:u.domain,onChange:d=>{const f=d.target.value,h=o.safeParse(f);h.success?r({...n,domain:""}):r({...n,domain:JSON.parse(h.error.message)[0].message});const m=Zr(e,x=>{x.config||(x.config={}),x.config.domain=f});t(m)}}),l.jsx("div",{className:"text-red-600 text-sm mt-1",children:n==null?void 0:n.domain})]})})},$B=()=>{var r;const{deploy:e,setDeploy:t}=Ha(),{setError:n}=Ha();return y.useEffect(()=>{n({})},[]),l.jsx(l.Fragment,{children:l.jsx(OB,{variables:(r=e==null?void 0:e.config)==null?void 0:r.variables,onValueChange:s=>{const o=Zr(e,i=>{i.config||(i.config={}),i.config.variables=s});t(o)}})})},UB=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=ln(),[s,o]=y.useState(!1),{t:i}=Ye(),a=ce.object({email:ce.string().email("common.errmsg.email_invalid")}),c=cn({resolver:un(a),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"common.errmsg.email_duplicate"});return}const f=[...n.content.emails,d.email];try{const h=await il({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),o(!1)}catch(h){Object.entries(h.response.data).forEach(([x,p])=>{c.setError(x,{type:"manual",message:p.message})})}};return l.jsxs(ll,{onOpenChange:o,open:s,children:[l.jsx(cl,{asChild:!0,className:re(e),children:t}),l.jsxs(Ni,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(Ti,{children:l.jsx(Pi,{children:i("domain.application.form.email.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(dn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(ke,{control:c.control,name:"email",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:i("domain.application.form.email.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:i("common.errmsg.email_empty"),...d,type:"email"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:i("common.save")})})]})})})]})]})},iT={domain:"common.text.domain",ip:"common.text.ip",dns:"common.text.dns"},Jb=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,o]=y.useState([]),{t:i}=Ye();y.useMemo(()=>{e&&o(e.split(";"))},[e]),y.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const a=d=>{s.includes(d)||o([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,o(h)},u=d=>{const f=[...s];f.splice(d,1),o(f)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:re(t),children:[l.jsxs(Ce,{className:"flex justify-between items-center",children:[l.jsx("div",{children:i(iT[r])}),l.jsx(ur,{when:s.length>0,children:l.jsx(mp,{op:"add",onValueChange:d=>{a(d)},valueType:r,value:"",trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(di,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:i("common.add")})]})})})]}),l.jsx(je,{children:l.jsx(ur,{when:s.length>0,fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:i("common.text."+r+".empty")}),l.jsx(mp,{value:"",trigger:i("common.add"),onValueChange:a,valueType:r})]}),children:l.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2 dark:text-white dark:border-stone-700 dark:bg-stone-950",children:s.map((d,f)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{children:d}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(mp,{op:"edit",valueType:r,trigger:l.jsx(sv,{size:16,className:"cursor-pointer text-gray-600 dark:text-white"}),value:d,onValueChange:h=>{c(f,h)}}),l.jsx(ov,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},mp=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[o,i]=y.useState(""),[a,c]=y.useState(!1),[u,d]=y.useState(""),{t:f}=Ye();y.useEffect(()=>{i(t)},[t]);const h=ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("common.errmsg.domain_invalid")}),m=ce.string().ip({message:f("common.errmsg.ip_invalid")}),x={domain:h,dns:m,host:m},p=y.useCallback(()=>{const g=x[s].safeParse(o);if(!g.success){d(JSON.parse(g.error.message)[0].message);return}i(""),c(!1),d(""),n(o)},[o]);return l.jsxs(ll,{open:a,onOpenChange:w=>{c(w)},children:[l.jsx(cl,{className:"text-primary",children:e}),l.jsxs(Ni,{className:"dark:text-white",children:[l.jsx(Ti,{children:l.jsx(Pi,{className:"dark:text-white",children:f(iT[s])})}),l.jsx(pe,{value:o,className:"dark:text-white",onChange:w=>{i(w.target.value)}}),l.jsx(ur,{when:u.length>0,children:l.jsx("div",{className:"text-red-500 text-sm",children:u})}),l.jsx(Qh,{children:l.jsx(Me,{onClick:()=>{p()},children:f(r==="add"?"common.add":"common.confirm")})})]})]})},VB=()=>{const{config:{accesses:e,emails:t}}=ln(),[n,r]=y.useState({}),s=Ir(),{t:o}=Ye(),[i,a]=y.useState("apply");y.useEffect(()=>{const x=new URLSearchParams(s.search).get("id");x&&(async()=>{const w=await GU(x);r(w)})()},[s.search]);const c=ce.object({id:ce.string().optional(),domain:ce.string().min(1,{message:"common.errmsg.domain_invalid"}),email:ce.string().email("common.errmsg.email_invalid").optional(),access:ce.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.application.form.access.errmsg.empty"}),nameservers:ce.string().optional(),timeout:ce.number().optional()}),u=cn({resolver:un(c),defaultValues:{id:"",domain:"",email:"",access:"",nameservers:"",timeout:60}});y.useEffect(()=>{var m,x,p,w;n&&u.reset({id:n.id,domain:n.domain,email:(m=n.applyConfig)==null?void 0:m.email,access:(x=n.applyConfig)==null?void 0:x.access,nameservers:(p=n.applyConfig)==null?void 0:p.nameservers,timeout:(w=n.applyConfig)==null?void 0:w.timeout})},[n,u]);const{toast:d}=zr(),f=async m=>{const x={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,applyConfig:{email:m.email??"",access:m.access,nameservers:m.nameservers,timeout:m.timeout}};try{const p=await mf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||a("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{u.setError(g,{type:"manual",message:v.message})});return}},h=async m=>{const x={...n,deployConfig:m};try{const p=await mf(x);let w=o("domain.application.form.domain.changed.message");x.id==""&&(w=o("domain.application.form.domain.added.message")),d({title:o("common.save.succeeded.message"),description:w}),n!=null&&n.id||a("deploy"),r({...p})}catch(p){Object.entries(p.response.data).forEach(([g,v])=>{u.setError(g,{type:"manual",message:v.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Px,{}),l.jsx("div",{className:" h-5 text-muted-foreground",children:l.jsx(WN,{children:l.jsxs(HN,{children:[l.jsx($g,{children:l.jsx(YN,{href:"#/domains",children:o("domain.page.title")})}),l.jsx(GN,{}),l.jsx($g,{children:l.jsx(KN,{children:n!=null&&n.id?o("domain.edit"):o("domain.add")})})]})})}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex md:mt-5",children:[l.jsx("div",{className:re("cursor-pointer text-right",i==="apply"?"text-primary":""),onClick:()=>{a("apply")},children:o("domain.application.tab")}),l.jsx("div",{className:re("cursor-pointer text-right",i==="deploy"?"text-primary":""),onClick:()=>{if(!(n!=null&&n.id)){d({title:o("domain.application.unsaved.message"),description:o("domain.application.unsaved.message"),variant:"destructive"});return}a("deploy")},children:o("domain.deployment.tab")})]}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:re("w-full md:w-[35em] p-5 rounded mt-3 md:mt-0",i=="deploy"&&"hidden"),children:l.jsx(dn,{...u,children:l.jsxs("form",{onSubmit:u.handleSubmit(f),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:u.control,name:"domain",render:({field:m})=>l.jsxs(Se,{children:[l.jsx(l.Fragment,{children:l.jsx(Jb,{value:m.value,valueType:"domain",onValueChange:x=>{u.setValue("domain",x)}})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"email",render:({field:m})=>l.jsxs(Se,{children:[l.jsxs(Ce,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.application.form.email.label")+" "+o("domain.application.form.email.tips")}),l.jsx(UB,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(di,{size:14}),o("common.add")]})})]}),l.jsx(je,{children:l.jsxs(Fa,{...m,value:m.value,onValueChange:x=>{u.setValue("email",x)},children:[l.jsx(yi,{children:l.jsx($a,{placeholder:o("domain.application.form.email.errmsg.empty")})}),l.jsx(vi,{children:l.jsxs(Wc,{children:[l.jsx(Ua,{children:o("domain.application.form.email.list")}),t.content.emails.map(x=>l.jsx(Ao,{value:x,children:l.jsx("div",{children:x})},x))]})})]})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"access",render:({field:m})=>l.jsxs(Se,{children:[l.jsxs(Ce,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.application.form.access.label")}),l.jsx(da,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(di,{size:14}),o("common.add")]}),op:"add"})]}),l.jsx(je,{children:l.jsxs(Fa,{...m,value:m.value,onValueChange:x=>{u.setValue("access",x)},children:[l.jsx(yi,{children:l.jsx($a,{placeholder:o("domain.application.form.access.placeholder")})}),l.jsx(vi,{children:l.jsxs(Wc,{children:[l.jsx(Ua,{children:o("domain.application.form.access.list")}),e.filter(x=>x.usage!="deploy").map(x=>{var p;return l.jsx(Ao,{value:x.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(p=Rs.get(x.configType))==null?void 0:p[1]}),l.jsx("div",{children:x.name})]})},x.id)})]})})]})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"timeout",render:({field:m})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:o("domain.application.form.timeout.label")}),l.jsx(je,{children:l.jsx(pe,{type:"number",placeholder:o("ddomain.application.form.timeout.placeholder"),...m,value:m.value,onChange:x=>{u.setValue("timeout",parseInt(x.target.value))}})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:u.control,name:"nameservers",render:({field:m})=>l.jsxs(Se,{children:[l.jsx(Jb,{value:m.value??"",onValueChange:x=>{u.setValue("nameservers",x)},valueType:"dns"}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:n!=null&&n.id?o("common.save"):o("common.next")})})]})})}),l.jsx("div",{className:re("flex flex-col space-y-5 w-full md:w-[35em]",i=="apply"&&"hidden"),children:l.jsx(MB,{deploys:(n==null?void 0:n.deployConfig)??[],onChange:m=>{h(m)}})})]})]})]})})};var Yx="Tabs",[BB,JH]=on(Yx,[nl]),aT=nl(),[WB,Kx]=BB(Yx),lT=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=Si(a),[f,h]=Gn({prop:r,onChange:s,defaultProp:o});return l.jsx(WB,{scope:n,baseId:Bn(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:c,children:l.jsx(Pe.div,{dir:d,"data-orientation":i,...u,ref:t})})});lT.displayName=Yx;var cT="TabsList",uT=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Kx(cT,n),i=aT(n);return l.jsx(kv,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:l.jsx(Pe.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});uT.displayName=cT;var dT="TabsTrigger",fT=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=Kx(dT,n),a=aT(n),c=pT(i.baseId,r),u=gT(i.baseId,r),d=r===i.value;return l.jsx(Cv,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Pe.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});fT.displayName=dT;var hT="TabsContent",mT=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,a=Kx(hT,n),c=pT(a.baseId,r),u=gT(a.baseId,r),d=r===a.value,f=y.useRef(d);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(an,{present:s||d,children:({present:h})=>l.jsx(Pe.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});mT.displayName=hT;function pT(e,t){return`${e}-trigger-${t}`}function gT(e,t){return`${e}-content-${t}`}var HB=lT,yT=uT,vT=fT,xT=mT;const wT=HB,Gx=y.forwardRef(({className:e,...t},n)=>l.jsx(yT,{ref:n,className:re("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Gx.displayName=yT.displayName;const Qo=y.forwardRef(({className:e,...t},n)=>l.jsx(vT,{ref:n,className:re("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Qo.displayName=vT.displayName;const If=y.forwardRef(({className:e,...t},n)=>l.jsx(xT,{ref:n,className:re("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));If.displayName=xT.displayName;const bT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));bT.displayName="Card";const _T=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex flex-col space-y-1.5 p-6",e),...t}));_T.displayName="CardHeader";const ST=y.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:re("text-2xl font-semibold leading-none tracking-tight",e),...t}));ST.displayName="CardTitle";const kT=y.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:re("text-sm text-muted-foreground",e),...t}));kT.displayName="CardDescription";const CT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("p-6 pt-0",e),...t}));CT.displayName="CardContent";const jT=y.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:re("flex items-center p-6 pt-0",e),...t}));jT.displayName="CardFooter";const $s=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",YB=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=ln(),{toast:n}=zr(),r=Jn(),{t:s}=Ye(),o=async a=>{try{await b$(a),t()}catch(c){n({title:s("common.delete.failed.message"),description:$s(c),variant:"destructive"});return}},i=()=>{r("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(ur,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(Ww,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domains.nodata")}),l.jsx(Vx,{trigger:l.jsx(Me,{children:s("access.group.add")}),className:"mt-3"})]})})}),l.jsx(tm,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(a=>l.jsxs(bT,{className:"w-full md:w-[350px]",children:[l.jsxs(_T,{children:[l.jsx(ST,{children:a.name}),l.jsx(kT,{children:s("access.group.total",{total:a.expand?a.expand.access.length:0})})]}),l.jsx(CT,{className:"min-h-[180px]",children:a.expand?l.jsx(l.Fragment,{children:a.expand.access.slice(0,3).map(c=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:Yb(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:Yb(c.configType)[0]})]})]})},c.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(Ww,{size:40})}),l.jsx("div",{className:"ml-2",children:s("access.group.nodata")})]})})}),l.jsx(jT,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(ur,{when:!!(a.expand&&a.expand.access.length>0),children:l.jsx("div",{children:l.jsx(Me,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${a.id}&tab=access`,{replace:!0})},children:s("access.group.domains")})})}),l.jsx(ur,{when:!a.expand||a.expand.access.length==0,children:l.jsx("div",{children:l.jsx(Me,{size:"sm",onClick:i,children:s("access.authorization.add")})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(Sx,{children:[l.jsx(kx,{asChild:!0,children:l.jsx(Me,{variant:"destructive",size:"sm",children:s("common.delete")})}),l.jsxs(Mh,{children:[l.jsxs(Lh,{children:[l.jsx(Fh,{className:"dark:text-gray-200",children:s("access.group.delete")}),l.jsx($h,{children:s("access.group.delete.confirm")})]}),l.jsxs(zh,{children:[l.jsx(Vh,{className:"dark:text-gray-200",children:s("common.cancel")}),l.jsx(Uh,{onClick:()=>{o(a.id?a.id:"")},children:s("common.confirm")})]})]})]})})]})})]}))})})]})},KB=()=>{const{t:e}=Ye(),{config:t,deleteAccess:n}=ln(),{accesses:r}=t,s=10,o=Math.ceil(r.length/s),i=Jn(),a=Ir(),c=new URLSearchParams(a.search),u=c.get("page"),d=u?Number(u):1,f=c.get("tab"),h=c.get("accessGroupId"),m=(d-1)*s,x=m+s,p=async g=>{const v=await w$(g);n(v.id)},w=g=>{c.set("tab",g),i({search:c.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:e("access.page.title")}),f!="access_group"?l.jsx(da,{trigger:l.jsx(Me,{children:e("access.authorization.add")}),op:"add"}):l.jsx(Vx,{trigger:l.jsx(Me,{children:e("access.group.add")})})]}),l.jsxs(wT,{defaultValue:f||"access",value:f||"access",className:"w-full mt-5",children:[l.jsxs(Gx,{className:"space-x-5 px-3",children:[l.jsx(Qo,{value:"access",onClick:()=>{w("access")},children:e("access.authorization.tab")}),l.jsx(Qo,{value:"access_group",onClick:()=>{w("access_group")},children:e("access.group.tab")})]}),l.jsx(If,{value:"access",children:r.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(sI,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:e("access.authorization.nodata")}),l.jsx(da,{trigger:l.jsx(Me,{children:e("access.authorization.add")}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:e("common.text.name")}),l.jsx("div",{className:"w-48",children:e("common.text.provider")}),l.jsx("div",{className:"w-60",children:e("common.text.created_at")}),l.jsx("div",{className:"w-60",children:e("common.text.updated_at")}),l.jsx("div",{className:"grow",children:e("common.text.operations")})]}),r.filter(g=>h?g.group==h:!0).slice(m,x).map(g=>{var v,b;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:g.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(v=Rs.get(g.configType))==null?void 0:v[1],className:"w-6"}),l.jsx("div",{children:e(((b=Rs.get(g.configType))==null?void 0:b[0])||"")})]}),l.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:g.created&&Ia(g.created)}),l.jsx("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:g.updated&&Ia(g.updated)}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(da,{trigger:l.jsx(Me,{variant:"link",className:"p-0",children:e("common.edit")}),op:"edit",data:g}),l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(da,{trigger:l.jsx(Me,{variant:"link",className:"p-0",children:e("common.copy")}),op:"copy",data:g}),l.jsx(br,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(Sx,{children:[l.jsx(kx,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:e("common.delete")})}),l.jsxs(Mh,{children:[l.jsxs(Lh,{children:[l.jsx(Fh,{className:"dark:text-gray-200",children:e("access.authorization.delete")}),l.jsx($h,{children:e("access.authorization.delete.confirm")})]}),l.jsxs(zh,{children:[l.jsx(Vh,{className:"dark:text-gray-200",children:e("common.cancel")}),l.jsx(Uh,{onClick:()=>{p(g)},children:e("common.confirm")})]})]})]})]})]},g.id)}),l.jsx(xE,{totalPages:o,currentPage:d,onPageChange:g=>{c.set("page",g.toString()),i({search:c.toString()})}})]})}),l.jsx(If,{value:"access_group",children:l.jsx(YB,{})})]})]})},ET=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await ot().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},GB=()=>{const e=Jn(),[t,n]=y.useState(),[r]=SO(),{t:s}=Ye(),o=r.get("domain");return y.useEffect(()=>{(async()=>{const a={};o&&(a.domain=o);const c=await ET(a);n(c.items)})()},[o]),l.jsxs(tm,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:s("history.page.title")}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:s("history.props.domain")}),l.jsx("div",{className:"w-24",children:s("history.props.status")}),l.jsx("div",{className:"w-56",children:s("history.props.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("history.props.last_execution_time")}),l.jsx("div",{className:"grow",children:s("common.text.operations")})]}),t==null?void 0:t.map(i=>{var a,c;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(_x,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(bx,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ia(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(Wv,{children:[l.jsx(Hv,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:s("history.log")})}),l.jsxs(wh,{className:"sm:max-w-5xl",children:[l.jsx(Yv,{children:l.jsxs(Kv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,s("history.log")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(im,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(Hx,{children:s("common.text.nodata")}),l.jsxs(am,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(ok,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",s("history.nodata")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Me,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},ZB=ce.object({username:ce.string().email({message:"login.username.errmsg.invalid"}),password:ce.string().min(10,{message:"login.password.errmsg.invalid"})}),qB=()=>{const{t:e}=Ye(),t=cn({resolver:un(ZB),defaultValues:{username:"",password:""}}),n=async s=>{try{await ot().admins.authWithPassword(s.username,s.password),r("/")}catch(o){const i=$s(o);t.setError("username",{message:i}),t.setError("password",{message:i})}},r=Jn();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(dn,{...t,children:l.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:t.control,name:"username",render:({field:s})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:e("login.username.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("login.username.placeholder"),...s})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:t.control,name:"password",render:({field:s})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:e("login.password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("login.password.placeholder"),...s,type:"password"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:e("login.submit")})})]})})]})},XB=()=>ot().authStore.isValid&&ot().authStore.isAdmin?l.jsx(KS,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(tv,{}),l.jsx(oE,{})]}),QB=ce.object({oldPassword:ce.string().min(10,{message:"settings.password.password.errmsg.length"}),newPassword:ce.string().min(10,{message:"settings.password.password.errmsg.length"}),confirmPassword:ce.string().min(10,{message:"settings.password.password.errmsg.length"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"settings.password.password.errmsg.not_matched",path:["confirmPassword"]}),JB=()=>{const{toast:e}=zr(),t=Jn(),{t:n}=Ye(),r=cn({resolver:un(QB),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async o=>{var i,a;try{await ot().admins.authWithPassword((i=ot().authStore.model)==null?void 0:i.email,o.oldPassword)}catch(c){const u=$s(c);r.setError("oldPassword",{message:u})}try{await ot().admins.update((a=ot().authStore.model)==null?void 0:a.id,{password:o.newPassword,passwordConfirm:o.confirmPassword}),ot().authStore.clear(),e({title:n("settings.password.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=$s(c);e({title:n("settings.password.failed.message"),description:u,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(dn,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:r.control,name:"oldPassword",render:({field:o})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:n("settings.password.current_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.password.current_password.placeholder"),...o,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:r.control,name:"newPassword",render:({field:o})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:n("settings.password.new_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.password.new_password.placeholder"),...o,type:"password"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:r.control,name:"confirmPassword",render:({field:o})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:n("settings.password.confirm_password.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.password.confirm_password.placeholder"),...o,type:"password"})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:n("common.update")})})]})})})})},eW=()=>{const e=Ir(),[t,n]=y.useState("account"),r=Jn(),{t:s}=Ye();return y.useEffect(()=>{const i=e.pathname.split("/")[2];n(i)},[e]),l.jsxs("div",{children:[l.jsx(Px,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("settings.page.title")}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(wT,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(Gx,{className:"mx-auto",children:[l.jsxs(Qo,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[l.jsx(hI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.account.tab")})]}),l.jsxs(Qo,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[l.jsx(rI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.password.tab")})]}),l.jsxs(Qo,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[l.jsx(aI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.notification.tab")})]}),l.jsxs(Qo,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[l.jsx(uI,{size:14}),l.jsx("div",{className:"ml-1",children:s("settings.ca.tab")})]})]}),l.jsx(If,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(tv,{})})})]})})]})},tW=()=>{const[e,t]=y.useState(),[n,r]=y.useState(),s=Jn(),{t:o}=Ye();return y.useEffect(()=>{(async()=>{const a=await KU();t(a)})()},[]),y.useEffect(()=>{(async()=>{const c=await ET({perPage:8});r(c.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:o("dashboard.page.title")})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(dI,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.all")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(wn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(QO,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.near_expired")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(wn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(iI,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(wn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(qO,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:o("dashboard.statistics.disabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(wn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:o("dashboard.statistics.unit")})]})]})]})]}),l.jsx("div",{className:"my-4",children:l.jsx("hr",{})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:o("dashboard.history")}),(n==null?void 0:n.length)==0?l.jsx(l.Fragment,{children:l.jsxs(im,{className:"max-w-[40em] mt-10",children:[l.jsx(Hx,{children:o("common.text.nodata")}),l.jsxs(am,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(ok,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",o("history.nodata")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Me,{onClick:()=>{s("/edit")},children:o("domain.add")})})]})]})}):l.jsxs(l.Fragment,{children:[l.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:[l.jsx("div",{className:"w-48",children:o("history.props.domain")}),l.jsx("div",{className:"w-24",children:o("history.props.status")}),l.jsx("div",{className:"w-56",children:o("history.props.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:o("history.props.last_execution_time")}),l.jsx("div",{className:"grow",children:o("common.text.operations")})]}),n==null?void 0:n.map(i=>{var a,c;return l.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:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=i.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(_x,{deployment:i})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(bx,{phase:i.phase,phaseSuccess:i.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ia(i.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(Wv,{children:[l.jsx(Hv,{asChild:!0,children:l.jsx(Me,{variant:"link",className:"p-0",children:o("history.log")})}),l.jsxs(wh,{className:"sm:max-w-5xl",children:[l.jsx(Yv,{children:l.jsxs(Kv,{children:[(c=i.expand.domain)==null?void 0:c.domain,"-",i.id,o("history.log")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[i.log.check&&l.jsx(l.Fragment,{children:i.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.apply&&l.jsx(l.Fragment,{children:i.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),i.log.deploy&&l.jsx(l.Fragment,{children:i.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},i.id)})]})]})]})},nW=ce.object({email:ce.string().email("settings.account.email.errmsg.invalid")}),rW=()=>{var a;const{toast:e}=zr(),t=Jn(),{t:n}=Ye(),[r,s]=y.useState(!1),o=cn({resolver:un(nW),defaultValues:{email:(a=ot().authStore.model)==null?void 0:a.email}}),i=async c=>{var u;try{await ot().admins.update((u=ot().authStore.model)==null?void 0:u.id,{email:c.email}),ot().authStore.clear(),e({title:n("settings.account.email.changed.message"),description:n("settings.account.relogin.message")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=$s(d);e({title:n("settings.account.email.failed.message"),description:f,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(dn,{...o,children:l.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:o.control,name:"email",render:({field:c})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:n("settings.account.email.label")}),l.jsx(je,{children:l.jsx(pe,{placeholder:n("settings.account.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),o.setValue("email",u.target.value)}})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(Me,{type:"submit",children:n("common.update")}):l.jsx(Me,{type:"submit",disabled:!0,variant:"secondary",children:n("common.update")})})]})})})})};var Zx="Collapsible",[sW,NT]=on(Zx),[oW,qx]=sW(Zx),TT=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[c=!1,u]=Gn({prop:r,defaultProp:s,onChange:i});return l.jsx(oW,{scope:n,disabled:o,contentId:Bn(),open:c,onOpenToggle:y.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Pe.div,{"data-state":Qx(c),"data-disabled":o?"":void 0,...a,ref:t})})});TT.displayName=Zx;var PT="CollapsibleTrigger",RT=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=qx(PT,n);return l.jsx(Pe.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Qx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});RT.displayName=PT;var Xx="CollapsibleContent",AT=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=qx(Xx,e.__scopeCollapsible);return l.jsx(an,{present:n||s.open,children:({present:o})=>l.jsx(iW,{...r,ref:t,present:o})})});AT.displayName=Xx;var iW=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=e,i=qx(Xx,n),[a,c]=y.useState(r),u=y.useRef(null),d=Ge(t,u),f=y.useRef(0),h=f.current,m=y.useRef(0),x=m.current,p=i.open||a,w=y.useRef(p),g=y.useRef();return y.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),en(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();f.current=b.height,m.current=b.width,w.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(r)}},[i.open,r]),l.jsx(Pe.div,{"data-state":Qx(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!p,...o,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:p&&s})});function Qx(e){return e?"open":"closed"}var aW=TT,lW=RT,cW=AT,Zs="Accordion",uW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Jx,dW,fW]=eu(Zs),[lm,e9]=on(Zs,[fW,NT]),e0=NT(),DT=We.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,o=r;return l.jsx(Jx.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(gW,{...o,ref:t}):l.jsx(pW,{...s,ref:t})})});DT.displayName=Zs;var[OT,hW]=lm(Zs),[IT,mW]=lm(Zs,{collapsible:!1}),pW=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,c]=Gn({prop:n,defaultProp:r,onChange:s});return l.jsx(OT,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>o&&c(""),[o,c]),children:l.jsx(IT,{scope:e.__scopeAccordion,collapsible:o,children:l.jsx(MT,{...i,ref:t})})})}),gW=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=e,[i=[],a]=Gn({prop:n,defaultProp:r,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(OT,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:l.jsx(IT,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(MT,{...o,ref:t})})})}),[yW,cm]=lm(Zs),MT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=e,a=We.useRef(null),c=Ge(a,t),u=dW(n),f=Si(s)==="ltr",h=ue(e.onKeyDown,m=>{var R;if(!uW.includes(m.key))return;const x=m.target,p=u().filter(A=>{var O;return!((O=A.ref.current)!=null&&O.disabled)}),w=p.findIndex(A=>A.ref.current===x),g=p.length;if(w===-1)return;m.preventDefault();let v=w;const b=0,_=g-1,C=()=>{v=w+1,v>_&&(v=b)},j=()=>{v=w-1,v<b&&(v=_)};switch(m.key){case"Home":v=b;break;case"End":v=_;break;case"ArrowRight":o==="horizontal"&&(f?C():j());break;case"ArrowDown":o==="vertical"&&C();break;case"ArrowLeft":o==="horizontal"&&(f?j():C());break;case"ArrowUp":o==="vertical"&&j();break}const T=v%g;(R=p[T].ref.current)==null||R.focus()});return l.jsx(yW,{scope:n,disabled:r,direction:s,orientation:o,children:l.jsx(Jx.Slot,{scope:n,children:l.jsx(Pe.div,{...i,"data-orientation":o,ref:c,onKeyDown:r?void 0:h})})})}),Mf="AccordionItem",[vW,t0]=lm(Mf),LT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,o=cm(Mf,n),i=hW(Mf,n),a=e0(n),c=Bn(),u=r&&i.value.includes(r)||!1,d=o.disabled||e.disabled;return l.jsx(vW,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(aW,{"data-orientation":o.orientation,"data-state":BT(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});LT.displayName=Mf;var zT="AccordionHeader",FT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=cm(Zs,n),o=t0(zT,n);return l.jsx(Pe.h3,{"data-orientation":s.orientation,"data-state":BT(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:t})});FT.displayName=zT;var ey="AccordionTrigger",$T=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=cm(Zs,n),o=t0(ey,n),i=mW(ey,n),a=e0(n);return l.jsx(Jx.ItemSlot,{scope:n,children:l.jsx(lW,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...r,ref:t})})});$T.displayName=ey;var UT="AccordionContent",VT=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=cm(Zs,n),o=t0(UT,n),i=e0(n);return l.jsx(cW,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});VT.displayName=UT;function BT(e){return e?"open":"closed"}var xW=DT,wW=LT,bW=FT,WT=$T,HT=VT;const e1=xW,Fl=y.forwardRef(({className:e,...t},n)=>l.jsx(wW,{ref:n,className:re("border-b",e),...t}));Fl.displayName="AccordionItem";const $l=y.forwardRef(({className:e,children:t,...n},r)=>l.jsx(bW,{className:"flex",children:l.jsxs(WT,{ref:r,className:re("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(rv,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));$l.displayName=WT.displayName;const Ul=y.forwardRef(({className:e,children:t,...n},r)=>l.jsx(HT,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:re("pb-4 pt-0",e),children:t})}));Ul.displayName=HT.displayName;const _W=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},YT=y.createContext({}),n0=()=>y.useContext(YT),SW=({children:e})=>{const[t,n]=y.useReducer(_W,{});y.useEffect(()=>{(async()=>{const i=await yx("notifyChannels");n({type:"SET_CHANNELS",payload:i})})()},[]);const r=y.useCallback(o=>{n({type:"SET_CHANNEL",payload:o})},[]),s=y.useCallback(o=>{n({type:"SET_CHANNELS",payload:o})},[]);return l.jsx(YT.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},kW=()=>{const{config:e,setChannels:t}=n0(),{t:n}=Ye(),[r,s]=y.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});y.useEffect(()=>{const c=(()=>{const u={accessToken:"",secret:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.dingtalk?d.dingtalk:u})();s({id:e.id??"",name:"dingtalk",data:c})},[e]);const{toast:o}=zr(),i=async()=>{try{const a=await il({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=$s(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(pe,{placeholder:"AccessToken",value:r.data.accessToken,onChange:a=>{s({...r,data:{...r.data,accessToken:a.target.value}})}}),l.jsx(pe,{placeholder:n("settings.notification.dingtalk.secret.placeholder"),className:"mt-2",value:r.data.secret,onChange:a=>{s({...r,data:{...r.data,secret:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:()=>{i()},children:n("common.save")})})]})},CW={title:"您有 {COUNT} 张证书即将过期",content:"有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!"},jW=()=>{const[e,t]=y.useState(""),[n,r]=y.useState([CW]),{toast:s}=zr(),{t:o}=Ye();y.useEffect(()=>{(async()=>{const d=await yx("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const i=u=>{const d=n[0];r([{...d,title:u}])},a=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await il({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:o("common.save.succeeded.message"),description:o("settings.notification.template.saved.message")})};return l.jsxs("div",{children:[l.jsx(pe,{value:n[0].title,onChange:u=>{i(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.title")}),l.jsx(Df,{className:"mt-2",value:n[0].content,onChange:u=>{a(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:o("settings.notification.template.variables.tips.content")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:c,children:o("common.save")})})]})},EW=()=>{const{config:e,setChannels:t}=n0(),{t:n}=Ye(),[r,s]=y.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});y.useEffect(()=>{const c=(()=>{const u={apiToken:"",chatId:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.telegram?d.telegram:u})();s({id:e.id??"",name:"common.provider.telegram",data:c})},[e]);const{toast:o}=zr(),i=async()=>{try{const a=await il({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=$s(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(pe,{placeholder:"ApiToken",value:r.data.apiToken,onChange:a=>{s({...r,data:{...r.data,apiToken:a.target.value}})}}),l.jsx(pe,{placeholder:"ChatId",value:r.data.chatId,onChange:a=>{s({...r,data:{...r.data,chatId:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:()=>{i()},children:n("common.save")})})]})};function NW(e){try{return new URL(e),!0}catch{return!1}}const TW=()=>{const{config:e,setChannels:t}=n0(),{t:n}=Ye(),[r,s]=y.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});y.useEffect(()=>{const c=(()=>{const u={url:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.webhook?d.webhook:u})();s({id:e.id??"",name:"webhook",data:c})},[e]);const{toast:o}=zr(),i=async()=>{try{if(r.data.url=r.data.url.trim(),!NW(r.data.url)){o({title:n("common.save.failed.message"),description:n("settings.notification.url.errmsg.invalid"),variant:"destructive"});return}const a=await il({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(a),o({title:n("common.save.succeeded.message"),description:n("settings.notification.config.saved.message")})}catch(a){const c=$s(a);o({title:n("common.save.failed.message"),description:`${n("settings.notification.config.failed.message")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(pe,{placeholder:"Url",value:r.data.url,onChange:a=>{s({...r,data:{...r.data,url:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(mu,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Vt,{htmlFor:"airplane-mode",children:n("settings.notification.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Me,{onClick:()=>{i()},children:n("common.save")})})]})},PW=()=>{const{t:e}=Ye();return l.jsx(l.Fragment,{children:l.jsxs(SW,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(e1,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs(Fl,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx($l,{children:e("settings.notification.template.label")}),l.jsx(Ul,{children:l.jsx(jW,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(e1,{type:"single",className:"dark:text-stone-200",children:[l.jsxs(Fl,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx($l,{children:e("common.provider.dingtalk")}),l.jsx(Ul,{children:l.jsx(kW,{})})]}),l.jsxs(Fl,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx($l,{children:e("common.provider.telegram")}),l.jsx(Ul,{children:l.jsx(EW,{})})]}),l.jsxs(Fl,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx($l,{children:e("common.provider.webhook")}),l.jsx(Ul,{children:l.jsx(TW,{})})]})]})})]})})};var r0="Radio",[RW,KT]=on(r0),[AW,DW]=RW(r0),GT=y.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:c,...u}=e,[d,f]=y.useState(null),h=Ge(t,p=>f(p)),m=y.useRef(!1),x=d?!!d.closest("form"):!0;return l.jsxs(AW,{scope:n,checked:s,disabled:i,children:[l.jsx(Pe.button,{type:"button",role:"radio","aria-checked":s,"data-state":XT(s),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:h,onClick:ue(e.onClick,p=>{s||c==null||c(),x&&(m.current=p.isPropagationStopped(),m.current||p.stopPropagation())})}),x&&l.jsx(OW,{control:d,bubbles:!m.current,name:r,value:a,checked:s,required:o,disabled:i,style:{transform:"translateX(-100%)"}})]})});GT.displayName=r0;var ZT="RadioIndicator",qT=y.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,o=DW(ZT,n);return l.jsx(an,{present:r||o.checked,children:l.jsx(Pe.span,{"data-state":XT(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t})})});qT.displayName=ZT;var OW=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,o=y.useRef(null),i=Cx(n),a=yv(t);return y.useEffect(()=>{const c=o.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[i,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function XT(e){return e?"checked":"unchecked"}var IW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],s0="RadioGroup",[MW,t9]=on(s0,[nl,KT]),QT=nl(),JT=KT(),[LW,zW]=MW(s0),eP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,m=QT(n),x=Si(u),[p,w]=Gn({prop:o,defaultProp:s,onChange:f});return l.jsx(LW,{scope:n,name:r,required:i,disabled:a,value:p,onValueChange:w,children:l.jsx(kv,{asChild:!0,...m,orientation:c,dir:x,loop:d,children:l.jsx(Pe.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x,...h,ref:t})})})});eP.displayName=s0;var tP="RadioGroupItem",nP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,o=zW(tP,n),i=o.disabled||r,a=QT(n),c=JT(n),u=y.useRef(null),d=Ge(t,u),f=o.value===s.value,h=y.useRef(!1);return y.useEffect(()=>{const m=p=>{IW.includes(p.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",x)}},[]),l.jsx(Cv,{asChild:!0,...a,focusable:!i,active:f,children:l.jsx(GT,{disabled:i,required:o.required,checked:f,...c,...s,name:o.name,ref:d,onCheck:()=>o.onValueChange(s.value),onKeyDown:ue(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ue(s.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});nP.displayName=tP;var FW="RadioGroupIndicator",rP=y.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=JT(n);return l.jsx(qT,{...s,...r,ref:t})});rP.displayName=FW;var sP=eP,oP=nP,$W=rP;const iP=y.forwardRef(({className:e,...t},n)=>l.jsx(sP,{className:re("grid gap-2",e),...t,ref:n}));iP.displayName=sP.displayName;const ty=y.forwardRef(({className:e,...t},n)=>l.jsx(oP,{ref:n,className:re("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx($W,{className:"flex items-center justify-center",children:l.jsx(sk,{className:"h-2.5 w-2.5 fill-current text-current"})})}));ty.displayName=oP.displayName;const UW=()=>{const{t:e}=Ye(),t=ce.object({provider:ce.enum(["letsencrypt","zerossl"],{message:e("settings.ca.provider.errmsg.empty")}),eabKid:ce.string().optional(),eabHmacKey:ce.string().optional()}),n=cn({resolver:un(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=y.useState("letsencrypt"),[o,i]=y.useState(),{toast:a}=zr();y.useEffect(()=>{(async()=>{const f=await yx("ssl-provider");if(f){i(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("settings.ca.eab_kid_hmac_key.errmsg.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:o==null?void 0:o.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await il(f),a({title:e("common.update.succeeded.message"),description:e("common.update.succeeded.message")})}catch(h){const m=$s(h);a({title:e("common.update.failed.message"),description:m,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(dn,{...n,children:l.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[l.jsx(ke,{control:n.control,name:"provider",render:({field:d})=>l.jsxs(Se,{children:[l.jsx(Ce,{children:e("common.text.ca")}),l.jsx(je,{children:l.jsxs(iP,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(ty,{value:"letsencrypt",id:"letsencrypt"}),l.jsx(Vt,{htmlFor:"letsencrypt",children:l.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[l.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),l.jsx("div",{children:"Let's Encrypt"})]})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(ty,{value:"zerossl",id:"zerossl"}),l.jsx(Vt,{htmlFor:"zerossl",children:l.jsxs("div",{className:re("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[l.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),l.jsx("div",{children:"ZeroSSL"})]})})]})]})}),l.jsx(ke,{control:n.control,name:"eabKid",render:({field:f})=>l.jsxs(Se,{hidden:r!=="zerossl",children:[l.jsx(Ce,{children:"EAB_KID"}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("settings.ca.eab_kid.errmsg.empty"),...f,type:"text"})}),l.jsx(ye,{})]})}),l.jsx(ke,{control:n.control,name:"eabHmacKey",render:({field:f})=>l.jsxs(Se,{hidden:r!=="zerossl",children:[l.jsx(Ce,{children:"EAB_HMAC_KEY"}),l.jsx(je,{children:l.jsx(pe,{placeholder:e("settings.ca.eab_hmac_key.errmsg.empty"),...f,type:"text"})}),l.jsx(ye,{})]})}),l.jsx(ye,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Me,{type:"submit",children:e("common.update")})})]})})})})},VW=lO([{path:"/",element:l.jsx(P$,{}),children:[{path:"/",element:l.jsx(tW,{})},{path:"/domains",element:l.jsx(QU,{})},{path:"/edit",element:l.jsx(VB,{})},{path:"/access",element:l.jsx(KB,{})},{path:"/history",element:l.jsx(GB,{})},{path:"/setting",element:l.jsx(eW,{}),children:[{path:"/setting/password",element:l.jsx(JB,{})},{path:"/setting/account",element:l.jsx(rW,{})},{path:"/setting/notify",element:l.jsx(PW,{})},{path:"/setting/ssl-provider",element:l.jsx(UW,{})}]}]},{path:"/login",element:l.jsx(XB,{}),children:[{path:"/login",element:l.jsx(qB,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]),BW={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Lf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||BW,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Lf(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Lf(this.logger,t)}}var qr=new Lf;class um{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[a,c]=i;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}const El=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},t1=e=>e==null?"":""+e,WW=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},HW=/###/g,n1=e=>e&&e.indexOf("###")>-1?e.replace(HW,"."):e,r1=e=>!e||typeof e=="string",tc=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s<r.length-1;){if(r1(e))return{};const o=n1(r[s]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++s}return r1(e)?{}:{obj:e,k:n1(r[s])}},s1=(e,t,n)=>{const{obj:r,k:s}=tc(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),a=tc(e,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=tc(e,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},YW=(e,t,n,r)=>{const{obj:s,k:o}=tc(e,t,Object);s[o]=s[o]||[],s[o].push(n)},zf=(e,t)=>{const{obj:n,k:r}=tc(e,t);if(n)return n[r]},KW=(e,t,n)=>{const r=zf(e,n);return r!==void 0?r:zf(t,n)},aP=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):aP(e[r],t[r],n):e[r]=t[r]);return e},Bi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var GW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const ZW=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>GW[t]):e;class qW{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const XW=[" ",",","?","!",";"],QW=new qW(20),JW=(e,t,n)=>{t=t||"",n=n||"";const r=XW.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=QW.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},ny=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],i=s[a],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&c<r.length-1)continue;o+=c-o+1;break}s=i}return s},Ff=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class o1 extends um{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&o?a.push(...r.split(o)):a.push(r)));const c=zf(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!i||typeof r!="string"?c:ny(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),s1(this.data,a,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=zf(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?aP(c,r,o):c={...c,...r},s1(this.data,a,c),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var lP={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const i1={};class $f extends um{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),WW(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=qr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!JW(t,r,s);if(i&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let h=f&&f.res;const m=f&&f.usedKey||i,x=f&&f.exactUsedKey||i,p=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(p)<0&&!(typeof g=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(o){const _=Array.isArray(h),C=_?[]:{},j=_?x:m;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const R=`${j}${o}${T}`;C[T]=this.translate(R,{...n,joinArrays:!1,ns:a}),C[T]===R&&(C[T]=h[T])}h=C}}else if(v&&typeof g=="string"&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=$f.hasDefaultValue(n),R=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",O=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(C=!0,h=i);const z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,i,S?G:h),o){const W=this.resolve(i,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W<J.length;W++)U.push(J[W]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const F=(W,I,X)=>{const $=T&&X!==h?X:z;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{F([W],i+X,n[`defaultValue${X}`]||G)})}):F(U,i,G))}h=this.extendTranslation(h,t,n,f,r),C&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${i}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${i}`:i,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),m=h&&h.length;d<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var h=arguments.length,m=new Array(h),x=0;x<h;x++)m[x]=arguments[x];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=typeof a=="string"?[a]:a;return t!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(t=lP.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",m=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",p=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(a=w,!i1[`${p[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(i1[`${p[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(g=>{if(this.isValidLookup(r))return;i=g;const v=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,d,g,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(g,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(v.push(d+_),n.ordinal&&_.indexOf(j)===0&&v.push(d+_.replace(j,this.options.pluralSeparator)),m&&v.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;v.push(T),h&&(v.push(T+_),n.ordinal&&_.indexOf(j)===0&&v.push(T+_.replace(j,this.options.pluralSeparator)),m&&v.push(T+C))}}let b;for(;b=v.pop();)this.isValidLookup(r)||(o=b,r=this.getResource(g,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const pp=e=>e.charAt(0).toUpperCase()+e.slice(1);class a1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qr.create("languageUtils")}getScriptPartFromCode(t){if(t=Ff(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ff(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=pp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=pp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=pp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let eH=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],tH={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const nH=["v1","v2","v3"],rH=["v4"],l1={zero:0,one:1,two:2,few:3,many:4,other:5},sH=()=>{const e={};return eH.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:tH[t.fc]}})}),e};class oH{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=qr.create("pluralResolver"),(!this.options.compatibilityJSON||rH.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=sH(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=Ff(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[o]=i,i}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>l1[s]-l1[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!nH.includes(this.options.compatibilityJSON)}}const c1=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=KW(e,t,n);return!o&&s&&typeof n=="string"&&(o=ny(e,n,r),o===void 0&&(o=ny(t,n,r))),o},gp=e=>e.replace(/\$/g,"$$$$");class iH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:x,nestingSuffixEscaped:p,nestingOptionsSeparator:w,maxReplaces:g,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:ZW,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Bi(o):i||"{{",this.suffix=a?Bi(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Bi(h):m||Bi("$t("),this.nestingSuffix=x?Bi(x):p||Bi(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=c1(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...s,...n,interpolationkey:m}):g}const x=m.split(this.formatSeparator),p=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(c1(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:p})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>gp(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?gp(this.escape(m)):gp(m)}].forEach(m=>{for(a=0;o=m.regex.exec(t);){const x=o[1].trim();if(i=u(x),i===void 0)if(typeof d=="function"){const w=d(t,o,s);i=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=t1(i));const p=m.safeValue(i);if(t=t.replace(o[0],p),f?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,i);const m=h.match(/'/g),x=h.match(/"/g);(m&&m.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),u&&(i={...u,...i})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,p),`${c}${d}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(o=n(a.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=t1(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const aH=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...c]=i.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Wi=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(Ff(r),s),t[i]=a),a(n)}};class lH{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qr.create("formatter"),this.options=t,this.formats={number:Wi((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Wi((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Wi((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Wi((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Wi((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Wi(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{const{formatName:u,formatOptions:d}=aH(c);if(this.formats[u]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,m,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const cH=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class uH extends um{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=qr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,d=!1,i[h]===void 0&&(i[h]=!0),o[h]===void 0&&(o[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{YW(c.loaded,[o],i),cH(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,a),this.loaded(t,i,a)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const u1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),d1=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),rd=()=>{},dH=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Kc extends um{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=d1(t),this.services={},this.logger=qr,this.modules={external:[]},dH(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=u1();this.options={...s,...this.options,...d1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?qr.init(o(this.modules.logger),this.options):qr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=lH);const f=new a1(this.options);this.store=new o1(this.options.resources,this.options);const h=this.services;h.logger=qr,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new oH(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new iH(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new uH(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new $f(this.services,this.options),this.translator.on("*",function(m){for(var x=arguments.length,p=new Array(x>1?x-1:0),w=1;w<x;w++)p[w-1]=arguments[w];t.emit(m,...p)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rd),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=El(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rd;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>i(c)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=El();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=rd),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&lP.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=El();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},i=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const o=function(i,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];c=s.options.overloadTranslationOptionHandler([i,a].concat(d))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const h=s.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(i)?m=i.map(x=>`${c.keyPrefix}${h}${x}`):m=c.keyPrefix?`${c.keyPrefix}${h}${i}`:i,s.t(m,c)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=El();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=El();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new a1(u1());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Kc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rd;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Kc(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new o1(this.store.data,s),o.services.resourceStore=o.store),o.translator=new $f(o.services,s),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];o.emit(a,...u)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vn=Kc.createInstance();vn.createInstance=Kc.createInstance;vn.createInstance;vn.dir;vn.init;vn.loadResources;vn.reloadResources;vn.use;vn.changeLanguage;vn.getFixedT;vn.t;vn.exists;vn.setDefaultNamespace;vn.hasLoadedNamespace;vn.loadNamespaces;vn.loadLanguages;const{slice:fH,forEach:hH}=[];function mH(e){return hH.call(fH.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const f1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,pH=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!f1.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!f1.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},h1={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=pH(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e){this.create(e,"",-1)}};var gH={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return h1.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&h1.create(n,e,r,s,o)}},yH={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const i=s.substring(1).split("&");for(let a=0;a<i.length;a++){const c=i[a].indexOf("=");c>0&&i[a].substring(0,c)===t&&(n=i[a].substring(c+1))}}return n}};let Nl=null;const m1=()=>{if(Nl!==null)return Nl;try{Nl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Nl=!1}return Nl};var vH={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&m1())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&m1()&&window.localStorage.setItem(n,e)}};let Tl=null;const p1=()=>{if(Tl!==null)return Tl;try{Tl=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Tl=!1}return Tl};var xH={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&p1())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&p1()&&window.sessionStorage.setItem(n,e)}},wH={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},bH={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},_H={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},SH={name:"subdomain",lookup(e){var s,o;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((o=(s=window.location)==null?void 0:s.hostname)==null?void 0:o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function kH(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class cP{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=mH(n,this.options||{},kH()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(gH),this.addDetector(yH),this.addDetector(vH),this.addDetector(xH),this.addDetector(wH),this.addDetector(bH),this.addDetector(_H),this.addDetector(SH)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}cP.type="languageDetector";const CH={"common.add":"新增","common.save":"保存","common.save.succeeded.message":"保存成功","common.save.failed.message":"保存失败","common.edit":"编辑","common.copy":"复制","common.download":"下载","common.delete":"刪除","common.delete.succeeded.message":"删除成功","common.delete.failed.message":"删除失败","common.next":"下一步","common.confirm":"确认","common.cancel":"取消","common.submit":"提交","common.update":"更新","common.update.succeeded.message":"修改成功","common.update.failed.message":"修改失败","common.text.domain":"域名","common.text.domain.empty":"无域名","common.text.ip":"IP 地址","common.text.ip.empty":"无 IP 地址","common.text.dns":"DNS域名服务器","common.text.dns.empty":"无 DNS 地址","common.text.ca":"CA证书颁发机构","common.text.name":"名称","common.text.provider":"服务商","common.text.created_at":"创建时间","common.text.updated_at":"更新时间","common.text.operations":"操作","common.text.nodata":"暂无数据","common.menu.settings":"系统设置","common.menu.logout":"退出登录","common.menu.document":"文档","common.pagination.next":"下一页","common.pagination.prev":"上一页","common.pagination.more":"更多","common.theme.light":"浅色","common.theme.dark":"暗黑","common.theme.system":"跟随系统","common.errmsg.string_max":"请输入不超过 {{max}} 个字符","common.errmsg.email_empty":"请输入邮箱","common.errmsg.email_invalid":"请输入正确的邮箱","common.errmsg.email_duplicate":"邮箱已存在","common.errmsg.domain_invalid":"请输入正确的域名","common.errmsg.host_invalid":"请输入正确的域名或 IP 地址","common.errmsg.ip_invalid":"请输入正确的 IP 地址","common.errmsg.url_invalid":"请输入正确的 URL","common.provider.tencent":"腾讯云","common.provider.tencent.cdn":"腾讯云 - CDN","common.provider.aliyun":"阿里云","common.provider.aliyun.oss":"阿里云 - OSS","common.provider.aliyun.cdn":"阿里云 - CDN","common.provider.aliyun.dcdn":"阿里云 - DCDN","common.provider.huaweicloud":"华为云","common.provider.qiniu":"七牛云","common.provider.qiniu.cdn":"七牛云 - CDN","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"本地部署","common.provider.ssh":"SSH 部署","common.provider.webhook":"Webhook","common.provider.dingtalk":"钉钉","common.provider.telegram":"Telegram"},jH={"login.username.label":"用户名","login.username.placeholder":"请输入用户名/邮箱","login.username.errmsg.invalid":"请输入正确的用户名/邮箱","login.password.label":"密码","login.password.placeholder":"请输入密码","login.password.errmsg.invalid":"密码至少 10 个字符","login.submit":"登录"},EH={"dashboard.page.title":"仪表盘","dashboard.statistics.all":"所有","dashboard.statistics.near_expired":"即将过期","dashboard.statistics.enabled":"启用中","dashboard.statistics.disabled":"未启用","dashboard.statistics.unit":"个","dashboard.history":"部署历史"},NH={"settings.page.title":"系统设置","settings.account.relogin.message":"请重新登录","settings.account.tab":"账号","settings.account.email.label":"登录邮箱","settings.account.email.errmsg.invalid":"请输入正确的邮箱地址","settings.account.email.placeholder":"请输入邮箱","settings.account.email.changed.message":"修改账户邮箱成功","settings.account.email.failed.message":"修改账户邮箱失败","settings.password.tab":"密码","settings.password.password.errmsg.length":"密码至少10个字符","settings.password.password.errmsg.not_matched":"两次密码不一致","settings.password.current_password.label":"当前密码","settings.password.current_password.placeholder":"请输入旧密码","settings.password.new_password.label":"新密码","settings.password.new_password.placeholder":"请输入新密码","settings.password.confirm_password.label":"确认密码","settings.password.confirm_password.placeholder":"请再次输入新密码","settings.password.changed.message":"修改密码成功","settings.password.failed.message":"修改密码失败","settings.notification.tab":"消息推送","settings.notification.template.label":"内容模板","settings.notification.template.saved.message":"通知模板保存成功","settings.notification.template.variables.tips.title":"可选的变量({COUNT}: 即将过期张数)","settings.notification.template.variables.tips.content":"可选的变量({COUNT}: 即将过期张数;{DOMAINS}: 域名列表)","settings.notification.config.enable":"是否启用","settings.notification.config.saved.message":"配置保存成功","settings.notification.config.failed.message":"配置保存失败","settings.notification.dingtalk.secret.placeholder":"加签的签名","settings.notification.url.errmsg.invalid":"URL 格式不正确","settings.ca.tab":"证书颁发机构CA","settings.ca.provider.errmsg.empty":"请选择证书分发机构","settings.ca.eab_kid.errmsg.empty":"请输入EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"请输入EAB_HMAC_KEY","settings.ca.eab_kid_hmac_key.errmsg.empty":"请输入EAB_KID和EAB_HMAC_KEY"},TH={"domain.page.title":"域名列表","domain.nodata":"请添加域名开始部署证书吧。","domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.delete.confirm":"确定要删除域名吗?","domain.history":"部署历史","domain.deploy":"立即部署","domain.deploy.started.message":"开始部署","domain.deploy.started.tips":"已发起部署,请稍后查看部署日志。","domain.deploy.failed.message":"执行失败","domain.deploy.failed.tips":"执行失败,请在 <1>部署历史</1> 查看详情。","domain.deploy_forced":"强行部署","domain.props.expiry":"有效期限","domain.props.expiry.date1":"有效期 {{date}} 天","domain.props.expiry.date2":"{{date}} 到期","domain.props.last_execution_status":"最近执行状态","domain.props.last_execution_stage":"最近执行阶段","domain.props.last_execution_time":"最近执行时间","domain.props.enable":"是否启用","domain.props.enable.enabled":"启用","domain.props.enable.disabled":"禁用","domain.application.tab":"申请配置","domain.application.form.domain.added.message":"域名添加成功","domain.application.form.domain.changed.message":"域名编辑成功","domain.application.form.email.label":"邮箱","domain.application.form.email.tips":"(申请证书需要提供邮箱)","domain.application.form.email.add":"添加邮箱","domain.application.form.email.list":"邮箱列表","domain.application.form.email.errmsg.empty":"请选择邮箱","domain.application.form.access.label":"DNS 服务商授权配置","domain.application.form.access.placeholder":"请选择 DNS 服务商授权配置","domain.application.form.access.errmsg.empty":"请选择 DNS 服务商授权配置","domain.application.form.access.list":"已有的 DNS 服务商授权配置","domain.application.form.timeout.label":"超时时间","domain.application.form.timeoue.placeholder":"超时时间(单位:秒)","domain.application.unsaved.message":"请先保存申请配置","domain.deployment.tab":"部署配置","domain.deployment.nodata":"暂无部署配置,请添加后开始部署证书吧","domain.deployment.form.type.label":"部署方式","domain.deployment.form.type.placeholder":"请选择部署方式","domain.deployment.form.type.list":"支持的部署方式","domain.deployment.form.access.label":"授权配置","domain.deployment.form.access.placeholder":"请选择授权配置","domain.deployment.form.access.list":"已有的服务商授权配置","domain.deployment.form.cdn_domain.label":"部署到域名","domain.deployment.form.cdn_domain.placeholder":"请输入 CDN 域名","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_bucket":"存储桶","domain.deployment.form.oss_bucket.placeholder":"请输入存储桶名","domain.deployment.form.variables.label":"变量","domain.deployment.form.variables.key":"变量名","domain.deployment.form.variables.value":"值","domain.deployment.form.variables.empty":"尚未添加变量","domain.deployment.form.variables.key.required":"变量名不能为空","domain.deployment.form.variables.value.required":"变量值不能为空","domain.deployment.form.variables.key.placeholder":"请输入变量名","domain.deployment.form.variables.value.placeholder":"请输入变量值"},PH={"access.page.title":"授权管理","access.authorization.tab":"授权","access.authorization.nodata":"请添加授权开始部署证书吧。","access.authorization.add":"新增授权","access.authorization.edit":"编辑授权","access.authorization.copy":"复制授权","access.authorization.delete":"删除授权","access.authorization.delete.confirm":"确定要删除授权吗?","access.authorization.form.type.label":"服务商","access.authorization.form.type.placeholder":"请选择服务商","access.authorization.form.type.list":"服务商列表","access.authorization.form.name.label":"名称","access.authorization.form.name.placeholder":"请输入授权名称","access.authorization.form.config.label":"配置类型","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"请输入区域","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"请输入 AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"请输入 AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"请输入 AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"请输入 SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"请输入 SecretKey","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"请输入 CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"请输入 GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"请输入 GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"请输入 NAMESILO_API_KEY","access.authorization.form.username.label":"用户名","access.authorization.form.username.placeholder":"请输入用户名","access.authorization.form.password.label":"密码","access.authorization.form.password.placeholder":"请输入密码","access.authorization.form.access_group.placeholder":"请选择分组","access.authorization.form.ssh_group.label":"授权配置组(用于将一个域名证书部署到多个 SSH 主机)","access.authorization.form.ssh_host.label":"服务器 Host","access.authorization.form.ssh_host.placeholder":"请输入 Host","access.authorization.form.ssh_port.label":"SSH 端口","access.authorization.form.ssh_port.placeholder":"请输入 Port","access.authorization.form.ssh_key.label":"Key使用私钥登录","access.authorization.form.ssh_key.placeholder":"请输入 Key","access.authorization.form.ssh_key_file.placeholder":"请选择文件","access.authorization.form.ssh_key.label.passphrase":"私钥密码","access.authorization.form.ssh_key_path.label":"私钥保存路径","access.authorization.form.ssh_key_path.placeholder":"请输入私钥保存路径","access.authorization.form.ssh_cert_path.label":"证书保存路径","access.authorization.form.ssh_cert_path.placeholder":"请输入证书保存路径","access.authorization.form.ssh_pre_command.label":"前置 Command","access.authorization.form.ssh_pre_command.placeholder":"在部署证书前执行的前置命令","access.authorization.form.ssh_command.label":"Command","access.authorization.form.ssh_command.placeholder":"请输入要执行的命令","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"请输入 Webhook URL","access.group.tab":"授权组","access.group.nodata":"暂无部署授权配置,请添加后开始使用吧","access.group.total":"共有 {{total}} 个部署授权配置","access.group.add":"添加授权组","access.group.delete":"删除组","access.group.delete.confirm":"确定要删除部署授权组吗?","access.group.form.name.label":"组名","access.group.form.name.errmsg.empty":"请输入组名","access.group.domains":"所有授权","access.group.domains.nodata":"请添加域名开始部署证书吧。"},RH={"history.page.title":"部署","history.nodata":"你暂未创建任何部署,请先添加域名进行部署吧!","history.props.domain":"域名","history.props.status":"状态","history.props.stage":"阶段","history.props.stage.progress.check":"检查","history.props.stage.progress.apply":"获取","history.props.stage.progress.deploy":"部署","history.props.last_execution_time":"最近执行时间","history.log":"日志"},AH=Object.freeze({...CH,...jH,...EH,...NH,...TH,...PH,...RH}),DH={"common.save":"Save","common.save.succeeded.message":"Save Successful","common.save.failed.message":"Save Failed","common.add":"Add","common.edit":"Edit","common.copy":"Copy","common.download":"Download","common.delete":"Delete","common.delete.succeeded.message":"Delete Successful","common.delete.failed.message":"Delete Failed","common.next":"Next","common.confirm":"Confirm","common.cancel":"Cancel","common.submit":"Submit","common.update":"Update","common.update.succeeded.message":"Update Successful","common.update.failed.message":"Update Failed","common.text.domain":"Domain","common.text.domain.empty":"No Domain","common.text.ip":"IP Address","common.text.ip.empty":"No IP address","common.text.dns":"Domain Name Server","common.text.dns.empty":"No DNS","common.text.ca":"Certificate Authority","common.text.provider":"Provider","common.text.name":"Name","common.text.created_at":"Created At","common.text.updated_at":"Updated At","common.text.operations":"Operations","common.text.nodata":"No data available","common.menu.settings":"Settings","common.menu.logout":"Logout","common.menu.document":"Document","common.pagination.next":"Next","common.pagination.prev":"Previous","common.pagination.more":"More pages","common.theme.light":"Light","common.theme.dark":"Dark","common.theme.system":"System","common.errmsg.string_max":"Please enter no more than {{max}} characters","common.errmsg.email_invalid":"Please enter a valid email address","common.errmsg.email_empty":"Please enter email","common.errmsg.email_duplicate":"Email already exists","common.errmsg.domain_invalid":"Please enter domain","common.errmsg.host_invalid":"Please enter the correct domain name or IP","common.errmsg.ip_invalid":"Please enter IP","common.errmsg.url_invalid":"Please enter a valid URL","common.provider.aliyun":"Alibaba Cloud","common.provider.aliyun.oss":"Alibaba Cloud - OSS","common.provider.aliyun.cdn":"Alibaba Cloud - CDN","common.provider.aliyun.dcdn":"Alibaba Cloud - DCDN","common.provider.tencent":"Tencent","common.provider.tencent.cdn":"Tencent - CDN","common.provider.huaweicloud":"Huawei Cloud","common.provider.qiniu":"Qiniu","common.provider.qiniu.cdn":"Qiniu - CDN","common.provider.cloudflare":"Cloudflare","common.provider.namesilo":"Namesilo","common.provider.godaddy":"GoDaddy","common.provider.local":"Local Deployment","common.provider.ssh":"SSH Deployment","common.provider.webhook":"Webhook","common.provider.dingtalk":"DingTalk","common.provider.telegram":"Telegram"},OH={"login.username.label":"Username","login.username.placeholder":"Username/Email","login.username.errmsg.invalid":"Please enter a valid email address","login.password.label":"Password","login.password.placeholder":"Password","login.password.errmsg.invalid":"Password should be at least 10 characters","login.submit":"Log In"},IH={"dashboard.page.title":"Dashboard","dashboard.statistics.all":"All","dashboard.statistics.near_expired":"About to Expire","dashboard.statistics.enabled":"Enabled","dashboard.statistics.disabled":"Not Enabled","dashboard.statistics.unit":"","dashboard.history":"Deployment History"},MH={"settings.page.title":"Settings","settings.account.relogin.message":"Please login again","settings.account.tab":"Account","settings.account.email.label":"Email","settings.account.email.placeholder":"Please enter email","settings.account.email.errmsg.invalid":"Please enter a valid email address","settings.account.email.changed.message":"Account email altered successfully","settings.account.email.failed.message":"Account email alteration failed","settings.password.tab":"Password","settings.password.current_password.label":"Current Password","settings.password.current_password.placeholder":"Please enter the current password","settings.password.new_password.label":"New Password","settings.password.new_password.placeholder":"Please enter the new password","settings.password.confirm_password.label":"Confirm Password","settings.password.confirm_password.placeholder":"Please enter the new password again","settings.password.password.errmsg.length":"Password should be at least 10 characters","settings.password.password.errmsg.not_matched":"Passwords do not match","settings.password.changed.message":"Password changed successfully","settings.password.failed.message":"Password change failed","settings.notification.tab":"Notification","settings.notification.template.label":"Template","settings.notification.template.saved.message":"Notification template saved successfully","settings.notification.template.variables.tips.title":"Optional variables ({COUNT}: number of expiring soon)","settings.notification.template.variables.tips.content":"Optional variables ({COUNT}: number of expiring soon. {DOMAINS}: Domain list)","settings.notification.config.enable":"Enable","settings.notification.config.saved.message":"Configuration saved successfully","settings.notification.config.failed.message":"Configuration save failed","settings.notification.dingtalk.secret.placeholder":"Signature for signed addition","settings.notification.url.errmsg.invalid":"Invalid Url format","settings.ca.tab":"Certificate Authority","settings.ca.provider.errmsg.empty":"Please select a Certificate Authority","settings.ca.eab_kid.errmsg.empty":"Please enter EAB_KID","settings.ca.eab_hmac_key.errmsg.empty":"Please enter EAB_HMAC_KEY.","settings.ca.eab_kid_hmac_key.errmsg.empty":"Please enter EAB_KID and EAB_HMAC_KEY"},LH={"domain.page.title":"Domain List","domain.nodata":"Please add a domain to start deploying the certificate.","domain.add":"Add Domain","domain.edit":"Edit Domain","domain.delete":"Delete Domain","domain.delete.confirm":"Are you sure you want to delete this domain?","domain.history":"Deployment History","domain.deploy":"Deploy Now","domain.deploy.started.message":"Deploy Started","domain.deploy.started.tips":"Deployment initiated, please check the deployment log later.","domain.deploy.failed.message":"Execution Failed","domain.deploy.failed.tips":"Execution failed, please check the details in <1>Deployment History</1>.","domain.deploy_forced":"Force Deployment","domain.props.expiry":"Validity Period","domain.props.expiry.date1":"Valid for {{date}} days","domain.props.expiry.date2":"Expiry on {{date}}","domain.props.last_execution_status":"Last Execution Status","domain.props.last_execution_stage":"Last Execution Stage","domain.props.last_execution_time":"Last Execution Time","domain.props.enable":"Enable","domain.props.enable.enabled":"Enable","domain.props.enable.disabled":"Disable","domain.application.tab":"Apply Settings","domain.application.form.domain.added.message":"Domain added successfully","domain.application.form.domain.changed.message":"Domain updated successfully","domain.application.form.email.label":"Email","domain.application.form.email.tips":"(A email is required to apply for a certificate)","domain.application.form.email.add":"Add Email","domain.application.form.email.list":"Email List","domain.application.form.email.errmsg.empty":"Please select email","domain.application.form.access.label":"DNS Provider Authorization Configuration","domain.application.form.access.placeholder":"Please select DNS provider authorization configuration","domain.application.form.access.errmsg.empty":"Please select DNS provider authorization configuration","domain.application.form.access.list":"Provider Authorization Configurations","domain.application.form.timeout.label":"Timeout","domain.application.form.timeoue.placeholder":"Timeout (seconds)","domain.application.unsaved.message":"Please save applyment configuration first","domain.deployment.tab":"Deploy Settings","domain.deployment.nodata":"Deployment not added yet","domain.deployment.form.type.label":"Deploy Method","domain.deployment.form.type.placeholder":"Please select deploy method","domain.deployment.form.type.list":"Deploy Method List","domain.deployment.form.access.label":"Access Configuration","domain.deployment.form.access.placeholder":"Please select provider authorization configuration","domain.deployment.form.access.list":"Provider Authorization Configurations","domain.deployment.form.cdn_domain.label":"Deploy to domain","domain.deployment.form.cdn_domain.placeholder":"Please enter CDN domain","domain.deployment.form.oss_endpoint.label":"Endpoint","domain.deployment.form.oss_bucket":"Bucket","domain.deployment.form.oss_bucket.placeholder":"Please enter Bucket","domain.deployment.form.variables.label":"Variable","domain.deployment.form.variables.key":"Name","domain.deployment.form.variables.value":"Value","domain.deployment.form.variables.empty":"Variable not added yet","domain.deployment.form.variables.key.required":"Variable name cannot be empty","domain.deployment.form.variables.value.required":"Variable value cannot be empty","domain.deployment.form.variables.key.placeholder":"Variable name","domain.deployment.form.variables.value.placeholder":"Variable value"},zH={"access.page.title":"Authorization Management","access.authorization.tab":"Authorization","access.authorization.nodata":"Please add authorization to start deploying certificate.","access.authorization.add":"Add Authorization","access.authorization.edit":"Edit Authorization","access.authorization.copy":"Copy Authorization","access.authorization.delete":"Delete Authorization","access.authorization.delete.confirm":"Are you sure you want to delete the deployment authorization?","access.authorization.form.type.label":"Provider","access.authorization.form.type.placeholder":"Please select a provider","access.authorization.form.type.list":"Authorization List","access.authorization.form.name.label":"Name","access.authorization.form.name.placeholder":"Please enter authorization name","access.authorization.form.config.label":"Configuration Type","access.authorization.form.region.label":"Region","access.authorization.form.region.placeholder":"Please enter Region","access.authorization.form.access_key_id.label":"AccessKeyId","access.authorization.form.access_key_id.placeholder":"Please enter AccessKeyId","access.authorization.form.access_key_secret.label":"AccessKeySecret","access.authorization.form.access_key_secret.placeholder":"Please enter AccessKeySecret","access.authorization.form.access_key.label":"AccessKey","access.authorization.form.access_key.placeholder":"Please enter AccessKey","access.authorization.form.secret_id.label":"SecretId","access.authorization.form.secret_id.placeholder":"Please enter SecretId","access.authorization.form.secret_key.label":"SecretKey","access.authorization.form.secret_key.placeholder":"Please enter SecretKey","access.authorization.form.cloud_dns_api_token.label":"CLOUD_DNS_API_TOKEN","access.authorization.form.cloud_dns_api_token.placeholder":"Please enter CLOUD_DNS_API_TOKEN","access.authorization.form.godaddy_api_key.label":"GO_DADDY_API_KEY","access.authorization.form.godaddy_api_key.placeholder":"Please enter GO_DADDY_API_KEY","access.authorization.form.godaddy_api_secret.label":"GO_DADDY_API_SECRET","access.authorization.form.godaddy_api_secret.placeholder":"Please enter GO_DADDY_API_SECRET","access.authorization.form.namesilo_api_key.label":"NAMESILO_API_KEY","access.authorization.form.namesilo_api_key.placeholder":"Please enter NAMESILO_API_KEY","access.authorization.form.username.label":"Username","access.authorization.form.username.placeholder":"Please enter username","access.authorization.form.password.label":"Password","access.authorization.form.password.placeholder":"Please enter password","access.authorization.form.access_group.placeholder":"Please select a group","access.authorization.form.ssh_group.label":"Authorization Configuration Group (used to deploy a single domain certificate to multiple SSH hosts)","access.authorization.form.ssh_host.label":"Server Host","access.authorization.form.ssh_host.placeholder":"Please enter Host","access.authorization.form.ssh_port.label":"SSH Port","access.authorization.form.ssh_port.placeholder":"Please enter Port","access.authorization.form.ssh_key.label":"Key (Log in using private key)","access.authorization.form.ssh_key.placeholder":"Please enter Key","access.authorization.form.ssh_key_file.placeholder":"Please select file","access.authorization.form.ssh_key_path.label":"Private Key Save Path","access.authorization.form.ssh_key_path.placeholder":"Please enter private key save path","access.authorization.form.ssh_cert_path.label":"Certificate Save Path","access.authorization.form.ssh_cert_path.placeholder":"Please enter certificate save path","access.authorization.form.ssh_pre_command.label":"Pre-deployment Command","access.authorization.form.ssh_pre_command.placeholder":"Command to be executed before deploying the certificate","access.authorization.form.ssh_command.label":"Command","access.authorization.form.ssh_command.placeholder":"Please enter command","access.authorization.form.webhook_url.label":"Webhook URL","access.authorization.form.webhook_url.placeholder":"Please enter Webhook URL","access.group.tab":"Authorization Group","access.group.nodata":"No deployment authorization configuration yet, please add after starting use.","access.group.total":"Totally {{total}} deployment authorization configuration","access.group.add":"Add Group","access.group.delete":"Delete Group","access.group.delete.confirm":"Are you sure you want to delete the deployment authorization group?","access.group.form.name.label":"Group Name","access.group.form.name.errmsg.empty":"Please enter group name","access.group.domains":"All Authorizations","access.group.domains.nodata":"Please add a domain to start deploying the certificate."},FH={"history.page.title":"Deployment","history.nodata":"You have not created any deployments yet, please add a domain to start deployment!","history.props.domain":"Domain","history.props.status":"Status","history.props.stage":"Stage","history.props.stage.progress.check":"Check","history.props.stage.progress.apply":"Apply","history.props.stage.progress.deploy":"Deploy","history.props.last_execution_time":"Last Execution Time","history.log":"Log"},$H=Object.freeze({...DH,...OH,...IH,...MH,...LH,...zH,...FH}),UH={zh:{name:"简体中文",translation:AH},en:{name:"English",translation:$H}};vn.use(cP).use(VO).init({resources:UH,fallbackLng:"zh",debug:!0,interpolation:{escapeValue:!1},backend:{loadPath:"/locales/{{lng}}.json"}});yp.createRoot(document.getElementById("root")).render(l.jsx(We.StrictMode,{children:l.jsx(UF,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(yO,{router:VW})})}))});export default VH();