vendor: 5,908 bytes, lines 1-9
1var ON=Object.defineProperty;var zx=e=>{throw TypeError(e)};var MN=(e,t,n)=>t in e?ON(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var et=(e,t,n)=>MN(e,typeof t!="symbol"?t+"":t,n),Ch=(e,t,n)=>t.has(e)||zx("Cannot "+n);var L=(e,t,n)=>(Ch(e,t,"read from private field"),n?n.call(e):t.get(e)),Ne=(e,t,n)=>t.has(e)?zx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),me=(e,t,n,r)=>(Ch(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$e=(e,t,n)=>(Ch(e,t,"access private method"),n);var Kc=(e,t,n,r)=>({set _(i){me(e,t,i,n)},get _(){return L(e,t,r)}});function DN(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Cm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h={exports:{}},ja={},Rh={exports:{}},Fe={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Wx;function LN(){if(Wx)return Fe;Wx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function x(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,b={};function C(j,q,ie){this.props=j,this.context=q,this.refs=b,this.updater=ie||S}C.prototype.isReactComponent={},C.prototype.setState=function(j,q){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,q,"setState")},C.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function E(){}E.prototype=C.prototype;function P(j,q,ie){this.props=j,this.context=q,this.refs=b,this.updater=ie||S}var T=P.prototype=new E;T.constructor=P,_(T,C.prototype),T.isPureReactComponent=!0;var k=Array.isArray,N=Object.prototype.hasOwnProperty,D={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function O(j,q,ie){var Q,ce={},X=null,Z=null;if(q!=null)for(Q in q.ref!==void 0&&(Z=q.ref),q.key!==void 0&&(X=""+q.key),q)N.call(q,Q)&&!B.hasOwnProperty(Q)&&(ce[Q]=q[Q]);var de=arguments.length-2;if(de===1)ce.children=ie;else if(1<de){for(var fe=Array(de),ke=0;ke<de;ke++)fe[ke]=arguments[ke+2];ce.children=fe}if(j&&j.defaultProps)for(Q in de=j.defaultProps,de)ce[Q]===void 0&&(ce[Q]=de[Q]);return{$$typeof:e,type:j,key:X,ref:Z,props:ce,_owner:D.current}}function G(j,q){return{$$typeof:e,type:j.type,key:q,ref:j.ref,props:j.props,_owner:j._owner}}function J(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function se(j){var q={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ie){return q[ie]})}var ue=/\/+/g;function ae(j,q){return typeof j=="object"&&j!==null&&j.key!=null?se(""+j.key):q.toString(36)}function W(j,q,ie,Q,ce){var X=typeof j;(X==="undefined"||X==="boolean")&&(j=null);var Z=!1;if(j===null)Z=!0;else switch(X){case"string":case"number":Z=!0;break;case"object":switch(j.$$typeof){case e:case t:Z=!0}}if(Z)return Z=j,ce=ce(Z),j=Q===""?"."+ae(Z,0):Q,k(ce)?(ie="",j!=null&&(ie=j.replace(ue,"$&/")+"/"),W(ce,q,ie,"",function(ke){return ke})):ce!=null&&(J(ce)&&(ce=G(ce,ie+(!ce.key||Z&&Z.key===ce.key?"":(""+ce.key).replace(ue,"$&/")+"/")+j)),q.push(ce)),1;if(Z=0,Q=Q===""?".":Q+":",k(j))for(var de=0;de<j.length;de++){X=j[de];var fe=Q+ae(X,de);Z+=W(X,q,ie,fe,ce)}else if(fe=x(j),typeof fe=="function")for(j=fe.call(j),de=0;!(X=j.next()).done;)X=X.value,fe=Q+ae(X,de++),Z+=W(X,q,ie,fe,ce);else if(X==="object")throw q=String(j),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Z}function te(j,q,ie){if(j==null)return j;var Q=[],ce=0;return W(j,Q,"","",function(X){return q.call(ie,X,ce++)}),Q}function Y(j){if(j._status===-1){var q=j._result;q=q(),q.then(function(ie){(j._status===0||j._status===-1)&&(j._status=1,j._result=ie)},function(ie){(j._status===0||j._status===-1)&&(j._status=2,j._result=ie)}),j._status===-1&&(j._status=0,j._result=q)}if(j._status===1)return j._result.default;throw j._result}var ee={current:null},V={transition:null},H={ReactCurrentDispatcher:ee,ReactCurrentBatchConfig:V,ReactCurrentOwner:D};function $(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 5,640 bytes, lines 9-25
9return Fe.Children={map:te,forEach:function(j,q,ie){te(j,function(){q.apply(this,arguments)},ie)},count:function(j){var q=0;return te(j,function(){q++}),q},toArray:function(j){return te(j,function(q){return q})||[]},only:function(j){if(!J(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Fe.Component=C,Fe.Fragment=n,Fe.Profiler=i,Fe.PureComponent=P,Fe.StrictMode=r,Fe.Suspense=d,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,Fe.act=$,Fe.cloneElement=function(j,q,ie){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var Q=_({},j.props),ce=j.key,X=j.ref,Z=j._owner;if(q!=null){if(q.ref!==void 0&&(X=q.ref,Z=D.current),q.key!==void 0&&(ce=""+q.key),j.type&&j.type.defaultProps)var de=j.type.defaultProps;for(fe in q)N.call(q,fe)&&!B.hasOwnProperty(fe)&&(Q[fe]=q[fe]===void 0&&de!==void 0?de[fe]:q[fe])}var fe=arguments.length-2;if(fe===1)Q.children=ie;else if(1<fe){de=Array(fe);for(var ke=0;ke<fe;ke++)de[ke]=arguments[ke+2];Q.children=de}return{$$typeof:e,type:j.type,key:ce,ref:X,props:Q,_owner:Z}},Fe.createContext=function(j){return j={$$typeof:l,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:a,_context:j},j.Consumer=j},Fe.createElement=O,Fe.createFactory=function(j){var q=O.bind(null,j);return q.type=j,q},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(j){return{$$typeof:u,render:j}},Fe.isValidElement=J,Fe.lazy=function(j){return{$$typeof:m,_payload:{_status:-1,_result:j},_init:Y}},Fe.memo=function(j,q){return{$$typeof:h,type:j,compare:q===void 0?null:q}},Fe.startTransition=function(j){var q=V.transition;V.transition={};try{j()}finally{V.transition=q}},Fe.unstable_act=$,Fe.useCallback=function(j,q){return ee.current.useCallback(j,q)},Fe.useContext=function(j){return ee.current.useContext(j)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(j){return ee.current.useDeferredValue(j)},Fe.useEffect=function(j,q){return ee.current.useEffect(j,q)},Fe.useId=function(){return ee.current.useId()},Fe.useImperativeHandle=function(j,q,ie){return ee.current.useImperativeHandle(j,q,ie)},Fe.useInsertionEffect=function(j,q){return ee.current.useInsertionEffect(j,q)},Fe.useLayoutEffect=function(j,q){return ee.current.useLayoutEffect(j,q)},Fe.useMemo=function(j,q){return ee.current.useMemo(j,q)},Fe.useReducer=function(j,q,ie){return ee.current.useReducer(j,q,ie)},Fe.useRef=function(j){return ee.current.useRef(j)},Fe.useState=function(j){return ee.current.useState(j)},Fe.useSyncExternalStore=function(j,q,ie){return ee.current.useSyncExternalStore(j,q,ie)},Fe.useTransition=function(){return ee.current.useTransition()},Fe.version="18.3.1",Fe}var Hx;function td(){return Hx||(Hx=1,Rh.exports=LN()),Rh.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var qx;function IN(){if(qx)return ja;qx=1;var e=td(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,d,h){var m,g={},x=null,S=null;h!==void 0&&(x=""+h),d.key!==void 0&&(x=""+d.key),d.ref!==void 0&&(S=d.ref);for(m in d)r.call(d,m)&&!a.hasOwnProperty(m)&&(g[m]=d[m]);if(u&&u.defaultProps)for(m in d=u.defaultProps,d)g[m]===void 0&&(g[m]=d[m]);return{$$typeof:t,type:u,key:x,ref:S,props:g,_owner:i.current}}return ja.Fragment=n,ja.jsx=l,ja.jsxs=l,ja}var Kx;function FN(){return Kx||(Kx=1,_h.exports=IN()),_h.exports}var p=FN(),v=td();const os=Cm(v),nd=DN({__proto__:null,default:os},[v]);var Gc={},Ph={exports:{}},tn={},Th={exports:{}},kh={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var Gx;function BN(){return Gx||(Gx=1,(function(e){function t(V,H){var $=V.length;V.push(H);e:for(;0<$;){var j=$-1>>>1,q=V[j];if(0<i(q,H))V[j]=H,V[$]=q,$=j;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var H=V[0],$=V.pop();if($!==H){V[0]=$;e:for(var j=0,q=V.length,ie=q>>>1;j<ie;){var Q=2*(j+1)-1,ce=V[Q],X=Q+1,Z=V[X];if(0>i(ce,$))X<q&&0>i(Z,ce)?(V[j]=Z,V[X]=$,j=X):(V[j]=ce,V[Q]=$,j=Q);else if(X<q&&0>i(Z,$))V[j]=Z,V[X]=$,j=X;else break e}}return H}function i(V,H){var $=V.sortIndex-H.sortIndex;return $!==0?$:V.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],m=1,g=null,x=3,S=!1,_=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(V){for(var H=n(h);H!==null;){if(H.callback===null)r(h);else if(H.startTime<=V)r(h),H.sortIndex=H.expirationTime,t(d,H);else break;H=n(h)}}function k(V){if(b=!1,T(V),!_)if(n(d)!==null)_=!0,Y(N);else{var H=n(h);H!==null&&ee(k,H.startTime-V)}}function N(V,H){_=!1,b&&(b=!1,E(O),O=-1),S=!0;var $=x;try{for(T(H),g=n(d);g!==null&&(!(g.expirationTime>
vendor: 51,944 bytes, lines 25-38
25H)||V&&!se());){var j=g.callback;if(typeof j=="function"){g.callback=null,x=g.priorityLevel;var q=j(g.expirationTime<=H);H=e.unstable_now(),typeof q=="function"?g.callback=q:g===n(d)&&r(d),T(H)}else r(d);g=n(d)}if(g!==null)var ie=!0;else{var Q=n(h);Q!==null&&ee(k,Q.startTime-H),ie=!1}return ie}finally{g=null,x=$,S=!1}}var D=!1,B=null,O=-1,G=5,J=-1;function se(){return!(e.unstable_now()-J<G)}function ue(){if(B!==null){var V=e.unstable_now();J=V;var H=!0;try{H=B(!0,V)}finally{H?ae():(D=!1,B=null)}}else D=!1}var ae;if(typeof P=="function")ae=function(){P(ue)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,te=W.port2;W.port1.onmessage=ue,ae=function(){te.postMessage(null)}}else ae=function(){C(ue,0)};function Y(V){B=V,D||(D=!0,ae())}function ee(V,H){O=C(function(){V(e.unstable_now())},H)}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(V){V.callback=null},e.unstable_continueExecution=function(){_||S||(_=!0,Y(N))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(V){switch(x){case 1:case 2:case 3:var H=3;break;default:H=x}var $=x;x=H;try{return V()}finally{x=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,H){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var $=x;x=V;try{return H()}finally{x=$}},e.unstable_scheduleCallback=function(V,H,$){var j=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?j+$:j):$=j,V){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,V={id:m++,callback:H,priorityLevel:V,startTime:$,expirationTime:q,sortIndex:-1},$>j?(V.sortIndex=$,t(h,V),n(d)===null&&V===n(h)&&(b?(E(O),O=-1):b=!0,ee(k,$-j))):(V.sortIndex=q,t(d,V),_||S||(_=!0,Y(N))),V},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(V){var H=x;return function(){var $=x;x=H;try{return V.apply(this,arguments)}finally{x=$}}}})(kh)),kh}var Qx;function $N(){return Qx||(Qx=1,Th.exports=BN()),Th.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var Yx;function VN(){if(Yx)return tn;Yx=1;var e=td(),t=$N();function n(s){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+s,c=1;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+s+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(s,o){l(s,o),l(s+"Capture",o)}function l(s,o){for(i[s]=o,s=0;s<o.length;s++)r.add(o[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},g={};function x(s){return d.call(g,s)?!0:d.call(m,s)?!1:h.test(s)?g[s]=!0:(m[s]=!0,!1)}function S(s,o,c,f){if(c!==null&&c.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:c!==null?!c.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function _(s,o,c,f){if(o===null||typeof o>"u"||S(s,o,c,f))return!0;if(f)return!1;if(c!==null)switch(c.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function b(s,o,c,f,y,w,R){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=c,this.propertyName=s,this.type=o,this.sanitizeURL=w,this.removeEmptyString=R}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){C[s]=new b(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var o=s[0];C[o]=new b(o,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){C[s]=new b(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){C[s]=new b(s,2,!1,s,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(s){C[s]=new b(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){C[s]=new b(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){C[s]=new b(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){C[s]=new b(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){C[s]=new b(s,5,!1,s.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function P(s){return s[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(s){var o=s.replace(E,P);C[o]=new b(o,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var o=s.replace(E,P);C[o]=new b(o,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var o=s.replace(E,P);C[o]=new b(o,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){C[s]=new b(s,1,!1,s.toLowerCase(),null,!1,!1)}),C.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){C[s]=new b(s,1,!1,s.toLowerCase(),null,!0,!0)});function T(s,o,c,f){var y=C.hasOwnProperty(o)?C[o]:null;(y!==null?y.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,c,y,f)&&(c=null),f||y===null?x(o)&&(c===null?s.removeAttribute(o):s.setAttribute(o,""+c)):y.mustUseProperty?s[y.propertyName]=c===null?y.type===3?!1:"":c:(o=y.attributeName,f=y.attributeNamespace,c===null?s.removeAttribute(o):(y=y.type,c=y===3||y===4&&c===!0?"":""+c,f?s.setAttributeNS(f,o,c):s.setAttribute(o,c))))}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),D=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),se=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ee=Symbol.for("react.offscreen"),V=Symbol.iterator;function H(s){return s===null||typeof s!="object"?null:(s=V&&s[V]||s["@@iterator"],typeof s=="function"?s:null)}var $=Object.assign,j;function q(s){if(j===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);j=o&&o[1]||""}return` 34`+j+s}var ie=!1;function Q(s,o){if(!s||ie)return"";ie=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(K){var f=K}Reflect.construct(s,[],o)}else{try{o.call()}catch(K){f=K}s.call(o.prototype)}else{try{throw Error()}catch(K){f=K}s()}}catch(K){if(K&&f&&typeof K.stack=="string"){for(var y=K.stack.split(` 35`),w=f.stack.split(` 36`),R=y.length-1,A=w.length-1;1<=R&&0<=A&&y[R]!==w[A];)A--;for(;1<=R&&0<=A;R--,A--)if(y[R]!==w[A]){if(R!==1||A!==1)do if(R--,A--,0>A||y[R]!==w[A]){var M=` 37`+y[R].replace(" at new "," at ");return s.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",s.displayName)),M}while(1<=R&&0<=A);break}}}finally{ie=!1,Error.prepareStackTrace=c}return(s=s?s.displayName||s.name:"")?q(s):""}function ce(s){switch(s.tag){case 5:return q(s.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return s=Q(s.type,!1),s;case 11:return s=Q(s.type.render,!1),s;case 1:return s=Q(s.type,!0),s;default:return""}}function X(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case B:return"Fragment";case D:return"Portal";case G:return"Profiler";case O:return"StrictMode";case ae:return"Suspense";case W:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case se:return(s.displayName||"Context")+".Consumer";case J:return(s._context.displayName||"Context")+".Provider";case ue:var o=s.render;return s=s.displayName,s||(s=o.displayName||o.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case te:return o=s.displayName||null,o!==null?o:X(s.type)||"Memo";case Y:o=s._payload,s=s._init;try{return X(s(o))}catch{}}return null}function Z(s){var o=s.type;switch(s.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=o.render,s=s.displayName||s.name||"",o.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(o);case 8:return o===O?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function de(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function fe(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ke(s){var o=fe(s)?"checked":"value",c=Object.getOwnPropertyDescriptor(s.constructor.prototype,o),f=""+s[o];if(!s.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,w=c.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return y.call(this)},set:function(R){f=""+R,w.call(this,R)}}),Object.defineProperty(s,o,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(R){f=""+R},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function Me(s){s._valueTracker||(s._valueTracker=ke(s))}function Ae(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var c=o.getValue(),f="";return s&&(f=fe(s)?s.checked?"true":"false":s.value),s=f,s!==c?(o.setValue(s),!0):!1}function Xe(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function ge(s,o){var c=o.checked;return $({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??s._wrapperState.initialChecked})}function Ce(s,o){var c=o.defaultValue==null?"":o.defaultValue,f=o.checked!=null?o.checked:o.defaultChecked;c=de(o.value!=null?o.value:c),s._wrapperState={initialChecked:f,initialValue:c,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function ye(s,o){o=o.checked,o!=null&&T(s,"checked",o,!1)}function Be(s,o){ye(s,o);var c=de(o.value),f=o.type;if(c!=null)f==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+c):s.value!==""+c&&(s.value=""+c);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}o.hasOwnProperty("value")?Le(s,o.type,c):o.hasOwnProperty("defaultValue")&&Le(s,o.type,de(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(s.defaultChecked=!!o.defaultChecked)}function Je(s,o,c){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var f=o.type;if(!(f!=="submit"&&f!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+s._wrapperState.initialValue,c||o===s.value||(s.value=o),s.defaultValue=o}c=s.name,c!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,c!==""&&(s.name=c)}function Le(s,o,c){(o!=="number"||Xe(s.ownerDocument)!==s)&&(c==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+c&&(s.defaultValue=""+c))}var lt=Array.isArray;function on(s,o,c,f){if(s=s.options,o){o={};for(var y=0;y<c.length;y++)o["$"+c[y]]=!0;for(c=0;c<s.length;c++)y=o.hasOwnProperty("$"+s[c].value),s[c].selected!==y&&(s[c].selected=y),y&&f&&(s[c].defaultSelected=!0)}else{for(c=""+de(c),o=null,y=0;y<s.length;y++){if(s[y].value===c){s[y].selected=!0,f&&(s[y].defaultSelected=!0);return}o!==null||s[y].disabled||(o=s[y])}o!==null&&(o.selected=!0)}}function ft(s,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return $({},o,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Xn(s,o){var c=o.value;if(c==null){if(c=o.children,o=o.defaultValue,c!=null){if(o!=null)throw Error(n(92));if(lt(c)){if(1<c.length)throw Error(n(93));c=c[0]}o=c}o==null&&(o=""),c=o}s._wrapperState={initialValue:de(c)}}function gn(s,o){var c=de(o.value),f=de(o.defaultValue);c!=null&&(c=""+c,c!==s.value&&(s.value=c),o.defaultValue==null&&s.defaultValue!==c&&(s.defaultValue=c)),f!=null&&(s.defaultValue=""+f)}function Nn(s){var o=s.textContent;o===s._wrapperState.initialValue&&o!==""&&o!==null&&(s.value=o)}function An(s){switch(s){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 jn(s,o){return s==null||s==="http://www.w3.org/1999/xhtml"?An(o):s==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Ds,Qi=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,c,f,y){MSApp.execUnsafeLocalFunction(function(){return s(o,c,f,y)})}:s})(function(s,o){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=o;else{for(Ds=Ds||document.createElement("div"),Ds.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ds.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;o.firstChild;)s.appendChild(o.firstChild)}});function Ls(s,o){if(o){var c=s.firstChild;if(c&&c===s.lastChild&&c.nodeType===3){c.nodeValue=o;return}}s.textContent=o}var Is={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},Od=["Webkit","ms","Moz","O"];Object.keys(Is).forEach(function(s){Od.forEach(function(o){o=o+s.charAt(0).toUpperCase()+s.substring(1),Is[o]=Is[s]})});function Jn(s,o,c){return o==null||typeof o=="boolean"||o===""?"":c||typeof o!="number"||o===0||Is.hasOwnProperty(s)&&Is[s]?(""+o).trim():o+"px"}function Oo(s,o){s=s.style;for(var c in o)if(o.hasOwnProperty(c)){var f=c.indexOf("--")===0,y=Jn(c,o[c],f);c==="float"&&(c="cssFloat"),f?s.setProperty(c,y):s[c]=y}}var Md=$({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 Dd(s,o){if(o){if(Md[s]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ld(s,o){if(s.indexOf("-")===-1)return typeof o.is=="string";switch(s){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 Id=null;function Fd(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Bd=null,Mo=null,Do=null;function iy(s){if(s=ya(s)){if(typeof Bd!="function")throw Error(n(280));var o=s.stateNode;o&&(o=lc(o),Bd(s.stateNode,s.type,o))}}function ay(s){Mo?Do?Do.push(s):Do=[s]:Mo=s}function ly(){if(Mo){var s=Mo,o=Do;if(Do=Mo=null,iy(s),o)for(s=0;s<o.length;s++)iy(o[s])}}function cy(s,o){return s(o)}function uy(){}var $d=!1;function dy(s,o,c){if($d)return s(o,c);$d=!0;try{return cy(s,o,c)}finally{$d=!1,(Mo!==null||Do!==null)&&(uy(),ly())}}function Yi(s,o){var c=s.stateNode;if(c===null)return null;var f=lc(c);if(f===null)return null;c=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Vd=!1;if(u)try{var Xi={};Object.defineProperty(Xi,"passive",{get:function(){Vd=!0}}),window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{Vd=!1}function BT(s,o,c,f,y,w,R,A,M){var K=Array.prototype.slice.call(arguments,3);try{o.apply(c,K)}catch(re){this.onError(re)}}var Ji=!1,$l=null,Vl=!1,Ud=null,$T={onError:function(s){Ji=!0,$l=s}};function VT(s,o,c,f,y,w,R,A,M){Ji=!1,$l=null,BT.apply($T,arguments)}function UT(s,o,c,f,y,w,R,A,M){if(VT.apply(this,arguments),Ji){if(Ji){var K=$l;Ji=!1,$l=null}else throw Error(n(198));Vl||(Vl=!0,Ud=K)}}function Fs(s){var o=s,c=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do o=s,(o.flags&4098)!==0&&(c=o.return),s=o.return;while(s)}return o.tag===3?c:null}function fy(s){if(s.tag===13){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function hy(s){if(Fs(s)!==s)throw Error(n(188))}function zT(s){var o=s.alternate;if(!o){if(o=Fs(s),o===null)throw Error(n(188));return o!==s?null:s}for(var c=s,f=o;;){var y=c.return;if(y===null)break;var w=y.alternate;if(w===null){if(f=y.return,f!==null){c=f;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===c)return hy(y),s;if(w===f)return hy(y),o;w=w.sibling}throw Error(n(188))}if(c.return!==f.return)c=y,f=w;else{for(var R=!1,A=y.child;A;){if(A===c){R=!0,c=y,f=w;break}if(A===f){R=!0,f=y,c=w;break}A=A.sibling}if(!R){for(A=w.child;A;){if(A===c){R=!0,c=w,f=y;break}if(A===f){R=!0,f=w,c=y;break}A=A.sibling}if(!R)throw Error(n(189))}}if(c.alternate!==f)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?s:o}function py(s){return s=zT(s),s!==null?my(s):null}function my(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var o=my(s);if(o!==null)return o;s=s.sibling}return null}var gy=t.unstable_scheduleCallback,yy=t.unstable_cancelCallback,WT=t.unstable_shouldYield,HT=t.unstable_requestPaint,ht=t.unstable_now,qT=t.unstable_getCurrentPriorityLevel,zd=t.unstable_ImmediatePriority,vy=t.unstable_UserBlockingPriority,Ul=t.unstable_NormalPriority,KT=t.unstable_LowPriority,xy=t.unstable_IdlePriority,zl=null,Zn=null;function GT(s){if(Zn&&typeof Zn.onCommitFiberRoot=="function")try{Zn.onCommitFiberRoot(zl,s,void 0,(s.current.flags&128)===128)}catch{}}var On=Math.clz32?Math.clz32:XT,QT=Math.log,YT=Math.LN2;function XT(s){return s>>>=0,s===0?32:31-(QT(s)/YT|0)|0}var Wl=64,Hl=4194304;function Zi(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function ql(s,o){var c=s.pendingLanes;if(c===0)return 0;var f=0,y=s.suspendedLanes,w=s.pingedLanes,R=c&268435455;if(R!==0){var A=R&~y;A!==0?f=Zi(A):(w&=R,w!==0&&(f=Zi(w)))}else R=c&~y,R!==0?f=Zi(R):w!==0&&(f=Zi(w));if(f===0)return 0;if(o!==0&&o!==f&&(o&y)===0&&(y=f&-f,w=o&-o,y>=w||y===16&&(w&4194240)!==0))return o;if((f&4)!==0&&(f|=c&16),o=s.entangledLanes,o!==0)for(s=s.entanglements,o&=f;0<o;)c=31-On(o),y=1<<c,f|=s[c],o&=~y;return f}function JT(s,o){switch(s){case 1:case 2:case 4:return o+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 o+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 ZT(s,o){for(var c=s.suspendedLanes,f=s.pingedLanes,y=s.expirationTimes,w=s.pendingLanes;0<w;){var R=31-On(w),A=1<<R,M=y[R];M===-1?((A&c)===0||(A&f)!==0)&&(y[R]=JT(A,o)):M<=o&&(s.expiredLanes|=A),w&=~A}}function Wd(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function wy(){var s=Wl;return Wl<<=1,(Wl&4194240)===0&&(Wl=64),s}function Hd(s){for(var o=[],c=0;31>c;c++)o.push(s);return o}function ea(s,o,c){s.pendingLanes|=o,o!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,o=31-On(o),s[o]=c}function ek(s,o){var c=s.pendingLanes&~o;s.pendingLanes=o,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=o,s.mutableReadLanes&=o,s.entangledLanes&=o,o=s.entanglements;var f=s.eventTimes;for(s=s.expirationTimes;0<c;){var y=31-On(c),w=1<<y;o[y]=0,f[y]=-1,s[y]=-1,c&=~w}}function qd(s,o){var c=s.entangledLanes|=o;for(s=s.entanglements;c;){var f=31-On(c),y=1<<f;y&o|s[f]&o&&(s[f]|=o),c&=~y}}var Qe=0;function by(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Sy,Kd,Ey,Cy,_y,Gd=!1,Kl=[],Fr=null,Br=null,$r=null,ta=new Map,na=new Map,Vr=[],tk="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 Ry(s,o){switch(s){case"focusin":case"focusout":Fr=null;break;case"dragenter":case"dragleave":Br=null;break;case"mouseover":case"mouseout":$r=null;break;case"pointerover":case"pointerout":ta.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":na.delete(o.pointerId)}}function ra(s,o,c,f,y,w){return s===null||s.nativeEvent!==w?(s={blockedOn:o,domEventName:c,eventSystemFlags:f,nativeEvent:w,targetContainers:[y]},o!==null&&(o=ya(o),o!==null&&Kd(o)),s):(s.eventSystemFlags|=f,o=s.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),s)}function nk(s,o,c,f,y){switch(o){case"focusin":return Fr=ra(Fr,s,o,c,f,y),!0;case"dragenter":return Br=ra(Br,s,o,c,f,y),!0;case"mouseover":return $r=ra($r,s,o,c,f,y),!0;case"pointerover":var w=y.pointerId;return ta.set(w,ra(ta.get(w)||null,s,o,c,f,y)),!0;case"gotpointercapture":return w=y.pointerId,na.set(w,ra(na.get(w)||null,s,o,c,f,y)),!0}return!1}function Py(s){var o=Bs(s.target);if(o!==null){var c=Fs(o);if(c!==null){if(o=c.tag,o===13){if(o=fy(c),o!==null){s.blockedOn=o,_y(s.priority,function(){Ey(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){s.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Gl(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var c=Yd(s.domEventName,s.eventSystemFlags,o[0],s.nativeEvent);if(c===null){c=s.nativeEvent;var f=new c.constructor(c.type,c);Id=f,c.target.dispatchEvent(f),Id=null}else return o=ya(c),o!==null&&Kd(o),s.blockedOn=c,!1;o.shift()}return!0}function Ty(s,o,c){Gl(s)&&c.delete(o)}function rk(){Gd=!1,Fr!==null&&Gl(Fr)&&(Fr=null),Br!==null&&Gl(Br)&&(Br=null),$r!==null&&Gl($r)&&($r=null),ta.forEach(Ty),na.forEach(Ty)}function sa(s,o){s.blockedOn===o&&(s.blockedOn=null,Gd||(Gd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,rk)))}function oa(s){function o(y){return sa(y,s)}if(0<Kl.length){sa(Kl[0],s);for(var c=1;c<Kl.length;c++){var f=Kl[c];f.blockedOn===s&&(f.blockedOn=null)}}for(Fr!==null&&sa(Fr,s),Br!==null&&sa(Br,s),$r!==null&&sa($r,s),ta.forEach(o),na.forEach(o),c=0;c<Vr.length;c++)f=Vr[c],f.blockedOn===s&&(f.blockedOn=null);for(;0<Vr.length&&(c=Vr[0],c.blockedOn===null);)Py(c),c.blockedOn===null&&Vr.shift()}var Lo=k.ReactCurrentBatchConfig,Ql=!0;function sk(s,o,c,f){var y=Qe,w=Lo.transition;Lo.transition=null;try{Qe=1,Qd(s,o,c,f)}finally{Qe=y,Lo.transition=w}}function ok(s,o,c,f){var y=Qe,w=Lo.transition;Lo.transition=null;try{Qe=4,Qd(s,o,c,f)}finally{Qe=y,Lo.transition=w}}function Qd(s,o,c,f){if(Ql){var y=Yd(s,o,c,f);if(y===null)pf(s,o,f,Yl,c),Ry(s,f);else if(nk(y,s,o,c,f))f.stopPropagation();else if(Ry(s,f),o&4&&-1<tk.indexOf(s)){for(;y!==null;){var w=ya(y);if(w!==null&&Sy(w),w=Yd(s,o,c,f),w===null&&pf(s,o,f,Yl,c),w===y)break;y=w}y!==null&&f.stopPropagation()}else pf(s,o,f,null,c)}}var Yl=null;function Yd(s,o,c,f){if(Yl=null,s=Fd(f),s=Bs(s),s!==null)if(o=Fs(s),o===null)s=null;else if(c=o.tag,c===13){if(s=fy(o),s!==null)return s;s=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null);return Yl=s,null}function ky(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qT()){case zd:return 1;case vy:return 4;case Ul:case KT:return 16;case xy:return 536870912;default:return 16}default:return 16}}var Ur=null,Xd=null,Xl=null;function Ny(){if(Xl)return Xl;var s,o=Xd,c=o.length,f,y="value"in Ur?Ur.value:Ur.textContent,w=y.length;for(s=0;s<c&&o[s]===y[s];s++);var R=c-s;for(f=1;f<=R&&o[c-f]===y[w-f];f++);return Xl=y.slice(s,1<f?1-f:void 0)}function Jl(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function Zl(){return!0}function Ay(){return!1}function an(s){function o(c,f,y,w,R){this._reactName=c,this._targetInst=y,this.type=f,this.nativeEvent=w,this.target=R,this.currentTarget=null;for(var A in s)s.hasOwnProperty(A)&&(c=s[A],this[A]=c?c(w):w[A]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Zl:Ay,this.isPropagationStopped=Ay,this}return $(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Zl)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),o}var Io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jd=an(Io),ia=$({},Io,{view:0,detail:0}),ik=an(ia),Zd,ef,aa,ec=$({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nf,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==aa&&(aa&&s.type==="mousemove"?(Zd=s.screenX-aa.screenX,ef=s.screenY-aa.screenY):ef=Zd=0,aa=s),Zd)},movementY:function(s){return"movementY"in s?s.movementY:ef}}),jy=an(ec),ak=$({},ec,{dataTransfer:0}),lk=an(ak),ck=$({},ia,{relatedTarget:0}),tf=an(ck),uk=$({},Io,{animationName:0,elapsedTime:0,pseudoElement:0}),dk=an(uk),fk=$({},Io,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),hk=an(fk),pk=$({},Io,{data:0}),Oy=an(pk),mk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gk={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"},yk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vk(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=yk[s])?!!o[s]:!1}function nf(){return vk}var xk=$({},ia,{key:function(s){if(s.key){var o=mk[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=Jl(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?gk[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nf,charCode:function(s){return s.type==="keypress"?Jl(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Jl(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),wk=an(xk),bk=$({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),My=an(bk),Sk=$({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nf}),Ek=an(Sk),Ck=$({},Io,{propertyName:0,elapsedTime:0,pseudoElement:0}),_k=an(Ck),Rk=$({},ec,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Pk=an(Rk),Tk=[9,13,27,32],rf=u&&"CompositionEvent"in window,la=null;u&&"documentMode"in document&&(la=document.documentMode);var kk=u&&"TextEvent"in window&&!la,Dy=u&&(!rf||la&&8<la&&11>=la),Ly=" ",Iy=!1;function Fy(s,o){switch(s){case"keyup":return Tk.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function By(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Fo=!1;function Nk(s,o){switch(s){case"compositionend":return By(o);case"keypress":return o.which!==32?null:(Iy=!0,Ly);case"textInput":return s=o.data,s===Ly&&Iy?null:s;default:return null}}function Ak(s,o){if(Fo)return s==="compositionend"||!rf&&Fy(s,o)?(s=Ny(),Xl=Xd=Ur=null,Fo=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Dy&&o.locale!=="ko"?null:o.data;default:return null}}var jk={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 $y(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!jk[s.type]:o==="textarea"}function Vy(s,o,c,f){ay(f),o=oc(o,"onChange"),0<o.length&&(c=new Jd("onChange","change",null,c,f),s.push({event:c,listeners:o}))}var ca=null,ua=null;function Ok(s){ov(s,0)}function tc(s){var o=zo(s);if(Ae(o))return s}function Mk(s,o){if(s==="change")return o}var Uy=!1;if(u){var sf;if(u){var of="oninput"in document;if(!of){var zy=document.createElement("div");zy.setAttribute("oninput","return;"),of=typeof zy.oninput=="function"}sf=of}else sf=!1;Uy=sf&&(!document.documentMode||9<document.documentMode)}function Wy(){ca&&(ca.detachEvent("onpropertychange",Hy),ua=ca=null)}function Hy(s){if(s.propertyName==="value"&&tc(ua)){var o=[];Vy(o,ua,s,Fd(s)),dy(Ok,o)}}function Dk(s,o,c){s==="focusin"?(Wy(),ca=o,ua=c,ca.attachEvent("onpropertychange",Hy)):s==="focusout"&&Wy()}function Lk(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return tc(ua)}function Ik(s,o){if(s==="click")return tc(o)}function Fk(s,o){if(s==="input"||s==="change")return tc(o)}function Bk(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var Mn=typeof Object.is=="function"?Object.is:Bk;function da(s,o){if(Mn(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var c=Object.keys(s),f=Object.keys(o);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var y=c[f];if(!d.call(o,y)||!Mn(s[y],o[y]))return!1}return!0}function qy(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ky(s,o){var c=qy(s);s=0;for(var f;c;){if(c.nodeType===3){if(f=s+c.textContent.length,s<=o&&f>=o)return{node:c,offset:o-s};s=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=qy(c)}}function Gy(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?Gy(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function Qy(){for(var s=window,o=Xe();o instanceof s.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)s=o.contentWindow;else break;o=Xe(s.document)}return o}function af(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}function $k(s){var o=Qy(),c=s.focusedElem,f=s.selectionRange;if(o!==c&&c&&c.ownerDocument&&Gy(c.ownerDocument.documentElement,c)){if(f!==null&&af(c)){if(o=f.start,s=f.end,s===void 0&&(s=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(s,c.value.length);else if(s=(o=c.ownerDocument||document)&&o.defaultView||window,s.getSelection){s=s.getSelection();var y=c.textContent.length,w=Math.min(f.start,y);f=f.end===void 0?w:Math.min(f.end,y),!s.extend&&w>f&&(y=f,f=w,w=y),y=Ky(c,w);var R=Ky(c,f);y&&R&&(s.rangeCount!==1||s.anchorNode!==y.node||s.anchorOffset!==y.offset||s.focusNode!==R.node||s.focusOffset!==R.offset)&&(o=o.createRange(),o.setStart(y.node,y.offset),s.removeAllRanges(),w>f?(s.addRange(o),s.extend(R.node,R.offset)):(o.setEnd(R.node,R.offset),s.addRange(o)))}}for(o=[],s=c;s=s.parentNode;)s.nodeType===1&&o.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<o.length;c++)s=o[c],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Vk=u&&"documentMode"in document&&11>=document.documentMode,Bo=null,lf=null,fa=null,cf=!1;function Yy(s,o,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;cf||Bo==null||Bo!==Xe(f)||(f=Bo,"selectionStart"in f&&af(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),fa&&da(fa,f)||(fa=f,f=oc(lf,"onSelect"),0<f.length&&(o=new Jd("onSelect","select",null,o,c),s.push({event:o,listeners:f}),o.target=Bo)))}function nc(s,o){var c={};return c[s.toLowerCase()]=o.toLowerCase(),c["Webkit"+s]="webkit"+o,c["Moz"+s]="moz"+o,c}var $o={animationend:nc("Animation","AnimationEnd"),animationiteration:nc("Animation","AnimationIteration"),animationstart:nc("Animation","AnimationStart"),transitionend:nc("Transition","TransitionEnd")},uf={},Xy={};u&&(Xy=document.createElement("div").style,"AnimationEvent"in window||(delete $o.animationend.animation,delete $o.animationiteration.animation,delete $o.animationstart.animation),"TransitionEvent"in window||delete $o.transitionend.transition);function rc(s){if(uf[s])return uf[s];if(!$o[s])return s;var o=$o[s],c;for(c in o)if(o.hasOwnProperty(c)&&c in Xy)return uf[s]=o[c];return s}var Jy=rc("animationend"),Zy=rc("animationiteration"),ev=rc("animationstart"),tv=rc("transitionend"),nv=new Map,rv="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 zr(s,o){nv.set(s,o),a(o,[s])}for(var df=0;df<rv.length;df++){var ff=rv[df],Uk=ff.toLowerCase(),zk=ff[0].toUpperCase()+ff.slice(1);zr(Uk,"on"+zk)}zr(Jy,"onAnimationEnd"),zr(Zy,"onAnimationIteration"),zr(ev,"onAnimationStart"),zr("dblclick","onDoubleClick"),zr("focusin","onFocus"),zr("focusout","onBlur"),zr(tv,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ha="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(" "),Wk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ha));function sv(s,o,c){var f=s.type||"unknown-event";s.currentTarget=c,UT(f,o,void 0,s),s.currentTarget=null}function ov(s,o){o=(o&4)!==0;for(var c=0;c<s.length;c++){var f=s[c],y=f.event;f=f.listeners;e:{var w=void 0;if(o)for(var R=f.length-1;0<=R;R--){var A=f[R],M=A.instance,K=A.currentTarget;if(A=A.listener,M!==w&&y.isPropagationStopped())break e;sv(y,A,K),w=M}else for(R=0;R<f.length;R++){if(A=f[R],M=A.instance,K=A.currentTarget,A=A.listener,M!==w&&y.isPropagationStopped())break e;sv(y,A,K),w=M}}}if(Vl)throw s=Ud,Vl=!1,Ud=null,s}function tt(s,o){var c=o[wf];c===void 0&&(c=o[wf]=new Set);var f=s+"__bubble";c.has(f)||(iv(o,s,2,!1),c.add(f))}function hf(s,o,c){var f=0;o&&(f|=4),iv(c,s,f,o)}var sc="_reactListening"+Math.random().toString(36).slice(2);function pa(s){if(!s[sc]){s[sc]=!0,r.forEach(function(c){c!=="selectionchange"&&(Wk.has(c)||hf(c,!1,s),hf(c,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[sc]||(o[sc]=!0,hf("selectionchange",!1,o))}}function iv(s,o,c,f){switch(ky(o)){case 1:var y=sk;break;case 4:y=ok;break;default:y=Qd}c=y.bind(null,o,c,s),y=void 0,!Vd||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),f?y!==void 0?s.addEventListener(o,c,{capture:!0,passive:y}):s.addEventListener(o,c,!0):y!==void 0?s.addEventListener(o,c,{passive:y}):s.addEventListener(o,c,!1)}function pf(s,o,c,f,y){var w=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var R=f.tag;if(R===3||R===4){var A=f.stateNode.containerInfo;if(A===y||A.nodeType===8&&A.parentNode===y)break;if(R===4)for(R=f.return;R!==null;){var M=R.tag;if((M===3||M===4)&&(M=R.stateNode.containerInfo,M===y||M.nodeType===8&&M.parentNode===y))return;R=R.return}for(;A!==null;){if(R=Bs(A),R===null)return;if(M=R.tag,M===5||M===6){f=w=R;continue e}A=A.parentNode}}f=f.return}dy(function(){var K=w,re=Fd(c),oe=[];e:{var ne=nv.get(s);if(ne!==void 0){var pe=Jd,xe=s;switch(s){case"keypress":if(Jl(c)===0)break e;case"keydown":case"keyup":pe=wk;break;case"focusin":xe="focus",pe=tf;break;case"focusout":xe="blur",pe=tf;break;case"beforeblur":case"afterblur":pe=tf;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=lk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=Ek;break;case Jy:case Zy:case ev:pe=dk;break;case tv:pe=_k;break;case"scroll":pe=ik;break;case"wheel":pe=Pk;break;case"copy":case"cut":case"paste":pe=hk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=My}var Se=(o&4)!==0,pt=!Se&&s==="scroll",U=Se?ne!==null?ne+"Capture":null:ne;Se=[];for(var F=K,z;F!==null;){z=F;var le=z.stateNode;if(z.tag===5&&le!==null&&(z=le,U!==null&&(le=Yi(F,U),le!=null&&Se.push(ma(F,le,z)))),pt)break;F=F.return}0<Se.length&&(ne=new pe(ne,xe,null,c,re),oe.push({event:ne,listeners:Se}))}}if((o&7)===0){e:{if(ne=s==="mouseover"||s==="pointerover",pe=s==="mouseout"||s==="pointerout",ne&&c!==Id&&(xe=c.relatedTarget||c.fromElement)&&(Bs(xe)||xe[gr]))break e;if((pe||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,pe?(xe=c.relatedTarget||c.toElement,pe=K,xe=xe?Bs(xe):null,xe!==null&&(pt=Fs(xe),xe!==pt||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(pe=null,xe=K),pe!==xe)){if(Se=jy,le="onMouseLeave",U="onMouseEnter",F="mouse",(s==="pointerout"||s==="pointerover")&&(Se=My,le="onPointerLeave",U="onPointerEnter",F="pointer"),pt=pe==null?ne:zo(pe),z=xe==null?ne:zo(xe),ne=new Se(le,F+"leave",pe,c,re),ne.target=pt,ne.relatedTarget=z,le=null,Bs(re)===K&&(Se=new Se(U,F+"enter",xe,c,re),Se.target=z,Se.relatedTarget=pt,le=Se),pt=le,pe&&xe)t:{for(Se=pe,U=xe,F=0,z=Se;z;z=Vo(z))F++;for(z=0,le=U;le;le=Vo(le))z++;for(;0<F-z;)Se=Vo(Se),F--;for(;0<z-F;)U=Vo(U),z--;for(;F--;){if(Se===U||U!==null&&Se===U.alternate)break t;Se=Vo(Se),U=Vo(U)}Se=null}else Se=null;pe!==null&&av(oe,ne,pe,Se,!1),xe!==null&&pt!==null&&av(oe,pt,xe,Se,!0)}}e:{if(ne=K?zo(K):window,pe=ne.nodeName&&ne.nodeName.toLowerCase(),pe==="select"||pe==="input"&&ne.type==="file")var Ee=Mk;else if($y(ne))if(Uy)Ee=Fk;else{Ee=Lk;var Re=Dk}else(pe=ne.nodeName)&&pe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Ee=Ik);if(Ee&&(Ee=Ee(s,K))){Vy(oe,Ee,c,re);break e}Re&&Re(s,ne,K),s==="focusout"&&(Re=ne._wrapperState)&&Re.controlled&&ne.type==="number"&&Le(ne,"number",ne.value)}switch(Re=K?zo(K):window,s){case"focusin":($y(Re)||Re.contentEditable==="true")&&(Bo=Re,lf=K,fa=null);break;case"focusout":fa=lf=Bo=null;break;case"mousedown":cf=!0;break;case"contextmenu":case"mouseup":case"dragend":cf=!1,Yy(oe,c,re);break;case"selectionchange":if(Vk)break;case"keydown":case"keyup":Yy(oe,c,re)}var Pe;if(rf)e:{switch(s){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Fo?Fy(s,c)&&(Oe="onCompositionEnd"):s==="keydown"&&c.keyCode===229&&(Oe="onCompositionStart");Oe&&(Dy&&c.locale!=="ko"&&(Fo||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Fo&&(Pe=Ny()):(Ur=re,Xd="value"in Ur?Ur.value:Ur.textContent,Fo=!0)),Re=oc(K,Oe),0<Re.length&&(Oe=new Oy(Oe,s,null,c,re),oe.push({event:Oe,listeners:Re}),Pe?Oe.data=Pe:(Pe=By(c),Pe!==null&&(Oe.data=Pe)))),(Pe=kk?Nk(s,c):Ak(s,c))&&(K=oc(K,"onBeforeInput"),0<K.length&&(re=new Oy("onBeforeInput","beforeinput",null,c,re),oe.push({event:re,listeners:K}),re.data=Pe))}ov(oe,o)})}function ma(s,o,c){return{instance:s,listener:o,currentTarget:c}}function oc(s,o){for(var c=o+"Capture",f=[];s!==null;){var y=s,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=Yi(s,c),w!=null&&f.unshift(ma(s,w,y)),w=Yi(s,o),w!=null&&f.push(ma(s,w,y))),s=s.return}return f}function Vo(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function av(s,o,c,f,y){for(var w=o._reactName,R=[];c!==null&&c!==f;){var A=c,M=A.alternate,K=A.stateNode;if(M!==null&&M===f)break;A.tag===5&&K!==null&&(A=K,y?(M=Yi(c,w),M!=null&&R.unshift(ma(c,M,A))):y||(M=Yi(c,w),M!=null&&R.push(ma(c,M,A)))),c=c.return}R.length!==0&&s.push({event:o,listeners:R})}var Hk=/\r\n?/g,qk=/\u0000|\uFFFD/g;function lv(s){return(typeof s=="string"?s:""+s).replace(Hk,` 38`).replace(qk,"")}function ic(s,o,c){if(o=lv(o),lv(s)!==o&&c)throw Error(n(425))}function ac(){}var mf=null,gf=null;function yf(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var vf=typeof setTimeout=="function"?setTimeout:void 0,Kk=typeof clearTimeout=="function"?clearTimeout:void 0,cv=typeof Promise=="function"?Promise:void 0,Gk=typeof queueMicrotask=="function"?queueMicrotask:typeof cv<"u"?function(s){return cv.resolve(null).then(s).catch(Qk)}:vf;function Qk(s){setTimeout(function(){throw s})}function xf(s,o){var c=o,f=0;do{var y=c.nextSibling;if(s.removeChild(c),y&&y.nodeType===8)if(c=y.data,c==="/$"){if(f===0){s.removeChild(y),oa(o);return}f--}else c!=="$"&&c!=="$?"&&c!=="$!"||f++;c=y}while(c);oa(o)}function Wr(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return s}function uv(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var c=s.data;if(c==="$"||c==="$!"||c==="$?"){if(o===0)return s;o--}else c==="/$"&&o++}s=s.previousSibling}return null}var Uo=Math.random().toString(36).slice(2),er="__reactFiber$"+Uo,ga="__reactProps$"+Uo,gr="__reactContainer$"+Uo,wf="__reactEvents$"+Uo,Yk="__reactListeners$"+Uo,Xk="__reactHandles$"+Uo;function Bs(s){var o=s[er];if(o)return o;for(var c=s.parentNode;c;){if(o=c[gr]||c[er]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(s=uv(s);s!==null;){if(c=s[er])return c;s=uv(s)}return o}s=c,c=s.parentNode}return null}function ya(s){return s=s[er]||s[gr],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function zo(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function lc(s){return s[ga]||null}var bf=[],Wo=-1;function Hr(s){return{current:s}}function nt(s){0>Wo||(s.current=bf[Wo],bf[Wo]=null,Wo--)}function Ze(s,o){Wo++,bf[Wo]=s.current,s.current=o}var qr={},Dt=Hr(qr),Yt=Hr(!1),$s=qr;function Ho(s,o){var c=s.type.contextTypes;if(!c)return qr;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===o)return f.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in c)y[w]=o[w];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=y),y}function Xt(s){return s=s.childContextTypes,s!=null}function cc(){nt(Yt),nt(Dt)}function dv(s,o,c){if(Dt.current!==qr)throw Error(n(168));Ze(Dt,o),Ze(Yt,c)}function fv(s,o,c){var f=s.stateNode;if(o=o.childContextTypes,typeof f.getChildContext!="function")return c;f=f.getChildContext();for(var y in f)if(!(y in o))throw Error(n(108,Z(s)||"Unknown",y));return $({},c,f)}function uc(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||qr,$s=Dt.current,Ze(Dt,s),Ze(Yt,Yt.current),!0}function hv(s,o,c){var f=s.stateNode;if(!f)throw Error(n(169));c?(s=fv(s,o,$s),f.__reactInternalMemoizedMergedChildContext=s,nt(Yt),nt(Dt),Ze(Dt,s)):nt(Yt),Ze(Yt,c)}var yr=null,dc=!1,Sf=!1;function pv(s){yr===null?yr=[s]:yr.push(s)}function Jk(s){dc=!0,pv(s)}function Kr(){if(!Sf&&yr!==null){Sf=!0;var s=0,o=Qe;try{var c=yr;for(Qe=1;s<c.length;s++){var f=c[s];do f=f(!0);while(f!==null)}yr=null,dc=!1}catch(y){throw yr!==null&&(yr=yr.slice(s+1)),gy(zd,Kr),y}finally{Qe=o,Sf=!1}}return null}var qo=[],Ko=0,fc=null,hc=0,yn=[],vn=0,Vs=null,vr=1,xr="";function Us(s,o){qo[Ko++]=hc,qo[Ko++]=fc,fc=s,hc=o}function mv(s,o,c){yn[vn++]=vr,yn[vn++]=xr,yn[vn++]=Vs,Vs=s;var f=vr;s=xr;var y=32-On(f)-1;f&=~(1<<y),c+=1;var w=32-On(o)+y;if(30<w){var R=y-y%5;w=(f&(1<<R)-1).toString(32),f>>=R,y-=R,vr=1<<32-On(o)+y|c<<y|f,xr=w+s}else vr=1<<w|c<<y|f,xr=s}function Ef(s){s.return!==null&&(Us(s,1),mv(s,1,0))}function Cf(s){for(;s===fc;)fc=qo[--Ko],qo[Ko]=null,hc=qo[--Ko],qo[Ko]=null;for(;s===Vs;)Vs=yn[--vn],yn[vn]=null,xr=yn[--vn],yn[vn]=null,vr=yn[--vn],yn[vn]=null}var ln=null,cn=null,st=!1,Dn=null;function gv(s,o){var c=Sn(5,null,null,0);c.elementType="DELETED",c.stateNode=o,c.return=s,o=s.deletions,o===null?(s.deletions=[c],s.flags|=16):o.push(c)}function yv(s,o){switch(s.tag){case 5:var c=s.type;return o=o.nodeType!==1||c.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(s.stateNode=o,ln=s,cn=Wr(o.firstChild),!0):!1;case 6:return o=s.pendingProps===""||o.nodeType!==3?null:o,o!==null?(s.stateNode=o,ln=s,cn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(c=Vs!==null?{id:vr,overflow:xr}:null,s.memoizedState={dehydrated:o,treeContext:c,retryLane:1073741824},c=Sn(18,null,null,0),c.stateNode=o,c.return=s,s.child=c,ln=s,cn=null,!0):!1;default:return!1}}function _f(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Rf(s){if(st){var o=cn;if(o){var c=o;
vendor: 4,371 bytes, line 38
38if(!yv(s,o)){if(_f(s))throw Error(n(418));o=Wr(c.nextSibling);var f=ln;o&&yv(s,o)?gv(f,c):(s.flags=s.flags&-4097|2,st=!1,ln=s)}}else{if(_f(s))throw Error(n(418));s.flags=s.flags&-4097|2,st=!1,ln=s}}}function vv(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;ln=s}function pc(s){if(s!==ln)return!1;if(!st)return vv(s),st=!0,!1;var o;if((o=s.tag!==3)&&!(o=s.tag!==5)&&(o=s.type,o=o!=="head"&&o!=="body"&&!yf(s.type,s.memoizedProps)),o&&(o=cn)){if(_f(s))throw xv(),Error(n(418));for(;o;)gv(s,o),o=Wr(o.nextSibling)}if(vv(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,o=0;s;){if(s.nodeType===8){var c=s.data;if(c==="/$"){if(o===0){cn=Wr(s.nextSibling);break e}o--}else c!=="$"&&c!=="$!"&&c!=="$?"||o++}s=s.nextSibling}cn=null}}else cn=ln?Wr(s.stateNode.nextSibling):null;return!0}function xv(){for(var s=cn;s;)s=Wr(s.nextSibling)}function Go(){cn=ln=null,st=!1}function Pf(s){Dn===null?Dn=[s]:Dn.push(s)}var Zk=k.ReactCurrentBatchConfig;function va(s,o,c){if(s=c.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var f=c.stateNode}if(!f)throw Error(n(147,s));var y=f,w=""+s;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===w?o.ref:(o=function(R){var A=y.refs;R===null?delete A[w]:A[w]=R},o._stringRef=w,o)}if(typeof s!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,s))}return s}function mc(s,o){throw s=Object.prototype.toString.call(o),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s))}function wv(s){var o=s._init;return o(s._payload)}function bv(s){function o(U,F){if(s){var z=U.deletions;z===null?(U.deletions=[F],U.flags|=16):z.push(F)}}function c(U,F){if(!s)return null;for(;F!==null;)o(U,F),F=F.sibling;return null}function f(U,F){for(U=new Map;F!==null;)F.key!==null?U.set(F.key,F):U.set(F.index,F),F=F.sibling;return U}function y(U,F){return U=ts(U,F),U.index=0,U.sibling=null,U}function w(U,F,z){return U.index=z,s?(z=U.alternate,z!==null?(z=z.index,z<F?(U.flags|=2,F):z):(U.flags|=2,F)):(U.flags|=1048576,F)}function R(U){return s&&U.alternate===null&&(U.flags|=2),U}function A(U,F,z,le){return F===null||F.tag!==6?(F=vh(z,U.mode,le),F.return=U,F):(F=y(F,z),F.return=U,F)}function M(U,F,z,le){var Ee=z.type;return Ee===B?re(U,F,z.props.children,le,z.key):F!==null&&(F.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Y&&wv(Ee)===F.type)?(le=y(F,z.props),le.ref=va(U,F,z),le.return=U,le):(le=Bc(z.type,z.key,z.props,null,U.mode,le),le.ref=va(U,F,z),le.return=U,le)}function K(U,F,z,le){return F===null||F.tag!==4||F.stateNode.containerInfo!==z.containerInfo||F.stateNode.implementation!==z.implementation?(F=xh(z,U.mode,le),F.return=U,F):(F=y(F,z.children||[]),F.return=U,F)}function re(U,F,z,le,Ee){return F===null||F.tag!==7?(F=Ys(z,U.mode,le,Ee),F.return=U,F):(F=y(F,z),F.return=U,F)}function oe(U,F,z){if(typeof F=="string"&&F!==""||typeof F=="number")return F=vh(""+F,U.mode,z),F.return=U,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case N:return z=Bc(F.type,F.key,F.props,null,U.mode,z),z.ref=va(U,null,F),z.return=U,z;case D:return F=xh(F,U.mode,z),F.return=U,F;case Y:var le=F._init;return oe(U,le(F._payload),z)}if(lt(F)||H(F))return F=Ys(F,U.mode,z,null),F.return=U,F;mc(U,F)}return null}function ne(U,F,z,le){var Ee=F!==null?F.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return Ee!==null?null:A(U,F,""+z,le);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case N:return z.key===Ee?M(U,F,z,le):null;case D:return z.key===Ee?K(U,F,z,le):null;case Y:return Ee=z._init,ne(U,F,Ee(z._payload),le)}if(lt(z)||H(z))return Ee!==null?null:re(U,F,z,le,null);mc(U,z)}return null}function pe(U,F,z,le,Ee){if(typeof le=="string"&&le!==""||typeof le=="number")return U=U.get(z)||null,A(F,U,""+le,Ee);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case N:return U=U.get(le.key===null?z:le.key)||null,M(F,U,le,Ee);case D:return U=U.get(le.key===null?z:le.key)||null,K(F,U,le,Ee);case Y:var Re=le._init;return pe(U,F,z,Re(le._payload),Ee)}if(lt(le)||H(le))return U=U.get(z)||null,re(F,U,le,Ee,null);mc(F,le)}return null}function xe(U,F,z,le){for(var Ee=null,Re=null,Pe=F,Oe=F=0,Pt=null;Pe!==null&&Oe<z.length;Oe++){Pe.index>Oe?(Pt=Pe,Pe=null):Pt=Pe.sibling;var qe=ne(U,Pe,z[Oe],le);
vendor: 6,801 bytes, line 38
38if(qe===null){Pe===null&&(Pe=Pt);break}s&&Pe&&qe.alternate===null&&o(U,Pe),F=w(qe,F,Oe),Re===null?Ee=qe:Re.sibling=qe,Re=qe,Pe=Pt}if(Oe===z.length)return c(U,Pe),st&&Us(U,Oe),Ee;if(Pe===null){for(;Oe<z.length;Oe++)Pe=oe(U,z[Oe],le),Pe!==null&&(F=w(Pe,F,Oe),Re===null?Ee=Pe:Re.sibling=Pe,Re=Pe);return st&&Us(U,Oe),Ee}for(Pe=f(U,Pe);Oe<z.length;Oe++)Pt=pe(Pe,U,Oe,z[Oe],le),Pt!==null&&(s&&Pt.alternate!==null&&Pe.delete(Pt.key===null?Oe:Pt.key),F=w(Pt,F,Oe),Re===null?Ee=Pt:Re.sibling=Pt,Re=Pt);return s&&Pe.forEach(function(ns){return o(U,ns)}),st&&Us(U,Oe),Ee}function Se(U,F,z,le){var Ee=H(z);if(typeof Ee!="function")throw Error(n(150));if(z=Ee.call(z),z==null)throw Error(n(151));for(var Re=Ee=null,Pe=F,Oe=F=0,Pt=null,qe=z.next();Pe!==null&&!qe.done;Oe++,qe=z.next()){Pe.index>Oe?(Pt=Pe,Pe=null):Pt=Pe.sibling;var ns=ne(U,Pe,qe.value,le);if(ns===null){Pe===null&&(Pe=Pt);break}s&&Pe&&ns.alternate===null&&o(U,Pe),F=w(ns,F,Oe),Re===null?Ee=ns:Re.sibling=ns,Re=ns,Pe=Pt}if(qe.done)return c(U,Pe),st&&Us(U,Oe),Ee;if(Pe===null){for(;!qe.done;Oe++,qe=z.next())qe=oe(U,qe.value,le),qe!==null&&(F=w(qe,F,Oe),Re===null?Ee=qe:Re.sibling=qe,Re=qe);return st&&Us(U,Oe),Ee}for(Pe=f(U,Pe);!qe.done;Oe++,qe=z.next())qe=pe(Pe,U,Oe,qe.value,le),qe!==null&&(s&&qe.alternate!==null&&Pe.delete(qe.key===null?Oe:qe.key),F=w(qe,F,Oe),Re===null?Ee=qe:Re.sibling=qe,Re=qe);return s&&Pe.forEach(function(jN){return o(U,jN)}),st&&Us(U,Oe),Ee}function pt(U,F,z,le){if(typeof z=="object"&&z!==null&&z.type===B&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case N:e:{for(var Ee=z.key,Re=F;Re!==null;){if(Re.key===Ee){if(Ee=z.type,Ee===B){if(Re.tag===7){c(U,Re.sibling),F=y(Re,z.props.children),F.return=U,U=F;break e}}else if(Re.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Y&&wv(Ee)===Re.type){c(U,Re.sibling),F=y(Re,z.props),F.ref=va(U,Re,z),F.return=U,U=F;break e}c(U,Re);break}else o(U,Re);Re=Re.sibling}z.type===B?(F=Ys(z.props.children,U.mode,le,z.key),F.return=U,U=F):(le=Bc(z.type,z.key,z.props,null,U.mode,le),le.ref=va(U,F,z),le.return=U,U=le)}return R(U);case D:e:{for(Re=z.key;F!==null;){if(F.key===Re)if(F.tag===4&&F.stateNode.containerInfo===z.containerInfo&&F.stateNode.implementation===z.implementation){c(U,F.sibling),F=y(F,z.children||[]),F.return=U,U=F;break e}else{c(U,F);break}else o(U,F);F=F.sibling}F=xh(z,U.mode,le),F.return=U,U=F}return R(U);case Y:return Re=z._init,pt(U,F,Re(z._payload),le)}if(lt(z))return xe(U,F,z,le);if(H(z))return Se(U,F,z,le);mc(U,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,F!==null&&F.tag===6?(c(U,F.sibling),F=y(F,z),F.return=U,U=F):(c(U,F),F=vh(z,U.mode,le),F.return=U,U=F),R(U)):c(U,F)}return pt}var Qo=bv(!0),Sv=bv(!1),gc=Hr(null),yc=null,Yo=null,Tf=null;function kf(){Tf=Yo=yc=null}function Nf(s){var o=gc.current;nt(gc),s._currentValue=o}function Af(s,o,c){for(;s!==null;){var f=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),s===c)break;s=s.return}}function Xo(s,o){yc=s,Tf=Yo=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&o)!==0&&(Jt=!0),s.firstContext=null)}function xn(s){var o=s._currentValue;if(Tf!==s)if(s={context:s,memoizedValue:o,next:null},Yo===null){if(yc===null)throw Error(n(308));Yo=s,yc.dependencies={lanes:0,firstContext:s}}else Yo=Yo.next=s;return o}var zs=null;function jf(s){zs===null?zs=[s]:zs.push(s)}function Ev(s,o,c,f){var y=o.interleaved;return y===null?(c.next=c,jf(o)):(c.next=y.next,y.next=c),o.interleaved=c,wr(s,f)}function wr(s,o){s.lanes|=o;var c=s.alternate;for(c!==null&&(c.lanes|=o),c=s,s=s.return;s!==null;)s.childLanes|=o,c=s.alternate,c!==null&&(c.childLanes|=o),c=s,s=s.return;return c.tag===3?c.stateNode:null}var Gr=!1;function Of(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cv(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function br(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:null,next:null}}function Qr(s,o,c){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(He&2)!==0){var y=f.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),f.pending=o,wr(s,c)}return y=f.interleaved,y===null?(o.next=o,jf(f)):(o.next=y.next,y.next=o),f.interleaved=o,wr(s,c)}function vc(s,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194240)!==0)){var f=o.lanes;f&=s.pendingLanes,c|=f,o.lanes=c,qd(s,c)}}function _v(s,o){var c=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var y=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var R={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};w===null?y=w=R:w=w.next=R,c=c.next}while(c!==null);w===null?y=w=o:w=w.next=o}else y=w=o;c={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:f.shared,effects:f.effects},s.updateQueue=c;return}s=c.lastBaseUpdate,s===null?c.firstBaseUpdate=o:s.next=o,c.lastBaseUpdate=o}function xc(s,o,c,f){var y=s.updateQueue;Gr=!1;var w=y.firstBaseUpdate,R=y.lastBaseUpdate,A=y.shared.pending;if(A!==null){y.shared.pending=null;var M=A,K=M.next;M.next=null,R===null?w=K:R.next=K,R=M;var re=s.alternate;re!==null&&(re=re.updateQueue,A=re.lastBaseUpdate,A!==R&&(A===null?re.firstBaseUpdate=K:A.next=K,re.lastBaseUpdate=M))}if(w!==null){var oe=y.baseState;R=0,re=K=M=null,A=w;do{var ne=A.lane,pe=A.eventTime;if((f&ne)===ne){re!==null&&(re=re.next={eventTime:pe,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var xe=s,Se=A;switch(ne=o,pe=c,Se.tag){case 1:if(xe=Se.payload,typeof xe=="function"){oe=xe.call(pe,oe,ne);break e}oe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Se.payload,ne=typeof xe=="function"?xe.call(pe,oe,ne):xe,ne==null)break e;oe=$({},oe,ne);break e;case 2:Gr=!0}}A.callback!==null&&A.lane!==0&&(s.flags|=64,ne=y.effects,ne===null?y.effects=[A]:ne.push(A))}else pe={eventTime:pe,lane:ne,tag:A.tag,payload:A.payload,callback:A.callback,next:null},re===null?(K=re=pe,M=oe):re=re.next=pe,R|=ne;if(A=A.next,A===null){if(A=y.shared.pending,A===null)break;ne=A,A=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);if(re===null&&(M=oe),y.baseState=M,y.firstBaseUpdate=K,y.lastBaseUpdate=re,o=y.shared.interleaved,o!==null){y=o;do R|=y.lane,y=y.next;while(y!==o)}else w===null&&(y.shared.lanes=0);qs|=R,s.lanes=R,s.memoizedState=oe}}function Rv(s,o,c){if(s=o.effects,o.effects=null,s!==null)for(o=0;o<s.length;o++){var f=s[o],y=f.callback;if(y!==null){if(f.callback=null,f=c,typeof y!="function")throw Error(n(191,y));y.call(f)}}}var xa={},tr=Hr(xa),wa=Hr(xa),ba=Hr(xa);
vendor: 8,713 bytes, line 38
38function Ws(s){if(s===xa)throw Error(n(174));return s}function Mf(s,o){switch(Ze(ba,o),Ze(wa,s),Ze(tr,xa),s=o.nodeType,s){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:jn(null,"");break;default:s=s===8?o.parentNode:o,o=s.namespaceURI||null,s=s.tagName,o=jn(o,s)}nt(tr),Ze(tr,o)}function Jo(){nt(tr),nt(wa),nt(ba)}function Pv(s){Ws(ba.current);var o=Ws(tr.current),c=jn(o,s.type);o!==c&&(Ze(wa,s),Ze(tr,c))}function Df(s){wa.current===s&&(nt(tr),nt(wa))}var ot=Hr(0);function wc(s){for(var o=s;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Lf=[];function If(){for(var s=0;s<Lf.length;s++)Lf[s]._workInProgressVersionPrimary=null;Lf.length=0}var bc=k.ReactCurrentDispatcher,Ff=k.ReactCurrentBatchConfig,Hs=0,it=null,bt=null,_t=null,Sc=!1,Sa=!1,Ea=0,eN=0;function Lt(){throw Error(n(321))}function Bf(s,o){if(o===null)return!1;for(var c=0;c<o.length&&c<s.length;c++)if(!Mn(s[c],o[c]))return!1;return!0}function $f(s,o,c,f,y,w){if(Hs=w,it=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,bc.current=s===null||s.memoizedState===null?sN:oN,s=c(f,y),Sa){w=0;do{if(Sa=!1,Ea=0,25<=w)throw Error(n(301));w+=1,_t=bt=null,o.updateQueue=null,bc.current=iN,s=c(f,y)}while(Sa)}if(bc.current=_c,o=bt!==null&&bt.next!==null,Hs=0,_t=bt=it=null,Sc=!1,o)throw Error(n(300));return s}function Vf(){var s=Ea!==0;return Ea=0,s}function nr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?it.memoizedState=_t=s:_t=_t.next=s,_t}function wn(){if(bt===null){var s=it.alternate;s=s!==null?s.memoizedState:null}else s=bt.next;var o=_t===null?it.memoizedState:_t.next;if(o!==null)_t=o,bt=s;else{if(s===null)throw Error(n(310));bt=s,s={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},_t===null?it.memoizedState=_t=s:_t=_t.next=s}return _t}function Ca(s,o){return typeof o=="function"?o(s):o}function Uf(s){var o=wn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=s;var f=bt,y=f.baseQueue,w=c.pending;if(w!==null){if(y!==null){var R=y.next;y.next=w.next,w.next=R}f.baseQueue=y=w,c.pending=null}if(y!==null){w=y.next,f=f.baseState;var A=R=null,M=null,K=w;do{var re=K.lane;if((Hs&re)===re)M!==null&&(M=M.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),f=K.hasEagerState?K.eagerState:s(f,K.action);else{var oe={lane:re,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};M===null?(A=M=oe,R=f):M=M.next=oe,it.lanes|=re,qs|=re}K=K.next}while(K!==null&&K!==w);M===null?R=f:M.next=A,Mn(f,o.memoizedState)||(Jt=!0),o.memoizedState=f,o.baseState=R,o.baseQueue=M,c.lastRenderedState=f}if(s=c.interleaved,s!==null){y=s;do w=y.lane,it.lanes|=w,qs|=w,y=y.next;while(y!==s)}else y===null&&(c.lanes=0);return[o.memoizedState,c.dispatch]}function zf(s){var o=wn(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=s;var f=c.dispatch,y=c.pending,w=o.memoizedState;if(y!==null){c.pending=null;var R=y=y.next;do w=s(w,R.action),R=R.next;while(R!==y);Mn(w,o.memoizedState)||(Jt=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),c.lastRenderedState=w}return[w,f]}function Tv(){}function kv(s,o){var c=it,f=wn(),y=o(),w=!Mn(f.memoizedState,y);if(w&&(f.memoizedState=y,Jt=!0),f=f.queue,Wf(jv.bind(null,c,f,s),[s]),f.getSnapshot!==o||w||_t!==null&&_t.memoizedState.tag&1){if(c.flags|=2048,_a(9,Av.bind(null,c,f,y,o),void 0,null),Rt===null)throw Error(n(349));(Hs&30)!==0||Nv(c,o,y)}return y}function Nv(s,o,c){s.flags|=16384,s={getSnapshot:o,value:c},o=it.updateQueue,o===null?(o={lastEffect:null,stores:null},it.updateQueue=o,o.stores=[s]):(c=o.stores,c===null?o.stores=[s]:c.push(s))}function Av(s,o,c,f){o.value=c,o.getSnapshot=f,Ov(o)&&Mv(s)}function jv(s,o,c){return c(function(){Ov(o)&&Mv(s)})}function Ov(s){var o=s.getSnapshot;s=s.value;try{var c=o();return!Mn(s,c)}catch{return!0}}function Mv(s){var o=wr(s,1);o!==null&&Bn(o,s,1,-1)}function Dv(s){var o=nr();return typeof s=="function"&&(s=s()),o.memoizedState=o.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:s},o.queue=s,s=s.dispatch=rN.bind(null,it,s),[o.memoizedState,s]}function _a(s,o,c,f){return s={tag:s,create:o,destroy:c,deps:f,next:null},o=it.updateQueue,o===null?(o={lastEffect:null,stores:null},it.updateQueue=o,o.lastEffect=s.next=s):(c=o.lastEffect,c===null?o.lastEffect=s.next=s:(f=c.next,c.next=s,s.next=f,o.lastEffect=s)),s}function Lv(){return wn().memoizedState}function Ec(s,o,c,f){var y=nr();it.flags|=s,y.memoizedState=_a(1|o,c,void 0,f===void 0?null:f)}function Cc(s,o,c,f){var y=wn();f=f===void 0?null:f;var w=void 0;if(bt!==null){var R=bt.memoizedState;if(w=R.destroy,f!==null&&Bf(f,R.deps)){y.memoizedState=_a(o,c,w,f);return}}it.flags|=s,y.memoizedState=_a(1|o,c,w,f)}function Iv(s,o){return Ec(8390656,8,s,o)}function Wf(s,o){return Cc(2048,8,s,o)}function Fv(s,o){return Cc(4,2,s,o)}function Bv(s,o){return Cc(4,4,s,o)}function $v(s,o){if(typeof o=="function")return s=s(),o(s),function(){o(null)};if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function Vv(s,o,c){return c=c!=null?c.concat([s]):null,Cc(4,4,$v.bind(null,o,s),c)}function Hf(){}function Uv(s,o){var c=wn();o=o===void 0?null:o;var f=c.memoizedState;return f!==null&&o!==null&&Bf(o,f[1])?f[0]:(c.memoizedState=[s,o],s)}function zv(s,o){var c=wn();o=o===void 0?null:o;var f=c.memoizedState;return f!==null&&o!==null&&Bf(o,f[1])?f[0]:(s=s(),c.memoizedState=[s,o],s)}function Wv(s,o,c){return(Hs&21)===0?(s.baseState&&(s.baseState=!1,Jt=!0),s.memoizedState=c):(Mn(c,o)||(c=wy(),it.lanes|=c,qs|=c,s.baseState=!0),o)}function tN(s,o){var c=Qe;Qe=c!==0&&4>c?c:4,s(!0);var f=Ff.transition;Ff.transition={};try{s(!1),o()}finally{Qe=c,Ff.transition=f}}function Hv(){return wn().memoizedState}function nN(s,o,c){var f=Zr(s);if(c={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null},qv(s))Kv(o,c);else if(c=Ev(s,o,c,f),c!==null){var y=Kt();Bn(c,s,f,y),Gv(c,o,f)}}function rN(s,o,c){var f=Zr(s),y={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null};if(qv(s))Kv(o,y);else{var w=s.alternate;if(s.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var R=o.lastRenderedState,A=w(R,c);if(y.hasEagerState=!0,y.eagerState=A,Mn(A,R)){var M=o.interleaved;M===null?(y.next=y,jf(o)):(y.next=M.next,M.next=y),o.interleaved=y;return}}catch{}finally{}c=Ev(s,o,y,f),c!==null&&(y=Kt(),Bn(c,s,f,y),Gv(c,o,f))}}function qv(s){var o=s.alternate;return s===it||o!==null&&o===it}function Kv(s,o){Sa=Sc=!0;var c=s.pending;c===null?o.next=o:(o.next=c.next,c.next=o),s.pending=o}function Gv(s,o,c){if((c&4194240)!==0){var f=o.lanes;f&=s.pendingLanes,c|=f,o.lanes=c,qd(s,c)}}var _c={readContext:xn,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},sN={readContext:xn,useCallback:function(s,o){return nr().memoizedState=[s,o===void 0?null:o],s},useContext:xn,useEffect:Iv,useImperativeHandle:function(s,o,c){return c=c!=null?c.concat([s]):null,Ec(4194308,4,$v.bind(null,o,s),c)},useLayoutEffect:function(s,o){return Ec(4194308,4,s,o)},useInsertionEffect:function(s,o){return Ec(4,2,s,o)},useMemo:function(s,o){var c=nr();return o=o===void 0?null:o,s=s(),c.memoizedState=[s,o],s},useReducer:function(s,o,c){var f=nr();return o=c!==void 0?c(o):o,f.memoizedState=f.baseState=o,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},f.queue=s,s=s.dispatch=nN.bind(null,it,s),[f.memoizedState,s]},useRef:function(s){var o=nr();return s={current:s},o.memoizedState=s},useState:Dv,useDebugValue:Hf,useDeferredValue:function(s){return nr().memoizedState=s},useTransition:function(){var s=Dv(!1),o=s[0];return s=tN.bind(null,s[1]),nr().memoizedState=s,[o,s]},useMutableSource:function(){},useSyncExternalStore:function(s,o,c){var f=it,y=nr();if(st){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),Rt===null)throw Error(n(349));(Hs&30)!==0||Nv(f,o,c)}y.memoizedState=c;var w={value:c,getSnapshot:o};return y.queue=w,Iv(jv.bind(null,f,w,s),[s]),f.flags|=2048,_a(9,Av.bind(null,f,w,c,o),void 0,null),c},useId:function(){var s=nr(),o=Rt.identifierPrefix;
vendor: 6,798 bytes, lines 38-40
38if(st){var c=xr,f=vr;c=(f&~(1<<32-On(f)-1)).toString(32)+c,o=":"+o+"R"+c,c=Ea++,0<c&&(o+="H"+c.toString(32)),o+=":"}else c=eN++,o=":"+o+"r"+c.toString(32)+":";return s.memoizedState=o},unstable_isNewReconciler:!1},oN={readContext:xn,useCallback:Uv,useContext:xn,useEffect:Wf,useImperativeHandle:Vv,useInsertionEffect:Fv,useLayoutEffect:Bv,useMemo:zv,useReducer:Uf,useRef:Lv,useState:function(){return Uf(Ca)},useDebugValue:Hf,useDeferredValue:function(s){var o=wn();return Wv(o,bt.memoizedState,s)},useTransition:function(){var s=Uf(Ca)[0],o=wn().memoizedState;return[s,o]},useMutableSource:Tv,useSyncExternalStore:kv,useId:Hv,unstable_isNewReconciler:!1},iN={readContext:xn,useCallback:Uv,useContext:xn,useEffect:Wf,useImperativeHandle:Vv,useInsertionEffect:Fv,useLayoutEffect:Bv,useMemo:zv,useReducer:zf,useRef:Lv,useState:function(){return zf(Ca)},useDebugValue:Hf,useDeferredValue:function(s){var o=wn();return bt===null?o.memoizedState=s:Wv(o,bt.memoizedState,s)},useTransition:function(){var s=zf(Ca)[0],o=wn().memoizedState;return[s,o]},useMutableSource:Tv,useSyncExternalStore:kv,useId:Hv,unstable_isNewReconciler:!1};function Ln(s,o){if(s&&s.defaultProps){o=$({},o),s=s.defaultProps;for(var c in s)o[c]===void 0&&(o[c]=s[c]);return o}return o}function qf(s,o,c,f){o=s.memoizedState,c=c(f,o),c=c==null?o:$({},o,c),s.memoizedState=c,s.lanes===0&&(s.updateQueue.baseState=c)}var Rc={isMounted:function(s){return(s=s._reactInternals)?Fs(s)===s:!1},enqueueSetState:function(s,o,c){s=s._reactInternals;var f=Kt(),y=Zr(s),w=br(f,y);w.payload=o,c!=null&&(w.callback=c),o=Qr(s,w,y),o!==null&&(Bn(o,s,y,f),vc(o,s,y))},enqueueReplaceState:function(s,o,c){s=s._reactInternals;var f=Kt(),y=Zr(s),w=br(f,y);w.tag=1,w.payload=o,c!=null&&(w.callback=c),o=Qr(s,w,y),o!==null&&(Bn(o,s,y,f),vc(o,s,y))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var c=Kt(),f=Zr(s),y=br(c,f);y.tag=2,o!=null&&(y.callback=o),o=Qr(s,y,f),o!==null&&(Bn(o,s,f,c),vc(o,s,f))}};function Qv(s,o,c,f,y,w,R){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,w,R):o.prototype&&o.prototype.isPureReactComponent?!da(c,f)||!da(y,w):!0}function Yv(s,o,c){var f=!1,y=qr,w=o.contextType;return typeof w=="object"&&w!==null?w=xn(w):(y=Xt(o)?$s:Dt.current,f=o.contextTypes,w=(f=f!=null)?Ho(s,y):qr),o=new o(c,w),s.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Rc,s.stateNode=o,o._reactInternals=s,f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=y,s.__reactInternalMemoizedMaskedChildContext=w),o}function Xv(s,o,c,f){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,f),o.state!==s&&Rc.enqueueReplaceState(o,o.state,null)}function Kf(s,o,c,f){var y=s.stateNode;y.props=c,y.state=s.memoizedState,y.refs={},Of(s);var w=o.contextType;typeof w=="object"&&w!==null?y.context=xn(w):(w=Xt(o)?$s:Dt.current,y.context=Ho(s,w)),y.state=s.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(qf(s,o,w,c),y.state=s.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(o=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),o!==y.state&&Rc.enqueueReplaceState(y,y.state,null),xc(s,c,y,f),y.state=s.memoizedState),typeof y.componentDidMount=="function"&&(s.flags|=4194308)}function Zo(s,o){try{var c="",f=o;do c+=ce(f),f=f.return;while(f);var y=c}catch(w){y=` 39Error generating stack: `+w.message+` 40`+w.stack}return{value:s,source:o,stack:y,digest:null}}function Gf(s,o,c){return{value:s,source:null,stack:c??null,digest:o??null}}function Qf(s,o){try{console.error(o.value)}catch(c){setTimeout(function(){throw c})}}var aN=typeof WeakMap=="function"?WeakMap:Map;function Jv(s,o,c){c=br(-1,c),c.tag=3,c.payload={element:null};var f=o.value;return c.callback=function(){Oc||(Oc=!0,uh=f),Qf(s,o)},c}function Zv(s,o,c){c=br(-1,c),c.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var y=o.value;c.payload=function(){return f(y)},c.callback=function(){Qf(s,o)}}var w=s.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(c.callback=function(){Qf(s,o),typeof f!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var R=o.stack;this.componentDidCatch(o.value,{componentStack:R!==null?R:""})}),c}function ex(s,o,c){var f=s.pingCache;if(f===null){f=s.pingCache=new aN;var y=new Set;f.set(o,y)}else y=f.get(o),y===void 0&&(y=new Set,f.set(o,y));y.has(c)||(y.add(c),s=bN.bind(null,s,o,c),o.then(s,s))}function tx(s){do{var o;if((o=s.tag===13)&&(o=s.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return s;s=s.return}while(s!==null);return null}function nx(s,o,c,f,y){return(s.mode&1)===0?(s===o?s.flags|=65536:(s.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(o=br(-1,1),o.tag=2,Qr(c,o,1))),c.lanes|=1),s):(s.flags|=65536,s.lanes=y,s)}var lN=k.ReactCurrentOwner,Jt=!1;function qt(s,o,c,f){o.child=s===null?Sv(o,null,c,f):Qo(o,s.child,c,f)}function rx(s,o,c,f,y){c=c.render;var w=o.ref;return Xo(o,y),f=$f(s,o,c,f,w,y),c=Vf(),s!==null&&!Jt?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~y,Sr(s,o,y)):(st&&c&&Ef(o),o.flags|=1,qt(s,o,f,y),o.child)}function sx(s,o,c,f,y){if(s===null){var w=c.type;return typeof w=="function"&&!yh(w)&&w.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(o.tag=15,o.type=w,ox(s,o,w,f,y)):(s=Bc(c.type,null,f,o,o.mode,y),s.ref=o.ref,s.return=o,o.child=s)}if(w=s.child,(s.lanes&y)===0){var R=w.memoizedProps;if(c=c.compare,c=c!==null?c:da,c(R,f)&&s.ref===o.ref)return Sr(s,o,y)}return o.flags|=1,s=ts(w,f),s.ref=o.ref,s.return=o,o.child=s}function ox(s,o,c,f,y){if(s!==null){var w=s.memoizedProps;if(da(w,f)&&s.ref===o.ref)if(Jt=!1,o.pendingProps=f=w,(s.lanes&y)!==0)(s.flags&131072)!==0&&(Jt=!0);else return o.lanes=s.lanes,Sr(s,o,y)}return Yf(s,o,c,f,y)}function ix(s,o,c){var f=o.pendingProps,y=f.children,w=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ze(ti,un),un|=c;else{if((c&1073741824)===0)return s=w!==null?w.baseLanes|c:c,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,Ze(ti,un),un|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:c,Ze(ti,un),un|=f}else w!==null?(f=w.baseLanes|c,o.memoizedState=null):f=c,Ze(ti,un),un|=f;return qt(s,o,y,c),o.child}function ax(s,o){var c=o.ref;(s===null&&c!==null||s!==null&&s.ref!==c)&&(o.flags|=512,o.flags|=2097152)}
vendor: 37,428 bytes, line 40
40function Yf(s,o,c,f,y){var w=Xt(c)?$s:Dt.current;return w=Ho(o,w),Xo(o,y),c=$f(s,o,c,f,w,y),f=Vf(),s!==null&&!Jt?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~y,Sr(s,o,y)):(st&&f&&Ef(o),o.flags|=1,qt(s,o,c,y),o.child)}function lx(s,o,c,f,y){if(Xt(c)){var w=!0;uc(o)}else w=!1;if(Xo(o,y),o.stateNode===null)Tc(s,o),Yv(o,c,f),Kf(o,c,f,y),f=!0;else if(s===null){var R=o.stateNode,A=o.memoizedProps;R.props=A;var M=R.context,K=c.contextType;typeof K=="object"&&K!==null?K=xn(K):(K=Xt(c)?$s:Dt.current,K=Ho(o,K));var re=c.getDerivedStateFromProps,oe=typeof re=="function"||typeof R.getSnapshotBeforeUpdate=="function";oe||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(A!==f||M!==K)&&Xv(o,R,f,K),Gr=!1;var ne=o.memoizedState;R.state=ne,xc(o,f,R,y),M=o.memoizedState,A!==f||ne!==M||Yt.current||Gr?(typeof re=="function"&&(qf(o,c,re,f),M=o.memoizedState),(A=Gr||Qv(o,c,A,f,ne,M,K))?(oe||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(o.flags|=4194308)):(typeof R.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=M),R.props=f,R.state=M,R.context=K,f=A):(typeof R.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{R=o.stateNode,Cv(s,o),A=o.memoizedProps,K=o.type===o.elementType?A:Ln(o.type,A),R.props=K,oe=o.pendingProps,ne=R.context,M=c.contextType,typeof M=="object"&&M!==null?M=xn(M):(M=Xt(c)?$s:Dt.current,M=Ho(o,M));var pe=c.getDerivedStateFromProps;(re=typeof pe=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(A!==oe||ne!==M)&&Xv(o,R,f,M),Gr=!1,ne=o.memoizedState,R.state=ne,xc(o,f,R,y);var xe=o.memoizedState;A!==oe||ne!==xe||Yt.current||Gr?(typeof pe=="function"&&(qf(o,c,pe,f),xe=o.memoizedState),(K=Gr||Qv(o,c,K,f,ne,xe,M)||!1)?(re||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(f,xe,M),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(f,xe,M)),typeof R.componentDidUpdate=="function"&&(o.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof R.componentDidUpdate!="function"||A===s.memoizedProps&&ne===s.memoizedState||(o.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&ne===s.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=xe),R.props=f,R.state=xe,R.context=M,f=K):(typeof R.componentDidUpdate!="function"||A===s.memoizedProps&&ne===s.memoizedState||(o.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&ne===s.memoizedState||(o.flags|=1024),f=!1)}return Xf(s,o,c,f,w,y)}function Xf(s,o,c,f,y,w){ax(s,o);var R=(o.flags&128)!==0;if(!f&&!R)return y&&hv(o,c,!1),Sr(s,o,w);f=o.stateNode,lN.current=o;var A=R&&typeof c.getDerivedStateFromError!="function"?null:f.render();return o.flags|=1,s!==null&&R?(o.child=Qo(o,s.child,null,w),o.child=Qo(o,null,A,w)):qt(s,o,A,w),o.memoizedState=f.state,y&&hv(o,c,!0),o.child}function cx(s){var o=s.stateNode;o.pendingContext?dv(s,o.pendingContext,o.pendingContext!==o.context):o.context&&dv(s,o.context,!1),Mf(s,o.containerInfo)}function ux(s,o,c,f,y){return Go(),Pf(y),o.flags|=256,qt(s,o,c,f),o.child}var Jf={dehydrated:null,treeContext:null,retryLane:0};function Zf(s){return{baseLanes:s,cachePool:null,transitions:null}}function dx(s,o,c){var f=o.pendingProps,y=ot.current,w=!1,R=(o.flags&128)!==0,A;if((A=R)||(A=s!==null&&s.memoizedState===null?!1:(y&2)!==0),A?(w=!0,o.flags&=-129):(s===null||s.memoizedState!==null)&&(y|=1),Ze(ot,y&1),s===null)return Rf(o),s=o.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((o.mode&1)===0?o.lanes=1:s.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(R=f.children,s=f.fallback,w?(f=o.mode,w=o.child,R={mode:"hidden",children:R},(f&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=R):w=$c(R,f,0,null),s=Ys(s,f,c,null),w.return=o,s.return=o,w.sibling=s,o.child=w,o.child.memoizedState=Zf(c),o.memoizedState=Jf,s):eh(o,R));if(y=s.memoizedState,y!==null&&(A=y.dehydrated,A!==null))return cN(s,o,R,f,A,y,c);if(w){w=f.fallback,R=o.mode,y=s.child,A=y.sibling;var M={mode:"hidden",children:f.children};return(R&1)===0&&o.child!==y?(f=o.child,f.childLanes=0,f.pendingProps=M,o.deletions=null):(f=ts(y,M),f.subtreeFlags=y.subtreeFlags&14680064),A!==null?w=ts(A,w):(w=Ys(w,R,c,null),w.flags|=2),w.return=o,f.return=o,f.sibling=w,o.child=f,f=w,w=o.child,R=s.child.memoizedState,R=R===null?Zf(c):{baseLanes:R.baseLanes|c,cachePool:null,transitions:R.transitions},w.memoizedState=R,w.childLanes=s.childLanes&~c,o.memoizedState=Jf,f}return w=s.child,s=w.sibling,f=ts(w,{mode:"visible",children:f.children}),(o.mode&1)===0&&(f.lanes=c),f.return=o,f.sibling=null,s!==null&&(c=o.deletions,c===null?(o.deletions=[s],o.flags|=16):c.push(s)),o.child=f,o.memoizedState=null,f}function eh(s,o){return o=$c({mode:"visible",children:o},s.mode,0,null),o.return=s,s.child=o}function Pc(s,o,c,f){return f!==null&&Pf(f),Qo(o,s.child,null,c),s=eh(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function cN(s,o,c,f,y,w,R){if(c)return o.flags&256?(o.flags&=-257,f=Gf(Error(n(422))),Pc(s,o,R,f)):o.memoizedState!==null?(o.child=s.child,o.flags|=128,null):(w=f.fallback,y=o.mode,f=$c({mode:"visible",children:f.children},y,0,null),w=Ys(w,y,R,null),w.flags|=2,f.return=o,w.return=o,f.sibling=w,o.child=f,(o.mode&1)!==0&&Qo(o,s.child,null,R),o.child.memoizedState=Zf(R),o.memoizedState=Jf,w);if((o.mode&1)===0)return Pc(s,o,R,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var A=f.dgst;return f=A,w=Error(n(419)),f=Gf(w,f,void 0),Pc(s,o,R,f)}if(A=(R&s.childLanes)!==0,Jt||A){if(f=Rt,f!==null){switch(R&-R){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(f.suspendedLanes|R))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,wr(s,y),Bn(f,s,y,-1))}return gh(),f=Gf(Error(n(421))),Pc(s,o,R,f)}return y.data==="$?"?(o.flags|=128,o.child=s.child,o=SN.bind(null,s),y._reactRetry=o,null):(s=w.treeContext,cn=Wr(y.nextSibling),ln=o,st=!0,Dn=null,s!==null&&(yn[vn++]=vr,yn[vn++]=xr,yn[vn++]=Vs,vr=s.id,xr=s.overflow,Vs=o),o=eh(o,f.children),o.flags|=4096,o)}function fx(s,o,c){s.lanes|=o;var f=s.alternate;f!==null&&(f.lanes|=o),Af(s.return,o,c)}function th(s,o,c,f,y){var w=s.memoizedState;w===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:y}:(w.isBackwards=o,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=c,w.tailMode=y)}function hx(s,o,c){var f=o.pendingProps,y=f.revealOrder,w=f.tail;if(qt(s,o,f.children,c),f=ot.current,(f&2)!==0)f=f&1|2,o.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&fx(s,c,o);else if(s.tag===19)fx(s,c,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}f&=1}if(Ze(ot,f),(o.mode&1)===0)o.memoizedState=null;else switch(y){case"forwards":for(c=o.child,y=null;c!==null;)s=c.alternate,s!==null&&wc(s)===null&&(y=c),c=c.sibling;c=y,c===null?(y=o.child,o.child=null):(y=c.sibling,c.sibling=null),th(o,!1,y,c,w);break;case"backwards":for(c=null,y=o.child,o.child=null;y!==null;){if(s=y.alternate,s!==null&&wc(s)===null){o.child=y;break}s=y.sibling,y.sibling=c,c=y,y=s}th(o,!0,c,null,w);break;case"together":th(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Tc(s,o){(o.mode&1)===0&&s!==null&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Sr(s,o,c){if(s!==null&&(o.dependencies=s.dependencies),qs|=o.lanes,(c&o.childLanes)===0)return null;if(s!==null&&o.child!==s.child)throw Error(n(153));if(o.child!==null){for(s=o.child,c=ts(s,s.pendingProps),o.child=c,c.return=o;s.sibling!==null;)s=s.sibling,c=c.sibling=ts(s,s.pendingProps),c.return=o;c.sibling=null}return o.child}function uN(s,o,c){switch(o.tag){case 3:cx(o),Go();break;case 5:Pv(o);break;case 1:Xt(o.type)&&uc(o);break;case 4:Mf(o,o.stateNode.containerInfo);break;case 10:var f=o.type._context,y=o.memoizedProps.value;Ze(gc,f._currentValue),f._currentValue=y;break;case 13:if(f=o.memoizedState,f!==null)return f.dehydrated!==null?(Ze(ot,ot.current&1),o.flags|=128,null):(c&o.child.childLanes)!==0?dx(s,o,c):(Ze(ot,ot.current&1),s=Sr(s,o,c),s!==null?s.sibling:null);Ze(ot,ot.current&1);break;case 19:if(f=(c&o.childLanes)!==0,(s.flags&128)!==0){if(f)return hx(s,o,c);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Ze(ot,ot.current),f)break;return null;case 22:case 23:return o.lanes=0,ix(s,o,c)}return Sr(s,o,c)}var px,nh,mx,gx;px=function(s,o){for(var c=o.child;c!==null;){if(c.tag===5||c.tag===6)s.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break;for(;c.sibling===null;){if(c.return===null||c.return===o)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},nh=function(){},mx=function(s,o,c,f){var y=s.memoizedProps;if(y!==f){s=o.stateNode,Ws(tr.current);var w=null;switch(c){case"input":y=ge(s,y),f=ge(s,f),w=[];break;case"select":y=$({},y,{value:void 0}),f=$({},f,{value:void 0}),w=[];break;case"textarea":y=ft(s,y),f=ft(s,f),w=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(s.onclick=ac)}Dd(c,f);var R;c=null;for(K in y)if(!f.hasOwnProperty(K)&&y.hasOwnProperty(K)&&y[K]!=null)if(K==="style"){var A=y[K];for(R in A)A.hasOwnProperty(R)&&(c||(c={}),c[R]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(i.hasOwnProperty(K)?w||(w=[]):(w=w||[]).push(K,null));for(K in f){var M=f[K];if(A=y!=null?y[K]:void 0,f.hasOwnProperty(K)&&M!==A&&(M!=null||A!=null))if(K==="style")if(A){for(R in A)!A.hasOwnProperty(R)||M&&M.hasOwnProperty(R)||(c||(c={}),c[R]="");for(R in M)M.hasOwnProperty(R)&&A[R]!==M[R]&&(c||(c={}),c[R]=M[R])}else c||(w||(w=[]),w.push(K,c)),c=M;else K==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,A=A?A.__html:void 0,M!=null&&A!==M&&(w=w||[]).push(K,M)):K==="children"?typeof M!="string"&&typeof M!="number"||(w=w||[]).push(K,""+M):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(i.hasOwnProperty(K)?(M!=null&&K==="onScroll"&&tt("scroll",s),w||A===M||(w=[])):(w=w||[]).push(K,M))}c&&(w=w||[]).push("style",c);var K=w;(o.updateQueue=K)&&(o.flags|=4)}},gx=function(s,o,c,f){c!==f&&(o.flags|=4)};function Ra(s,o){if(!st)switch(s.tailMode){case"hidden":o=s.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?s.tail=null:c.sibling=null;break;case"collapsed":c=s.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function It(s){var o=s.alternate!==null&&s.alternate.child===s.child,c=0,f=0;if(o)for(var y=s.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags&14680064,f|=y.flags&14680064,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=f,s.childLanes=c,o}function dN(s,o,c){var f=o.pendingProps;switch(Cf(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(o),null;case 1:return Xt(o.type)&&cc(),It(o),null;case 3:return f=o.stateNode,Jo(),nt(Yt),nt(Dt),If(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(pc(o)?o.flags|=4:s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Dn!==null&&(hh(Dn),Dn=null))),nh(s,o),It(o),null;case 5:Df(o);var y=Ws(ba.current);if(c=o.type,s!==null&&o.stateNode!=null)mx(s,o,c,f,y),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!f){if(o.stateNode===null)throw Error(n(166));return It(o),null}if(s=Ws(tr.current),pc(o)){f=o.stateNode,c=o.type;var w=o.memoizedProps;switch(f[er]=o,f[ga]=w,s=(o.mode&1)!==0,c){case"dialog":tt("cancel",f),tt("close",f);break;case"iframe":case"object":case"embed":tt("load",f);break;case"video":case"audio":for(y=0;y<ha.length;y++)tt(ha[y],f);break;case"source":tt("error",f);break;case"img":case"image":case"link":tt("error",f),tt("load",f);break;case"details":tt("toggle",f);break;case"input":Ce(f,w),tt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},tt("invalid",f);break;case"textarea":Xn(f,w),tt("invalid",f)}Dd(c,w),y=null;for(var R in w)if(w.hasOwnProperty(R)){var A=w[R];R==="children"?typeof A=="string"?f.textContent!==A&&(w.suppressHydrationWarning!==!0&&ic(f.textContent,A,s),y=["children",A]):typeof A=="number"&&f.textContent!==""+A&&(w.suppressHydrationWarning!==!0&&ic(f.textContent,A,s),y=["children",""+A]):i.hasOwnProperty(R)&&A!=null&&R==="onScroll"&&tt("scroll",f)}switch(c){case"input":Me(f),Je(f,w,!0);break;case"textarea":Me(f),Nn(f);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(f.onclick=ac)}f=y,o.updateQueue=f,f!==null&&(o.flags|=4)}else{R=y.nodeType===9?y:y.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=An(c)),s==="http://www.w3.org/1999/xhtml"?c==="script"?(s=R.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof f.is=="string"?s=R.createElement(c,{is:f.is}):(s=R.createElement(c),c==="select"&&(R=s,f.multiple?R.multiple=!0:f.size&&(R.size=f.size))):s=R.createElementNS(s,c),s[er]=o,s[ga]=f,px(s,o,!1,!1),o.stateNode=s;e:{switch(R=Ld(c,f),c){case"dialog":tt("cancel",s),tt("close",s),y=f;break;case"iframe":case"object":case"embed":tt("load",s),y=f;break;case"video":case"audio":for(y=0;y<ha.length;y++)tt(ha[y],s);y=f;break;case"source":tt("error",s),y=f;break;case"img":case"image":case"link":tt("error",s),tt("load",s),y=f;break;case"details":tt("toggle",s),y=f;break;case"input":Ce(s,f),y=ge(s,f),tt("invalid",s);break;case"option":y=f;break;case"select":s._wrapperState={wasMultiple:!!f.multiple},y=$({},f,{value:void 0}),tt("invalid",s);break;case"textarea":Xn(s,f),y=ft(s,f),tt("invalid",s);break;default:y=f}Dd(c,y),A=y;for(w in A)if(A.hasOwnProperty(w)){var M=A[w];w==="style"?Oo(s,M):w==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,M!=null&&Qi(s,M)):w==="children"?typeof M=="string"?(c!=="textarea"||M!=="")&&Ls(s,M):typeof M=="number"&&Ls(s,""+M):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?M!=null&&w==="onScroll"&&tt("scroll",s):M!=null&&T(s,w,M,R))}switch(c){case"input":Me(s),Je(s,f,!1);break;case"textarea":Me(s),Nn(s);break;case"option":f.value!=null&&s.setAttribute("value",""+de(f.value));break;case"select":s.multiple=!!f.multiple,w=f.value,w!=null?on(s,!!f.multiple,w,!1):f.defaultValue!=null&&on(s,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(s.onclick=ac)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return It(o),null;case 6:if(s&&o.stateNode!=null)gx(s,o,s.memoizedProps,f);else{if(typeof f!="string"&&o.stateNode===null)throw Error(n(166));if(c=Ws(ba.current),Ws(tr.current),pc(o)){if(f=o.stateNode,c=o.memoizedProps,f[er]=o,(w=f.nodeValue!==c)&&(s=ln,s!==null))switch(s.tag){case 3:ic(f.nodeValue,c,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&ic(f.nodeValue,c,(s.mode&1)!==0)}w&&(o.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[er]=o,o.stateNode=f}return It(o),null;case 13:if(nt(ot),f=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(st&&cn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)xv(),Go(),o.flags|=98560,w=!1;else if(w=pc(o),f!==null&&f.dehydrated!==null){if(s===null){if(!w)throw Error(n(318));if(w=o.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[er]=o}else Go(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;It(o),w=!1}else Dn!==null&&(hh(Dn),Dn=null),w=!0;if(!w)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=c,o):(f=f!==null,f!==(s!==null&&s.memoizedState!==null)&&f&&(o.child.flags|=8192,(o.mode&1)!==0&&(s===null||(ot.current&1)!==0?St===0&&(St=3):gh())),o.updateQueue!==null&&(o.flags|=4),It(o),null);case 4:return Jo(),nh(s,o),s===null&&pa(o.stateNode.containerInfo),It(o),null;case 10:return Nf(o.type._context),It(o),null;case 17:return Xt(o.type)&&cc(),It(o),null;case 19:if(nt(ot),w=o.memoizedState,w===null)return It(o),null;if(f=(o.flags&128)!==0,R=w.rendering,R===null)if(f)Ra(w,!1);else{if(St!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(R=wc(s),R!==null){for(o.flags|=128,Ra(w,!1),f=R.updateQueue,f!==null&&(o.updateQueue=f,o.flags|=4),o.subtreeFlags=0,f=c,c=o.child;c!==null;)w=c,s=f,w.flags&=14680066,R=w.alternate,R===null?(w.childLanes=0,w.lanes=s,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=R.childLanes,w.lanes=R.lanes,w.child=R.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=R.memoizedProps,w.memoizedState=R.memoizedState,w.updateQueue=R.updateQueue,w.type=R.type,s=R.dependencies,w.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),c=c.sibling;return Ze(ot,ot.current&1|2),o.child}s=s.sibling}w.tail!==null&&ht()>ni&&(o.flags|=128,f=!0,Ra(w,!1),o.lanes=4194304)}else{if(!f)if(s=wc(R),s!==null){if(o.flags|=128,f=!0,c=s.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),Ra(w,!0),w.tail===null&&w.tailMode==="hidden"&&!R.alternate&&!st)return It(o),null}else 2*ht()-w.renderingStartTime>ni&&c!==1073741824&&(o.flags|=128,f=!0,Ra(w,!1),o.lanes=4194304);w.isBackwards?(R.sibling=o.child,o.child=R):(c=w.last,c!==null?c.sibling=R:o.child=R,w.last=R)}return w.tail!==null?(o=w.tail,w.rendering=o,w.tail=o.sibling,w.renderingStartTime=ht(),o.sibling=null,c=ot.current,Ze(ot,f?c&1|2:c&1),o):(It(o),null);case 22:case 23:return mh(),f=o.memoizedState!==null,s!==null&&s.memoizedState!==null!==f&&(o.flags|=8192),f&&(o.mode&1)!==0?(un&1073741824)!==0&&(It(o),o.subtreeFlags&6&&(o.flags|=8192)):It(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function fN(s,o){switch(Cf(o),o.tag){case 1:return Xt(o.type)&&cc(),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Jo(),nt(Yt),nt(Dt),If(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 5:return Df(o),null;case 13:if(nt(ot),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Go()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return nt(ot),null;case 4:return Jo(),null;case 10:return Nf(o.type._context),null;case 22:case 23:return mh(),null;case 24:return null;default:return null}}var kc=!1,Ft=!1,hN=typeof WeakSet=="function"?WeakSet:Set,ve=null;function ei(s,o){var c=s.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){ct(s,o,f)}else c.current=null}function rh(s,o,c){try{c()}catch(f){ct(s,o,f)}}var yx=!1;function pN(s,o){if(mf=Ql,s=Qy(),af(s)){if("selectionStart"in s)var c={start:s.selectionStart,end:s.selectionEnd};else e:{c=(c=s.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var y=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var R=0,A=-1,M=-1,K=0,re=0,oe=s,ne=null;t:for(;;){for(var pe;oe!==c||y!==0&&oe.nodeType!==3||(A=R+y),oe!==w||f!==0&&oe.nodeType!==3||(M=R+f),oe.nodeType===3&&(R+=oe.nodeValue.length),(pe=oe.firstChild)!==null;)ne=oe,oe=pe;for(;;){if(oe===s)break t;if(ne===c&&++K===y&&(A=R),ne===w&&++re===f&&(M=R),(pe=oe.nextSibling)!==null)break;oe=ne,ne=oe.parentNode}oe=pe}c=A===-1||M===-1?null:{start:A,end:M}}else c=null}c=c||{start:0,end:0}}else c=null;for(gf={focusedElem:s,selectionRange:c},Ql=!1,ve=o;ve!==null;)if(o=ve,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,ve=s;else for(;ve!==null;){o=ve;try{var xe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Se=xe.memoizedProps,pt=xe.memoizedState,U=o.stateNode,F=U.getSnapshotBeforeUpdate(o.elementType===o.type?Se:Ln(o.type,Se),pt);U.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var z=o.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(le){ct(o,o.return,le)}if(s=o.sibling,s!==null){s.return=o.return,ve=s;break}ve=o.return}return xe=yx,yx=!1,xe}function Pa(s,o,c){var f=o.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&s)===s){var w=y.destroy;y.destroy=void 0,w!==void 0&&rh(o,c,w)}y=y.next}while(y!==f)}}function Nc(s,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&s)===s){var f=c.create;c.destroy=f()}c=c.next}while(c!==o)}}function sh(s){var o=s.ref;if(o!==null){var c=s.stateNode;switch(s.tag){case 5:s=c;break;default:s=c}typeof o=="function"?o(s):o.current=s}}function vx(s){var o=s.alternate;o!==null&&(s.alternate=null,vx(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&(delete o[er],delete o[ga],delete o[wf],delete o[Yk],delete o[Xk])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function xx(s){return s.tag===5||s.tag===3||s.tag===4}function wx(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||xx(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function oh(s,o,c){var f=s.tag;if(f===5||f===6)s=s.stateNode,o?c.nodeType===8?c.parentNode.insertBefore(s,o):c.insertBefore(s,o):(c.nodeType===8?(o=c.parentNode,o.insertBefore(s,c)):(o=c,o.appendChild(s)),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=ac));else if(f!==4&&(s=s.child,s!==null))for(oh(s,o,c),s=s.sibling;s!==null;)oh(s,o,c),s=s.sibling}function ih(s,o,c){var f=s.tag;if(f===5||f===6)s=s.stateNode,o?c.insertBefore(s,o):c.appendChild(s);else if(f!==4&&(s=s.child,s!==null))for(ih(s,o,c),s=s.sibling;s!==null;)ih(s,o,c),s=s.sibling}var kt=null,In=!1;function Yr(s,o,c){for(c=c.child;c!==null;)bx(s,o,c),c=c.sibling}function bx(s,o,c){if(Zn&&typeof Zn.onCommitFiberUnmount=="function")try{Zn.onCommitFiberUnmount(zl,c)}catch{}switch(c.tag){case 5:Ft||ei(c,o);case 6:var f=kt,y=In;kt=null,Yr(s,o,c),kt=f,In=y,kt!==null&&(In?(s=kt,c=c.stateNode,s.nodeType===8?s.parentNode.removeChild(c):s.removeChild(c)):kt.removeChild(c.stateNode));break;case 18:kt!==null&&(In?(s=kt,c=c.stateNode,s.nodeType===8?xf(s.parentNode,c):s.nodeType===1&&xf(s,c),oa(s)):xf(kt,c.stateNode));break;case 4:f=kt,y=In,kt=c.stateNode.containerInfo,In=!0,Yr(s,o,c),kt=f,In=y;break;case 0:case 11:case 14:case 15:if(!Ft&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var w=y,R=w.destroy;w=w.tag,R!==void 0&&((w&2)!==0||(w&4)!==0)&&rh(c,o,R),y=y.next}while(y!==f)}Yr(s,o,c);break;case 1:if(!Ft&&(ei(c,o),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(A){ct(c,o,A)}Yr(s,o,c);break;case 21:Yr(s,o,c);break;case 22:c.mode&1?(Ft=(f=Ft)||c.memoizedState!==null,Yr(s,o,c),Ft=f):Yr(s,o,c);break;default:Yr(s,o,c)}}function Sx(s){var o=s.updateQueue;if(o!==null){s.updateQueue=null;var c=s.stateNode;c===null&&(c=s.stateNode=new hN),o.forEach(function(f){var y=EN.bind(null,s,f);c.has(f)||(c.add(f),f.then(y,y))})}}function Fn(s,o){var c=o.deletions;if(c!==null)for(var f=0;f<c.length;f++){var y=c[f];try{var w=s,R=o,A=R;e:for(;A!==null;){switch(A.tag){case 5:kt=A.stateNode,In=!1;break e;case 3:kt=A.stateNode.containerInfo,In=!0;break e;case 4:kt=A.stateNode.containerInfo,In=!0;break e}A=A.return}if(kt===null)throw Error(n(160));bx(w,R,y),kt=null,In=!1;var M=y.alternate;M!==null&&(M.return=null),y.return=null}catch(K){ct(y,o,K)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Ex(o,s),o=o.sibling}function Ex(s,o){var c=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Fn(o,s),rr(s),f&4){try{Pa(3,s,s.return),Nc(3,s)}catch(Se){ct(s,s.return,Se)}try{Pa(5,s,s.return)}catch(Se){ct(s,s.return,Se)}}break;case 1:Fn(o,s),rr(s),f&512&&c!==null&&ei(c,c.return);break;case 5:if(Fn(o,s),rr(s),f&512&&c!==null&&ei(c,c.return),s.flags&32){var y=s.stateNode;try{Ls(y,"")}catch(Se){ct(s,s.return,Se)}}if(f&4&&(y=s.stateNode,y!=null)){var w=s.memoizedProps,R=c!==null?c.memoizedProps:w,A=s.type,M=s.updateQueue;if(s.updateQueue=null,M!==null)try{A==="input"&&w.type==="radio"&&w.name!=null&&ye(y,w),Ld(A,R);var K=Ld(A,w);for(R=0;R<M.length;R+=2){var re=M[R],oe=M[R+1];re==="style"?Oo(y,oe):re==="dangerouslySetInnerHTML"?Qi(y,oe):re==="children"?Ls(y,oe):T(y,re,oe,K)}switch(A){case"input":Be(y,w);break;case"textarea":gn(y,w);break;case"select":var ne=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var pe=w.value;pe!=null?on(y,!!w.multiple,pe,!1):ne!==!!w.multiple&&(w.defaultValue!=null?on(y,!!w.multiple,w.defaultValue,!0):on(y,!!w.multiple,w.multiple?[]:"",!1))}y[ga]=w}catch(Se){ct(s,s.return,Se)}}break;case 6:if(Fn(o,s),rr(s),f&4){if(s.stateNode===null)throw Error(n(162));y=s.stateNode,w=s.memoizedProps;try{y.nodeValue=w}catch(Se){ct(s,s.return,Se)}}break;case 3:if(Fn(o,s),rr(s),f&4&&c!==null&&c.memoizedState.isDehydrated)try{oa(o.containerInfo)}catch(Se){ct(s,s.return,Se)}break;case 4:Fn(o,s),rr(s);break;case 13:Fn(o,s),rr(s),y=s.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(ch=ht())),f&4&&Sx(s);break;case 22:if(re=c!==null&&c.memoizedState!==null,s.mode&1?(Ft=(K=Ft)||re,Fn(o,s),Ft=K):Fn(o,s),rr(s),f&8192){if(K=s.memoizedState!==null,(s.stateNode.isHidden=K)&&!re&&(s.mode&1)!==0)for(ve=s,re=s.child;re!==null;){for(oe=ve=re;ve!==null;){switch(ne=ve,pe=ne.child,ne.tag){case 0:case 11:case 14:case 15:Pa(4,ne,ne.return);break;case 1:ei(ne,ne.return);var xe=ne.stateNode;if(typeof xe.componentWillUnmount=="function"){f=ne,c=ne.return;try{o=f,xe.props=o.memoizedProps,xe.state=o.memoizedState,xe.componentWillUnmount()}catch(Se){ct(f,c,Se)}}break;case 5:ei(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Rx(oe);continue}}pe!==null?(pe.return=ne,ve=pe):Rx(oe)}re=re.sibling}e:for(re=null,oe=s;;){if(oe.tag===5){if(re===null){re=oe;try{y=oe.stateNode,K?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(A=oe.stateNode,M=oe.memoizedProps.style,R=M!=null&&M.hasOwnProperty("display")?M.display:null,A.style.display=Jn("display",R))}catch(Se){ct(s,s.return,Se)}}}else if(oe.tag===6){if(re===null)try{oe.stateNode.nodeValue=K?"":oe.memoizedProps}catch(Se){ct(s,s.return,Se)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===s)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===s)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===s)break e;re===oe&&(re=null),oe=oe.return}re===oe&&(re=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Fn(o,s),rr(s),f&4&&Sx(s);break;case 21:break;default:Fn(o,s),rr(s)}}function rr(s){var o=s.flags;if(o&2){try{e:{for(var c=s.return;c!==null;){if(xx(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(Ls(y,""),f.flags&=-33);var w=wx(s);ih(s,w,y);break;case 3:case 4:var R=f.stateNode.containerInfo,A=wx(s);oh(s,A,R);break;default:throw Error(n(161))}}catch(M){ct(s,s.return,M)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function mN(s,o,c){ve=s,Cx(s)}function Cx(s,o,c){for(var f=(s.mode&1)!==0;ve!==null;){var y=ve,w=y.child;if(y.tag===22&&f){var R=y.memoizedState!==null||kc;if(!R){var A=y.alternate,M=A!==null&&A.memoizedState!==null||Ft;A=kc;var K=Ft;if(kc=R,(Ft=M)&&!K)for(ve=y;ve!==null;)R=ve,M=R.child,R.tag===22&&R.memoizedState!==null?Px(y):M!==null?(M.return=R,ve=M):Px(y);for(;w!==null;)ve=w,Cx(w),w=w.sibling;ve=y,kc=A,Ft=K}_x(s)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,ve=w):_x(s)}}function _x(s){for(;ve!==null;){var o=ve;if((o.flags&8772)!==0){var c=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Ft||Nc(5,o);break;case 1:var f=o.stateNode;if(o.flags&4&&!Ft)if(c===null)f.componentDidMount();else{var y=o.elementType===o.type?c.memoizedProps:Ln(o.type,c.memoizedProps);f.componentDidUpdate(y,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=o.updateQueue;w!==null&&Rv(o,w,f);break;case 3:var R=o.updateQueue;if(R!==null){if(c=null,o.child!==null)switch(o.child.tag){case 5:c=o.child.stateNode;break;case 1:c=o.child.stateNode}Rv(o,R,c)}break;case 5:var A=o.stateNode;if(c===null&&o.flags&4){c=A;var M=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":M.autoFocus&&c.focus();break;case"img":M.src&&(c.src=M.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var K=o.alternate;if(K!==null){var re=K.memoizedState;if(re!==null){var oe=re.dehydrated;oe!==null&&oa(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ft||o.flags&512&&sh(o)}catch(ne){ct(o,o.return,ne)}}if(o===s){ve=null;break}if(c=o.sibling,c!==null){c.return=o.return,ve=c;break}ve=o.return}}function Rx(s){for(;ve!==null;){var o=ve;if(o===s){ve=null;break}var c=o.sibling;if(c!==null){c.return=o.return,ve=c;break}ve=o.return}}function Px(s){for(;ve!==null;){var o=ve;try{switch(o.tag){case 0:case 11:case 15:var c=o.return;try{Nc(4,o)}catch(M){ct(o,c,M)}break;case 1:var f=o.stateNode;if(typeof f.componentDidMount=="function"){var y=o.return;try{f.componentDidMount()}catch(M){ct(o,y,M)}}var w=o.return;try{sh(o)}catch(M){ct(o,w,M)}break;case 5:var R=o.return;try{sh(o)}catch(M){ct(o,R,M)}}}catch(M){ct(o,o.return,M)}if(o===s){ve=null;break}var A=o.sibling;if(A!==null){A.return=o.return,ve=A;break}ve=o.return}}var gN=Math.ceil,Ac=k.ReactCurrentDispatcher,ah=k.ReactCurrentOwner,bn=k.ReactCurrentBatchConfig,He=0,Rt=null,yt=null,Nt=0,un=0,ti=Hr(0),St=0,Ta=null,qs=0,jc=0,lh=0,ka=null,Zt=null,ch=0,ni=1/0,Er=null,Oc=!1,uh=null,Xr=null,Mc=!1,Jr=null,Dc=0,Na=0,dh=null,Lc=-1,Ic=0;function Kt(){return(He&6)!==0?ht():Lc!==-1?Lc:Lc=ht()}function Zr(s){return(s.mode&1)===0?1:(He&2)!==0&&Nt!==0?Nt&-Nt:Zk.transition!==null?(Ic===0&&(Ic=wy()),Ic):(s=Qe,s!==0||(s=window.event,s=s===void 0?16:ky(s.type)),s)}function Bn(s,o,c,f){if(50<Na)throw Na=0,dh=null,Error(n(185));ea(s,c,f),((He&2)===0||s!==Rt)&&(s===Rt&&((He&2)===0&&(jc|=c),St===4&&es(s,Nt)),en(s,f),c===1&&He===0&&(o.mode&1)===0&&(ni=ht()+500,dc&&Kr()))}function en(s,o){var c=s.callbackNode;ZT(s,o);var f=ql(s,s===Rt?Nt:0);if(f===0)c!==null&&yy(c),s.callbackNode=null,s.callbackPriority=0;else if(o=f&-f,s.callbackPriority!==o){if(c!=null&&yy(c),o===1)s.tag===0?Jk(kx.bind(null,s)):pv(kx.bind(null,s)),Gk(function(){(He&6)===0&&Kr()}),c=null;else{switch(by(f)){case 1:c=zd;break;case 4:c=vy;break;case 16:c=Ul;break;case 536870912:c=xy;break;default:c=Ul}c=Ix(c,Tx.bind(null,s))}s.callbackPriority=o,s.callbackNode=c}}function Tx(s,o){if(Lc=-1,Ic=0,(He&6)!==0)throw Error(n(327));var c=s.callbackNode;if(ri()&&s.callbackNode!==c)return null;var f=ql(s,s===Rt?Nt:0);if(f===0)return null;if((f&30)!==0||(f&s.expiredLanes)!==0||o)o=Fc(s,f);else{o=f;var y=He;He|=2;var w=Ax();(Rt!==s||Nt!==o)&&(Er=null,ni=ht()+500,Gs(s,o));do try{xN();break}catch(A){Nx(s,A)}while(!0);kf(),Ac.current=w,He=y,yt!==null?o=0:(Rt=null,Nt=0,o=St)}if(o!==0){if(o===2&&(y=Wd(s),y!==0&&(f=y,o=fh(s,y))),o===1)throw c=Ta,Gs(s,0),es(s,f),en(s,ht()),c;if(o===6)es(s,f);else{if(y=s.current.alternate,(f&30)===0&&!yN(y)&&(o=Fc(s,f),o===2&&(w=Wd(s),w!==0&&(f=w,o=fh(s,w))),o===1))throw c=Ta,Gs(s,0),es(s,f),en(s,ht()),c;switch(s.finishedWork=y,s.finishedLanes=f,o){case 0:case 1:throw Error(n(345));case 2:Qs(s,Zt,Er);break;case 3:if(es(s,f),(f&130023424)===f&&(o=ch+500-ht(),10<o)){if(ql(s,0)!==0)break;if(y=s.suspendedLanes,(y&f)!==f){Kt(),s.pingedLanes|=s.suspendedLanes&y;break}s.timeoutHandle=vf(Qs.bind(null,s,Zt,Er),o);break}Qs(s,Zt,Er);break;case 4:if(es(s,f),(f&4194240)===f)break;for(o=s.eventTimes,y=-1;0<f;){var R=31-On(f);w=1<<R,R=o[R],R>y&&(y=R),f&=~w}if(f=y,f=ht()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*gN(f/1960))-f,10<f){s.timeoutHandle=vf(Qs.bind(null,s,Zt,Er),f);break}Qs(s,Zt,Er);break;case 5:Qs(s,Zt,Er);break;default:throw Error(n(329))}}}return en(s,ht()),s.callbackNode===c?Tx.bind(null,s):null}function fh(s,o){var c=ka;return s.current.memoizedState.isDehydrated&&(Gs(s,o).flags|=256),s=Fc(s,o),s!==2&&(o=Zt,Zt=c,o!==null&&hh(o)),s}function hh(s){Zt===null?Zt=s:Zt.push.apply(Zt,s)}function yN(s){for(var o=s;;){if(o.flags&16384){var c=o.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var y=c[f],w=y.getSnapshot;y=y.value;try{if(!Mn(w(),y))return!1}catch{return!1}}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function es(s,o){for(o&=~lh,o&=~jc,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var c=31-On(o),f=1<<c;s[c]=-1,o&=~f}}function kx(s){if((He&6)!==0)throw Error(n(327));ri();var o=ql(s,0);if((o&1)===0)return en(s,ht()),null;var c=Fc(s,o);if(s.tag!==0&&c===2){var f=Wd(s);f!==0&&(o=f,c=fh(s,f))}if(c===1)throw c=Ta,Gs(s,0),es(s,o),en(s,ht()),c;if(c===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Qs(s,Zt,Er),en(s,ht()),null}function ph(s,o){var c=He;He|=1;try{return s(o)}finally{He=c,He===0&&(ni=ht()+500,dc&&Kr())}}function Ks(s){Jr!==null&&Jr.tag===0&&(He&6)===0&&ri();var o=He;He|=1;var c=bn.transition,f=Qe;try{if(bn.transition=null,Qe=1,s)return s()}finally{Qe=f,bn.transition=c,He=o,(He&6)===0&&Kr()}}function mh(){un=ti.current,nt(ti)}function Gs(s,o){s.finishedWork=null,s.finishedLanes=0;var c=s.timeoutHandle;if(c!==-1&&(s.timeoutHandle=-1,Kk(c)),yt!==null)for(c=yt.return;c!==null;){var f=c;switch(Cf(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&cc();break;case 3:Jo(),nt(Yt),nt(Dt),If();break;case 5:Df(f);break;case 4:Jo();break;case 13:nt(ot);break;case 19:nt(ot);break;case 10:Nf(f.type._context);break;case 22:case 23:mh()}c=c.return}if(Rt=s,yt=s=ts(s.current,null),Nt=un=o,St=0,Ta=null,lh=jc=qs=0,Zt=ka=null,zs!==null){for(o=0;o<zs.length;o++)if(c=zs[o],f=c.interleaved,f!==null){c.interleaved=null;var y=f.next,w=c.pending;if(w!==null){var R=w.next;w.next=y,f.next=R}c.pending=f}zs=null}return s}function Nx(s,o){do{var c=yt;try{if(kf(),bc.current=_c,Sc){for(var f=it.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}Sc=!1}if(Hs=0,_t=bt=it=null,Sa=!1,Ea=0,ah.current=null,c===null||c.return===null){St=1,Ta=o,yt=null;break}e:{var w=s,R=c.return,A=c,M=o;if(o=Nt,A.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){var K=M,re=A,oe=re.tag;if((re.mode&1)===0&&(oe===0||oe===11||oe===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var pe=tx(R);if(pe!==null){pe.flags&=-257,nx(pe,R,A,w,o),pe.mode&1&&ex(w,K,o),o=pe,M=K;var xe=o.updateQueue;if(xe===null){var Se=new Set;Se.add(M),o.updateQueue=Se}else xe.add(M);break e}else{if((o&1)===0){ex(w,K,o),gh();break e}M=Error(n(426))}}else if(st&&A.mode&1){var pt=tx(R);if(pt!==null){(pt.flags&65536)===0&&(pt.flags|=256),nx(pt,R,A,w,o),Pf(Zo(M,A));break e}}w=M=Zo(M,A),St!==4&&(St=2),ka===null?ka=[w]:ka.push(w),w=R;do{switch(w.tag){case 3:w.flags|=65536,o&=-o,w.lanes|=o;var U=Jv(w,M,o);_v(w,U);break e;case 1:A=M;var F=w.type,z=w.stateNode;if((w.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(Xr===null||!Xr.has(z)))){w.flags|=65536,o&=-o,w.lanes|=o;var le=Zv(w,A,o);_v(w,le);break e}}w=w.return}while(w!==null)}Ox(c)}catch(Ee){o=Ee,yt===c&&c!==null&&(yt=c=c.return);continue}break}while(!0)}function Ax(){var s=Ac.current;return Ac.current=_c,s===null?_c:s}function gh(){(St===0||St===3||St===2)&&(St=4),Rt===null||(qs&268435455)===0&&(jc&268435455)===0||es(Rt,Nt)}function Fc(s,o){var c=He;He|=2;var f=Ax();(Rt!==s||Nt!==o)&&(Er=null,Gs(s,o));do try{vN();break}catch(y){Nx(s,y)}while(!0);if(kf(),He=c,Ac.current=f,yt!==null)throw Error(n(261));return Rt=null,Nt=0,St}function vN(){for(;yt!==null;)jx(yt)}function xN(){for(;yt!==null&&!WT();)jx(yt)}function jx(s){var o=Lx(s.alternate,s,un);s.memoizedProps=s.pendingProps,o===null?Ox(s):yt=o,ah.current=null}function Ox(s){var o=s;do{var c=o.alternate;if(s=o.return,(o.flags&32768)===0){if(c=dN(c,o,un),c!==null){yt=c;return}}else{if(c=fN(c,o),c!==null){c.flags&=32767,yt=c;return}
vendor: 4,484 bytes, line 40
40if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{St=6,yt=null;return}}if(o=o.sibling,o!==null){yt=o;return}yt=o=s}while(o!==null);St===0&&(St=5)}function Qs(s,o,c){var f=Qe,y=bn.transition;try{bn.transition=null,Qe=1,wN(s,o,c,f)}finally{bn.transition=y,Qe=f}return null}function wN(s,o,c,f){do ri();while(Jr!==null);if((He&6)!==0)throw Error(n(327));c=s.finishedWork;var y=s.finishedLanes;if(c===null)return null;if(s.finishedWork=null,s.finishedLanes=0,c===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var w=c.lanes|c.childLanes;if(ek(s,w),s===Rt&&(yt=Rt=null,Nt=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Mc||(Mc=!0,Ix(Ul,function(){return ri(),null})),w=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||w){w=bn.transition,bn.transition=null;var R=Qe;Qe=1;var A=He;He|=4,ah.current=null,pN(s,c),Ex(c,s),$k(gf),Ql=!!mf,gf=mf=null,s.current=c,mN(c),HT(),He=A,Qe=R,bn.transition=w}else s.current=c;if(Mc&&(Mc=!1,Jr=s,Dc=y),w=s.pendingLanes,w===0&&(Xr=null),GT(c.stateNode),en(s,ht()),o!==null)for(f=s.onRecoverableError,c=0;c<o.length;c++)y=o[c],f(y.value,{componentStack:y.stack,digest:y.digest});if(Oc)throw Oc=!1,s=uh,uh=null,s;return(Dc&1)!==0&&s.tag!==0&&ri(),w=s.pendingLanes,(w&1)!==0?s===dh?Na++:(Na=0,dh=s):Na=0,Kr(),null}function ri(){if(Jr!==null){var s=by(Dc),o=bn.transition,c=Qe;try{if(bn.transition=null,Qe=16>s?16:s,Jr===null)var f=!1;else{if(s=Jr,Jr=null,Dc=0,(He&6)!==0)throw Error(n(331));var y=He;for(He|=4,ve=s.current;ve!==null;){var w=ve,R=w.child;if((ve.flags&16)!==0){var A=w.deletions;if(A!==null){for(var M=0;M<A.length;M++){var K=A[M];for(ve=K;ve!==null;){var re=ve;switch(re.tag){case 0:case 11:case 15:Pa(8,re,w)}var oe=re.child;if(oe!==null)oe.return=re,ve=oe;else for(;ve!==null;){re=ve;var ne=re.sibling,pe=re.return;if(vx(re),re===K){ve=null;break}if(ne!==null){ne.return=pe,ve=ne;break}ve=pe}}}var xe=w.alternate;if(xe!==null){var Se=xe.child;if(Se!==null){xe.child=null;do{var pt=Se.sibling;Se.sibling=null,Se=pt}while(Se!==null)}}ve=w}}if((w.subtreeFlags&2064)!==0&&R!==null)R.return=w,ve=R;else e:for(;ve!==null;){if(w=ve,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Pa(9,w,w.return)}var U=w.sibling;if(U!==null){U.return=w.return,ve=U;break e}ve=w.return}}var F=s.current;for(ve=F;ve!==null;){R=ve;var z=R.child;if((R.subtreeFlags&2064)!==0&&z!==null)z.return=R,ve=z;else e:for(R=F;ve!==null;){if(A=ve,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:Nc(9,A)}}catch(Ee){ct(A,A.return,Ee)}if(A===R){ve=null;break e}var le=A.sibling;if(le!==null){le.return=A.return,ve=le;break e}ve=A.return}}if(He=y,Kr(),Zn&&typeof Zn.onPostCommitFiberRoot=="function")try{Zn.onPostCommitFiberRoot(zl,s)}catch{}f=!0}return f}finally{Qe=c,bn.transition=o}}return!1}function Mx(s,o,c){o=Zo(c,o),o=Jv(s,o,1),s=Qr(s,o,1),o=Kt(),s!==null&&(ea(s,1,o),en(s,o))}function ct(s,o,c){if(s.tag===3)Mx(s,s,c);else for(;o!==null;){if(o.tag===3){Mx(o,s,c);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Xr===null||!Xr.has(f))){s=Zo(c,s),s=Zv(o,s,1),o=Qr(o,s,1),s=Kt(),o!==null&&(ea(o,1,s),en(o,s));break}}o=o.return}}function bN(s,o,c){var f=s.pingCache;f!==null&&f.delete(o),o=Kt(),s.pingedLanes|=s.suspendedLanes&c,Rt===s&&(Nt&c)===c&&(St===4||St===3&&(Nt&130023424)===Nt&&500>ht()-ch?Gs(s,0):lh|=c),en(s,o)}function Dx(s,o){o===0&&((s.mode&1)===0?o=1:(o=Hl,Hl<<=1,(Hl&130023424)===0&&(Hl=4194304)));var c=Kt();s=wr(s,o),s!==null&&(ea(s,o,c),en(s,c))}function SN(s){var o=s.memoizedState,c=0;o!==null&&(c=o.retryLane),Dx(s,c)}function EN(s,o){var c=0;switch(s.tag){case 13:var f=s.stateNode,y=s.memoizedState;y!==null&&(c=y.retryLane);break;case 19:f=s.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(o),Dx(s,c)}var Lx;Lx=function(s,o,c){if(s!==null)if(s.memoizedProps!==o.pendingProps||Yt.current)Jt=!0;else{if((s.lanes&c)===0&&(o.flags&128)===0)return Jt=!1,uN(s,o,c);Jt=(s.flags&131072)!==0}else Jt=!1,st&&(o.flags&1048576)!==0&&mv(o,hc,o.index);switch(o.lanes=0,o.tag){case 2:var f=o.type;Tc(s,o),s=o.pendingProps;var y=Ho(o,Dt.current);Xo(o,c),y=$f(null,o,f,s,y,c);var w=Vf();return o.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Xt(f)?(w=!0,uc(o)):w=!1,o.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Of(o),y.updater=Rc,o.stateNode=y,y._reactInternals=o,Kf(o,f,s,c),o=Xf(null,o,f,!0,w,c
vendor: 9,931 bytes, line 40
40)):(o.tag=0,st&&w&&Ef(o),qt(null,o,y,c),o=o.child),o;case 16:f=o.elementType;e:{switch(Tc(s,o),s=o.pendingProps,y=f._init,f=y(f._payload),o.type=f,y=o.tag=_N(f),s=Ln(f,s),y){case 0:o=Yf(null,o,f,s,c);break e;case 1:o=lx(null,o,f,s,c);break e;case 11:o=rx(null,o,f,s,c);break e;case 14:o=sx(null,o,f,Ln(f.type,s),c);break e}throw Error(n(306,f,""))}return o;case 0:return f=o.type,y=o.pendingProps,y=o.elementType===f?y:Ln(f,y),Yf(s,o,f,y,c);case 1:return f=o.type,y=o.pendingProps,y=o.elementType===f?y:Ln(f,y),lx(s,o,f,y,c);case 3:e:{if(cx(o),s===null)throw Error(n(387));f=o.pendingProps,w=o.memoizedState,y=w.element,Cv(s,o),xc(o,f,null,c);var R=o.memoizedState;if(f=R.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){y=Zo(Error(n(423)),o),o=ux(s,o,f,c,y);break e}else if(f!==y){y=Zo(Error(n(424)),o),o=ux(s,o,f,c,y);break e}else for(cn=Wr(o.stateNode.containerInfo.firstChild),ln=o,st=!0,Dn=null,c=Sv(o,null,f,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Go(),f===y){o=Sr(s,o,c);break e}qt(s,o,f,c)}o=o.child}return o;case 5:return Pv(o),s===null&&Rf(o),f=o.type,y=o.pendingProps,w=s!==null?s.memoizedProps:null,R=y.children,yf(f,y)?R=null:w!==null&&yf(f,w)&&(o.flags|=32),ax(s,o),qt(s,o,R,c),o.child;case 6:return s===null&&Rf(o),null;case 13:return dx(s,o,c);case 4:return Mf(o,o.stateNode.containerInfo),f=o.pendingProps,s===null?o.child=Qo(o,null,f,c):qt(s,o,f,c),o.child;case 11:return f=o.type,y=o.pendingProps,y=o.elementType===f?y:Ln(f,y),rx(s,o,f,y,c);case 7:return qt(s,o,o.pendingProps,c),o.child;case 8:return qt(s,o,o.pendingProps.children,c),o.child;case 12:return qt(s,o,o.pendingProps.children,c),o.child;case 10:e:{if(f=o.type._context,y=o.pendingProps,w=o.memoizedProps,R=y.value,Ze(gc,f._currentValue),f._currentValue=R,w!==null)if(Mn(w.value,R)){if(w.children===y.children&&!Yt.current){o=Sr(s,o,c);break e}}else for(w=o.child,w!==null&&(w.return=o);w!==null;){var A=w.dependencies;if(A!==null){R=w.child;for(var M=A.firstContext;M!==null;){if(M.context===f){if(w.tag===1){M=br(-1,c&-c),M.tag=2;var K=w.updateQueue;if(K!==null){K=K.shared;var re=K.pending;re===null?M.next=M:(M.next=re.next,re.next=M),K.pending=M}}w.lanes|=c,M=w.alternate,M!==null&&(M.lanes|=c),Af(w.return,c,o),A.lanes|=c;break}M=M.next}}else if(w.tag===10)R=w.type===o.type?null:w.child;else if(w.tag===18){if(R=w.return,R===null)throw Error(n(341));R.lanes|=c,A=R.alternate,A!==null&&(A.lanes|=c),Af(R,c,o),R=w.sibling}else R=w.child;if(R!==null)R.return=w;else for(R=w;R!==null;){if(R===o){R=null;break}if(w=R.sibling,w!==null){w.return=R.return,R=w;break}R=R.return}w=R}qt(s,o,y.children,c),o=o.child}return o;case 9:return y=o.type,f=o.pendingProps.children,Xo(o,c),y=xn(y),f=f(y),o.flags|=1,qt(s,o,f,c),o.child;case 14:return f=o.type,y=Ln(f,o.pendingProps),y=Ln(f.type,y),sx(s,o,f,y,c);case 15:return ox(s,o,o.type,o.pendingProps,c);case 17:return f=o.type,y=o.pendingProps,y=o.elementType===f?y:Ln(f,y),Tc(s,o),o.tag=1,Xt(f)?(s=!0,uc(o)):s=!1,Xo(o,c),Yv(o,f,y),Kf(o,f,y,c),Xf(null,o,f,!0,s,c);case 19:return hx(s,o,c);case 22:return ix(s,o,c)}throw Error(n(156,o.tag))};function Ix(s,o){return gy(s,o)}function CN(s,o,c,f){this.tag=s,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(s,o,c,f){return new CN(s,o,c,f)}function yh(s){return s=s.prototype,!(!s||!s.isReactComponent)}function _N(s){if(typeof s=="function")return yh(s)?1:0;if(s!=null){if(s=s.$$typeof,s===ue)return 11;if(s===te)return 14}return 2}function ts(s,o){var c=s.alternate;return c===null?(c=Sn(s.tag,o,s.key,s.mode),c.elementType=s.elementType,c.type=s.type,c.stateNode=s.stateNode,c.alternate=s,s.alternate=c):(c.pendingProps=o,c.type=s.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=s.flags&14680064,c.childLanes=s.childLanes,c.lanes=s.lanes,c.child=s.child,c.memoizedProps=s.memoizedProps,c.memoizedState=s.memoizedState,c.updateQueue=s.updateQueue,o=s.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=s.sibling,c.index=s.index,c.ref=s.ref,c}function Bc(s,o,c,f,y,w){var R=2;if(f=s,typeof s=="function")yh(s)&&(R=1);else if(typeof s=="string")R=5;else e:switch(s){case B:return Ys(c.children,y,w,o);case O:R=8,y|=8;break;case G:return s=Sn(12,c,o,y|2),s.elementType=G,s.lanes=w,s;case ae:return s=Sn(13,c,o,y),s.elementType=ae,s.lanes=w,s;case W:return s=Sn(19,c,o,y),s.elementType=W,s.lanes=w,s;case ee:return $c(c,y,w,o);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case J:R=10;break e;case se:R=9;break e;case ue:R=11;break e;case te:R=14;break e;case Y:R=16,f=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return o=Sn(R,c,o,y),o.elementType=s,o.type=f,o.lanes=w,o}function Ys(s,o,c,f){return s=Sn(7,s,f,o),s.lanes=c,s}function $c(s,o,c,f){return s=Sn(22,s,f,o),s.elementType=ee,s.lanes=c,s.stateNode={isHidden:!1},s}function vh(s,o,c){return s=Sn(6,s,null,o),s.lanes=c,s}function xh(s,o,c){return o=Sn(4,s.children!==null?s.children:[],s.key,o),o.lanes=c,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function RN(s,o,c,f,y){this.tag=o,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hd(0),this.expirationTimes=Hd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hd(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function wh(s,o,c,f,y,w,R,A,M){return s=new RN(s,o,c,A,M),o===1?(o=1,w===!0&&(o|=8)):o=0,w=Sn(3,null,null,o),s.current=w,w.stateNode=s,w.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Of(w),s}function PN(s,o,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:f==null?null:""+f,children:s,containerInfo:o,implementation:c}}function Fx(s){if(!s)return qr;s=s._reactInternals;e:{if(Fs(s)!==s||s.tag!==1)throw Error(n(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Xt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(s.tag===1){var c=s.type;if(Xt(c))return fv(s,c,o)}return o}function Bx(s,o,c,f,y,w,R,A,M){return s=wh(c,f,!0,s,y,w,R,A,M),s.context=Fx(null),c=s.current,f=Kt(),y=Zr(c),w=br(f,y),w.callback=o??null,Qr(c,w,y),s.current.lanes=y,ea(s,y,f),en(s,f),s}function Vc(s,o,c,f){var y=o.current,w=Kt(),R=Zr(y);return c=Fx(c),o.context===null?o.context=c:o.pendingContext=c,o=br(w,R),o.payload={element:s},f=f===void 0?null:f,f!==null&&(o.callback=f),s=Qr(y,o,R),s!==null&&(Bn(s,y,R,w),vc(s,y,R)),R}function Uc(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function $x(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var c=s.retryLane;s.retryLane=c!==0&&c<o?c:o}}function bh(s,o){$x(s,o),(s=s.alternate)&&$x(s,o)}function TN(){return null}var Vx=typeof reportError=="function"?reportError:function(s){console.error(s)};function Sh(s){this._internalRoot=s}zc.prototype.render=Sh.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(n(409));Vc(s,o,null,null)},zc.prototype.unmount=Sh.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;Ks(function(){Vc(null,s,null,null)}),o[gr]=null}};function zc(s){this._internalRoot=s}zc.prototype.unstable_scheduleHydration=function(s){if(s){var o=Cy();s={blockedOn:null,target:s,priority:o};for(var c=0;c<Vr.length&&o!==0&&o<Vr[c].priority;c++);Vr.splice(c,0,s),c===0&&Py(s)}};function Eh(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Wc(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Ux(){}function kN(s,o,c,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var K=Uc(R);w.call(K)}}var R=Bx(o,f,s,0,null,!1,!1,"",Ux);return s._reactRootContainer=R,s[gr]=R.current,pa(s.nodeType===8?s.parentNode:s),Ks(),R}for(;y=s.lastChild;)s.removeChild(y);if(typeof f=="function"){var A=f;f=function(){var K=Uc(M);A.call(K)}}var M=wh(s,0,!1,null,null,!1,!1,"",Ux);return s._reactRootContainer=M,s[gr]=M.current,pa(s.nodeType===8?s.parentNode:s),Ks(function(){Vc(o,M,c,f)}),M}function Hc(s,o,c,f,y){var w=c._reactRootContainer;if(w){var R=w;if(typeof y=="function"){var A=y;y=function(){var M=Uc(R);A.call(M)}}Vc(o,R,s,y)}else R=kN(c,o,s,y,f);return Uc(R)}Sy=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var c=Zi(o.pendingLanes);c!==0&&(qd(o,c|1),en(o,ht()),(He&6)===0&&(ni=ht()+500,Kr()))}break;case 13:Ks(function(){var f=wr(s,1);if(f!==null){var y=Kt();Bn(f,s,1,y)}}),bh(s,1)}},Kd=function(s){if(s.tag===13){var o=wr(s,134217728);if(o!==null){var c=Kt();Bn(o,s,134217728,c)}bh(s,134217728)}},Ey=function(s){if(s.tag===13){var o=Zr(s),c=wr(s,o);if(c!==null){var f=Kt();Bn(c,s,o,f)}bh(s,o)}},Cy=function(){return Qe},_y=function(s,o){var c=Qe;try{return Qe=s,o()}finally{Qe=c}},Bd=function(s,o,c){switch(o){case"input":if(Be(s,c),o=c.name,c.type==="radio"&&o!=null){for(c=s;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<c.length;o++){var f=c[o];if(f!==s&&f.form===s.form){var y=lc(f);
40if(!y)throw Error(n(90));Ae(f),Be(f,y)}}}break;case"textarea":gn(s,c);break;case"select":o=c.value,o!=null&&on(s,!!c.multiple,o,!1)}},cy=ph,uy=Ks;var NN={usingClientEntryPoint:!1,Events:[ya,zo,lc,ay,ly,ph]},Aa={findFiberByHostInstance:Bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AN={bundleType:Aa.bundleType,version:Aa.version,rendererPackageName:Aa.rendererPackageName,rendererConfig:Aa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=py(s),s===null?null:s.stateNode},findFiberByHostInstance:Aa.findFiberByHostInstance||TN,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 qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qc.isDisabled&&qc.supportsFiber)try{zl=qc.inject(AN),Zn=qc}catch{}}return tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NN,tn.createPortal=function(s,o){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Eh(o))throw Error(n(200));return PN(s,o,null,c)},tn.createRoot=function(s,o){if(!Eh(s))throw Error(n(299));var c=!1,f="",y=Vx;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(y=o.onRecoverableError)),o=wh(s,1,!1,null,null,c,!1,f,y),s[gr]=o.current,pa(s.nodeType===8?s.parentNode:s),new Sh(o)},tn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=py(o),s=s===null?null:s.stateNode,s},tn.flushSync=function(s){return Ks(s)},tn.hydrate=function(s,o,c){if(!Wc(o))throw Error(n(200));return Hc(null,s,o,!0,c)},tn.hydrateRoot=function(s,o,c){if(!Eh(s))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,y=!1,w="",R=Vx;if(c!=null&&(c.unstable_strictMode===!0&&(y=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onRecoverableError!==void 0&&(R=c.onRecoverableError)),o=Bx(o,null,s,1,c??null,y,!1,w,R),s[gr]=o.current,pa(s),f)for(s=0;s<f.length;s++)c=f[s],y=c._getVersion,y=y(c._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[c,y]:o.mutableSourceEagerHydrationData.push(c,y);return new zc(o)},tn.render=function(s,o,c){if(!Wc(o))throw Error(n(200));return Hc(null,s,o,!1,c)},tn.unmountComponentAtNode=function(s){if(!Wc(s))throw Error(n(40));return s._reactRootContainer?(Ks(function(){Hc(null,null,s,!1,function(){s._reactRootContainer=null,s[gr]=null})}),!0):!1},tn.unstable_batchedUpdates=ph,tn.unstable_renderSubtreeIntoContainer=function(s,o,c,f){if(!Wc(c))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Hc(s,o,c,!1,f)},tn.version="18.3.1-next-f1338f8080-20240426",tn}var Xx;function SS(){if(Xx)return Ph.exports;Xx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ph.exports=VN(),Ph.exports}var Jx;function UN(){if(Jx)return Gc;Jx=1;var e=SS();return Gc.createRoot=e.createRoot,Gc.hydrateRoot=e.hydrateRoot,Gc}var zN=UN();const WN=Cm(zN),HN=20,qN=1e6,kr={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Nh=0;function KN(){return Nh=(Nh+1)%Number.MAX_VALUE,Nh.toString()}const Ah=new Map,Zx=e=>{if(Ah.has(e))return;const t=setTimeout(()=>{Ah.delete(e),Qa({type:kr.REMOVE_TOAST,toastId:e})},qN);Ah.set(e,t)},GN=(e,t)=>{switch(t.type){case kr.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,HN)};case kr.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case kr.DISMISS_TOAST:{const{toastId:n}=t;
40return n?Zx(n):e.toasts.forEach(r=>{Zx(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case kr.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},fu=[];let hu={toasts:[]};function Qa(e){hu=GN(hu,e),fu.forEach(t=>{t(hu)})}function rl({...e}){const t=KN(),n=i=>Qa({type:kr.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>Qa({type:kr.DISMISS_TOAST,toastId:t});return Qa({type:kr.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function QN(){const[e,t]=v.useState(hu);return v.useEffect(()=>(fu.push(t),()=>{const n=fu.indexOf(t);n>-1&&fu.splice(n,1)}),[e]),{...e,toast:rl,dismiss:n=>Qa({type:kr.DISMISS_TOAST,toastId:n})}}function ES(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ES(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function CS(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ES(e))&&(r&&(r+=" "),r+=t);return r}const ew=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tw=CS,rd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,l=Object.keys(i).map(h=>{const m=n==null?void 0:n[h],g=a==null?void 0:a[h];if(m===null)return null;const x=ew(m)||ew(g);return i[h][x]}),u=n&&Object.entries(n).reduce((h,m)=>{let[g,x]=m;return x===void 0||(h[g]=x),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,m)=>{let{class:g,className:x,...S}=m;return Object.entries(S).every(_=>{let[b,C]=_;return Array.isArray(C)?C.includes({...a,...u}[b]):{...a,...u}[b]===C})?[...h,g,x]:h},[]);return tw(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.475.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const YN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_S=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.475.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var XN={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"};/** 51 * @license lucide-react v0.475.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const JN=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:l,...u},d)=>v.createElement("svg",{ref:d,...XN,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_S("lucide",i),...u},[...l.map(([h,m])=>v.createElement(h,m)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.475.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const ze=(e,t)=>{const n=v.forwardRef(({className:r,...i},a)=>v.createElement(JN,{ref:a,iconNode:t,className:_S(`lucide-${YN(e)}`,r),...i}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.475.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const ZN=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],RS=ze("ArrowLeft",ZN);/** 66 * @license lucide-react v0.475.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const eA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],tA=ze("ArrowRight",eA);/** 71 * @license lucide-react v0.475.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const nA=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],PS=ze("Calendar",nA);/** 76 * @license lucide-react v0.475.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const rA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_m=ze("Check",rA);/** 81 * @license lucide-react v0.475.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const sA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],TS=ze("ChevronDown",sA);/** 86 * @license lucide-react v0.475.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const oA=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],kS=ze("ChevronRight",oA);/** 91 * @license lucide-react v0.475.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const iA=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],aA=ze("ChevronUp",iA);/** 96 * @license lucide-react v0.475.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const lA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cA=ze("Circle",lA);/** 101 * @license lucide-react v0.475.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const uA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]],NS=ze("Crosshair",uA);
105/** 106 * @license lucide-react v0.475.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const dA=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],fA=ze("Crown",dA);/** 111 * @license lucide-react v0.475.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const hA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],pA=ze("Info",hA);/** 116 * @license lucide-react v0.475.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const mA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],xo=ze("LoaderCircle",mA);/** 121 * @license lucide-react v0.475.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const gA=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],mi=ze("Lock",gA);/** 126 * @license lucide-react v0.475.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const yA=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],vA=ze("LogIn",yA);/** 131 * @license lucide-react v0.475.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const xA=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],wA=ze("LogOut",xA);/** 136 * @license lucide-react v0.475.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const bA=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],sl=ze("Mail",bA);/** 141 * @license lucide-react v0.475.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const SA=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],AS=ze("MapPin",SA);/** 146 * @license lucide-react v0.475.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const EA=[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]],vp=ze("Medal",EA);/** 151 * @license lucide-react v0.475.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const CA=[["path",{d:"M5 12h14",key:"1ays0h"}]],_A=ze("Minus",CA);/** 156 * @license lucide-react v0.475.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const RA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],PA=ze("Plus",RA);/** 161 * @license lucide-react v0.475.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const TA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],kA=ze("RefreshCw",TA);/** 166 * @license lucide-react v0.475.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const NA=[["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"}]],AA=ze("RotateCcw",NA);/** 171 * @license lucide-react v0.475.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const jA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],OA=ze("Save",jA);/** 176 * @license lucide-react v0.475.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const MA=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],nw=ze("Settings2",MA);/** 181 * @license lucide-react v0.475.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const DA=[["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",ke
185y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Oa=ze("ShieldCheck",DA);/** 186 * @license lucide-react v0.475.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const LA=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],IA=ze("Shuffle",LA);/** 191 * @license lucide-react v0.475.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const FA=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],Tu=ze("Swords",FA);/** 196 * @license lucide-react v0.475.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const BA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],$A=ze("Target",BA);/** 201 * @license lucide-react v0.475.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const VA=[["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"}]],jS=ze("Trash2",VA);/** 206 * @license lucide-react v0.475.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const UA=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],zA=ze("TriangleAlert",UA);/** 211 * @license lucide-react v0.475.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const WA=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],ku=ze("Trophy",WA);/** 216 * @license lucide-react v0.475.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const HA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],OS=ze("UserPlus",HA);/** 221 * @license lucide-react v0.475.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const qA=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],KA=ze("User",qA);/** 226 * @license lucide-react v0.475.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const GA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Nu=ze("Users",GA);/** 231 * @license lucide-react v0.475.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const QA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 6,699 bytes, line 235
235],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],MS=ze("X",QA),YA=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},XA=(e,t)=>({classGroupId:e,validator:t}),DS=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Au="-",rw=[],JA="arbitrary..",ZA=e=>{const t=tj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return ej(l);const u=l.split(Au),d=u[0]===""&&u.length>1?1:0;return LS(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],h=n[l];return d?h?YA(h,d):d:h||rw}return n[l]||rw}}},LS=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const h=LS(e,t+1,a);if(h)return h}const l=n.validators;if(l===null)return;const u=t===0?e.join(Au):e.slice(t).join(Au),d=l.length;for(let h=0;h<d;h++){const m=l[h];if(m.validator(u))return m.classGroupId}},ej=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?JA+r:void 0})(),tj=e=>{const{theme:t,classGroups:n}=e;return nj(n,t)},nj=(e,t)=>{const n=DS();for(const r in e){const i=e[r];Rm(i,n,r,t)}return n},Rm=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const l=e[a];rj(l,t,n,r)}},rj=(e,t,n,r)=>{if(typeof e=="string"){sj(e,t,n);return}if(typeof e=="function"){oj(e,t,n,r);return}ij(e,t,n,r)},sj=(e,t,n)=>{const r=e===""?t:IS(t,e);r.classGroupId=n},oj=(e,t,n,r)=>{if(aj(e)){Rm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(XA(n,e))},ij=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let l=0;l<a;l++){const[u,d]=i[l];Rm(d,IS(t,u),n,r)}},IS=(e,t)=>{let n=e;const r=t.split(Au),i=r.length;for(let a=0;a<i;a++){const l=r[a];let u=n.nextPart.get(l);u||(u=DS(),n.nextPart.set(l,u)),n=u}return n},aj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,lj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return i(a,l),l},set(a,l){a in n?n[a]=l:i(a,l)}}},xp="!",sw=":",cj=[],ow=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),uj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let l=0,u=0,d=0,h;const m=i.length;for(let b=0;b<m;b++){const C=i[b];if(l===0&&u===0){if(C===sw){a.push(i.slice(d,b)),d=b+1;continue}if(C==="/"){h=b;continue}}C==="["?l++:C==="]"?l--:C==="("?u++:C===")"&&u--}const g=a.length===0?i:i.slice(d);let x=g,S=!1;g.endsWith(xp)?(x=g.slice(0,-1),S=!0):g.startsWith(xp)&&(x=g.slice(1),S=!0);const _=h&&h>d?h-d:void 0;return ow(a,S,x,_)};if(t){const i=t+sw,a=r;r=l=>l.startsWith(i)?a(l.slice(i.length)):ow(cj,!1,l,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},dj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const l=n[a],u=l[0]==="[",d=t.has(l);u||d?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},fj=e=>({cache:lj(e.cacheSize),parseClassName:uj(e),sortModifiers:dj(e),...ZA(e)}),hj=/\s+/,pj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,l=[],u=e.trim().split(hj);let d="";for(let h=u.length-1;h>=0;h-=1){const m=u[h],{isExternal:g,modifiers:x,hasImportantModifier:S,baseClassName:_,maybePostfixModifierPosition:b}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let C=!!b,E=r(C?_.substring(0,b):_);if(!E){if(!C){d=m+(d.length>0?" "+d:d);continue}if(E=r(_),!E){d=m+(d.length>0?" "+d:d);continue}C=!1}const P=x.length===0?"":x.length===1?x[0]:a(x).join(":"),T=S?P+xp:P,k=T+E;if(l.indexOf(k)>-1)continue;l.push(k);const N=i(E,C);for(let D=0;D<N.length;++D){const B=N[D];l.push(T+B)}d=m+(d.length>0?" "+d:d)}return d},mj=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=FS(n))&&(i&&(i+=" "),i+=r);return i},FS=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=FS(e[r]))&&(n&&(n+=" "),n+=t);return n},gj=(e,...t)=>{let n,r,i,a;const l=d=>{const h=t.reduce((m,g)=>g(m),e());return n=fj(h),r=n.cache.get,i=n.cache.set,a=u,u(d)},u=d=>{const h=r(d);if(h)return h;const m=pj(d,n);return i(d,m),m};return a=l,(...d)=>a(mj(...d))},yj=[],Et=e=>{const t=n=>n[e]||yj;return t.isThemeGetter=!0,t},BS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$S=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,xj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wj=/\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$/,bj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ej=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rs=e=>vj.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),ss=e=>!!e&&Number.isInteger(Number(e)),jh=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),Cr=e=>xj.test(e),VS=()=>!0,Cj=e=>wj.test(e)&&!bj.test(e),Pm=()=>!1,_j=e=>Sj.test(e),Rj=e=>Ej.test(e),Pj=e=>!we(e)&&!be(e),Tj=e=>Ps(e,WS,Pm),we=e=>BS.test(e),Xs=e=>Ps(e,HS,Cj),iw=e=>Ps(e,Lj,Ie),kj=e=>Ps(e,KS,VS),Nj=e=>Ps(e,qS,Pm),aw=e=>Ps(e,US,Pm),Aj=e=>Ps(e,zS,Rj),Qc=e=>Ps(e,GS,_j),be=e=>$S.test(e),Ma=e=>To(e,HS),jj=e=>To(e,qS),lw=e=>To(e,US),Oj=e=>To(e,WS),Mj=e=>To(e,zS),Yc=e=>To(e,GS,!0),Dj=e=>To(e,KS,!0),Ps=(e,t,n)=>{const r=BS.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},To=(e,t,n=!1)=>{const r=$S.exec(e);return r?r[1]?t(r[1]):n:!1},US=e=>e==="position"||e==="percentage",zS=e=>e==="image"||e==="url",WS=e=>e==="length"||e==="size"||e==="bg-size",HS=e=>e==="length",Lj=e=>e==="number",qS=e=>e==="family-name",KS=e=>e==="number"||e==="weight",GS=e=>e==="shadow",Ij=()=>{const e=Et("color"),t=Et("font"),n=Et("text"),r=Et("font-weight"),i=Et("tracking"),a=Et("leading"),l=Et("breakpoint"),u=Et("container"),d=Et("spacing"),h=Et("radius"),m=Et("shadow"),g=Et("inset-shadow"),x=Et("text-shadow"),S=Et("drop-shadow"),_=Et("blur"),b=Et("perspective"),C=Et("aspect"),E=Et("ease"),P=Et("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...k(),be,we],D=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],O=()=>[be,we,d],G=()=>[rs,"full","auto",...O()],J=()=>[ss,"none","subgrid",be,we],se=()=>["auto",{span:["full",ss,be,we]},ss,be,we],ue=()=>[ss,"auto",be,we],ae=()=>
vendor: 5,159 bytes, line 235
235["auto","min","max","fr",be,we],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...O()],ee=()=>[rs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[rs,"screen","full","dvw","lvw","svw","min","max","fit",...O()],H=()=>[rs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],$=()=>[e,be,we],j=()=>[...k(),lw,aw,{position:[be,we]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Oj,Tj,{size:[be,we]}],Q=()=>[jh,Ma,Xs],ce=()=>["","none","full",h,be,we],X=()=>["",Ie,Ma,Xs],Z=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Ie,jh,lw,aw],ke=()=>["","none",_,be,we],Me=()=>["none",Ie,be,we],Ae=()=>["none",Ie,be,we],Xe=()=>[Ie,be,we],ge=()=>[rs,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cr],breakpoint:[Cr],color:[VS],container:[Cr],"drop-shadow":[Cr],ease:["in","out","in-out"],font:[Pj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cr],shadow:[Cr],spacing:["px",Ie],text:[Cr],"text-shadow":[Cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",rs,we,be,C]}],container:["container"],columns:[{columns:[Ie,we,be,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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"],sr:["sr-only","not-sr-only"],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:N()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{"inset-s":G(),start:G()}],end:[{"inset-e":G(),end:G()}],"inset-bs":[{"inset-bs":G()}],"inset-be":[{"inset-be":G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[ss,"auto",be,we]}],basis:[{basis:[rs,"full","auto",u,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,rs,"auto","initial","none",we]}],grow:[{grow:["",Ie,be,we]}],shrink:[{shrink:["",Ie,be,we]}],order:[{order:[ss,"first","last","none",be,we]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:se()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...H()]}],"min-block-size":[{"min-block":["auto",...H()]}],"max-block-size":[{"max-block":["none",...H()]}
vendor: 2,546 bytes, line 235
235],w:[{w:[u,"screen",...ee()]}],"min-w":[{"min-w":[u,"screen","none",...ee()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,Ma,Xs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Dj,kj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jh,we]}],"font-family":[{font:[jj,Nj,t]}],"font-features":[{"font-features":[we]}],"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-fractions"],tracking:[{tracking:[i,be,we]}],"line-clamp":[{"line-clamp":[Ie,"none",be,iw]}],leading:[{leading:[a,...O()]}],"list-image":[{"list-image":["none",be,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",be,Xs]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Ie,"auto",be,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]}
vendor: 9,488 bytes, line 235
235,ss,be,we],radial:["",be,we],conic:[ss,be,we]},Mj,Aj]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,be,we]}],"outline-w":[{outline:["",Ie,Ma,Xs]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,Yc,Qc]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",g,Yc,Qc]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Ie,Xs]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",x,Yc,Qc]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Ie,be,we]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[be,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,we]}],filter:[{filter:["","none",be,we]}],blur:[{blur:ke()}],brightness:[{brightness:[Ie,be,we]}],contrast:[{contrast:[Ie,be,we]}],"drop-shadow":[{"drop-shadow":["","none",S,Yc,Qc]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Ie,be,we]}],"hue-rotate":[{"hue-rotate":[Ie,be,we]}],invert:[{invert:["",Ie,be,we]}],saturate:[{saturate:[Ie,be,we]}],sepia:[{sepia:["",Ie,be,we]}],"backdrop-filter":[{"backdrop-filter":["","none",be,we]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,be,we]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,be,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,be,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,be,we]}],"backdrop-invert":[{"backdrop-invert":["",Ie,be,we]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,be,we]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,be,we]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,be,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",be,we]}],ease:[{ease:["linear","initial",E,be,we]}],delay:[{delay:[Ie,be,we]}],animate:[{animate:["none",P,be,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,be,we]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:Xe()}],"skew-x":[{"skew-x":Xe()}],"skew-y":[{"skew-y":Xe()}],transform:[{transform:[be,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",be,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",be,we]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Ie,Ma,Xs,iw]}],stroke:[{stroke:["none",...$()]}
235],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fj=gj(Ij);function Te(...e){return Fj(CS(e))}const QS=v.forwardRef(({...e},t)=>p.jsx("div",{ref:t,className:"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}));QS.displayName="ToastProvider";const YS=v.forwardRef(({...e},t)=>p.jsx("div",{ref:t,className:"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}));YS.displayName="ToastViewport";const Bj=rd("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"}}),XS=v.forwardRef(({className:e,variant:t,...n},r)=>p.jsx("div",{ref:r,className:Te(Bj({variant:t}),e),...n}));XS.displayName="Toast";const $j=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("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}));$j.displayName="ToastAction";const JS=v.forwardRef(({className:e,...t},n)=>p.jsx("button",{ref:n,className:Te("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,558 bytes, line 235
235/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:p.jsx(MS,{className:"h-4 w-4"})}));JS.displayName="ToastClose";const ZS=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("text-sm font-semibold",e),...t}));ZS.displayName="ToastTitle";const e1=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("text-sm opacity-90",e),...t}));e1.displayName="ToastDescription";function Vj(){const{toasts:e}=QN();return p.jsxs(QS,{children:[e.map(function({id:t,title:n,description:r,action:i,...a}){return p.jsxs(XS,{...a,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(ZS,{children:n}),r&&p.jsx(e1,{children:r})]}),i,p.jsx(JS,{})]},t)}),p.jsx(YS,{})]})}var Cl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Uj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cs,Em,dS,zj=(dS=class{constructor(){Ne(this,cs,Uj);Ne(this,Em,!1)}setTimeoutProvider(e){me(this,cs,e)}setTimeout(e,t){return L(this,cs).setTimeout(e,t)}clearTimeout(e){L(this,cs).clearTimeout(e)}setInterval(e,t){return L(this,cs).setInterval(e,t)}clearInterval(e){L(this,cs).clearInterval(e)}},cs=new WeakMap,Em=new WeakMap,dS),so=new zj;function Wj(e){setTimeout(e,0)}var wo=typeof window>"u"||"Deno"in globalThis;function rn(){}function Hj(e,t){return typeof e=="function"?e(t):e}function wp(e){return typeof e=="number"&&e>=0&&e!==1/0}function t1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function Rn(e,t){return typeof e=="function"?e(t):e}function cw(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==Tm(l,t.options))return!1}else if(!il(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||a&&!a(t))}function uw(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ol(t.options.mutationKey)!==ol(a))return!1}else if(!il(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Tm(e,t){return((t==null?void 0:t.queryKeyHashFn)||ol)(e)}function ol(e){return JSON.stringify(e,(t,n)=>Sp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function il(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>il(e[n],t[n])):!1}var qj=Object.prototype.hasOwnProperty;function n1(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=dw(e)&&dw(t);if(!r&&!(Sp(e)&&Sp(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let h=0;for(let m=0;m<u;m++){const g=r?m:l[m],x=e[g],S=t[g];if(x===S){d[g]=x,(r?m<a:qj.call(e,g))&&h++;continue}if(x===null||S===null||typeof x!="object"||typeof S!="object"){d[g]=S;continue}const _=n1(x,S,n+1);d[g]=_,_===x&&h++}return a===u&&h===a?e:d}function bp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function dw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sp(e){if(!fw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!fw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function fw(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kj(e){return new Promise(t=>{so.setTimeout(t,e)})}function Ep(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?n1(e,t):t}function Gj(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Qj(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var km=Symbol();function r1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===km?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function s1(e,t){return typeof e=="function"?e(...t):!!e}
vendor: 5,861 bytes, line 235
235function Yj(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var ao,us,Si,fS,Xj=(fS=class extends Cl{constructor(){super();Ne(this,ao);Ne(this,us);Ne(this,Si);me(this,Si,t=>{if(!wo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){L(this,us)||this.setEventListener(L(this,Si))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,us))==null||t.call(this),me(this,us,void 0))}setEventListener(t){var n;me(this,Si,t),(n=L(this,us))==null||n.call(this),me(this,us,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){L(this,ao)!==t&&(me(this,ao,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof L(this,ao)=="boolean"?L(this,ao):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ao=new WeakMap,us=new WeakMap,Si=new WeakMap,fS),Nm=new Xj;function Cp(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Jj=Wj;function Zj(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=Jj;const a=u=>{t?e.push(u):i(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{a(()=>{u(...d)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Ot=Zj(),Ei,ds,Ci,hS,eO=(hS=class extends Cl{constructor(){super();Ne(this,Ei,!0);Ne(this,ds);Ne(this,Ci);me(this,Ci,t=>{if(!wo&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,ds)||this.setEventListener(L(this,Ci))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,ds))==null||t.call(this),me(this,ds,void 0))}setEventListener(t){var n;me(this,Ci,t),(n=L(this,ds))==null||n.call(this),me(this,ds,t(this.setOnline.bind(this)))}setOnline(t){L(this,Ei)!==t&&(me(this,Ei,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Ei)}},Ei=new WeakMap,ds=new WeakMap,Ci=new WeakMap,hS),ju=new eO;function tO(e){return Math.min(1e3*2**e,3e4)}function o1(e){return(e??"online")==="online"?ju.isOnline():!0}var _p=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function i1(e){let t=!1,n=0,r;const i=Cp(),a=()=>i.status!=="pending",l=b=>{var C;if(!a()){const E=new _p(b);x(E),(C=e.onCancel)==null||C.call(e,E)}},u=()=>{t=!0},d=()=>{t=!1},h=()=>Nm.isFocused()&&(e.networkMode==="always"||ju.isOnline())&&e.canRun(),m=()=>o1(e.networkMode)&&e.canRun(),g=b=>{a()||(r==null||r(),i.resolve(b))},x=b=>{a()||(r==null||r(),i.reject(b))},S=()=>new Promise(b=>{var C;r=E=>{(a()||h())&&b(E)},(C=e.onPause)==null||C.call(e)}).then(()=>{var b;r=void 0,a()||(b=e.onContinue)==null||b.call(e)}),_=()=>{if(a())return;let b;const C=n===0?e.initialPromise:void 0;try{b=C??e.fn()}catch(E){b=Promise.reject(E)}Promise.resolve(b).then(g).catch(E=>{var D;if(a())return;const P=e.retry??(wo?0:3),T=e.retryDelay??tO,k=typeof T=="function"?T(n,E):T,N=P===!0||typeof P=="number"&&n<P||typeof P=="function"&&P(n,E);if(t||!N){x(E);return}n++,(D=e.onFail)==null||D.call(e,n,E),Kj(k).then(()=>h()?void 0:S()).then(()=>{t?x(E):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?_():S().then(_),i)}}var lo,pS,a1=(pS=class{constructor(){Ne(this,lo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wp(this.gcTime)&&me(this,lo,so.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wo?1/0:300*1e3))}clearGcTimeout(){L(this,lo)&&(so.clearTimeout(L(this,lo)),me(this,lo,void 0))}},lo=new WeakMap,pS),co,_i,_n,uo,Tt,xl,fo,Un,_r,mS,nO=(mS=class extends a1{constructor(t){super();Ne(this,Un);Ne(this,co);Ne(this,_i);Ne(this,_n);Ne(this,uo);Ne(this,Tt);Ne(this,xl);Ne(this,fo);me(this,fo,!1),me(this,xl,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,uo,t.client),me(this,_n,L(this,uo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,co,pw(this.options)),this.state=t.state??L(this,co),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=L(this,Tt))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,xl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=pw(this.options);n.data!==void 0&&(this.setState(hw(n.data,n.dataUpdatedAt)),me(this,co,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,_n).remove(this)}setData(t,n){const r=Ep(this.state.data,t,this.options);return $e(this,Un,_r).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){$e(this,Un,_r).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=L(this,Tt))==null?void 0:r.promise;return(i=L(this,Tt))==null||i.cancel(t),n?n.then(rn).catch(rn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,co))}isActive(){return this.observers.some(t=>Rn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===km||this.state.dataUpdateCount+this.state.errorUpdate
235Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ws(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!t1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,_n).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(L(this,Tt)&&(L(this,fo)?L(this,Tt).cancel({revert:!0}):L(this,Tt).cancelRetry()),this.scheduleGc()),L(this,_n).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,Un,_r).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,m,g,x,S,_,b,C,E,P,T;if(this.state.fetchStatus!=="idle"&&((d=L(this,Tt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(L(this,Tt))return L(this,Tt).continueRetry(),L(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(N=>N.options.queryFn);k&&this.setOptions(k.options)}const r=new AbortController,i=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(me(this,fo,!0),r.signal)})},a=()=>{const k=r1(this.options,n),D=(()=>{const B={client:L(this,uo),queryKey:this.queryKey,meta:this.meta};return i(B),B})();return me(this,fo,!1),this.options.persister?this.options.persister(k,D,this):k(D)},u=(()=>{const k={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:L(this,uo),state:this.state,fetchFn:a};return i(k),k})();(h=this.options.behavior)==null||h.onFetch(u,this),me(this,_i,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&$e(this,Un,_r).call(this,{type:"fetch",meta:(g=u.fetchOptions)==null?void 0:g.meta}),me(this,Tt,i1({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:k=>{k instanceof _p&&k.revert&&this.setState({...L(this,_i),fetchStatus:"idle"}),r.abort()},onFail:(k,N)=>{$e(this,Un,_r).call(this,{type:"failed",failureCount:k,error:N})},onPause:()=>{$e(this,Un,_r).call(this,{type:"pause"})},onContinue:()=>{$e(this,Un,_r).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const k=await L(this,Tt).start();if(k===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(k),(S=(x=L(this,_n).config).onSuccess)==null||S.call(x,k,this),(b=(_=L(this,_n).config).onSettled)==null||b.call(_,k,this.state.error,this),k}catch(k){if(k instanceof _p){if(k.silent)return L(this,Tt).promise;if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw $e(this,Un,_r).call(this,{type:"error",error:k}),(E=(C=L(this,_n).config).onError)==null||E.call(C,k,this),(T=(P=L(this,_n).config).onSettled)==null||T.call(P,this.state.data,k,this),k}finally{this.scheduleGc()}}},co=new WeakMap,_i=new WeakMap,_n=new WeakMap,uo=new WeakMap,Tt=new WeakMap,xl=new WeakMap,fo=new WeakMap,Un=new WeakSet,_r=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...l1(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...hw(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(this,_i,t.manual?i:void 0),i;case"error":const a=t.error;
vendor: 7,836 bytes, line 235
235return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ot.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,_n).notify({query:this,type:"updated",action:t})})},mS);function l1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:o1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function pw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nn,Ve,wl,Gt,ho,Ri,Pr,fs,bl,Pi,Ti,po,mo,hs,ki,Ge,$a,Rp,Pp,Tp,kp,Np,Ap,jp,c1,gS,rO=(gS=class extends Cl{constructor(t,n){super();Ne(this,Ge);Ne(this,nn);Ne(this,Ve);Ne(this,wl);Ne(this,Gt);Ne(this,ho);Ne(this,Ri);Ne(this,Pr);Ne(this,fs);Ne(this,bl);Ne(this,Pi);Ne(this,Ti);Ne(this,po);Ne(this,mo);Ne(this,hs);Ne(this,ki,new Set);this.options=n,me(this,nn,t),me(this,fs,null),me(this,Pr,Cp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ve).addObserver(this),mw(L(this,Ve),this.options)?$e(this,Ge,$a).call(this):this.updateResult(),$e(this,Ge,kp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Op(L(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Op(L(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,Ge,Np).call(this),$e(this,Ge,Ap).call(this),L(this,Ve).removeObserver(this)}setOptions(t){const n=this.options,r=L(this,Ve);if(this.options=L(this,nn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Rn(this.options.enabled,L(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,Ge,jp).call(this),L(this,Ve).setOptions(this.options),n._defaulted&&!bp(this.options,n)&&L(this,nn).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ve),observer:this});const i=this.hasListeners();i&&gw(L(this,Ve),r,this.options,n)&&$e(this,Ge,$a).call(this),this.updateResult(),i&&(L(this,Ve)!==r||Rn(this.options.enabled,L(this,Ve))!==Rn(n.enabled,L(this,Ve))||ws(this.options.staleTime,L(this,Ve))!==ws(n.staleTime,L(this,Ve)))&&$e(this,Ge,Rp).call(this);const a=$e(this,Ge,Pp).call(this);i&&(L(this,Ve)!==r||Rn(this.options.enabled,L(this,Ve))!==Rn(n.enabled,L(this,Ve))||a!==L(this,hs))&&$e(this,Ge,Tp).call(this,a)}getOptimisticResult(t){const n=L(this,nn).getQueryCache().build(L(this,nn),t),r=this.createResult(n,t);return oO(this,r)&&(me(this,Gt,r),me(this,Ri,this.options),me(this,ho,L(this,Ve).state)),r}getCurrentResult(){return L(this,Gt)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,Pr).status==="pending"&&L(this,Pr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){L(this,ki).add(t)}getCurrentQuery(){return L(this,Ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=L(this,nn).defaultQueryOptions(t),r=L(this,nn).getQueryCache().build(L(this,nn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $e(this,Ge,$a).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,Gt)))}createResult(t,n){var G;const r=L(this,Ve),i=this.options,a=L(this,Gt),l=L(this,ho),u=L(this,Ri),h=t!==r?t.state:L(this,wl),{state:m}=t;let g={...m},x=!1,S;if(n._optimisticResults){const J=this.hasListeners(),se=!J&&mw(t,n),ue=J&&gw(t,r,n,i);(se||ue)&&(g={...g,...l1(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:_,errorUpdatedAt:b,status:C}=g;S=g.data;let E=!1;if(n.placeholderData!==void 0&&S===void 0&&C==="pending"){let J;a!=null&&a.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(J=a.data,E=!0):J=typeof n.placeholderData=="function"?n.placeholderData((G=L(this,Ti))==null?void 0:G.state.data,L(this,Ti)):n.placeholderData,J!==void 0&&(C="success",S=Ep(a==null?void 0:a.data,J,n),x=!0)}if(n.select&&S!==void 0&&!E)if(a&&S===(l==null?void 0:l.data)&&n.select===L(this,bl))S=L(this,Pi);else try{me(this,bl,n.select),S=n.select(S),S=Ep(a==null?void 0:a.data,S,n),me(this,Pi,S),me(this,fs,null)}catch(J){me(this,fs,J)}L(this,fs)&&(_=L(this,fs),S=L(this,Pi),b=Date.now(),C="error");const P=g.fetchStatus==="fetching",T=C==="pending",k=C==="error",N=T&&P,D=S!==void 0,O={status:C,fetchStatus:g.fetchStatus,isPending:T,isSuccess:C==="success",isError:k,isInitialLoading:N,isLoading:N,data:S,dataUpdatedAt:g.dataUpdatedAt,error:_,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!T,isLoadingError:k&&!D,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:k&&D,isStale:Am(t,n),refetch:this.refetch,promise:L(this,Pr),isEnabled:Rn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const J=O.data!==void 0,se=O.status==="error"&&!J,ue=te=>{se?te.reject(O.error):J&&te.resolve(O.data)},ae=()=>{const te=me(this,Pr,O.promise=Cp());ue(te)},W=L(this,Pr);switch(W.status){case"pending":t.queryHash===r.queryHash&&ue(W);break;case"fulfilled":(se||O.data!==W.value)&&ae();break;case"rejected":(!se||O.error!==W.reason)&&ae();break}}return O}updateResult(){const t=L(this,Gt),n=this.createResult(L(this,Ve),this.options);if(me(this,ho,L(this,Ve).state),me(this,Ri,this.options),L(this,ho).data!==void 0&&me(this,Ti,L(this,Ve)),bp(n,t))return;me(this,Gt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!L(this,ki).size)return!0;const l=new Set(a??L(this,ki));return this.options.throwOnError&&l.add("error"),Object.keys(L(this,Gt)).some(u=>{const d=u;return L(this,Gt)[d]!==t[d]&&l.has(d)})};$e(this,Ge,c1).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,Ge,kp).call(this)}},nn=new WeakMap,Ve=new WeakMap,wl=new WeakMap,Gt=new WeakMap,ho=new WeakMap,Ri=new WeakMap,Pr=new WeakMap,fs=new WeakMap,bl=new WeakMap,Pi=new WeakMap,Ti=new WeakMap,po=new WeakMap,mo=new WeakMap,hs=new WeakMap,ki=new WeakMap,Ge=new WeakSet,$a=function(t){$e(this,Ge,jp).call(this);let n=L(this,Ve).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(rn)),n},Rp=function(){$e(this,Ge,Np).call(this);const t=ws(this.options.staleTime,L(this,Ve));if(wo||L(this,Gt).isStale||!wp(t))return;const r=t1(L(this,Gt).dataUpdatedAt,t)+1;me(this,po,so.setTimeout(()=>{L(this,Gt).isStale||this.updateResult()},r))},Pp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ve)):this.options.refetchInterval)??!1},Tp=function(t){$e(this,Ge,Ap).call(this),me(this,hs,t),!(wo||Rn(this.options.enabled,L(this,Ve))===!1||!wp(L(this,hs))||L(this,hs)===0)&&me(this,mo,so.setInterval(()=>
vendor: 5,239 bytes, line 235
235{(this.options.refetchIntervalInBackground||Nm.isFocused())&&$e(this,Ge,$a).call(this)},L(this,hs)))},kp=function(){$e(this,Ge,Rp).call(this),$e(this,Ge,Tp).call(this,$e(this,Ge,Pp).call(this))},Np=function(){L(this,po)&&(so.clearTimeout(L(this,po)),me(this,po,void 0))},Ap=function(){L(this,mo)&&(so.clearInterval(L(this,mo)),me(this,mo,void 0))},jp=function(){const t=L(this,nn).getQueryCache().build(L(this,nn),this.options);if(t===L(this,Ve))return;const n=L(this,Ve);me(this,Ve,t),me(this,wl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},c1=function(t){Ot.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(L(this,Gt))}),L(this,nn).getQueryCache().notify({query:L(this,Ve),type:"observerResultsUpdated"})})},gS);function sO(e,t){return Rn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mw(e,t){return sO(e,t)||e.state.data!==void 0&&Op(e,t,t.refetchOnMount)}function Op(e,t,n){if(Rn(t.enabled,e)!==!1&&ws(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Am(e,t)}return!1}function gw(e,t,n,r){return(e!==t||Rn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Am(e,n)}function Am(e,t){return Rn(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function oO(e,t){return!bp(e.getCurrentResult(),t)}function yw(e){return{onFetch:(t,n)=>{var m,g,x,S,_;const r=t.options,i=(x=(g=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,a=((S=t.state.data)==null?void 0:S.pages)||[],l=((_=t.state.data)==null?void 0:_.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const h=async()=>{let b=!1;const C=T=>{Yj(T,()=>t.signal,()=>b=!0)},E=r1(t.options,t.fetchOptions),P=async(T,k,N)=>{if(b)return Promise.reject();if(k==null&&T.pages.length)return Promise.resolve(T);const B=(()=>{const se={client:t.client,queryKey:t.queryKey,pageParam:k,direction:N?"backward":"forward",meta:t.options.meta};return C(se),se})(),O=await E(B),{maxPages:G}=t.options,J=N?Qj:Gj;return{pages:J(T.pages,O,G),pageParams:J(T.pageParams,k,G)}};if(i&&a.length){const T=i==="backward",k=T?iO:vw,N={pages:a,pageParams:l},D=k(r,N);u=await P(N,D,T)}else{const T=e??a.length;do{const k=d===0?l[0]??r.initialPageParam:vw(r,u);if(d>0&&k==null)break;u=await P(u,k),d++}while(d<T)}return u};t.options.persister?t.fetchFn=()=>{var b,C;return(C=(b=t.options).persister)==null?void 0:C.call(b,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function vw(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function iO(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Sl,sr,$t,go,or,is,yS,aO=(yS=class extends a1{constructor(t){super();Ne(this,or);Ne(this,Sl);Ne(this,sr);Ne(this,$t);Ne(this,go);me(this,Sl,t.client),this.mutationId=t.mutationId,me(this,$t,t.mutationCache),me(this,sr,[]),this.state=t.state||lO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,sr).includes(t)||(L(this,sr).push(t),this.clearGcTimeout(),L(this,$t).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,sr,L(this,sr).filter(n=>n!==t)),this.scheduleGc(),L(this,$t).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,sr).length||(this.state.status==="pending"?this.scheduleGc():L(this,$t).remove(this))}continue(){var t;return((t=L(this,go))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,d,h,m,g,x,S,_,b,C,E,P,T,k,N,D,B;const n=()=>{$e(this,or,is).call(this,{type:"continue"})},r={client:L(this,Sl),meta:this.options.meta,mutationKey:this.options.mutationKey};me(this,go,i1({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,G)=>{$e(this,or,is).call(this,{type:"failed",failureCount:O,error:G})},onPause:()=>{$e(this,or,is).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,$t).canRun(this)}));const i=this.state.status==="pending",a=!L(this,go).canStart();try{if(i)n();else{$e(this,or,is).call(this,{type:"pending",variables:t,isPaused:a}),L(this,$t).config.onMutate&&await L(this,$t).config.onMutate(t,this,r);const G=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));G!==this.state.context&&$e(this,or,is).call(this,{type:"pending",context:G,variables:t,isPaused:a})}const O=await L(this,go).start();return await((h=(d=L(this,$t).config).onSuccess)==null?void 0:h.call(d,O,t,this.state.context,this,r)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,O,t,this.state.context,r)),await((S=(x=L(this,$t).config).onSettled)==null?void 0:S.call(x,O,null,this.state.variables,this.state.context,this,r)),await((b=(_=this.options).onSettled)==null?void 0:b.call(_,O,null,t,this.state.context,r)),$e(this,or,is).call(this,{type:"success",data:O}),O}catch(O){try{await((E=(C=L(this,$t).config).onError)==null?void 0:E.
235call(C,O,t,this.state.context,this,r))}catch(G){Promise.reject(G)}try{await((T=(P=this.options).onError)==null?void 0:T.call(P,O,t,this.state.context,r))}catch(G){Promise.reject(G)}try{await((N=(k=L(this,$t).config).onSettled)==null?void 0:N.call(k,void 0,O,this.state.variables,this.state.context,this,r))}catch(G){Promise.reject(G)}try{await((B=(D=this.options).onSettled)==null?void 0:B.call(D,void 0,O,t,this.state.context,r))}catch(G){Promise.reject(G)}throw $e(this,or,is).call(this,{type:"error",error:O}),O}finally{L(this,$t).runNext(this)}}},Sl=new WeakMap,sr=new WeakMap,$t=new WeakMap,go=new WeakMap,or=new WeakSet,is=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ot.batch(()=>{L(this,sr).forEach(r=>{r.onMutationUpdate(t)}),L(this,$t).notify({mutation:this,type:"updated",action:t})})},yS);function lO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Tr,zn,El,vS,cO=(vS=class extends Cl{constructor(t={}){super();Ne(this,Tr);Ne(this,zn);Ne(this,El);this.config=t,me(this,Tr,new Set),me(this,zn,new Map),me(this,El,0)}build(t,n,r){const i=new aO({client:t,mutationCache:this,mutationId:++Kc(this,El)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){L(this,Tr).add(t);const n=Xc(t);if(typeof n=="string"){const r=L(this,zn).get(n);r?r.push(t):L(this,zn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,Tr).delete(t)){const n=Xc(t);if(typeof n=="string"){const r=L(this,zn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&L(this,zn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Xc(t);if(typeof n=="string"){const r=L(this,zn).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Xc(t);if(typeof n=="string"){const i=(r=L(this,zn).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ot.batch(()=>{L(this,Tr).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,Tr).clear(),L(this,zn).clear()})}getAll(){return Array.from(L(this,Tr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uw(n,r))}findAll(t={}){return this.getAll().filter(n=>uw(t,n))}notify(t){Ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ot.batch(()=>Promise.all(t.map(n=>n.continue().catch(rn))))}},Tr=new WeakMap,zn=new WeakMap,El=new WeakMap,vS);function Xc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ir,xS,uO=(xS=class extends Cl{constructor(t={}){super();Ne(this,ir);this.config=t,me(this,ir,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??Tm(i,n);let l=this.get(a);return l||(l=new nO({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){L(this,ir).has(t.queryHash)||(L(this,ir).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=L(this,ir).get(t.queryHash);n&&(t.destroy(),n===t&&L(this,ir).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,ir).get(t)}getAll(){return[...L(this,ir).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>cw(t,r)):n}notify(t){Ot.batch(()=>
vendor: 4,674 bytes, line 235
235{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ot.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ot.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ir=new WeakMap,xS),ut,ps,ms,Ni,Ai,gs,ji,Oi,wS,dO=(wS=class{constructor(e={}){Ne(this,ut);Ne(this,ps);Ne(this,ms);Ne(this,Ni);Ne(this,Ai);Ne(this,gs);Ne(this,ji);Ne(this,Oi);me(this,ut,e.queryCache||new uO),me(this,ps,e.mutationCache||new cO),me(this,ms,e.defaultOptions||{}),me(this,Ni,new Map),me(this,Ai,new Map),me(this,gs,0)}mount(){Kc(this,gs)._++,L(this,gs)===1&&(me(this,ji,Nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ut).onFocus())})),me(this,Oi,ju.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,ut).onOnline())})))}unmount(){var e,t;Kc(this,gs)._--,L(this,gs)===0&&((e=L(this,ji))==null||e.call(this),me(this,ji,void 0),(t=L(this,Oi))==null||t.call(this),me(this,Oi,void 0))}isFetching(e){return L(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,ps).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,ut).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=L(this,ut).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ws(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return L(this,ut).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=L(this,ut).get(r.queryHash),a=i==null?void 0:i.state.data,l=Hj(t,a);if(l!==void 0)return L(this,ut).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Ot.batch(()=>L(this,ut).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,ut).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=L(this,ut);Ot.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=L(this,ut);return Ot.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ot.batch(()=>L(this,ut).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(rn).catch(rn)}invalidateQueries(e,t={}){return Ot.batch(()=>(L(this,ut).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ot.batch(()=>L(this,ut).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(rn)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(rn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=L(this,ut).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rn).catch(rn)}fetchInfiniteQuery(e){return e.behavior=yw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rn).catch(rn)}ensureInfiniteQueryData(e){return e.behavior=yw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ju.isOnline()?L(this,ps).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ut)}getMutationCache(){return L(this,ps)}getDefaultOptions(){return L(this,ms)}setDefaultOptions(e){me(this,ms,e)}setQueryDefaults(e,t){L(this,Ni).set(ol(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Ni).values()],n={};return t.forEach(r=>{il(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){L(this,Ai).set(ol(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Ai).values()],n={};return t.forEach(r=>{il(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,ms).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Tm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===km&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,ms).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}
vendor: 1,269 bytes, line 235
235clear(){L(this,ut).clear(),L(this,ps).clear()}},ut=new WeakMap,ps=new WeakMap,ms=new WeakMap,Ni=new WeakMap,Ai=new WeakMap,gs=new WeakMap,ji=new WeakMap,Oi=new WeakMap,wS),u1=v.createContext(void 0),fO=e=>{const t=v.useContext(u1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hO=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(u1.Provider,{value:e,children:t})),d1=v.createContext(!1),pO=()=>v.useContext(d1);d1.Provider;function mO(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gO=v.createContext(mO()),yO=()=>v.useContext(gO),vO=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?s1(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},xO=e=>{v.useEffect(()=>{e.clearReset()},[e])},wO=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||s1(n,[e.error,r])),bO=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},SO=(e,t)=>
235e.isLoading&&e.isFetching&&!t,EO=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xw=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function CO(e,t,n){var x,S,_,b;const r=pO(),i=yO(),a=fO(),l=a.defaultQueryOptions(e);(S=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||S.call(x,l);const u=a.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",bO(l),vO(l,i,u),xO(i);const d=!a.getQueryCache().get(l.queryHash),[h]=v.useState(()=>new t(a,l)),m=h.getOptimisticResult(l),g=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(C=>{const E=g?h.subscribe(Ot.batchCalls(C)):rn;return h.updateResult(),E},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),v.useEffect(()=>{h.setOptions(l)},[l,h]),EO(l,m))throw xw(l,h,i);if(wO({result:m,errorResetBoundary:i,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw m.error;if((b=(_=a.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||b.call(_,l,m),l.experimental_prefetchInRender&&!wo&&SO(m,r)){const C=d?xw(l,h,i):u==null?void 0:u.promise;C==null||C.catch(rn).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?m:h.trackResult(m)}function _O(e,t){return CO(e,rO)}const RO=new dO({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var _l=SS();const PO=Cm(_l);/** 236 * @remix-run/router v1.23.3 237 * 238 * Copyright (c) Remix Software Inc. 239 * 240 * This source code is licensed under the MIT license found in the 241 * LICENSE.md file in the root directory of this source tree. 242 * 243 * @license MIT 244 */function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},al.apply(null,arguments)}var ys;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ys||(ys={}));const ww="popstate";function TO(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:l,hash:u}=r.location;return Mp("",{pathname:a,search:l,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ou(i)}return NO(t,n,null,e)}function xt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kO(){return Math.random().toString(36).substr(2,8)}function bw(e,t){return{usr:e.state,key:e.key,idx:t}}function Mp(e,t,n,r){return n===void 0&&(n=null),al({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?$i(t):t,{state:n,key:t&&t.key||r||kO()})}function Ou(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 $i(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 NO(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,l=i.history,u=ys.Pop,d=null,h=m();h==null&&(h=0,l.replaceState(al({},l.state,{idx:h}),""));function m(){return(l.state||{idx:null}).idx}function g(){u=ys.Pop;let C=m(),E=C==null?null:C-h;h=C,d&&d({action:u,location:b.location,delta:E})}function x(C,E){u=ys.Push;let P=Mp(b.location,C,E);h=m()+1;let T=bw(P,h),k=b.createHref(P);try{l.pushState(T,"",k)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(k)}a&&d&&d({action:u,location:b.location,delta:1})}function S(C,E){u=ys.Replace;let P=Mp(b.location,C,E);h=m();let T=bw(P,h),k=b.createHref(P);l.replaceState(T,"",k),a&&d&&d({action:u,location:b.location,delta:0})}function _(C){let E=i.location.origin!=="null"?i.location.origin:i.location.href,P=typeof C=="string"?C:Ou(C);return P=P.replace(/ $/,"%20"),xt(E,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,E)}let b={get action(){return u},get location(){return e(i,l)},listen(C){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(ww,g),d=C,()=>{i.removeEventListener(ww,g),d=null}},createHref(C){return t(i,C)},createURL:_,encodeLocation(C){let E=_(C);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:S,go(C){return l.go(C)}};return b}var Sw;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sw||(Sw={}));function AO(e,t,n){return n===void 0&&(n="/"),jO(e,t,n)}function jO(e,t,n,r){let i=typeof t=="string"?$i(t):t,a=Om(i.pathname||"/",n);if(a==null)return null;let l=f1(e);OO(l);let u=null,d=HO(a);for(let h=0;u==null&&h<l.length;++h)u=UO(l[h],d);return u}function f1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,l,u)=>{let d={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};d.relativePath.startsWith("/")&&(xt(d.relativePath.startsWith(r),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+r+'" is not val
244id. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(r.length));let h=bs([r,d.relativePath]),m=n.concat(d);a.children&&a.children.length>0&&(xt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),f1(a.children,t,m,h)),!(a.path==null&&!a.index)&&t.push({path:h,score:$O(h,a.index),routesMeta:m})};return e.forEach((a,l)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))i(a,l);else for(let d of h1(a.path))i(a,l,d)}),t}function h1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let l=h1(r.join("/")),u=[];return u.push(...l.map(d=>d===""?a:[a,d].join("/"))),i&&u.push(...l),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function OO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:VO(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const MO=/^:[\w-]+$/,DO=3,LO=2,IO=1,FO=10,BO=-2,Ew=e=>e==="*";function $O(e,t){let n=e.split("/"),r=n.length;return n.some(Ew)&&(r+=BO),t&&(r+=LO),n.filter(i=>!Ew(i)).reduce((i,a)=>i+(MO.test(a)?DO:a===""?IO:FO),r)}function VO(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function UO(e,t,n){let{routesMeta:r}=e,i={},a="/",l=[];for(let u=0;u<r.length;++u){let d=r[u],h=u===r.length-1,m=a==="/"?t:t.slice(a.length)||"/",g=zO({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},m),x=d.route;if(!g)return null;
vendor: 9,804 bytes, lines 244-253
244Object.assign(i,g.params),l.push({params:i,pathname:bs([a,g.pathname]),pathnameBase:YO(bs([a,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(a=bs([a,g.pathnameBase]))}return l}function zO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=WO(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],l=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((h,m,g)=>{let{paramName:x,isOptional:S}=m;if(x==="*"){let b=u[g]||"";l=a.slice(0,a.length-b.length).replace(/(.)\/+$/,"$1")}const _=u[g];return S&&!_?h[x]=void 0:h[x]=(_||"").replace(/%2F/g,"/"),h},{}),pathname:a,pathnameBase:l,pattern:e}}function WO(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jm(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function HO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jm(!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 Om(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)||"/"}const qO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KO=e=>qO.test(e);function GO(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?$i(e):e,a;if(n)if(KO(n))a=n;else{if(n.includes("//")){let l=n;n=g1(n),jm(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?a=Cw(n.substring(1),"/"):a=Cw(n,t)}else a=t;return{pathname:a,search:XO(r),hash:JO(i)}}function Cw(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Oh(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 QO(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function p1(e,t){let n=QO(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function m1(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=$i(e):(i=al({},e),xt(!i.pathname||!i.pathname.includes("?"),Oh("?","pathname","search",i)),xt(!i.pathname||!i.pathname.includes("#"),Oh("#","pathname","hash",i)),xt(!i.search||!i.search.includes("#"),Oh("#","search","hash",i)));let a=e===""||i.pathname==="",l=a?"/":i.pathname,u;if(l==null)u=n;else{let g=t.length-1;if(!r&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),g-=1;i.pathname=x.join("/")}u=g>=0?t[g]:"/"}let d=GO(i,u),h=l&&l!=="/"&&l.endsWith("/"),m=(a||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}const g1=e=>e.replace(/\/\/+/g,"/"),bs=e=>g1(e.join("/")),YO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ZO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const y1=["post","put","patch","delete"];new Set(y1);const e2=["get",...y1];new Set(e2);/** 245 * React Router v6.30.4 246 * 247 * Copyright (c) Remix Software Inc. 248 * 249 * This source code is licensed under the MIT license found in the 250 * LICENSE.md file in the root directory of this source tree. 251 * 252 * @license MIT 253 */function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(null,arguments)}const Mm=v.createContext(null),t2=v.createContext(null),ko=v.createContext(null),Rl=v.createContext(null),Ts=v.createContext({outlet:null,matches:[],isDataRoute:!1}),v1=v.createContext(null);function n2(e,t){let{relative:n}=t===void 0?{}:t;Pl()||xt(!1);let{basename:r,navigator:i}=v.useContext(ko),{hash:a,pathname:l,search:u}=w1(e,{relative:n}),d=l;return r!=="/"&&(d=l==="/"?r:bs([r,l])),i.createHref({pathname:d,search:u,hash:a})}function Pl(){return v.useContext(Rl)!=null}function ks(){return Pl()||xt(!1),v.useContext(Rl).location}function r2(){return v.useContext(Rl).navigationType}function x1(e){v.useContext(ko).static||v.useLayoutEffect(e)}function sd(){let{isDataRoute:e}=v.useContext(Ts);return e?y2():s2()}function s2(){Pl()||xt(!1);let e=v.useContext(Mm),{basename:t,future:n,navigator:r}=v.useContext(ko),{matches:i}=v.useContext(Ts),{pathname:a}=ks(),l=JSON.stringify(p1(i,n.v7_relativeSplatPath)),u=v.useRef(!1);return x1(()=>{u.current=!0}),v.useCallback(function(h,m){if(m===void 0&&(m={}),!u.current)return;if(typeof h=="number"){r.go(h);return}let g=m1(h,JSON.parse(l),a,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:bs([t,g.pathname])),(m.replace?r.replace:r.push)(g,m.state,m)},[t,r,l,a,e])}function o2(){let{matches:e}=v.useContext(Ts),t=e[e.length-1];return t?t.params:{}}function w1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(ko),{matches:i}=v.useContext(Ts),{pathname:a}=ks(),l=JSON.stringify(p1(i,r.v7_relativeSplatPath));return v.useMemo(()=>m1(e,JSON.parse(l),a,n==="path"),[e,l,a,n])}function i2(e,t){return a2(e,t)}function a2(e,t,n,r){Pl()||xt(!1);let{navigator:i}=v.useContext(ko),{matches:a}=v.useContext(Ts),l=a[a.length-1],u=l?l.params:{};l&&l.pathname;let d=l?l.pathnameBase:"/";l&&l.route;let h=ks(),m;if(t){var g;let C=typeof t=="string"?$i(t):t;d==="/"||(g=C.pathname)!=null&&g.startsWith(d)||xt(!1),m=C}else m=h;let x=m.pathname||"/",S=x;if(d!=="/"){let C=d.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(C.length).join("/")}let _=AO(e,{pathname:S}),b=f2(_&&_.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:bs([d,i.encodeLocation?i.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?d:bs([d,i.encodeLocation?i.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),a,n,r);return t&&b?v.createElement(Rl.Provider,{value:{location:ll({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:ys.Pop}},b):b}function l2(){let e=g2(),t=ZO(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,null)}const c2=v.createElement(l2,null);class u2 extends v.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?v.createElement(Ts.Provider,{value:this.props.routeContext},v.createElement(v1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function d2(e){let{routeContext:t,match:n,children:r}=e,i=v.useContext(Mm);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Ts.Provider,{value:t},r)}function f2(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let m=l.findIndex(g=>g.route.id&&(u==null?void 0:u[g.route.id])!==void 0);m>=0||xt(!1),l=l.slice(0,Math.min(l.length,m+1))}let d=!1,h=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m<l.length;m++){let g=l[m];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=m),g.route.id){let{loaderData:x,errors:S}=n,_=g.route.loader&&x[g.route.id]===void 0&&(!S||S[g.route.id]===void 0);if(g.route.lazy||_){d=!0,h>=0?l=l.slice(0,h+1):l=[l[0]];break}}}return l.reduceRight((m,g,x)=>{let S,_=!1,b=null,C=null;n&&(S=u&&g.route.id?u[g.route.id]:void 0,b=g.route.errorElement||c2,d&&(h<0&&x===0?(v2("route-fallback"),_=!0,C=null):h===x&&(_=!0,C=g.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,x+1)),P=()=>{let T;return S?T=b:_?T=C:g.route.Component?T=v.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=m,v.createElement(d2,{match:g,routeContext:{outlet:m,matches:E,isDataRoute:n!=null},children:T})};return n&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?v.createElement(u2,{location:n.location,revalidation:n.revalidation,component:b,error:S,children:P(),routeC
253ontext:{outlet:null,matches:E,isDataRoute:!0}}):P()},null)}var b1=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(b1||{}),S1=(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})(S1||{});function h2(e){let t=v.useContext(Mm);return t||xt(!1),t}function p2(e){let t=v.useContext(t2);return t||xt(!1),t}function m2(e){let t=v.useContext(Ts);return t||xt(!1),t}function E1(e){let t=m2(),n=t.matches[t.matches.length-1];return n.route.id||xt(!1),n.route.id}function g2(){var e;let t=v.useContext(v1),n=p2(),r=E1();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function y2(){let{router:e}=h2(b1.UseNavigateStable),t=E1(S1.UseNavigateStable),n=v.useRef(!1);return x1(()=>{n.current=!0}),v.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ll({fromRouteId:t},a)))},[e,t])}const _w={};function v2(e,t,n){_w[e]||(_w[e]=!0)}function x2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Rr(e){xt(!1)}function w2(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ys.Pop,navigator:a,static:l=!1,future:u}=e;Pl()&&xt(!1);let d=t.replace(/^\/*/,"/"),h=v.useMemo(()=>({basename:d,navigator:a,static:l,future:ll({v7_relativeSplatPath:!1},u)}),[d,u,a,l]);typeof r=="string"&&(r=$i(r));let{pathname:m="/",search:g="",hash:x="",state:S=null,key:_="default"}=r,b=v.useMemo(()=>{let C=Om(m,d);return C==null?null:{location:{pathname:C,search:g,hash:x,state:S,key:_},navigationType:i}},[d,m,g,x,S,_,i]);return b==null?null:v.createElement(ko.Provider,{value:h},v.createElement(Rl.Provider,{children:n,value:b}))}function b2(e){let{children:t,location:n}=e;return i2(Dp(t),n)}new Promise(()=>{});function Dp(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let a=[...t,i];if(r.type===v.Fragment){n.push.apply(n,Dp(r.props.children,a));return}r.type!==Rr&&xt(!1),!r.props.index||!r.props.children||xt(!1);let l={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Dp(r.props.children,a)),n.push(l)}),n}/** 254 * React Router DOM v6.30.4 255 * 256 * Copyright (c) Remix Software Inc. 257 * 258 * This source code is licensed under the MIT license found in the 259 * LICENSE.md file in the root directory of this source tree. 260 * 261 * @license MIT 262 */function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lp.apply(null,arguments)}function S2(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function E2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function C2(e,t){return e.button===0&&(!t||t==="_self")&&!E2(e)}function Ip(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(i=>[n,i]):[[n,r]])},[]))}function _2(e,t){let n=Ip(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const R2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],P2="6";try{window.__reactRouterVersion=P2}catch{}const T2="startTransition",Rw=nd[T2];function k2(e){let{basename:t,children:n,future:r,window:i}=e,a=v.useRef();a.current==null&&(a.current=TO({window:i,v5Compat:!0}));let l=a.current,[u,d]=v.useState({action:l.action,location:l.location}),{v7_startTransition:h}=r||{},m=v.useCallback(g=>{h&&Rw?Rw(()=>d(g)):d(g)},[d,h]);return v.useLayoutEffect(()=>l.listen(m),[l,m]),v.useEffect(()=>x2(r),[r]),v.createElement(w2,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:r})}const N2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",A2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mi=v.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:l,state:u,target:d,to:h,preventScrollReset:m,viewTransition:g}
262=t,x=S2(t,R2),{basename:S}=v.useContext(ko),_,b=!1;if(typeof h=="string"&&A2.test(h)&&(_=h,N2))try{let T=new URL(window.location.href),k=h.startsWith("//")?new URL(T.protocol+h):new URL(h),N=Om(k.pathname,S);k.origin===T.origin&&N!=null?h=N+k.search+k.hash:b=!0}catch{}let C=n2(h,{relative:i}),E=j2(h,{replace:l,state:u,target:d,preventScrollReset:m,relative:i,viewTransition:g});function P(T){r&&r(T),T.defaultPrevented||E(T)}return v.createElement("a",Lp({},x,{href:_||C,onClick:b||a?r:P,ref:n,target:d}))});var Pw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Pw||(Pw={}));var Tw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Tw||(Tw={}));function j2(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:l,viewTransition:u}=t===void 0?{}:t,d=sd(),h=ks(),m=w1(e,{relative:l});return v.useCallback(g=>{if(C2(g,n)){g.preventDefault();let x=r!==void 0?r:Ou(h)===Ou(m);d(e,{replace:x,state:i,preventScrollReset:a,relative:l,viewTransition:u})}},[h,d,m,r,i,n,e,a,l,u])}function O2(e){let t=v.useRef(Ip(e)),n=v.useRef(!1),r=ks(),i=v.useMemo(()=>_2(r.search,n.current?null:t.current),[r.search]),a=sd(),l=v.useCallback((u,d)=>{const h=Ip(typeof u=="function"?u(i):u);n.current=!0,a("?"+h,d)},[a,i]);return[i,l]}const Dm=v.createContext({});function Lm(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const od=v.createContext(null),Im=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class M2 extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function D2({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),i=v.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=v.useContext(Im);return v.useInsertionEffect(()=>{const{width:l,height:u,top:d,left:h}=i.current;if(t||!r.current||!l||!u)return;r.current.dataset.motionPopId=n;const m=document.createElement("style");return a&&(m.nonce=a),document.head.appendChild(m),m.sheet&&m.sheet.insertRule(` 263 [data-motion-pop-id="${n}"] { 264 position: absolute !important; 265 width: ${l}px !important; 266 height: ${u}px !important; 267 top: ${d}px !important; 268 left: ${h}px !important; 269 } 270 `),()=>{document.head.removeChild(m)}},[t]),p.jsx(M2,{isPresent:t,childRef:r,sizeRef:i,children:v.cloneElement(e,{ref:r})})}const L2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:l})=>{const u=Lm(I2),d=v.useId(),h=v.useCallback(g=>{u.set(g,!0);for(const x of u.values())if(!x)return;r&&r()},[u,r]),m=v.useMemo(()=>({id:d,initial:t,isPresent:n,custom:i,onExitComplete:h,register:g=>(u.set(g,!1),()=>u.delete(g))}),a?[Math.random(),h]:[n,h]);return v.useMemo(()=>{u.forEach((g,x)=>u.set(x,!1))},[n]),v.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),l==="popLayout"&&(e=p.jsx(D2,{isPresent:n,children:e})),p.jsx(od.Provider,{value:m,children:e})};function I2(){return new Map}function C1(e=!0){const t=v.useContext(od);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=v.useId();v.useEffect(()=>{e&&i(a)},[e]);const l=v.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,l]:[!0]}const Jc=e=>e.key||"";function kw(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Fm=typeof window<"u",_1=Fm?v.useLayoutEffect:v.useEffect,F2=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:l=!1})=>{const[u,d]=C1(l),h=v.useMemo(()=>kw(e),[e]),m=l&&!u?[]:h.map(Jc),g=v.useRef(!0),x=v.useRef(h),S=Lm(()=>new Map),[_,b]=v.useState(h),[C,E]=v.useState(h);_1(()=>{g.current=!1,x.current=h;for(let k=0;k<C.length;k++){const N=Jc(C[k]);m.includes(N)?S.delete(N):S.get(N)!==!0&&S.set(N,!1)}},[C,m.length,m.join("-")]);const P=[];if(h!==_){let k=[...h];for(let N=0;N<C.length;N++){const D=C[N],B=Jc(D);m.includes(B)||(k.splice(N,0,D),P.push(D))}a==="wait"&&P.length&&(k=P),E(kw(k)),b(h);return}const{forceRender:T}=v.useContext(Dm);return p.jsx(p.Fragment,{children:C.map(k=>{const N=Jc(k),D=l&&!u?!1:h===C||m.includes(N),B=()=>
vendor: 5,966 bytes, line 270
270{if(S.has(N))S.set(N,!0);else return;let O=!0;S.forEach(G=>{G||(O=!1)}),O&&(T==null||T(),E(x.current),l&&(d==null||d()),r&&r())};return p.jsx(L2,{isPresent:D,initial:!g.current||n?void 0:!1,custom:D?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:D?void 0:B,children:k},N)})})},fn=e=>e;let R1=fn;function Bm(e){let t;return()=>(t===void 0&&(t=e()),t)}const Di=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Nr=e=>e*1e3,Ar=e=>e/1e3,B2={useManualTiming:!1};function $2(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(h){a.has(h)&&(d.schedule(h),e()),h(l)}const d={schedule:(h,m=!1,g=!1)=>{const S=g&&r?t:n;return m&&a.add(h),S.has(h)||S.add(h),h},cancel:h=>{n.delete(h),a.delete(h)},process:h=>{if(l=h,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(u),t.clear(),r=!1,i&&(i=!1,d.process(h))}};return d}const Zc=["read","resolveKeyframes","update","preRender","render","postRender"],V2=40;function P1(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,l=Zc.reduce((E,P)=>(E[P]=$2(a),E),{}),{read:u,resolveKeyframes:d,update:h,preRender:m,render:g,postRender:x}=l,S=()=>{const E=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,V2),1),i.timestamp=E,i.isProcessing=!0,u.process(i),d.process(i),h.process(i),m.process(i),g.process(i),x.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(S))},_=()=>{n=!0,r=!0,i.isProcessing||e(S)};return{schedule:Zc.reduce((E,P)=>{const T=l[P];return E[P]=(k,N=!1,D=!1)=>(n||_(),T.schedule(k,N,D)),E},{}),cancel:E=>{for(let P=0;P<Zc.length;P++)l[Zc[P]].cancel(E)},state:i,steps:l}}const{schedule:rt,cancel:Es,state:jt,steps:Mh}=P1(typeof requestAnimationFrame<"u"?requestAnimationFrame:fn,!0),T1=v.createContext({strict:!1}),Nw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Li={};for(const e in Nw)Li[e]={isEnabled:t=>Nw[e].some(n=>!!t[n])};function U2(e){for(const t in e)Li[t]={...Li[t],...e[t]}}const z2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Mu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||z2.has(e)}let k1=e=>!Mu(e);function W2(e){e&&(k1=t=>t.startsWith("on")?!Mu(t):e(t))}try{W2(require("@emotion/is-prop-valid").default)}catch{}function H2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(k1(i)||n===!0&&Mu(i)||!t&&!Mu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function q2(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const id=v.createContext({});function cl(e){return typeof e=="string"||Array.isArray(e)}function ad(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const $m=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vm=["initial",...$m];function ld(e){return ad(e.animate)||Vm.some(t=>cl(e[t]))}function N1(e){return!!(ld(e)||e.variants)}function K2(e,t){if(ld(e)){const{initial:n,animate:r}=e;return{initial:n===!1||cl(n)?n:void 0,animate:cl(r)?r:void 0}}return e.inherit!==!1?t:{}}function G2(e){const{initial:t,animate:n}=K2(e,v.useContext(id));return v.useMemo(()=>({initial:t,animate:n}),[Aw(t),Aw(n)])}function Aw(e){return Array.isArray(e)?e.join(" "):e}const Q2=Symbol.for("motionComponentSymbol");function ui(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Y2(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ui(n)&&(n.current=r))},[t])}const Um=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),X2="framerAppearId",A1="data-"+Um(X2),{schedule:zm}=P1(queueMicrotask,!1),j1=v.createContext({});function J2(e,t,n,r,i){var a,l;const{visualElement:u}=v.useContext(id),d=v.useContext(T1),h=v.useContext(od),m=v.useContext(Im).reducedMotion,g=v.useRef(null);r=r||d.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:u,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m}));const x=g.current,S=v.useContext(j1);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&Z2(g.current,n,i,S);const _=v.useRef(!1);v.useInsertionEffect(()=>{x&&_.current&&x.update(n,h)});const b=n[A1],C=v.useRef(!!b&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,b))&&((l=window.MotionHasOptimisedAnimation)===null||l===void 0?void 0:l.call(window,b)));return _1(()=>{x&&(_.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),zm.render(x.render),C.current&&x.animationState&&x.animationState.animateChanges())}),v.useEffect(()=>{x&&(!C.current&&x.animationState&&x.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)===null||E===void 0||E.call(window,b)}),C.current=!1))}),x}function Z2(e,t,n,r){const{layoutId:i,layout:a,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:O1(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!l||u&&ui(u),visualElement:e,animationType:typeof a=="str
270ing"?a:"both",initialPromotionConfig:r,layoutScroll:d,layoutRoot:h})}function O1(e){if(e)return e.options.allowProjection!==!1?e.projection:O1(e.parent)}function eM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var a,l;e&&U2(e);function u(h,m){let g;const x={...v.useContext(Im),...h,layoutId:tM(h)},{isStatic:S}=x,_=G2(h),b=r(h,S);if(!S&&Fm){nM();const C=rM(x);g=C.MeasureLayout,_.visualElement=J2(i,b,x,t,C.ProjectionNode)}return p.jsxs(id.Provider,{value:_,children:[g&&_.visualElement?p.jsx(g,{visualElement:_.visualElement,...x}):null,n(i,h,Y2(b,_.visualElement,m),b,S,_.visualElement)]})}u.displayName=`motion.${typeof i=="string"?i:`create(${(l=(a=i.displayName)!==null&&a!==void 0?a:i.name)!==null&&l!==void 0?l:""})`}`;const d=v.forwardRef(u);return d[Q2]=i,d}function tM({layoutId:e}){const t=v.useContext(Dm).id;return t&&e!==void 0?t+"-"+e:e}function nM(e,t){v.useContext(T1).strict}function rM(e){const{drag:t,layout:n}=Li;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const sM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wm(e){return typeof e!="string"||e.includes("-")?!1:!!(sM.indexOf(e)>-1||/[A-Z]/u.test(e))}function jw(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Hm(e,t,n,r){if(typeof t=="function"){const[i,a]=jw(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=jw(r);t=t(n!==void 0?n:e.custom,i,a)}return t}const Fp=e=>Array.isArray(e),oM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),iM=e=>Fp(e)?e[e.length-1]||0:e,zt=e=>!!(e&&e.getVelocity);function pu(e){const t=zt(e)?e.get():e;return oM(t)?t.toValue():t}function aM({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){const l={latestValues:lM(r,i,a,e),renderState:t()};return n&&(l.onMount=u=>n({props:r,current:u,...l}),l.onUpdate=u=>n(u)),l}const M1=e=>(t,n)=>{const r=v.useContext(id),i=v.useContext(od),a=()=>aM(e,t,r,i);return n?a():Lm(a)};function lM(e,t,n,r){const i={},a=r(e,{});for(const x in a)i[x]=pu(a[x]);let{initial:l,animate:u}=e;const d=ld(e),h=N1(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const g=m?u:l;if(g&&typeof g!="boolean"&&!ad(g)){const x=Array.isArray(g)?g:[g];for(let S=0;S<x.length;S++){const _=Hm(e,x[S]);if(_){const{transitionEnd:b,transition:C,...E}=_;for(const P in E){let T=E[P];if(Array.isArray(T)){const k=m?T.length-1:0;T=T[k]}T!==null&&(i[P]=T)}for(const P in b)i[P]=b[P]}}}return i}const Vi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],No=new Set(Vi),D1=e=>t=>typeof t=="string"&&t.startsWith(e),L1=D1("--"),cM=D1("var(--"),qm=e=>cM(e)?uM.test(e.split("/*")[0].trim()):!1,uM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,I1=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,Ui={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ul={...Ui,transform:e=>Or(0,1,e)},eu={...Ui,default:1},Tl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),as=Tl("deg"),cr=Tl("%"),je=Tl("px"),dM=Tl("vh"),fM=Tl("vw"),Ow={...cr,parse:e=>cr.parse(e)/100,transform:e=>cr.transform(e*100)},hM={borderWidth:je,borderTopWidth:je,borderRightWidth:je,borderBottomWidth:je,borderLeftWidth:je,borderRadius:je,radius:je,borderTopLeftRadius:je,borderTopRightRadius:je,borderBottomRightRadius:je,borderBottomLeftRadius:je,width:je,maxWidth:je,height:je,maxHeight:je,top:je,right:je,bottom:je,left:je,padding:je,paddingTop:je,paddingRight:je,paddingBottom:je,paddingLeft:je,margin:je,marginTop:je,marginRight:je,marginBottom:je,marginLeft:je,backgroundPositionX:je,backgroundPositionY:je},pM={rotate:as,rotateX:as,rotateY:as,rotateZ:as,scale:eu,scaleX:eu,scaleY:eu,scaleZ:eu,skew:as,skewX:as,skewY:as,distance:je,translateX:je,translateY:je,translateZ:je,x:je,y:je,z:je,perspective:je,transformPerspective:je,opacity:ul,originX:Ow,originY:Ow,originZ:je},Mw={...Ui,transform:Math.round},Km={...hM,...pM,zIndex:Mw,size:je,fillOpacity:ul,strokeOpacity:ul,numOctaves:Mw},mM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gM=Vi.length;function yM(e,t,n){let r="",i=!0;for(let a=0;a<gM;a++){const l=Vi[a],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number"?d=u===(l.startsWith("scale")?1:0):d=parseFloat(u)===0,!d||n){const h=I1(u,Km[l]);if(!d){i=!1;const m=mM[l]||l;r+=`${m}(${h}) `}n&&(t[l]=h)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Gm(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let l=!1,u=!1;for(const d in t){const h=t[d];if(No.has(d)){l=!0;continue}else if(L1(d)){i[d]=h;continue}else{const m=I1(h,Km[d]);d.startsWith("origin")?(u=!0,a[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=yM(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:m
vendor: 21,332 bytes, line 270
270=0}=a;r.transformOrigin=`${d} ${h} ${m}`}}const vM={offset:"stroke-dashoffset",array:"stroke-dasharray"},xM={offset:"strokeDashoffset",array:"strokeDasharray"};function wM(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?vM:xM;e[a.offset]=je.transform(-r);const l=je.transform(t),u=je.transform(n);e[a.array]=`${l} ${u}`}function Dw(e,t,n){return typeof e=="string"?e:je.transform(t+n*e)}function bM(e,t,n){const r=Dw(t,e.x,e.width),i=Dw(n,e.y,e.height);return`${r} ${i}`}function Qm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:l,pathSpacing:u=1,pathOffset:d=0,...h},m,g){if(Gm(e,h,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:S,dimensions:_}=e;x.transform&&(_&&(S.transform=x.transform),delete x.transform),_&&(i!==void 0||a!==void 0||S.transform)&&(S.transformOrigin=bM(_,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(x.x=t),n!==void 0&&(x.y=n),r!==void 0&&(x.scale=r),l!==void 0&&wM(x,l,u,d,!1)}const Ym=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),F1=()=>({...Ym(),attrs:{}}),Xm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function B1(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const $1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function V1(e,t,n,r){B1(e,t,void 0,r);for(const i in t.attrs)e.setAttribute($1.has(i)?i:Um(i),t.attrs[i])}const Du={};function SM(e){Object.assign(Du,e)}function U1(e,{layout:t,layoutId:n}){return No.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Du[e]||e==="opacity")}function Jm(e,t,n){var r;const{style:i}=e,a={};for(const l in i)(zt(i[l])||t.style&&zt(t.style[l])||U1(l,e)||((r=n==null?void 0:n.getValue(l))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[l]=i[l]);return a}function z1(e,t,n){const r=Jm(e,t,n);for(const i in e)if(zt(e[i])||zt(t[i])){const a=Vi.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function EM(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Lw=["x","y","width","height","cx","cy","r"],CM={useVisualState:M1({scrapeMotionValuesFromProps:z1,createRenderState:F1,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(const u in i)if(No.has(u)){a=!0;break}}if(!a)return;let l=!t;if(t)for(let u=0;u<Lw.length;u++){const d=Lw[u];e[d]!==t[d]&&(l=!0)}l&&rt.read(()=>{EM(n,r),rt.render(()=>{Qm(r,i,Xm(n.tagName),e.transformTemplate),V1(n,r)})})}})},_M={useVisualState:M1({scrapeMotionValuesFromProps:Jm,createRenderState:Ym})};function W1(e,t,n){for(const r in t)!zt(t[r])&&!U1(r,n)&&(e[r]=t[r])}function RM({transformTemplate:e},t){return v.useMemo(()=>{const n=Ym();return Gm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function PM(e,t){const n=e.style||{},r={};return W1(r,n,e),Object.assign(r,RM(e,t)),r}function TM(e,t){const n={},r=PM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function kM(e,t,n,r){const i=v.useMemo(()=>{const a=F1();return Qm(a,t,Xm(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};W1(a,e.style,e),i.style={...a,...i.style}}return i}function NM(e=!1){return(n,r,i,{latestValues:a},l)=>{const d=(Wm(n)?kM:TM)(r,a,l,n),h=H2(r,typeof n=="string",e),m=n!==v.Fragment?{...h,...d,ref:i}:{},{children:g}=r,x=v.useMemo(()=>zt(g)?g.get():g,[g]);return v.createElement(n,{...m,children:x})}}function AM(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const l={...Wm(r)?CM:_M,preloadedFeatures:e,useRender:NM(i),createVisualElement:t,Component:r};return eM(l)}}function H1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function cd(e,t,n){const r=e.getProps();return Hm(r,t,n!==void 0?n:r.custom,e)}const jM=Bm(()=>window.ScrollTimeline!==void 0);class OM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(jM()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class MM extends OM{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Zm(e,t){return e?e[t]||e.default||e:void 0}const Bp=2e4;function q1(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Bp;)t+=n,r=e.next(t);return t>=Bp?1/0:t}function eg(e){return typeof e=="function"}function Iw(e,t){e.timeline=t,e.onfinish=null}const tg=e=>Array.isArray(e)&&typeof e[0]=="number",DM={linearEasing:void 0};function LM(e,t){const n=Bm(e);return()=>{var r;return(r=DM[t])!==null&&r!==void 0?r:n()}}const Lu=LM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),K1=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=e(Di(0,i-1,a))+", ";return`linear(${r.substring(0,r.length-2)})`};function G1(e){return!!(typeof e=="function"&&Lu()||!e||typeof e=="string"&&(e in $p||Lu())||tg(e)||Array.isArray(e)&&e.every(G1))}const Va=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$p={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Va([0,.65,.55,1]),circOut:Va([.55,0,1,.45]),backIn:Va([.31,.01,.66,-.59]),backOut:Va([.33,1.53,.69,.99])};function Q1(e,t){if(e)return typeof e=="function"&&Lu()?K1(e,t):tg(e)?Va(e):Array.isArray(e)?e.map(n=>Q1(n,t)||$p.easeOut):$p[e]}const $n={x:!1,y:!1};function Y1(){return $n.x||$n.y}function IM(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function X1(e,t){const n=IM(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Fw(e){return t=>{t.pointerType==="touch"||Y1()||e(t)}}function FM(e,t,n={}){const[r,i,a]=X1(e,n),l=Fw(u=>{const{target:d}=u,h=t(u);if(typeof h!="function"||!d)return;const m=Fw(g=>{h(g),d.removeEventListener("pointerleave",m)});d.addEventListener("pointerleave",m,i)});return r.forEach(u=>{u.addEventListener("pointerenter",l,i)}),a}const J1=(e,t)=>t?e===t?!0:J1(e,t.parentElement):!1,ng=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,BM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $M(e){return BM.has(e.tagName)||e.tabIndex!==-1}const Ua=new WeakSet;function Bw(e){return t=>{t.key==="Enter"&&e(t)}}function Dh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const VM=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Bw(()=>{if(Ua.has(n))return;Dh(n,"down");const i=Bw(()=>{Dh(n,"up")}),a=()=>Dh(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function $w(e){return ng(e)&&!Y1()}function UM(e,t,n={}){const[r,i,a]=X1(e,n),l=u=>{const d=u.currentTarget;if(!$w(u)||Ua.has(d))return;Ua.add(d);const h=t(u),m=(S,_)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",x),!(!$w(S)||!Ua.has(d))&&(Ua.delete(d),typeof h=="function"&&h(S,{success:_}))},g=S=>{m(S,n.useGlobalTarget||J1(d,S.target))},x=S=>{m(S,!1)};window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",x,i)};return r.forEach(u=>{!$M(u)&&u.getAttribute("tabindex")===null&&(u.tabIndex=0),(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,i),u.addEventListener("focus",h=>VM(h,i),i)}),a}function zM(e){return e==="x"||e==="y"?$n[e]?null:($n[e]=!0,()=>{$n[e]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}const Z1=new Set(["width","height","top","left","right","bottom",...Vi]);let mu;function WM(){mu=void 0}const ur={now:()=>(mu===void 0&&ur.set(jt.isProcessing||B2.useManualTiming?jt.timestamp:performance.now()),mu),set:e=>{mu=e,queueMicrotask(WM)}};function rg(e,t){e.indexOf(t)===-1&&e.push(t)}function sg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class og{constructor(){this.subscriptions=[]}add(t){return rg(this.subscriptions,t),()=>sg(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const l=this.subscriptions[a];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function eE(e,t){return t?e*(1e3/t):0}const Vw=30,HM=e=>!isNaN(parseFloat(e));class qM{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=ur.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ur.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=HM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new og);const r=this.events[t].add(n);return t==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vw);return eE(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dl(e,t){return new qM(e,t)}function KM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,dl(n))}function GM(e,t){const n=cd(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const l in a){const u=iM(a[l]);KM(e,l,u)}}function QM(e){return!!(zt(e)&&e.add)}function Vp(e,t){const n=e.getValue("willChange");if(QM(n))return n.add(t)}function tE(e){return e.props[A1]}const nE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,YM=1e-7,XM=12;function JM(e,t,n,r,i){let a,l,u=0;do l=t+(n-t)/2,a=nE(l,r,i)-e,a>0?n=l:t=l;while(Math.abs(a)>YM&&++u<XM);return l}function kl(e,t,n,r){if(e===t&&n===r)return fn;const i=a=>JM(a,0,1,e,n);return a=>a===0||a===1?a:nE(i(a),t,r)}const rE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sE=e=>t=>1-e(1-t),oE=kl(.33,1.53,.69,.99),ig=sE(oE),iE=rE(ig),aE=e=>(e*=2)<1?.5*ig(e):.5*(2-Math.pow(2,-10*(e-1))),ag=e=>1-Math.sin(Math.acos(e)),lE=sE(ag),cE=rE(ag),uE=e=>/^0[^.\s]+$/u.test(e);function ZM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||uE(e):!0}const Ya=e=>Math.round(e*1e5)/1e5,lg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eD(e){return e==null}const tD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cg=(e,t)=>n=>!!(typeof n=="string"&&tD.test(n)&&n.startsWith(e)||t&&!eD(n)&&Object.prototype.hasOwnProperty.call(n,t)),dE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,l,u]=r.match(lg);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},nD=e=>Or(0,255,e),Lh={...Ui,transform:e=>Math.round(nD(e))},oo={test:cg("rgb","red"),parse:dE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lh.transform(e)+", "+Lh.transform(t)+", "+Lh.transform(n)+", "+Ya(ul.transform(r))+")"};function rD(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Up={test:cg("#"),parse:rD,transform:oo.transform},di={test:cg("hsl","hue"),parse:dE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+cr.transform(Ya(t))+", "+cr.transform(Ya(n))+", "+Ya(ul.transform(r))+")"},Vt={test:e=>oo.test(e)||Up.test(e)||di.test(e),parse:e=>oo.test(e)?oo.parse(e):di.test(e)?di.parse(e):Up.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?oo.transform(e):di.transform(e)},sD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oD(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(lg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(sD))===null||n===void 0?void 0:n.length)||0)>0}const fE="number",hE="color",iD="var",aD="var(",Uw="${}",lD=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const u=t.replace(lD,d=>(Vt.test(d)?(r.color.push(a),i.push(hE),n.push(Vt.parse(d))):d.startsWith(aD)?(r.var.push(a),i.push(iD),n.push(d)):(r.number.push(a),i.push(fE),n.push(parseFloat(d))),++a,Uw)).split(Uw);return{values:n,split:u,indexes:r,types:i}}function pE(e){return fl(e).values}function mE(e){const{split:t,types:n}=fl(e),r=t.length;return i=>{let a="";for(let l=0;l<r;l++)if(a+=t[l],i[l]!==void 0){const u=n[l];u===fE?a+=Ya(i[l]):u===hE?a+=Vt.transform(i[l]):a+=i[l]}return a}}const cD=e=>typeof e=="number"?0:e;function uD(e){const t=pE(e);return mE(e)(t.map(cD))}const Cs={test:oD,parse:pE,createTransformer:mE,getAnimatableNone:uD},dD=new Set(["brightness","contrast","saturate","opacity"]);function fD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(lg)||[];if(!r)return e;const i=n.replace(r,"");let a=dD.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const hD=/\b([a-z-]*)\(.*?\)/gu,zp={...Cs,getAnimatableNone:e=>{const t=e.match(hD);return t?t.map(fD).join(" "):e}},pD={...Km,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:zp,WebkitFilter:zp},ug=e=>pD[e];function gE(e,t){let n=ug(e);return n!==zp&&(n=Cs),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mD=new Set(["auto","none","0"]);function gD(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!mD.has(a)&&fl(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=gE(n,i)}const zw=e=>e===Ui||e===je,Ww=(e,t)=>parseFloat(e.split(", ")[t]),Hw=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Ww(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?Ww(a[1],e):0}},yD=new Set(["x","y","z"]),vD=Vi.filter(e=>!yD.has(e));function xD(e){const t=[];return vD.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ii={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Hw(4,13),y:Hw(5,14)};Ii.translateX=Ii.x;Ii.translateY=Ii.y;const yo=new Set;let Wp=!1,Hp=!1;function yE(){if(Hp){const e=Array.from(yo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=xD(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,l])=>{var u;(u=r.getValue(a))===null||u===void 0||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Hp=!1,Wp=!1,yo.forEach(e=>e.complete()),yo.clear()}function vE(){yo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Hp=!0)})}function wD(){vE(),yE()}class dg{constructor(t,n,r,i,a,l=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=l}scheduleResolve(){this.isScheduled=!0,this.isAsync?(yo.add(this),Wp||(Wp=!0,rt.read(vE),rt.resolveKeyframes(yE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){const l=i==null?void 0:i.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&n){const d=r.readValue(n,u);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=u),i&&l===void 0&&i.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),yo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,yo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),bD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function SD(e){const t=bD.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function wE(e,t,n=1){const[r,i]=SD(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const l=a.trim();return xE(l)?parseFloat(l):l}return qm(i)?wE(i,t,n+1):i}const bE=e=>t=>t.test(e),ED={test:e=>e==="auto",parse:e=>e},SE=[Ui,je,cr,as,fM,dM,ED],qw=e=>SE.find(bE(e));class EE extends dg{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),qm(h))){const m=wE(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Z1.has(r)||t.length!==2)return;const[i,a]=t,l=qw(i),u=qw(a);if(l!==u)if(zw(l)&&zw(u))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)ZM(t[i])&&r.push(i);r.length&&gD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ii[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const a=n.getValue(r);a&&a.jump(this.measuredOrigin,!1);const l=i.length-1,u=i[l];i[l]=Ii[r](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEac
vendor: 11,352 bytes, line 270
270h(([d,h])=>{n.getValue(d).set(h)}),this.resolveNoneKeyframes()}}const Kw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Cs.test(e)||e==="0")&&!e.startsWith("url("));function CD(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function _D(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],l=Kw(i,t),u=Kw(a,t);return!l||!u?!1:CD(e)||(n==="spring"||eg(n))&&r}const RD=e=>e!==null;function ud(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(RD),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const PD=40;class CE{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:l="loop",...u}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ur.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:l,...u},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>PD?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&wD(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ur.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:l,onComplete:u,onUpdate:d,isGenerator:h}=this.options;if(!h&&!_D(t,r,i,a))if(l)this.options.duration=0;else{d&&d(ud(t,this.options,n)),u&&u(),this.resolveFinishedPromise();return}const m=this.initPlayback(t,n);m!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...m},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const at=(e,t,n)=>e+(t-e)*n;function Ih(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function TD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,l=0;if(!t)i=a=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;i=Ih(d,u,e+1/3),a=Ih(d,u,e),l=Ih(d,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(l*255),alpha:r}}function Iu(e,t){return n=>n>0?t:e}const Fh=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},kD=[Up,oo,di],ND=e=>kD.find(t=>t.test(e));function Gw(e){const t=ND(e);if(!t)return!1;let n=t.parse(e);return t===di&&(n=TD(n)),n}const Qw=(e,t)=>{const n=Gw(e),r=Gw(t);if(!n||!r)return Iu(e,t);const i={...n};return a=>(i.red=Fh(n.red,r.red,a),i.green=Fh(n.green,r.green,a),i.blue=Fh(n.blue,r.blue,a),i.alpha=at(n.alpha,r.alpha,a),oo.transform(i))},AD=(e,t)=>n=>t(e(n)),Nl=(...e)=>e.reduce(AD),qp=new Set(["none","hidden"]);function jD(e,t){return qp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OD(e,t){return n=>at(e,t,n)}function fg(e){return typeof e=="number"?OD:typeof e=="string"?qm(e)?Iu:Vt.test(e)?Qw:LD:Array.isArray(e)?_E:typeof e=="object"?Vt.test(e)?Qw:MD:Iu}function _E(e,t){const n=[...e],r=n.length,i=e.map((a,l)=>fg(a)(a,t[l]));return a=>{for(let l=0;l<r;l++)n[l]=i[l](a);return n}}function MD(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=fg(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function DD(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const l=t.types[a],u=e.indexes[l][i[l]],d=(n=e.values[u])!==null&&n!==void 0?n:0;r[a]=d,i[l]++}return r}const LD=(e,t)=>{const n=Cs.createTransformer(t),r=fl(e),i=fl(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?qp.has(e)&&!i.values.length||qp.has(t)&&!r.values.length?jD(e,t):Nl(_E(DD(r,i),i.values),n):Iu(e,t)};function RE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?at(e,t,n):fg(e)(e,t)}const ID=5;function PE(e,t,n){const r=Math.max(t-ID,0);return eE(n-e(r),t-r)}const dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Bh=.001;function FD({duration:e=dt.duration,bounce:t=dt.bounce,velocity:n=dt.velocity,mass:r=dt.mass}){let i,a,l=1-t;l=Or(dt.minDamping,dt.maxDamping,l),e=Or(dt.minDuration,dt.maxDuration,Ar(e)),l<1?(i=h=>{const m=h*l,g=m*e,x=m-n,S=Kp(h,l),_=Math.exp(-g);return Bh-x/S*_},a=h=>{const g=h*l*e,x=g*n+n,S=Math.pow(l,2)*Math.pow(h,2)*e,_=Math.exp(-g),b=Kp(Math.pow(h,2),l);return(-i(h)+Bh>0?-1:1)*((x-S)*_)/b}):(i=h=>{const m=Math.exp(-h*e),g=(h-n)*e+1;return-Bh+m*g},a=h=>{const m=Math.exp(-h*e),g=(n-h)*(e*e);return m*g});const u=5/e,d=$D(i,a,u);if(e=Nr(e),isNaN(d))return{stiffness:dt.stiffness,damping:dt.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const BD=12;function $D(e,t,n){let r=n;for(let i=1;i<BD;i++)r=r-e(r)/t(r);return r}function Kp(e,t){return e*Math.sqrt(1-t*t)}const VD=["duration","bounce"],UD=["stiffness","damping","mass"];function Yw(e,t){return t.some(n=>e[n]!==void 0)}function zD(e){let t={velocity:dt.velocity,stiffness:dt.stiffness,damping:dt.damping,mass:dt.mass,isResolvedFromDuration:!1,...e};if(!Yw(e,UD)&&Yw(e,VD))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:dt.mass,stiffness:i,damping:a}}else{const n=FD(e);t={...t,...n,mass:dt.mass},t.isResolvedFromDuration=!0}return t}function TE(e=dt.visualDuration,t=dt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:a},{stiffness:d,damping:h,mass:m,duration:g,velocity:x,isResolvedFromDuration:S}=zD({...n,velocity:-Ar(n.velocity||0)}),_=x||0,b=h/(2*Math.sqrt(d*m)),C=l-a,E=Ar(Math.sqrt(d/m)),P=Math.abs(C)<5;r||(r=P?dt.restSpeed.granular:dt.restSpeed.default),i||(i=P?dt.restDelta.granular:dt.restDelta.default);let T;if(b<1){const N=Kp(E,b);T=D=>{const B=Math.exp(-b*E*D);return l-B*((_+b*E*C)/N*Math.sin(N*D)+C*Math.cos(N*D))}}else if(b===1)T=N=>l-Math.exp(-E*N)*(C+(_+E*C)*N);else{const N=E*Math.sqrt(b*b-1);T=D=>{const B=Math.exp(-b*E*D),O=Math.min(N*D,300);return l-B*((_+b*E*C)*Math.sinh(O)+N*C*Math.cosh(O))/N}}const k={calculatedDuration:S&&g||null,next:N=>{const D=T(N);if(S)u.done=N>=g;else{let B=0;b<1&&(B=N===0?Nr(_):PE(T,N,D));const O=Math.abs(B)<=r,G=Math.abs(l-D)<=i;u.done=O&&G}return u.value=u.done?l:D,u},toString:()=>{const N=Math.min(q1(k),Bp),D=K1(B=>k.next(N*B).value,N,30);return N+"ms "+D}};return k}function Xw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:l,min:u,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],x={done:!1,value:g},S=O=>u!==void 0&&O<u||d!==void 0&&O>d,_=O=>u===void 0?d:d===void 0||Math.abs(u-O)<Math.abs(d-O)?u:d;let b=n*t;const C=g+b,E=l===void 0?C:l(C);E!==C&&(b=E-g);const P=O=>-b*Math.exp(-O/r),T=O=>E+P(O),k=O=>{const G=P(O),J=T(O);x.done=Math.abs(G)<=h,x.value=x.done?E:J};let N,D;const B=O=>{S(x.value)&&(N=O,D=TE({keyframes:[x.value,_(x.value)],velocity:PE(T,O,x.value),damping:i,stiffness:a,restDelta:h,restSpeed:m}))};return B(0),{calculatedDuration:null,next:O=>{let G=!1;return!D&&N===void 0&&(G=!0,k(O),B(O)),N!==void 0&&O>=N?D.next(O-N):(!G&&k(O),x)}}}const WD=kl(.42,0,1,1),HD=kl(0,0,.58,1),kE=kl(.42,0,.58,1),qD=e=>Array.isArray(e)&&typeof e[0]!="number",KD={linear:fn,easeIn:WD,easeInOut:kE,easeOut:HD,circIn:ag,circInOut:cE,circOut:lE,backIn:ig,backInOut:iE,backOut:oE,anticipate:aE},Jw=e=>{if(tg(e)){R1(e.length===4);const[t,n,r,i]=e;return kl(t,n,r,i)}else if(typeof e=="string")return KD[e];return e};function GD(e,t,n){const r=[],i=n||RE,a=e.length-1;for(let l=0;l<a;l++){let u=i(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||fn:t;u=Nl(d,u)}r.push(u)}return r}function QD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(R1(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=GD(t,r,i),d=u.length,h=m=>{if(l&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const x=Di(e[g],e[g+1],m);return u[g](x)};return n?m=>h(Or(e[0],e[a-1],m)):h}function YD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Di(0,t,r);e.push(at(n,1,i))}}function XD(e){const t=[0];return YD(t,e.length-1),t}function JD(e,t){return e.map(n=>n*t)}function ZD(e,t){return e.map(()=>t||kE).splice(0,e.length-1)}function Fu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=qD(r)?r.map(Jw):Jw(r),a={done:!1,value:t[0]},l=JD(n&&n.length===t.length?n:XD(t),e),u=QD(l,t,{ease:Array.isArray(i)?i:ZD(t,i)});return{calculatedDuration:e,next:d=>(a.value=u(d),a.done=d>=e,a)}}const eL=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>Es(t),now:()=>jt.isProcessing?jt.timestamp:ur.now()}},tL={decay:Xw,inertia:Xw,tween:Fu,keyframes:Fu,spring:TE},nL=e=>e/100;class hg extends CE{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:d}=this.options;d&&d()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,l=(i==null?void 0:i.KeyframeResolver)||dg,u=(d,h)=>this.onKeyframesResolved(d,h);this.resolver=new l(a,u,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:l=0}=this.options,u=eg(n)?n:tL[n]||Fu;let d,h;u!==Fu&&typeof t[0]!="number"&&(d=Nl(nL,RE(t[0],t[1])),t=[0,100]);const m=u({...this.options,keyframes:t});a==="mirror"&&(h=u({...this.options,keyframes:[...t].reverse(),velocity:-l})),m.calculatedDuration===null&&(m.calculatedDuration=q1(m));const{calculatedDuration:g}=m,x=g+i,S=x*(r+1)-i;return{generator:m,mirroredGenerator:h,mapPercentToKeyframes:d,calculatedDuration:g,resolvedDuration:x,totalDuration:S}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:l,mapPercentToKeyframes:u,keyframes:d,calculatedDuration:h,totalDuration:m,resolvedDuration:g}=r;if(this.startTime===null)return a.next(0);const{delay:x,repeat:S,repeatType:_,repeatDelay:b,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-m/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const E=this.currentTime-x*(this.speed>=0?1:-1),P=this.speed>=0?E<0:E>m;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=m);let T=this.currentTime,k=a;if(S){const O=Math.min(this.currentTime,m)/g;let G=Math.floor(O),J=O%1;!J&&O>
vendor: 54,946 bytes, line 270
270=1&&(J=1),J===1&&G--,G=Math.min(G,S+1),!!(G%2)&&(_==="reverse"?(J=1-J,b&&(J-=b/g)):_==="mirror"&&(k=l)),T=Or(0,1,J)*g}const N=P?{done:!1,value:d[0]}:k.next(T);u&&(N.value=u(N.value));let{done:D}=N;!P&&h!==null&&(D=this.speed>=0?this.currentTime>=m:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return B&&i!==void 0&&(N.value=ud(d,this.options,i)),C&&C(N.value),B&&this.finish(),N}get duration(){const{resolved:t}=this;return t?Ar(t.calculatedDuration):0}get time(){return Ar(this.currentTime)}set time(t){t=Nr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ar(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=eL,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const rL=new Set(["opacity","clipPath","filter","transform"]);function sL(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:l="loop",ease:u="easeInOut",times:d}={}){const h={[t]:n};d&&(h.offset=d);const m=Q1(u,i);return Array.isArray(m)&&(h.easing=m),e.animate(h,{delay:r,duration:i,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:a+1,direction:l==="reverse"?"alternate":"normal"})}const oL=Bm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bu=10,iL=2e4;function aL(e){return eg(e.type)||e.type==="spring"||!G1(e.ease)}function lL(e,t){const n=new hg({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&a<iL;)r=n.sample(a),i.push(r.value),a+=Bu;return{times:void 0,keyframes:i,duration:a-Bu,ease:"linear"}}const NE={anticipate:aE,backInOut:iE,circInOut:cE};function cL(e){return e in NE}class Zw extends CE{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:a}=this.options;this.resolver=new EE(a,(l,u)=>this.onKeyframesResolved(l,u),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:a,type:l,motionValue:u,name:d,startTime:h}=this.options;if(!u.owner||!u.owner.current)return!1;if(typeof a=="string"&&Lu()&&cL(a)&&(a=NE[a]),aL(this.options)){const{onComplete:g,onUpdate:x,motionValue:S,element:_,...b}=this.options,C=lL(t,b);t=C.keyframes,t.length===1&&(t[1]=t[0]),r=C.duration,i=C.times,a=C.ease,l="keyframes"}const m=sL(u.owner.current,d,t,{...this.options,duration:r,times:i,ease:a});return m.startTime=h??this.calcStartTime(),this.pendingTimeline?(Iw(m,this.pendingTimeline),this.pendingTimeline=void 0):m.onfinish=()=>{const{onComplete:g}=this.options;u.set(ud(t,this.options,n)),g&&g(),this.cancel(),this.resolveFinishedPromise()},{animation:m,duration:r,times:i,type:l,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ar(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ar(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Nr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return fn;const{animation:r}=n;Iw(r,t)}return fn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:l,times:u}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:h,onUpdate:m,onComplete:g,element:x,...S}=this.options,_=new hg({...S,keyframes:r,duration:i,type:a,ease:l,times:u,isGenerator:!0}),b=Nr(this.time);h.setWithVelocity(_.sample(b-Bu).value,_.sample(b).value,Bu)}const{onStop:d}=this.options;d&&d(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:l,type:u}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=n.owner.getProps();return oL()&&r&&rL.has(r)&&!d&&!h&&!i&&a!=="mirror"&&l!==0&&u!=="inertia"}}const uL={type:"spring",stiffness:500,damping:25,restSpeed:10},dL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fL={type:"keyframes",duration:.8},hL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pL=(e,{keyframes:t})=>t.length>2?fL:No.has(e)?e.startsWith("scale")?dL(t[1]):uL:hL;function mL({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:l,repeatDelay:u,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const pg=(e,t,n,r={},i,a)=>l=>{const u=Zm(r,e)||{},d=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Nr(d);let m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-h,onUpdate:x=>{t.set(x),u.onUpdate&&u.onUpdate(x)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:a?void 0:i};mL(u)||(m={...m,...pL(e,m)}),m.duration&&(m.duration=Nr(m.duration)),m.repeatDelay&&(m.repeatDelay=Nr(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(g=!0)),g&&!a&&t.get()!==void 0){const x=ud(m.keyframes,u);if(x!==void 0)return rt.update(()=>{m.onUpdate(x),m.onComplete()}),new MM([])}return!a&&Zw.supports(m)?new Zw(m):new hg(m)};function gL({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function AE(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:l=e.getDefaultTransition(),transitionEnd:u,...d}=t;r&&(l=r);const h=[],m=i&&e.animationState&&e.animationState.getState()[i];for(const g in d){const x=e.getValue(g,(a=e.latestValues[g])!==null&&a!==void 0?a:null),S=d[g];if(S===void 0||m&&gL(m,g))continue;const _={delay:n,...Zm(l||{},g)};let b=!1;if(window.MotionHandoffAnimation){const E=tE(e);if(E){const P=window.MotionHandoffAnimation(E,g,rt);P!==null&&(_.startTime=P,b=!0)}}Vp(e,g),x.start(pg(g,x,S,e.shouldReduceMotion&&Z1.has(g)?{type:!1}:_,e,b));const C=x.animation;C&&h.push(C)}return u&&Promise.all(h).then(()=>{rt.update(()=>{u&&GM(e,u)})}),h}function Gp(e,t,n={}){var r;const i=cd(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const l=i?()=>Promise.all(AE(e,i,n)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:m=0,staggerChildren:g,staggerDirection:x}=a;return yL(e,t,m+h,g,x,n)}:()=>Promise.resolve(),{when:d}=a;if(d){const[h,m]=d==="beforeChildren"?[l,u]:[u,l];return h().then(()=>m())}else return Promise.all([l(),u(n.delay)])}function yL(e,t,n=0,r=0,i=1,a){const l=[],u=(e.variantChildren.size-1)*r,d=i===1?(h=0)=>h*r:(h=0)=>u-h*r;return Array.from(e.variantChildren).sort(vL).forEach((h,m)=>{h.notify("AnimationStart",t),l.push(Gp(h,t,{...a,delay:n+d(m)}).then(()=>h.notify("AnimationComplete",t)))}),Promise.all(l)}function vL(e,t){return e.sortNodePosition(t)}function xL(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>Gp(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=Gp(e,t,n);else{const i=typeof t=="function"?cd(e,t,n.custom):t;r=Promise.all(AE(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const wL=Vm.length;function jE(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?jE(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wL;n++){const r=Vm[n],i=e.props[r];(cl(i)||i===!1)&&(t[r]=i)}return t}const bL=[...$m].reverse(),SL=$m.length;function EL(e){return t=>Promise.all(t.map(({animation:n,options:r})=>xL(e,n,r)))}function CL(e){let t=EL(e),n=e0(),r=!0;const i=d=>(h,m)=>{var g;const x=cd(e,m,d==="exit"?(g=e.presenceContext)===null||g===void 0?void 0:g.custom:void 0);if(x){const{transition:S,transitionEnd:_,...b}=x;h={...h,...b,..._}}return h};function a(d){t=d(e)}function l(d){const{props:h}=e,m=jE(e.parent)||{},g=[],x=new Set;let S={},_=1/0;for(let C=0;C<SL;C++){const E=bL[C],P=n[E],T=h[E]!==void 0?h[E]:m[E],k=cl(T),N=E===d?P.isActive:null;N===!1&&(_=C);let D=T===m[E]&&T!==h[E]&&k;if(D&&r&&e.manuallyAnimateOnMount&&(D=!1),P.protectedKeys={...S},!P.isActive&&N===null||!T&&!P.prevProp||ad(T)||typeof T=="boolean")continue;const B=_L(P.prevProp,T);let O=B||E===d&&P.isActive&&!D&&k||C>_&&k,G=!1;const J=Array.isArray(T)?T:[T];let se=J.reduce(i(E),{});N===!1&&(se={});const{prevResolvedValues:ue={}}=P,ae={...ue,...se},W=ee=>{O=!0,x.has(ee)&&(G=!0,x.delete(ee)),P.needsAnimating[ee]=!0;const V=e.getValue(ee);V&&(V.liveStyle=!1)};for(const ee in ae){const V=se[ee],H=ue[ee];if(S.hasOwnProperty(ee))continue;let $=!1;Fp(V)&&Fp(H)?$=!H1(V,H):$=V!==H,$?V!=null?W(ee):x.add(ee):V!==void 0&&x.has(ee)?W(ee):P.protectedKeys[ee]=!0}P.prevProp=T,P.prevResolvedValues=se,P.isActive&&(S={...S,...se}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(D&&B)||G)&&g.push(...J.map(ee=>({animation:ee,options:{type:E}})))}if(x.size){const C={};x.forEach(E=>{const P=e.getBaseTarget(E),T=e.getValue(E);T&&(T.liveStyle=!0),C[E]=P??null}),g.push({animation:C})}let b=!!g.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(g):Promise.resolve()}function u(d,h){var m;if(n[d].isActive===h)return Promise.resolve();(m=e.variantChildren)===null||m===void 0||m.forEach(x=>{var S;return(S=x.animationState)===null||S===void 0?void 0:S.setActive(d,h)}),n[d].isActive=h;const g=l(d);for(const x in n)n[x].protectedKeys={};return g}return{animateChanges:l,setActive:u,setAnimateFunction:a,getState:()=>n,reset:()=>{n=e0(),r=!0}}}function _L(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!H1(t,e):!1}function Js(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function e0(){return{animate:Js(!0),whileInView:Js(),whileHover:Js(),whileTap:Js(),whileDrag:Js(),whileFocus:Js(),exit:Js()}}class Ns{constructor(t){this.isMounted=!1,this.node=t}update(){}}class RL extends Ns{constructor(t){super(t),t.animationState||(t.animationState=CL(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ad(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let PL=0;class TL extends Ns{constructor(){super(...arguments),this.id=PL++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const kL={animation:{Feature:RL},exit:{Feature:TL}};function hl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Al(e){return{point:{x:e.pageX,y:e.pageY}}}const NL=e=>t=>ng(t)&&e(t,Al(t));function Xa(e,t,n,r){return hl(e,t,NL(n),r)}const t0=(e,t)=>Math.abs(e-t);function AL(e,t){const n=t0(e.x,t.x),r=t0(e.y,t.y);return Math.sqrt(n**2+r**2)}class OE{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Vh(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=AL(g.offset,{x:0,y:0})>=3;if(!x&&!S)return;const{point:_}=g,{timestamp:b}=jt;this.history.push({..._,timestamp:b});const{onStart:C,onMove:E}=this.handlers;x||(C&&C(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,g)},this.handlePointerMove=(g,x)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=$h(x,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(g,x)=>{this.end();const{onEnd:S,onSessionEnd:_,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Vh(g.type==="pointercancel"?this.lastMoveEventInfo:$h(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(g,C),_&&_(g,C)},!ng(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const l=Al(t),u=$h(l,this.transformPagePoint),{point:d}=u,{timestamp:h}=jt;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=n;m&&m(t,Vh(u,this.history)),this.removeListeners=Nl(Xa(this.contextWindow,"pointermove",this.handlePointerMove),Xa(this.contextWindow,"pointerup",this.handlePointerUp),Xa(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Es(this.updatePoint)}}function $h(e,t){return t?{point:t(e.point)}:e}function n0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vh({point:e},t){return{point:e,delta:n0(e,ME(t)),offset:n0(e,jL(t)),velocity:OL(t,.1)}}function jL(e){return e[0]}function ME(e){return e[e.length-1]}function OL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=ME(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Nr(t)));)n--;if(!r)return{x:0,y:0};const a=Ar(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const l={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}const DE=1e-4,ML=1-DE,DL=1+DE,LE=.01,LL=0-LE,IL=0+LE;function mn(e){return e.max-e.min}function FL(e,t,n){return Math.abs(e-t)<=n}function r0(e,t,n,r=.5){e.origin=r,e.originPoint=at(t.min,t.max,e.origin),e.scale=mn(n)/mn(t),e.translate=at(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ML&&e.scale<=DL||isNaN(e.scale))&&(e.scale=1),(e.translate>=LL&&e.translate<=IL||isNaN(e.translate))&&(e.translate=0)}function Ja(e,t,n,r){r0(e.x,t.x,n.x,r?r.originX:void 0),r0(e.y,t.y,n.y,r?r.originY:void 0)}function s0(e,t,n){e.min=n.min+t.min,e.max=e.min+mn(t)}function BL(e,t,n){s0(e.x,t.x,n.x),s0(e.y,t.y,n.y)}function o0(e,t,n){e.min=t.min-n.min,e.max=e.min+mn(t)}function Za(e,t,n){o0(e.x,t.x,n.x),o0(e.y,t.y,n.y)}function $L(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?at(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?at(n,e,r.max):Math.min(e,n)),e}function i0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function VL(e,{top:t,left:n,bottom:r,right:i}){return{x:i0(e.x,n,i),y:i0(e.y,t,r)}}function a0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function UL(e,t){return{x:a0(e.x,t.x),y:a0(e.y,t.y)}}function zL(e,t){let n=.5;const r=mn(e),i=mn(t);return i>r?n=Di(t.min,t.max-r,e.min):r>i&&(n=Di(e.min,e.max-i,t.min)),Or(0,1,n)}function WL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Qp=.35;function HL(e=Qp){return e===!1?e=0:e===!0&&(e=Qp),{x:l0(e,"left","right"),y:l0(e,"top","bottom")}}function l0(e,t,n){return{min:c0(e,t),max:c0(e,n)}}function c0(e,t){return typeof e=="number"?e:e[t]||0}const u0=()=>({translate:0,scale:1,origin:0,originPoint:0}),fi=()=>({x:u0(),y:u0()}),d0=()=>({min:0,max:0}),mt=()=>({x:d0(),y:d0()});function Cn(e){return[e("x"),e("y")]}function IE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function qL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function KL(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Uh(e){return e===void 0||e===1}function Yp({scale:e,scaleX:t,scaleY:n}){return!Uh(e)||!Uh(t)||!Uh(n)}function eo(e){return Yp(e)||FE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function FE(e){return f0(e.x)||f0(e.y)}function f0(e){return e&&e!=="0%"}function $u(e,t,n){const r=e-n,i=t*r;return n+i}function h0(e,t,n,r,i){return i!==void 0&&(e=$u(e,i,r)),$u(e,n,r)+t}function Xp(e,t=0,n=1,r,i){e.min=h0(e.min,t,n,r,i),e.max=h0(e.max,t,n,r,i)}function BE(e,{x:t,y:n}){Xp(e.x,t.translate,t.scale,t.originPoint),Xp(e.y,n.translate,n.scale,n.originPoint)}const p0=.999999999999,m0=1.0000000000001;function GL(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,l;for(let u=0;u<i;u++){a=n[u],l=a.projectionDelta;const{visualElement:d}=a.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&pi(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,BE(e,l)),r&&eo(a.latestValues)&&pi(e,a.latestValues))}t.x<m0&&t.x>p0&&(t.x=1),t.y<m0&&t.y>p0&&(t.y=1)}function hi(e,t){e.min=e.min+t,e.max=e.max+t}function g0(e,t,n,r,i=.5){const a=at(e.min,e.max,i);Xp(e,t,n,a,r)}function pi(e,t){g0(e.x,t.x,t.scaleX,t.scale,t.originX),g0(e.y,t.y,t.scaleY,t.scale,t.originY)}function $E(e,t){return IE(KL(e.getBoundingClientRect(),t))}function QL(e,t,n){const r=$E(e,n),{scroll:i}=t;return i&&(hi(r.x,i.offset.x),hi(r.y,i.offset.y)),r}const VE=({current:e})=>e?e.ownerDocument.defaultView:null,YL=new WeakMap;class XL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=m=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Al(m).point)},a=(m,g)=>{const{drag:x,dragPropagation:S,onDragStart:_}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zM(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cn(C=>{let E=this.getAxisMotionValue(C).get()||0;if(cr.test(E)){const{projection:P}=this.visualElement;if(P&&P.layout){const T=P.layout.layoutBox[C];T&&(E=mn(T)*(parseFloat(E)/100))}}this.originPoint[C]=E}),_&&rt.postRender(()=>_(m,g)),Vp(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(m,g)=>{const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:_,onDrag:b}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:C}=g;if(S&&this.currentDirection===null){this.currentDirection=JL(C),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",g.point,C),this.updateAxis("y",g.point,C),this.visualElement.render(),b&&b(m,g)},u=(m,g)=>this.stop(m,g),d=()=>Cn(m=>{var g;return this.getAnimationState(m)==="paused"&&((g=this.getAxisMotionValue(m).animation)===null||g===void 0?void 0:g.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new OE(t,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,contextWindow:VE(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&rt.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!tu(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=$L(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&ui(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=VL(i.layoutBox,n):this.constraints=!1,this.elastic=HL(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Cn(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=WL(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ui(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=QL(r,i.root,this.visualElement.getTransformPagePoint());let l=UL(i.layout.layoutBox,a);if(n){const u=n(qL(l));this.hasMutatedConstraints=!!u,u&&(l=IE(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},h=Cn(m=>{if(!tu(m,n,this.currentDirection))return;let g=d&&d[m]||{};l&&(g={min:0,max:0});const x=i?200:1e6,S=i?40:1e7,_={type:"inertia",velocity:r?t[m]:0,bounceStiffness:x,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...a,...g};return this.startAxisValueAnimation(m,_)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Vp(this.visualElement,t),r.start(pg(t,r,0,n,this.visualElement,!1))}stopAnimation(){Cn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Cn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Cn(n=>{const{drag:r}=this.getProps();if(!tu(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n];a.set(t[n]-at(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ui(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cn(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();i[l]=zL({min:d,max:d},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Cn(l=>{if(!tu(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];u.set(at(d,h,i[l]))})}addListeners(){if(!this.visualElement.current)return;YL.set(this.visualElement,this);const t=this.visualElement.current,n=Xa(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();ui(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),rt.read(r);const l=hl(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Cn(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())}));return()=>{l(),n(),a(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:l=Qp,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:l,dragMomentum:u}}}function tu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function JL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ZL extends Ns{constructor(t){super(t),this.removeGroupControls=fn,this.removeListeners=fn,this.controls=new XL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fn}unmount(){this.removeGroupControls(),this.removeListeners()}}const y0=e=>(t,n)=>{e&&rt.postRender(()=>e(t,n))};class eI extends Ns{constructor(){super(...arguments),this.removePointerDownListener=fn}onPointerDown(t){this.session=new OE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:VE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:y0(t),onStart:y0(n),onMove:r,onEnd:(a,l)=>{delete this.session,i&&rt.postRender(()=>i(a,l))}}}mount(){this.removePointerDownListener=Xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const gu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function v0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Da={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(je.test(e))e=parseFloat(e);else return e;const n=v0(e,t.target.x),r=v0(e,t.target.y);return`${n}% ${r}%`}},tI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Cs.parse(e);if(i.length>5)return r;const a=Cs.createTransformer(e),l=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;i[0+l]/=u,i[1+l]/=d;const h=at(u,d,.5);return typeof i[2+l]=="number"&&(i[2+l]/=h),typeof i[3+l]=="number"&&(i[3+l]/=h),a(i)}};class nI extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;SM(rI),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),gu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,l=r.projection;return l&&(l.isPresent=a,i||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||rt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),zm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function UE(e){const[t,n]=C1(),r=v.useContext(Dm);return p.jsx(nI,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(j1),isPresent:t,safeToRemove:n})}const rI={borderRadius:{...Da,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Da,borderTopRightRadius:Da,borderBottomLeftRadius:Da,borderBottomRightRadius:Da,boxShadow:tI};function sI(e,t,n){const r=zt(e)?e:dl(e);return r.start(pg("",r,t,n)),r.animation}function oI(e){return e instanceof SVGElement&&e.tagName!=="svg"}const iI=(e,t)=>e.depth-t.depth;class aI{constructor(){this.children=[],this.isDirty=!1}add(t){rg(this.children,t),this.isDirty=!0}remove(t){sg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iI),this.isDirty=!1,this.children.forEach(t)}}function lI(e,t){const n=ur.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Es(r),e(a-t))};return rt.read(r,!0),()=>Es(r)}const zE=["TopLeft","TopRight","BottomLeft","BottomRight"],cI=zE.length,x0=e=>typeof e=="string"?parseFloat(e):e,w0=e=>typeof e=="number"||je.test(e);function uI(e,t,n,r,i,a){i?(e.opacity=at(0,n.opacity!==void 0?n.opacity:1,dI(r)),e.opacityExit=at(t.opacity!==void 0?t.opacity:1,0,fI(r))):a&&(e.opacity=at(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<cI;l++){const u=`border${zE[l]}Radius`;let d=b0(t,u),h=b0(n,u);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||w0(d)===w0(h)?(e[u]=Math.max(at(x0(d),x0(h),r),0),(cr.test(h)||cr.test(d))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=at(t.rotate||0,n.rotate||0,r))}function b0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const dI=WE(0,.5,lE),fI=WE(.5,.95,fn);function WE(e,t,n){return r=>r<e?0:r>t?1:n(Di(e,t,r))}function S0(e,t){e.min=t.min,e.max=t.max}function En(e,t){S0(e.x,t.x),S0(e.y,t.y)}function E0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function C0(e,t,n,r,i){return e-=t,e=$u(e,1/n,r),i!==void 0&&(e=$u(e,1/i,r)),e}function hI(e,t=0,n=1,r=.5,i,a=e,l=e){if(cr.test(t)&&(t=parseFloat(t),t=at(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=at(a.min,a.max,r);e===a&&(u-=t),e.min=C0(e.min,t,n,u,i),e.max=C0(e.max,t,n,u,i)}function _0(e,t,[n,r,i],a,l){hI(e,t[n],t[r],t[i],t.scale,a,l)}const pI=["x","scaleX","originX"],mI=["y","scaleY","originY"];function R0(e,t,n,r){_0(e.x,t,pI,n?n.x:void 0,r?r.x:void 0),_0(e.y,t,mI,n?n.y:void 0,r?r.y:void 0)}function P0(e){return e.translate===0&&e.scale===1}function HE(e){return P0(e.x)&&P0(e.y)}function T0(e,t){return e.min===t.min&&e.max===t.max}function gI(e,t){return T0(e.x,t.x)&&T0(e.y,t.y)}function k0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qE(e,t){return k0(e.x,t.x)&&k0(e.y,t.y)}function N0(e){return mn(e.x)/mn(e.y)}function A0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class yI{constructor(){this.members=[]}add(t){rg(this.members,t),t.scheduleRender()}remove(t){if(sg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vI(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((i||a||l)&&(r=`translate3d(${i}px, ${a}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:x,skewX:S,skewY:_}=n;h&&(r=`perspective(${h}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),x&&(r+=`rotateY(${x}deg) `),S&&(r+=`skewX(${S}deg) `),_&&(r+=`skewY(${_}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const to={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},za=typeof window<"u"&&window.MotionDebug!==void 0,zh=["","X","Y","Z"],xI={visibility:"hidden"},j0=1e3;let wI=0;function Wh(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function KE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=tE(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",rt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&KE(r)}function GE({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},u=t==null?void 0:t()){this.id=wI++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,za&&(to.totalNodes=to.resolvedTargetDeltas=to.recalculatedProjection=0),this.nodes.forEach(EI),this.nodes.forEach(TI),this.nodes.forEach(kI),this.nodes.forEach(CI),za&&window.MotionDebug.record(to)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new aI)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new og),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,u=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=oI(l),this.instance=l;const{layoutId:d,layout:h,visualElement:m}=this.options;if(m&&!m.current&&m.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),u&&(h||d)&&(this.isLayoutDirty=!0),e){let g;const x=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,g&&g(),g=lI(x,250),gu.hasAnimatedSinceResize&&(gu.hasAnimatedSinceResize=!1,this.nodes.forEach(M0))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||h)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:x,hasRelativeTargetChanged:S,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||m.getDefaultTransition()||MI,{onLayoutAnimationStart:C,onLayoutAnimationComplete:E}=m.getProps(),P=!this.targetLayout||!qE(this.targetLayout,_)||S,T=!x&&S;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||x&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(g,T);const k={...Zm(b,"layout"),onPlay:C,onComplete:E};(m.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else x||M0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Es(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(NI),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&KE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(O0);return}this.isUpdating||this.nodes.forEach(RI),this.isUpdating=!1,this.nodes.forEach(PI),this.nodes.forEach(bI),this.nodes.forEach(SI),this.clearAllSnapshots();const u=ur.now();jt.delta=Or(0,1e3/60,u-jt.timestamp),jt.timestamp=u,jt.isProcessing=!0,Mh.update.process(jt),Mh.preRender.process(jt),Mh.render.process(jt),jt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_I),this.sharedNodes.forEach(AI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!HE(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;l&&(u||eo(this.latestValues)||m)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),DI(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:u}=this.options;if(!u)return mt();const d=u.measureViewportBox();if(!(((l=this.scroll)===null||l===void 0?void 0:l.wasRoot)||this.path.some(LI))){const{scroll:m}=this.root;m&&(hi(d.x,m.offset.x),hi(d.y,m.offset.y))}return d}removeElementScroll(l){var u;const d=mt();if(En(d,l),!((u=this.scroll)===null||u===void 0)&&u.wasRoot)return d;for(let h=0;h<this.path.length;h++){const m=this.path[h],{scroll:g,options:x}=m;m!==this.root&&g&&x.layoutScroll&&(g.wasRoot&&En(d,l),hi(d.x,g.offset.x),hi(d.y,g.offset.y))}return d}applyTransform(l,u=!1){const d=mt();En(d,l);for(let h=0;h<this.path.length;h++){const m=this.path[h];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&pi(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),eo(m.latestValues)&&pi(d,m.latestValues)}return eo(this.latestValues)&&pi(d,this.latestValues),d}removeTransform(l){const u=mt();En(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!eo(h.latestValues))continue;Yp(h.latestValues)&&h.updateSnapshot();const m=mt(),g=h.measurePageBox();En(m,g),R0(u,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return eo(this.latestValues)&&R0(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==jt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var u;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==d;if(!(l||h&&this.isSharedProjectionDirty||this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:x}=this.options;if(!(!this.layout||!(g||x))){if(this.resolvedRelativeTargetAt=jt.timestamp,!this.targetDelta&&!this.relativeTarget){const S=this.getClosestProjectingParent();S&&S.layout&&this.animationProgress!==1?(this.relativeParent=S,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Za(this.relativeTargetOrigin,this.layout.layoutBox,S.layout.layoutBox),En(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),BL(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):En(this.target,this.layout.layoutBox),BE(this.target,this.targetDelta)):En(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const S=this.getClosestProjectingParent();S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?(this.relativeParent=S,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Za(this.relativeTargetOrigin,this.target,S.target),En(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}za&&to.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Yp(this.parent.latestValues)||FE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const u=this.getLead(),d=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(h=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===jt.timestamp&&(h=!1),h)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;En(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,S=this.treeScale.y;GL(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=mt());const{target:_}=u;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(E0(this.prevProjectionDelta.x,this.projectionDelta.x),E0(this.prevProjectionDelta.y,this.projectionDelta.y)),Ja(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==S||!A0(this.projectionDelta.x,this.prevProjectionDelta.x)||!A0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_)),za&&to.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)===null||u===void 0||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fi(),this.projectionDelta=fi(),this.projectionDeltaWithTransform=fi()}setAnimationOrigin(l,u=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},g=fi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const x=mt(),S=d?d.source:void 0,_=this.layout?this.layout.source:void 0,b=S!==_,C=this.getStack(),E=!C||C.members.length<=1,P=!!(b&&!E&&this.options.crossfade===!0&&!this.path.some(OI));this.animationProgress=0;let T;this.mixTargetDelta=k=>{const N=k/1e3;D0(g.x,l.x,N),D0(g.y,l.y,N),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Za(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jI(this.relativeTarget,this.relativeTargetOrigin,x,N),T&&gI(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=mt()),En(T,this.relativeTarget)),b&&(this.animationValues=m,uI(m,h,this.latestValues,N,P,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Es(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{gu.hasAnimatedSinceResize=!0,this.currentAnimation=sI(0,j0,{...l,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(j0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:h,latestValues:m}=l;if(!(!u||!d||!h)){if(this!==l&&this.layout&&h&&QE(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||mt();const g=mn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+g;const x=mn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+x}En(u,d),pi(u,m),Ja(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new yI),this.sharedNodes.get(l).add(u);const h=u.options.initialPromotionConfig;u.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:u}=this.options;return u?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:u}=this.options;return u?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const h={};d.z&&Wh("z",l,h,this.animationValues);for(let m=0;m<zh.length;m++)Wh(`rotate${zh[m]}`,l,h,this.animationValues),Wh(`skew${zh[m]}`,l,h,this.animationValues);l.render();for(const m in h)l.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);l.scheduleRender()}getProjectionStyles(l){var u,d;if(!this.instance||this.isSVG)return;if(!this.isVisible)return xI;const h={visibility:""},m=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,h.opacity="",h.pointerEvents=pu(l==null?void 0:l.pointerEvents)||"",h.transform=m?m(this.latestValues,""):"none",h;const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=pu(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!eo(this.latestValues)&&(b.transform=m?m({},""):"none",this.hasProjected=!1),b}const x=g.animationValues||g.latestValues;this.applyTransformsToTarget(),h.transform=vI(this.projectionDeltaWithTransform,this.treeScale,x),m&&(h.transform=m(x,h.transform));const{x:S,y:_}=this.projectionDelta;h.transformOrigin=`${S.origin*100}% ${_.origin*100}% 0`,g.animationValues?h.opacity=g===this?(d=(u=x.opacity)!==null&&u!==void 0?u:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:h.opacity=g===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const b in Du){if(x[b]===void 0)continue;const{correct:C,applyTo:E}=Du[b],P=h.transform==="none"?x[b]:C(x[b],g);if(E){const T=E.length;for(let k=0;k<T;k++)h[E[k]]=P}else h[b]=P}return this.options.layoutId&&(h.pointerEvents=g===this?pu(l==null?void 0:l.pointerEvents)||"":"none"),h}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)===null||u===void 0?void 0:u.stop()}),this.root.nodes.forEach(O0),this.root.sharedNodes.clear()}}}function bI(e){e.updateLayout()}function SI(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,l=n.source!==e.layout.source;a==="size"?Cn(g=>{const x=l?n.measuredBox[g]:n.layoutBox[g],S=mn(x);x.min=r[g].min,x.max=x.min+S}):QE(a,n.layoutBox,r)&&Cn(g=>{const x=l?n.measuredBox[g]:n.layoutBox[g],S=mn(r[g]);x.max=x.min+S,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+S)});const u=fi();Ja(u,r,n.layoutBox);const d=fi();l?Ja(d,e.applyTransform(i,!0),n.measuredBox):Ja(d,r,n.layoutBox);const h=!HE(u);let m=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:x,layout:S}=g;if(x&&S){const _=mt();Za(_,n.layoutBox,x.layoutBox);const b=mt();Za(b,r,S.layoutBox),qE(_,b)||(m=!0),g.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=_,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeTargetChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function EI(e){za&&to.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function CI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _I(e){e.clearSnapshot()}function O0(e){e.clearMeasurements()}function RI(e){e.isLayoutDirty=!1}function PI(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function M0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function TI(e){e.resolveTargetDelta()}function kI(e){e.calcProjection()}
vendor: 6,595 bytes, line 270
270function NI(e){e.resetSkewAndRotation()}function AI(e){e.removeLeadSnapshot()}function D0(e,t,n){e.translate=at(t.translate,0,n),e.scale=at(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function L0(e,t,n,r){e.min=at(t.min,n.min,r),e.max=at(t.max,n.max,r)}function jI(e,t,n,r){L0(e.x,t.x,n.x,r),L0(e.y,t.y,n.y,r)}function OI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const MI={duration:.45,ease:[.4,0,.1,1]},I0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),F0=I0("applewebkit/")&&!I0("chrome/")?Math.round:fn;function B0(e){e.min=F0(e.min),e.max=F0(e.max)}function DI(e){B0(e.x),B0(e.y)}function QE(e,t,n){return e==="position"||e==="preserve-aspect"&&!FL(N0(t),N0(n),.2)}function LI(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const II=GE({attachResizeListener:(e,t)=>hl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hh={current:void 0},YE=GE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hh.current){const e=new II({});e.mount(window),e.setOptions({layoutScroll:!0}),Hh.current=e}return Hh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),FI={pan:{Feature:eI},drag:{Feature:ZL,ProjectionNode:YE,MeasureLayout:UE}};function $0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&rt.postRender(()=>a(t,Al(t)))}class BI extends Ns{mount(){const{current:t}=this.node;t&&(this.unmount=FM(t,n=>($0(this.node,n,"Start"),r=>$0(this.node,r,"End"))))}unmount(){}}class $I extends Ns{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nl(hl(this.node.current,"focus",()=>this.onFocus()),hl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function V0(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&rt.postRender(()=>a(t,Al(t)))}class VI extends Ns{mount(){const{current:t}=this.node;t&&(this.unmount=UM(t,n=>(V0(this.node,n,"Start"),(r,{success:i})=>V0(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Jp=new WeakMap,qh=new WeakMap,UI=e=>{const t=Jp.get(e.target);t&&t(e)},zI=e=>{e.forEach(UI)};function WI({root:e,...t}){const n=e||document;qh.has(n)||qh.set(n,{});const r=qh.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(zI,{root:e,...t})),r[i]}function HI(e,t,n){const r=WI(t);return Jp.set(e,n),r.observe(e),()=>{Jp.delete(e),r.unobserve(e)}}const qI={some:0,all:1};class KI extends Ns{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:qI[i]},u=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,a&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),x=h?m:g;x&&x(d)};return HI(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(GI(t,n))&&this.startObserver()}unmount(){}}function GI({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const QI={inView:{Feature:KI},tap:{Feature:VI},focus:{Feature:$I},hover:{Feature:BI}},YI={layout:{ProjectionNode:YE,MeasureLayout:UE}},Zp={current:null},XE={current:!1};function XI(){if(XE.current=!0,!!Fm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zp.current=e.matches;e.addListener(t),t()}else Zp.current=!1}const JI=[...SE,Vt,Cs],ZI=e=>JI.find(bE(e)),U0=new WeakMap;function eF(e,t,n){for(const r in t){const i=t[r],a=n[r];if(zt(i))e.addValue(r,i);else if(zt(a))e.addValue(r,dl(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,dl(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const z0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tF{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const S=ur.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,rt.render(this.render,!1,!0))};const{latestValues:d,renderState:h,onUpdate:m}=l;this.onUpdate=m,this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!a,this.isControllingVariants=ld(n),this.isVariantNode=N1(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...x}=this.scrapeMotionValuesFromProps(n,{},this);for(const S in x){const _=x[S];d[S]!==void 0&&zt(_)&&_.set(d[S],!1)}}mount(t){this.current=t,U0.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 6,936 bytes, line 270
270h((n,r)=>this.bindToMotionValue(r,n)),XE.current||XI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zp.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){U0.delete(this.current),this.projection&&this.projection.unmount(),Es(this.notifyUpdate),Es(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=No.has(t),i=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Li){const n=Li[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<z0.length;r++){const i=z0[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,l=t[a];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=eF(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=dl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(xE(i)||uE(i))?i=parseFloat(i):!ZI(i)&&Cs.test(n)&&(i=gE(t,n)),this.setBaseTarget(t,zt(i)?i.get():i)),zt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=Hm(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!zt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new og),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class JE extends tF{constructor(){super(...arguments),this.KeyframeResolver=EE}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function nF(e){return window.getComputedStyle(e)}class rF extends JE{constructor(){super(...arguments),this.type="html",this.renderInstance=B1}readValueFromInstance(t,n){if(No.has(n)){const r=ug(n);return r&&r.default||0}else{const r=nF(t),i=(L1(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return $E(t,n)}build(t,n,r){Gm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jm(t,n,r)}}class sF extends JE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(No.has(n)){const r=ug(n);return r&&r.default||0}return n=$1.has(n)?n:Um(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return z1(t,n,r)}build(t,n,r){Qm(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){V1(t,n,r,i)}mount(t){this.isSVGTag=Xm(t.tagName),super.mount(t)}}const oF=(e,t)=>Wm(e)?new sF(t):new rF(t,{allowProjection:e!==v.Fragment}),iF=AM({...kL,...QI,...FI,...YI},oF),aF=q2(iF);function ZE(e,t){return function(){return e.apply(t,arguments)}}const{toString:lF}=Object.prototype,{getPrototypeOf:Fi}=Object,{iterator:jl,toStringTag:eC}=Symbol,Vu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),pl=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Vu(n,t))return!0;n=Fi(n)}return!1},cF=(e,t)=>e!=null&&pl(e,t)?e[t]:void 0,mg=(e=>t=>{const n=lF.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kn=e=>(e=e.toLowerCase(),t=>mg(t)===e),dd=e=>t=>typeof t===e,{isArray:bo}=Array,So=dd("undefined");function zi(e){return e!==null&&!So(e)&&e.constructor!==null&&!So(e.constructor)&&sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tC=kn("ArrayBuffer");function uF(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tC(e.buffer),t}
vendor: 3,411 bytes, line 270
270const dF=dd("string"),sn=dd("function"),nC=dd("number"),Wi=e=>e!==null&&typeof e=="object",fF=e=>e===!0||e===!1,yu=e=>{if(!Wi(e))return!1;const t=Fi(e);return(t===null||t===Object.prototype||Fi(t)===null)&&!pl(e,eC)&&!pl(e,jl)},hF=e=>{if(!Wi(e)||zi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pF=kn("Date"),mF=kn("File"),gF=e=>!!(e&&typeof e.uri<"u"),yF=e=>e&&typeof e.getParts<"u",vF=kn("Blob"),xF=kn("FileList"),wF=kn("Set"),bF=e=>Wi(e)&&sn(e.pipe);function SF(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const W0=SF(),H0=typeof W0.FormData<"u"?W0.FormData:void 0,EF=e=>{if(!e)return!1;if(H0&&e instanceof H0)return!0;const t=Fi(e);if(!t||t===Object.prototype||!sn(e.append))return!1;const n=mg(e);return n==="formdata"||n==="object"&&sn(e.toString)&&e.toString()==="[object FormData]"},CF=kn("URLSearchParams"),[_F,RF,PF,TF]=["ReadableStream","Request","Response","Headers"].map(kn),kF=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ol(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),bo(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(zi(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),l=a.length;let u;for(r=0;r<l;r++)u=a[r],t.call(null,e[u],u,e)}}function rC(e,t){if(zi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const io=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sC=e=>!So(e)&&e!==io;function em(...e){const{caseless:t,skipUndefined:n}=sC(this)&&this||{},r={},i=(a,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const u=t&&typeof l=="string"&&rC(r,l)||l,d=Vu(r,u)?r[u]:void 0;yu(d)&&yu(a)?r[u]=em(d,a):yu(a)?r[u]=em({},a):bo(a)?r[u]=a.slice():(!n||!So(a))&&(r[u]=a)};for(let a=0,l=e.length;a<l;a++){const u=e[a];if(!u||zi(u)||(Ol(u,i),typeof u!="object"||bo(u)))continue;const d=Object.getOwnPropertySymbols(u);for(let h=0;h<d.length;h++){const m=d[h];VF.call(u,m)&&i(u[m],m)}}return r}const NF=(e,t,n,{allOwnKeys:r}={})=>(Ol(t,(i,a)=>{n&&sn(i)?Object.defineProperty(e,a,{__proto__:null,value:ZE(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),AF=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jF=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},OF=(e,t,n,r)=>{let i,a,l;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)l=i[a],(!r||r(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&Fi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},MF=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},DF=e=>{if(!e)return null;if(bo(e))return e;let t=e.length;if(!nC(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},LF=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fi(Uint8Array)),IF=(e,t)=>{const r=(e&&e[jl]).call(e);let i;for(;
270(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},FF=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},BF=kn("HTMLFormElement"),$F=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:VF}=Object.prototype,UF=kn("RegExp"),oC=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ol(n,(i,a)=>{let l;(l=t(i,a,e))!==!1&&(r[a]=l||i)}),Object.defineProperties(e,r)},zF=e=>{oC(e,(t,n)=>{if(sn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(sn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},WF=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return bo(e)?r(e):r(String(e).split(t)),n},HF=()=>{},qF=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function KF(e){return!!(e&&sn(e.append)&&e[eC]==="FormData"&&e[jl])}const GF=e=>{const t=new WeakSet,n=r=>{if(Wi(r)){if(t.has(r))return;if(zi(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(wF(r)){i=[];for(const a of r){const l=n(a);!So(l)&&i.push(l)}}else i=bo(r)?[]:{},Ol(r,(a,l)=>{const u=n(a);!So(u)&&(i[l]=u)});return t.delete(r),i}}return r};return n(e)},QF=kn("AsyncFunction"),YF=e=>e&&(Wi(e)||sn(e))&&sn(e.then)&&sn(e.catch),iC=((e,t)=>e?setImmediate:t?((n,r)=>(io.addEventListener("message",({source:i,data:a})=>{i===io&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),io.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",sn(io.postMessage)),XF=typeof queueMicrotask<"u"?queueMicrotask.bind(io):typeof process<"u"&&process.nextTick||iC,aC=e=>e!=null&&sn(e[jl]),JF=e=>e!=null&&pl(e,jl)&&aC(e),I={isArray:bo,isArrayBuffer:tC,isBuffer:zi,isFormData:EF,isArrayBufferView:uF,isString:dF,isNumber:nC,isBoolean:fF,isObject:Wi,isPlainObject:yu,isEmptyObject:hF,isReadableStream:_F,isRequest:RF,isResponse:PF,isHeaders:TF,isUndefined:So,isDate:pF,isFile:mF,isReactNativeBlob:gF,isReactNative:yF,isBlob:vF,isRegExp:UF,isFunction:sn,isStream:bF,isURLSearchParams:CF,isTypedArray:LF,isFileList:xF,forEach:Ol,merge:em,extend:NF,trim:kF,stripBOM:AF,inherits:jF,toFlatObject:OF,kindOf:mg,kindOfTest:kn,endsWith:MF,toArray:DF,forEachEntry:IF,matchAll:FF,isHTMLForm:BF,hasOwnProperty:Vu,hasOwnProp:Vu,hasOwnInPrototypeChain:pl,getSafeProp:cF,reduceDescriptors:oC,freezeMethods:zF,toObjectSet:WF,toCamelCase:$F,noop:HF,toFiniteNumber:qF,findKey:rC,global:io,isContextDefined:sC,isSpecCompliantForm:KF,toJSONObject:GF,isAsyncFn:QF,isThenable:YF,setImmediate:iC,asap:XF,isIterable:aC,isSafeIterable:JF},ZF=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),e4=e=>{const t={};let n,r,i;return e&&e.split(` 271`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim();const u=I.hasOwnProp(t,n);!n||u&&I.hasOwnProp(ZF,n)||(n==="set-cookie"?u?t[n].push(r):t[n]=[r]:t[n]=u?t[n]+", "+r:r)}),t};function t4(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const n4=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),r4=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function gg(e,t){return I.isArray(e)?e.map(n=>gg(n,t)):t4(String(e).replace(t,""))}const s4=e=>gg(e,n4),o4=e=>gg(e,r4);function lC(e){const t=Object.create(null);return I.forEach(e.toJSON(),(n,r)=>{t[r]=o4(n)}),t}const q0=Symbol("internals");function La(e){return e&&String(e).trim().toLowerCase()}function vu(e){return e===!1||e==null?e:I.isArray(e)?e.map(vu):s4(String(e))}function i4(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const a4=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Kh(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function l4(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function c4(e){const t=Object.create(null),n=String(e);let r=0,i=!1,a=!1;function l(u){const d=Kh(n.slice(r,u)),h=d.indexOf("=");if(h<1)return;const m=Kh(d.slice(0,h));if(!a4.test(m))return;const g=m.toLowerCase();if(g==="__proto__"||g==="constructor"||g==="prototype")return;const x=Kh(d.slice(h+1));t[g]=l4(x)}for(let u=0;u<n.length;u++){const d=n.charCodeAt(u);i?a?a=!1:d===92?a=!0:d===34&&(i=!1):d===34?i=!0:(d===44||d===59)&&(l(u),r=u+1)}return l(n.length),t}const u4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gh(e,t,n,r,i){if(I.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!I.isString(t)){if(I.isString(r))return t.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(t)}}function d4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function f4(e,t){const n=I.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,a,l){return this[r].call(this,t,i,a,l)},configurable:!0})})}let Ht=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(u,d,h){const m=La(d);if(!m)return;const g=I.findKey(i,m);(!g||i[g]===void 0||h===!0||h===void 0&&i[g]!==!1)&&(i[g||d]=vu(u))}const l=(u,d)=>
vendor: 11,192 bytes, lines 271-272
271I.forEach(u,(h,m)=>a(h,m,d));if(I.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(I.isString(t)&&(t=t.trim())&&!u4(t))l(e4(t),n);else if(I.isObject(t)&&I.isSafeIterable(t)){let u=Object.create(null),d,h;for(const m of t){if(!I.isArray(m))throw new TypeError("Object iterator must return a key-value pair");h=m[0],I.hasOwnProp(u,h)?(d=u[h],u[h]=I.isArray(d)?[...d,m[1]]:[d,m[1]]):u[h]=m[1]}l(u,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=La(t),t){const r=I.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return i4(i);if(I.isFunction(n))return n.call(this,i,r);if(I.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=La(t),t){const r=I.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gh(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(l){if(l=La(l),l){const u=I.findKey(r,l);u&&(!n||Gh(r,r[u],u,n))&&(delete r[u],i=!0)}}return I.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||Gh(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return I.forEach(this,(i,a)=>{const l=I.findKey(r,a);if(l){n[l]=vu(i),delete n[a];return}const u=t?d4(a):String(a).trim();u!==a&&delete n[a],n[u]=vu(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return I.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&I.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 272`)}getSetCookie(){const t=this.get("set-cookie");return I.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return c4(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[q0]=this[q0]={accessors:{}}).accessors,i=this.prototype;function a(l){const u=La(l);r[u]||(f4(i,l),r[u]=!0)}return I.isArray(t)?t.forEach(a):a(t),this}};Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(Ht.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});I.freezeMethods(Ht);const Uu="[REDACTED ****]";function h4(e){if(I.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(I.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function p4(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],i=a=>{if(a===null||typeof a!="object"||I.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof Ht&&(a=a.toJSON()),r.push(a);let l;if(I.isArray(a))l=[],a.forEach((u,d)=>{const h=i(u);I.isUndefined(h)||(l[d]=h)});else{if(!I.isPlainObject(a)&&h4(a))return r.pop(),a;l=Object.create(null);for(const[u,d]of Object.entries(a)){const h=n.has(u.toLowerCase())?Uu:i(d);I.isUndefined(h)||(l[u]=h)}}return r.pop(),l};return i(e)}function K0(e){try{return String(e)}catch{return""}}function m4(e){return e.errors.map(n=>{try{return n&&n.message?K0(n.message):K0(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let he=class cC extends Error{static from(t,n,r,i,a,l){let u=t.message;!u&&I.isArray(t.errors)&&t.errors.length&&(u=m4(t));const d=new cC(u,n||t.code,r,i,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),l&&Object.assign(d,l),d}constructor(t,n,r,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&I.hasOwnProp(t,"redact")?t.redact:void 0,r=I.isArray(n)&&n.length>0?p4(t,n):I.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};he.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";he.ERR_BAD_OPTION="ERR_BAD_OPTION";he.ECONNABORTED="ECONNABORTED";he.ETIMEDOUT="ETIMEDOUT";he.ECONNREFUSED="ECONNREFUSED";he.ERR_NETWORK="ERR_NETWORK";he.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";he.ERR_DEPRECATED="ERR_DEPRECATED";he.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";he.ERR_BAD_REQUEST="ERR_BAD_REQUEST";he.ERR_CANCELED="ERR_CANCELED";he.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";he.ERR_INVALID_URL="ERR_INVALID_URL";he.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const g4=null,uC=100;function tm(e){return I.isPlainObject(e)||I.isArray(e)}function dC(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function Qh(e,t,n){return e?e.concat(t).map(function(i,a){return i=dC(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function y4(e){return I.isArray(e)&&!e.some(tm)}const v4=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function fd(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,T){return!I.isUndefined(T[P])});const r=n.metaTokens,i=n.visitor||_,a=n.dots,l=n.indexes,u=n.Blob||typeof Blob<"u"&&Blob,d=n.maxDepth===void 0?uC:n.maxDepth,h=u&&I.isSpecCompliantForm(t),m=[];if(!I.isFunction(i))throw new TypeError("visitor must be a function");function g(E){if(E===null)return"";if(I.isDate(E))return E.toISOString();if(I.isBoolean(E))return E.toString();if(!h&&I.isBlob(E))throw new he("Blob is not supported. Use a Buffer instead.");if(I.isArrayBuffer(E)||I.isTypedArray(E)){if(h&&typeof u=="function")return new u([E]);throw new he("Blob is not supported. Use a Buffer instead.",he.ERR_NOT_SUPPORT)}return E}function x(E){if(E>d)throw new he("Object is too deeply nested ("+E+" levels). Max depth: "+d,he.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(E,P){if(d===1/0)return JSON.stringify(E);const T=[];return JSON.stringify(E,function(N,D){if(!I.isObject(D))return D;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(D),x(P+T.length-1),D})}function _(E,P,T){let k=E;if(I.isReactNative(t)&&I.isReactNativeBlob(E))return t.append(Qh(T,P,a),g(E)),!1;if(E&&!T&&typeof E=="object"){if(I.endsWith(P,"{}"))P=r?P:P.slice(0,-2),E=S(E,1);else if(I.isArray(E)&&y4(E)||(I.isFileList(E)||I.endsWith(P,"[]"))&&(k=I.toArray(E)))return P=dC(P),k.forEach(function(D,B){!(I.isUndefined(D)||D===null)&&t.append(l===!0?Qh([P],B,a):l===null?P:P+"[]",g(D))}),!1}return tm(E)?!0:(t.append(Qh(T,P,a),g(E)),!1)}const b=Object.assign(v4,{defaultVisitor:_,convertValue:g,isVisitable:tm});function C(E,P,T=0){if(!I.isUndefined(E)){if(x(T),m.indexOf(E)!==-1)throw new Error("Circular reference detected in "+P.join("."));m.push(E),I.forEach(E,function(N,D){(!(I.isUndefined(N)||N===null)&&i.call(t,N,I.isString(D)?D.trim():D,P,b))===!0&&C(N,P?P.concat(D):[D],T+1)}),m.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return C(e),t}function G0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function yg(e,t){this._pairs=[],e&&fd(e,this,t)}const fC=yg.prototype;fC.append=function(t,n){this._pairs.push([t,n])};fC.toString=function(t){const n=t?r=>t.call(this,r,G0):G0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function x4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hC(e,t,n){if(!t)return e;e=e||"";const r=I.isFunction(n)?{serialize:n}:n,i=I.getSafeProp(r,"encode")||x4,a=I.getSafeProp(r,"serialize");let l;if(a?l=a(t,r):l=I.isURLSearchParams(t)?t.toString():new yg(t,r).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Q0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},w4=typeof URLSearchParams<"u"?URLSearchParams:yg,b4=typeof FormData<"u"?FormData:null,S4=typeof Blob<"u"?Blob:null,E4={isBrowser:!0,classes:{URLSearchParams:w4,FormData:b4,Blob:S4},protocols:["http","https","file","blob","url","data"]},xg=typeof window<"u"&&typeof document<"u",nm=typeof navigator=="object"&&navigator||void 0,C4=xg&&(!nm||["ReactNative","NativeScript","NS"].indexOf(nm.product)<0),_4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",R4=xg&&window.location.href||"http://localhost",P4=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xg,hasStandardBrowserEnv:C4,hasStandardBrowserWebWorkerEnv:_4,navigator:nm,origin:R4},Symbol.toStringTag,{value:"Module"})),Mt={...P4,...E4};function T4(e,t){return fd(e,new Mt.classes.URLSearchParams,{visitor:function(n,r,i,a){return Mt.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const Y0=uC;function pC(e){if(e>Y0)throw new he("FormData field is too deeply nested ("+e+" levels). Max depth: "+Y0,he.ERR_FORM_DATA_DEPTH_EXCEEDED)}function k4(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)pC(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function N4(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function mC(e){function t(n,r,i,a){pC(a);let l=n[a++];if(l==="__proto__")return!0;const u=Number.isFinite(+l),d=a>=n.length;return l=!l&&I.isArray(i)?i.length:l,d?(I.hasOwnProp(i,l)?i[l]=I.isArray(i[l])?i[l].concat(r):[i[l],r]:i[l]=r,!u):((!I.hasOwnProp(i,l)||!I.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],a)&&I.isArray(i[l])&&(i[l]=N4(i[l])),!u)}if(I.isFormData(e)&&I.isFunction(e.entries)){const n={};return I.forEachEntry(e,(r,i)=>{t(k4(r),i,n,0)}),n}return null}const si=(e,t)=>e!=null&&I.hasOwnProp(e,t)?e[t]:void 0;function A4(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ml={transitional:vg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=I.isObject(t);if(a&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return i?JSON.stringify(mC(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;
vendor: 11,464 bytes, line 272
272if(a){const d=si(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return T4(t,d).toString();if((u=I.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=si(this,"env"),m=h&&h.FormData;return fd(u?{"files[]":t}:t,m&&new m,d)}}return a||i?(n.setContentType("application/json",!1),A4(t)):t}],transformResponse:[function(t){const n=si(this,"transitional")||Ml.transitional,r=n&&n.forcedJSONParsing,i=si(this,"responseType"),a=i==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(r&&!i||a)){const u=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,si(this,"parseReviver"))}catch(d){if(u)throw d.name==="SyntaxError"?he.from(d,he.ERR_BAD_RESPONSE,this,null,si(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch","query"],e=>{Ml.headers[e]={}});function Yh(e,t){const n=this||Ml,r=t||n,i=Ht.from(r.headers);let a=r.data;return I.forEach(e,function(u){a=u.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function gC(e){return!!(e&&e.__CANCEL__)}let Dl=class extends he{constructor(t,n,r){super(t??"canceled",he.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function yC(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new he("Request failed with status code "+n.status,n.status>=400&&n.status<500?he.ERR_BAD_REQUEST:he.ERR_BAD_RESPONSE,n.config,n.request,n))}function j4(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function O4(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,l;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),m=r[a];l||(l=h),n[i]=d,r[i]=h;let g=a,x=0;for(;g!==i;)x+=n[g++],g=g%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),h-l<t)return;const S=m&&h-m;return S?Math.round(x*1e3/S):void 0}}function M4(e,t){let n=0,r=1e3/t,i,a;const l=(h,m=Date.now())=>{n=m,i=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const m=Date.now(),g=m-n;g>=r?l(h,m):(i=h,a||(a=setTimeout(()=>{a=null,l(i)},r-g)))},()=>i&&l(i)]}const zu=(e,t,n=3)=>{let r=0;const i=O4(50,250);return M4(a=>{if(!a||typeof a.loaded!="number")return;const l=a.loaded,u=a.lengthComputable?a.total:void 0,d=Math.max(0,u!=null?Math.min(l,u):l),h=Math.max(0,d-r),m=i(h);r=Math.max(r,d);const g={loaded:d,total:u,progress:u?d/u:void 0,bytes:h,rate:m||void 0,estimated:m&&u?(u-d)/m:void 0,event:a,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(g)},n)},X0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},J0=(e,t=I.asap)=>(...n)=>t(()=>e(...n)),D4=Mt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mt.origin),Mt.navigator&&/(msie|trident)/i.test(Mt.navigator.userAgent)):()=>!0,L4=Mt.hasStandardBrowserEnv?{write(e,t,n,r,i,a,l){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];I.isNumber(n)&&u.push(`expires=${new Date(n).toUTCString()}`),I.isString(r)&&u.push(`path=${r}`),I.isString(i)&&u.push(`domain=${i}`),a===!0&&u.push("secure"),I.isString(l)&&u.push(`SameSite=${l}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function I4(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function F4(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const B4=/^https?:(?!\/\/)/i,$4=/[\t\n\r]/g;function V4(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function U4(e){return V4(e).replace($4,"")}function z4(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Uu}`)}function W4(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Uu}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Uu}`);return n===-1?i:`${i}#${z4(t.slice(n+1))}`}function Z0(e,t){if(typeof e=="string"){const n=U4(e);if(B4.test(n))throw new he(`Invalid URL ${JSON.stringify(W4(n))}: missing "//" after protocol`,he.ERR_INVALID_URL,t)}}function vC(e,t,n,r){Z0(t,r);let i=!I4(t);return e&&(i||n===!1)?(Z0(e,r),F4(e,t)):t}const eb=e=>e instanceof Ht?{...e}:e,H4=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Eo(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(m,g,x,S){return I.isPlainObject(m)&&I.isPlainObject(g)?I.merge.call({caseless:S},m,g):I.isPlainObject(g)?I.merge({},g):I.isArray(g)?g.slice():g}function i(m,g,x,S){if(I.isUndefined(g)){if(!I.isUndefined(m))return r(void 0,m,x,S)}else return r(m,g,x,S)}function a(m,g){if(!I.isUndefined(g))return r(void 0,g)}function l(m,g){if(I.isUndefined(g)){if(!I.isUndefined(m))return r(void 0,m)}else return r(void 0,g)}function u(m){const g=I.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!I.isUndefined(g))if(I.isPlainObject(g)){if(I.hasOwnProp(g,m))return g[m]}else return;const x=I.hasOwnProp(e,"transitional")?e.transitional:void 0;if(I.isPlainObject(x)&&I.hasOwnProp(x,m))return x[m]}function d(m,g,x){if(I.hasOwnProp(t,x))return r(m,g);if(I.hasOwnProp(e,x))return r(void 0,m)}const h={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:d,headers:(m,g,x)=>i(eb(m),eb(g),x,!0)};return I.forEach(H4({...e,...t}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const x=I.hasOwnProp(h,g)?h[g]:i,S=I.hasOwnProp(e,g)?e[g]:void 0,_=I.hasOwnProp(t,g)?t[g]:void 0,b=x(S,_,g);I.isUndefined(b)&&x!==d||(n[g]=b)}),I.hasOwnProp(t,"validateStatus")&&I.isUndefined(t.validateStatus)&&u("validateStatusUndefinedResolves")===!1&&(I.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const q4=["content-type","content-length"];function K4(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{q4.includes(r.toLowerCase())&&e.set(r,i)})}const G4=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function xC(e){const t=Eo({},e),n=x=>I.hasOwnProp(t,x)?t[x]:void 0,r=n("data");let i=n("withXSRFToken");const a=n("xsrfHeaderName"),l=n("xsrfCookieName");let u=n("headers");const d=n("auth"),h=n("baseURL"),m=n("allowAbsoluteUrls"),g=n("url");if(t.headers=u=Ht.from(u),t.url=hC(vC(h,g,m,t),n("params"),n("paramsSerializer")),d){const x=I.getSafeProp(d,"username")||"",S=I.getSafeProp(d,"password")||"";try{u.set("Authorization","Basic "+btoa(x+":"+(S?G4(S):"")))}catch(_){throw he.from(_,he.ERR_BAD_OPTION_VALUE,e)}}if(I.isFormData(r)&&(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv||I.isReactNative(r)?u.setContentType(void 0):I.isFunction(r.getHeaders)&&K4(u,r.getHeaders(),n("formDataHeaderPolicy"))),Mt.hasStandardBrowserEnv&&(I.isFunction(i)&&(i=i(t)),i===!0||i==null&&D4(t.url))){const S=a&&l&&L4.read(l);S&&u.set(a,S)}return t}const Q4=typeof XMLHttpRequest<"u",Y4=Q4&&function(e){return new Promise(function(n,r){const i=xC(e);let a=i.data;const l=Ht.from(i.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:h}=i,m,g,x,S,_;function b(){S&&S(),_&&_(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function E(){if(!C)return;const T=Ht.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),N={data:!u||u==="text"||u==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:T,config:e,request:C};yC(function(B){n(B),b()},function(B){r(B),b()},N),C=null}"onloadend"in C?C.onloadend=E:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.startsWith("file:"))||setTimeout(E)},C.onabort=function(){C&&(r(new he("Request aborted",he.ECONNABORTED,e,C)),b(),C=null)},C.onerror=function(k){const N=k&&k.message?k.message:"Network Error",D=new he(N,he.ERR_NETWORK,e,C);D.event=k||null,r(D),b(),C=null},C.ontimeout=function(){let k=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const N=i.transitional||vg;i.timeoutErrorMessage&&(k=i.timeoutErrorMessage),r(new he(k,N.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,C)),b(),C=null},a===void 0&&l.setContentType(null),"setRequestHeader"in C&&I.forEach(lC(l),function(k,N){C.setRequestHeader(N,k)}),I.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),u&&u!=="json"&&(C.responseType=i.responseType),h&&([x,_]=zu(h,!0),C.addEventListener("progress",x)),d&&C.upload&&([g,S]=zu(d),C.upload.addEventListener("progress",g),C.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(m=T=>{C&&(r(!T||T.type?new Dl(null,e,C):T),C.abort(),b(),C=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const P=j4(i.url);if(P&&!Mt.protocols.includes(P)){r(new he("Unsupported protocol "+P+":",he.ERR_BAD_REQUEST,e)),b();return}C.send(a||null)})},X4=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(d){if(!r){r=!0,l();const h=d instanceof Error?d:this.reason;n.abort(h instanceof he?h:new Dl(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,i(new he(`timeout of ${t}ms exceeded`,he.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>{if(!r){if(d.aborted){i.call(d);return}d.addEventListener("abort",i,{once:!0})}});const{signal:u}=n;return u.unsubscribe=()=>I.asap(l),u},J4=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Z4=async function*(e,t){for await(const n of e3(e))yield*J4(n,t)},e3=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},tb=(e,t,n,r)=>{const i=Z4(e,t);let a=0,l,u=d=>{l||(l=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await i.next();if(h){u(),d.close();return}let g=m.byteLength;if(n){let x=a+=g;n(x)}d.enqueue(new Uint8Array(m))}catch(h){throw u(h),h}},cancel(d){return u(d),i.return()}},{highWaterMark:2})},nb=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,wC=(e,t,n)=>
272t+2<n&&nb(e.charCodeAt(t+1))&&nb(e.charCodeAt(t+2)),rb=e=>e<=57?e-48:(e&223)-55,t3=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,n3=e=>e===9||e===10||e===12||e===13||e===32,r3=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},s3=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},o3=e=>{const t=e.length;let n=0,r=0,i=!1;for(let a=0;a<t;a++){let l=e.charCodeAt(a);if(l===37&&wC(e,a,t)&&(l=rb(e.charCodeAt(a+1))*16+rb(e.charCodeAt(a+2)),a+=2),!n3(l)){if(l===61){r++;continue}if(!t3(l)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?s3(e):r3(n)},i3=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let l=0;for(let u=0,d=i.length;u<d;u++){const h=i.charCodeAt(u);if(h===37&&wC(i,u,d))l+=1,u+=2;else if(h<128)l+=1;else if(h<2048)l+=2;else if(h>=55296&&h<=56319&&u+1<d){const m=i.charCodeAt(u+1);m>=56320&&m<=57343?(l+=4,u++):l+=3}else l+=3}return l};function a3(e){const t=typeof e=="string"?e.indexOf("#"):-1;return i3(t===-1?e:e.slice(0,t),o3)}const wg="1.19.0",sb=64*1024,{isFunction:nu}=I,l3=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),ob=e=>{if(!I.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},ib=(e,...t)=>{try{return!!e(...t)}catch{return!1}},c3=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},u3=e=>{const t=I.global!==void 0&&I.global!==null?I.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=I.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:l}=e,u=i?nu(i):typeof fetch=="function",d=nu(a),h=nu(l);if(!u)return!1;const m=u&&nu(n),g=u&&(typeof r=="function"?(E=>P=>E.encode(P))(new r):async E=>new Uint8Array(await new a(E).arrayBuffer())),x=d&&m&&ib(()=>{let E=!1;const P=new a(Mt.origin,{body:new n,method:"POST",get duplex(){return E=!0,"half"}}),T=P.headers.has("Content-Type");return P.body!=null&&P.body.cancel(),E&&!T}),S=h&&m&&ib(()=>I.isReadableStream(new l("").body)),_={stream:S&&(E=>E.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!_[E]&&(_[E]=(P,T)=>{let k=P&&P[E];if(k)return k.call(P);throw new he(`Response type '${E}' is not supported`,he.ERR_NOT_SUPPORT,T)})});const b=async E=>{if(E==null)return 0;if(I.isBlob(E))return E.size;if(I.isSpecCompliantForm(E))return(await new a(Mt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(I.isArrayBufferView(E)||I.isArrayBuffer(E))return E.byteLength;if(I.isURLSearchParams(E)&&(E=E+""),I.isString(E))return(await g(E)).byteLength},C=async(E,P)=>{const T=I.toFiniteNumber(E.getContentLength());return T??b(P)};return async E=>{let{url:P,method:T,data:k,signal:N,cancelToken:D,timeout:B,onDownloadProgress:O,onUploadProgress:G,responseType:J,headers:se,withCredentials:ue="same-origin",fetchOptions:ae,maxContentLength:W,maxBodyLength:te}=xC(E);const Y=I.isNumber(W)&&W>-1,ee=I.isNumber(te)&&te>-1,V=X=>I.hasOwnProp(E,X)?E[X]:void 0;let H=i||fetch;J=J?(J+"").toLowerCase():"text";let $=X4([N,D&&D.toAbortSignal()],B),j=null;const q=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let ie,Q=null;const ce=()=>new he("Request body larger than maxBodyLength limit",he.ERR_BAD_REQUEST,E,j);try{let X;const Z=V("auth");if(Z){const ye=I.getSafeProp(Z,"username")||"",Be=I.getSafeProp(Z,"password")||"";X={username:ye,password:Be}}if(c3(P)){const ye=new URL(P,Mt.origin);if(!X&&(ye.username||ye.password)){const Be=ob(ye.username),Je=ob(ye.password);X={username:Be,password:Je}}(ye.username||ye.password)&&(ye.username="",ye.password="",P=ye.href)}if(X&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(l3((X.username||"")+":"+(X.password||""))))),Y&&typeof P=="string"&&P.startsWith("data:")&&a3(P)>W)throw new he("maxContentLength size of "+W+" exceeded",he.ERR_BAD_RESPONSE,E,j);if(ee&&T!=="get"&&T!=="head"){const ye=await b(k);if(typeof ye=="number"&&isFinite(ye)&&(ie=ye,ye>te))throw ce()}const de=ee&&(I.isReadableStream(k)||I.isStream(k)),fe=(ye,Be,Je)=>tb(ye,sb,Le=>{if(ee&&Le>te)throw Q=ce();Be&&Be(Le)},Je);
vendor: 5,852 bytes, lines 272-274
272if(x&&T!=="get"&&T!=="head"&&(G||de)){if(ie=ie??await C(se,k),ie!==0||de){let ye=new a(P,{method:"POST",body:k,duplex:"half"}),Be;if(I.isFormData(k)&&(Be=ye.headers.get("content-type"))&&se.setContentType(Be),ye.body){const[Je,Le]=G&&X0(ie,zu(J0(G)))||[];k=fe(ye.body,Je,Le)}}}else if(de&&!d&&m&&T!=="get"&&T!=="head")k=fe(k);else if(de&&d&&!x&&T!=="get"&&T!=="head")throw new he("Stream request bodies are not supported by the current fetch implementation",he.ERR_NOT_SUPPORT,E,j);I.isString(ue)||(ue=ue?"include":"omit");const ke=d&&"credentials"in a.prototype;if(I.isFormData(k)){const ye=se.getContentType();ye&&/^multipart\/form-data/i.test(ye)&&!/boundary=/i.test(ye)&&se.delete("content-type")}se.set("User-Agent","axios/"+wg,!1);const Me={...ae,signal:$,method:T.toUpperCase(),headers:lC(se.normalize()),body:k,duplex:"half",credentials:ke?ue:void 0};j=d&&new a(P,Me);let Ae=await(d?H(j,ae):H(P,Me));const Xe=Ht.from(Ae.headers);if(Y){const ye=I.toFiniteNumber(Xe.getContentLength());if(ye!=null&&ye>W)throw new he("maxContentLength size of "+W+" exceeded",he.ERR_BAD_RESPONSE,E,j)}const ge=S&&(J==="stream"||J==="response");if(S&&Ae.body&&(O||Y||ge&&q)){const ye={};["status","statusText","headers"].forEach(ft=>{ye[ft]=Ae[ft]});const Be=I.toFiniteNumber(Xe.getContentLength()),[Je,Le]=O&&X0(Be,zu(J0(O),!0))||[];let lt=0;const on=ft=>{if(Y&&(lt=ft,lt>W))throw new he("maxContentLength size of "+W+" exceeded",he.ERR_BAD_RESPONSE,E,j);Je&&Je(ft)};Ae=new l(tb(Ae.body,sb,on,()=>{Le&&Le(),q&&q()}),ye)}J=J||"text";let Ce=await _[I.findKey(_,J)||"text"](Ae,E);if(Y&&!S&&!ge){let ye;if(Ce!=null&&(typeof Ce.byteLength=="number"?ye=Ce.byteLength:typeof Ce.size=="number"?ye=Ce.size:typeof Ce=="string"&&(ye=typeof r=="function"?new r().encode(Ce).byteLength:Ce.length)),typeof ye=="number"&&ye>W)throw new he("maxContentLength size of "+W+" exceeded",he.ERR_BAD_RESPONSE,E,j)}return!ge&&q&&q(),await new Promise((ye,Be)=>{yC(ye,Be,{data:Ce,headers:Ht.from(Ae.headers),status:Ae.status,statusText:Ae.statusText,config:E,request:j})})}catch(X){if(q&&q(),$&&$.aborted&&$.reason instanceof he){const Z=$.reason;throw Z.config=E,j&&(Z.request=j),X!==Z&&Object.defineProperty(Z,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),Z}if(Q)throw j&&!Q.request&&(Q.request=j),Q;if(X instanceof he)throw j&&!X.request&&(X.request=j),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const Z=new he("Network Error",he.ERR_NETWORK,E,j,X&&X.response);throw Object.defineProperty(Z,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),Z}throw he.from(X,X&&X.code,E,j,X&&X.response)}}},d3=new Map,bC=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let l=a.length,u=l,d,h,m=d3;for(;u--;)d=a[u],h=m.get(d),h===void 0&&m.set(d,h=u?new Map:u3(t)),m=h;return h};bC();const bg={http:g4,xhr:Y4,fetch:{get:bC}};I.forEach(bg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const ab=e=>`- ${e}`,f3=e=>I.isFunction(e)||e===null||e===!1;function h3(e,t){e=I.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let l=0;l<n;l++){r=e[l];let u;if(i=r,!f3(r)&&(i=bg[(u=String(r)).toLowerCase()],i===void 0))throw new he(`Unknown adapter '${u}'`);if(i&&(I.isFunction(i)||(i=i.get(t))))break;a[u||"#"+l]=i}if(!i){const l=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let u=n?l.length>1?`since : 273`+l.map(ab).join(` 274`):" "+ab(l[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+u,he.ERR_NOT_SUPPORT)}return i}const SC={getAdapter:h3,adapters:bg};function Xh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dl(null,e)}function Jh(e){return Xh(e),e.headers=Ht.from(e.headers),e.data=Yh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),SC.getAdapter(e.adapter||Ml.adapter,e)(e).then(function(r){Xh(e),e.response=r;try{r.data=Yh.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Ht.from(r.headers),r},function(r){if(!gC(r)&&(Xh(e),r&&r.response)){e.response=r.response;try{r.response.data=Yh.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Ht.from(r.response.headers)}return Promise.reject(r)})}const hd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lb={};hd.transitional=function(t,n,r){function i(a,l){return"[Axios v"+wg+"] Transitional option '"+a+"'"+l+(r?". "+r:"")}return(a,l,u)=>{if(t===!1)throw new he(i(l," has been removed"+(n?" in "+n:"")),he.ERR_DEPRECATED);return n&&!lb[l]&&(lb[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,l,u):!0}};hd.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function p3(e,t,n){if(typeof e!="object"||e===null)throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],l=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(l){const u=e[a],d=u===void 0||l(u,a,e);if(d!==!0)throw new he("option "+a+" must be "+d,he.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new he("Unknown option "+a,he.ERR_BAD_OPTION)}}const xu={assertOptions:p3,validators:hd},Bt=xu.validators;let vo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Q0,response:new Q0}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=(()=>
vendor: 4,063 bytes, lines 274-278
274{if(!i.stack)return"";const l=i.stack.indexOf(` 275`);return l===-1?"":i.stack.slice(l+1)})();try{if(!r.stack)r.stack=a;else if(a){const l=a.indexOf(` 276`),u=l===-1?-1:a.indexOf(` 277`,l+1),d=u===-1?"":a.slice(u+1);String(r.stack).endsWith(d)||(r.stack+=` 278`+a)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Eo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&xu.assertOptions(r,{silentJSONParsing:Bt.transitional(Bt.boolean),forcedJSONParsing:Bt.transitional(Bt.boolean),clarifyTimeoutError:Bt.transitional(Bt.boolean),legacyInterceptorReqResOrdering:Bt.transitional(Bt.boolean),advertiseZstdAcceptEncoding:Bt.transitional(Bt.boolean),validateStatusUndefinedResolves:Bt.transitional(Bt.boolean)},!1),i!=null&&(I.isFunction(i)?n.paramsSerializer={serialize:i}:xu.assertOptions(i,{encode:Bt.function,serialize:Bt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xu.assertOptions(n,{baseUrl:Bt.spelling("baseURL"),withXsrfToken:Bt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=a&&I.merge(a.common,a[n.method]);a&&I.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=Ht.concat(l,a);const u=[];let d=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;d=d&&b.synchronous;const C=n.transitional||vg;C&&C.legacyInterceptorReqResOrdering?u.unshift(b.fulfilled,b.rejected):u.push(b.fulfilled,b.rejected)});const h=[];this.interceptors.response.forEach(function(b){h.push(b.fulfilled,b.rejected)});let m,g=0,x;if(!d){const _=[Jh.bind(this),void 0];for(_.unshift(...u),_.push(...h),x=_.length,m=Promise.resolve(n);g<x;)m=m.then(_[g++],_[g++]);return m}x=u.length;let S=n;for(;g<x;){const _=u[g++],b=u[g++];try{S=_?_(S):S}catch(C){if(!b){m=Promise.reject(C);break}try{const E=b.call(this,C);I.isThenable(E)&&(m=Promise.resolve(E).then(()=>Jh.call(this,S)))}catch(E){m=Promise.reject(E)}break}}if(!m)try{m=Jh.call(this,S)}catch(_){m=Promise.reject(_)}for(g=0,x=h.length;g<x;)m=m.then(h[g++],h[g++]);return m}getUri(t){t=Eo(this.defaults,t);const n=vC(t.baseURL,t.url,t.allowAbsoluteUrls,t);return hC(n,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){vo.prototype[t]=function(n,r){return this.request(Eo(r||{},{method:t,url:n,data:r&&I.hasOwnProp(r,"data")?r.data:void 0}))}});I.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,l,u){return this.request(Eo(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:l}))}}vo.prototype[t]=n(),t!=="query"&&(vo.prototype[t+"Form"]=n(!0))});let m3=class EC{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const l=new Promise(u=>{r.subscribe(u),a=u}).then(i);return l.cancel=function(){r.unsubscribe(a)},l},t(function(a,l,u){r.reason||(r.reason=new Dl(a,l,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new EC(function(i){t=i}),cancel:t}}};function g3(e){return function(n){return e.apply(null,n)}}function y3(e){return I.isObject(e)&&e.isAxiosError===!0}const rm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
278alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rm).forEach(([e,t])=>{rm[t]=e});function CC(e){const t=new vo(e),n=ZE(vo.prototype.request,t);return I.extend(n,vo.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return CC(Eo(e,i))},n}const gt=CC(Ml);gt.Axios=vo;gt.CanceledError=Dl;gt.CancelToken=m3;gt.isCancel=gC;gt.VERSION=wg;gt.toFormData=fd;gt.AxiosError=he;gt.Cancel=gt.CanceledError;gt.all=function(t){return Promise.all(t)};gt.spread=g3;gt.isAxiosError=y3;gt.mergeConfig=Eo;gt.AxiosHeaders=Ht;gt.formToJSON=e=>mC(I.isHTMLForm(e)?new FormData(e):e);gt.getAdapter=SC.getAdapter;gt.HttpStatusCode=rm;gt.default=gt;const{Axios:BW,AxiosError:$W,CanceledError:VW,isCancel:UW,CancelToken:zW,VERSION:WW,all:HW,Cancel:qW,isAxiosError:KW,spread:GW,toFormData:QW,AxiosHeaders:YW,HttpStatusCode:XW,formToJSON:JW,getAdapter:ZW,mergeConfig:eH,create:tH}=gt,_C=typeof window>"u",cb=!_C&&window.self!==window.top,v3=!_C&&typeof document>"u",RC=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),At=[];for(let e=0;e<256;++e)At.push((e+256).toString(16).slice(1));function x3(e,t=0){return(At[e[t+0]]+At[e[t+1]]+At[e[t+2]]+At[e[t+3]]+"-"+At[e[t+4]]+At[e[t+5]]+"-"+At[e[t+6]]+At[e[t+7]]+"-"+At[e[t+8]]+At[e[t+9]]+"-"+At[e[t+10]]+At[e[t+11]]+At[e[t+12]]+At[e[t+13]]+At[e[t+14]]+At[e[t+15]]).toLowerCase()}let Zh;const w3=new Uint8Array(16);function b3(){if(!Zh){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Zh=crypto.getRandomValues.bind(crypto)}return Zh(w3)}const S3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ub={randomUUID:S3};function E3(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??b3();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,x3(r)}function C3(e,t,n){return ub.randomUUID&&!e?ub.randomUUID():E3(e)}const Ia=typeof window<"u"?window:{base44SharedInstances:{}};function _3(e,t){return Ia.base44SharedInstances||(Ia.base44SharedInstances={}),Ia.base44SharedInstances[e]||(Ia.base44SharedInstances[e]={instance:t()}),Ia.base44SharedInstances[e].instance}const R3="__user_heartbeat_event__",P3="__initialization_event__",T3="__session_duration_event__",db="analytics-enable",fb="base44_analytics_session_id",k3={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},N3="analytics",Ke=_3(N3,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...k3,...F3()}})),A3=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r,enabled:i})=>{var a;const{maxQueueSize:l,throttleTime:u,batchSize:d}=Ke.config;if(!i||!(!((a=Ke.config)===null||a===void 0)&&a.enabled)||v3)return{track:()=>{},cleanup:()=>{}};let h;const m=`${t}/api/apps/${n}/analytics/track/batch`,g=async k=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:k}})},x=k=>{try{const N=JSON.stringify({events:k}),D=new Blob([N],{type:"application/json"});return typeof navigator>"u"||N.length>6e4||!navigator.sendBeacon(m,D)}catch{return!1}},S=async(k,N={})=>
278{if(k.length===0)return;const D=await I3(r),B=k.map(L3(D));try{(!N.isBeacon||!x(B))&&await g(B)}catch{}},_=()=>{pb(S,{throttleTime:u,batchSize:d})},b=k=>{if(Ke.requestsQueue.length>=l)return;const N=D3();Ke.requestsQueue.push({...k,...N}),_()},C=()=>{pb(S,{throttleTime:u,batchSize:d}),h=mb(b),O3()},E=()=>{hb(),h==null||h(),M3(b);const k=Ke.requestsQueue.splice(0);S(k,{isBeacon:!0})},P=()=>{typeof window>"u"||(document.visibilityState==="hidden"?E():document.visibilityState==="visible"&&C())},T=()=>{hb(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",P)};return _(),h=mb(b),j3(b),typeof window<"u"&&window.addEventListener("visibilitychange",P),{track:b,cleanup:T}};function hb(){Ke.isProcessing=!1}async function pb(e,t){if(Ke.isProcessing)return;Ke.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;Ke.isProcessing&&Ke.requestsQueue.length>0;){const i=Ke.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(a=>setTimeout(a,n))}Ke.isProcessing=!1}function mb(e){var t;if(typeof window>"u"||Ke.isHeartBeatProcessing||((t=Ke.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Ke.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:R3})},Ke.config.heartBeatInterval);return()=>{clearInterval(n),Ke.isHeartBeatProcessing=!1}}function j3(e){typeof window>"u"||Ke.wasInitializationTracked||(Ke.wasInitializationTracked=!0,e({eventName:P3,properties:{referrer:document==null?void 0:document.referrer}}))}function O3(){typeof window>"u"||Ke.sessionStartTime!==null||(Ke.sessionStartTime=new Date().toISOString())}function M3(e){if(typeof window>"u"||Ke.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Ke.sessionStartTime).getTime();Ke.sessionStartTime=null,e({eventName:T3,properties:{sessionDuration:t}})}function D3(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function L3(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Wa=null;function gb(){Ke.sessionContext=null,Wa=null}async function I3(e){if(!Ke.sessionContext){if(!e.hasToken())return{user_id:null,session_id:Wu()};if(!Wa){const r=Wu();Wa=e.me().then(i=>({user_id:i.id,session_id:r})).catch(()=>({user_id:null,session_id:r}))}const t=Wa,n=await t;return Wa===t&&(Ke.sessionContext=n),n}return Ke.sessionContext}function F3(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(db);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(db);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function yb(){var e;return(e=Ke.fallbackSessionId)!==null&&e!==void 0?e:Ke.fallbackSessionId=RC()}function Wu(){if(typeof window>"u")return yb();try{const e=localStorage.getItem(fb);if(!e){const t=RC();return localStorage.setItem(fb,t),t}return e}catch{return yb()}}class B3 extends Error{constructor(t,n,r,i,a){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function ci({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const a=gt.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(l=>{typeof window<"u"&&(window.location&&l.headers.set("X-Origin-URL",window.location.href),l.headers.get("Authorization")||l.headers.set("X-Base44-Anonymous-Id",Wu()));const u=C3();if(l.requestId=u,cb)try{window.parent.postMessage({type:"api-request-start",requestId:u,data:{url:e+l.url,method:l.method,body:l.data instanceof FormData?"[FormData object]":l.data}},"*")}catch{}return l}),r&&a.interceptors.response.use(l=>{var u;const d=(u=l.config)===null||u===void 0?void 0:u.requestId;try{cb&&d&&window.parent.postMessage({type:"api-request-end",requestId:d,data:{statusCode:l.status,response:l.data}},"*")}catch{}return l.data},l=>{var u,d,h,m,g,x,S,_,b,C,E,P,T,k,N;const D=((d=(u=l.response)===null||u===void 0?void 0:u.data)===null||d===void 0?void 0:d.message)||((m=(h=l.response)===null||h===void 0?void 0:h.data)===null||m===void 0?void 0:m.detail)||l.message,B=new B3(D,(g=l.response)===null||g===void 0?void 0:g.status,(P=(_=(S=(x=l.response)===null||x===void 0?void 0:x.data)===null||S===void 0?void 0:S.code)!==null&&_!==void 0?_:(E=(C=(b=l.response)===null||b===void 0?void 0:b.headers)===null||C===void 0?void 0:C.get)===null||E===void 0?void 0:E.
278call(C,"x-base44-connector-error"))!==null&&P!==void 0?P:(k=(T=l.response)===null||T===void 0?void 0:T.headers)===null||k===void 0?void 0:k["x-base44-connector-error"],(N=l.response)===null||N===void 0?void 0:N.data,l);return i==null||i(B),Promise.reject(B)}),a}function vb(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return V3(t,n,a,r)}})}function $3(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function V3(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(a,l,u,d){const h={};return a&&(h.sort=a),l&&(h.limit=l),u&&(h.skip=u),d&&(h.fields=Array.isArray(d)?d.join(","):d),e.get(i,{params:h})},async filter(a,l,u,d,h){const m={q:JSON.stringify(a)};return l&&(m.sort=l),u&&(m.limit=u),d&&(m.skip=d),h&&(m.fields=Array.isArray(h)?h.join(","):h),e.get(i,{params:m})},async get(a){return e.get(`${i}/${a}`)},async create(a){return e.post(i,a)},async update(a,l){return e.put(`${i}/${a}`,l)},async delete(a){return e.delete(`${i}/${a}`)},async deleteMany(a){return e.delete(i,{data:a})},async bulkCreate(a){return e.post(`${i}/bulk`,a)},async updateMany(a,l){return e.patch(`${i}/update-many`,{query:a,data:l})},async bulkUpdate(a){return e.put(`${i}/bulk`,a)},async importEntities(a){const l=new FormData;return l.append("file",a,a.name),e.post(`${i}/import`,l,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(a){const l=`entities:${t}:${n}`;return r().subscribeToRoom(l,{update_model:h=>{var m;const g=$3(h.data);if(g){g.type!=="delete"&&(!((m=g.data)===null||m===void 0)&&m._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${g.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${g.id}")\` to fetch the full record.`);try{a(g)}catch(x){console.error("[Base44 SDK] Subscription callback error:",x)}}}})}}}function U3(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:l,...u}=i??{},d={...u,...a&&{path_params:a},...l&&{query_params:l}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,d)}}}function xb(e,t){const n=U3(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(a,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return async u=>{if(typeof u=="string")throw new Error(`Integration ${l} must receive an object with named parameters, received: ${u}`);let d,h;return u instanceof FormData||u&&Object.values(u).some(m=>m instanceof File)?(d=new FormData,Object.keys(u).forEach(m=>{u[m]instanceof File?d.append(m,u[m],u[m].name):typeof u[m]=="object"&&u[m]!==null?d.append(m,JSON.stringify(u[m])):d.append(m,u[m])}),h="multipart/form-data"):(d=u,h="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${l}`,d||u,{headers:{"Content-Type":h}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${l}`,d||u,{headers:{"Content-Type":h}})}}})}})}function z3(){return typeof window>"u"?!1:window!==window.parent}function W3(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),l=Math.round(window.screenY+(window.outerHeight-600)/2),u=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${l},resizable=yes,scrollbars=yes`);if(!u)return;const d=()=>{window.removeEventListener("message",h),clearInterval(m),u.closed||u.close()},h=g=>{var x;if(g.origin!==n||g.source!==u||!(!((x=g.data)===null||x===void 0)&&x.access_token))return;d();const S=new URL(t),{access_token:_,is_new_user:b}=g.data;S.searchParams.set("access_token",_),b!=null&&S.searchParams.set("is_new_user",String(b)),window.location.href=S.toString()},m=setInterval(()=>{u.closed&&d()},500);window.addEventListener("message",h)}function H3(e,t,n,r){let i=null;const a=()=>{i=null};let l=!!r.token;return{hasToken(){return l},async me(){const u=i??e.get(`/apps/${n}/entities/User/me`).finally(()=>{i===u&&(i=null)});return i=u,u},async updateMe(u){return e.put(`/apps/${n}/entities/User/me`,u)},redirectToLogin(u){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const d=u?new URL(u,window.location.origin).toString():window.location.href,h=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(d)}`;window.location.href=h},loginWithProvider(u,d="/"){const h=new URL(d,window.location.origin).toString(),m=`app_id=${n}&from_url=${encodeURIComponent(h)}`;let g;u==="sso"?g=`/apps/${n}/auth/sso/login`:g=`/apps/auth${u==="google"?"":`/${u}`}/login`;const x=`${r.appBaseUrl}/api${g}?${m}`;if(z3()){const S=`${x}&popup_origin=${encodeURIComponent(window.location.origin)}`;return W3(S,h,window.location.origin)}window.location.href=x},logout(u){if(delete e.defaults.headers.common.Authorization,a(),gb(),l=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(m){console.error("Failed to remove token from localStorage:",m)}const d=u||window.location.href,h=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(d)}`;window.location.href=h}},setToken(u,d=!0){if(u&&(a(),gb(),l=!0,e.defaults.headers.common.Authorization=`Bearer ${u}`,t.defaults.headers.common.Authorization=`Bearer ${u}
278`,d&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",u),window.localStorage.setItem("token",u)}catch(h){console.error("Failed to save token to localStorage:",h)}},async loginViaEmailPassword(u,d,h){var m;try{const g=await e.post(`/apps/${n}/auth/login`,{email:u,password:d,...h&&{turnstile_token:h}}),{access_token:x,user:S}=g;return x&&this.setToken(x),{access_token:x,user:S}}catch(g){throw((m=g.response)===null||m===void 0?void 0:m.status)===401&&await this.logout(),g}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(u,d){return e.post(`/apps/${n}/users/invite-user`,{user_email:u,role:d})},register(u){return e.post(`/apps/${n}/auth/register`,u)},verifyOtp({email:u,otpCode:d}){return e.post(`/apps/${n}/auth/verify-otp`,{email:u,otp_code:d})},resendOtp(u){return e.post(`/apps/${n}/auth/resend-otp`,{email:u})},resetPasswordRequest(u){return e.post(`/apps/${n}/auth/reset-password-request`,{email:u})},resetPassword({resetToken:u,newPassword:d}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:u,new_password:d})},changePassword({userId:u,currentPassword:d,newPassword:h}){return e.post(`/apps/${n}/auth/change-password`,{user_id:u,current_password:d,new_password:h})}}}function q3(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)},async getIdToken(n){const r=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(r)}}}const K3=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);function G3(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getWorkspaceConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async callApi(n,r){return PC(n,"Integration type"),Q3(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,r)}}}function PC(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function Q3(e,t,n){var r,i,a,l,u,d,h,m,g;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");PC(n.path,"Request path");const x=(r=n.method)!==null&&r!==void 0?r:"GET";if(!K3.has(x))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const _=await e.post(t,{method:x,...n.host==null?{}:{host:n.host},path:n.path,query:(i=n.query)!==null&&i!==void 0?i:{},headers:(a=n.headers)!==null&&a!==void 0?a:{},body:(l=n.body)!==null&&l!==void 0?l:null});return{success:_.success,phase:_.phase,status:(u=_.status_code)!==null&&u!==void 0?u:null,data:_.data,dataBase64:(d=_.data_base64)!==null&&d!==void 0?d:null,contentType:(h=_.content_type)!==null&&h!==void 0?h:null,headers:(m=_.headers)!==null&&m!==void 0?m:{},creditsCharged:(g=_.credits_charged)!==null&&g!==void 0?g:0}}function Y3(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url}
278,async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function vs(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const l=new URLSearchParams(window.location.search);if(a=l.get(n),a){if(r&&X3(a,{storageKey:t}),i){l.delete(n);const u=`${window.location.pathname}${l.toString()?`?${l.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,u)}return a}}catch(l){console.error("Error retrieving token from URL:",l)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(l){console.error("Error retrieving token from local storage:",l)}return null}function X3(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function wb(e,t,n){const r=(a,l)=>a?`${String(a).replace(/\/$/,"")}${l}`:l,i=a=>{const l=new Headers;if(n!=null&&n.getAuthHeaders){const u=n.getAuthHeaders();Object.entries(u).forEach(([d,h])=>{h!=null&&l.set(d,String(h))})}return a&&new Headers(a).forEach((u,d)=>{l.set(d,u)}),l};return{async invoke(a,l){if(typeof l=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${l}`);let u,d;return l instanceof FormData||l&&Object.values(l).some(h=>h instanceof File)?(u=new FormData,Object.keys(l).forEach(h=>{l[h]instanceof File?u.append(h,l[h],l[h].name):typeof l[h]=="object"&&l[h]!==null?u.append(h,JSON.stringify(l[h])):u.append(h,l[h])}),d="multipart/form-data"):(u=l,d="application/json"),e.post(`/apps/${t}/functions/${a}`,u||l,{headers:{"Content-Type":d}})},async fetch(a,l={}){const d=`/functions${a.startsWith("/")?a:`/${a}`}`,h=i(l.headers),m={...l,headers:h};return await fetch(r(n==null?void 0:n.baseURL,d),m)}}}function bb({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const a=`/apps/${n}/agents`,l={},u=()=>e.get(`${a}/conversations`),d=b=>e.get(`${a}/conversations/${b}`);return{getConversations:u,getConversation:d,listConversations:b=>e.get(`${a}/conversations`,{params:b}),createConversation:b=>e.post(`${a}/conversations`,b),addMessage:async(b,C)=>e.post(`${a}/conversations/v2/${b.id}/messages`,C),subscribeToConversation:(b,C)=>{const E=`/agent-conversations/${b}`,P=t(),T=d(b).then(k=>(l[b]=k,k));return P.subscribeToRoom(E,{connect:()=>{},update_model:async({data:k})=>{const N=JSON.parse(k);if(N._message){await T;const D=N._message,B=l[b];if(B){const O=B.messages||[],G=O.findIndex(se=>se.id===D.id),J=G!==-1?O.map((se,ue)=>ue===G?D:se):[...O,D];l[b]={...B,messages:J},C==null||C(l[b])}}}})},getWhatsAppConnectURL:b=>{const C=`${r}/api/apps/${n}/agents/${encodeURIComponent(b)}/whatsapp`,E=i??vs();return E?`${C}?token=${E}`:C},getTelegramConnectURL:b=>{const C=`${r}/api/apps/${n}/agents/${encodeURIComponent(b)}/telegram`,E=i??vs();return E?`${C}?token=${E}`:C}}}function Sb({serverUrl:e,token:t,appId:n}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(i=t??vs())!==null&&i!==void 0?i:""}}}}function Eb(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function J3(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function Z3(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const hr=Object.create(null);hr.open="0";hr.close="1";hr.ping="2";hr.pong="3";hr.message="4";hr.upgrade="5";hr.noop="6";const wu=Object.create(null);
vendor: 5,989 bytes, line 278
278Object.keys(hr).forEach(e=>{wu[hr[e]]=e});const sm={type:"error",data:"parser error"},TC=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",kC=typeof ArrayBuffer=="function",NC=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Sg=({type:e,data:t},n,r)=>TC&&t instanceof Blob?n?r(t):Cb(t,r):kC&&(t instanceof ArrayBuffer||NC(t))?n?r(t):Cb(new Blob([t]),r):r(hr[e]+(t||"")),Cb=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function _b(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ep;function eB(e,t){if(TC&&e.data instanceof Blob)return e.data.arrayBuffer().then(_b).then(t);if(kC&&(e.data instanceof ArrayBuffer||NC(e.data)))return t(_b(e.data));Sg(e,!1,n=>{ep||(ep=new TextEncoder),t(ep.encode(n))})}const Rb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ha=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Rb.length;e++)Ha[Rb.charCodeAt(e)]=e;const tB=e=>{let t=e.length*.75,n=e.length,r,i=0,a,l,u,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),m=new Uint8Array(h);for(r=0;r<n;r+=4)a=Ha[e.charCodeAt(r)],l=Ha[e.charCodeAt(r+1)],u=Ha[e.charCodeAt(r+2)],d=Ha[e.charCodeAt(r+3)],m[i++]=a<<2|l>>4,m[i++]=(l&15)<<4|u>>2,m[i++]=(u&3)<<6|d&63;return h},nB=typeof ArrayBuffer=="function",Eg=(e,t)=>{if(typeof e!="string")return{type:"message",data:AC(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rB(e.substring(1),t)}:wu[n]?e.length>1?{type:wu[n],data:e.substring(1)}:{type:wu[n]}:sm},rB=(e,t)=>{if(nB){const n=tB(e);return AC(n,t)}else return{base64:!0,data:e}},AC=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},jC="�",sB=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((a,l)=>{Sg(a,!1,u=>{r[l]=u,++i===n&&t(r.join(jC))})})},oB=(e,t)=>{const n=e.split(jC),r=[];for(let i=0;i<n.length;i++){const a=Eg(n[i],t);if(r.push(a),a.type==="error")break}return r};function iB(){return new TransformStream({transform(e,t){eB(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let tp;function ru(e){return e.reduce((t,n)=>t+n.length,0)}function su(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function aB(e,t){tp||(tp=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(l,u){for(n.push(l);;){if(r===0){if(ru(n)<1)break;const d=su(n,1);a=(d[0]&128)===128,i=d[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(ru(n)<2)break;const d=su(n,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(ru(n)<8)break;const d=su(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){u.enqueue(sm);break}i=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(ru(n)<i)break;const d=su(n,i);u.enqueue(Eg(a?d:tp.decode(d),t)),r=0}if(i===0||i>e){u.enqueue(sm);break}}}})}const OC=4;function vt(e){if(e)return lB(e)}function lB(e){for(var t in vt.prototype)e[t]=vt.prototype[t];return e}vt.prototype.on=vt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};vt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};vt.prototype.off=vt.prototype.removeListener=vt.prototype.removeAllListeners=vt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};vt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};vt.prototype.emitReserved=vt.prototype.emit;vt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};vt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const pd=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Pn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),cB="arraybuffer";function MC(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const uB=Pn.setTimeout,dB=Pn.clearTimeout;function md(e,t){t.useNativeTimers?(e.setTimeoutFn=uB.bind(Pn),e.clearTimeoutFn=dB.bind(Pn)):(e.setTimeoutFn=Pn.setTimeout.bind(Pn),e.clearTimeoutFn=Pn.clearTimeout.bind(Pn))}const fB=1.33;function hB(e){return typeof e=="string"?pB(e):Math.ceil((e.byteLength||e.size)*fB)}function pB(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function DC(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mB(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function gB(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let a=n[r].split("=");
vendor: 6,261 bytes, line 278
278t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class yB extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Cg extends vt{constructor(t){super(),this.writable=!1,md(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new yB(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Eg(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=mB(t);return n.length?"?"+n:""}}class vB extends Cg{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};oB(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,sB(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=DC()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let LC=!1;try{LC=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xB=LC;function wB(){}class bB extends vB{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class dr extends vt{constructor(t,n,r){super(),this.createRequest=t,md(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=MC(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=dr.requestsCount++,dr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wB,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete dr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}dr.requestsCount=0;dr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pb);else if(typeof addEventListener=="function"){const e="onpagehide"in Pn?"pagehide":"unload";addEventListener(e,Pb,!1)}}function Pb(){for(let e in dr.requests)dr.requests.hasOwnProperty(e)&&dr.requests[e].abort()}const SB=(function(){const e=IC({xdomain:!1});return e&&e.responseType!==null})();class EB extends bB{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=SB&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new dr(IC,this.uri(),t)}}function IC(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||xB))return new XMLHttpRequest}catch{}if(!t)try{return new Pn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const FC=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class CB extends Cg{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=FC?{}:MC(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}
vendor: 9,702 bytes, line 278
278this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Sg(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}i&&pd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=DC()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const np=Pn.WebSocket||Pn.MozWebSocket;class _B extends CB{createSocket(t,n,r){return FC?new np(t,n,r):n?new np(t,n):new np(t)}doWrite(t,n){this.ws.send(n)}}class RB extends Cg{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=aB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=iB();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{r.read().then(({done:u,value:d})=>{u||(this.onPacket(d),a())}).catch(u=>{})};a();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&pd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const PB={websocket:_B,webtransport:RB,polling:EB},TB=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kB=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function om(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=TB.exec(e||""),a={},l=14;for(;l--;)a[kB[l]]=i[l]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=NB(a,a.path),a.queryKey=AB(a,a.query),a}function NB(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function AB(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}const im=typeof addEventListener=="function"&&typeof removeEventListener=="function",bu=[];im&&addEventListener("offline",()=>{bu.forEach(e=>e())},!1);class Ss extends vt{constructor(t,n){if(super(),this.binaryType=cB,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=om(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=om(n.host).host);md(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gB(this.opts.query)),im&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},bu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=OC,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ss.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ss.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=hB(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,pd(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ss.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),im&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=bu.indexOf(this._offlineEventListener);r!==-1&&bu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ss.protocol=OC;
vendor: 11,123 bytes, line 278
278class jB extends Ss{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ss.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!r)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ss.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=n.name,this.emitReserved("upgradeError",x)}}))};function a(){r||(r=!0,m(),n.close(),n=null)}const l=g=>{const x=new Error("probe error: "+g);x.transport=n.name,a(),this.emitReserved("upgradeError",x)};function u(){l("transport closed")}function d(){l("socket closed")}function h(g){n&&g.name!==n.name&&a()}const m=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",u),this.off("close",d),this.off("upgrading",h)};n.once("open",i),n.once("error",l),n.once("close",u),this.once("close",d),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let OB=class extends jB{constructor(t,n={}){const r=typeof t=="object",i=r?{...t}:{...n};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(a=>PB[a]).filter(a=>!!a)),super(r?i:t,i)}};function MB(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=om(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const DB=typeof ArrayBuffer=="function",LB=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,BC=Object.prototype.toString,IB=typeof Blob=="function"||typeof Blob<"u"&&BC.call(Blob)==="[object BlobConstructor]",FB=typeof File=="function"||typeof File<"u"&&BC.call(File)==="[object FileConstructor]";function _g(e){return DB&&(e instanceof ArrayBuffer||LB(e))||IB&&e instanceof Blob||FB&&e instanceof File}function Su(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Su(e[n]))return!0;return!1}if(_g(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Su(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Su(e[n]))return!0;return!1}function BB(e){const t=[],n=e.data,r=e;return r.data=am(n,t),r.attachments=t.length,{packet:r,buffers:t}}function am(e,t){if(!e)return e;if(_g(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=am(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=am(e[r],t));return n}return e}function $B(e,t){return e.data=lm(e.data,t),delete e.attachments,e}function lm(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=lm(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=lm(e[n],t));return e}const VB=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ue;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ue||(Ue={}));class UB{constructor(t){this.replacer=t}encode(t){return(t.type===Ue.EVENT||t.type===Ue.ACK)&&Su(t)?this.encodeAsBinary({type:t.type===Ue.EVENT?Ue.BINARY_EVENT:Ue.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ue.BINARY_EVENT||t.type===Ue.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=BB(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Rg extends vt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ue.BINARY_EVENT;r||n.type===Ue.BINARY_ACK?(n.type=r?Ue.EVENT:Ue.ACK,this.reconstructor=new zB(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_g(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ue[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ue.BINARY_EVENT||r.type===Ue.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(a,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const u=Number(l);if(!WB(u)||u<0)throw new Error("Illegal attachments");if(u>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=u}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Rg.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Ue.CONNECT:return Tb(n);case Ue.DISCONNECT:return n===void 0;case Ue.CONNECT_ERROR:return typeof n=="string"||Tb(n);case Ue.EVENT:case Ue.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&VB.indexOf(n[0])===-1);case Ue.ACK:case Ue.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class zB{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=$B(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const WB=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Tb(e){return Object.prototype.toString.call(e)==="[object Object]"}const HB=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rg,Encoder:UB,get PacketType(){return Ue}},Symbol.toStringTag,{value:"Module"}));function Wn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const qB=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $C extends vt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Wn(t,"open",this.onopen.bind(this)),Wn(t,"packet",this.onpacket.bind(this)),Wn(t,"error",this.onerror.bind(this)),Wn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,a;if(qB.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:Ue.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,g=n.pop();this._registerAckCallback(m,g),l.id=m}const u=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!u||(d?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===t&&this.sendBuffer.splice(u,1);n.call(this,new Error("operation has timed out"))},i),l=(...u)=>{this.io.clearTimeoutFn(a),n.apply(this,u)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,i)=>{const a=(l,u)=>l?i(l):r(u);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,087 bytes, line 278
278_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ue.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ue.EVENT:case Ue.BINARY_EVENT:this.onevent(t);break;case Ue.ACK:case Ue.BINARY_ACK:this.onack(t);break;case Ue.DISCONNECT:this.ondisconnect();break;case Ue.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ue.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Hi(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Hi.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Hi.prototype.reset=function(){this.attempts=0};Hi.prototype.setMin=function(e){this.ms=e};Hi.prototype.setMax=function(e){this.max=e};Hi.prototype.setJitter=function(e){this.jitter=e};class cm extends vt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,md(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Hi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||HB;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new OB(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Wn(n,"open",function(){r.onopen(),t&&t()}),a=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),t?t(u):this.maybeReconnectOnOpen()},l=Wn(n,"error",a);if(this._timeout!==!1){const u=this._timeout,d=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},u);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Wn(t,"ping",this.onping.bind(this)),Wn(t,"data",this.ondata.bind(this)),Wn(t,"error",this.onerror.bind(this)),Wn(t,"close",this.onclose.bind(this)),Wn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){pd(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new $C(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
278cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Fa={};function Eu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=MB(e,t.path||"/socket.io"),r=n.source,i=n.id,a=n.path,l=Fa[i]&&a in Fa[i].nsps,u=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let d;return u?d=new cm(r,t):(Fa[i]||(Fa[i]=new cm(r,t)),d=Fa[i]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Eu,{Manager:cm,Socket:$C,io:Eu,connect:Eu});const KB=250;function kb(e,t){var n;const r=(n=e.token)!==null&&n!==void 0?n:vs(),i={app_id:e.appId,token:r};r||(i.anonymous_id=Wu());const a=Eu(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return a.on("connect",async()=>{var l;return console.log("connect",a.id),(l=t.connect)===null||l===void 0?void 0:l.call(t)}),a.on("update_model",async l=>{var u;return(u=t.update_model)===null||u===void 0?void 0:u.call(t,l)}),a.on("error",async l=>{var u;return(u=t.error)===null||u===void 0?void 0:u.call(t,l)}),a.on("connect_error",async l=>{var u;return console.error("connect_error",l),(u=t.error)===null||u===void 0?void 0:u.call(t,l)}),a}function GB({config:e}){let t={...e};const n={},r={},i={connect:async()=>{const E=[];Object.keys(n).forEach(P=>{const T=x(P);T.length!==0&&(h(P),T.forEach(({connect:k})=>{const N=async()=>k==null?void 0:k();E.push(N())}))}),await Promise.all(E)},update_model:async E=>{const T=x(E.room).map(k=>{var N;return(N=k.update_model)===null||N===void 0?void 0:N.call(k,E)});await Promise.all(T)},error:async E=>{console.error("error",E);const P=Object.values(n).flat().map(T=>{var k;return(k=T.error)===null||k===void 0?void 0:k.call(T,E)});await Promise.all(P)}};let a=kb(e,i);function l(){u()}function u(){_(),a&&a.disconnect()}function d(E){l(),t={...t,...E},a=kb(t,i)}function h(E){a.emit("join",E)}function m(E){a.emit("leave",E)}async function g(E,P){var T;const k=JSON.stringify(P);return(T=i.update_model)===null||T===void 0?void 0:T.call(i,{room:E,data:k})}function x(E){var P;return(P=n[E])!==null&&P!==void 0?P:[]}function S(E){const P=r[E];P&&(clearTimeout(P),delete r[E])}function _(){Object.keys(r).forEach(E=>{var P,T;clearTimeout(r[E]),delete r[E],((T=(P=n[E])===null||P===void 0?void 0:P.length)!==null&&T!==void 0?T:0)===0&&delete n[E]})}function b(E){S(E),r[E]=setTimeout(()=>{var P,T;delete r[E],!(((T=(P=n[E])===null||P===void 0?void 0:P.length)!==null&&T!==void 0?T:0)>0)&&(m(E),delete n[E])},KB)}return{socket:a,subscribeToRoom:(E,P)=>{n[E]?S(E):(h(E),n[E]=[]),n[E].push(P);let T=!1;return()=>{var k,N;T||(T=!0,n[E]=(N=(k=n[E])===null||k===void 0?void 0:k.filter(D=>D!==P))!==null&&N!==void 0?N:[],n[E].length===0&&b(E))}},updateConfig:d,updateModel:g,disconnect:u}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` 279 PartySocket requires a global 'EventTarget' class to be available! 280 You can polyfill this global by adding this to your code before any partysocket imports: 281 282 \`\`\` 283 import 'partysocket/event-target-polyfill'; 284 \`\`\` 285 Please file an issue at https://github.com/partykit/partykit if you're still having trouble. 286`);
vendor: 5,074 bytes, line 286
286var VC=class extends Event{constructor(t,n){super("error",n);et(this,"message");et(this,"error");this.message=t.message,this.error=t}},UC=class extends Event{constructor(t=1e3,n="",r){super("close",r);et(this,"code");et(this,"reason");et(this,"wasClean",!0);this.code=t,this.reason=n}},rp={Event,ErrorEvent:VC,CloseEvent:UC};function QB(e,t){if(!e)throw new Error(t)}function YB(e){return new e.constructor(e.type,e)}function XB(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new UC(e.code||1999,e.reason||"unknown reason",e):"error"in e?new VC(e.error,e):new Event(e.type,e)}var bS,JB=typeof process<"u"&&typeof((bS=process.versions)==null?void 0:bS.node)<"u"&&typeof document>"u",ou=JB?XB:YB,Zs={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Nb=!1,ZB=class no extends EventTarget{constructor(n,r,i={}){super();et(this,"_ws");et(this,"_retryCount",-1);et(this,"_uptimeTimeout");et(this,"_connectTimeout");et(this,"_shouldReconnect",!0);et(this,"_connectLock",!1);et(this,"_binaryType","blob");et(this,"_closeCalled",!1);et(this,"_messageQueue",[]);et(this,"_url");et(this,"_protocols");et(this,"_options");et(this,"onclose",null);et(this,"onerror",null);et(this,"onmessage",null);et(this,"onopen",null);et(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:r=Zs.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),r),QB(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var a;return(a=this._ws)==null?void 0:a.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(ou(n))});et(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(ou(n))});et(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(ou(n)),this._connect()});et(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(ou(n))});this._url=n,this._protocols=r,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return no.CONNECTING}get OPEN(){return no.OPEN}get CLOSING(){return no.CLOSING}get CLOSED(){return no.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,i)=>(typeof i=="string"?r+=i.length:i instanceof Blob?r+=i.size:r+=i.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?no.CLOSED:no.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,r){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,r)}reconnect(n,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,r),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:r=Zs.maxEnqueuedMessages}=this._options;this._messageQueue.length<r&&(this._debug("enqueue",n),this._messageQueue.push(n))}}_debug(...n){this._options.debug&&console.log.apply(console,["RWS>",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=Zs.reconnectionDelayGrowFactor,minReconnectionDelay:r=Zs.minReconnectionDelay,maxReconnectionDelay:i=Zs.maxReconnectionDelay}=this._options;let a=0;return this._retryCount>0&&(a=r*Math.pow(n,this._retryCount-1),a>i&&(a=i)),this._debug("next delay",a),a}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const r=n();if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(r.then)return r}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const r=n();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
286const{maxRetries:n=Zs.maxRetries,connectionTimeout:r=Zs.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,a])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Nb&&(console.error(`â¼ï¸ No WebSocket implementation available. You should define options.WebSocket. 287 288For example, if you're using node.js, run \`npm install ws\`, and then in your code: 289 290import PartySocket from 'partysocket'; 291import WS from 'ws'; 292 293const partysocket = new PartySocket({ 294 host: "127.0.0.1:1999", 295 room: "test-room", 296 WebSocket: WS 297}); 298 299`),Nb=!0);const l=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:a}),this._ws=a?new l(i,a):new l(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),r)}).catch(i=>{this._connectLock=!1,this._handleError(new rp.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new rp.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,r){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,r),this._handleClose(new rp.CloseEvent(n,r,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! 300 * Reconnecting WebSocket 301 * by Pedro Ladaria <[email protected]> 302 * https://github.com/pladaria/reconnecting-websocket 303 * License MIT 304 */const e$=1e3,t$=3e3,n$=new Set([405,409,422,503]),r$=new Set([400,403,404]);function s$(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function o$(e){return e instanceof Error?e:new Error(String(e))}class i${constructor(t,n,r,i,a){var l;this.onClose=a,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(l=i==null?void 0:i.id)!==null&&l!==void 0?l:crypto.randomUUID();let u=r.transport==="proxy";const d=async()=>{var x;if(this.closed)throw new Error("Actor connection is closed");if(!u)try{const{websocket_url:S,token:_}=await r.mintConnectionToken(t,n,this.id),b=S.includes("?")?"&":"?";return`${S}${b}token=${encodeURIComponent(_)}`}catch(S){const _=s$(S);if(!(r.transport!=="direct"&&_!==void 0&&n$.has(_))){_!==void 0&&r$.has(_)&&this.close();try{(x=r.onMintError)===null||x===void 0||x.call(r,o$(S))}catch{}throw S}u=!0}return l$(r.host,t,n,this.id,r.appId,r.getAuthToken(),r.functionsVersion)},h=new ZB(d);this.ws=h;let m=Date.now();const g=()=>{m=Date.now()};h.addEventListener("open",g),h.addEventListener("message",x=>{g();let S;try{S=JSON.parse(x.data)}catch{return}if((S&&typeof S=="object"?S.type:void 0)!=="__pong")for(const b of this.listeners)b(S)}),this.heartbeat=setInterval(()=>{if(Date.now()-m>t$){g(),h.readyState===h.OPEN&&h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},e$)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function a$(e,t,n,r){let i=null;return{connect(a){if(i)return i;const l=new i$(e,t,n,a,()=>{r.delete(l),i===l&&(i=null)});return i=l,r.add(l),l}}}function l$(e,t,n,r,i,a,l){let u=e.replace(/^(http|https|ws|wss):\/\//,"");u.endsWith("/")&&(u=u.slice(0,-1));const d=u.startsWith("localhost:")||u.startsWith("127.0.0.1:")||u.startsWith("192.168.")||u.startsWith("10.")||u.startsWith("172.")&&u.split(".")[1]>="16"&&u.split(".")[1]<="31"||u.startsWith("[::ffff:7f00:1]:"),h=new URLSearchParams([["_pk",r],["app_id",i],["handler",t]]);return a&&h.append("token",a),l&&h.append("fv",l),`${d?"ws":"wss"}://${u}/parties/${t}/${n}?${h}`}function c$(e,t){return e&&!e.startsWith("/")?e:t??e}function u$(e){const t=new Set;return{module:new Proxy({}
304,{get(r,i){if(!(typeof i!="string"||i==="then"))return a=>a$(i,a,e,t)}}),closeAll:()=>{for(const r of[...t])r.close()}}}function d$(e){var t,n,r,i;const{serverUrl:a="https://base44.app",appId:l,analytics:u,token:d,serviceToken:h,requiresAuth:m=!1,appBaseUrl:g,options:x,functionsVersion:S,headers:_}=e,b=typeof g=="string"?g:"",C={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:d};let E=null;const P=()=>(E||(E=GB({config:C})),E),T={..._,"X-App-Id":String(l)},k=S?{...T,"Base44-Functions-Version":S}:T,N=ci({baseURL:`${a}/api`,headers:T,token:d,onError:x==null?void 0:x.onError}),D=ci({baseURL:`${a}/api`,headers:k,token:d,interceptResponses:!1,onError:x==null?void 0:x.onError}),B={...T,...d?{"on-behalf-of":`Bearer ${d}`}:{}},O=ci({baseURL:`${a}/api`,headers:B,token:h,onError:x==null?void 0:x.onError}),G=ci({baseURL:`${a}/api`,headers:k,token:h,interceptResponses:!1}),J=ci({baseURL:`${a}/api`,headers:T}),se=H3(N,D,l,{appBaseUrl:b,token:d});if(typeof window<"u"){const Y=d||vs();Y&&se.setToken(Y)}const ue=u$({appId:l,host:c$(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:S,getAuthToken:()=>d||vs(),mintConnectionToken:async(Y,ee,V)=>{const H=d||vs();return await J.post(`/apps/${l}/actors/${encodeURIComponent(Y)}/connection-token`,{room:ee,connection_id:V},{headers:{...H?{Authorization:`Bearer ${H}`}:{},...S?{"Base44-Functions-Version":S}:{}}})},transport:x==null?void 0:x.actorsTransport,onMintError:x==null?void 0:x.onError}),ae={entities:vb({axios:N,appId:l,getSocket:P}),integrations:xb(N,l),connectors:Y3(N,l),auth:se,functions:wb(D,l,{getAuthHeaders:()=>{const Y={},ee=d||vs();return ee&&(Y.Authorization=`Bearer ${ee}`),Y},baseURL:(n=D.defaults)===null||n===void 0?void 0:n.baseURL}),agents:bb({axios:N,getSocket:P,appId:l,serverUrl:a,token:d}),aiGateway:Sb({serverUrl:a,token:d,appId:l}),appLogs:Eb(N,l),app:J3(N,l),users:Z3(N,l),analytics:A3({axiosClient:N,serverUrl:a,appId:l,userAuthModule:se,enabled:(r=u==null?void 0:u.enabled)!==null&&r!==void 0?r:!0}),actors:ue.module,cleanup:()=>{ae.analytics.cleanup(),ue.closeAll(),E&&E.disconnect()}},W={entities:vb({axios:O,appId:l,getSocket:P}),integrations:xb(O,l),sso:q3(O,l),connectors:G3(O,l),functions:wb(G,l,{getAuthHeaders:()=>{const Y={};return h&&(Y.Authorization=`Bearer ${h}`),Y},baseURL:(i=G.defaults)===null||i===void 0?void 0:i.baseURL}),agents:bb({axios:O,getSocket:P,appId:l,serverUrl:a,token:d}),aiGateway:Sb({serverUrl:a,token:h,appId:l}),appLogs:Eb(O,l),cleanup:()=>{E&&E.disconnect()}};return m&&typeof window<"u"&&setTimeout(async()=>{try{await ae.auth.isAuthenticated()||ae.auth.redirectToLogin(window.location.href)}catch(Y){console.error("Authentication check failed:",Y),ae.auth.redirectToLogin(window.location.href)}},0),{...ae,setToken(Y){ae.auth.setToken(Y),E&&E.updateConfig({token:Y}),C.token=Y},getConfig(){return{serverUrl:a,appId:l,requiresAuth:m}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return W}}}const zC=typeof window>"u",f$=zC?{localStorage:new Map}:window,el=f$.localStorage,h$=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),oi=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(zC)return t;const r=`base44_${h$(e)}`,i=new URLSearchParams(window.location.search),a=i.get(e);if(n){i.delete(e);const u=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,u)}if(a)return el.setItem(r,a),a;if(t)return el.setItem(r,t),t;const l=el.getItem(r);return l||null},p$=()=>(oi("clear_access_token")==="true"&&(el.removeItem("base44_access_token"),el.removeItem("token")),{appId:oi("app_id",{defaultValue:"6a71ea7a598d9ff82029de97"}),token:oi("access_token",{removeFromUrl:!0}),fromUrl:oi("from_url",{defaultValue:window.location.href}),functionsVersion:oi("functions_version",{defaultValue:"prod"}),appBaseUrl:oi("app_base_url",{defaultValue:void 0})}),Hn={...p$()},{appId:m$,token:g$,functionsVersion:y$,appBaseUrl:v$}=Hn,De=d$({appId:m$,token:g$,functionsVersion:y$,serverUrl:"",requiresAuth:!1,appBaseUrl:v$});function x$({}){var i;const t=ks().pathname.substring(1),{data:n,isFetched:r}=_O({queryKey:["user"],queryFn:async()=>{try{return{user:await De.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return p.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:p.jsx("div",{className:"max-w-md w-full",children:p.jsxs("div",{className:"text-center space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),p.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),p.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",p.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&p.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:p.jsxs("div",{className:"flex items-start space-x-3",children:[p.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:p.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),p.jsxs("div",{className:"text-left space-y-1",children:[p.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),p.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),p.jsx("div",{className:"pt-6",children:p.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[p.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const WC=v.createContext(),w$=({children:e})=>{const[t,n]=v.useState(null),[r,i]=v.useState(!1),[a,l]=v.useState(!0),[u,d]=v.useState(!0),[h,m]=v.useState(null),[g,x]=v.useState(!1),[S,_]=v.useState(null);v.useEffect(()=>{b()},[]);const b=async()=>{var T,k;try{d(!0),m(null);const N=ci({baseURL:"/api/apps/public",headers:{"X-App-Id":Hn.appId},token:Hn.token,interceptResponses:!0});try{const D=await N.get(`/prod/public-settings/by-id/${Hn.appId}`);_(D),Hn.token?await C():(l(!1),i(!1),x(!0)),d(!1)}catch(D){if(console.error("App state check failed:",D),D.status===403&&((k=(T=D.data)==null?void 0:T.extra_data)!=null&&k.reason)){const B=D.data.extra_data.reason;m(B==="auth_required"?{type:"auth_required",message:"Authentication required"}:B==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:B,message:D.message})}else m({type:"unknown",message:D.message||"Failed to load app"});d(!1),l(!1)}}catch(N){console.error("Unexpected error:",N),m({type:"unknown",message:N.message||"An unexpected error occurred"}),d(!1),l(!1)}},C=async()=>{try{l(!0);const T=await De.auth.me();n(T),i(!0),l(!1),x(!0)}catch(T){console.error("User auth check failed:",T),l(!1),i(!1),x(!0),(T.status===401||T.status===403)&&m({type:"auth_required",message:"Authentication required"})}},E=(T=!0)=>{n(null),i(!1),T?De.auth.logout(window.location.href):De.auth.logout()},P=()=>{De.auth.redirectToLogin(window.location.href)};return p.jsx(WC.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:a,isLoadingPublicSettings:u,authError:h,appPublicSettings:S,authChecked:g,logout:E,navigateToLogin:P,checkUserAuth:C,checkAppState:b},children:e})},Pg=()=>{const e=v.useContext(WC);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},b$=()=>p.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:p.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:p.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),p.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),p.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),p.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[p.jsx("p",{children:"If you believe this is an error, you can:"}),p.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[p.jsx("li",{children:"Verify you are logged in with the correct account"}),p.jsx("li",{children:"Contact the app administrator for access"}),p.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),S$=e=>{const t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function E$(){const{pathname:e,hash:t}=ks(),n=r2();return v.useEffect(()=>{if(n!=="POP"){if(t){const r=S$(t),i=window.setTimeout(()=>{var a;(a=document.getElementById(r))==null||a.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(i)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[e,t,n]),null}function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Ab(e,t){if(typeof e=="function")return e(t);
vendor: 16,001 bytes, line 304
304e!=null&&(e.current=t)}function Lr(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Ab(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Ab(e[i],null)}}}}function Ye(...e){return v.useCallback(Lr(...e),e)}function C$(e,t){const n=v.createContext(t),r=a=>{const{children:l,...u}=a,d=v.useMemo(()=>u,Object.values(u));return p.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function i(a){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function As(e,t=[]){let n=[];function r(a,l){const u=v.createContext(l),d=n.length;n=[...n,l];const h=g=>{var E;const{scope:x,children:S,..._}=g,b=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,C=v.useMemo(()=>_,Object.values(_));return p.jsx(b.Provider,{value:C,children:S})};h.displayName=a+"Provider";function m(g,x){var b;const S=((b=x==null?void 0:x[e])==null?void 0:b[d])||u,_=v.useContext(S);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${a}\``)}return[h,m]}const i=()=>{const a=n.map(l=>v.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,_$(i,...t)]}function _$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const g=d(a)[`__scope${h}`];return{...u,...g}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Ct=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},R$=nd[" useId ".trim().toString()]||(()=>{}),P$=0;function jr(e){const[t,n]=v.useState(R$());return Ct(()=>{n(r=>r??String(P$++))},[e]),t?`radix-${t}`:""}var T$=nd[" useInsertionEffect ".trim().toString()]||Ct;function ml({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,l]=k$({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:i;{const m=v.useRef(e!==void 0);v.useEffect(()=>{const g=m.current;g!==u&&console.warn(`${r} is changing from ${g?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const h=v.useCallback(m=>{var g;if(u){const x=N$(m)?m(e):m;x!==e&&((g=l.current)==null||g.call(l,x))}else a(m)},[u,e,a,l]);return[d,h]}function k$({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return T$(()=>{a.current=t},[t]),v.useEffect(()=>{var l;i.current!==n&&((l=a.current)==null||l.call(a,n),i.current=n)},[n,i]),[n,r,a]}function N$(e){return typeof e=="function"}function A$(e){const t=j$(e),n=v.forwardRef((r,i)=>{const{children:a,...l}=r,u=v.Children.toArray(a),d=u.find(M$);if(d){const h=d.props.children,m=u.map(g=>g===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return p.jsx(t,{...l,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return p.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function j$(e){const t=v.forwardRef((n,r)=>{const{children:i,...a}=n;if(v.isValidElement(i)){const l=L$(i),u=D$(a,i.props);return i.type!==v.Fragment&&(u.ref=r?Lr(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var O$=Symbol("radix.slottable");function M$(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O$}function D$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const d=a(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function L$(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var I$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=I$.reduce((e,t)=>{const n=A$(`Primitive.${t}`),r=v.forwardRef((i,a)=>{const{asChild:l,...u}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function HC(e,t){e&&_l.flushSync(()=>e.dispatchEvent(t))}function Kn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function F$(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var B$="DismissableLayer",um="dismissableLayer.update",$$="dismissableLayer.pointerDownOutside",V$="dismissableLayer.focusOutside",jb,qC=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gd=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...d}=e,h=v.useContext(qC),[m,g]=v.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=v.useState({}),_=Ye(t,B=>g(B)),b=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=b.indexOf(C),P=m?b.indexOf(m):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,k=P>=E,N=W$(B=>{const O=B.target,G=[...h.branches].some(J=>J.contains(O));!k||G||(i==null||i(B),l==null||l(B),B.defaultPrevented||u==null||u())},x),D=H$(B=>{const O=B.target;[...h.branches].some(J=>J.contains(O))||(a==null||a(B),l==null||l(B),B.defaultPrevented||u==null||u())},x);return F$(B=>{P===h.layers.size-1&&(r==null||r(B),!B.defaultPrevented&&u&&(B.preventDefault(),u()))},x),v.useEffect(()=>{if(m)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(jb=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),Ob(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=jb)}},[m,x,n,h]),v.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),Ob())},[m,h]),v.useEffect(()=>{const B=()=>S({});return document.addEventListener(um,B),()=>document.removeEventListener(um,B)},[]),p.jsx(We.div,{...d,ref:_,style:{pointerEvents:T?k?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,D.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,N.onPointerDownCapture)})});gd.displayName=B$;var U$="DismissableLayerBranch",z$=v.forwardRef((e,t)=>{const n=v.useContext(qC),r=v.useRef(null),i=Ye(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(We.div,{...e,ref:i})});z$.displayName=U$;function W$(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let d=function(){KC($$,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=d,t.addEventListener("click",i.current,{once:!0})):d()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function H$(e,t=globalThis==null?void 0:globalThis.document){const n=Kn(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&KC(V$,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ob(){const e=new CustomEvent(um);document.dispatchEvent(e)}function KC(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?HC(i,a):i.dispatchEvent(a)}var sp="focusScope.autoFocusOnMount",op="focusScope.autoFocusOnUnmount",Mb={bubbles:!1,cancelable:!0},q$="FocusScope",yd=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[u,d]=v.useState(null),h=Kn(i),m=Kn(a),g=v.useRef(null),x=Ye(t,b=>d(b)),S=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let b=function(T){if(S.paused||!u)return;const k=T.target;u.contains(k)?g.current=k:ls(g.current,{select:!0})},C=function(T){if(S.paused||!u)return;const k=T.relatedTarget;k!==null&&(u.contains(k)||ls(g.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const N of T)N.removedNodes.length>0&&ls(u)};document.addEventListener("focusin",b),document.addEventListener("focusout",C);const P=new MutationObserver(E);return u&&P.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",C),P.disconnect()}}},[r,u,S.paused]),v.useEffect(()=>{if(u){Lb.add(S);const b=document.activeElement;if(!u.contains(b)){const E=new CustomEvent(sp,Mb);u.addEventListener(sp,h),u.dispatchEvent(E),E.defaultPrevented||(K$(J$(GC(u)),{select:!0}),document.activeElement===b&&ls(u))}return()=>{u.removeEventListener(sp,h),setTimeout(()=>{const E=new CustomEvent(op,Mb);u.addEventListener(op,m),u.dispatchEvent(E),E.defaultPrevented||ls(b??document.body,{select:!0}),u.removeEventListener(op,m),Lb.remove(S)},0)}}},[u,h,m,S]);const _=v.useCallback(b=>{if(!n&&!r||S.paused)return;const C=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,E=document.activeElement;if(C&&E){const P=b.currentTarget,[T,k]=G$(P);T&&k?!b.shiftKey&&E===k?(b.preventDefault(),n&&ls(T,{select:!0})):b.shiftKey&&E===T&&(b.preventDefault(),n&&ls(k,{select:!0})):E===P&&b.preventDefault()}},[n,r,S.paused]);return p.jsx(We.div,{tabIndex:-1,...l,ref:x,onKeyDown:_})});yd.displayName=q$;function K$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ls(r,{select:t}),document.activeElement!==n)return}function G$(e){const t=GC(e),n=Db(t,e),r=Db(t.reverse(),e);return[n,r]}function GC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Db(e,t){for(const n of e)if(!Q$(n,{upTo:t}))return n}function Q$(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 Y$(e){return e instanceof HTMLInputElement&&"select"in e}function ls(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Y$(e)&&t&&e.select()}}var Lb=X$();function X$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ib(e,t),e.unshift(t)},remove(t){var n;e=Ib(e,t),(n=e[0])==null||n.resume()}}}function Ib(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function J$(e){return e.filter(t=>t.tagName!=="A")}var Z$="Portal",vd=v.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,a]=v.useState(!1);Ct(()=>a(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?PO.createPortal(p.jsx(We.div,{...r,ref:t}),l):null});vd.displayName=Z$;function eV(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var js=e=>{const{present:t,children:n}=e,r=tV(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=Ye(r.ref,nV(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};js.displayName="Presence";function tV(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef("none"),l=e?"mounted":"unmounted",[u,d]=eV(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=iu(r.current);a.current=u==="mounted"?h:"none"},[u]),Ct(()=>{const h=r.current,m=i.current;if(m!==e){const x=a.current,S=iu(h);e?d("MOUNT"):S==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(m&&x!==S?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),Ct(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=S=>{const b=iu(r.current).includes(CSS.escape(S.animationName));if(S.target===t&&b&&(d("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},x=S=>{S.target===t&&(a.current=iu(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function iu(e){return(e==null?void 0:e.animationName)||"none"}function nV(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ip=0;function Tg(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fb()),document.body.insertAdjacentElement("beforeend",e[1]??Fb()),ip++,()=>{ip===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ip--}},[])}function Fb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ar=function(){return ar=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ar.apply(this,arguments)};function QC(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function rV(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Cu="right-scroll-bar-position",_u="width-before-scroll-bar",sV="with-scroll-bars-hidden",oV="--removed-body-scroll-bar-size";function ap(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function iV(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var aV=typeof window<"u"?v.useLayoutEffect:v.useEffect,Bb=new WeakMap;function lV(e,t){var n=iV(null,function(r){return e.forEach(function(i){return ap(i,r)})});return aV(function(){var r=Bb.get(n);if(r){var i=new Set(r),a=new Set(e),l=n.current;
vendor: 4,196 bytes, lines 304-319
304i.forEach(function(u){a.has(u)||ap(u,null)}),a.forEach(function(u){i.has(u)||ap(u,l)})}Bb.set(n,e)},[e]),n}function cV(e){return e}function uV(e,t){t===void 0&&(t=cV);var n=[],r=!1,i={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(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var d=function(){var m=l;l=[],m.forEach(a)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(m){l.push(m),h()},filter:function(m){return l=l.filter(m),n}}}};return i}function dV(e){e===void 0&&(e={});var t=uV(null);return t.options=ar({async:!0,ssr:!1},e),t}var YC=function(e){var t=e.sideCar,n=QC(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 v.createElement(r,ar({},n))};YC.isSideCarExport=!0;function fV(e,t){return e.useMedium(t),YC}var XC=dV(),lp=function(){},xd=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:lp,onWheelCapture:lp,onTouchMoveCapture:lp}),i=r[0],a=r[1],l=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,x=e.sideCar,S=e.noRelative,_=e.noIsolation,b=e.inert,C=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,T=e.gapMode,k=QC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=x,D=lV([n,t]),B=ar(ar({},k),i);return v.createElement(v.Fragment,null,m&&v.createElement(N,{sideCar:XC,removeScrollBar:h,shards:g,noRelative:S,noIsolation:_,inert:b,setCallbacks:a,allowPinchZoom:!!C,lockRef:n,gapMode:T}),l?v.cloneElement(v.Children.only(u),ar(ar({},B),{ref:D})):v.createElement(P,ar({},B,{className:d,ref:D}),u))});xd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xd.classNames={fullWidth:_u,zeroRight:Cu};var hV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hV();return t&&e.setAttribute("nonce",t),e}function mV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pV())&&(mV(t,n),gV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vV=function(){var e=yV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},JC=function(){var e=vV(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},xV={left:0,top:0,right:0,gap:0},cp=function(e){return parseInt(e||"",10)||0},wV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[cp(n),cp(r),cp(i)]},bV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xV;var t=wV(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])}},SV=JC(),gi="data-scroll-locked",EV=function(e,t,n,r){var i=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),` 305 .`.concat(sV,` { 306 overflow: hidden `).concat(r,`; 307 padding-right: `).concat(u,"px ").concat(r,`; 308 } 309 body[`).concat(gi,`] { 310 overflow: hidden `).concat(r,`; 311 overscroll-behavior: contain; 312 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 313 padding-left: `.concat(i,`px; 314 padding-top: `).concat(a,`px; 315 padding-right: `).concat(l,`px; 316 margin-left:0; 317 margin-top:0; 318 margin-right: `).concat(u,"px ").concat(r,`; 319 `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";
319")].filter(Boolean).join(""),` 320 } 321 322 .`).concat(Cu,` { 323 right: `).concat(u,"px ").concat(r,`; 324 } 325 326 .`).concat(_u,` { 327 margin-right: `).concat(u,"px ").concat(r,`; 328 } 329 330 .`).concat(Cu," .").concat(Cu,` { 331 right: 0 `).concat(r,`; 332 } 333 334 .`).concat(_u," .").concat(_u,` { 335 margin-right: 0 `).concat(r,`; 336 } 337 338 body[`).concat(gi,`] { 339 `).concat(oV,": ").concat(u,`px; 340 } 341`)},$b=function(){var e=parseInt(document.body.getAttribute(gi)||"0",10);return isFinite(e)?e:0},CV=function(){v.useEffect(function(){return document.body.setAttribute(gi,($b()+1).toString()),function(){var e=$b()-1;e<=0?document.body.removeAttribute(gi):document.body.setAttribute(gi,e.toString())}},[])},_V=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;CV();var a=v.useMemo(function(){return bV(i)},[i]);return v.createElement(SV,{styles:EV(a,!t,i,n?"":"!important")})},dm=!1;if(typeof window<"u")try{var au=Object.defineProperty({},"passive",{get:function(){return dm=!0,!0}});window.addEventListener("test",au,au),window.removeEventListener("test",au,au)}catch{dm=!1}var ii=dm?{passive:!1}:!1,RV=function(e){return e.tagName==="TEXTAREA"},ZC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!RV(e)&&n[t]==="visible")},PV=function(e){return ZC(e,"overflowY")},TV=function(e){return ZC(e,"overflowX")},Vb=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=e_(e,r);if(i){var a=t_(e,r),l=a[1],u=a[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},NV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},e_=function(e,t){return e==="v"?PV(t):TV(t)},t_=function(e,t){return e==="v"?kV(t):NV(t)},AV=function(e,t){return e==="h"&&t==="rtl"?-1:1},jV=function(e,t,n,r,i){var a=AV(e,window.getComputedStyle(t).direction),l=a*r,u=n.target,d=t.contains(u),h=!1,m=l>0,g=0,x=0;do{if(!u)break;var S=t_(e,u),_=S[0],b=S[1],C=S[2],E=b-C-a*_;(_||E)&&e_(e,u)&&(g+=E,x+=_);var P=u.parentNode;u=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(g)<1||!m&&Math.abs(x)<1)&&(h=!0),h},lu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ub=function(e){return[e.deltaX,e.deltaY]},zb=function(e){return e&&"current"in e?e.current:e},OV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},MV=function(e){return` 342 .block-interactivity-`.concat(e,` {pointer-events: none;} 343 .allow-interactivity-`).concat(e,` {pointer-events: all;} 344`)},DV=0,ai=[];function LV(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(DV++)[0],a=v.useState(JC)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=rV([e.lockRef.current],(e.shards||[]).map(zb),!0).filter(Boolean);return b.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(b,C){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var E=lu(b),P=n.current,T="deltaX"in b?b.deltaX:P[0]-E[0],k="deltaY"in b?b.deltaY:P[1]-E[1],N,D=b.target,B=Math.abs(T)>Math.abs(k)?"h":"v";if("touches"in b&&B==="h"&&D.type==="range")return!1;var O=window.getSelection(),G=O&&O.anchorNode,J=G?G===D||G.contains(D):!1;if(J)return!1;var se=Vb(B,D);if(!se)return!0;if(se?N=B:(N=B==="v"?"h":"v",se=Vb(B,D)),!se)return!1;if(!r.current&&"changedTouches"in b&&(T||k)&&(r.current=N),!N)return!0;var ue=r.current||N;return jV(ue,C,b,ue==="h"?T:k)},[]),d=v.useCallback(function(b){var C=b;if(!(!ai.length||ai[ai.length-1]!==a)){var E="deltaY"in C?Ub(C):lu(C),P=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&OV(N.delta,E)})[0];if(P&&P.should){C.cancelable&&C.preventDefault();return}
vendor: 9,441 bytes, lines 344-348
344if(!P){var T=(l.current.shards||[]).map(zb).filter(Boolean).filter(function(N){return N.contains(C.target)}),k=T.length>0?u(C,T[0]):!l.current.noIsolation;k&&C.cancelable&&C.preventDefault()}}},[]),h=v.useCallback(function(b,C,E,P){var T={name:b,delta:C,target:E,should:P,shadowParent:IV(E)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(k){return k!==T})},1)},[]),m=v.useCallback(function(b){n.current=lu(b),r.current=void 0},[]),g=v.useCallback(function(b){h(b.type,Ub(b),b.target,u(b,e.lockRef.current))},[]),x=v.useCallback(function(b){h(b.type,lu(b),b.target,u(b,e.lockRef.current))},[]);v.useEffect(function(){return ai.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:x}),document.addEventListener("wheel",d,ii),document.addEventListener("touchmove",d,ii),document.addEventListener("touchstart",m,ii),function(){ai=ai.filter(function(b){return b!==a}),document.removeEventListener("wheel",d,ii),document.removeEventListener("touchmove",d,ii),document.removeEventListener("touchstart",m,ii)}},[]);var S=e.removeScrollBar,_=e.inert;return v.createElement(v.Fragment,null,_?v.createElement(a,{styles:MV(i)}):null,S?v.createElement(_V,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function IV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FV=fV(XC,LV);var wd=v.forwardRef(function(e,t){return v.createElement(xd,ar({},e,{ref:t,sideCar:FV}))});wd.classNames=xd.classNames;var BV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},li=new WeakMap,cu=new WeakMap,uu={},up=0,n_=function(e){return e&&(e.host||n_(e.parentNode))},$V=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=n_(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})},VV=function(e,t,n,r){var i=$V(t,Array.isArray(e)?e:[e]);uu[n]||(uu[n]=new WeakMap);var a=uu[n],l=[],u=new Set,d=new Set(i),h=function(g){!g||u.has(g)||(u.add(g),h(g.parentNode))};i.forEach(h);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(x){if(u.has(x))m(x);else try{var S=x.getAttribute(r),_=S!==null&&S!=="false",b=(li.get(x)||0)+1,C=(a.get(x)||0)+1;li.set(x,b),a.set(x,C),l.push(x),b===1&&_&&cu.set(x,!0),C===1&&x.setAttribute(n,"true"),_||x.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return m(t),u.clear(),up++,function(){l.forEach(function(g){var x=li.get(g)-1,S=a.get(g)-1;li.set(g,x),a.set(g,S),x||(cu.has(g)||g.removeAttribute(r),cu.delete(g)),S||g.removeAttribute(n)}),up--,up||(li=new WeakMap,li=new WeakMap,cu=new WeakMap,uu={})}},kg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=BV(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),VV(r,i,n,"aria-hidden")):function(){return null}};function UV(e){const t=zV(e),n=v.forwardRef((r,i)=>{const{children:a,...l}=r,u=v.Children.toArray(a),d=u.find(HV);if(d){const h=d.props.children,m=u.map(g=>g===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return p.jsx(t,{...l,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return p.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function zV(e){const t=v.forwardRef((n,r)=>{const{children:i,...a}=n;if(v.isValidElement(i)){const l=KV(i),u=qV(a,i.props);return i.type!==v.Fragment&&(u.ref=r?Lr(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WV=Symbol("radix.slottable");function HV(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WV}function qV(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const d=a(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function KV(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bd="Dialog",[r_,s_]=As(bd),[GV,Yn]=r_(bd),o_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,u=v.useRef(null),d=v.useRef(null),[h,m]=ml({prop:r,defaultProp:i??!1,onChange:a,caller:bd});return p.jsx(GV,{scope:t,triggerRef:u,contentRef:d,contentId:jr(),titleId:jr(),descriptionId:jr(),open:h,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(g=>!g),[m]),modal:l,children:n})};o_.displayName=bd;var i_="DialogTrigger",a_=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yn(i_,n),a=Ye(t,i.triggerRef);return p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jg(i.open),...r,ref:a,onClick:_e(e.onClick,i.onOpenToggle)})});a_.displayName=i_;var Ng="DialogPortal",[QV,l_]=r_(Ng,{forceMount:void 0}),c_=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Yn(Ng,t);return p.jsx(QV,{scope:t,forceMount:n,children:v.Children.map(r,l=>p.jsx(js,{present:n||a.open,children:p.jsx(vd,{asChild:!0,container:i,children:l})}))})};c_.displayName=Ng;var Hu="DialogOverlay",u_=v.forwardRef((e,t)=>{const n=l_(Hu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Yn(Hu,e.__scopeDialog);return a.modal?p.jsx(js,{present:r||a.open,children:p.jsx(XV,{...i,ref:t})}):null});u_.displayName=Hu;var YV=UV("DialogOverlay.RemoveScroll"),XV=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yn(Hu,n);return p.jsx(wd,{as:YV,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(We.div,{"data-state":jg(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Co="DialogContent",d_=v.forwardRef((e,t)=>{const n=l_(Co,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Yn(Co,e.__scopeDialog);return p.jsx(js,{present:r||a.open,children:a.modal?p.jsx(JV,{...i,ref:t}):p.jsx(ZV,{...i,ref:t})})});d_.displayName=Co;var JV=v.forwardRef((e,t)=>{const n=Yn(Co,e.__scopeDialog),r=v.useRef(null),i=Ye(t,n.contentRef,r);return v.useEffect(()=>{const a=r.current;if(a)return kg(a)},[]),p.jsx(f_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_e(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:_e(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:_e(e.onFocusOutside,a=>a.preventDefault())})}),ZV=v.forwardRef((e,t)=>{const n=Yn(Co,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return p.jsx(f_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=a.target;((h=n.triggerRef.current)==null?void 0:h.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),f_=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=e,u=Yn(Co,n),d=v.useRef(null),h=Ye(t,d);return Tg(),p.jsxs(p.Fragment,{children:[p.jsx(yd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(gd,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":jg(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(tU,{titleId:u.titleId}),p.jsx(rU,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Ag="DialogTitle",h_=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yn(Ag,n);return p.jsx(We.h2,{id:i.titleId,...r,ref:t})});h_.displayName=Ag;var p_="DialogDescription",m_=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yn(p_,n);return p.jsx(We.p,{id:i.descriptionId,...r,ref:t})});m_.displayName=p_;var g_="DialogClose",y_=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Yn(g_,n);return p.jsx(We.button,{type:"button",...r,ref:t,onClick:_e(e.onClick,()=>i.onOpenChange(!1))})});y_.displayName=g_;function jg(e){return e?"open":"closed"}var v_="DialogTitleWarning",[eU,x_]=C$(v_,{contentName:Co,titleName:Ag,docsSlug:"dialog"}),tU=({titleId:e})=>{const t=x_(v_),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 345 346If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 347 348For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nU="DialogDescriptionWarning",rU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${x_(nU).contentName}}.`;return v.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null}
348,w_=o_,b_=a_,S_=c_,Og=u_,Mg=d_,Dg=h_,Lg=m_,Ig=y_;const sU=w_,oU=b_,iU=S_,E_=v.forwardRef(({className:e,...t},n)=>p.jsx(Og,{ref:n,className:Te("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}));E_.displayName=Og.displayName;const C_=v.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(iU,{children:[p.jsx(E_,{}),p.jsxs(Mg,{ref:r,className:Te("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,p.jsxs(Ig,{className:"absolute right-4 top-4 roun
348ded-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:[p.jsx(MS,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));C_.displayName=Mg.displayName;const __=({className:e,...t})=>p.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});__.displayName="DialogHeader";const R_=({className:e,...t})=>p.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});R_.displayName="DialogFooter";const P_=v.forwardRef(({className:e,...t},n)=>p.jsx(Dg,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));P_.displayName=Dg.displayName;const aU=v.forwardRef(({className:e,...t},n)=>p.jsx(Lg,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));aU.displayName=Lg.displayName;var lU=Symbol.for("react.lazy"),qu=nd[" use ".trim().toString()];function cU(e){return typeof e=="object"&&e!==null&&"then"in e}function T_(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===lU&&"_payload"in e&&cU(e._payload)}function Fg(e){const t=dU(e),n=v.forwardRef((r,i)=>{let{children:a,...l}=r;T_(a)&&typeof qu=="function"&&(a=qu(a._payload));const u=v.Children.toArray(a),d=u.find(hU);if(d){const h=d.props.children,m=u.map(g=>g===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return p.jsx(t,{...l,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return p.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var uU=Fg("Slot");function dU(e){const t=v.forwardRef((n,r)=>{let{children:i,...a}=n;if(T_(i)&&typeof qu=="function"&&(i=qu(i._payload)),v.isValidElement(i)){const l=mU(i),u=pU(a,i.props);return i.type!==v.Fragment&&(u.ref=r?Lr(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fU=Symbol("radix.slottable");function hU(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fU}function pU(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const d=a(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function mU(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Bg=rd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),wt=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const l=r?uU:"button";return p.jsx(l,{className:Te(Bg({variant:t,size:n,className:e})),ref:a,...i})});wt.displayName="Button";const hn=v.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:Te("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));hn.displayName="Input";var gU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yU=gU.reduce((e,t)=>
vendor: 3,269 bytes, line 348
348{const n=Fg(`Primitive.${t}`),r=v.forwardRef((i,a)=>{const{asChild:l,...u}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vU="Label",k_=v.forwardRef((e,t)=>p.jsx(yU.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));k_.displayName=vU;var N_=k_;const xU=rd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ut=v.forwardRef(({className:e,...t},n)=>p.jsx(N_,{ref:n,className:Te(xU(),e),...t}));Ut.displayName=N_.displayName;function Wb(e,[t,n]){return Math.min(n,Math.max(t,e))}function Hb(e){const t=wU(e),n=v.forwardRef((r,i)=>{const{children:a,...l}=r,u=v.Children.toArray(a),d=u.find(SU);if(d){const h=d.props.children,m=u.map(g=>g===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return p.jsx(t,{...l,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return p.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function wU(e){const t=v.forwardRef((n,r)=>{const{children:i,...a}=n;if(v.isValidElement(i)){const l=CU(i),u=EU(a,i.props);return i.type!==v.Fragment&&(u.ref=r?Lr(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bU=Symbol("radix.slottable");function SU(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bU}function EU(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const d=a(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function CU(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $g(e){const t=e+"CollectionProvider",[n,r]=As(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=b=>{const{scope:C,children:E}=b,P=os.useRef(null),T=os.useRef(new Map).current;return p.jsx(i,{scope:C,itemMap:T,collectionRef:P,children:E})};l.displayName=t;const u=e+"CollectionSlot",d=Hb(u),h=os.forwardRef((b,C)=>{const{scope:E,children:P}=b,T=a(u,E),k=Ye(C,T.collectionRef);return p.jsx(d,{ref:k,children:P})});h.displayName=u;const m=e+"CollectionItemSlot",g="data-radix-collection-item",x=Hb(m),S=os.forwardRef((b,C)=>{const{scope:E,children:P,...T}=b,k=os.useRef(null),N=Ye(C,k),D=a(m,E);return os.useEffect(()=>(D.itemMap.set(k,{ref:k,...T}),()=>void D.itemMap.delete(k))),p.jsx(x,{[g]:"",ref:N,children:P})});S.displayName=m;function _(b){const C=a(e+"CollectionConsumer",b);return os.useCallback(()=>{const P=C.collectionRef.current;if(!P)return[];const T=Array.from(P.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((D,B)=>T.indexOf(D.ref.current)-T.indexOf(B.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:h,ItemSlot:S}
vendor: 10,745 bytes, line 348
348,_,r]}var _U=v.createContext(void 0);function Vg(e){const t=v.useContext(_U);return e||t||"ltr"}const RU=["top","right","bottom","left"],_s=Math.min,dn=Math.max,Ku=Math.round,du=Math.floor,fr=e=>({x:e,y:e}),PU={left:"right",right:"left",bottom:"top",top:"bottom"},TU={start:"end",end:"start"};function fm(e,t,n){return dn(e,_s(t,n))}function Mr(e,t){return typeof e=="function"?e(t):e}function Dr(e){return e.split("-")[0]}function qi(e){return e.split("-")[1]}function Ug(e){return e==="x"?"y":"x"}function zg(e){return e==="y"?"height":"width"}const kU=new Set(["top","bottom"]);function lr(e){return kU.has(Dr(e))?"y":"x"}function Wg(e){return Ug(lr(e))}function NU(e,t,n){n===void 0&&(n=!1);const r=qi(e),i=Wg(e),a=zg(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Gu(l)),[l,Gu(l)]}function AU(e){const t=Gu(e);return[hm(e),t,hm(t)]}function hm(e){return e.replace(/start|end/g,t=>TU[t])}const qb=["left","right"],Kb=["right","left"],jU=["top","bottom"],OU=["bottom","top"];function MU(e,t,n){switch(e){case"top":case"bottom":return n?t?Kb:qb:t?qb:Kb;case"left":case"right":return t?jU:OU;default:return[]}}function DU(e,t,n,r){const i=qi(e);let a=MU(Dr(e),n==="start",r);return i&&(a=a.map(l=>l+"-"+i),t&&(a=a.concat(a.map(hm)))),a}function Gu(e){return e.replace(/left|right|bottom|top/g,t=>PU[t])}function LU(e){return{top:0,right:0,bottom:0,left:0,...e}}function A_(e){return typeof e!="number"?LU(e):{top:e,right:e,bottom:e,left:e}}function Qu(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Gb(e,t,n){let{reference:r,floating:i}=e;const a=lr(t),l=Wg(t),u=zg(l),d=Dr(t),h=a==="y",m=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,x=r[u]/2-i[u]/2;let S;switch(d){case"top":S={x:m,y:r.y-i.height};break;case"bottom":S={x:m,y:r.y+r.height};break;case"right":S={x:r.x+r.width,y:g};break;case"left":S={x:r.x-i.width,y:g};break;default:S={x:r.x,y:r.y}}switch(qi(t)){case"start":S[l]-=x*(n&&h?-1:1);break;case"end":S[l]+=x*(n&&h?-1:1);break}return S}async function IU(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:l,elements:u,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:x=!1,padding:S=0}=Mr(t,e),_=A_(S),C=u[x?g==="floating"?"reference":"floating":g],E=Qu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(C)))==null||n?C:C.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:h,rootBoundary:m,strategy:d})),P=g==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),k=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},N=Qu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:P,offsetParent:T,strategy:d}):P);return{top:(E.top-N.top+_.top)/k.y,bottom:(N.bottom-E.bottom+_.bottom)/k.y,left:(E.left-N.left+_.left)/k.x,right:(N.right-E.right+_.right)/k.x}}const FU=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:g}=Gb(h,r,d),x=r,S={},_=0;for(let C=0;C<u.length;C++){var b;const{name:E,fn:P}=u[C],{x:T,y:k,data:N,reset:D}=await P({x:m,y:g,initialPlacement:r,placement:x,strategy:i,middlewareData:S,rects:h,platform:{...l,detectOverflow:(b=l.detectOverflow)!=null?b:IU},elements:{reference:e,floating:t}});m=T??m,g=k??g,S={...S,[E]:{...S[E],...N}},D&&_<=50&&(_++,typeof D=="object"&&(D.placement&&(x=D.placement),D.rects&&(h=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:m,y:g}=Gb(h,x,d)),C=-1)}return{x:m,y:g,placement:x,strategy:i,middlewareData:S}},BU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:l,elements:u,middlewareData:d}=t,{element:h,padding:m=0}=Mr(e,t)||{};if(h==null)return{};const g=A_(m),x={x:n,y:r},S=Wg(i),_=zg(S),b=await l.getDimensions(h),C=S==="y",E=C?"top":"left",P=C?"bottom":"right",T=C?"clientHeight":"clientWidth",k=a.reference[_]+a.reference[S]-x[S]-a.floating[_],N=x[S]-a.reference[S],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let B=D?D[T]:0;(!B||!await(l.isElement==null?void 0:l.isElement(D)))&&(B=u.floating[T]||a.floating[_]);const O=k/2-N/2,G=B/2-b[_]/2-1,J=_s(g[E],G),se=_s(g[P],G),ue=J,ae=B-b[_]-se,W=B/2-b[_]/2+O,te=fm(ue,W,ae),Y=!d.arrow&&qi(i)!=null&&W!==te&&a.reference[_]/2-(W<ue?J:se)-b[_]/2<0,ee=Y?W<ue?W-ue:W-ae:0;return{[S]:x[S]+ee,data:{[S]:te,centerOffset:W-te-ee,...Y&&{alignmentOffset:ee}},reset:Y}}}),$U=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:l,initialPlacement:u,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:b=!0,...C}=Mr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=Dr(i),P=lr(u),T=Dr(u)===u,k=await(d.isRTL==null?void 0:d.isRTL(h.floating)),N=x||(T||!b?[Gu(u)]:AU(u)),D=_!=="none";!x&&D&&N.push(...DU(u,b,_,k));const B=[u,...N],O=await d.detectOverflow(t,C),G=[];let J=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&G.push(O[E]),g){const W=NU(i,l,k);G.push(O[W[0]],O[W[1]])}if(J=[...J,{placement:i,overflows:G}],!G.every(W=>W<=0)){var se,ue;const W=(((se=a.flip)==null?void 0:se.index)||0)+1,te=B[W];if(te&&(!(g==="alignment"?P!==lr(te):!1)||J.every(V=>lr(V.placement)===P?V.overflows[0]>0:!0)))return{data:{index:W,overflows:J},reset:{placement:te}};let Y=(ue=J.filter(ee=>ee.overflows[0]<=0).sort((ee,V)=>ee.overflows[1]-V.overflows[1])[0])==null?void 0:ue.placement;if(!Y)switch(S){case"bestFit":{var ae;const ee=(ae=J.filter(V=>{if(D){const H=lr(V.placement);return H===P||H==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(H=>H>0).reduce((H,$)=>H+$,0)]).sort((V,H)=>V[1]-H[1])[0])==null?void 0:ae[0];ee&&(Y=ee);break}case"initialPlacement":Y=u;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function Qb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yb(e){return RU.some(t=>e[t]>=0)}const VU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=Mr(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),u=Qb(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Yb(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),u=Qb(l,n.floating);return{data:{escapedOffsets:u,escaped:Yb(u)}}}default:return{}}}}},j_=new Set(["left","top"]);async function UU(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=Dr(n),u=qi(n),d=lr(n)==="y",h=j_.has(l)?-1:1,m=a&&d?-1:1,g=Mr(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof _=="number"&&(S=u==="end"?_*-1:_),d?{x:S*m,y:x*h}:{x:x*h,y:S*m}}const zU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:l,middlewareData:u}=t,d=await UU(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:a+d.y,data:{...d,placement:l}}}}},WU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:E=>{let{x:P,y:T}=E;return{x:P,y:T}}},...h}=Mr(e,t),m={x:n,y:r},g=await a.detectOverflow(t,h),x=lr(Dr(i)),S=Ug(x);let _=m[S],b=m[x];if(l){const E=S==="y"?"top":"left",P=S==="y"?"bottom":"right",T=_+g[E],k=_-g[P];_=fm(T,_,k)}if(u){const E=x==="y"?"top":"left",P=x==="y"?"bottom":"right",T=b+g[E],k=b-g[P];b=fm(T,b,k)}const C=d.fn({...t,[S]:_,[x]:b});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[S]:l,[x]:u}}}}}},HU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=Mr(e,t),m={x:n,y:r},g=lr(i),x=Ug(g);let S=m[x],_=m[g];const b=Mr(u,t),C=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const T=x==="y"?"height":"width",k=a.reference[x]-a.floating[T]+C.mainAxis,N=a.reference[x]+a.reference[T]-C.mainAxis;S<k?S=k:S>N&&(S=N)}if(h){var E,P;const T=x==="y"?"width":"height",k=j_.has(Dr(i)),N=a.reference[g]-a.floating[T]+(k&&((E=l.offset)==null?void 0:E[g])||0)+(k?0:C.crossAxis),D=a.reference[g]+a.reference[T]+(k?0:((P=l.offset)==null?void 0:P[g])||0)-(k?C.crossAxis:0);_<N?_=N:_>D&&(_=D)}return{[x]:S,[g]:_}}}},qU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:l,elements:u}=t,{apply:d=()=>{},...h}=Mr(e,t),m=await l.detectOverflow(t,h),g=Dr(i),x=qi(i),S=lr(i)==="y",{width:_,height:b}=a.floating;let C,E;g==="top"||g==="bottom"?(C=g,E=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(E=g,C=x==="end"?"top":"bottom");const P=b-m.top-m.bottom,T=_-m.left-m.right,k=_s(b-m[C],P),N=_s(_-m[E],T),D=!t.middlewareData.shift;let B=k,O=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(B=P),D&&!x){const J=dn(m.left,0),se=dn(m.right,0),ue=dn(m.top,0),ae=dn(m.bottom,0);S?O=_-2*(J!==0||se!==0?J+se:dn(m.left,m.right)):B=b-2*(ue!==0||ae!==0?ue+ae:dn(m.top,m.bottom))}await d({...t,availableWidth:O,availableHeight:B});const G=await l.getDimensions(u.floating);return _!==G.width||b!==G.height?{reset:{rects:!0}}:{}}}};function Sd(){return typeof window<"u"}function Ki(e){return O_(e)?(e.nodeName||"").toLowerCase():"#document"}function pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mr(e){var t;return(t=(O_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function O_(e){return Sd()?e instanceof Node||e instanceof pn(e).Node:!1}function Gn(e){return Sd()?e instanceof Element||e instanceof pn(e).Element:!1}function pr(e){return Sd()?e instanceof HTMLElement||e instanceof pn(e).HTMLElement:!1}function Xb(e){return!Sd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pn(e).ShadowRoot}const KU=new Set(["inline","contents"]);function Ll(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qn(e);
vendor: 35,517 bytes, line 348
348return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!KU.has(i)}const GU=new Set(["table","td","th"]);function QU(e){return GU.has(Ki(e))}const YU=[":popover-open",":modal"];function Ed(e){return YU.some(t=>{try{return e.matches(t)}catch{return!1}})}const XU=["transform","translate","scale","rotate","perspective"],JU=["transform","translate","scale","rotate","perspective","filter"],ZU=["paint","layout","strict","content"];function Hg(e){const t=qg(),n=Gn(e)?Qn(e):e;return XU.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||JU.some(r=>(n.willChange||"").includes(r))||ZU.some(r=>(n.contain||"").includes(r))}function e5(e){let t=Rs(e);for(;pr(t)&&!Bi(t);){if(Hg(t))return t;if(Ed(t))return null;t=Rs(t)}return null}function qg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const t5=new Set(["html","body","#document"]);function Bi(e){return t5.has(Ki(e))}function Qn(e){return pn(e).getComputedStyle(e)}function Cd(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rs(e){if(Ki(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xb(e)&&e.host||mr(e);return Xb(t)?t.host:t}function M_(e){const t=Rs(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:pr(t)&&Ll(t)?t:M_(t)}function gl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=M_(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),l=pn(i);if(a){const u=pm(l);return t.concat(l,l.visualViewport||[],Ll(i)?i:[],u&&n?gl(u):[])}return t.concat(i,gl(i,[],n))}function pm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function D_(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pr(e),a=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=Ku(n)!==a||Ku(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function Kg(e){return Gn(e)?e:e.contextElement}function yi(e){const t=Kg(e);if(!pr(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=D_(t);let l=(a?Ku(n.width):n.width)/r,u=(a?Ku(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const n5=fr(0);function L_(e){const t=pn(e);return!qg()||!t.visualViewport?n5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function r5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pn(e)?!1:t}function _o(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Kg(e);let l=fr(1);t&&(r?Gn(r)&&(l=yi(r)):l=yi(e));const u=r5(a,n,r)?L_(a):fr(0);let d=(i.left+u.x)/l.x,h=(i.top+u.y)/l.y,m=i.width/l.x,g=i.height/l.y;if(a){const x=pn(a),S=r&&Gn(r)?pn(r):r;let _=x,b=pm(_);for(;b&&r&&S!==_;){const C=yi(b),E=b.getBoundingClientRect(),P=Qn(b),T=E.left+(b.clientLeft+parseFloat(P.paddingLeft))*C.x,k=E.top+(b.clientTop+parseFloat(P.paddingTop))*C.y;d*=C.x,h*=C.y,m*=C.x,g*=C.y,d+=T,h+=k,_=pn(b),b=pm(_)}}return Qu({width:m,height:g,x:d,y:h})}function _d(e,t){const n=Cd(e).scrollLeft;return t?t.left+n:_o(mr(e)).left+n}function I_(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-_d(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function s5(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",l=mr(r),u=t?Ed(t.floating):!1;if(r===l||u&&a)return n;let d={scrollLeft:0,scrollTop:0},h=fr(1);const m=fr(0),g=pr(r);if((g||!g&&!a)&&((Ki(r)!=="body"||Ll(l))&&(d=Cd(r)),pr(r))){const S=_o(r);h=yi(r),m.x=S.x+r.clientLeft,m.y=S.y+r.clientTop}const x=l&&!g&&!a?I_(l,d):fr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+x.x,y:n.y*h.y-d.scrollTop*h.y+m.y+x.y}}function o5(e){return Array.from(e.getClientRects())}function i5(e){const t=mr(e),n=Cd(e),r=e.ownerDocument.body,i=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+_d(e);const u=-n.scrollTop;return Qn(r).direction==="rtl"&&(l+=dn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:l,y:u}}const Jb=25;function a5(e,t){const n=pn(e),r=mr(e),i=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,d=0;if(i){a=i.width,l=i.height;const m=qg();(!m||m&&t==="fixed")&&(u=i.offsetLeft,d=i.offsetTop)}const h=_d(r);if(h<=0){const m=r.ownerDocument,g=m.body,x=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-S);_<=Jb&&(a-=_)}else h<=Jb&&(a+=h);return{width:a,height:l,x:u,y:d}}const l5=new Set(["absolute","fixed"]);function c5(e,t){const n=_o(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pr(e)?yi(e):fr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,d=i*a.x,h=r*a.y;return{width:l,height:u,x:d,y:h}}function Zb(e,t,n){let r;if(t==="viewport")r=a5(e,n);else if(t==="document")r=i5(mr(e));else if(Gn(t))r=c5(t,n);else{const i=L_(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Qu(r)}function F_(e,t){const n=Rs(e);return n===t||!Gn(n)||Bi(n)?!1:Qn(n).position==="fixed"||F_(n,t)}function u5(e,t){const n=t.get(e);if(n)return n;let r=gl(e,[],!1).filter(u=>Gn(u)&&Ki(u)!=="body"),i=null;const a=Qn(e).position==="fixed";let l=a?Rs(e):e;for(;Gn(l)&&!Bi(l);){const u=Qn(l),d=Hg(l);!d&&u.position==="fixed"&&(i=null),(a?!d&&!i:!d&&u.position==="static"&&!!i&&l5.has(i.position)||Ll(l)&&!d&&F_(e,l))?r=r.filter(m=>m!==l):i=u,l=Rs(l)}return t.set(e,r),r}function d5(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Ed(t)?[]:u5(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((h,m)=>{const g=Zb(t,m,i);return h.top=dn(g.top,h.top),h.right=_s(g.right,h.right),h.bottom=_s(g.bottom,h.bottom),h.left=dn(g.left,h.left),h},Zb(t,u,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function f5(e){const{width:t,height:n}=D_(e);return{width:t,height:n}}function h5(e,t,n){const r=pr(t),i=mr(t),a=n==="fixed",l=_o(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const d=fr(0);function h(){d.x=_d(i)}if(r||!r&&!a)if((Ki(t)!=="body"||Ll(i))&&(u=Cd(t)),r){const S=_o(t,!0,a,t);d.x=S.x+t.clientLeft,d.y=S.y+t.clientTop}else i&&h();a&&!r&&i&&h();const m=i&&!r&&!a?I_(i,u):fr(0),g=l.left+u.scrollLeft-d.x-m.x,x=l.top+u.scrollTop-d.y-m.y;return{x:g,y:x,width:l.width,height:l.height}}function dp(e){return Qn(e).position==="static"}function eS(e,t){if(!pr(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mr(e)===n&&(n=n.ownerDocument.body),n}function B_(e,t){const n=pn(e);if(Ed(e))return n;if(!pr(e)){let i=Rs(e);for(;i&&!Bi(i);){if(Gn(i)&&!dp(i))return i;i=Rs(i)}return n}let r=eS(e,t);for(;r&&QU(r)&&dp(r);)r=eS(r,t);return r&&Bi(r)&&dp(r)&&!Hg(r)?n:r||e5(e)||n}const p5=async function(e){const t=this.getOffsetParent||B_,n=this.getDimensions,r=await n(e.floating);return{reference:h5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function m5(e){return Qn(e).direction==="rtl"}const g5={convertOffsetParentRelativeRectToViewportRelativeRect:s5,getDocumentElement:mr,getClippingRect:d5,getOffsetParent:B_,getElementRects:p5,getClientRects:o5,getDimensions:f5,getScale:yi,isElement:Gn,isRTL:m5};function $_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function y5(e,t){let n=null,r;const i=mr(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:m,top:g,width:x,height:S}=h;if(u||t(),!x||!S)return;const _=du(g),b=du(i.clientWidth-(m+x)),C=du(i.clientHeight-(g+S)),E=du(m),T={rootMargin:-_+"px "+-b+"px "+-C+"px "+-E+"px",threshold:dn(0,_s(1,d))||1};let k=!0;function N(D){const B=D[0].intersectionRatio;if(B!==d){if(!k)return l();B?l(!1,B):r=setTimeout(()=>{l(!1,1e-7)},1e3)}B===1&&!$_(h,e.getBoundingClientRect())&&l(),k=!1}try{n=new IntersectionObserver(N,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,T)}n.observe(e)}return l(!0),a}function v5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Kg(e),m=i||a?[...h?gl(h):[],...gl(t)]:[];m.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const g=h&&u?y5(h,n):null;let x=-1,S=null;l&&(S=new ResizeObserver(E=>{let[P]=E;P&&P.target===h&&S&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var T;(T=S)==null||T.observe(t)})),n()}),h&&!d&&S.observe(h),S.observe(t));let _,b=d?_o(e):null;d&&C();function C(){const E=_o(e);b&&!$_(b,E)&&n(),b=E,_=requestAnimationFrame(C)}return n(),()=>{var E;m.forEach(P=>{i&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),g==null||g(),(E=S)==null||E.disconnect(),S=null,d&&cancelAnimationFrame(_)}}const x5=zU,w5=WU,b5=$U,S5=qU,E5=VU,tS=BU,C5=HU,_5=(e,t,n)=>{const r=new Map,i={platform:g5,...n},a={...i.platform,_c:r};return FU(e,t,{...i,platform:a})};var R5=typeof document<"u",P5=function(){},Ru=R5?v.useLayoutEffect:P5;function Yu(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,i;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(!Yu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Yu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function V_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nS(e,t){const n=V_(e);return Math.round(t*n)/n}function fp(e){const t=v.useRef(e);return Ru(()=>{t.current=e}),t}function T5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[m,g]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=v.useState(r);Yu(x,r)||S(r);const[_,b]=v.useState(null),[C,E]=v.useState(null),P=v.useCallback(V=>{V!==D.current&&(D.current=V,b(V))},[]),T=v.useCallback(V=>{V!==B.current&&(B.current=V,E(V))},[]),k=a||_,N=l||C,D=v.useRef(null),B=v.useRef(null),O=v.useRef(m),G=d!=null,J=fp(d),se=fp(i),ue=fp(h),ae=v.useCallback(()=>{if(!D.current||!B.current)return;const V={placement:t,strategy:n,middleware:x};se.current&&(V.platform=se.current),_5(D.current,B.current,V).then(H=>{const $={...H,isPositioned:ue.current!==!1};W.current&&!Yu(O.current,$)&&(O.current=$,_l.flushSync(()=>{g($)}))})},[x,t,n,se,ue]);Ru(()=>{h===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,g(V=>({...V,isPositioned:!1})))},[h]);const W=v.useRef(!1);Ru(()=>(W.current=!0,()=>{W.current=!1}),[]),Ru(()=>{if(k&&(D.current=k),N&&(B.current=N),k&&N){if(J.current)return J.current(k,N,ae);ae()}},[k,N,ae,J,G]);const te=v.useMemo(()=>({reference:D,floating:B,setReference:P,setFloating:T}),[P,T]),Y=v.useMemo(()=>({reference:k,floating:N}),[k,N]),ee=v.useMemo(()=>{const V={position:n,left:0,top:0};if(!Y.floating)return V;const H=nS(Y.floating,m.x),$=nS(Y.floating,m.y);return u?{...V,transform:"translate("+H+"px, "+$+"px)",...V_(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:$}},[n,u,Y.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:ae,refs:te,elements:Y,floatingStyles:ee}),[m,ae,te,Y,ee])}const k5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tS({element:r.current,padding:i}).fn(n):{}:r?tS({element:r,padding:i}).fn(n):{}}}},N5=(e,t)=>({...x5(e),options:[e,t]}),A5=(e,t)=>({...w5(e),options:[e,t]}),j5=(e,t)=>({...C5(e),options:[e,t]}),O5=(e,t)=>({...b5(e),options:[e,t]}),M5=(e,t)=>({...S5(e),options:[e,t]}),D5=(e,t)=>({...E5(e),options:[e,t]}),L5=(e,t)=>({...k5(e),options:[e,t]});var I5="Arrow",U_=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return p.jsx(We.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});U_.displayName=I5;var F5=U_;function B5(e){const[t,n]=v.useState(void 0);return Ct(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let l,u;if("borderBoxSize"in a){const d=a.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,u=h.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Gg="Popper",[z_,Rd]=As(Gg),[$5,W_]=z_(Gg),H_=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return p.jsx($5,{scope:t,anchor:r,onAnchorChange:i,children:n})};H_.displayName=Gg;var q_="PopperAnchor",K_=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=W_(q_,n),l=v.useRef(null),u=Ye(t,l),d=v.useRef(null);return v.useEffect(()=>{const h=d.current;d.current=(r==null?void 0:r.current)||l.current,h!==d.current&&a.onAnchorChange(d.current)}),r?null:p.jsx(We.div,{...i,ref:u})});K_.displayName=q_;var Qg="PopperContent",[V5,U5]=z_(Qg),G_=v.forwardRef((e,t)=>{var Z,de,fe,ke,Me,Ae;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:_,...b}=e,C=W_(Qg,n),[E,P]=v.useState(null),T=Ye(t,Xe=>P(Xe)),[k,N]=v.useState(null),D=B5(k),B=(D==null?void 0:D.width)??0,O=(D==null?void 0:D.height)??0,G=r+(a!=="center"?"-"+a:""),J=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},se=Array.isArray(h)?h:[h],ue=se.length>0,ae={padding:J,boundary:se.filter(W5),altBoundary:ue},{refs:W,floatingStyles:te,placement:Y,isPositioned:ee,middlewareData:V}=T5({strategy:"fixed",placement:G,whileElementsMounted:(...Xe)=>v5(...Xe,{animationFrame:S==="always"}),elements:{reference:C.anchor},middleware:[N5({mainAxis:i+O,alignmentAxis:l}),d&&A5({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?j5():void 0,...ae}),d&&O5({...ae}),M5({...ae,apply:({elements:Xe,rects:ge,availableWidth:Ce,availableHeight:ye})=>{const{width:Be,height:Je}=ge.reference,Le=Xe.floating.style;Le.setProperty("--radix-popper-available-width",`${Ce}px`),Le.setProperty("--radix-popper-available-height",`${ye}px`),Le.setProperty("--radix-popper-anchor-width",`${Be}px`),Le.setProperty("--radix-popper-anchor-height",`${Je}px`)}}),k&&L5({element:k,padding:u}),H5({arrowWidth:B,arrowHeight:O}),x&&D5({strategy:"referenceHidden",...ae})]}),[H,$]=X_(Y),j=Kn(_);Ct(()=>{ee&&(j==null||j())},[ee,j]);const q=(Z=V.arrow)==null?void 0:Z.x,ie=(de=V.arrow)==null?void 0:de.y,Q=((fe=V.arrow)==null?void 0:fe.centerOffset)!==0,[ce,X]=v.useState();return Ct(()=>{E&&X(window.getComputedStyle(E).zIndex)},[E]),p.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:ee?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(ke=V.transformOrigin)==null?void 0:ke.x,(Me=V.transformOrigin)==null?void 0:Me.y].join(" "),...((Ae=V.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(V5,{scope:n,placedSide:H,onArrowChange:N,arrowX:q,arrowY:ie,shouldHideArrow:Q,children:p.jsx(We.div,{"data-side":H,"data-align":$,...b,ref:T,style:{...b.style,animation:ee?void 0:"none"}})})})});G_.displayName=Qg;var Q_="PopperArrow",z5={top:"bottom",right:"left",bottom:"top",left:"right"},Y_=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=U5(Q_,r),l=z5[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(F5,{...i,ref:n,style:{...i.style,display:"block"}})})});Y_.displayName=Q_;function W5(e){return e!==null}var H5=e=>({name:"transformOrigin",options:e,fn(t){var C,E,P;const{placement:n,rects:r,middlewareData:i}=t,l=((C=i.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,m]=X_(n),g={start:"0%",center:"50%",end:"100%"}[m],x=(((E=i.arrow)==null?void 0:E.x)??0)+u/2,S=(((P=i.arrow)==null?void 0:P.y)??0)+d/2;let _="",b="";return h==="bottom"?(_=l?g:`${x}px`,b=`${-d}px`):h==="top"?(_=l?g:`${x}px`,b=`${r.floating.height+d}px`):h==="right"?(_=`${-d}px`,b=l?g:`${S}px`):h==="left"&&(_=`${r.floating.width+d}px`,b=l?g:`${S}px`),{data:{x:_,y:b}}}});function X_(e){const[t,n="center"]=e.split("-");return[t,n]}var J_=H_,Z_=K_,eR=G_,tR=Y_;function q5(e){const t=K5(e),n=v.forwardRef((r,i)=>{const{children:a,...l}=r,u=v.Children.toArray(a),d=u.find(Q5);if(d){const h=d.props.children,m=u.map(g=>g===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return p.jsx(t,{...l,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return p.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function K5(e){const t=v.forwardRef((n,r)=>{const{children:i,...a}=n;if(v.isValidElement(i)){const l=X5(i),u=Y5(a,i.props);return i.type!==v.Fragment&&(u.ref=r?Lr(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var G5=Symbol("radix.slottable");function Q5(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===G5}function Y5(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const d=a(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function X5(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function J5(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Z5="VisuallyHidden",ez=v.forwardRef((e,t)=>p.jsx(We.span,{...e,ref:t,style:{...nR,...e.style}}));ez.displayName=Z5;var tz=[" ","Enter","ArrowUp","ArrowDown"],nz=[" ","Enter"],Ro="Select",[Pd,Td,rz]=$g(Ro),[Gi]=As(Ro,[rz,Rd]),kd=Rd(),[sz,Os]=Gi(Ro),[oz,iz]=Gi(Ro),rR=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:l,defaultValue:u,onValueChange:d,dir:h,name:m,autoComplete:g,disabled:x,required:S,form:_}=e,b=kd(t),[C,E]=v.useState(null),[P,T]=v.useState(null),[k,N]=v.useState(!1),D=Vg(h),[B,O]=ml({prop:r,defaultProp:i??!1,onChange:a,caller:Ro}),[G,J]=ml({prop:l,defaultProp:u,onChange:d,caller:Ro}),se=v.useRef(null),ue=C?_||!!C.closest("form"):!0,[ae,W]=v.useState(new Set),te=Array.from(ae).map(Y=>Y.props.value).join(";");return p.jsx(J_,{...b,children:p.jsxs(sz,{required:S,scope:t,trigger:C,onTriggerChange:E,valueNode:P,onValueNodeChange:T,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:jr(),value:G,onValueChange:J,open:B,onOpenChange:O,dir:D,triggerPointerDownPosRef:se,disabled:x,children:[p.jsx(Pd.Provider,{scope:t,children:p.jsx(oz,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(Y=>{W(ee=>new Set(ee).add(Y))},[]),onNativeOptionRemove:v.useCallback(Y=>{W(ee=>{const V=new Set(ee);return V.delete(Y),V})},[]),children:n})}),ue?p.jsxs(PR,{"aria-hidden":!0,required:S,tabIndex:-1,name:m,autoComplete:g,value:G,onChange:Y=>J(Y.target.value),disabled:x,form:_,children:[G===void 0?p.jsx("option",{value:""}):null,Array.from(ae)]},te):null]})})};rR.displayName=Ro;var sR="SelectTrigger",oR=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=kd(n),l=Os(sR,n),u=l.disabled||r,d=Ye(t,l.onTriggerChange),h=Td(n),m=v.useRef("touch"),[g,x,S]=kR(b=>{const C=h().filter(T=>!T.disabled),E=C.find(T=>T.value===l.value),P=NR(C,b,E);P!==void 0&&l.onValueChange(P.value)}),_=b=>{u||(l.onOpenChange(!0),S()),b&&(l.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return p.jsx(Z_,{asChild:!0,...a,children:p.jsx(We.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":TR(l.value)?"":void 0,...i,ref:d,onClick:_e(i.onClick,b=>{b.currentTarget.focus(),m.current!=="mouse"&&_(b)}),onPointerDown:_e(i.onPointerDown,b=>{m.current=b.pointerType;const C=b.target;C.hasPointerCapture(b.pointerId)&&C.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(_(b),b.preventDefault())}),onKeyDown:_e(i.onKeyDown,b=>{const C=g.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&x(b.key),!(C&&b.key===" ")&&tz.includes(b.key)&&(_(),b.preventDefault())})})})});oR.displayName=sR;var iR="SelectValue",aR=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:l="",...u}=e,d=Os(iR,n),{onValueNodeHasChildrenChange:h}=d,m=a!==void 0,g=Ye(t,d.onValueNodeChange);return Ct(()=>{h(m)},[h,m]),p.jsx(We.span,{...u,ref:g,style:{pointerEvents:"none"},children:TR(d.value)?p.jsx(p.Fragment,{children:l}):a})});aR.displayName=iR;var az="SelectIcon",lR=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return p.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});lR.displayName=az;var lz="SelectPortal",cR=e=>p.jsx(vd,{asChild:!0,...e});cR.displayName=lz;var Po="SelectContent",uR=v.forwardRef((e,t)=>{const n=Os(Po,e.__scopeSelect),[r,i]=v.useState();if(Ct(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?_l.createPortal(p.jsx(dR,{scope:e.__scopeSelect,children:p.jsx(Pd.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),a):null}return p.jsx(fR,{...e,ref:t})});uR.displayName=Po;var Vn=10,[dR,Ms]=Gi(Po),cz="SelectContentImpl",uz=q5("SelectContent.RemoveScroll"),fR=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:m,arrowPadding:g,collisionBoundary:x,collisionPadding:S,sticky:_,hideWhenDetached:b,avoidCollisions:C,...E}=e,P=Os(Po,n),[T,k]=v.useState(null),[N,D]=v.useState(null),B=Ye(t,Z=>k(Z)),[O,G]=v.useState(null),[J,se]=v.useState(null),ue=Td(n),[ae,W]=v.useState(!1),te=v.useRef(!1);v.useEffect(()=>{if(T)return kg(T)},[T]),Tg();const Y=v.useCallback(Z=>{const[de,...fe]=ue().map(Ae=>Ae.ref.current),[ke]=fe.slice(-1),Me=document.activeElement;for(const Ae of Z)if(Ae===Me||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===de&&N&&(N.scrollTop=0),Ae===ke&&N&&(N.scrollTop=N.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Me))return},[ue,N]),ee=v.useCallback(()=>Y([O,T]),[Y,O,T]);v.useEffect(()=>{ae&&ee()},[ae,ee]);const{onOpenChange:V,triggerPointerDownPosRef:H}=P;v.useEffect(()=>{if(T){let Z={x:0,y:0};const de=ke=>{var Me,Ae;Z={x:Math.abs(Math.round(ke.pageX)-(((Me=H.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(ke.pageY)-(((Ae=H.current)==null?void 0:Ae.y)??0))}},fe=ke=>{Z.x<=10&&Z.y<=10?ke.preventDefault():T.contains(ke.target)||V(!1),document.removeEventListener("pointermove",de),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",fe,{capture:!0})}}},[T,V,H]),v.useEffect(()=>{const Z=()=>V(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[V]);const[$,j]=kR(Z=>{const de=ue().filter(Me=>!Me.disabled),fe=de.find(Me=>Me.ref.current===document.activeElement),ke=NR(de,Z,fe);ke&&setTimeout(()=>ke.ref.current.focus())}),q=v.useCallback((Z,de,fe)=>{const ke=!te.current&&!fe;(P.value!==void 0&&P.value===de||ke)&&(G(Z),ke&&(te.current=!0))},[P.value]),ie=v.useCallback(()=>T==null?void 0:T.focus(),[T]),Q=v.useCallback((Z,de,fe)=>{const ke=!te.current&&!fe;(P.value!==void 0&&P.value===de||ke)&&se(Z)},[P.value]),ce=r==="popper"?mm:hR,X=ce===mm?{side:u,sideOffset:d,align:h,alignOffset:m,arrowPadding:g,collisionBoundary:x,collisionPadding:S,sticky:_,hideWhenDetached:b,avoidCollisions:C}:{};return p.jsx(dR,{scope:n,content:T,viewport:N,onViewportChange:D,itemRefCallback:q,selectedItem:O,onItemLeave:ie,itemTextRefCallback:Q,focusSelectedItem:ee,selectedItemText:J,position:r,isPositioned:ae,searchRef:$,children:p.jsx(wd,{as:uz,allowPinchZoom:!0,children:p.jsx(yd,{asChild:!0,trapped:P.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:_e(i,Z=>{var de;(de=P.trigger)==null||de.focus({preventScroll:!0}),Z.preventDefault()}),children:p.jsx(gd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:p.jsx(ce,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:Z=>Z.preventDefault(),...E,...X,onPlaced:()=>W(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:_e(E.onKeyDown,Z=>{const de=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!de&&Z.key.length===1&&j(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let ke=ue().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const Me=Z.target,Ae=ke.indexOf(Me);ke=ke.slice(Ae+1)}setTimeout(()=>Y(ke)),Z.preventDefault()}})})})})})})});fR.displayName=cz;var dz="SelectItemAlignedPosition",hR=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=Os(Po,n),l=Ms(Po,n),[u,d]=v.useState(null),[h,m]=v.useState(null),g=Ye(t,B=>m(B)),x=Td(n),S=v.useRef(!1),_=v.useRef(!0),{viewport:b,selectedItem:C,selectedItemText:E,focusSelectedItem:P}=l,T=v.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&h&&b&&C&&E){const B=a.trigger.getBoundingClientRect(),O=h.getBoundingClientRect(),G=a.valueNode.getBoundingClientRect(),J=E.getBoundingClientRect();if(a.dir!=="rtl"){const Me=J.left-O.left,Ae=G.left-Me,Xe=B.left-Ae,ge=B.width+Xe,Ce=Math.max(ge,O.width),ye=window.innerWidth-Vn,Be=Wb(Ae,[Vn,Math.max(Vn,ye-Ce)]);u.style.minWidth=ge+"px",u.style.left=Be+"px"}else{const Me=O.right-J.right,Ae=window.innerWidth-G.right-Me,Xe=window.innerWidth-B.right-Ae,ge=B.width+Xe,Ce=Math.max(ge,O.width),ye=window.innerWidth-Vn,Be=Wb(Ae,[Vn,Math.max(Vn,ye-Ce)]);u.style.minWidth=ge+"px",u.style.right=Be+"px"}const se=x(),ue=window.innerHeight-Vn*2,ae=b.scrollHeight,W=window.getComputedStyle(h),te=parseInt(W.borderTopWidth,10),Y=parseInt(W.paddingTop,10),ee=parseInt(W.borderBottomWidth,10),V=parseInt(W.paddingBottom,10),H=te+Y+ae+V+ee,$=Math.min(C.offsetHeight*5,H),j=window.getComputedStyle(b),q=parseInt(j.paddingTop,10),ie=parseInt(j.paddingBottom,10),Q=B.top+B.height/2-Vn,ce=ue-Q,X=C.offsetHeight/2,Z=C.offsetTop+X,de=te+Y+Z,fe=H-de;if(de<=Q){const Me=se.length>0&&C===se[se.length-1].ref.current;u.style.bottom="0px";const Ae=h.clientHeight-b.offsetTop-b.offsetHeight,Xe=Math.max(ce,X+(Me?ie:0)+Ae+ee),ge=de+Xe;u.style.height=ge+"px"}else{const Me=se.length>0&&C===se[0].ref.current;u.style.top="0px";const Xe=Math.max(Q,te+b.offsetTop+(Me?q:0)+X)+fe;u.style.height=Xe+"px",b.scrollTop=de-Q+b.offsetTop}u.style.margin=`${Vn}px 0`,u.style.minHeight=$+"px",u.style.maxHeight=ue+"px",r==null||r(),requestAnimationFrame(()=>S.current=!0)}},[x,a.trigger,a.valueNode,u,h,b,C,E,a.dir,r]);Ct(()=>T(),[T]);const[k,N]=v.useState();Ct(()=>{h&&N(window.getComputedStyle(h).zIndex)},[h]);const D=v.useCallback(B=>{B&&_.current===!0&&(T(),P==null||P(),_.current=!1)},[T,P]);return p.jsx(hz,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:S,onScrollButtonChange:D,children:p.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:p.jsx(We.div,{...i,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});hR.displayName=dz;var fz="SelectPopperPosition",mm=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Vn,...a}=e,l=kd(n);return p.jsx(eR,{...l,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})});mm.displayName=fz;var[hz,Yg]=Gi(Po,{}),gm="SelectViewport",pR=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Ms(gm,n),l=Yg(gm,n),u=Ye(t,a.onViewportChange),d=v.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(Pd.Slot,{scope:n,children:p.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:_e(i.onScroll,h=>{const m=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&g){const S=Math.abs(d.current-m.scrollTop);if(S>0){const _=window.innerHeight-Vn*2,b=parseFloat(g.style.minHeight),C=parseFloat(g.style.height),E=Math.max(b,C);if(E<_){const P=E+S,T=Math.min(_,P),k=P-T;g.style.height=T+"px",g.style.bottom==="0px"&&(m.scrollTop=k>0?k:0,g.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});pR.displayName=gm;var mR="SelectGroup",[pz,mz]=Gi(mR),gz=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=jr();return p.jsx(pz,{scope:n,id:i,children:p.jsx(We.div,{role:"group","aria-labelledby":i,...r,ref:t})})});gz.displayName=mR;var gR="SelectLabel",yR=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=mz(gR,n);return p.jsx(We.div,{id:i.id,...r,ref:t})});yR.displayName=gR;var Xu="SelectItem",[yz,vR]=Gi(Xu),xR=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...l}=e,u=Os(Xu,n),d=Ms(Xu,n),h=u.value===r,[m,g]=v.useState(a??""),[x,S]=v.useState(!1),_=Ye(t,P=>{var T;return(T=d.itemRefCallback)==null?void 0:T.call(d,P,r,i)}),b=jr(),C=v.useRef("touch"),E=()=>{i||(u.onValueChange(r),u.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 p.jsx(yz,{scope:n,value:r,disabled:i,textId:b,isSelected:h,onItemTextChange:v.useCallback(P=>{g(T=>T||((P==null?void 0:P.textContent)??"").trim())},[]),children:p.jsx(Pd.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:p.jsx(We.div,{role:"option","aria-labelledby":b,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:_,onFocus:_e(l.onFocus,()=>S(!0)),onBlur:_e(l.onBlur,()=>S(!1)),onClick:_e(l.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:_e(l.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:_e(l.onPointerDown,P=>{C.current=P.pointerType}),onPointerMove:_e(l.onPointerMove,P=>{var T;C.current=P.pointerType,i?(T=d.onItemLeave)==null||T.call(d):C.current==="mouse"&&P.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(l.onPointerLeave,P=>{var T;P.currentTarget===document.activeElement&&((T=d.onItemLeave)==null||T.call(d))}),onKeyDown:_e(l.onKeyDown,P=>{var k;((k=d.searchRef)==null?void 0:k.current)!==""&&P.key===" "||(nz.includes(P.key)&&E(),P.key===" "&&P.preventDefault())})})})})});xR.displayName=Xu;var qa="SelectItemText",wR=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,l=Os(qa,n),u=Ms(qa,n),d=vR(qa,n),h=iz(qa,n),[m,g]=v.useState(null),x=Ye(t,E=>g(E),d.onItemTextChange,E=>{var P;return(P=u.itemTextRefCallback)==null?void 0:P.call(u,E,d.value,d.disabled)}),S=m==null?void 0:m.textContent,_=v.useMemo(()=>p.jsx("option",{value:d.value,disabled:d.disabled,children:S},d.value),[d.disabled,d.value,S]),{onNativeOptionAdd:b,onNativeOptionRemove:C}=h;return Ct(()=>(b(_),()=>C(_)),[b,C,_]),p.jsxs(p.Fragment,{children:[p.jsx(We.span,{id:d.textId,...a,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?_l.createPortal(a.children,l.valueNode):null]})});wR.displayName=qa;var bR="SelectItemIndicator",SR=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return vR(bR,n).isSelected?p.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});SR.displayName=bR;var ym="SelectScrollUpButton",ER=v.forwardRef((e,t)=>{const n=Ms(ym,e.__scopeSelect),r=Yg(ym,e.__scopeSelect),[i,a]=v.useState(!1),l=Ye(t,r.onScrollButtonChange);return Ct(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollTop>0;a(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?p.jsx(_R,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});ER.displayName=ym;var vm="SelectScrollDownButton",CR=v.forwardRef((e,t)=>{const n=Ms(vm,e.__scopeSelect),r=Yg(vm,e.__scopeSelect),[i,a]=v.useState(!1),l=Ye(t,r.onScrollButtonChange);return Ct(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;a(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?p.jsx(_R,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});CR.displayName=vm;var _R=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Ms("SelectScrollButton",n),l=v.useRef(null),u=Td(n),d=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>d(),[d]),Ct(()=>{var m;const h=u().find(g=>g.ref.current===document.activeElement);(m=h==null?void 0:h.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),p.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:_e(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:_e(i.onPointerMove,()=>{var h;(h=a.onItemLeave)==null||h.call(a),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:_e(i.onPointerLeave,()=>{d()})})}),vz="SelectSeparator",RR=v.forwardRef((e,t)=>
vendor: 4,290 bytes, line 348
348{const{__scopeSelect:n,...r}=e;return p.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});RR.displayName=vz;var xm="SelectArrow",xz=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=kd(n),a=Os(xm,n),l=Ms(xm,n);return a.open&&l.position==="popper"?p.jsx(tR,{...i,...r,ref:t}):null});xz.displayName=xm;var wz="SelectBubbleInput",PR=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=v.useRef(null),a=Ye(r,i),l=J5(t);return v.useEffect(()=>{const u=i.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const g=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(g)}},[l,t]),p.jsx(We.select,{...n,style:{...nR,...n.style},ref:a,defaultValue:t})});PR.displayName=wz;function TR(e){return e===""||e===void 0}function kR(e){const t=Kn(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(l=>{const u=n.current+l;t(u),(function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),a=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function NR(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=bz(e,Math.max(a,0));i.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function bz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Sz=rR,AR=oR,Ez=aR,Cz=lR,_z=cR,jR=uR,Rz=pR,OR=yR,MR=xR,Pz=wR,Tz=SR,DR=ER,LR=CR,IR=RR;const tl=Sz,nl=Ez,vi=v.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(AR,{ref:r,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(Cz,{asChild:!0,children:p.jsx(TS,{className:"h-4 w-4 opacity-50"})})]}));vi.displayName=AR.displayName;const FR=v.forwardRef(({className:e,...t},n)=>p.jsx(DR,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(aA,{className:"h-4 w-4"})}));FR.displayName=DR.displayName;const BR=v.forwardRef(({className:e,...t},n)=>p.jsx(LR,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(TS,{className:"h-4 w-4"})}));BR.displayName=LR.displayName;const xi=v.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>p.jsx(_z,{children:p.jsxs(jR,{ref:i,className:Te("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:[p.jsx(FR,{}),p.jsx(Rz,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(BR,{})]})}));xi.displayName=jR.displayName;const kz=v.forwardRef(({className:e,...t},n)=>p.jsx(OR,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));kz.displayName=OR.displayName;const xs=v.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(MR,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Tz,{children:p.jsx(_m,{className:"h-4 w-4"})})}),p.jsx(Pz,{children:t})]}));xs.displayName=MR.displayName;const Nz=v.forwardRef(({className:e,...t},n)=>p.jsx(IR,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));
348Nz.displayName=IR.displayName;function Az({onCreated:e}){const t=sd(),[n,r]=v.useState(!1),[i,a]=v.useState(!1),[l,u]=v.useState({name:"",date:"",location:"",number_of_groups:2,assignment_mode:"random"}),d=async()=>{if(l.name.trim()){a(!0);try{const h=await De.entities.Event.create({...l,status:"setup"});r(!1),u({name:"",date:"",location:"",number_of_groups:2,assignment_mode:"random"}),e==null||e(h),t(`/events/${h.id}`)}finally{a(!1)}}};return p.jsxs(sU,{open:n,onOpenChange:r,children:[p.jsx(oU,{asChild:!0,children:p.jsxs(wt,{className:"gap-2 bg-primary text-primary-foreground hover:bg-primary/90 glow-primary",children:[p.jsx(PA,{className:"w-4 h-4"})," New Event"]})}),p.jsxs(C_,{className:"bg-card border-border text-card-foreground",children:[p.jsx(__,{children:p.jsx(P_,{className:"text-foreground text-xl",children:"Create Airsoft Event"})}),p.jsxs("div",{className:"space-y-4 py-2",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground",children:"Event Name"}),p.jsx(hn,{value:l.name,onChange:h=>u({...l,name:h.target.value}),placeholder:"e.g. Summer Skirmish 2026",className:"bg-background border-input"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground",children:"Date"}),p.jsx(hn,{type:"date",value:l.date,onChange:h=>u({...l,date:h.target.value}),className:"bg-background border-input"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground",children:"Location"}),p.jsx(hn,{value:l.location,onChange:h=>u({...l,location:h.target.value}),placeholder:"Site name",className:"bg-background border-input"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground",children:"Number of Groups"}),p.jsxs(tl,{value:String(l.number_of_groups),onValueChange:h=>u({...l,number_of_groups:Number(h)}),children:[p.jsx(vi,{className:"bg-background border-input",children:p.jsx(nl,{})}),p.jsx(xi,{children:[1,2,3,4,5,6,8].map(h=>p.jsxs(xs,{value:String(h),children:[h," Group",h>1?"s":""]},h))})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground",children:"Assignment"}),p.jsxs(tl,{value:l.assignment_mode,onValueChange:h=>u({...l,assignment_mode:h}),children:[p.jsx(vi,{className:"bg-background border-input",children:p.jsx(nl,{})}),p.jsxs(xi,{children:[p.jsx(xs,{value:"random",children:"Random"}),p.jsx(xs,{value:"manual",children:"Manual"})]})]})]})]}),l.assignment_mode==="manual"&&p.jsx("p",{className:"text-xs text-muted-foreground",children:"Players will be assigned to groups manually after they join. Random mode shuffles everyone automatically."})]}),p.jsxs(R_,{children:[p.jsx(wt,{variant:"ghost",onClick:()=>r(!1),className:"text-muted-foreground",children:"Cancel"}),p.jsx(wt,{onClick:d,disabled:i||!l.name.trim(),className:"bg-primary text-primary-foreground hover:bg-primary/90",children:i?"Creating...":"Create Event"})]})]})]})}const Wt=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Wt.displayName="Card";const jz=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));jz.displayName="CardHeader";const Oz=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("font-semibold leading-none tracking-tight",e),...t}));Oz.displayName="CardTitle";const Mz=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Mz.displayName="CardDescription";const Dz=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("p-6 pt-0",e),...t}));Dz.displayName="CardContent";const Lz=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("flex items-center p-6 pt-0",e),...t}));Lz.displayName="CardFooter";const Iz=rd("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function $R({className:e,variant:t,...n}){return p.jsx("div",{className:Te(Iz({variant:t}),e),...n})}const hp={WIN:3,DRAW:2,LOSS:1},Fz={1:15,2:10,3:8,4:7,5:6,6:5,7:4,8:3,9:2,10:1};function wi(e){return e&&Fz[e]||0}function Pu(e=0,t=0,n=0){return e*hp.WIN+t*hp.DRAW+n*hp.LOSS}function VR(e=0,t=0,n=0){return e+t+n}function Bz(e){const t=[...e];for(let n=t.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}function $z(e,t=16){let n=1;for(;n*2<=e&&n*2<=t;)n*=2;return n}function UR(e){return e<=1?[1]:UR(e/2).flatMap(n=>[n,e+1-n])}function pp(e,t){return e===t?"Final":e===t-1?"Semi-finals":e===t-2?"Quarter-finals":"Preliminary Round"}function rS(e,t){const n=Array.from({length:t},(d,h)=>h+1),r=[],i=[];
348n.forEach(d=>{const h=e.filter(m=>m.group_number===d).sort((m,g)=>(g.points||0)-(m.points||0)||(g.kills||0)-(m.kills||0));h[0]&&r.push(h[0]),h[1]&&i.push(h[1])});const a=(d,h)=>(h.points||0)-(d.points||0)||(h.kills||0)-(d.kills||0);r.sort(a),i.sort(a);const l=[...r,...i],u=$z(l.length,16);return l.slice(0,u)}function Vz(e){const t=e.length;if(t<2)return[];const n=UR(t),r=[];for(let i=0;i<n.length;i+=2)r.push({a:e[n[i]-1],b:e[n[i+1]-1]});return r}const zR={setup:"Setup",groups:"Group Stage",knockout:"Knockout",complete:"Complete"},Uz={setup:"bg-muted text-muted-foreground border-border",groups:"bg-primary/15 text-primary border-primary/30",knockout:"bg-accent/15 text-accent border-accent/30",complete:"bg-secondary text-secondary-foreground border-border"};function zz({events:e}){return e.length?p.jsx("div",{className:"grid gap-3",children:e.map(t=>p.jsx(Mi,{to:`/events/${t.id}`,children:p.jsxs(Wt,{className:"p-5 bg-card border-border md:hover:border-primary/50 transition-all duration-200 group flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-1.5 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p.jsx("h3",{className:"font-semibold text-foreground text-lg truncate",children:t.name}),p.jsx($R,{variant:"outline",className:Uz[t.status],children:zR[t.status]})]}),p.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground flex-wrap",children:[t.date&&p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(PS,{className:"w-3.5 h-3.5"}),new Date(t.date).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})]}),t.location&&p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(AS,{className:"w-3.5 h-3.5"}),t.location]}),p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(Nu,{className:"w-3.5 h-3.5"}),t.number_of_groups," group",t.number_of_groups>1?"s":""]})]})]}),p.jsx(kS,{className:"w-5 h-5 text-muted-foreground md:group-hover:text-primary transition-colors shrink-0"})]})},t.id))}):p.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[p.jsx(Nu,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),p.jsx("p",{children:"No events yet. Create your first airsoft event to get started."})]})}function Wz({eventPlayers:e}){const t=v.useMemo(()=>{const r={};return e.forEach(i=>{i.final_position&&(r[i.player_id]||(r[i.player_id]={player_id:i.player_id,name:i.player_name,points:0,events:0,best:99}),r[i.player_id].points+=i.league_points||0,r[i.player_id].events+=1,r[i.player_id].best=Math.min(r[i.player_id].best,i.final_position))}),Object.values(r).sort((i,a)=>a.points-i.points||i.best-a.best)},[e]);if(!t.length)return p.jsxs(Wt,{className:"p-8 text-center text-muted-foreground bg-card border-border",children:[p.jsx(ku,{className:"w-8 h-8 mx-auto mb-2 opacity-40"}),p.jsx("p",{className:"text-sm",children:"No completed events yet. League standings appear once events finish."})]});const n=r=>r===0?p.jsx(fA,{className:"w-4 h-4 text-accent"}):r===1?p.jsx(vp,{className:"w-4 h-4 text-muted-foreground"}):r===2?p.jsx(vp,{className:"w-4 h-4 text-primary/70"}):null;return p.jsxs(Wt,{className:"bg-card border-border overflow-hidden",children:[p.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center gap-2",children:[p.jsx(ku,{className:"w-5 h-5 text-accent"}),p.jsx("h2",{className:"font-semibold text-foreground",children:"Overall League"})]}),p.jsx("div",{className:"overflow-auto max-h-[28rem]",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"sticky top-0 z-[1] bg-card",children:p.jsxs("tr",{className:"text-muted-foreground text-left border-b border-border",children:[p.jsx("th",{className:"px-5 py-3 font-medium w-16",children:"Pos"}),p.jsx("th",{className:"px-3 py-3 font-medium",children:"Player"}),p.jsx("th",{className:"px-3 py-3 font-medium text-center",children:"Events"}),p.jsx("th",{className:"px-5 py-3 font-medium text-right",children:"Points"})]})}),p.jsx("tbody",{children:t.map((r,i)=>p.jsxs("tr",{className:"border-b border-border/50 last:border-0 hover:bg-secondary/30 transition-colors",children:[p.jsx("td",{className:"px-5 py-3",children:p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"font-mono text-muted-foreground",children:i+1}),n(i)]})}),p.jsx("td",{className:"px-3 py-3 font-medium text-foreground",children:r.name}),p.jsx("td",{className:"px-3 py-3 text-center text-muted-foreground",children:r.events}),p.jsx("td",{className:"px-5 py-3 text-right",children:p.jsx("span",{className:`font-mono font-bold ${i<3?"text-accent":"text-foreground"}`,children:r.points})})]},r.player_id))})]})})]})}function WR(){return p.jsx("footer",{className:"border-t border-border bg-card/60 backdrop-blur pb-safe",children:p.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-5 flex flex-col sm:flex-row items-center justify-center gap-3",children:[p.jsx("span",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground font-medium",children:"In Partnership With"}),p.jsx("a",{href:"https://www.royalnavy.mod.uk/careers/royal-marines?gclsrc=aw.ds&gad_source=1&gad_campaignid=21871201143&gbraid=0AAAAADoQ9FcQ9xGTBmb4d-eHxjbmOjYkI&gclid=Cj0KCQjwm8bTBhDWARIsAC9Hi8k9VQ5EtjpVyx-U8PMVvKzrx-Uh3dBvXRnrJJTnmvXu47B8rFp09PkaAjTiEALw_wcB",target:"_blank",rel:"noopener noreferrer",className:"inline-block transition-transform hover:scale-105",children:p.jsx("img",{src:"https://media.base44.com/images/public/6a71ea7a598d9ff82029de97/d484961dd_RMC.png",alt:"The Royal Marines",className:"h-12 w-auto rounded"})}),p.jsx("a",{href:"https://www.instagram.com/royalmarinescommandoshuffle/",target:"_blank",rel:"noopener noreferrer",className:"inline-block transition-transform hover:scale-105",children:p.jsx("img",{src:"https://media.base44.com/images/public/6a71ea7a598d9ff82029de97/8606e812c_shufflepng.png",alt:"Royal Marines Commando Shuffle Association",className:"h-12 w-auto rounded"})}),p.jsx("a",{href:"https://reorgcharity.com/",target:"_blank",rel:"noopener noreferrer",className:"inline-block transition-transform hover:scale-105",children:p.jsx("img",{src:"https://media.base44.com/images/public/6a71ea7a598d9ff82029de97/962e6f771_REOrg.jpeg",alt:"REORG",className:"h-12 w-auto rounded"})})]})})}function Hz(e,t=[]){let n=[];function r(a,l){const u=v.createContext(l);u.displayName=a+"Context";const d=n.length;n=[...n,l];const h=g=>{var E;const{scope:x,children:S,..._}
vendor: 23,344 bytes, lines 348-356
348=g,b=((E=x==null?void 0:x[e])==null?void 0:E[d])||u,C=v.useMemo(()=>_,Object.values(_));return p.jsx(b.Provider,{value:C,children:S})};h.displayName=a+"Provider";function m(g,x){var b;const S=((b=x==null?void 0:x[e])==null?void 0:b[d])||u,_=v.useContext(S);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${a}\``)}return[h,m]}const i=()=>{const a=n.map(l=>v.createContext(l));return function(u){const d=(u==null?void 0:u[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[r,qz(i,...t)]}function qz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const g=d(a)[`__scope${h}`];return{...u,...g}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Kz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xg=Kz.reduce((e,t)=>{const n=Fg(`Primitive.${t}`),r=v.forwardRef((i,a)=>{const{asChild:l,...u}=i,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),mp={exports:{}},gp={};/** 349 * @license React 350 * use-sync-external-store-shim.production.js 351 * 352 * Copyright (c) Meta Platforms, Inc. and affiliates. 353 * 354 * This source code is licensed under the MIT license found in the 355 * LICENSE file in the root directory of this source tree. 356 */var sS;function Gz(){if(sS)return gp;sS=1;var e=td();function t(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function u(g,x){var S=x(),_=r({inst:{value:S,getSnapshot:x}}),b=_[0].inst,C=_[1];return a(function(){b.value=S,b.getSnapshot=x,d(b)&&C({inst:b})},[g,S,x]),i(function(){return d(b)&&C({inst:b}),g(function(){d(b)&&C({inst:b})})},[g]),l(S),S}function d(g){var x=g.getSnapshot;g=g.value;try{var S=x();return!n(g,S)}catch{return!0}}function h(g,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return gp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,gp}var oS;function Qz(){return oS||(oS=1,mp.exports=Gz()),mp.exports}var Yz=Qz();function Xz(){return Yz.useSyncExternalStore(Jz,()=>!0,()=>!1)}function Jz(){return()=>{}}var Jg="Avatar",[Zz]=Hz(Jg),[e6,HR]=Zz(Jg),qR=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=v.useState("idle");return p.jsx(e6,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:p.jsx(Xg.span,{...r,ref:t})})});qR.displayName=Jg;var KR="AvatarImage",GR=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,l=HR(KR,n),u=t6(r,a),d=Kn(h=>{i(h),l.onImageLoadingStatusChange(h)});return Ct(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?p.jsx(Xg.img,{...a,ref:t,src:r}):null});GR.displayName=KR;var QR="AvatarFallback",YR=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=HR(QR,n),[l,u]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(d)}},[r]),l&&a.imageLoadingStatus!=="loaded"?p.jsx(Xg.span,{...i,ref:t}):null});YR.displayName=QR;function iS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function t6(e,{referrerPolicy:t,crossOrigin:n}){const r=Xz(),i=v.useRef(null),a=r?(i.current||(i.current=new window.Image),i.current):null,[l,u]=v.useState(()=>iS(a,e));return Ct(()=>{u(iS(a,e))},[a,e]),Ct(()=>{const d=g=>()=>{u(g)};if(!a)return;const h=d("loaded"),m=d("error");return a.addEventListener("load",h),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",h),a.removeEventListener("error",m)}},[a,n,t]),l}var XR=qR,JR=GR,ZR=YR;const eP=v.forwardRef(({className:e,...t},n)=>p.jsx(XR,{ref:n,className:Te("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));eP.displayName=XR.displayName;const n6=v.forwardRef(({className:e,...t},n)=>p.jsx(JR,{ref:n,className:Te("aspect-square h-full w-full",e),...t}));n6.displayName=JR.displayName;const tP=v.forwardRef(({className:e,...t},n)=>p.jsx(ZR,{ref:n,className:Te("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));tP.displayName=ZR.displayName;var yp="rovingFocusGroup.onEntryFocus",r6={bubbles:!1,cancelable:!0},Il="RovingFocusGroup",[wm,nP,s6]=$g(Il),[o6,rP]=As(Il,[s6]),[i6,a6]=o6(Il),sP=v.forwardRef((e,t)=>p.jsx(wm.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(wm.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(l6,{...e,ref:t})})}));sP.displayName=Il;var l6=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,x=v.useRef(null),S=Ye(t,x),_=Vg(a),[b,C]=ml({prop:l,defaultProp:u??null,onChange:d,caller:Il}),[E,P]=v.useState(!1),T=Kn(h),k=nP(n),N=v.useRef(!1),[D,B]=v.useState(0);return v.useEffect(()=>{const O=x.current;if(O)return O.addEventListener(yp,T),()=>O.removeEventListener(yp,T)},[T]),p.jsx(i6,{scope:n,orientation:r,dir:_,loop:i,currentTabStopId:b,onItemFocus:v.useCallback(O=>C(O),[C]),onItemShiftTab:v.useCallback(()=>P(!0),[]),onFocusableItemAdd:v.useCallback(()=>B(O=>O+1),[]),onFocusableItemRemove:v.useCallback(()=>B(O=>O-1),[]),children:p.jsx(We.div,{tabIndex:E||D===0?-1:0,"data-orientation":r,...g,ref:S,style:{outline:"none",...e.style},onMouseDown:_e(e.onMouseDown,()=>{N.current=!0}),onFocus:_e(e.onFocus,O=>{const G=!N.current;if(O.target===O.currentTarget&&G&&!E){const J=new CustomEvent(yp,r6);if(O.currentTarget.dispatchEvent(J),!J.defaultPrevented){const se=k().filter(Y=>Y.focusable),ue=se.find(Y=>Y.active),ae=se.find(Y=>Y.id===b),te=[ue,ae,...se].filter(Boolean).map(Y=>Y.ref.current);aP(te,m)}}N.current=!1}),onBlur:_e(e.onBlur,()=>P(!1))})})}),oP="RovingFocusGroupItem",iP=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:l,...u}=e,d=jr(),h=a||d,m=a6(oP,n),g=m.currentTabStopId===h,x=nP(n),{onFocusableItemAdd:S,onFocusableItemRemove:_,currentTabStopId:b}=m;return v.useEffect(()=>{if(r)return S(),()=>_()},[r,S,_]),p.jsx(wm.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:p.jsx(We.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:_e(e.onMouseDown,C=>{r?m.onItemFocus(h):C.preventDefault()}),onFocus:_e(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:_e(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const E=d6(C,m.orientation,m.dir);if(E!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let T=x().filter(k=>k.focusable).map(k=>k.ref.current);if(E==="last")T.reverse();else if(E==="prev"||E==="next"){E==="prev"&&T.reverse();const k=T.indexOf(C.currentTarget);T=m.loop?f6(T,k+1):T.slice(k+1)}setTimeout(()=>aP(T))}}),children:typeof l=="function"?l({isCurrentTabStop:g,hasTabStop:b!=null}):l})})});iP.displayName=oP;var c6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function u6(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d6(e,t,n){const r=u6(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return c6[r]}function aP(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function f6(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h6=sP,p6=iP;function m6(e){const t=g6(e),n=v.forwardRef((r,i)=>{const{children:a,...l}=r,u=v.Children.toArray(a),d=u.find(v6);if(d){const h=d.props.children,m=u.map(g=>g===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:g);return p.jsx(t,{...l,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,m):null})}return p.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function g6(e){const t=v.forwardRef((n,r)=>{const{children:i,...a}=n;if(v.isValidElement(i)){const l=w6(i),u=x6(a,i.props);return i.type!==v.Fragment&&(u.ref=r?Lr(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y6=Symbol("radix.slottable");function v6(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y6}function x6(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const d=a(...u);return i(...u),d}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function w6(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bm=["Enter"," "],b6=["ArrowDown","PageUp","Home"],lP=["ArrowUp","PageDown","End"],S6=[...b6,...lP],E6={ltr:[...bm,"ArrowRight"],rtl:[...bm,"ArrowLeft"]},C6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Fl="Menu",[yl,_6,R6]=$g(Fl),[Ao,cP]=As(Fl,[R6,Rd,rP]),Nd=Rd(),uP=rP(),[P6,jo]=Ao(Fl),[T6,Bl]=Ao(Fl),dP=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:l=!0}=e,u=Nd(t),[d,h]=v.useState(null),m=v.useRef(!1),g=Kn(a),x=Vg(i);return v.useEffect(()=>{const S=()=>{m.current=!0,document.addEventListener("pointerdown",_,{capture:!0,once:!0}),document.addEventListener("pointermove",_,{capture:!0,once:!0})},_=()=>m.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",_,{capture:!0}),document.removeEventListener("pointermove",_,{capture:!0})}},[]),p.jsx(J_,{...u,children:p.jsx(P6,{scope:t,open:n,onOpenChange:g,content:d,onContentChange:h,children:p.jsx(T6,{scope:t,onClose:v.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:m,dir:x,modal:l,children:r})})})};dP.displayName=Fl;var k6="MenuAnchor",Zg=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Nd(n);return p.jsx(Z_,{...i,...r,ref:t})});Zg.displayName=k6;var ey="MenuPortal",[N6,fP]=Ao(ey,{forceMount:void 0}),hP=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=jo(ey,t);return p.jsx(N6,{scope:t,forceMount:n,children:p.jsx(js,{present:n||a.open,children:p.jsx(vd,{asChild:!0,container:i,children:r})})})};hP.displayName=ey;var Tn="MenuContent",[A6,ty]=Ao(Tn),pP=v.forwardRef((e,t)=>{const n=fP(Tn,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=jo(Tn,e.__scopeMenu),l=Bl(Tn,e.__scopeMenu);return p.jsx(yl.Provider,{scope:e.__scopeMenu,children:p.jsx(js,{present:r||a.open,children:p.jsx(yl.Slot,{scope:e.__scopeMenu,children:l.modal?p.jsx(j6,{...i,ref:t}):p.jsx(O6,{...i,ref:t})})})})}),j6=v.forwardRef((e,t)=>{const n=jo(Tn,e.__scopeMenu),r=v.useRef(null),i=Ye(t,r);return v.useEffect(()=>{const a=r.current;if(a)return kg(a)},[]),p.jsx(ny,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_e(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),O6=v.forwardRef((e,t)=>{const n=jo(Tn,e.__scopeMenu);return p.jsx(ny,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),M6=m6("MenuContent.ScrollLock"),ny=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:x,onDismiss:S,disableOutsideScroll:_,...b}=e,C=jo(Tn,n),E=Bl(Tn,n),P=Nd(n),T=uP(n),k=_6(n),[N,D]=v.useState(null),B=v.useRef(null),O=Ye(t,B,C.onContentChange),G=v.useRef(0),J=v.useRef(""),se=v.useRef(0),ue=v.useRef(null),ae=v.useRef("right"),W=v.useRef(0),te=_?wd:v.Fragment,Y=_?{as:M6,allowPinchZoom:!0}:void 0,ee=H=>{var Z,de;const $=J.current+H,j=k().filter(fe=>!fe.disabled),q=document.activeElement,ie=(Z=j.find(fe=>fe.ref.current===q))==null?void 0:Z.textValue,Q=j.map(fe=>fe.textValue),ce=q6(Q,$,ie),X=(de=j.find(fe=>fe.textValue===ce))==null?void 0:de.ref.current;(function fe(ke){J.current=ke,window.clearTimeout(G.current),ke!==""&&(G.current=window.setTimeout(()=>fe(""),1e3))})($),X&&setTimeout(()=>X.focus())};v.useEffect(()=>()=>window.clearTimeout(G.current),[]),Tg();const V=v.useCallback(H=>{var j,q;return ae.current===((j=ue.current)==null?void 0:j.side)&&G6(H,(q=ue.current)==null?void 0:q.area)},[]);return p.jsx(A6,{scope:n,searchRef:J,onItemEnter:v.useCallback(H=>{V(H)&&H.preventDefault()},[V]),onItemLeave:v.useCallback(H=>{var $;V(H)||(($=B.current)==null||$.focus(),D(null))},[V]),onTriggerLeave:v.useCallback(H=>{V(H)&&H.preventDefault()},[V]),pointerGraceTimerRef:se,onPointerGraceIntentChange:v.useCallback(H=>{ue.current=H},[]),children:p.jsx(te,{...Y,children:p.jsx(yd,{asChild:!0,trapped:i,onMountAutoFocus:_e(a,H=>{var $;H.preventDefault(),($=B.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:p.jsx(gd,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:x,onDismiss:S,children:p.jsx(h6,{asChild:!0,...T,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:D,onEntryFocus:_e(d,H=>{E.isUsingKeyboardRef.current||H.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(eR,{role:"menu","aria-orientation":"vertical","data-state":NP(C.open),"data-radix-menu-content":"",dir:E.dir,...P,...b,ref:O,style:{outline:"none",...b.style},onKeyDown:_e(b.onKeyDown,H=>{const j=H.target.closest("[data-radix-menu-content]")===H.currentTarget,q=H.ctrlKey||H.altKey||H.metaKey,ie=H.key.length===1;j&&(H.key==="Tab"&&H.preventDefault(),!q&&ie&&ee(H.key));const Q=B.current;if(H.target!==Q||!S6.includes(H.key))return;H.preventDefault();const X=k().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);lP.includes(H.key)&&X.reverse(),W6(X)}),onBlur:_e(e.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(G.current),J.current="")}),onPointerMove:_e(e.onPointerMove,vl(H=>{const $=H.target,j=W.current!==H.clientX;if(H.currentTarget.contains($)&&j){const q=H.clientX>W.current?"right":"left";ae.current=q,W.current=H.clientX}}))})})})})})})});pP.displayName=Tn;var D6="MenuGroup",ry=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(We.div,{role:"group",...r,ref:t})});ry.displayName=D6;var L6="MenuLabel",mP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(We.div,{...r,ref:t})});mP.displayName=L6;var Ju="MenuItem",aS="menu.itemSelect",Ad=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),l=Bl(Ju,e.__scopeMenu),u=ty(Ju,e.__scopeMenu),d=Ye(t,a),h=v.useRef(!1),m=()=>{const g=a.current;if(!n&&g){const x=new CustomEvent(aS,{bubbles:!0,cancelable:!0});g.addEventListener(aS,S=>r==null?void 0:r(S),{once:!0}),HC(g,x),x.defaultPrevented?h.current=!1:l.onClose()}};return p.jsx(gP,{...i,ref:d,disabled:n,onClick:_e(e.onClick,m),onPointerDown:g=>{var x;(x=e.onPointerDown)==null||x.call(e,g),h.current=!0},onPointerUp:_e(e.onPointerUp,g=>{var x;h.current||(x=g.currentTarget)==null||x.click()}),onKeyDown:_e(e.onKeyDown,g=>{const x=u.searchRef.current!=="";n||x&&g.key===" "||bm.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Ad.displayName=Ju;var gP=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,l=ty(Ju,n),u=uP(n),d=v.useRef(null),h=Ye(t,d),[m,g]=v.useState(!1),[x,S]=v.useState("");return v.useEffect(()=>{const _=d.current;_&&S((_.textContent??"").trim())},[a.children]),p.jsx(yl.ItemSlot,{scope:n,disabled:r,textValue:i??x,children:p.jsx(p6,{asChild:!0,...u,focusable:!r,children:p.jsx(We.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:h,onPointerMove:_e(e.onPointerMove,vl(_=>{r?l.onItemLeave(_):(l.onItemEnter(_),_.defaultPrevented||_.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_e(e.onPointerLeave,vl(_=>l.onItemLeave(_))),onFocus:_e(e.onFocus,()=>g(!0)),onBlur:_e(e.onBlur,()=>g(!1))})})})}),I6="MenuCheckboxItem",yP=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return p.jsx(SP,{scope:e.__scopeMenu,checked:n,children:p.jsx(Ad,{role:"menuitemcheckbox","aria-checked":Zu(n)?"mixed":n,...i,ref:t,"data-state":oy(n),onSelect:_e(i.onSelect,()=>r==null?void 0:r(Zu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});yP.displayName=I6;var vP="MenuRadioGroup",[F6,B6]=Ao(vP,{value:void 0,onValueChange:()=>{}}),xP=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Kn(r);return p.jsx(F6,{scope:e.__scopeMenu,value:n,onValueChange:a,children:p.jsx(ry,{...i,ref:t})})});xP.displayName=vP;var wP="MenuRadioItem",bP=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=B6(wP,e.__scopeMenu),a=n===i.value;return p.jsx(SP,{scope:e.__scopeMenu,checked:a,children:p.jsx(Ad,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":oy(a),onSelect:_e(r.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});bP.displayName=wP;var sy="MenuItemIndicator",[SP,$6]=Ao(sy,{checked:!1}),EP=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=$6(sy,n);return p.jsx(js,{present:r||Zu(a.checked)||a.checked===!0,children:p.jsx(We.span,{...i,ref:t,"data-state":oy(a.checked)})})});EP.displayName=sy;var V6="MenuSeparator",CP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(We.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});CP.displayName=V6;var U6="MenuArrow",_P=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Nd(n);return p.jsx(tR,{...i,...r,ref:t})});_P.displayName=U6;var z6="MenuSub",[rH,RP]=Ao(z6),Ka="MenuSubTrigger",PP=v.forwardRef((e,t)=>{const n=jo(Ka,e.__scopeMenu),r=Bl(Ka,e.__scopeMenu),i=RP(Ka,e.__scopeMenu),a=ty(Ka,e.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=a,h={__scopeMenu:e.__scopeMenu},m=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>m,[m]),v.useEffect(()=>{const g=u.current;return()=>{window.clearTimeout(g),d(null)}},[u,d]),p.jsx(Zg,{asChild:!0,...h,children:p.jsx(gP,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":NP(n.open),...e,ref:Lr(t,i.onTriggerChange),onClick:g=>{var x;(x=e.onClick)==null||x.call(e,g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_e(e.onPointerMove,vl(g=>{a.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:_e(e.onPointerLeave,vl(g=>{var S,_;m();const x=(S=n.content)==null?void 0:S.getBoundingClientRect();if(x){const b=(_=n.content)==null?void 0:_.dataset.side,C=b==="right",E=C?-5:5,P=x[C?"left":"right"],T=x[C?"right":"left"];a.onPointerGraceIntentChange({area:[{x:g.clientX+E,y:g.clientY},{x:P,y:x.top},{x:T,y:x.top},{x:T,y:x.bottom},{x:P,y:x.bottom}],side:b}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(g),g.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:_e(e.onKeyDown,g=>{var S;const x=a.searchRef.current!=="";e.disabled||x&&g.key===" "||E6[r.dir].includes(g.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),g.preventDefault())})})})});PP.displayName=Ka;var TP="MenuSubContent",kP=v.forwardRef((e,t)=>{const n=fP(Tn,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=jo(Tn,e.__scopeMenu),l=Bl(Tn,e.__scopeMenu),u=RP(TP,e.__scopeMenu),d=v.useRef(null),h=Ye(t,d);return p.jsx(yl.Provider,{scope:e.__scopeMenu,children:p.jsx(js,{present:r||a.open,children:p.jsx(yl.Slot,{scope:e.__scopeMenu,children:p.jsx(ny,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:h,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var g;l.isUsingKeyboardRef.current&&((g=d.current)==null||g.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:_e(e.onFocusOutside,m=>{m.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:_e(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:_e(e.onKeyDown,m=>{var S;const g=m.currentTarget.contains(m.target),x=C6[l.dir].includes(m.key);g&&x&&(a.onOpenChange(!1),(S=u.trigger)==null||S.focus(),m.preventDefault())})})})})})});kP.displayName=TP;function NP(e){return e?"open":"closed"}function Zu(e){return e==="indeterminate"}function oy(e){return Zu(e)?"indeterminate":e?"checked":"unchecked"}function W6(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function H6(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function q6(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=H6(e,Math.max(a,0));i.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return d!==n?d:void 0}function K6(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],d=t[l],h=u.x,m=u.y,g=d.x,x=d.y;m>r!=x>r&&n<(g-h)*(r-m)/(x-m)+h&&(i=!i)}return i}function G6(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return K6(n,t)}function vl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Q6=dP,Y6=Zg,X6=hP,J6=pP,Z6=ry,e8=mP,t8=Ad,n8=yP,r8=xP,s8=bP,o8=EP,i8=CP,a8=_P,l8=PP,c8=kP,jd="DropdownMenu",[u8]=As(jd,[cP]),Qt=cP(),[d8,AP]=u8(jd),jP=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:l,modal:u=!0}=e,d=Qt(t),h=v.useRef(null),[m,g]=ml({prop:i,defaultProp:a??!1,onChange:l,caller:jd});return p.jsx(d8,{scope:t,triggerId:jr(),triggerRef:h,contentId:jr(),open:m,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(x=>!x),[g]),modal:u,children:p.jsx(Q6,{...d,open:m,onOpenChange:g,dir:r,modal:u,children:n})})};jP.displayName=jd;var OP="DropdownMenuTrigger",MP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=AP(OP,n),l=Qt(n);return p.jsx(Y6,{asChild:!0,...l,children:p.jsx(We.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Lr(t,a.triggerRef),onPointerDown:_e(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:_e(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});MP.displayName=OP;var f8="DropdownMenuPortal",DP=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Qt(t);return p.jsx(X6,{...r,...n})};DP.displayName=f8;var LP="DropdownMenuContent",IP=v.forwardRef((e,t)=>
356{const{__scopeDropdownMenu:n,...r}=e,i=AP(LP,n),a=Qt(n),l=v.useRef(!1);return p.jsx(J6,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:_e(e.onCloseAutoFocus,u=>{var d;l.current||(d=i.triggerRef.current)==null||d.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:_e(e.onInteractOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,m=d.button===2||h;(!i.modal||m)&&(l.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)"}})});IP.displayName=LP;var h8="DropdownMenuGroup",p8=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(Z6,{...i,...r,ref:t})});p8.displayName=h8;var m8="DropdownMenuLabel",FP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(e8,{...i,...r,ref:t})});FP.displayName=m8;var g8="DropdownMenuItem",BP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(t8,{...i,...r,ref:t})});BP.displayName=g8;var y8="DropdownMenuCheckboxItem",$P=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(n8,{...i,...r,ref:t})});$P.displayName=y8;var v8="DropdownMenuRadioGroup",x8=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(r8,{...i,...r,ref:t})});x8.displayName=v8;var w8="DropdownMenuRadioItem",VP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(s8,{...i,...r,ref:t})});VP.displayName=w8;var b8="DropdownMenuItemIndicator",UP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(o8,{...i,...r,ref:t})});UP.displayName=b8;var S8="DropdownMenuSeparator",zP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(i8,{...i,...r,ref:t})});zP.displayName=S8;var E8="DropdownMenuArrow",C8=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(a8,{...i,...r,ref:t})});C8.displayName=E8;var _8="DropdownMenuSubTrigger",WP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(l8,{...i,...r,ref:t})});WP.displayName=_8;var R8="DropdownMenuSubContent",HP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Qt(n);return p.jsx(c8,{...i,...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)"}})});HP.displayName=R8;var P8=jP,T8=MP,k8=DP,qP=IP,KP=FP,GP=BP,QP=$P,YP=VP,XP=UP,JP=zP,ZP=WP,eT=HP;const N8=P8,A8=T8,j8=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>p.jsxs(ZP,{ref:i,className:Te("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,p.jsx(kS,{className:"ml-auto"})]}));j8.displayName=ZP.displayName;const O8=v.forwardRef(({className:e,...t},n)=>p.jsx(eT,{ref:n,className:Te("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}));O8.displayName=eT.displayName;const tT=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
356p.jsx(k8,{children:p.jsx(qP,{ref:r,sideOffset:t,className:Te("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})}));tT.displayName=qP.displayName;const Sm=v.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(GP,{ref:r,className:Te("relative flex cursor-default select-none items-center gap-2 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 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Sm.displayName=GP.displayName;const M8=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>p.jsxs(QP,{ref:i,className:Te("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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(XP,{children:p.jsx(_m,{className:"h-4 w-4"})})}),t]}));M8.displayName=QP.displayName;const D8=v.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(YP,{ref:r,className:Te("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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(XP,{children:p.jsx(cA,{className:"h-2 w-2 fill-current"})})}),t]}));D8.displayName=YP.displayName;const nT=v.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(KP,{ref:r,className:Te("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));nT.displayName=KP.displayName;const rT=v.forwardRef(({className:e,...t},n)=>p.jsx(JP,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));rT.displayName=JP.displayName;var L8=Symbol("radix.slottable");function I8(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=L8,t}var sT="AlertDialog",[F8]=As(sT,[s_]),Ir=s_(),oT=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ir(t);return p.jsx(w_,{...r,...n,modal:!0})};oT.displayName=sT;var B8="AlertDialogTrigger",$8=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return p.jsx(b_,{...i,...r,ref:t})});$8.displayName=B8;var V8="AlertDialogPortal",iT=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ir(t);return p.jsx(S_,{...r,...n})};iT.displayName=V8;var U8="AlertDialogOverlay",aT=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return p.jsx(Og,{...i,...r,ref:t})});aT.displayName=U8;var bi="AlertDialogContent",[z8,W8]=F8(bi),H8=I8("AlertDialogContent"),lT=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,a=Ir(n),l=v.useRef(null),u=Ye(t,l),d=v.useRef(null);return p.jsx(eU,{contentName:bi,titleName:cT,docsSlug:"alert-dialog",children:p.jsx(z8,{scope:n,cancelRef:d,children:p.jsxs(Mg,{role:"alertdialog",...a,...i,ref:u,onOpenAutoFocus:_e(i.onOpenAutoFocus,h=>{var m;h.preventDefault(),(m=d.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[p.jsx(H8,{children:r}),p.jsx(K8,{contentRef:l})]})})})});lT.displayName=bi;var cT="AlertDialogTitle",uT=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return p.jsx(Dg,{...i,...r,ref:t})});uT.displayName=cT;var dT="AlertDialogDescription",fT=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return p.jsx(Lg,{...i,...r,ref:t})});fT.displayName=dT;var q8="AlertDialogAction",hT=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ir(n);return p.jsx(Ig,{...i,...r,ref:t})});hT.displayName=q8;var pT="AlertDialogCancel",mT=v.forwardRef((e,t)=>
356{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=W8(pT,n),a=Ir(n),l=Ye(t,i);return p.jsx(Ig,{...a,...r,ref:l})});mT.displayName=pT;var K8=({contentRef:e})=>{const t=`\`${bi}\` requires a description for the component to be accessible for screen reader users. 357 358You can add a description to the \`${bi}\` by passing a \`${dT}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 359 360Alternatively, 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 \`${bi}\`. 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. 361 362For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},G8=oT,Q8=iT,gT=aT,yT=lT,vT=hT,xT=mT,wT=uT,bT=fT;const Y8=G8,X8=Q8,ST=v.forwardRef(({className:e,...t},n)=>p.jsx(gT,{className:Te("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}));ST.displayName=gT.displayName;const ET=v.forwardRef(({className:e,...t},n)=>p.jsxs(X8,{children:[p.jsx(ST,{}),p.jsx(yT,{ref:n,className:Te("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})]}));ET.displayName=yT.displayName;const CT=({className:e,...t})=>p.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});CT.displayName="AlertDialogHeader";const _T=({className:e,...t})=>p.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_T.displayName="AlertDialogFooter";const RT=v.forwardRef(({className:e,...t},n)=>p.jsx(wT,{ref:n,className:Te("text-lg font-semibold",e),...t}));RT.displayName=wT.displayName;const PT=v.forwardRef(({className:e,...t},n)=>p.jsx(bT,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));PT.displayName=bT.displayName;const TT=v.forwardRef(({className:e,...t},n)=>p.jsx(vT,{ref:n,className:Te(Bg(),e),...t}));TT.displayName=vT.displayName;const kT=v.forwardRef(({className:e,...t},n)=>p.jsx(xT,{ref:n,className:Te(Bg({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));kT.displayName=xT.displayName;function J8(){const[e,t]=v.useState(null),[n,r]=v.useState(!1),[i,a]=v.useState(!1),[l,u]=v.useState(!1);if(v.useEffect(()=>{let g=!0;return De.auth.isAuthenticated().then(x=>{!x||!g||De.auth.me().then(S=>g&&t(S)).catch(()=>{})}),()=>{g=!1}},[]),!e)return null;const d=(e.full_name||e.email||"?").split(" ").map(g=>g[0]).slice(0,2).join("").toUpperCase(),h=()=>{r(!1),De.auth.logout()},m=async()=>{u(!0),await new Promise(g=>setTimeout(g,600)),u(!1),a(!1),De.auth.logout()};return p.jsxs(p.Fragment,{children:[p.jsxs(N8,{open:n,onOpenChange:r,children:[p.jsx(A8,{asChild:!0,children:p.jsx("button",{type:"button","aria-label":"Account menu",className:"rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:p.jsx(eP,{className:"h-9 w-9 ring-1 ring-border bg-primary/15",children:p.jsx(tP,{className:"bg-primary/15 text-primary text-xs font-semibold",children:d||p.jsx(KA,{className:"w-4 h-4"})})})})}),p.jsxs(tT,{align:"end",className:"w-56 bg-popover border-border",children:[p.jsx(nT,{className:"text-muted-foreground font-normal truncate",children:e.email}),p.jsx(rT,{className:"bg-border"}),p.jsxs(Sm,{className:"text-foreground focus:bg-secondary cursor-pointer",onClick:h,children:[p.jsx(wA,{className:"w-4 h-4 mr-2"})," Logout"]}),p.jsxs(Sm,{className:"text-destructive focus:bg-destructive/10 cursor-pointer",onClick:()=>{r(!1),a(!0)},children:[p.jsx(jS,{className:"w-4 h-4 mr-2"})," Delete Account"]})]})]}),p.jsx(Y8,{open:i,onOpenChange:a,children:p.jsxs(ET,{className:"bg-card border-border",children:[p.jsxs(CT,{children:[p.jsx(RT,{className:"text-foreground",children:"Delete account?"}),p.jsx(PT,{className:"text-muted-foreground",children:"This will permanently delete your account and remove your data from Commando Force Airsoft. This action cannot be undone."})]}),p.jsxs(_T,{children:[p.jsx(kT,{className:"border-border bg-transparent text-foreground hover:bg-secondary",disabled:l,children:"Cancel"}),p.jsx(TT,{onClick:g=>{g.preventDefault(),m()},disabled:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:l?"Deleting...":"Delete"})]})]})})]})}function Z8(e,{threshold:t=70,max:n=100}={}){const[r,i]=v.useState(0),[a,l]=v.useState(!1),u=v.useRef(null),d=x=>{window.scrollY<=0&&!a?u.current=x.touches[0].clientY:u.current=null},h=x=>
362{if(u.current===null||a)return;const S=x.touches[0].clientY-u.current;S>0&&i(Math.min(S*.5,n))},m=async()=>{if(u.current!==null){if(r>=t&&!a){l(!0),i(t);try{await e()}finally{l(!1),i(0)}}else i(0);u.current=null}},g=Math.min(r/t,1);return{pull:r,refreshing:a,progress:g,onTouchStart:d,onTouchMove:h,onTouchEnd:m}}function eW(){const{user:e}=Pg(),t=(e==null?void 0:e.role)==="admin",[n,r]=v.useState([]),[i,a]=v.useState([]),[l,u]=v.useState(!0),d=async()=>{try{const[m,g]=await Promise.all([De.entities.Event.list("-created_date"),De.entities.EventPlayer.list()]);r(m);const x=new Set(m.filter(S=>S.status==="complete").map(S=>S.id));a(g.filter(S=>x.has(S.event_id)))}finally{u(!1)}};v.useEffect(()=>{d()},[]);const h=Z8(d);return p.jsxs("div",{className:"min-h-screen",children:[p.jsx("header",{className:"border-b border-border bg-card/50 backdrop-blur sticky top-0 z-10 pt-safe",children:p.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("img",{src:"https://media.base44.com/images/public/6a71ea7a598d9ff82029de97/80be22047_CFA-Logo-Small.png",alt:"Commando Force Airsoft",className:"h-12 w-auto rounded-md"}),p.jsx("div",{children:p.jsx("h1",{className:"font-bold text-foreground text-lg leading-tight",children:"Commando Force Airsoft Ltd"})})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[t&&p.jsx(Az,{onCreated:d}),p.jsx(J8,{})]})]})}),p.jsxs("main",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-8 space-y-10",onTouchStart:h.onTouchStart,onTouchMove:h.onTouchMove,onTouchEnd:h.onTouchEnd,children:[p.jsx("div",{className:"flex items-center justify-center overflow-hidden transition-[height] duration-150",style:{height:h.pull},children:p.jsx(kA,{className:`w-5 h-5 text-primary ${h.refreshing?"animate-spin":""}`,style:{transform:`rotate(${h.progress*180}deg)`,opacity:h.progress}})}),p.jsxs("section",{className:"relative overflow-hidden rounded-2xl border border-border bg-card tactical-grid",children:[p.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-trans
362parent to-accent/5"}),p.jsxs("div",{className:"relative p-8 sm:p-12",children:[p.jsxs("div",{className:"flex items-center gap-2 text-primary text-sm font-medium mb-3",children:[p.jsx($A,{className:"w-4 h-4"})," Welcome to Commando Force Airsoft"]}),p.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground mb-3 max-w-2xl",children:"Indoor CQB 1 v 1 Airsoft Events in Plymouth"}),p.jsx("p",{className:"text-muted-foreground max-w-xl",children:"Commando Force Airsoft Ltd are proud to host indoor CQB 1 v 1 events at their venue in Plymouth. Come join fellow airsofters and compete in fast paced games. More than just games, a safe space to have fun and connect with other players."})]})]}),p.jsx("section",{children:p.jsx(Wz,{eventPlayers:i})}),p.jsxs("section",{children:[p.jsx("div",{className:"flex items-center justify-between mb-4",children:p.jsx("h2",{className:"text-xl font-bold text-foreground",children:"Events"})}),l?p.jsx("div",{className:"space-y-3",children:[1,2,3].map(m=>p.jsx("div",{className:"h-20 rounded-lg bg-card border border-border animate-pulse"},m))}):p.jsx(zz,{events:n})]})]}),p.jsx(WR,{})]})}function tW({event:e,players:t,onChanged:n,onGroupsGenerated:r,isAdmin:i=!1}){const[a,l]=v.useState(""),[u,d]=v.useState(!1),[h,m]=v.useState(!1),[g,x]=v.useState({}),[S,_]=v.useState(t);v.useEffect(()=>{_(t)},[t]);const b=e.number_of_groups||2,C=B=>g[B]||1,E=(B,O)=>x(G=>({...G,[B]:O})),P=async()=>{if(!a.trim())return;const B=a.trim(),O=`temp-${Date.now()}`,G={id:O,player_id:null,player_name:B,group_number:1,games_played:0,wins:0,draws:0,losses:0,kills:0,points:0,league_points:0};_(J=>[...J,G]),d(!0);try{const J=await De.entities.Player.filter({name:B});let se;J.length>0?se=J[0].id:se=(await De.entities.Player.create({name:B})).id,t.find(ae=>ae.player_id===se)||await De.entities.EventPlayer.create({event_id:e.id,player_id:se,player_name:B,group_number:1,games_played:0,wins:0,draws:0,losses:0,kills:0,points:0,league_points:0}),l(""),n()}catch(J){_(se=>se.filter(ue=>ue.id!==O)),rl({title:"Failed to add player",description:(J==null?void 0:J.message)||"Please try again",variant:"destructive"})}finally{d(!1)}},T=async B=>{const O=S;_(G=>G.filter(J=>J.id!==B));try{await De.entities.EventPlayer.delete(B),n()}catch(G){_(O),rl({title:"Failed to remove player",description:(G==null?void 0:G.message)||"Please try again",variant:"destructive"})}},k=async()=>{m(!0);try{const B=b;let O;e.assignment_mode==="manual"?O=t.map(G=>({id:G.id,group_number:C(G.id)})):O=Bz(t).map((J,se)=>({id:J.id,group_number:se%B+1})),await De.entities.EventPlayer.bulkUpdate(O),await De.entities.Event.update(e.id,{status:"groups"}),r()}finally{m(!1)}},N=async B=>{await De.entities.Event.update(e.id,{number_of_groups:Number(B)}),n()},D=async B=>{await De.entities.Event.update(e.id,{assignment_mode:B}),n()};return p.jsxs("div",{className:"grid lg:grid-cols-3 gap-5",children:[p.jsxs(Wt,{className:"p-5 bg-card border-border lg:col-span-2",children:[p.jsx("div",{className:"flex items-center justify-between mb-4",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Nu,{className:"w-5 h-5 text-primary"}),p.jsx("h3",{className:"font-semibold text-foreground",children:"Registered Players"}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:["(",t.length,")"]})]})}),i&&p.jsxs("div",{className:"flex gap-2 mb-4",children:[p.jsx(hn,{value:a,onChange:B=>l(B.target.value),onKeyDown:B=>B.key==="Enter"&&P(),placeholder:"Player name...",className:"bg-background border-input"}),p.jsxs(wt,{onClick:P,disabled:u||!a.trim(),className:"gap-2 bg-primary text-primary-foreground hover:bg-primary/90 shrink-0",children:[p.jsx(OS,{className:"w-4 h-4"})," Add"]})]}),S.length===0?p.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No players registered yet. Add some above."}):p.jsx("div",{className:"space-y-1.5 max-h-96 overflow-y-auto",children:S.map(B=>p.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2 rounded-md bg-secondary/40 hover:bg-secondary/70 transition-colors",children:[p.jsx("span",{className:"text-sm text-foreground font-medium truncate",children:B.player_name}),i&&p.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.assignment_mode==="manual"&&p.jsxs(tl,{value:String(C(B.id)),onValueChange:O=>E(B.id,Number(O)),children:[p.jsxs(vi,{className:"h-11 w-[76px] bg-background border-input text-xs px-2",children:[p.jsx("span",{className:"text-muted-foreground text-[10px]",children:"G"}),p.jsx(nl,{})]}),p.jsx(xi,{children:Array.from({length:b},(O,G)=>G+1).map(O=>p.jsx(xs,{value:String(O),children:O},O))})]}),p.jsx(wt,{size:"icon",variant:"ghost",className:"h-11 w-11 text-muted-foreground hover:text-destructive",onClick:()=>T(B.id),children:p.jsx(jS,{className:"w-3.5 h-3.5"})})]})]},B.id))})]}),p.jsxs(Wt,{className:"p-5 bg-card border-border space-y-5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(nw,{className:"w-5 h-5 text-primary"}),p.jsx("h3",{className:"font-semibold text-foreground",children:"Group Configuration"})]}),i?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground text-xs",children:"Number of Groups"}),p.jsxs(tl,{value:String(e.number_of_groups),onValueChange:N,children:[p.jsx(vi,{className:"bg-background border-input",children:p.jsx(nl,{})}),p.jsx(xi,{children:[1,2,3,4,5,6,8].map(B=>p.jsx(xs,{value:String(B),children:B},B))})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{className:"text-muted-foreground text-xs",children:"Assignment Mode"}),p.jsxs(tl,{value:e.assignment_mode,onValueChange:D,children:[p.jsx(vi,{className:"bg-background border-input",children:p.jsx(nl,{})}),p.jsxs(xi,{children:[p.jsx(xs,{value:"random",children:"Random"}),p.jsx(xs,{value:"manual",children:"Manual"})]})]}),e.assignment_mode==="manual"&&p.jsx("p",{className:"text-xs text-muted-foreground",children:"Assign each player to a group in the roster, then generate groups."})]}),p.jsxs("div",{className:"pt-2 border-t border-border space-y-2",children:[p.jsxs(wt,{onClick:k,disabled:h||t.length===0,className:"w-full gap-2 bg-primary text-primary-foreground hover:bg-primary/90",children:[e.assignment_mode==="random"?p.jsx(IA,{className:"w-4 h-4"}):p.jsx(nw,{className:"w-4 h-4"}),h?"Generating...":"Generate Groups"]}),p.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"This moves the event into the group stage."})]})]}):p.jsx("p",{className:"text-sm text-muted-foreground",children:"Only admins can configure and generate groups."})]})]})}function nW(e){const t=[...e];t.length%2!==0&&t.push(null);const n=t.length;if(n<2)return[];const r=n/2,i=[];for(let a=0;a<n-1;a++){const l=[],u=[];for(let h=0;h<r;
362h++){const m=t[h],g=t[n-1-h];m&&g?l.push([m,g]):m?u.push(m):g&&u.push(g)}i.push({matches:l,byes:u});const d=t.slice(1);d.unshift(d.pop()),t.splice(0,t.length,t[0],...d)}return i}function rW({players:e,numGroups:t}){const n=Array.from({length:t},(a,l)=>e.filter(u=>u.group_number===l+1)),r=n.map(nW);return r.reduce((a,l)=>a+l.reduce((u,d)=>u+d.matches.length,0),0)===0?p.jsxs(Wt,{className:"p-6 bg-card border-border text-center",children:[p.jsx(Tu,{className:"w-8 h-8 text-muted-foreground mx-auto mb-2"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Groups must be generated before fixtures appear."})]}):p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[p.jsx(Tu,{className:"w-4 h-4 text-primary"}),p.jsx("p",{className:"text-sm",children:"Each player faces every other player in their group once, scheduled into rounds where each plays at most once. Record results in the standings table."})]}),p.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:n.map((a,l)=>{const u=r[l],d=u.reduce((h,m)=>h+m.matches.length,0);return p.jsxs(Wt,{className:"bg-card border-border overflow-hidden",children:[p.jsx("div",{className:"px-4 py-3 border-b border-border bg-secondary/30",children:p.jsxs("h4",{className:"font-semibold text-foreground flex items-center gap-2",children:[p.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-md bg-primary/20 text-primary text-sm font-mono",children:l+1}),"Group ",l+1," Fixtures",p.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-auto",children:[d," match",d===1?"":"es"]})]})}),p.jsx("div",{className:"divide-y divide-border/40",children:u.map((h,m)=>p.jsxs("div",{className:"px-4 py-2.5",children:[p.jsxs("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground/70 mb-1.5",children:["Round ",m+1]}),p.jsxs("div",{className:"space-y-1.5",children:[h.matches.map((g,x)=>p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:"text-muted-foreground font-mono text-xs w-5 shrink-0",children:x+1}),p.jsx("span",{className:"font-medium text-foreground flex-1 truncate text-right",children:g[0].player_name}),p.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground/70 px-1",children:"vs"}),p.jsx("span",{className:"font-medium text-foreground flex-1 truncate",children:g[1].player_name})]},x)),h.byes.map((g,x)=>p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx("span",{className:"text-muted-foreground font-mono text-xs w-5 shrink-0"}),p.jsx("span",{className:"font-medium text-muted-foreground/70 flex-1 truncate text-right",children:g.player_name}),p.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground/50 px-1",children:"bye"}),p.jsx("span",{className:"flex-1"})]},`bye-${x}`))]})]},m))})]},l)})})]})}function sW({groupNum:e,rows:t,onUpdate:n,editable:r=!0}){const i=[...t].sort((a,l)=>Pu(l.wins,l.draws,l.losses)-Pu(a.wins,a.draws,a.losses)||(l.kills||0)-(a.kills||0));return p.jsxs(Wt,{className:"bg-card border-border overflow-hidden",children:[p.jsx("div",{className:"px-4 py-3 border-b border-border bg-secondary/30",children:p.jsxs("h4",{className:"font-semibold text-foreground flex items-center gap-2",children:[p.jsx("span",{className:"flex items-center justify-center w-6 h-6 rounded-md bg-primary/20 text-primary text-sm font-mono",children:e}),"Group ",e]})}),p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"text-muted-foreground text-left border-b border-border text-xs",children:[p.jsx("th",{className:"px-3 py-2 font-medium",children:"Player"}),p.jsx("th",{className:"px-2 py-2 font-medium text-center",children:"P"}),p.jsx("th",{className:"px-2 py-2 font-medium text-center",children:"W"}),p.jsx("th",{className:"px-2 py-2 font-medium text-center",children:"D"}),p.jsx("th",{className:"px-2 py-2 font-medium text-center",children:"L"}),p.jsx("th",{className:"px-2 py-2 font-medium text-center",children:"Kills"}),p.jsx("th",{className:"px-3 py-2 font-medium text-right",children:"Pts"})]})}),p.jsx("tbody",{children:i.map(a=>p.jsxs("tr",{className:"border-b border-border/40 last:border-0",children:[p.jsx("td",{className:"px-3 py-2 font-medium text-foreground whitespace-nowrap",children:a.player_name}),p.jsx("td",{className:"px-2 py-2 text-center text-muted-foreground font-mono",children:VR(a.wins,a.draws,a.losses)}),p.jsx("td",{className:"px-2 py-2 text-center",children:p.jsx("input",{type:"number",min:"0",value:a.wins||0,readOnly:!r,onChange:l=>n(a.id,"wins",l.target.value),className:"w-12 bg-background border border-input rounded text-center py-1 text-foreground focus:outline-none focus:border-primary"})}),p.jsx("td",{className:"px-2 py-2 text-center",children:p.jsx("input",{type:"number",min:"0",value:a.draws||0,readOnly:!r,onChange:l=>n(a.id,"draws",l.target.value),className:"w-12 bg-background border border-input rounded text-center py-1 text-foreground focus:outline-none focus:border-primary"})}),p.jsx("td",{className:"px-2 py-2 text-center",children:p.jsx("input",{type:"number",min:"0",value:a.losses||0,readOnly:!r,onChange:l=>n(a.id,"losses",l.target.value),className:"w-12 bg-background border border-input rounded text-center py-1 text-foreground focus:outline-none focus:border-primary"})}),p.jsx("td",{className:"px-2 py-2 text-center",children:p.jsx("input",{type:"number",min:"0",value:a.kills||0,readOnly:!r,onChange:l=>n(a.id,"kills",l.target.value),className:"w-14 bg-background border border-input rounded text-center py-1 text-foreground focus:outline-none focus:border-primary"})}),p.jsx("td",{className:"px-3 py-2 text-right font-mono font-bold text-accent",children:Pu(a.wins,a.draws,a.losses)})]},a.id))})]})})]})}function oW({event:e,players:t,onChanged:n,onAdvance:r,isAdmin:i=!1}
362){const[a,l]=v.useState(t),[u,d]=v.useState(!1);v.useEffect(()=>{l(t)},[t]);const h=e.number_of_groups||2,m=Array.from({length:h},(_,b)=>a.filter(C=>C.group_number===b+1)),g=(_,b,C)=>{l(E=>E.map(P=>P.id===_?{...P,[b]:Number(C)||0}:P))},x=async()=>{d(!0);try{await De.entities.EventPlayer.bulkUpdate(a.map(_=>({id:_.id,wins:_.wins||0,draws:_.draws||0,losses:_.losses||0,kills:_.kills||0,games_played:VR(_.wins,_.draws,_.losses),points:Pu(_.wins,_.draws,_.losses)}))),n()}finally{d(!1)}},S=async()=>{await x(),await De.entities.Event.update(e.id,{status:"knockout"}),r()};return p.jsxs("div",{className:"space-y-5",children:[p.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[p.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[p.jsx(NS,{className:"w-4 h-4"}),p.jsxs("p",{className:"text-sm",children:["Enter each player's results. Points auto-calculate: ",p.jsx("span",{className:"text-primary font-medium",children:"W=3"}),", ",p.jsx("span",{className:"text-accent font-medium",children:"D=2"}),", ",p.jsx("span",{className:"text-muted-foreground font-medium",children:"L=1"}),"."]})]}),i&&p.jsxs("div",{className:"flex gap-2",children:[p.jsxs(wt,{onClick:x,disabled:u,variant:"outline",className:"gap-2 border-border bg-transparent text-foreground hover:bg-secondary",children:[p.jsx(OA,{className:"w-4 h-4"})," ",u?"Saving...":"Save"]}),p.jsxs(wt,{onClick:S,disabled:u,className:"gap-2 bg-primary text-primary-foreground hover:bg-primary/90",children:["Advance to Knockout ",p.jsx(tA,{className:"w-4 h-4"})]})]})]}),p.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:m.map((_,b)=>p.jsx(sW,{groupNum:b+1,rows:_,onUpdate:g,editable:i},b))}),p.jsx(rW,{players:t,numGroups:h})]})}const lS=e=>{const t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`},cS=e=>`${lS(e)}â${lS(e+1)}`;function NT({match:e,onPick:t,disabled:n}){const r=e.status==="completed",i=(a,l)=>{const u=r&&e.winner_id===a,d=r&&e.loser_id===a,h=!a;return p.jsx("button",{type:"button",disabled:r||n||h,onClick:()=>t(e,a),className:`w-full text-left px-3 py-2 rounded-md border text-sm font-medium transition-colors ${h?"border-dashed border-border bg-transparent text-muted-foreground/50 cursor-not-allowed":u?"border-primary bg-primary/15 text-primary":d?"border-border bg-secondary/30 text-muted-foreground line-through opacity-60":"border-border bg-secondary/40 text-foreground hover:border-primary/50"} ${r?"cursor-default":"cursor-pointer"}`,children:l||"TBD"})};return p.jsxs("div",{className:"rounded-lg border border-border bg-card p-2.5 space-y-1.5 min-w-[12rem]",children:[e.label&&p.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e.label}),i(e.player_a_id,e.player_a_name),p.jsx("div",{className:"text-center text-[10px] text-muted-foreground/60",children:"vs"}),i(e.player_b_id,e.player_b_name)]})}function iW({title:e,matches:t,onPick:n,disabled:r}){return t.length===0?null:p.jsxs(Wt,{className:"bg-card border-border overflow-hidden",children:[p.jsxs("div",{className:"px-4 py-3 border-b border-border bg-secondary/30 flex items-center gap-2",children:[p.jsx("h4",{className:"font-semibold text-foreground",children:e}),p.jsxs("span",{className:"text-xs font-normal text-muted-foreground ml-auto",children:[t.length," match",t.length===1?"":"es"]})]}),p.jsx("div",{className:"p-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:t.map(i=>p.jsx(NT,{match:i,onPick:n,disabled:r},i.id))})]})}function aW({event:e,players:t,onComplete:n,isAdmin:r=!1}){const i=e.number_of_groups||2,[a,l]=v.useState([]),[u,d]=v.useState(!0),[h,m]=v.useState(!1),g=W=>t.find(te=>te.id===W)||{},x=W=>{const te=g(W);return(te.points||0)*1e3+(te.kills||0)},S=W=>[...W].sort((te,Y)=>x(Y.id)-x(te.id)),_=()=>{const te=a.filter(Y=>Y.bracket==="championship"&&Y.round===1).length*2;return te>=2?Math.log2(te):0},b=(W,te,Y,ee,V)=>({event_id:e.id,bracket:"championship",round:W,slot:te,label:Y,player_a_id:(ee==null?void 0:ee.id)||"",player_a_name:(ee==null?void 0:ee.player_name)||"",player_b_id:(V==null?void 0:V.id)||"",player_b_name:(V==null?void 0:V.player_name)||"",status:"pending"}),C=(W,te,Y,ee)=>({event_id:e.id,bracket:"placement",round:1,slot:te,label:cS(W),position_high:W,player_a_id:Y.id,player_a_name:Y.name,player_b_id:ee.id,player_b_name:ee.name,status:"pending"}),E=(W,te)=>({event_id:e.id,bracket:"third_place",round:1,slot:0,label:cS(3),position_high:3,player_a_id:W.id,player_a_name:W.name,player_b_id:te.id,player_b_name:te.name,status:"pending"}),P=async()=>{let W=await De.entities.KnockoutMatch.filter({event_id:e.id});if(W.length===0){const te=rS(t,i);if(te.length>=2){const Y=Math.log2(te.length),ee=te.length,V=[];Vz(te).forEach((Q,ce)=>V.push(b(1,ce,pp(1,Y),Q.a,Q.b)));for(let Q=2;Q<=Y;Q++){const ce=Math.pow(2,Y-Q);for(let X=0;X<ce;
362X++)V.push(b(Q,X,pp(Q,Y),null,null))}const $=te.map(Q=>Q.id),j=t.filter(Q=>!$.includes(Q.id)).sort((Q,ce)=>x(ce.id)-x(Q.id)).map(Q=>({id:Q.id,name:Q.player_name}));let q=ee+1,ie=0;for(let Q=0;Q+1<j.length;Q+=2)V.push(C(q,ie++,j[Q],j[Q+1])),q+=2;await De.entities.KnockoutMatch.bulkCreate(V),W=await De.entities.KnockoutMatch.filter({event_id:e.id})}}l(W),d(!1)};v.useEffect(()=>{P()},[e.id]);const T=(W,te)=>a.filter(Y=>Y.bracket===W&&Y.round===te).sort((Y,ee)=>(Y.slot||0)-(ee.slot||0)),k=async(W,te,Y)=>{if(te!=="championship")return W;const ee=W.filter(X=>X.bracket==="championship"&&X.round===Y).sort((X,Z)=>(X.slot||0)-(Z.slot||0));if(ee.length===0||ee.some(X=>X.status!=="completed"))return W;const V=W.filter(X=>X.bracket==="championship"&&X.round===1),H=Math.log2(V.length*2),$=V.length*2,j=X=>S(X.map(Z=>({id:Z.loser_id,name:Z.loser_name})).filter(Z=>Z.id)),q=X=>W.some(Z=>Z.bracket==="placement"&&Z.position_high===X),ie=[];let Q=0;if(Y+1===H&&!W.some(X=>X.bracket==="third_place")){const X=j(ee);X.length>=2&&ie.push(E(X[0],X[1]))}if(H>=3&&Y===H-2&&!q(5)){const X=j(ee),Z=X.slice(0,2),de=X.slice(2,4);Z.length===2&&ie.push(C(5,Q++,Z[0],Z[1])),de.length===2&&ie.push(C(7,Q++,de[0],de[1]))}if(H>=4&&Y===1&&!q($/2+1)){const X=j(ee);let Z=$/2+1;for(let de=0;de+1<X.length;de+=2)ie.push(C(Z,Q++,X[de],X[de+1])),Z+=2}if(ie.length===0)return W;const ce=await De.entities.KnockoutMatch.bulkCreate(ie);return[...W,...ce]},N=async(W,te)=>{m(!0);const Y=te===W.player_a_id?W.player_a_name:W.player_b_name,ee=te===W.player_a_id?W.player_b_id:W.player_a_id,V=te===W.player_a_id?W.player_b_name:W.player_a_name,H={winner_id:te,winner_name:Y,loser_id:ee,loser_name:V,status:"completed"},$=a;let j=a.map(ie=>ie.id===W.id?{...ie,...H}:ie);const q=[];if(W.bracket==="championship"){const ie=j.find(Q=>Q.bracket==="championship"&&Q.round===W.round+1&&Q.slot===Math.floor(W.slot/2));if(ie){const ce=W.slot%2===0?{player_a_id:te,player_a_name:Y}:{player_b_id:te,player_b_name:Y};q.push({id:ie.id,patch:ce}),j=j.map(X=>X.id===ie.id?{...X,...ce}:X)}}l(j);try{await De.entities.KnockoutMatch.update(W.id,H);for(const Q of q)await De.entities.KnockoutMatch.update(Q.id,Q.patch);const ie=await k(j,W.bracket,W.round);l(ie)}catch(ie){l($),rl({title:"Failed to save result",description:(ie==null?void 0:ie.message)||"Please try again",variant:"destructive"})}finally{m(!1)}},D=async()=>{confirm("Reset the entire knockout bracket? All recorded results will be cleared.")&&(m(!0),await De.entities.KnockoutMatch.deleteMany({event_id:e.id}),l([]),await P(),m(!1))},B=()=>a.length>0&&a.every(W=>W.status==="completed"),O=()=>{const W={},te=(Q,ce)=>{Q&&(W[Q]=ce)},Y=a.filter(Q=>Q.bracket==="championship"&&Q.round===1),ee=Math.log2(Y.length*2),V=a.find(Q=>Q.bracket==="championship"&&Q.round===ee&&Q.status==="completed");V&&(te(V.winner_id,1),te(V.loser_id,2));const H=a.find(Q=>Q.bracket==="third_place"&&Q.status==="completed");H&&(te(H.winner_id,3),te(H.loser_id,4)),a.filter(Q=>Q.bracket==="placement"&&Q.status==="completed").forEach(Q=>{te(Q.winner_id,Q.position_high),te(Q.loser_id,Q.position_high+1)});const $=t.length,j=new Set(Object.values(W)),q=[];for(let Q=1;Q<=$;Q++)j.has(Q)||q.push(Q);return q.sort((Q,ce)=>Q-ce),t.filter(Q=>!W[Q.id]).sort((Q,ce)=>x(ce.id)-x(Q.id)).forEach((Q,ce)=>{ce<q.length&&te(Q.id,q[ce])}),W},G=async()=>{m(!0);const W=O();await De.entities.EventPlayer.bulkUpdate(t.map(te=>({id:te.id,final_position:W[te.id]||null,league_points:wi(W[te.id])}))),await De.entities.Event.update(e.id,{status:"complete"}),m(!1),n()};if(u)return p.jsx("div",{className:"flex items-center justify-center py-16",children:p.jsx("div",{className:"w-8 h-8 border-4 border-border border-t-primary rounded-full animate-spin"})});const J=_(),se=J?Array.from({length:J},(W,te)=>te+1):[],ue=a.filter(W=>W.bracket==="placement"||W.bracket==="third_place").sort((W,te)=>(W.position_high||0)-(te.position_high||0));return rS(t,i).length<2?p.jsxs(Wt,{className:"p-6 bg-card border-border text-center",children:[p.jsx(Tu,{className:"w-8 h-8 text-muted-foreground mx-auto mb-2"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"At least 2 players with group assignments are needed to generate a knockout bracket."})]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs(Wt,{className:"p-4 bg-secondary/30 border-border flex items-start gap-3",children:[p.jsx(pA,{className:"w-4 h-4 text-accent shrink-0 mt-0.5"}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["The bracket is seeded from group standings (top 2 per group) and runs",p.jsx("span",{className:"text-foreground font-medium",children:" Preliminary Round â Quarter-finals â Semi-finals â Final "}),"(the Preliminary Round only appears with 9+ qualifiers). Eliminated players then play",p.jsx("span",{className:"text-accent font-medium",children:" positional matches"})," (3rdâ4th, 5thâ6th, 7thâ8th, 9thâ10th â¦) so everyone earns a final placing. League points are awarded from final positions when you complete the event."]})]}),p.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[p.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[p.jsx(Tu,{className:"w-5 h-5 text-primary"}),p.jsx("h3",{className:"font-semibold",children:"Championship"})]}),r&&p.jsxs(wt,{onClick:D,disabled:h||!r,variant:"outline",size:"sm",className:"gap-2 border-border bg-transparent text-muted-foreground hover:text-foreground",children:[p.jsx(AA,{className:"w-3.5 h-3.5"})," Reset Bracket"]})]}),se.map(W=>p.jsx(iW,{title:pp(W,J),matches:T("championship",W),onPick:N,disabled:h||!r},W)),ue.length>0&&p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2 mb-3 text-foreground",children:[p.jsx(vp,{className:"w-5 h-5 text-accent"}),p.jsx("h3",{className:"font-semibold",children:"Positional Playoffs"})]}),p.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:ue.map(W=>p.jsx(NT,{match:W,onPick:N,disabled:h||!r},W.id))})]}),p.jsxs("div",{className:"grid md:grid-cols-2 gap-4 pt-2",children:[p.jsxs(Wt,{className:"p-5 bg-card border-border",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[p.jsx(ku,{className:"w-5 h-5 text-accent"}),p.jsx("h4",{className:"font-semibold text-foreground",children:"Projected Standings"})]}),p.jsx(lW,{players:t,computePositions:O})]}),p.jsxs(Wt,{className:"p-5 bg-card border-border",children:[p.jsx("h4",{className:"font-semibold text-foreground mb-2 text-sm",children:"League Points Table"}),p.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[Object.entries({1:15,2:10,3:8,4:7,5:6,6:5,7:4,8:3,9:2,10:1}).map(([W,te])=>p.jsxs("div",{className:"flex justify-between text-muted-foreground",children:[p.jsxs("span",{children:[W,W==="1"?"st":W==="2"?"nd":W==="3"?"rd":"th"]}),p.jsx("span",{className:"font-mono text-accent",children:te})]},W)),p.jsxs("div",{className:"flex justify-between text-muted-foreground col-span-2 border-t border-border pt-1 mt-1",children:[p.jsx("span",{children:"11th+"}),p.jsx("span",{className:"font-mono",children:"0"})]})]}),r&&p.jsxs(wt,{onClick:G,disabled:h||!B(),className:"w-full mt-4 gap-2 bg-primary text-primary-foreground hover:bg-primary/90",children:[p.jsx(_m,{className:"w-4 h-4"})," ",h?"Working...":"Complete Event"]}),!B()&&p.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Complete every championship and positional match to finalise."})]})]})]})}function lW({players:e,computePositions:t}){const n=t(),r=l=>e.find(u=>u.id===l)||{},i=Object.entries(n).map(([l,u])=>({id:l,name:r(l).player_name||"â",pos:u}));if(i.length===0)return p.jsx("p",{className:"text-sm text-muted-foreground",children:"Positions appear as results are recorded."});i.sort((l,u)=>l.pos-u.pos);const a=l=>
362l===1?"ð¥":l===2?"ð¥":l===3?"ð¥":null;return p.jsx("div",{className:"space-y-1.5 max-h-72 overflow-y-auto",children:i.map(l=>p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 rounded-md bg-secondary/40",children:[p.jsxs("span",{className:"flex items-center gap-2 text-sm text-foreground font-medium",children:[a(l.pos)&&p.jsx("span",{children:a(l.pos)}),l.name]}),p.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[l.pos,l.pos===1?"st":l.pos===2?"nd":l.pos===3?"rd":"th",wi(l.pos)>0?` · +${wi(l.pos)}`:""]})]},l.id))})}function cW({players:e}){const t=[...e].filter(r=>r.final_position).sort((r,i)=>r.final_position-i.final_position),n=r=>r===1?"ð¥":r===2?"ð¥":r===3?"ð¥":null;return p.jsxs("div",{className:"grid lg:grid-cols-2 gap-5",children:[p.jsxs(Wt,{className:"p-5 bg-card border-border",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx(ku,{className:"w-5 h-5 text-accent"}),p.jsx("h3",{className:"font-semibold text-foreground",children:"Final Placings"})]}),p.jsx("div",{className:"space-y-1.5",children:t.map(r=>p.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 rounded-md bg-secondary/40",children:[p.jsxs("span",{className:"flex items-center gap-3 text-foreground",children:[p.jsx("span",{className:"font-mono text-sm text-muted-foreground w-6",children:r.final_position}),n(r.final_position)&&p.jsx("span",{className:"text-lg",children:n(r.final_position)}),p.jsx("span",{className:"font-medium",children:r.player_name})]}),p.jsx("span",{className:`font-mono text-sm ${wi(r.final_position)>0?"text-accent font-bold":"text-muted-foreground"}`,children:wi(r.final_position)>0?`+${wi(r.final_position)}`:"0"})]},r.id))})]}),p.jsxs(Wt,{className:"p-5 bg-card border-border",children:[p.jsx("h3",{className:"font-semibold text-foreground mb-4",children:"Group Stage Recap"}),p.jsx("div",{className:"space-y-1.5",children:[...e].sort((r,i)=>(i.points||0)-(r.points||0)||(i.kills||0)-(r.kills||0)).map((r,i)=>p.jsxs("div",{className:"flex items-center justify-between px-4 py-2 rounded-md bg-secondary/40 text-sm",children:[p.jsxs("span",{className:"flex items-center gap-3 text-foreground",children:[p.jsx("span",{className:"font-mono text-xs text-muted-foreground w-6",children:i+1}),p.jsx("span",{className:"font-medium",children:r.player_name})]}),p.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[p.jsxs("span",{className:"text-xs",children:[r.wins,"W ",r.draws,"D ",r.losses,"L"]}),p.jsxs("span",{className:"text-xs",children:[r.kills," kills"]}),p.jsx("span",{className:"font-mono text-accent font-bold",children:r.points||0})]})]},r.id))})]})]})}const uW=[{key:"setup",label:"Setup"},{key:"groups",label:"Groups"},{key:"knockout",label:"Knockout"},{key:"results",label:"Results"}];function dW(){const{id:e}=o2(),t=sd(),[n,r]=v.useState(null),[i,a]=v.useState([]),[l,u]=v.useState(!0),[d,h]=v.useState("setup"),{user:m}=Pg(),g=(m==null?void 0:m.role)==="admin",x=async()=>{try{const[S,_]=await Promise.all([De.entities.Event.get(e),De.entities.EventPlayer.filter({event_id:e})]);r(S),a(_),h(S.status)}finally{u(!1)}};return v.useEffect(()=>{x()},[e]),l?p.jsx("div",{className:"min-h-screen flex items-center justify-center",children:p.jsx("div",{className:"w-8 h-8 border-4 border-border border-t-primary rounded-full animate-spin"})}):n?p.jsxs("div",{className:"min-h-screen",children:[p.jsx("header",{className:"border-b border-border bg-card/50 backdrop-blur sticky top-0 z-10 pt-safe",children:p.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-4",children:[p.jsxs("button",{onClick:()=>t("/"),className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-primary transition-colors mb-3",children:[p.jsx(RS,{className:"w-4 h-4"})," All Events"]}),p.jsx("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:p.jsxs("div",{className:"min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[p.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/15 flex items-center justify-center shrink-0",children:p.jsx(NS,{className:"w-5 h-5 text-primary"})}),p.jsx("h1",{className:"text-2xl font-bold text-foreground truncate",children:n.name}),p.jsx($R,{variant:"outline",className:"bg-primary/15 text-primary border-primary/30",children:zR[n.status]})]}),p.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mt-2 flex-wrap",children:[n.date&&p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(PS,{className:"w-3.5 h-3.5"}),new Date(n.date).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})]}),n.location&&p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(AS,{className:"w-3.5 h-3.5"}),n.location]}),p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(Nu,{className:"w-3.5 h-3.5"}),i.length," players"]})]})]})})]})}),p.jsxs("main",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-8",children:[p.jsx("div",{className:"flex gap-1 mb-6 border-b border-border overflow-x-auto",children:uW.map(S=>{const _=fW(S.key,n.status),b=d===S.key;return p.jsx("button",{onClick:()=>_&&h(S.key),disabled:!_,className:`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors whitespace-nowrap ${b?"border-primary text-primary":_?"border-transparent text-muted-foreground hover:text-foreground":"border-transparent text-muted-foreground
362/40 cursor-not-allowed"}`,children:S.label},S.key)})}),d==="setup"&&p.jsx(tW,{event:n,players:i,onChanged:x,onGroupsGenerated:x,isAdmin:g}),d==="groups"&&p.jsx(oW,{event:n,players:i,onChanged:x,onAdvance:x,isAdmin:g}),d==="knockout"&&p.jsx(aW,{event:n,players:i,onComplete:x,isAdmin:g}),d==="results"&&p.jsx(cW,{players:i})]}),p.jsx(WR,{})]}):p.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Event not found."})}function fW(e,t){const n=["setup","groups","knockout","results"],r=n.indexOf(t),i=n.indexOf(e);return t==="complete"?!0:i<=r}function qn({icon:e,title:t,subtitle:n,footer:r,children:i}){return p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:p.jsxs("div",{className:"w-full max-w-md",children:[p.jsxs("div",{className:"text-center mb-10",children:[p.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-primary mb-4",children:p.jsx(e,{className:"w-7 h-7 text-primary-foreground","aria-hidden":"true"})}),p.jsx("h1",{className:"text-3xl font-bold tracking-tight text-foreground",children:t}),n&&p.jsx("p",{className:"text-muted-foreground mt-2",children:n})]}),p.jsx("div",{className:"bg-card rounded-2xl shadow-sm border border-border p-8",children:i}),r&&p.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:r})]})})}function AT({className:e="w-5 h-5"}){return p.jsxs("svg",{className:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[p.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),p.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),p.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),p.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]})}function Ga(){const e=new URLSearchParams(window.location.search).get("returnTo");if(!e)return"/";try{const t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return"/";for(const r of["access_token","clear_access_token","app_id","app_base_url","functions_version","from_url"])t.searchParams.delete(r);const n=t.pathname+t.search;return!n.startsWith("/")||n.startsWith("//")||n.includes("\\")?"/":n}catch{return"/"}}function hW(){const[e,t]=v.useState(""),[n,r]=v.useState(""),[i,a]=v.useState(""),[l,u]=v.useState(!1),d=Ga(),h=async g=>{g.preventDefault(),a(""),u(!0);try{await De.auth.loginViaEmailPassword(e,n),window.location.href=d}catch(x){a(x.message||"Invalid email or password")}finally{u(!1)}},m=()=>{De.auth.loginWithProvider("google",d)};return p.jsxs(qn,{icon:vA,title:"Welcome back",subtitle:"Log in to your account",footer:p.jsxs(p.Fragment,{children:["Don't have an account?"," ",p.jsx(Mi,{to:"/register"+(d!=="/"?"?returnTo="+encodeURIComponent(d):""),className:"text-primary font-medium hover:underline",children:"Create one"})]}),children:[p.jsxs(wt,{variant:"outline",className:"w-full h-12 text-sm font-medium mb-6",onClick:m,children:[p.jsx(AT,{className:"w-5 h-5 mr-2"}),"Continue with Google"]}),p.jsxs("div",{className:"relative mb-6",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full border-t border-border"})}),p.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:p.jsx("span",{className:"bg-card px-3 text-muted-foreground",children:"or"})})]}),i&&p.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:i}),p.jsxs("form",{onSubmit:h,className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"email",children:"Email"}),p.jsxs("div",{className:"relative",children:[p.jsx(sl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"email",type:"email",autoComplete:"email",autoFocus:!0,placeholder:"[email protected]",value:e,onCh
362ange:g=>t(g.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx(Ut,{htmlFor:"password",children:"Password"}),p.jsx(Mi,{to:"/forgot-password",className:"text-xs text-primary hover:underline",children:"Forgot password?"})]}),p.jsxs("div",{className:"relative",children:[p.jsx(mi,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"password",type:"password",autoComplete:"current-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:g=>r(g.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsx(wt,{type:"submit",className:"w-full h-12 font-medium",disabled:l,children:l?p.jsxs(p.Fragment,{children:[p.jsx(xo,{className:"w-4 h-4 mr-2 animate-spin"}),"Logging in..."]}):"Log in"})]})]})}var pW=Object.defineProperty,mW=Object.defineProperties,gW=Object.getOwnPropertyDescriptors,ed=Object.getOwnPropertySymbols,jT=Object.prototype.hasOwnProperty,OT=Object.prototype.propertyIsEnumerable,uS=(e,t,n)=>t in e?pW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yW=(e,t)=>{for(var n in t||(t={}))jT.call(t,n)&&uS(e,n,t[n]);if(ed)for(var n of ed(t))OT.call(t,n)&&uS(e,n,t[n]);return e},vW=(e,t)=>mW(e,gW(t)),xW=(e,t)=>{var n={};for(var r in e)jT.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ed)for(var r of ed(e))t.indexOf(r)<0&&OT.call(e,r)&&(n[r]=e[r]);return n};function wW(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function bW(e){let t=v.useRef();return v.useEffect(()=>{t.current=e}),t.current}var SW=18,MT=40,EW=`${MT}px`,CW=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function _W({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=v.useState(!1),[l,u]=v.useState(!1),[d,h]=v.useState(!1),m=v.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&l,[i,l,n]),g=v.useCallback(()=>{let x=e.current,S=t.current;if(!x||!S||d||n==="none")return;let _=x,b=_.getBoundingClientRect().left+_.offsetWidth,C=_.getBoundingClientRect().top+_.offsetHeight/2,E=b-SW,P=C;document.querySelectorAll(CW).length===0&&document.elementFromPoint(E,P)===x||(a(!0),h(!0))},[e,t,d,n]);return v.useEffect(()=>{let x=e.current;if(!x||n==="none")return;function S(){let b=window.innerWidth-x.getBoundingClientRect().right;u(b>=MT)}S();let _=setInterval(S,1e3);return()=>{clearInterval(_)}},[e,n]),v.useEffect(()=>{let x=r||document.activeElement===t.current;if(n==="none"||!x)return;let S=setTimeout(g,0),_=setTimeout(g,2e3),b=setTimeout(g,5e3),C=setTimeout(()=>{h(!0)},6e3);return()=>{clearTimeout(S),clearTimeout(_),clearTimeout(b),clearTimeout(C)}},[t,r,n,g]),{hasPWMBadge:i,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:EW}}var DT=v.createContext({}),LT=v.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:l="left",pattern:u,placeholder:d,inputMode:h="numeric",onComplete:m,pushPasswordManagerStrategy:g="increase-width",pasteTransformer:x,containerClassName:S,noScriptCSSFallback:_=RW,render:b,children:C}=n,E=xW(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),P,T,k,N,D;let[B,O]=v.useState(typeof E.defaultValue=="string"?E.defaultValue:""),G=r??B,J=bW(G),se=v.useCallback(ge=>{i==null||i(ge),O(ge)},[i]),ue=v.useMemo(()=>u?typeof u=="string"?new RegExp(u):u:null,[u]),ae=v.useRef(null),W=v.useRef(null),te=v.useRef({value:G,onChange:se,isIOS:typeof window<"u"&&((T=(P=window==null?void 0:window.CSS)==null?void 0:P.supports)==null?void 0:T.call(P,"-webkit-touch-callout","none"))}),Y=v.useRef({prev:[(k=ae.current)==null?void 0:k.selectionStart,(N=ae.current)==null?void 0:N.selectionEnd,(D=ae.current)==null?void 0:D.selectionDirection]});v.useImperativeHandle(t,()=>ae.current,[]),v.useEffect(()=>{let ge=ae.current,Ce=W.current;if(!ge||!Ce)return;te.current.value!==ge.value&&te.current.onChange(ge.value),Y.current.prev=[ge.selectionStart,ge.selectionEnd,ge.selectionDirection];function ye(){if(document.activeElement!==ge){q(null),Q(null);return}let Le=ge.selectionStart,lt=ge.selectionEnd,on=ge.selectionDirection,ft=ge.maxLength,Xn=ge.value,gn=Y.current.prev,Nn=-1,An=-1,jn;if(Xn.length!==0&&Le!==null&<!==null){let Is=Le===lt,Od=Le===Xn.length&&Xn.length<ft;if(Is&&!Od){let Jn=Le;if(Jn===0)Nn=0,An=1,jn="forward";else if(Jn===ft)Nn=Jn-1,An=Jn,jn="backward";else if(ft>1&&Xn.length>1){let Oo=0;if(gn[0]!==null&&gn[1]!==null){jn=Jn<gn[1]?"backward":"forward";let Md=gn[0]===gn[1]&&gn[0]<ft;jn==="backward"&&!Md&&(Oo=-1)}Nn=Oo+Jn,An=Oo+Jn+1}}Nn!==-1&&An!==-1&&Nn!==An&&ae.current.setSelectionRange(Nn,An,jn)}let Ds=Nn!==-1?Nn:Le,Qi=An!==-1?An:lt,Ls=jn??on;q(Ds),Q(Qi),Y.current.prev=[Ds,Qi,Ls]}if(document.addEventListener("selectionchange",ye,{capture:!0}),ye(),document.activeElement===ge&&$(!0),!document.getElementById("input-otp-style")){let Le=document.createElement("style");if(Le.id="input-otp-style",document.head.appendChild(Le),Le.sheet){let lt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ba(Le.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ba(Le.sheet,`[data-input-otp]:autofill { ${lt} }`),Ba(Le.sheet,`[data-input-otp]:-webkit-autofill { ${lt} }
362`),Ba(Le.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ba(Le.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Be=()=>{Ce&&Ce.style.setProperty("--root-height",`${ge.clientHeight}px`)};Be();let Je=new ResizeObserver(Be);return Je.observe(ge),()=>{document.removeEventListener("selectionchange",ye,{capture:!0}),Je.disconnect()}},[]);let[ee,V]=v.useState(!1),[H,$]=v.useState(!1),[j,q]=v.useState(null),[ie,Q]=v.useState(null);v.useEffect(()=>{wW(()=>{var ge,Ce,ye,Be;(ge=ae.current)==null||ge.dispatchEvent(new Event("input"));let Je=(Ce=ae.current)==null?void 0:Ce.selectionStart,Le=(ye=ae.current)==null?void 0:ye.selectionEnd,lt=(Be=ae.current)==null?void 0:Be.selectionDirection;Je!==null&&Le!==null&&(q(Je),Q(Le),Y.current.prev=[Je,Le,lt])})},[G,H]),v.useEffect(()=>{J!==void 0&&G!==J&&J.length<a&&G.length===a&&(m==null||m(G))},[a,m,J,G]);let ce=_W({containerRef:W,inputRef:ae,pushPasswordManagerStrategy:g,isFocused:H}),X=v.useCallback(ge=>{let Ce=ge.currentTarget.value.slice(0,a);if(Ce.length>0&&ue&&!ue.test(Ce)){ge.preventDefault();return}typeof J=="string"&&Ce.length<J.length&&document.dispatchEvent(new Event("selectionchange")),se(Ce)},[a,se,J,ue]),Z=v.useCallback(()=>{var ge;if(ae.current){let Ce=Math.min(ae.current.value.length,a-1),ye=ae.current.value.length;(ge=ae.current)==null||ge.setSelectionRange(Ce,ye),q(Ce),Q(ye)}$(!0)},[a]),de=v.useCallback(ge=>{var Ce,ye;let Be=ae.current;if(!x&&(!te.current.isIOS||!ge.clipboardData||!Be))return;let Je=ge.clipboardData.getData("text/plain"),Le=x?x(Je):Je;ge.preventDefault();let lt=(Ce=ae.current)==null?void 0:Ce.selectionStart,on=(ye=ae.current)==null?void 0:ye.selectionEnd,ft=(lt!==on?G.slice(0,lt)+Le+G.slice(on):G.slice(0,lt)+Le+G.slice(lt)).slice(0,a);if(ft.length>0&&ue&&!ue.test(ft))return;Be.value=ft,se(ft);let Xn=Math.min(ft.length,a-1),gn=ft.length;Be.setSelectionRange(Xn,gn),q(Xn),Q(gn)},[a,se,ue,G]),fe=v.useMemo(()=>({position:"relative",cursor:E.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[E.disabled]),ke=v.useMemo(()=>({position:"absolute",inset:0,width:ce.willPushPWMBadge?`calc(100% + ${ce.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ce.willPushPWMBadge?`inset(0 ${ce.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:l,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ce.PWM_BADGE_SPACE_WIDTH,ce.willPushPWMBadge,l]),Me=v.useMemo(()=>v.createElement("input",vW(yW({autoComplete:E.autoComplete||"one-time-code"},E),{"data-input-otp":!0,"data-input-otp-placeholder-shown":G.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":ie,inputMode:h,pattern:ue==null?void 0:ue.source,"aria-placeholder":d,style:ke,maxLength:a,value:G,ref:ae,onPaste:ge=>{var Ce;de(ge),(Ce=E.onPaste)==null||Ce.call(E,ge)},onChange:X,onMouseOver:ge=>{var Ce;V(!0),(Ce=E.onMouseOver)==null||Ce.call(E,ge)},onMouseLeave:ge=>{var Ce;V(!1),(Ce=E.onMouseLeave)==null||Ce.call(E,ge)},onFocus:ge=>{var Ce;Z(),(Ce=E.onFocus)==null||Ce.call(E,ge)},onBlur:ge=>{var Ce;$(!1),(Ce=E.onBlur)==null||Ce.call(E,ge)}})),[X,Z,de,h,ke,a,ie,j,E,ue==null?void 0:ue.source,G]),Ae=v.useMemo(()=>({slots:Array.from({length:a}).map((ge,Ce)=>{var ye;let Be=H&&j!==null&&ie!==null&&(j===ie&&Ce===j||Ce>=j&&Ce<ie),Je=G[Ce]!==void 0?G[Ce]:null,Le=G[0]!==void 0?null:(ye=d==null?void 0:d[Ce])!=null?ye:null;return{char:Je,placeholderChar:Le,isActive:Be,hasFakeCaret:Be&&Je===null}}),isFocused:H,isHovering:!E.disabled&&ee}),[H,ee,a,ie,j,E.disabled,G]),Xe=v.useMemo(()=>b?b(Ae):v.createElement(DT.Provider,{value:Ae},C),[C,Ae,b]);return v.createElement(v.Fragment,null,_!==null&&v.createElement("noscript",null,v.createElement("style",null,_)),v.createElement("div",{ref:W,"data-input-otp-container":!0,style:fe,className:S},Xe,v.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Me)))});LT.displayName="Input";function Ba(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var RW=` 363[data-input-otp] { 364 --nojs-bg: white !important; 365 --nojs-fg: black !important; 366 367 background-color: var(--nojs-bg) !important; 368 color: var(--nojs-fg) !important; 369 caret-color: var(--nojs-fg) !important; 370 letter-spacing: .25em !important; 371 text-align: center !important; 372 border: 1px solid var(--nojs-fg) !important; 373 border-radius: 4px !important; 374 width: 100% !important; 375} 376@media (prefers-color-scheme: dark) { 377 [data-input-otp] { 378 --nojs-bg: black !important; 379 --nojs-fg: white !important; 380 } 381}`;const IT=v.forwardRef(({className:e,containerClassName:t,...n},r)=>p.jsx(LT,{ref:r,containerClassName:Te("flex items-center gap-2 has-[:disabled]:opacity-50",t),className:Te("disabled:cursor-not-allowed",e),...n}));IT.displayName="InputOTP";const FT=v.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:Te("flex items-center",e),...t}));FT.displayName="InputOTPGroup";const ro=v.forwardRef(({index:e,className:t,...n},r)=>{const i=v.useContext(DT),{char:a,hasFakeCaret:l,isActive:u}=i.slots[e];return p.jsxs("div",{ref:r,className:Te("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",u&&"z-10 ring-1 ring-ring",t),...n,children:[a,l&&p.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:p.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});ro.displayName="InputOTPSlot";const PW=v.forwardRef(({...e},t)=>p.jsx("div",{ref:t,role:"separator",...e,children:p.jsx(_A,{})}));PW.displayName="InputOTPSeparator";function TW(){const[e,t]=v.useState(""),[n,r]=v.useState(""),[i,a]=v.useState(""),[l,u]=v.useState(""),[d,h]=v.useState(!1),[m,g]=v.useState(!1),[x,S]=v.useState(""),_=async P=>{if(P.preventDefault(),u(""),n!==i){u("Passwords do not match");return}h(!0);try{await De.auth.register({email:e,password:n}),g(!0)}catch(T){u(T.message||"Registration failed")}finally{h(!1)}},b=async()=>{u(""),h(!0);try{const P=await De.auth.verifyOtp({email:e,otpCode:x});P!=null&&P.access_token&&De.auth.setToken(P.access_token),window.location.href=Ga()}catch(P){u(P.message||"Invalid verification code")}finally{h(!1)}},C=async()=>{u("");try{await De.auth.resendOtp(e),rl({title:"Code sent",description:"Check your email for the new code."})}catch(P){u(P.message||"Failed to resend code")}},E=()=>{De.auth.loginWithProvider("google",Ga())};return m?p.jsxs(qn,{icon:sl,title:"Verify your email",subtitle:`We sent a code to ${e}`,children:[l&&p.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:l}),p.jsx("div",{className:"flex justify-center mb-6",children:p.jsx(IT,{maxLength:6,value:x,onChange:S,autoFocus:!0,autoComplete:"one-time-code",children:p.jsxs(FT,{children:[p.jsx(ro,{index:0}),p.jsx(ro,{index:1}),p.jsx(ro,{index:2}),p.jsx(ro,{index:3}),p.jsx(ro,{index:4}),p.jsx(ro,{index:5})]})})}),p.jsx(wt,{className:"w-full h-12 font-medium",onClick:b,disabled:d||x.length<6,children:d?p.jsxs(p.Fragment,{children:[p.jsx(xo,{className:"w-4 h-4 mr-2 animate-spin"}),"Verifying..."]}):"Verify"}),p.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-4",children:["Didn't receive the code?"," ",p.jsx("button",{onClick:C,className:"text-primary font-medium hover:underline",children:"Resend"})]})]}):p.jsxs(qn,{icon:OS,title:"Create your account",subtitle:"Sign up to get started",footer
381:p.jsxs(p.Fragment,{children:["Already have an account?"," ",p.jsx(Mi,{to:"/login"+(Ga()!=="/"?"?returnTo="+encodeURIComponent(Ga()):""),className:"text-primary font-medium hover:underline",children:"Log in"})]}),children:[p.jsxs(wt,{variant:"outline",className:"w-full h-12 text-sm font-medium mb-6",onClick:E,children:[p.jsx(AT,{className:"w-5 h-5 mr-2"}),"Continue with Google"]}),p.jsxs("div",{className:"relative mb-6",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full border-t border-border"})}),p.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:p.jsx("span",{className:"bg-card px-3 text-muted-foreground",children:"or"})})]}),l&&p.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:l}),p.jsxs("form",{onSubmit:_,className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"email",children:"Email"}),p.jsxs("div",{className:"relative",children:[p.jsx(sl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"email",type:"email",autoComplete:"email",autoFocus:!0,placeholder:"[email protected]",value:e,onChange:P=>t(P.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"password",children:"Password"}),p.jsxs("div",{className:"relative",children:[p.jsx(mi,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"password",type:"password",autoComplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:P=>r(P.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"confirm",children:"Confirm Password"}),p.jsxs("div",{className:"relative",children:[p.jsx(mi,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"confirm",type:"password",autoComplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:i,onChange:P=>a(P.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsx(wt,{type:"submit",className:"w-full h-12 font-medium",disabled:d,children:d?p.jsxs(p.Fragment,{children:[p.jsx(xo,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating account..."]}):"Create account"})]})]})}function kW(){const[e,t]=v.useState(""),[n,r]=v.useState(!1),[i,a]=v.useState(!1),l=async u=>{u.preventDefault(),r(!0);try{await De.auth.resetPasswordRequest(e)}catch{}finally{r(!1),a(!0)}};return p.jsx(qn,{icon:sl,title:"Reset password",subtitle:"We'll send you a link to reset it",footer:p.jsxs(Mi,{to:"/login",className:"text-primary font-medium hover:underline",children:[p.jsx(RS,{className:"w-3 h-3 inline mr-1"}),"Back to log in"]}),children:i?p.jsx("p",{className:"text-sm text-foreground text-center",children:"If an account exists with that email, you'll receive a password reset link shortly."}):p.jsxs("form",{onSubmit:l,className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"email",children:"Email address"}),p.jsxs("div",{className:"relative",children:[p.jsx(sl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"email",type:"email",autoComplete:"email",autoFocus:!0,placeholder:"[email protected]",value:e,onChange:u=>t(u.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsx(wt,{type:"submit",className:"w-full h-12 font-medium",disabled:n,children:n?p.jsxs(p.Fragment,{children:[p.jsx(xo,{className:"w-4 h-4 mr-2 animate-spin"}),"Sending..."]}):"Send reset link"})]})})}function NW(){const[e]=O2(),t=e.get("token"),[n,r]=v.useState(""),[i,a]=v.useState(""),[l,u]=v.useState(""),[d,h]=v.useState(!1),m=async g=>{if(g.preventDefault(),u(""),n!==i){u("Passwords do not match");return}h(!0);try{await De.auth.resetPassword({resetToken:t,newPassword:n}),window.location.href="/login"}catch(x){u(x.message||"Failed to reset password")}finally{h(!1)}};return t?p.jsxs(qn,{icon:mi,title:"New password",subtitle:"Enter your new password below",children:[l&&p.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:l}),p.jsxs("form",{onSubmit:m,className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"password",children:"New Password"}),p.jsxs("div",{className:"relative",children:[p.jsx(mi,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"password",type:"password",autoComplete:"new-password",autoFocus:!0,placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:g=>r(g.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ut,{htmlFor:"confirm",children:"Confirm Password"}),p.jsxs("div",{className:"relative",children:[p.jsx(mi,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),p.jsx(hn,{id:"confirm",type:"password",autoComplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:i,onChange:g=>a(g.target.value),className:"pl-10 h-12",required:!0})]})]}),p.jsx(wt,{type:"submit",className:"w-full h-12 font-medium",disabled:d,children:d?p.jsxs(p.Fragment,{children:[p.jsx(xo,{className:"w-4 h-4 mr-2 animate-spin"}),"Resetting..."]}):"Reset password"})]})]}):p.jsx(qn,{icon:zA,title:"Invalid reset link",subtitle:"This password reset link is missing or invalid",footer
381:p.jsx(Mi,{to:"/forgot-password",className:"text-primary font-medium hover:underline",children:"Request a new link"}),children:p.jsx("p",{className:"text-sm text-foreground text-center",children:"The link you used appears to be incomplete. Please request a new password reset email."})})}function AW(){const e=new URLSearchParams(window.location.search).get("ctx"),[t,n]=v.useState(null),[r,i]=v.useState(!0),[a,l]=v.useState(!1),[u,d]=v.useState(""),[h,m]=v.useState(""),[g,x]=v.useState("");v.useEffect(()=>{(async()=>{let E=!1;try{if(!e){m("This authorization link is invalid or has expired.");return}const P={};Hn.token&&(P.Authorization="Bearer "+Hn.token);const T=await fetch(`/api/apps/${Hn.appId}/mcp/consent-info?handle=${encodeURIComponent(e)}`,{credentials:"include",headers:P});if(!T.ok){m("This authorization link is invalid or has expired.");return}const k=await T.json();if(!k.authenticated){const N=window.location.pathname+"?ctx="+encodeURIComponent(e),D=encodeURIComponent(N);E=!0,window.location.href=(k.login_path||"/login")+"?returnTo="+D+"&from_url="+D;return}n(k)}catch{m("Could not load this authorization request. Please try again.")}finally{E||i(!1)}})()},[e]);const S=async E=>{l(!0),m("");try{const P={"Content-Type":"application/json"};Hn.token&&(P.Authorization="Bearer "+Hn.token);const T=await fetch(`/api/apps/${Hn.appId}/mcp/authorize-grant`,{method:"POST",credentials:"include",headers:P,body:JSON.stringify({ctx:e,action:E})});if(!T.ok){if(T.status===401){const N=window.location.pathname+"?ctx="+encodeURIComponent(e),D=encodeURIComponent(N);window.location.href=(t&&t.login_path||"/login")+"?returnTo="+D+"&from_url="+D;return}if([400,403,404,409].includes(T.status)){let N="";try{N=(await T.json()).detail}catch{}x(N||"This authorization can no longer be completed. Reconnect from your AI client to try again."),l(!1);return}throw new Error("Could not complete authorization. Please try again.")}const k=await T.json();window.location.href=k.redirect_url,/^https?:/i.test(k.redirect_url)||(d(E),l(!1))}catch(P){m(P.message),l(!1)}};if(r)return p.jsx(qn,{icon:Oa,title:"Authorize access",children:p.jsxs("div",{className:"flex items-center justify-center py-6 text-muted-foreground",children:[p.jsx(xo,{className:"w-5 h-5 mr-2 animate-spin","aria-hidden":"true"}),"Loadingâ¦"]})});const _=t&&t.client_name||"An AI client",b=t&&t.app_name||"this app";if(u)return p.jsx(qn,{icon:Oa,title:u==="approve"?"Access granted":"Access denied",subtitle:`You can return to ${_} and close this window.`});if(g)return p.jsx(qn,{icon:Oa,title:"Reconnect required",children:p.jsx("div",{className:"p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:g})});if(h&&!t)return p.jsx(qn,{icon:Oa,title:"Authorize access",children:p.jsx("div",{className:"p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:h})});const C=Array.isArray(t.tools)?t.tools:[];return p.jsxs(qn,{icon:Oa,title:"Authorize access",subtitle:`${_} wants to access ${b} on your behalf`,children:[h&&p.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:h}),p.jsx("p",{className:"text-sm font-medium text-foreground mb-2",children:C.length?`It will be able to use these tools in ${b}:`:"No tools requested"}),C.length>0&&p.jsx("ul",{className:"space-y-2 text-sm mb-6",children:C.map(E=>p.jsxs("li",{className:"flex flex-col",children:[p.jsx("span",{className:"text-foreground font-medium",children:E.title||E.name}),E.description&&p.jsx("span",{className:"text-muted-foreground",children:E.description})]},E.name))}),p.jsxs("div",{className:"flex gap-3",children:[p.jsx(wt,{variant:"outline",className:"flex-1 h-12 font-medium",disabled:a,onClick:()=>S("deny"),children:"Deny"}),p.jsxs(wt,{className:"flex-1 h-12 font-medium",disabled:a,onClick:()=>S("approve"),children:[a?p.jsx(xo,{className:"w-4 h-4 mr-2 animate-spin"}):null,"Approve"]})]})]})}const jW=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=Pg(),i=ks();if(t||e)return p.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:p.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return p.jsx(b$,{});if(n.type==="auth_required")return r(),null}return p.jsx(F2,{mode:"wait",children:p.jsx(aF.div,{initial:{opacity:0,x:24}
381,animate:{opacity:1,x:0},exit:{opacity:0,x:-24},transition:{duration:.22,ease:"easeOut"},children:p.jsxs(b2,{location:i,children:[p.jsx(Rr,{path:"/",element:p.jsx(eW,{})}),p.jsx(Rr,{path:"/events/:id",element:p.jsx(dW,{})}),p.jsx(Rr,{path:"/login",element:p.jsx(hW,{})}),p.jsx(Rr,{path:"/register",element:p.jsx(TW,{})}),p.jsx(Rr,{path:"/forgot-password",element:p.jsx(kW,{})}),p.jsx(Rr,{path:"/reset-password",element:p.jsx(NW,{})}),p.jsx(Rr,{path:"/oauth-consent",element:p.jsx(AW,{})}),p.jsx(Rr,{path:"*",element:p.jsx(x$,{})})]})},i.pathname)})};function OW(){return p.jsx(w$,{children:p.jsxs(hO,{client:RO,children:[p.jsxs(k2,{children:[p.jsx(E$,{}),p.jsx(jW,{})]}),p.jsx(Vj,{})]})})}WN.createRoot(document.getElementById("root")).render(p.jsx(OW,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.