vendor: 4,138 bytes, lines 1-9
1var dg=e=>{throw TypeError(e)};var Gu=(e,t,n)=>t.has(e)||dg("Cannot "+n);var P=(e,t,n)=>(Gu(e,t,"read from private field"),n?n.call(e):t.get(e)),re=(e,t,n)=>t.has(e)?dg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Y=(e,t,n,r)=>(Gu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ge=(e,t,n)=>(Gu(e,t,"access private method"),n);var Go=(e,t,n,r)=>({set _(s){Y(e,t,s,n)},get _(){return P(e,t,r)}});function tE(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function v0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x0={exports:{}},ru={},w0={exports:{}},ee={};/** 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 Po=Symbol.for("react.element"),nE=Symbol.for("react.portal"),rE=Symbol.for("react.fragment"),sE=Symbol.for("react.strict_mode"),iE=Symbol.for("react.profiler"),aE=Symbol.for("react.provider"),oE=Symbol.for("react.context"),lE=Symbol.for("react.forward_ref"),cE=Symbol.for("react.suspense"),uE=Symbol.for("react.memo"),dE=Symbol.for("react.lazy"),hg=Symbol.iterator;function hE(e){return e===null||typeof e!="object"?null:(e=hg&&e[hg]||e["@@iterator"],typeof e=="function"?e:null)}var b0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S0=Object.assign,j0={};function Ji(e,t,n){this.props=e,this.context=t,this.refs=j0,this.updater=n||b0}Ji.prototype.isReactComponent={};Ji.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ji.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function k0(){}k0.prototype=Ji.prototype;function tp(e,t,n){this.props=e,this.context=t,this.refs=j0,this.updater=n||b0}var np=tp.prototype=new k0;np.constructor=tp;S0(np,Ji.prototype);np.isPureReactComponent=!0;var fg=Array.isArray,C0=Object.prototype.hasOwnProperty,rp={current:null},E0={key:!0,ref:!0,__self:!0,__source:!0};function T0(e,t,n){var r,s={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)C0.call(t,r)&&!E0.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:Po,type:e,key:i,ref:a,props:s,_owner:rp.current}}function fE(e,t){return{$$typeof:Po,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Po}function pE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pg=/\/+/g;function Ju(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pE(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function Dl(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Po:case nE:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+Ju(a,0):r,fg(s)?(n="",e!=null&&(n=e.replace(pg,"$&/")+"/"),Dl(s,t,n,"",function(u){return u})):s!=null&&(sp(s)&&(s=fE(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(pg,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",fg(e))for(var o=0;o<e.length;o++){i=e[o];var c=r+Ju(i,o);a+=Dl(i,t,n,c,s)}else if(c=hE(e),typeof c=="function")for(e=c.call(e),o=0;!(i=e.next()).done;)i=i.value,c=r+Ju(i,o++),a+=Dl(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Jo(e,t,n){if(e==null)return e;var r=[],s=0;return Dl(e,r,"","",function(i){return t.call(n,i,s++)}),r}function mE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ot={current:null},Ll={transition:null},gE={ReactCurrentDispatcher:ot,ReactCurrentBatchConfig:Ll,ReactCurrentOwner:rp};function _0(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:Jo,forEach:function(e,t,n){Jo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Jo(e,function(){t++}),t},toArray:function(e){return Jo(e,function(t){return t})||[]},only:function(e){if(!sp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ee.Component=Ji;ee.Fragment=rE;ee.Profiler=iE;ee.PureComponent=tp;ee.StrictMode=sE;ee.Suspense=cE;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gE;ee.act=_0;ee.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=S0({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=rp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)C0.call(t,c)&&!E0.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:Po,type:e.type,key:s,ref:i,props:r,_owner:a}};ee.createContext=function(e){return e={$$typeof:oE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:aE,_context:e},e.Consumer=e};ee.createElement=T0;ee.createFactory=function(e){var t=T0.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:lE,render:e}};ee.isValidElement=sp;ee.lazy=function(e){return{$$typeof:dE,_payload:{_status:-1,_result:e},_init:mE}};ee.memo=function(e,t){return{$$typeof:uE,type:e,compare:t===void 0?null:t}};ee.startTransition=function(e){var t=Ll.transition;Ll.transition={};try{e()}finally{Ll.transition=t}};ee.unstable_act=_0;ee.useCallback=function(e,t){return ot.current.useCallback(e,t)};ee.useContext=function(e){return ot.current.useContext(e)};ee.useDebugValue=function(){};ee.useDeferredValue=function(e){return ot.current.useDeferredValue(e)};ee.useEffect=function(e,t){return ot.current.useEffect(e,t)};ee.useId=function(){return ot.current.useId()};ee.useImperativeHandle=function(e,t,n){return ot.current.useImperativeHandle(e,t,n)};ee.useInsertionEffect=function(e,t){return ot.current.useInsertionEffect(e,t)};ee.useLayoutEffect=function(e,t){return ot.current.useLayoutEffect(e,t)};ee.useMemo=function(e,t){return ot.current.useMemo(e,t)};ee.useReducer=function(e,t,n){return ot.current.useReducer(e,t,n)};ee.useRef=function(e){return ot.current.useRef(e)};ee.useState=function(e){return ot.current.useState(e)};ee.useSyncExternalStore=function(e,t,n){return ot.current.useSyncExternalStore(e,t,n)};ee.useTransition=function(){return ot.current.useTransition()};ee.version="18.3.1";w0.exports=ee;var w=w0.exports;const I=v0(w),ip=tE({__proto__:null,default:I},[w]);/** 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 yE=w,vE=Symbol.for("react.element"),xE=Symbol.for("react.fragment"),wE=Object.prototype.hasOwnProperty,bE=yE.__SECRET_INT
vendor: 11,413 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,SE={key:!0,ref:!0,__self:!0,__source:!0};function N0(e,t,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)wE.call(t,r)&&!SE.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:vE,type:e,key:i,ref:a,props:s,_owner:bE.current}}ru.Fragment=xE;ru.jsx=N0;ru.jsxs=N0;x0.exports=ru;var l=x0.exports,A0={exports:{}},_t={},P0={exports:{}},R0={};/** 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 */(function(e){function t(_,A){var L=_.length;_.push(A);e:for(;0<L;){var K=L-1>>>1,W=_[K];if(0<s(W,A))_[K]=A,_[L]=W,L=K;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var A=_[0],L=_.pop();if(L!==A){_[0]=L;e:for(var K=0,W=_.length,Z=W>>>1;K<Z;){var te=2*(K+1)-1,_e=_[te],Ke=te+1,se=_[Ke];if(0>s(_e,L))Ke<W&&0>s(se,_e)?(_[K]=se,_[Ke]=L,K=Ke):(_[K]=_e,_[te]=L,K=te);else if(Ke<W&&0>s(se,L))_[K]=se,_[Ke]=L,K=Ke;else break e}}return A}function s(_,A){var L=_.sortIndex-A.sortIndex;return L!==0?L:_.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],u=[],d=1,h=null,f=3,p=!1,v=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(_){for(var A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=_)r(u),A.sortIndex=A.expirationTime,t(c,A);else break;A=n(u)}}function S(_){if(m=!1,x(_),!v)if(n(c)!==null)v=!0,z(j);else{var A=n(u);A!==null&&Q(S,A.startTime-_)}}function j(_,A){v=!1,m&&(m=!1,g(E),E=-1),p=!0;var L=f;try{for(x(A),h=n(c);h!==null&&(!(h.expirationTime>A)||_&&!F());){var K=h.callback;if(typeof K=="function"){h.callback=null,f=h.priorityLevel;var W=K(h.expirationTime<=A);A=e.unstable_now(),typeof W=="function"?h.callback=W:h===n(c)&&r(c),x(A)}else r(c);h=n(c)}if(h!==null)var Z=!0;else{var te=n(u);te!==null&&Q(S,te.startTime-A),Z=!1}return Z}finally{h=null,f=L,p=!1}}var k=!1,C=null,E=-1,N=5,T=-1;function F(){return!(e.unstable_now()-T<N)}function M(){if(C!==null){var _=e.unstable_now();T=_;var A=!0;try{A=C(!0,_)}finally{A?H():(k=!1,C=null)}}else k=!1}var H;if(typeof y=="function")H=function(){y(M)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,G=D.port2;D.port1.onmessage=M,H=function(){G.postMessage(null)}}else H=function(){b(M,0)};function z(_){C=_,k||(k=!0,H())}function Q(_,A){E=b(function(){_(e.unstable_now())},A)}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(_){_.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,z(j))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(_){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var L=f;f=A;try{return _()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,A){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var L=f;f=_;try{return A()}finally{f=L}},e.unstable_scheduleCallback=function(_,A,L){var K=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?K+L:K):L=K,_){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=L+W,_={id:d++,callback:A,priorityLevel:_,startTime:L,expirationTime:W,sortIndex:-1},L>K?(_.sortIndex=L,t(u,_),n(c)===null&&_===n(u)&&(m?(g(E),E=-1):m=!0,Q(S,L-K))):(_.sortIndex=W,t(c,_),v||p||(v=!0,z(j))),_},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(_){var A=f;return function(){var L=f;f=A;try{return _.apply(this,arguments)}finally{f=L}}}})(R0);P0.exports=R0;var jE=P0.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 kE=w,Tt=jE;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var O0=new Set,Ga={};function Ms(e,t){Li(e,t),Li(e+"Capture",t)}function Li(e,t){for(Ga[e]=t,e=0;e<t.length;e++)O0.add(t[e])}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ah=Object.prototype.hasOwnProperty,CE=/^[: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]*$/,mg={},gg={};function EE(e){return ah.call(gg,e)?!0:ah.call(mg,e)?!1:CE.test(e)?gg[e]=!0:(mg[e]=!0,!1)}function TE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _E(e,t,n,r){if(t===null||typeof t>"u"||TE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function lt(e,t,n,r,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new lt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new lt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new lt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new lt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){He[e]=new lt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new lt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new lt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new lt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new lt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ap=/[\-:]([a-z])/g;function op(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ap,op);He[t]=new lt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ap,op);He[t]=new lt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ap,op);He[t]=new lt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new lt(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new lt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new lt(e,1,!1,e.toLowerCase(),null,!0,!0)});function lp(e,t,n,r){var s=He.hasOwnProperty(t)?He[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_E(t,n,s,r)&&(n=null),r||s===null?EE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zn=kE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Yo=Symbol.for("react.element"),ri=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),cp=Symbol.for("react.strict_mode"),oh=Symbol.for("react.profiler"),M0=Symbol.for("react.provider"),I0=Symbol.for("react.context"),up=Symbol.for("react.forward_ref"),lh=Symbol.for("react.suspense"),ch=Symbol.for("react.suspense_list"),dp=Symbol.for("react.memo"),mr=Symbol.for("react.lazy"),D0=Symbol.for("react.offscreen"),yg=Symbol.iterator;function ha(e){return e===null||typeof e!="object"?null:(e=yg&&e[yg]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,Yu;function ka(e){if(Yu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yu=t&&t[1]||""}return` 34`+Yu+e}var Qu=!1;function Xu(e,t){if(!e||Qu)return"";Qu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 14,090 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=r.stack.split(` 36`),a=s.length-1,o=i.length-1;1<=a&&0<=o&&s[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==i[o]){var c=` 37`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=o);break}}}finally{Qu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ka(e):""}function NE(e){switch(e.tag){case 5:return ka(e.type);case 16:return ka("Lazy");case 13:return ka("Suspense");case 19:return ka("SuspenseList");case 0:case 2:case 15:return e=Xu(e.type,!1),e;case 11:return e=Xu(e.type.render,!1),e;case 1:return e=Xu(e.type,!0),e;default:return""}}function uh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case si:return"Fragment";case ri:return"Portal";case oh:return"Profiler";case cp:return"StrictMode";case lh:return"Suspense";case ch:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case I0:return(e.displayName||"Context")+".Consumer";case M0:return(e._context.displayName||"Context")+".Provider";case up:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dp:return t=e.displayName||null,t!==null?t:uh(e.type)||"Memo";case mr:t=e._payload,e=e._init;try{return uh(e(t))}catch{}}return null}function AE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return uh(t);case 8:return t===cp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function L0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function PE(e){var t=L0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qo(e){e._valueTracker||(e._valueTracker=PE(e))}function $0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=L0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function cc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dh(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Fr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function F0(e,t){t=t.checked,t!=null&&lp(e,"checked",t,!1)}function hh(e,t){F0(e,t);var n=Fr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fh(e,t.type,n):t.hasOwnProperty("defaultValue")&&fh(e,t.type,Fr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function fh(e,t,n){(t!=="number"||cc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ca=Array.isArray;function xi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Fr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ph(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(Ca(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Fr(n)}}function B0(e,t){var n=Fr(t.value),r=Fr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function V0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?V0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xo,U0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xo=Xo||document.createElement("div"),Xo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ja(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pa={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},RE=["Webkit","ms","Moz","O"];Object.keys(Pa).forEach(function(e){RE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pa[t]=Pa[e]})});function z0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pa.hasOwnProperty(e)&&Pa[e]?(""+t).trim():t+"px"}function W0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=z0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var OE=we({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 gh(e,t){if(t){if(OE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function yh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vh=null;function hp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xh=null,wi=null,bi=null;function Sg(e){if(e=Mo(e)){if(typeof xh!="function")throw Error(O(280));var t=e.stateNode;t&&(t=lu(t),xh(e.stateNode,e.type,t))}}function H0(e){wi?bi?bi.push(e):bi=[e]:wi=e}function q0(){if(wi){var e=wi,t=bi;if(bi=wi=null,Sg(e),t)for(e=0;e<t.length;e++)Sg(t[e])}}function K0(e,t){return e(t)}function G0(){}var Zu=!1;function J0(e,t,n){if(Zu)return e(t,n);Zu=!0;try{return K0(e,t,n)}finally{Zu=!1,(wi!==null||bi!==null)&&(G0(),q0())}}function Ya(e,t){var n=e.stateNode;if(n===null)return null;var r=lu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var wh=!1;if(qn)try{var fa={};Object.defineProperty(fa,"passive",{get:function(){wh=!0}}),window.addEventListener("test",fa,fa),window.removeEventListener("test",fa,fa)}catch{wh=!1}function ME(e,t,n,r,s,i,a,o,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Ra=!1,uc=null,dc=!1,bh=null,IE={onError:function(e){Ra=!0,uc=e}};function DE(e,t,n,r,s,i,a,o,c){Ra=!1,uc=null,ME.apply(IE,arguments)}function LE(e,t,n,r,s,i,a,o,c){if(DE.apply(this,arguments),Ra){if(Ra){var u=uc;Ra=!1,uc=null}else throw Error(O(198));dc||(dc=!0,bh=u)}}function Is(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Y0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function jg(e){if(Is(e)!==e)throw Error(O(188))}function $E(e){var t=e.alternate;if(!t){if(t=Is(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return jg(s),e;if(i===r)return jg(s),t;i=i.sibling}throw Error(O(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function Q0(e){return e=$E(e),e!==null?X0(e):null}function X0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=X0(e);if(t!==null)return t;e=e.sibling}return null}var Z0=Tt.unstable_scheduleCallback,kg=Tt.unstable_cancelCallback,FE=Tt.unstable_shouldYield,BE=Tt.unstable_requestPaint,Ee=Tt.unstable_now,VE=Tt.unstable_getCurrentPriorityLevel,fp=Tt.unstable_ImmediatePriority,ew=Tt.unstable_UserBlockingPriority,hc=Tt.unstable_NormalPriority,UE=Tt.unstable_LowPriority,tw=Tt.unstable_IdlePriority,su=null,En=null;function zE(e){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(su,e,void 0,(e.current.flags&128)===128)}catch{}}var sn=Math.clz32?Math.clz32:qE,WE=Math.log,HE=Math.LN2;function qE(e){return e>>>=0,e===0?32:31-(WE(e)/HE|0)|0}var Zo=64,el=4194304;function Ea(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=Ea(o):(i&=a,i!==0&&(r=Ea(i)))}else a=n&~s,a!==0?r=Ea(a):i!==0&&(r=Ea(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-sn(t),s=1<<n,r|=e[n],t&=~s;return r}function KE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function GE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-sn(i),o=1<<a,c=s[a];c===-1?(!(o&n)||o&r)&&(s[a]=KE(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}}function Sh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function nw(){var e=Zo;return Zo<<=1,!(Zo&4194240)&&(Zo=64),e}function ed(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function Ro(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-sn(t),e[t]=n}function JE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-sn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function pp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-sn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ie=0;function rw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var sw,mp,iw,aw,ow,jh=!1,tl=[],Ar=null,Pr=null,Rr=null,Qa=new Map,Xa=new Map,yr=[],YE="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 Cg(e,t){switch(e){case"focusin":case"focusout":Ar=null;break;case"dragenter":case"dragleave":Pr=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Qa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xa.delete(t.pointerId)}}function pa(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Mo(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function QE(e,t,n,r,s){switch(t){case"focusin":return Ar=pa(Ar,e,t,n,r,s),!0;case"dragenter":return Pr=pa(Pr,e,t,n,r,s),!0;case"mouseover":return Rr=pa(Rr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Qa.set(i,pa(Qa.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Xa.set(i,pa(Xa.get(i)||null,e,t,n,r,s)),!0}return!1}function lw(e){var t=ds(e.target);if(t!==null){var n=Is(t);if(n!==null){if(t=n.tag,t===13){if(t=Y0(n),t!==null){e.blockedOn=t,ow(e.priority,function(){iw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vh=r,n.target.dispatchEvent(r),vh=null}else return t=Mo(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Eg(e,t,n){$l(e)&&n.delete(t)}function XE(){jh=!1,Ar!==null&&$l(Ar)&&(Ar=null),Pr!==null&&$l(Pr)&&(Pr=null),Rr!==null&&$l(Rr)&&(Rr=null),Qa.forEach(Eg),Xa.forEach(Eg)}function ma(e,t){e.blockedOn===t&&(e.blockedOn=null,jh||(jh=!0,Tt.unstable_scheduleCallback(Tt.unstable_NormalPriority,XE)))}function Za(e){function t(s){return ma(s,e)}if(0<tl.length){ma(tl[0],e);for(var n=1;n<tl.length;n++){var r=tl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ar!==null&&ma(Ar,e),Pr!==null&&ma(Pr,e),Rr!==null&&ma(Rr,e),Qa.forEach(t),Xa.forEach(t),n=0;n<yr.length;n++)r=yr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<yr.length&&(n=yr[0],n.blockedOn===null);)lw(n),n.blockedOn===null&&yr.shift()}var Si=Zn.ReactCurrentBatchConfig,pc=!0;function ZE(e,t,n,r){var s=ie,i=Si.transition;Si.transition=null;try{ie=1,gp(e,t,n,r)}finally{ie=s,Si.transition=i}}function eT(e,t,n,r){var s=ie,i=Si.transition;Si.transition=null;try{ie=4,gp(e,t,n,r)}finally{ie=s,Si.transition=i}}function gp(e,t,n,r){if(pc){var s=kh(e,t,n,r);if(s===null)ud(e,t,r,mc,n),Cg(e,r);else if(QE(s,e,t,n,r))r.stopPropagation();else if(Cg(e,r),t&4&&-1<YE.indexOf(e)){for(;s!==null;){var i=Mo(s);if(i!==null&&sw(i),i=kh(e,t,n,r),i===null&&ud(e,t,r,mc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ud(e,t,r,null,n)}}var mc=null;function kh(e,t,n,r){if(mc=null,e=hp(r),e=ds(e),e!==null)if(t=Is(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Y0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return mc=e,null}
vendor: 10,401 bytes, line 37
37function cw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(VE()){case fp:return 1;case ew:return 4;case hc:case UE:return 16;case tw:return 536870912;default:return 16}default:return 16}}var Er=null,yp=null,Fl=null;function uw(){if(Fl)return Fl;var e,t=yp,n=t.length,r,s="value"in Er?Er.value:Er.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return Fl=s.slice(e,1<r?1-r:void 0)}function Bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nl(){return!0}function Tg(){return!1}function Nt(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?nl:Tg,this.isPropagationStopped=Tg,this}return we(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=nl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nl)},persist:function(){},isPersistent:nl}),t}var Yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vp=Nt(Yi),Oo=we({},Yi,{view:0,detail:0}),tT=Nt(Oo),td,nd,ga,iu=we({},Oo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ga&&(ga&&e.type==="mousemove"?(td=e.screenX-ga.screenX,nd=e.screenY-ga.screenY):nd=td=0,ga=e),td)},movementY:function(e){return"movementY"in e?e.movementY:nd}}),_g=Nt(iu),nT=we({},iu,{dataTransfer:0}),rT=Nt(nT),sT=we({},Oo,{relatedTarget:0}),rd=Nt(sT),iT=we({},Yi,{animationName:0,elapsedTime:0,pseudoElement:0}),aT=Nt(iT),oT=we({},Yi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lT=Nt(oT),cT=we({},Yi,{data:0}),Ng=Nt(cT),uT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dT={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"},hT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hT[e])?!!t[e]:!1}function xp(){return fT}var pT=we({},Oo,{key:function(e){if(e.key){var t=uT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xp,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mT=Nt(pT),gT=we({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ag=Nt(gT),yT=we({},Oo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xp}),vT=Nt(yT),xT=we({},Yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),wT=Nt(xT),bT=we({},iu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ST=Nt(bT),jT=[9,13,27,32],wp=qn&&"CompositionEvent"in window,Oa=null;qn&&"documentMode"in document&&(Oa=document.documentMode);var kT=qn&&"TextEvent"in window&&!Oa,dw=qn&&(!wp||Oa&&8<Oa&&11>=Oa),Pg=" ",Rg=!1;function hw(e,t){switch(e){case"keyup":return jT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ii=!1;function CT(e,t){switch(e){case"compositionend":return fw(t);case"keypress":return t.which!==32?null:(Rg=!0,Pg);case"textInput":return e=t.data,e===Pg&&Rg?null:e;default:return null}}function ET(e,t){if(ii)return e==="compositionend"||!wp&&hw(e,t)?(e=uw(),Fl=yp=Er=null,ii=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return dw&&t.locale!=="ko"?null:t.data;default:return null}}var TT={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 Og(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!TT[e.type]:t==="textarea"}function pw(e,t,n,r){H0(r),t=gc(t,"onChange"),0<t.length&&(n=new vp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ma=null,eo=null;function _T(e){Cw(e,0)}function au(e){var t=li(e);if($0(t))return e}function NT(e,t){if(e==="change")return t}var mw=!1;if(qn){var sd;if(qn){var id="oninput"in document;if(!id){var Mg=document.createElement("div");Mg.setAttribute("oninput","return;"),id=typeof Mg.oninput=="function"}sd=id}else sd=!1;mw=sd&&(!document.documentMode||9<document.documentMode)}function Ig(){Ma&&(Ma.detachEvent("onpropertychange",gw),eo=Ma=null)}function gw(e){if(e.propertyName==="value"&&au(eo)){var t=[];pw(t,eo,e,hp(e)),J0(_T,t)}}function AT(e,t,n){e==="focusin"?(Ig(),Ma=t,eo=n,Ma.attachEvent("onpropertychange",gw)):e==="focusout"&&Ig()}function PT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return au(eo)}function RT(e,t){if(e==="click")return au(t)}function OT(e,t){if(e==="input"||e==="change")return au(t)}function MT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:MT;function to(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ah.call(t,s)||!ln(e[s],t[s]))return!1}return!0}function Dg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lg(e,t){var n=Dg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Dg(n)}}function yw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vw(){for(var e=window,t=cc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=cc(e.document)}return t}function bp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function IT(e){var t=vw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yw(n.ownerDocument.documentElement,n)){if(r!==null&&bp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Lg(n,i);var a=Lg(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var DT=qn&&"documentMode"in document&&11>=document.documentMode,ai=null,Ch=null,Ia=null,Eh=!1;function $g(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eh||ai==null||ai!==cc(r)||(r=ai,"selectionStart"in r&&bp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Ia&&to(Ia,r)||(Ia=r,r=gc(Ch,"onSelect"),0<r.length&&(t=new vp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ai)))}function rl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var oi={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionend:rl("Transition","TransitionEnd")},ad={},xw={};qn&&(xw=document.createElement("div").style,"AnimationEvent"in window||(delete oi.animationend.animation,delete oi.animationiteration.animation,delete oi.animationstart.animation),"TransitionEvent"in window||delete oi.transitionend.transition);function ou(e){if(ad[e])return ad[e];if(!oi[e])return e;var t=oi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in xw)return ad[e]=t[n];return e}var ww=ou("animationend"),bw=ou("animationiteration"),Sw=ou("animationstart"),jw=ou("transitionend"),kw=new Map,Fg="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 Kr(e,t){kw.set(e,t),Ms(t,[e])}for(var od=0;od<Fg.length;od++){var ld=Fg[od],LT=ld.toLowerCase(),$T=ld[0].toUpperCase()+ld.slice(1);Kr(LT,"on"+$T)}Kr(ww,"onAnimationEnd");Kr(bw,"onAnimationIteration");Kr(Sw,"onAnimationStart");Kr("dblclick","onDoubleClick");Kr("focusin","onFocus");Kr("focusout","onBlur");Kr(jw,"onTransitionEnd");Li("onMouseEnter",["mouseout","mouseover"]);Li("onMouseLeave",["mouseout","mouseover"]);Li("onPointerEnter",["pointerout","pointerover"]);Li("onPointerLeave",["pointerout","pointerover"]);Ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ta="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(" "),FT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ta));function Bg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,LE(r,t,void 0,e),e.currentTarget=null}function Cw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==i&&s.isPropagationStopped())break e;Bg(s,o,u),i=c}else for(a=0;a<r.length;a++){if(o=r[a],c=o.instance,u=o.currentTarget,o=o.listener,c!==i&&s.isPropagationStopped())break e;Bg(s,o,u),i=c}}}if(dc)throw e=bh,dc=!1,bh=null,e}function de(e,t){var n=t[Ph];n===void 0&&(n=t[Ph]=new Set);var r=e+"__bubble";n.has(r)||(Ew(t,e,2,!1),n.add(r))}function cd(e,t,n){var r=0;t&&(r|=4),Ew(n,e,r,t)}var sl="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[sl]){e[sl]=!0,O0.forEach(function(n){n!=="selectionchange"&&(FT.has(n)||cd(n,!1,e),cd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sl]||(t[sl]=!0,cd("selectionchange",!1,t))}}function Ew(e,t,n,r){switch(cw(t)){case 1:var s=ZE;break;case 4:s=eT;break;default:s=gp}n=s.bind(null,t,n,e),s=void 0,!wh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 4,454 bytes, line 37
37function ud(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;o!==null;){if(a=ds(o),a===null)return;if(c=a.tag,c===5||c===6){r=i=a;continue e}o=o.parentNode}}r=r.return}J0(function(){var u=i,d=hp(n),h=[];e:{var f=kw.get(e);if(f!==void 0){var p=vp,v=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":p=mT;break;case"focusin":v="focus",p=rd;break;case"focusout":v="blur",p=rd;break;case"beforeblur":case"afterblur":p=rd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=_g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=rT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=vT;break;case ww:case bw:case Sw:p=aT;break;case jw:p=wT;break;case"scroll":p=tT;break;case"wheel":p=ST;break;case"copy":case"cut":case"paste":p=lT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ag}var m=(t&4)!==0,b=!m&&e==="scroll",g=m?f!==null?f+"Capture":null:f;m=[];for(var y=u,x;y!==null;){x=y;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,g!==null&&(S=Ya(y,g),S!=null&&m.push(ro(y,S,x)))),b)break;y=y.return}0<m.length&&(f=new p(f,v,null,n,d),h.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==vh&&(v=n.relatedTarget||n.fromElement)&&(ds(v)||v[Kn]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?ds(v):null,v!==null&&(b=Is(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=u),p!==v)){if(m=_g,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=Ag,S="onPointerLeave",g="onPointerEnter",y="pointer"),b=p==null?f:li(p),x=v==null?f:li(v),f=new m(S,y+"leave",p,n,d),f.target=b,f.relatedTarget=x,S=null,ds(d)===u&&(m=new m(g,y+"enter",v,n,d),m.target=x,m.relatedTarget=b,S=m),b=S,p&&v)t:{for(m=p,g=v,y=0,x=m;x;x=zs(x))y++;for(x=0,S=g;S;S=zs(S))x++;for(;0<y-x;)m=zs(m),y--;for(;0<x-y;)g=zs(g),x--;for(;y--;){if(m===g||g!==null&&m===g.alternate)break t;m=zs(m),g=zs(g)}m=null}else m=null;p!==null&&Vg(h,f,p,m,!1),v!==null&&b!==null&&Vg(h,b,v,m,!0)}}e:{if(f=u?li(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var j=NT;else if(Og(f))if(mw)j=OT;else{j=PT;var k=AT}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=RT);if(j&&(j=j(e,u))){pw(h,j,n,d);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&fh(f,"number",f.value)}switch(k=u?li(u):window,e){case"focusin":(Og(k)||k.contentEditable==="true")&&(ai=k,Ch=u,Ia=null);break;case"focusout":Ia=Ch=ai=null;break;case"mousedown":Eh=!0;break;case"contextmenu":case"mouseup":case"dragend":Eh=!1,$g(h,n,d);break;case"selectionchange":if(DT)break;case"keydown":case"keyup":$g(h,n,d)}var C;if(wp)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else ii?hw(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(dw&&n.locale!=="ko"&&(ii||E!=="onCompositionStart"?E==="onCompositionEnd"&&ii&&(C=uw()):(Er=d,yp="value"in Er?Er.value:Er.textContent,ii=!0)),k=gc(u,E),0<k.length&&(E=new Ng(E,e,null,n,d),h.push({event:E,listeners:k}),C?E.data=C:(C=fw(n),C!==null&&(E.data=C)))),(C=kT?CT(e,n):ET(e,n))&&(u=gc(u,"onBeforeInput"),0<u.length&&(d=new Ng("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}Cw(h,t)})}function ro(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ya(e,n),i!=null&&r.unshift(ro(e,i,s)),i=Ya(e,t),i!=null&&r.push(ro(e,i,s))),e=e.return}return r}function zs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}
vendor: 4,283 bytes, lines 37-38
37function Vg(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var o=n,c=o.alternate,u=o.stateNode;if(c!==null&&c===r)break;o.tag===5&&u!==null&&(o=u,s?(c=Ya(n,i),c!=null&&a.unshift(ro(n,c,o))):s||(c=Ya(n,i),c!=null&&a.push(ro(n,c,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var BT=/\r\n?/g,VT=/\u0000|\uFFFD/g;function Ug(e){return(typeof e=="string"?e:""+e).replace(BT,` 38`).replace(VT,"")}function il(e,t,n){if(t=Ug(t),Ug(e)!==t&&n)throw Error(O(425))}function yc(){}var Th=null,_h=null;function Nh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ah=typeof setTimeout=="function"?setTimeout:void 0,UT=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,zT=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(WT)}:Ah;function WT(e){setTimeout(function(){throw e})}function dd(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Za(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Za(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Wg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qi=Math.random().toString(36).slice(2),kn="__reactFiber$"+Qi,so="__reactProps$"+Qi,Kn="__reactContainer$"+Qi,Ph="__reactEvents$"+Qi,HT="__reactListeners$"+Qi,qT="__reactHandles$"+Qi;function ds(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Kn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wg(e);e!==null;){if(n=e[kn])return n;e=Wg(e)}return t}e=n,n=e.parentNode}return null}function Mo(e){return e=e[kn]||e[Kn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function li(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function lu(e){return e[so]||null}var Rh=[],ci=-1;function Gr(e){return{current:e}}function pe(e){0>ci||(e.current=Rh[ci],Rh[ci]=null,ci--)}function ce(e,t){ci++,Rh[ci]=e.current,e.current=t}var Br={},Ze=Gr(Br),ft=Gr(!1),Ts=Br;function $i(e,t){var n=e.type.contextTypes;if(!n)return Br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function pt(e){return e=e.childContextTypes,e!=null}function vc(){pe(ft),pe(Ze)}function Hg(e,t,n){if(Ze.current!==Br)throw Error(O(168));ce(Ze,t),ce(ft,n)}function Tw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(O(108,AE(e)||"Unknown",s));return we({},n,r)}function xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ts=Ze.current,ce(Ze,e),ce(ft,ft.current),!0}function qg(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Tw(e,t,Ts),r.__reactInternalMemoizedMergedChildContext=e,pe(ft),pe(Ze),ce(Ze,e)):pe(ft),ce(ft,n)}var Vn=null,cu=!1,hd=!1;function _w(e){Vn===null?Vn=[e]:Vn.push(e)}function KT(e){cu=!0,_w(e)}function Jr(){if(!hd&&Vn!==null){hd=!0;var e=0,t=ie;try{var n=Vn;for(ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vn=null,cu=!1}catch(s){throw Vn!==null&&(Vn=Vn.slice(e+1)),Z0(fp,Jr),s}finally{ie=t,hd=!1}}return null}var ui=[],di=0,wc=null,bc=0,Ot=[],Mt=0,_s=null,zn=1,Wn="";function os(e,t){ui[di++]=bc,ui[di++]=wc,wc=e,bc=t}function Nw(e,t,n){Ot[Mt++]=zn,Ot[Mt++]=Wn,Ot[Mt++]=_s,_s=e;var r=zn;e=Wn;var s=32-sn(r)-1;r&=~(1<<s),n+=1;var i=32-sn(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,zn=1<<32-sn(t)+s|n<<s|r,Wn=i+e}else zn=1<<i|n<<s|r,Wn=e}function Sp(e){e.return!==null&&(os(e,1),Nw(e,1,0))}function jp(e){for(;e===wc;)wc=ui[--di],ui[di]=null,bc=ui[--di],ui[di]=null;for(;e===_s;
vendor: 24,483 bytes, lines 38-40
38)_s=Ot[--Mt],Ot[Mt]=null,Wn=Ot[--Mt],Ot[Mt]=null,zn=Ot[--Mt],Ot[Mt]=null}var Ct=null,kt=null,ge=!1,nn=null;function Aw(e,t){var n=It(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Kg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ct=e,kt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_s!==null?{id:zn,overflow:Wn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=It(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ct=e,kt=null,!0):!1;default:return!1}}function Oh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mh(e){if(ge){var t=kt;if(t){var n=t;if(!Kg(e,t)){if(Oh(e))throw Error(O(418));t=Or(n.nextSibling);var r=Ct;t&&Kg(e,t)?Aw(r,n):(e.flags=e.flags&-4097|2,ge=!1,Ct=e)}}else{if(Oh(e))throw Error(O(418));e.flags=e.flags&-4097|2,ge=!1,Ct=e}}}function Gg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function al(e){if(e!==Ct)return!1;if(!ge)return Gg(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Nh(e.type,e.memoizedProps)),t&&(t=kt)){if(Oh(e))throw Pw(),Error(O(418));for(;t;)Aw(e,t),t=Or(t.nextSibling)}if(Gg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kt=null}}else kt=Ct?Or(e.stateNode.nextSibling):null;return!0}function Pw(){for(var e=kt;e;)e=Or(e.nextSibling)}function Fi(){kt=Ct=null,ge=!1}function kp(e){nn===null?nn=[e]:nn.push(e)}var GT=Zn.ReactCurrentBatchConfig;function ya(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=s.refs;a===null?delete o[i]:o[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function ol(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Jg(e){var t=e._init;return t(e._payload)}function Rw(e){function t(g,y){if(e){var x=g.deletions;x===null?(g.deletions=[y],g.flags|=16):x.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function s(g,y){return g=Lr(g,y),g.index=0,g.sibling=null,g}function i(g,y,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<y?(g.flags|=2,y):x):(g.flags|=2,y)):(g.flags|=1048576,y)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function o(g,y,x,S){return y===null||y.tag!==6?(y=xd(x,g.mode,S),y.return=g,y):(y=s(y,x),y.return=g,y)}function c(g,y,x,S){var j=x.type;return j===si?d(g,y,x.props.children,S,x.key):y!==null&&(y.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===mr&&Jg(j)===y.type)?(S=s(y,x.props),S.ref=ya(g,y,x),S.return=g,S):(S=Kl(x.type,x.key,x.props,null,g.mode,S),S.ref=ya(g,y,x),S.return=g,S)}function u(g,y,x,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=wd(x,g.mode,S),y.return=g,y):(y=s(y,x.children||[]),y.return=g,y)}function d(g,y,x,S,j){return y===null||y.tag!==7?(y=ks(x,g.mode,S,j),y.return=g,y):(y=s(y,x),y.return=g,y)}function h(g,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=xd(""+y,g.mode,x),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Yo:return x=Kl(y.type,y.key,y.props,null,g.mode,x),x.ref=ya(g,null,y),x.return=g,x;case ri:return y=wd(y,g.mode,x),y.return=g,y;case mr:var S=y._init;return h(g,S(y._payload),x)}if(Ca(y)||ha(y))return y=ks(y,g.mode,x,null),y.return=g,y;ol(g,y)}return null}function f(g,y,x,S){var j=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return j!==null?null:o(g,y,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Yo:return x.key===j?c(g,y,x,S):null;case ri:return x.key===j?u(g,y,x,S):null;case mr:return j=x._init,f(g,y,j(x._payload),S)}if(Ca(x)||ha(x))return j!==null?null:d(g,y,x,S,null);ol(g,x)}return null}function p(g,y,x,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(x)||null,o(y,g,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Yo:return g=g.get(S.key===null?x:S.key)||null,c(y,g,S,j);case ri:return g=g.get(S.key===null?x:S.key)||null,u(y,g,S,j);case mr:var k=S._init;return p(g,y,x,k(S._payload),j)}if(Ca(S)||ha(S))return g=g.get(x)||null,d(y,g,S,j,null);ol(y,S)}return null}function v(g,y,x,S){for(var j=null,k=null,C=y,E=y=0,N=null;C!==null&&E<x.length;E++){C.index>E?(N=C,C=null):N=C.sibling;var T=f(g,C,x[E],S);if(T===null){C===null&&(C=N);break}e&&C&&T.alternate===null&&t(g,C),y=i(T,y,E),k===null?j=T:k.sibling=T,k=T,C=N}if(E===x.length)return n(g,C),ge&&os(g,E),j;if(C===null){for(;E<x.length;E++)C=h(g,x[E],S),C!==null&&(y=i(C,y,E),k===null?j=C:k.sibling=C,k=C);return ge&&os(g,E),j}for(C=r(g,C);E<x.length;E++)N=p(C,g,E,x[E],S),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?E:N.key),y=i(N,y,E),k===null?j=N:k.sibling=N,k=N);return e&&C.forEach(function(F){return t(g,F)}),ge&&os(g,E),j}function m(g,y,x,S){var j=ha(x);if(typeof j!="function")throw Error(O(150));if(x=j.call(x),x==null)throw Error(O(151));for(var k=j=null,C=y,E=y=0,N=null,T=x.next();C!==null&&!T.done;E++,T=x.next()){C.index>E?(N=C,C=null):N=C.sibling;var F=f(g,C,T.value,S);if(F===null){C===null&&(C=N);break}e&&C&&F.alternate===null&&t(g,C),y=i(F,y,E),k===null?j=F:k.sibling=F,k=F,C=N}if(T.done)return n(g,C),ge&&os(g,E),j;if(C===null){for(;!T.done;E++,T=x.next())T=h(g,T.value,S),T!==null&&(y=i(T,y,E),k===null?j=T:k.sibling=T,k=T);return ge&&os(g,E),j}for(C=r(g,C);!T.done;E++,T=x.next())T=p(C,g,E,T.value,S),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?E:T.key),y=i(T,y,E),k===null?j=T:k.sibling=T,k=T);return e&&C.forEach(function(M){return t(g,M)}),ge&&os(g,E),j}function b(g,y,x,S){if(typeof x=="object"&&x!==null&&x.type===si&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Yo:e:{for(var j=x.key,k=y;k!==null;){if(k.key===j){if(j=x.type,j===si){if(k.tag===7){n(g,k.sibling),y=s(k,x.props.children),y.return=g,g=y;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===mr&&Jg(j)===k.type){n(g,k.sibling),y=s(k,x.props),y.ref=ya(g,k,x),y.return=g,g=y;break e}n(g,k);break}else t(g,k);k=k.sibling}x.type===si?(y=ks(x.props.children,g.mode,S,x.key),y.return=g,g=y):(S=Kl(x.type,x.key,x.props,null,g.mode,S),S.ref=ya(g,y,x),S.return=g,g=S)}return a(g);case ri:e:{for(k=x.key;y!==null;){if(y.key===k)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(g,y.sibling),y=s(y,x.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=wd(x,g.mode,S),y.return=g,g=y}return a(g);case mr:return k=x._init,b(g,y,k(x._payload),S)}if(Ca(x))return v(g,y,x,S);if(ha(x))return m(g,y,x,S);ol(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(g,y.sibling),y=s(y,x),y.return=g,g=y):(n(g,y),y=xd(x,g.mode,S),y.return=g,g=y),a(g)):n(g,y)}return b}var Bi=Rw(!0),Ow=Rw(!1),Sc=Gr(null),jc=null,hi=null,Cp=null;function Ep(){Cp=hi=jc=null}function Tp(e){var t=Sc.current;pe(Sc),e._currentValue=t}function Ih(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ji(e,t){jc=e,Cp=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ht=!0),e.firstContext=null)}function Ft(e){var t=e._currentValue;if(Cp!==e)if(e={context:e,memoizedValue:t,next:null},hi===null){if(jc===null)throw Error(O(308));hi=e,jc.dependencies={lanes:0,firstContext:e}}else hi=hi.next=e;return t}var hs=null;function _p(e){hs===null?hs=[e]:hs.push(e)}function Mw(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,_p(t)):(n.next=s.next,s.next=n),t.interleaved=n,Gn(e,r)}function Gn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var gr=!1;function Np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Iw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Gn(e,n)}return s=r.interleaved,s===null?(t.next=t,_p(r)):(t.next=s.next,s.next=t),r.interleaved=t,Gn(e,n)}function Vl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pp(e,n)}}function Yg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function kc(e,t,n,r){var s=e.updateQueue;gr=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var c=o,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==a&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;a=0,d=u=c=null,o=i;do{var f=o.lane,p=o.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var v=e,m=o;switch(f=t,p=n,m.tag){case 1:if(v=m.payload,typeof v=="function"){h=v.call(p,h,f);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,f=typeof v=="function"?v.call(p,h,f):v,f==null)break e;h=we({},h,f);break e;case 2:gr=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[o]:f.push(o))}else p={eventTime:p,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,a|=f;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;f=o,o=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);As|=a,e.lanes=a,e.memoizedState=h}}function Qg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(O(191,s));s.call(r)}}}var Io={},Tn=Gr(Io),io=Gr(Io),ao=Gr(Io);function fs(e){if(e===Io)throw Error(O(174));return e}function Ap(e,t){switch(ce(ao,t),ce(io,e),ce(Tn,Io),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mh(t,e)}pe(Tn),ce(Tn,t)}function Vi(){pe(Tn),pe(io),pe(ao)}function Dw(e){fs(ao.current);var t=fs(Tn.current),n=mh(t,e.type);t!==n&&(ce(io,e),ce(Tn,n))}function Pp(e){io.current===e&&(pe(Tn),pe(io))}var ve=Gr(0);function Cc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fd=[];function Rp(){for(var e=0;e<fd.length;e++)fd[e]._workInProgressVersionPrimary=null;fd.length=0}var Ul=Zn.ReactCurrentDispatcher,pd=Zn.ReactCurrentBatchConfig,Ns=0,xe=null,Oe=null,Le=null,Ec=!1,Da=!1,oo=0,JT=0;function Je(){throw Error(O(321))}function Op(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ln(e[n],t[n]))return!1;return!0}function Mp(e,t,n,r,s,i){if(Ns=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ul.current=e===null||e.memoizedState===null?ZT:e_,e=n(r,s),Da){i=0;do{if(Da=!1,oo=0,25<=i)throw Error(O(301));i+=1,Le=Oe=null,t.updateQueue=null,Ul.current=t_,e=n(r,s)}while(Da)}if(Ul.current=Tc,t=Oe!==null&&Oe.next!==null,Ns=0,Le=Oe=xe=null,Ec=!1,t)throw Error(O(300));return e}function Ip(){var e=oo!==0;return oo=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?xe.memoizedState=Le=e:Le=Le.next=e,Le}function Bt(){if(Oe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Le===null?xe.memoizedState:Le.next;if(t!==null)Le=t,Oe=e;else{if(e===null)throw Error(O(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Le===null?xe.memoizedState=Le=e:Le=Le.next=e}return Le}function lo(e,t){return typeof t=="function"?t(e):t}function md(e){var t=Bt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Oe,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var o=a=null,c=null,u=i;do{var d=u.lane;if((Ns&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(o=c=h,a=r):c=c.next=h,xe.lanes|=d,As|=d}u=u.next}while(u!==null&&u!==i);c===null?a=r:c.next=o,ln(r,t.memoizedState)||(ht=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,xe.lanes|=i,As|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function gd(e){var t=Bt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);ln(i,t.memoizedState)||(ht=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Lw(){}function $w(e,t){var n=xe,r=Bt(),s=t(),i=!ln(r.memoizedState,s);if(i&&(r.memoizedState=s,ht=!0),r=r.queue,Dp(Vw.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Le!==null&&Le.memoizedState.tag&1){if(n.flags|=2048,co(9,Bw.bind(null,n,r,s,t),void 0,null),$e===null)throw Error(O(349));Ns&30||Fw(n,t,s)}return s}function Fw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bw(e,t,n,r){t.value=n,t.getSnapshot=r,Uw(t)&&zw(e)}function Vw(e,t,n){return n(function(){Uw(t)&&zw(e)})}function Uw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ln(e,n)}catch{return!0}}function zw(e){var t=Gn(e,1);t!==null&&an(t,e,1,-1)}function Xg(e){var t=gn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:e},t.queue=e,e=e.dispatch=XT.bind(null,xe,e),[t.memoizedState,e]}function co(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ww(){return Bt().memoizedState}function zl(e,t,n,r){var s=gn();xe.flags|=e,s.memoizedState=co(1|t,n,void 0,r===void 0?null:r)}function uu(e,t,n,r){var s=Bt();r=r===void 0?null:r;var i=void 0;if(Oe!==null){var a=Oe.memoizedState;if(i=a.destroy,r!==null&&Op(r,a.deps)){s.memoizedState=co(t,n,i,r);return}}xe.flags|=e,s.memoizedState=co(1|t,n,i,r)}function Zg(e,t){return zl(8390656,8,e,t)}function Dp(e,t){return uu(2048,8,e,t)}function Hw(e,t){return uu(4,2,e,t)}function qw(e,t){return uu(4,4,e,t)}function Kw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gw(e,t,n){return n=n!=null?n.concat([e]):null,uu(4,4,Kw.bind(null,t,e),n)}function Lp(){}function Jw(e,t){var n=Bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Op(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yw(e,t){var n=Bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Op(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qw(e,t,n){return Ns&21?(ln(n,t)||(n=nw(),xe.lanes|=n,As|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=n)}function YT(e,t){var n=ie;ie=n!==0&&4>n?n:4,e(!0);var r=pd.transition;pd.transition={};try{e(!1),t()}finally{ie=n,pd.transition=r}}function Xw(){return Bt().memoizedState}function QT(e,t,n){var r=Dr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zw(e))eb(t,n);else if(n=Mw(e,t,n,r),n!==null){var s=it();an(n,e,r,s),tb(n,t,r)}}function XT(e,t,n){var r=Dr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zw(e))eb(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,o=i(a,n);if(s.hasEagerState=!0,s.eagerState=o,ln(o,a)){var c=t.interleaved;c===null?(s.next=s,_p(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Mw(e,t,s,r),n!==null&&(s=it(),an(n,e,r,s),tb(n,t,r))}}function Zw(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function eb(e,t){Da=Ec=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pp(e,n)}}var Tc={readContext:Ft,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useInsertionEffect:Je,useLayoutEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useMutableSource:Je,useSyncExternalStore:Je,useId:Je,unstable_isNewReconciler:!1},ZT={readContext:Ft,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:Zg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zl(4194308,4,Kw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return zl(4,2,e,t)},useMemo:function(e,t){var n=gn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=QT.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:Xg,useDebugValue:Lp,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=Xg(!1),t=e[0];return e=YT.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,s=gn();if(ge){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),$e===null)throw Error(O(349));Ns&30||Fw(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Zg(Vw.bind(null,r,i,e),[e]),r.flags|=2048,co(9,Bw.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gn(),t=$e.identifierPrefix;if(ge){var n=Wn,r=zn;n=(r&~(1<<32-sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=oo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=JT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},e_={readContext:Ft,useCallback:Jw,useContext:Ft,useEffect:Dp,useImperativeHandle:Gw,useInsertionEffect:Hw,useLayoutEffect:qw,useMemo:Yw,useReducer:md,useRef:Ww,useState:function(){return md(lo)},useDebugValue:Lp,useDeferredValue:function(e){var t=Bt();return Qw(t,Oe.memoizedState,e)},useTransition:function(){var e=md(lo)[0],t=Bt().memoizedState;return[e,t]},useMutableSource:Lw,useSyncExternalStore:$w,useId:Xw,unstable_isNewReconciler:!1},t_={readContext:Ft,useCallback:Jw,useContext:Ft,useEffect:Dp,useImperativeHandle:Gw,useInsertionEffect:Hw,useLayoutEffect:qw,useMemo:Yw,useReducer:gd,useRef:Ww,useState:function(){return gd(lo)},useDebugValue:Lp,useDeferredValue:function(e){var t=Bt();return Oe===null?t.memoizedState=e:Qw(t,Oe.memoizedState,e)},useTransition:function(){var e=gd(lo)[0],t=Bt().memoizedState;return[e,t]},useMutableSource:Lw,useSyncExternalStore:$w,useId:Xw,unstable_isNewReconciler:!1};function Yt(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Dh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var du={isMounted:function(e){return(e=e._reactInternals)?Is(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=it(),s=Dr(e),i=Hn(r,s);i.payload=t,n!=null&&(i.callback=n),t=Mr(e,i,s),t!==null&&(an(t,e,s,r),Vl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=it(),s=Dr(e),i=Hn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Mr(e,i,s),t!==null&&(an(t,e,s,r),Vl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=it(),r=Dr(e),s=Hn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Mr(e,s,r),t!==null&&(an(t,e,r,n),Vl(t,e,r))}};function ey(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!to(n,r)||!to(s,i):!0}function nb(e,t,n){var r=!1,s=Br,i=t.contextType;return typeof i=="object"&&i!==null?i=Ft(i):(s=pt(t)?Ts:Ze.current,r=t.contextTypes,i=(r=r!=null)?$i(e,s):Br),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function ty(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&du.enqueueReplaceState(t,t.state,null)}function Lh(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Np(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Ft(i):(i=pt(t)?Ts:Ze.current,s.context=$i(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Dh(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&du.enqueueReplaceState(s,s.state,null),kc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ui(e,t){try{var n="",r=t;do n+=NE(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function yd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $h(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var n_=typeof WeakMap=="function"?WeakMap:Map;function rb(e,t,n){n=Hn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nc||(Nc=!0,Gh=r),$h(e,t)},n}
vendor: 10,686 bytes, line 40
40function sb(e,t,n){n=Hn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){$h(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$h(e,t),typeof r!="function"&&(Ir===null?Ir=new Set([this]):Ir.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function ny(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new n_;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=g_.bind(null,e,t,n),t.then(e,e))}function ry(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sy(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Hn(-1,1),t.tag=2,Mr(n,t,1))),n.lanes|=1),e)}var r_=Zn.ReactCurrentOwner,ht=!1;function tt(e,t,n,r){t.child=e===null?Ow(t,null,n,r):Bi(t,e.child,n,r)}function iy(e,t,n,r,s){n=n.render;var i=t.ref;return ji(t,s),r=Mp(e,t,n,r,i,s),n=Ip(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Jn(e,t,s)):(ge&&n&&Sp(t),t.flags|=1,tt(e,t,r,s),t.child)}function ay(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Hp(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ib(e,t,i,r,s)):(e=Kl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:to,n(a,r)&&e.ref===t.ref)return Jn(e,t,s)}return t.flags|=1,e=Lr(i,r),e.ref=t.ref,e.return=t,t.child=e}function ib(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(to(i,r)&&e.ref===t.ref)if(ht=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(ht=!0);else return t.lanes=e.lanes,Jn(e,t,s)}return Fh(e,t,n,r,s)}function ab(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(pi,bt),bt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ce(pi,bt),bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ce(pi,bt),bt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ce(pi,bt),bt|=r;return tt(e,t,s,n),t.child}function ob(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fh(e,t,n,r,s){var i=pt(n)?Ts:Ze.current;return i=$i(t,i),ji(t,s),n=Mp(e,t,n,r,i,s),r=Ip(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Jn(e,t,s)):(ge&&r&&Sp(t),t.flags|=1,tt(e,t,n,s),t.child)}function oy(e,t,n,r,s){if(pt(n)){var i=!0;xc(t)}else i=!1;if(ji(t,s),t.stateNode===null)Wl(e,t),nb(t,n,r),Lh(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ft(u):(u=pt(n)?Ts:Ze.current,u=$i(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||c!==u)&&ty(t,a,r,u),gr=!1;var f=t.memoizedState;a.state=f,kc(t,r,a,s),c=t.memoizedState,o!==r||f!==c||ft.current||gr?(typeof d=="function"&&(Dh(t,n,d,r),c=t.memoizedState),(o=gr||ey(t,n,o,r,f,c,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Iw(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Yt(t.type,o),a.props=u,h=t.pendingProps,f=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ft(c):(c=pt(n)?Ts:Ze.current,c=$i(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==h||f!==c)&&ty(t,a,r,c),gr=!1,f=t.memoizedState,a.state=f,kc(t,r,a,s);var v=t.memoizedState;o!==h||f!==v||ft.current||gr?(typeof p=="function"&&(Dh(t,n,p,r),v=t.memoizedState),(u=gr||ey(t,n,u,r,f,v,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=c,r=u):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Bh(e,t,n,r,i,s)}function Bh(e,t,n,r,s,i){ob(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&qg(t,n,!1),Jn(e,t,i);r=t.stateNode,r_.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Bi(t,e.child,null,i),t.child=Bi(t,null,o,i)):tt(e,t,o,i),t.memoizedState=r.state,s&&qg(t,n,!0),t.child}function lb(e){var t=e.stateNode;t.pendingContext?Hg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Hg(e,t.context,!1),Ap(e,t.containerInfo)}function ly(e,t,n,r,s){return Fi(),kp(s),t.flags|=256,tt(e,t,n,r),t.child}var Vh={dehydrated:null,treeContext:null,retryLane:0};function Uh(e){return{baseLanes:e,cachePool:null,transitions:null}}function cb(e,t,n){var r=t.pendingProps,s=ve.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ce(ve,s&1),e===null)return Mh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=pu(a,r,0,null),e=ks(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Uh(n),t.memoizedState=Vh,e):$p(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return s_(e,t,a,r,o,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,o=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Lr(s,c),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=Lr(o,i):(i=ks(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Uh(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Vh,r}return i=e.child,e=i.sibling,r=Lr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $p(e,t){return t=pu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ll(e,t,n,r){return r!==null&&kp(r),Bi(t,e.child,null,n),e=$p(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function s_(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=yd(Error(O(422))),ll(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=pu({mode:"visible",children:r.children},s,0,null),i=ks(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Bi(t,e.child,null,a),t.child.memoizedState=Uh(a),t.memoizedState=Vh,i);if(!(t.mode&1))return ll(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(O(419)),r=yd(i,r,void 0),ll(e,t,a,r)}if(o=(a&e.childLanes)!==0,ht||o){if(r=$e,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Gn(e,s),an(r,e,s,-1))}return Wp(),r=yd(Error(O(421))),ll(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=y_.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,kt=Or(s.nextSibling),Ct=t,ge=!0,nn=null,e!==null&&(Ot[Mt++]=zn,Ot[Mt++]=Wn,Ot[Mt++]=_s,zn=e.id,Wn=e.overflow,_s=t),t=$p(t,r.children),t.flags|=4096,t)}function cy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ih(e.return,t,n)}function vd(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function ub(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(tt(e,t,r.children,n),r=ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cy(e,n,t);else if(e.tag===19)cy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ce(ve,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Cc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),vd(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Cc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}vd(t,!0,n,null,i);break;case"together":vd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}
vendor: 4,086 bytes, line 40
40function Jn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),As|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=Lr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Lr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function i_(e,t,n){switch(t.tag){case 3:lb(t),Fi();break;case 5:Dw(t);break;case 1:pt(t.type)&&xc(t);break;case 4:Ap(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ce(Sc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ce(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?cb(e,t,n):(ce(ve,ve.current&1),e=Jn(e,t,n),e!==null?e.sibling:null);ce(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ub(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ce(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,ab(e,t,n)}return Jn(e,t,n)}var db,zh,hb,fb;db=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};zh=function(){};hb=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,fs(Tn.current);var i=null;switch(n){case"input":s=dh(e,s),r=dh(e,r),i=[];break;case"select":s=we({},s,{value:void 0}),r=we({},r,{value:void 0}),i=[];break;case"textarea":s=ph(e,s),r=ph(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=yc)}gh(n,r);var a;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var o=s[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ga.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(o=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&o[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ga.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&de("scroll",e),i||o===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};fb=function(e,t,n,r){n!==r&&(t.flags|=4)};function va(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function a_(e,t,n){var r=t.pendingProps;switch(jp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return pt(t.type)&&vc(),Ye(t),null;case 3:return r=t.stateNode,Vi(),pe(ft),pe(Ze),Rp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(al(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,nn!==null&&(Qh(nn),nn=null))),zh(e,t),Ye(t),null;case 5:Pp(t);var s=fs(ao.current);
vendor: 29,713 bytes, line 40
40if(n=t.type,e!==null&&t.stateNode!=null)hb(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ye(t),null}if(e=fs(Tn.current),al(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[kn]=t,r[so]=i,e=(t.mode&1)!==0,n){case"dialog":de("cancel",r),de("close",r);break;case"iframe":case"object":case"embed":de("load",r);break;case"video":case"audio":for(s=0;s<Ta.length;s++)de(Ta[s],r);break;case"source":de("error",r);break;case"img":case"image":case"link":de("error",r),de("load",r);break;case"details":de("toggle",r);break;case"input":vg(r,i),de("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},de("invalid",r);break;case"textarea":wg(r,i),de("invalid",r)}gh(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];a==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&il(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&il(r.textContent,o,e),s=["children",""+o]):Ga.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&de("scroll",r)}switch(n){case"input":Qo(r),xg(r,i,!0);break;case"textarea":Qo(r),bg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=yc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=V0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[kn]=t,e[so]=r,db(e,t,!1,!1),t.stateNode=e;e:{switch(a=yh(n,r),n){case"dialog":de("cancel",e),de("close",e),s=r;break;case"iframe":case"object":case"embed":de("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ta.length;s++)de(Ta[s],e);s=r;break;case"source":de("error",e),s=r;break;case"img":case"image":case"link":de("error",e),de("load",e),s=r;break;case"details":de("toggle",e),s=r;break;case"input":vg(e,r),s=dh(e,r),de("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=we({},r,{value:void 0}),de("invalid",e);break;case"textarea":wg(e,r),s=ph(e,r),de("invalid",e);break;default:s=r}gh(n,s),o=s;for(i in o)if(o.hasOwnProperty(i)){var c=o[i];i==="style"?W0(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&U0(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ja(e,c):typeof c=="number"&&Ja(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ga.hasOwnProperty(i)?c!=null&&i==="onScroll"&&de("scroll",e):c!=null&&lp(e,i,c,a))}switch(n){case"input":Qo(e),xg(e,r,!1);break;case"textarea":Qo(e),bg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Fr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?xi(e,!!r.multiple,i,!1):r.defaultValue!=null&&xi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=yc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ye(t),null;case 6:if(e&&t.stateNode!=null)fb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=fs(ao.current),fs(Tn.current),al(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(i=r.nodeValue!==n)&&(e=Ct,e!==null))switch(e.tag){case 3:il(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&il(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Ye(t),null;case 13:if(pe(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&&kt!==null&&t.mode&1&&!(t.flags&128))Pw(),Fi(),t.flags|=98560,i=!1;else if(i=al(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(O(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[kn]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ye(t),i=!1}else nn!==null&&(Qh(nn),nn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ve.current&1?Me===0&&(Me=3):Wp())),t.updateQueue!==null&&(t.flags|=4),Ye(t),null);case 4:return Vi(),zh(e,t),e===null&&no(t.stateNode.containerInfo),Ye(t),null;case 10:return Tp(t.type._context),Ye(t),null;case 17:return pt(t.type)&&vc(),Ye(t),null;case 19:if(pe(ve),i=t.memoizedState,i===null)return Ye(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)va(i,!1);else{if(Me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Cc(e),a!==null){for(t.flags|=128,va(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ce(ve,ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ee()>zi&&(t.flags|=128,r=!0,va(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cc(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),va(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ge)return Ye(t),null}else 2*Ee()-i.renderingStartTime>zi&&n!==1073741824&&(t.flags|=128,r=!0,va(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ee(),t.sibling=null,n=ve.current,ce(ve,r?n&1|2:n&1),t):(Ye(t),null);case 22:case 23:return zp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?bt&1073741824&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function o_(e,t){switch(jp(t),t.tag){case 1:return pt(t.type)&&vc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi(),pe(ft),pe(Ze),Rp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pp(t),null;case 13:if(pe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ve),null;case 4:return Vi(),null;case 10:return Tp(t.type._context),null;case 22:case 23:return zp(),null;case 24:return null;default:return null}}var cl=!1,Xe=!1,l_=typeof WeakSet=="function"?WeakSet:Set,B=null;function fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Wh(e,t,n){try{n()}catch(r){je(e,t,r)}}var uy=!1;function c_(e,t){if(Th=pc,e=vw(),bp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,o=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(o=a+s),h!==i||r!==0&&h.nodeType!==3||(c=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(o=a),f===i&&++d===r&&(c=a),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_h={focusedElem:e,selectionRange:n},pc=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,b=v.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Yt(t.type,m),b);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(S){je(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return v=uy,uy=!1,v}function La(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Wh(t,n,i)}s=s.next}while(s!==r)}}function hu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Hh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function pb(e){var t=e.alternate;t!==null&&(e.alternate=null,pb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[so],delete t[Ph],delete t[HT],delete t[qT])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mb(e){return e.tag===5||e.tag===3||e.tag===4}function dy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yc));else if(r!==4&&(e=e.child,e!==null))for(qh(e,t,n),e=e.sibling;e!==null;)qh(e,t,n),e=e.sibling}function Kh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Kh(e,t,n),e=e.sibling;e!==null;)Kh(e,t,n),e=e.sibling}var Ve=null,tn=!1;function lr(e,t,n){for(n=n.child;n!==null;)gb(e,t,n),n=n.sibling}function gb(e,t,n){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(su,n)}catch{}switch(n.tag){case 5:Xe||fi(n,t);case 6:var r=Ve,s=tn;Ve=null,lr(e,t,n),Ve=r,tn=s,Ve!==null&&(tn?(e=Ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ve.removeChild(n.stateNode));break;case 18:Ve!==null&&(tn?(e=Ve,n=n.stateNode,e.nodeType===8?dd(e.parentNode,n):e.nodeType===1&&dd(e,n),Za(e)):dd(Ve,n.stateNode));break;case 4:r=Ve,s=tn,Ve=n.stateNode.containerInfo,tn=!0,lr(e,t,n),Ve=r,tn=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Wh(n,t,a),s=s.next}while(s!==r)}lr(e,t,n);break;case 1:if(!Xe&&(fi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){je(n,t,o)}lr(e,t,n);break;case 21:lr(e,t,n);break;case 22:n.mode&1?(Xe=(r=Xe)||n.memoizedState!==null,lr(e,t,n),Xe=r):lr(e,t,n);break;default:lr(e,t,n)}}function hy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new l_),t.forEach(function(r){var s=v_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Ve=o.stateNode,tn=!1;break e;case 3:Ve=o.stateNode.containerInfo,tn=!0;break e;case 4:Ve=o.stateNode.containerInfo,tn=!0;break e}o=o.return}if(Ve===null)throw Error(O(160));gb(i,a,s),Ve=null,tn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){je(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)yb(t,e),t=t.sibling}function yb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wt(t,e),fn(e),r&4){try{La(3,e,e.return),hu(3,e)}catch(m){je(e,e.return,m)}try{La(5,e,e.return)}catch(m){je(e,e.return,m)}}break;case 1:Wt(t,e),fn(e),r&512&&n!==null&&fi(n,n.return);break;case 5:if(Wt(t,e),fn(e),r&512&&n!==null&&fi(n,n.return),e.flags&32){var s=e.stateNode;try{Ja(s,"")}catch(m){je(e,e.return,m)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&F0(s,i),yh(o,a);var u=yh(o,i);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];d==="style"?W0(s,h):d==="dangerouslySetInnerHTML"?U0(s,h):d==="children"?Ja(s,h):lp(s,d,h,u)}switch(o){case"input":hh(s,i);break;case"textarea":B0(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?xi(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?xi(s,!!i.multiple,i.defaultValue,!0):xi(s,!!i.multiple,i.multiple?[]:"",!1))}s[so]=i}catch(m){je(e,e.return,m)}}break;case 6:if(Wt(t,e),fn(e),r&4){if(e.stateNode===null)throw Error(O(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){je(e,e.return,m)}}break;case 3:if(Wt(t,e),fn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Za(t.containerInfo)}catch(m){je(e,e.return,m)}break;case 4:Wt(t,e),fn(e);break;case 13:Wt(t,e),fn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Vp=Ee())),r&4&&hy(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Xe=(u=Xe)||d,Wt(t,e),Xe=u):Wt(t,e),fn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(h=B=d;B!==null;){switch(f=B,p=f.child,f.tag){case 0:case 11:case 14:case 15:La(4,f,f.return);break;case 1:fi(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){je(r,n,m)}}break;case 5:fi(f,f.return);break;case 22:if(f.memoizedState!==null){py(h);continue}}p!==null?(p.return=f,B=p):py(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=z0("display",a))}catch(m){je(e,e.return,m)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){je(e,e.return,m)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Wt(t,e),fn(e),r&4&&hy(e);break;case 21:break;default:Wt(t,e),fn(e)}}function fn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mb(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ja(s,""),r.flags&=-33);var i=dy(e);Kh(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,o=dy(e);qh(e,o,a);break;default:throw Error(O(161))}}catch(c){je(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function u_(e,t,n){B=e,vb(e)}function vb(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var s=B,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||cl;if(!a){var o=s.alternate,c=o!==null&&o.memoizedState!==null||Xe;o=cl;var u=Xe;if(cl=a,(Xe=c)&&!u)for(B=s;B!==null;)a=B,c=a.child,a.tag===22&&a.memoizedState!==null?my(s):c!==null?(c.return=a,B=c):my(s);for(;i!==null;)B=i,vb(i),i=i.sibling;B=s,cl=o,Xe=u}fy(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,B=i):fy(e)}}function fy(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xe||hu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Yt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Qg(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Qg(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Za(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Xe||t.flags&512&&Hh(t)}catch(f){je(t,t.return,f)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function py(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function my(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hu(4,t)}catch(c){je(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){je(t,s,c)}}var i=t.return;try{Hh(t)}catch(c){je(t,i,c)}break;case 5:var a=t.return;try{Hh(t)}catch(c){je(t,a,c)}}}catch(c){je(t,t.return,c)}if(t===e){B=null;break}var o=t.sibling;if(o!==null){o.return=t.return,B=o;break}B=t.return}}var d_=Math.ceil,_c=Zn.ReactCurrentDispatcher,Fp=Zn.ReactCurrentOwner,Lt=Zn.ReactCurrentBatchConfig,ne=0,$e=null,Pe=null,We=0,bt=0,pi=Gr(0),Me=0,uo=null,As=0,fu=0,Bp=0,$a=null,dt=null,Vp=0,zi=1/0,$n=null,Nc=!1,Gh=null,Ir=null,ul=!1,Tr=null,Ac=0,Fa=0,Jh=null,Hl=-1,ql=0;function it(){return ne&6?Ee():Hl!==-1?Hl:Hl=Ee()}function Dr(e){return e.mode&1?ne&2&&We!==0?We&-We:GT.transition!==null?(ql===0&&(ql=nw()),ql):(e=ie,e!==0||(e=window.event,e=e===void 0?16:cw(e.type)),e):1}function an(e,t,n,r){if(50<Fa)throw Fa=0,Jh=null,Error(O(185));Ro(e,n,r),(!(ne&2)||e!==$e)&&(e===$e&&(!(ne&2)&&(fu|=n),Me===4&&vr(e,We)),mt(e,r),n===1&&ne===0&&!(t.mode&1)&&(zi=Ee()+500,cu&&Jr()))}function mt(e,t){var n=e.callbackNode;GE(e,t);var r=fc(e,e===$e?We:0);if(r===0)n!==null&&kg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&kg(n),t===1)e.tag===0?KT(gy.bind(null,e)):_w(gy.bind(null,e)),zT(function(){!(ne&6)&&Jr()}),n=null;else{switch(rw(r)){case 1:n=fp;break;case 4:n=ew;break;case 16:n=hc;break;case 536870912:n=tw;break;default:n=hc}n=Eb(n,xb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function xb(e,t){if(Hl=-1,ql=0,ne&6)throw Error(O(327));var n=e.callbackNode;if(ki()&&e.callbackNode!==n)return null;var r=fc(e,e===$e?We:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Pc(e,r);else{t=r;var s=ne;ne|=2;var i=bb();($e!==e||We!==t)&&($n=null,zi=Ee()+500,js(e,t));do try{p_();break}catch(o){wb(e,o)}while(!0);Ep(),_c.current=i,ne=s,Pe!==null?t=0:($e=null,We=0,t=Me)}if(t!==0){if(t===2&&(s=Sh(e),s!==0&&(r=s,t=Yh(e,s))),t===1)throw n=uo,js(e,0),vr(e,r),mt(e,Ee()),n;if(t===6)vr(e,r);else{if(s=e.current.alternate,!(r&30)&&!h_(s)&&(t=Pc(e,r),t===2&&(i=Sh(e),i!==0&&(r=i,t=Yh(e,i))),t===1))throw n=uo,js(e,0),vr(e,r),mt(e,Ee()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:ls(e,dt,$n);break;case 3:if(vr(e,r),(r&130023424)===r&&(t=Vp+500-Ee(),10<t)){if(fc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){it(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ah(ls.bind(null,e,dt,$n),t);break}ls(e,dt,$n);break;case 4:if(vr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-sn(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*d_(r/1960))-r,10<r){e.timeoutHandle=Ah(ls.bind(null,e,dt,$n),r);break}ls(e,dt,$n);break;case 5:ls(e,dt,$n);break;default:throw Error(O(329))}}}return mt(e,Ee()),e.callbackNode===n?xb.bind(null,e):null}function Yh(e,t){var n=$a;return e.current.memoizedState.isDehydrated&&(js(e,t).flags|=256),e=Pc(e,t),e!==2&&(t=dt,dt=n,t!==null&&Qh(t)),e}function Qh(e){dt===null?dt=e:dt.push.apply(dt,e)}function h_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!ln(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vr(e,t){for(t&=~Bp,t&=~fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sn(t),r=1<<n;e[n]=-1,t&=~r}}function gy(e){if(ne&6)throw Error(O(327));ki();var t=fc(e,0);if(!(t&1))return mt(e,Ee()),null;var n=Pc(e,t);if(e.tag!==0&&n===2){var r=Sh(e);r!==0&&(t=r,n=Yh(e,r))}if(n===1)throw n=uo,js(e,0),vr(e,t),mt(e,Ee()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ls(e,dt,$n),mt(e,Ee()),null}function Up(e,t){var n=ne;ne|=1;try{return e(t)}finally{ne=n,ne===0&&(zi=Ee()+500,cu&&Jr())}}function Ps(e){Tr!==null&&Tr.tag===0&&!(ne&6)&&ki();var t=ne;ne|=1;var n=Lt.transition,r=ie;try{if(Lt.transition=null,ie=1,e)return e()}finally{ie=r,Lt.transition=n,ne=t,!(ne&6)&&Jr()}}function zp(){bt=pi.current,pe(pi)}function js(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,UT(n)),Pe!==null)for(n=Pe.return;n!==null;){var r=n;switch(jp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vc();break;case 3:Vi(),pe(ft),pe(Ze),Rp();break;case 5:Pp(r);break;case 4:Vi();break;case 13:pe(ve);break;case 19:pe(ve);break;case 10:Tp(r.type._context);break;case 22:case 23:zp()}n=n.return}if($e=e,Pe=e=Lr(e.current,null),We=bt=t,Me=0,uo=null,Bp=fu=As=0,dt=$a=null,hs!==null){for(t=0;t<hs.length;t++)if(n=hs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}hs=null}return e}function wb(e,t){do{var n=Pe;try{if(Ep(),Ul.current=Tc,Ec){for(var r=xe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ec=!1}if(Ns=0,Le=Oe=xe=null,Da=!1,oo=0,Fp.current=null,n===null||n.return===null){Me=1,uo=t,Pe=null;break}e:{var i=e,a=n.return,o=n,c=t;if(t=We,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=o,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=ry(a);if(p!==null){p.flags&=-257,sy(p,a,o,i,t),p.mode&1&&ny(i,u,t),t=p,c=u;var v=t.updateQueue;if(v===null){var m=new Set;m.add(c),t.updateQueue=m}else v.add(c);break e}else{if(!(t&1)){ny(i,u,t),Wp();break e}c=Error(O(426))}}else if(ge&&o.mode&1){var b=ry(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),sy(b,a,o,i,t),kp(Ui(c,o));break e}}i=c=Ui(c,o),Me!==4&&(Me=2),$a===null?$a=[i]:$a.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=rb(i,c,t);Yg(i,g);break e;case 1:o=c;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ir===null||!Ir.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=sb(i,o,t);Yg(i,S);break e}}i=i.return}while(i!==null)}jb(n)}catch(j){t=j,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(!0)}function bb(){var e=_c.current;return _c.current=Tc,e===null?Tc:e}function Wp(){(Me===0||Me===3||Me===2)&&(Me=4),$e===null||!(As&268435455)&&!(fu&268435455)||vr($e,We)}function Pc(e,t){var n=ne;ne|=2;var r=bb();($e!==e||We!==t)&&($n=null,js(e,t));do try{f_();break}catch(s){wb(e,s)}while(!0);if(Ep(),ne=n,_c.current=r,Pe!==null)throw Error(O(261));return $e=null,We=0,Me}function f_(){for(;Pe!==null;)Sb(Pe)}function p_(){for(;Pe!==null&&!FE();)Sb(Pe)}function Sb(e){var t=Cb(e.alternate,e,bt);e.memoizedProps=e.pendingProps,t===null?jb(e):Pe=t,Fp.current=null}function jb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=o_(n,t),n!==null){n.flags&=32767,Pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Pe=null;return}}else if(n=a_(n,t,bt),n!==null){Pe=n;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);Me===0&&(Me=5)}function ls(e,t,n){var r=ie,s=Lt.transition;try{Lt.transition=null,ie=1,m_(e,t,n,r)}finally{Lt.transition=s,ie=r}return null}function m_(e,t,n,r){do ki();while(Tr!==null);if(ne&6)throw Error(O(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(JE(e,i),e===$e&&(Pe=$e=null,We=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ul||(ul=!0,Eb(hc,function(){return ki(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Lt.transition,Lt.transition=null;var a=ie;ie=1;var o=ne;ne|=4,Fp.current=null,c_(e,n),yb(n,e),IT(_h),pc=!!Th,_h=Th=null,e.current=n,u_(n),BE(),ne=o,ie=a,Lt.transition=i}else e.current=n;if(ul&&(ul=!1,Tr=e,Ac=s),i=e.pendingLanes,i===0&&(Ir=null),zE(n.stateNode),mt(e,Ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Nc)throw Nc=!1,e=Gh,Gh=null,e;return Ac&1&&e.tag!==0&&ki(),i=e.pendingLanes,i&1?e===Jh?Fa++:(Fa=0,Jh=e):Fa=0,Jr(),null}function ki(){if(Tr!==null){var e=rw(Ac),t=Lt.transition,n=ie;try{if(Lt.transition=null,ie=16>e?16:e,Tr===null)var r=!1;else{if(e=Tr,Tr=null,Ac=0,ne&6)throw Error(O(331));var s=ne;for(ne|=4,B=e.current;B!==null;){var i=B,a=i.child;if(B.flags&16){var o=i.deletions;if(o!==null){for(var c=0;c<o.length;c++){var u=o[c];for(B=u;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:La(8,d,i)}var h=d.child;if(h!==null)h.return=d,B=h;else for(;B!==null;){d=B;var f=d.sibling,p=d.return;if(pb(d),d===u){B=null;break}if(f!==null){f.return=p,B=f;break}B=p}}}var v=i.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}B=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,B=a;else e:for(;B!==null;){if(i=B,i.flags&2048)switch(i.tag){case 0:case 11:case 15:La(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,B=g;break e}B=i.return}}var y=e.current;for(B=y;B!==null;){a=B;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,B=x;else e:for(a=y;B!==null;){if(o=B,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:hu(9,o)}}catch(j){je(o,o.return,j)}if(o===a){B=null;break e}var S=o.sibling;if(S!==null){S.return=o.return,B=S;break e}B=o.return}}if(ne=s,Jr(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(su,e)}catch{}r=!0}return r}finally{ie=n,Lt.transition=t}}return!1}function yy(e,t,n){t=Ui(n,t),t=rb(e,t,1),e=Mr(e,t,1),t=it(),e!==null&&(Ro(e,1,t),mt(e,t))}function je(e,t,n){if(e.tag===3)yy(e,e,n);else for(;t!==null;){if(t.tag===3){yy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ir===null||!Ir.has(r))){e=Ui(n,e),e=sb(t,e,1),t=Mr(t,e,1),e=it(),t!==null&&(Ro(t,1,e),mt(t,e));break}}t=t.return}}function g_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=it(),e.pingedLanes|=e.suspendedLanes&n,$e===e&&(We&n)===n&&(Me===4||Me===3&&(We&130023424)===We&&500>Ee()-Vp?js(e,0):Bp|=n),mt(e,t)}function kb(e,t){t===0&&(e.mode&1?(t=el,el<<=1,!(el&130023424)&&(el=4194304)):t=1);var n=it();e=Gn(e,t),e!==null&&(Ro(e,t,n),mt(e,n))}function y_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kb(e,n)}function v_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),kb(e,n)}var Cb;Cb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)ht=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ht=!1,i_(e,t,n);ht=!!(e.flags&131072)}else ht=!1,ge&&t.flags&1048576&&Nw(t,bc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var s=$i(t,Ze.current);ji(t,n),s=Mp(null,t,r,e,s,n);var i=Ip();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(i=!0,xc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Np(t),s.updater=du,t.stateNode=s,s._reactInternals=t,Lh(t,r,e,n),t=Bh(null,t,r,!0,i,n)):(t.tag=0,ge&&i&&Sp(t),tt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=w_(r),e=Yt(r,e),s){case 0:t=Fh(null,t,r,e,n);break e;case 1:t=oy(null,t,r,e,n);break e;case 11:t=iy(null,t,r,e,n);break e;case 14:t=ay(null,t,r,Yt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Yt(r,s),Fh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Yt(r,s),oy(e,t,r,s,n);case 3:e:{if(lb(t),e===null)throw Error(O(387));
vendor: 4,674 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,s=i.element,Iw(e,t),kc(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ui(Error(O(423)),t),t=ly(e,t,r,n,s);break e}else if(r!==s){s=Ui(Error(O(424)),t),t=ly(e,t,r,n,s);break e}else for(kt=Or(t.stateNode.containerInfo.firstChild),Ct=t,ge=!0,nn=null,n=Ow(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fi(),r===s){t=Jn(e,t,n);break e}tt(e,t,r,n)}t=t.child}return t;case 5:return Dw(t),e===null&&Mh(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,Nh(r,s)?a=null:i!==null&&Nh(r,i)&&(t.flags|=32),ob(e,t),tt(e,t,a,n),t.child;case 6:return e===null&&Mh(t),null;case 13:return cb(e,t,n);case 4:return Ap(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bi(t,null,r,n):tt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Yt(r,s),iy(e,t,r,s,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,ce(Sc,r._currentValue),r._currentValue=a,i!==null)if(ln(i.value,a)){if(i.children===s.children&&!ft.current){t=Jn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Hn(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ih(i.return,n,t),o.lanes|=n;break}c=c.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(O(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Ih(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}tt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ji(t,n),s=Ft(s),r=r(s),t.flags|=1,tt(e,t,r,n),t.child;case 14:return r=t.type,s=Yt(r,t.pendingProps),s=Yt(r.type,s),ay(e,t,r,s,n);case 15:return ib(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Yt(r,s),Wl(e,t),t.tag=1,pt(r)?(e=!0,xc(t)):e=!1,ji(t,n),nb(t,r,s),Lh(t,r,s,n),Bh(null,t,r,!0,e,n);case 19:return ub(e,t,n);case 22:return ab(e,t,n)}throw Error(O(156,t.tag))};function Eb(e,t){return Z0(e,t)}function x_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,r){return new x_(e,t,n,r)}function Hp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function w_(e){if(typeof e=="function")return Hp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===up)return 11;if(e===dp)return 14}return 2}function Lr(e,t){var n=e.alternate;return n===null?(n=It(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kl(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")Hp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case si:return ks(n.children,s,i,t);case cp:a=8,s|=8;break;case oh:return e=It(12,n,t,s|2),e.elementType=oh,e.lanes=i,e;case lh:return e=It(13,n,t,s),e.elementType=lh,e.lanes=i,e;case ch:return e=It(19,n,t,s),e.elementType=ch,e.lanes=i,e;case D0:return pu(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M0:a=10;break e;case I0:a=9;break e;case up:a=11;break e;case dp:a=14;break e;case mr:a=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=It(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ks(e,t,n,r){return e=It(7,e,r,t),e.lanes=n,e}function pu(e,t,n,r){return e=It(22,e,r,t),e.elementType=D0,e.lanes=n,e.stateNode={isHidden:!1},e}
vendor: 4,412 bytes, line 40
40function xd(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function wd(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function b_(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ed(0),this.expirationTimes=ed(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ed(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function qp(e,t,n,r,s,i,a,o,c){return e=new b_(e,t,n,o,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=It(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Np(i),e}function S_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ri,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Tb(e){if(!e)return Br;e=e._reactInternals;e:{if(Is(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(pt(n))return Tw(e,n,t)}return t}function _b(e,t,n,r,s,i,a,o,c){return e=qp(n,r,!0,e,s,i,a,o,c),e.context=Tb(null),n=e.current,r=it(),s=Dr(n),i=Hn(r,s),i.callback=t??null,Mr(n,i,s),e.current.lanes=s,Ro(e,s,r),mt(e,r),e}function mu(e,t,n,r){var s=t.current,i=it(),a=Dr(s);return n=Tb(n),t.context===null?t.context=n:t.pendingContext=n,t=Hn(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Mr(s,t,a),e!==null&&(an(e,s,a,i),Vl(e,s,a)),a}function Rc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function vy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Kp(e,t){vy(e,t),(e=e.alternate)&&vy(e,t)}function j_(){return null}var Nb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gp(e){this._internalRoot=e}gu.prototype.render=Gp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));mu(e,t,null,null)};gu.prototype.unmount=Gp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ps(function(){mu(null,e,null,null)}),t[Kn]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=aw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<yr.length&&t!==0&&t<yr[n].priority;n++);yr.splice(n,0,e),n===0&&lw(e)}};function Jp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xy(){}function k_(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Rc(a);i.call(u)}}var a=_b(t,r,e,0,null,!1,!1,"",xy);return e._reactRootContainer=a,e[Kn]=a.current,no(e.nodeType===8?e.parentNode:e),Ps(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var u=Rc(c);o.call(u)}}var c=qp(e,0,!1,null,null,!1,!1,"",xy);return e._reactRootContainer=c,e[Kn]=c.current,no(e.nodeType===8?e.parentNode:e),Ps(function(){mu(t,c,n,r)}),c}function vu(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var o=s;s=function(){var c=Rc(a);o.call(c)}}mu(t,a,e,s)}else a=k_(n,t,e,s,r);return Rc(a)}sw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ea(t.pendingLanes);n!==0&&(pp(t,n|1),mt(t,Ee()),!(ne&6)&&(zi=Ee()+500,Jr()))}break;case 13:Ps(function(){var r=Gn(e,1);if(r!==null){var s=it();an(r,e,1,s)}}),Kp(e,1)}};mp=function(e){if(e.tag===13){var t=Gn(e,134217728);if(t!==null){var n=it();an(t,e,134217728,n)}Kp(e,134217728)}};iw=function(e){if(e.tag===13){var t=Dr(e),n=Gn(e,t);if(n!==null){var r=it();an(n,e,t,r)}Kp(e,t)}};aw=function(){return ie};ow=function(e,t){var n=ie;try{return ie=e,t()}finally{ie=n}};
vendor: 4,151 bytes, line 40
40xh=function(e,t,n){switch(t){case"input":if(hh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=lu(r);if(!s)throw Error(O(90));$0(r),hh(r,s)}}}break;case"textarea":B0(e,n);break;case"select":t=n.value,t!=null&&xi(e,!!n.multiple,t,!1)}};K0=Up;G0=Ps;var C_={usingClientEntryPoint:!1,Events:[Mo,li,lu,H0,q0,Up]},xa={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},E_={bundleType:xa.bundleType,version:xa.version,rendererPackageName:xa.rendererPackageName,rendererConfig:xa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Q0(e),e===null?null:e.stateNode},findFiberByHostInstance:xa.findFiberByHostInstance||j_,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 dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dl.isDisabled&&dl.supportsFiber)try{su=dl.inject(E_),En=dl}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C_;_t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jp(t))throw Error(O(200));return S_(e,t,null,n)};_t.createRoot=function(e,t){if(!Jp(e))throw Error(O(299));var n=!1,r="",s=Nb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=qp(e,1,!1,null,null,n,!1,r,s),e[Kn]=t.current,no(e.nodeType===8?e.parentNode:e),new Gp(t)};_t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=Q0(t),e=e===null?null:e.stateNode,e};_t.flushSync=function(e){return Ps(e)};_t.hydrate=function(e,t,n){if(!yu(t))throw Error(O(200));return vu(null,e,t,!0,n)};_t.hydrateRoot=function(e,t,n){if(!Jp(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=Nb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=_b(t,null,e,1,n??null,s,!1,i,a),e[Kn]=t.current,no(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new gu(t)};_t.render=function(e,t,n){if(!yu(t))throw Error(O(200));return vu(null,e,t,!1,n)};_t.unmountComponentAtNode=function(e){if(!yu(e))throw Error(O(40));return e._reactRootContainer?(Ps(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[Kn]=null})}),!0):!1};_t.unstable_batchedUpdates=Up;_t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yu(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return vu(e,t,n,!1,r)};_t.version="18.3.1-next-f1338f8080-20240426";function Ab(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ab)}catch(e){console.error(e)}}Ab(),A0.exports=_t;var Xi=A0.exports;const Pb=v0(Xi);var Rb,wy=Xi;Rb=wy.createRoot,wy.hydrateRoot;const T_=1,__=1e6;let bd=0;function N_(){return bd=(bd+1)%Number.MAX_SAFE_INTEGER,bd.toString()}const Sd=new Map,by=e=>{if(Sd.has(e))return;const t=setTimeout(()=>{Sd.delete(e),Ba({type:"REMOVE_TOAST",toastId:e})},__);Sd.set(e,t)},A_=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,T_)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;
40return n?by(n):e.toasts.forEach(r=>{by(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Gl=[];let Jl={toasts:[]};function Ba(e){Jl=A_(Jl,e),Gl.forEach(t=>{t(Jl)})}function P_({...e}){const t=N_(),n=s=>Ba({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Ba({type:"DISMISS_TOAST",toastId:t});return Ba({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function R_(){const[e,t]=w.useState(Jl);return w.useEffect(()=>(Gl.push(t),()=>{const n=Gl.indexOf(t);n>-1&&Gl.splice(n,1)}),[e]),{...e,toast:P_,dismiss:n=>Ba({type:"DISMISS_TOAST",toastId:n})}}function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Sy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ob(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Sy(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Sy(e[s],null)}}}}function qe(...e){return w.useCallback(Ob(...e),e)}function O_(e,t){const n=w.createContext(t),r=i=>{const{children:a,...o}=i,c=w.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function s(i){const a=w.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function Zi(e,t=[]){let n=[];function r(i,a){const o=w.createContext(a),c=n.length;n=[...n,a];const u=h=>{var g;const{scope:f,children:p,...v}=h,m=((g=f==null?void 0:f[e])==null?void 0:g[c])||o,b=w.useMemo(()=>v,Object.values(v));return l.jsx(m.Provider,{value:b,children:p})};u.displayName=i+"Provider";function d(h,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[c])||o,v=w.useContext(p);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(a=>w.createContext(a));return function(o){const c=(o==null?void 0:o[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return s.scopeName=e,[r,M_(s,...t)]}function M_(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...o,...h}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Oc(e){const t=I_(e),n=w.forwardRef((r,s)=>{const{children:i,...a}=r,o=w.Children.toArray(i),c=o.find(L_);if(c){const u=c.props.children,d=o.map(h=>h===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:h);return l.jsx(t,{...a,ref:s,children:w.isValidElement(u)?w.cloneElement(u,void 0,d):null})}return l.jsx(t,{...a,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}function I_(e){const t=w.forwardRef((n,r)=>{const{children:s,...i}=n;if(w.isValidElement(s)){const a=F_(s),o=$_(i,s.props);return s.type!==w.Fragment&&(o.ref=r?Ob(r,a):a),w.cloneElement(s,o)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mb=Symbol("radix.slottable");function D_(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Mb,t}function L_(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mb}function $_(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{const c=i(...o);return s(...o),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function F_(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function B_(e){const t=e+"CollectionProvider",[n,r]=Zi(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:b,children:g}=m,y=I.useRef(null),x=I.useRef(new Map).current;return l.jsx(s,{scope:b,itemMap:x,collectionRef:y,children:g})};a.displayName=t;const o=e+"CollectionSlot",c=Oc(o),u=I.forwardRef((m,b)=>{const{scope:g,children:y}=m,x=i(o,g),S=qe(b,x.collectionRef);return l.jsx(c,{ref:S,children:y})});u.displayName=o;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=Oc(d),p=I.forwardRef((m,b)=>{const{scope:g,children:y,...x}=m,S=I.useRef(null),j=qe(b,S),k=i(d,g);return I.useEffect(()=>(k.itemMap.set(S,{ref:S,...x}
vendor: 9,174 bytes, line 40
40),()=>void k.itemMap.delete(S))),l.jsx(f,{[h]:"",ref:j,children:y})});p.displayName=d;function v(m){const b=i(e+"CollectionConsumer",m);return I.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((k,C)=>x.indexOf(k.ref.current)-x.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:u,ItemSlot:p},v,r]}var V_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=V_.reduce((e,t)=>{const n=Oc(`Primitive.${t}`),r=w.forwardRef((s,i)=>{const{asChild:a,...o}=s,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ib(e,t){e&&Xi.flushSync(()=>e.dispatchEvent(t))}function Nn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function U_(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e);w.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var z_="DismissableLayer",Xh="dismissableLayer.update",W_="dismissableLayer.pointerDownOutside",H_="dismissableLayer.focusOutside",jy,Db=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xu=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=e,u=w.useContext(Db),[d,h]=w.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),v=qe(t,C=>h(C)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(b),y=d?m.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=g,j=K_(C=>{const E=C.target,N=[...u.branches].some(T=>T.contains(E));!S||N||(s==null||s(C),a==null||a(C),C.defaultPrevented||o==null||o())},f),k=G_(C=>{const E=C.target;[...u.branches].some(T=>T.contains(E))||(i==null||i(C),a==null||a(C),C.defaultPrevented||o==null||o())},f);return U_(C=>{y===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&o&&(C.preventDefault(),o()))},f),w.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jy=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ky(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=jy)}},[d,f,n,u]),w.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ky())},[d,u]),w.useEffect(()=>{const C=()=>p({});return document.addEventListener(Xh,C),()=>document.removeEventListener(Xh,C)},[]),l.jsx(Ce.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,k.onFocusCapture),onBlurCapture:he(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,j.onPointerDownCapture)})});xu.displayName=z_;var q_="DismissableLayerBranch",Lb=w.forwardRef((e,t)=>{const n=w.useContext(Db),r=w.useRef(null),s=qe(t,r);return w.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(Ce.div,{...e,ref:s})});Lb.displayName=q_;function K_(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){$b(W_,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function G_(e,t=globalThis==null?void 0:globalThis.document){const n=Nn(e),r=w.useRef(!1);return w.useEffect(()=>{const s=i=>{i.target&&!r.current&&$b(H_,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ky(){const e=new CustomEvent(Xh);document.dispatchEvent(e)}function $b(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Ib(s,i):s.dispatchEvent(i)}var J_=xu,Y_=Lb,Yn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Q_="Portal",Yp=w.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[s,i]=w.useState(!1);Yn(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?Pb.createPortal(l.jsx(Ce.div,{...r,ref:t}),a):null});Yp.displayName=Q_;function X_(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var ea=e=>{const{present:t,children:n}=e,r=Z_(t),s=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=qe(r.ref,eN(s));return typeof n=="function"||r.isPresent?w.cloneElement(s,{ref:i}):null};ea.displayName="Presence";function Z_(e){const[t,n]=w.useState(),r=w.useRef(null),s=w.useRef(e),i=w.useRef("none"),a=e?"mounted":"unmounted",[o,c]=X_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=hl(r.current);i.current=o==="mounted"?u:"none"},[o]),Yn(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,p=hl(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Yn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const m=hl(r.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(i.current=hl(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:w.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function hl(e){return(e==null?void 0:e.animationName)||"none"}function eN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tN=ip[" useInsertionEffect ".trim().toString()]||Yn;function Qp({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,a]=nN({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:s;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const h=d.current;h!==o&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${o?"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.`),d.current=o},[o,r])}const u=w.useCallback(d=>{var h;if(o){const f=rN(d)?d(e):d;f!==e&&((h=a.current)==null||h.call(a,f))}else i(d)},[o,e,i,a]);return[c,u]}function nN({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),s=w.useRef(n),i=w.useRef(t);return tN(()=>{i.current=t},[t]),w.useEffect(()=>{var a;s.current!==n&&((a=i.current)==null||a.call(i,n),s.current=n)},[n,s]),[n,r,i]}function rN(e){return typeof e=="function"}var sN=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"}),iN="VisuallyHidden",wu=w.forwardRef((e,t)=>l.jsx(Ce.span,{...e,ref:t,style:{...sN,...e.style}}));wu.displayName=iN;var aN=wu,Xp="ToastProvider",[Zp,oN,lN]=B_("Toast"),[Fb,TV]=Zi("Toast",[lN]),[cN,bu]=Fb(Xp),Bb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=e,[o,c]=w.useState(null),[u,d]=w.useState(0),h=w.useRef(!1),f=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xp}\`. Expected non-empty \`string\`.`),l.jsx(Zp.Provider,{scope:t,children:l.jsx(cN,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:o,onViewportChange:c,onToastAdd:w.useCallback(()=>d(p=>p+1),[]),onToastRemove:w.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:a})})};Bb.displayName=Xp;var Vb="ToastViewport",uN=["F8"],Zh="toast.viewportPause",ef="toast.viewportResume",Ub=w.forwardRef((e,t)=>
40{const{__scopeToast:n,hotkey:r=uN,label:s="Notifications ({hotkey})",...i}=e,a=bu(Vb,n),o=oN(n),c=w.useRef(null),u=w.useRef(null),d=w.useRef(null),h=w.useRef(null),f=qe(t,h,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;w.useEffect(()=>{const b=g=>{var x;r.length!==0&&r.every(S=>g[S]||g.code===S)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),w.useEffect(()=>{const b=c.current,g=h.current;if(v&&b&&g){const y=()=>{if(!a.isClosePausedRef.current){const k=new CustomEvent(Zh);g.dispatchEvent(k),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const k=new CustomEvent(ef);g.dispatchEvent(k),a.isClosePausedRef.current=!1}},S=k=>{!b.contains(k.relatedTarget)&&x()},j=()=>{b.contains(document.activeElement)||x()};return b.addEventListener("focusin",y),b.addEventListener("focusout",S),b.addEventListener("pointermove",y),b.addEventListener("pointerleave",j),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{b.removeEventListener("focusin",y),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",y),b.removeEventListener("pointerleave",j),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[v,a.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:b})=>{const y=o().map(x=>{const S=x.ref.current,j=[S,...jN(S)];return b==="forwards"?j:j.reverse()});return(b==="forwards"?y.reverse():y).flat()},[o]);return w.useEffect(()=>{const b=h.current;if(b){const g=y=>{var j,k,C;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const E=document.activeElement,N=y.shiftKey;if(y.target===b&&N){(j=u.current)==null||j.focus();return}const M=m({tabbingDirection:N?"backwards":"forwards"}),H=M.findIndex(D=>D===E);jd(M.slice(H+1))?y.preventDefault():N?(k=u.current)==null||k.focus():(C=d.current)==null||C.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[o,m]),l.jsxs(Y_,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&l.jsx(tf,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});jd(b)}}),l.jsx(Zp.Slot,{scope:n,children:l.jsx(Ce.ol,{tabIndex:-1,...i,ref:f})}),v&&l.jsx(tf,{ref:d,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});jd(b)}})]})});Ub.displayName=Vb;var zb="ToastFocusProxy",tf=w.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=bu(zb,n);return l.jsx(wu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(o))&&r()}})});tf.displayName=zb;var Do="Toast",dN="toast.swipeStart",hN="toast.swipeMove",fN="toast.swipeCancel",pN="toast.swipeEnd",Wb=w.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...a}=e,[o,c]=Qp({prop:r,defaultProp:s??!0,onChange:i,caller:Do});return l.jsx(ea,{present:n||o,children:l.jsx(yN,{open:o,...a,ref:t,onClose:()=>c(!1),onPause:Nn(e.onPause),onResume:Nn(e.onResume),onSwipeStart:he(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:he(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:he(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Wb.displayName=Do;
40var[mN,gN]=Fb(Do,{onClose(){}}),yN=w.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:o,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...v}=e,m=bu(Do,n),[b,g]=w.useState(null),y=qe(t,D=>g(D)),x=w.useRef(null),S=w.useRef(null),j=s||m.duration,k=w.useRef(0),C=w.useRef(j),E=w.useRef(0),{onToastAdd:N,onToastRemove:T}=m,F=Nn(()=>{var G;(b==null?void 0:b.contains(document.activeElement))&&((G=m.viewport)==null||G.focus()),a()}),M=w.useCallback(D=>{!D||D===1/0||(window.clearTimeout(E.current),k.current=new Date().getTime(),E.current=window.setTimeout(F,D))},[F]);w.useEffect(()=>{const D=m.viewport;if(D){const G=()=>{M(C.current),u==null||u()},z=()=>{const Q=new Date().getTime()-k.current;C.current=C.current-Q,window.clearTimeout(E.current),c==null||c()};return D.addEventListener(Zh,z),D.addEventListener(ef,G),()=>{D.removeEventListener(Zh,z),D.removeEventListener(ef,G)}}},[m.viewport,j,c,u,M]),w.useEffect(()=>{i&&!m.isClosePausedRef.current&&M(j)},[i,j,m.isClosePausedRef,M]),w.useEffect(()=>(N(),()=>T()),[N,T]);const H=w.useMemo(()=>b?Qb(b):null,[b]);return m.viewport?l.jsxs(l.Fragment,{children:[H&&l.jsx(vN,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),l.jsx(mN,{scope:n,onClose:F,children:Xi.createPortal(l.jsx(Zp.ItemSlot,{scope:n,children:l.jsx(J_,{asChild:!0,onEscapeKeyDown:he(o,()=>{m.isFocusedToastEscapeKeyDownRef.current||F(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:he(e.onKeyDown,D=>{D.key==="Escape"&&(o==null||o(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:he(e.onPointerDown,D=>{D.button===0&&(x.current={x:D.clientX,y:D.clientY})}),onPointerMove:he(e.onPointerMove,D=>{if(!x.current)return;const G=D.clientX-x.current.x,z=D.clientY-x.current.y,Q=!!S.current,_=["left","right"].includes(m.swipeDirection),A=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=_?A(0,G):0,K=_?0:A(0,z),W=D.pointerType==="touch"?10:2,Z={x:L,y:K},te={originalEvent:D,delta:Z};Q?(S.current=Z,fl(hN,h,te,{discrete:!1})):Cy(Z,m.swipeDirection,W)?(S.current=Z,fl(dN,d,te,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(G)>W||Math.abs(z)>W)&&(x.current=null)}),onPointerUp:he(e.onPointerUp,D=>{const G=S.current,z=D.target;if(z.hasPointerCapture(D.pointerId)&&z.releasePointerCapture(D.pointerId),S.current=null,x.current=null,G){const Q=D.currentTarget,_={originalEvent:D,delta:G};Cy(G,m.swipeDirection,m.swipeThreshold)?fl(pN,p,_,{discrete:!0}):fl(fN,f,_,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),vN=e=>{const{__scopeToast:t,children:n,...r}=e,s=bu(Do,t),[i,a]=w.useState(!1),[o,c]=w.useState(!1);return bN(()=>a(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:l.jsx(Yp,{asChild:!0,children:l.jsx(wu,{...r,children:i&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},xN="ToastTitle",Hb=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Ce.div,{...r,ref:t})});Hb.displayName=xN;var wN="ToastDescription",qb=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Ce.div,{...r,ref:t})});qb.displayName=wN;var Kb="ToastAction",Gb=w.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(Yb,{altText:n,asChild:!0,children:l.jsx(em,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Kb}\`. Expected non-empty \`string\`.`),null)});Gb.displayName=Kb;var Jb="ToastClose",em=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=gN(Jb,n);return l.jsx(Yb,{asChild:!0,children:l.jsx(Ce.button,{type:"button",...r,ref:t,onClick:he(e.onClick,s.onClose)})})});em.displayName=Jb;var Yb=w.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(Ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Qb(e){const t=[];
vendor: 6,016 bytes, lines 40-95
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),SN(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Qb(r))}}),t}function fl(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Ib(s,i):s.dispatchEvent(i)}var Cy=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function bN(e=()=>{}){const t=Nn(e);Yn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function SN(e){return e.nodeType===e.ELEMENT_NODE}function jN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var kN=Bb,Xb=Ub,Zb=Wb,e1=Hb,t1=qb,n1=Gb,r1=em;function s1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=s1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function i1(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=s1(e))&&(r&&(r+=" "),r+=t);return r}const Ey=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ty=i1,CN=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ty(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,a=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=Ey(d)||Ey(h);return s[u][f]}),o=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...p}=d;return Object.entries(p).every(v=>{let[m,b]=v;return Array.isArray(b)?b.includes({...i,...o}[m]):{...i,...o}[m]===b})?[...u,h,f]:u},[]);return Ty(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.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 EN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.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 TN={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.462.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 _N=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>w.createElement("svg",{ref:c,...TN,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:a1("lucide",s),...o},[...a.map(([u,d])=>w.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.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 Ds=(e,t)=>{const n=w.forwardRef(({className:r,...s},i)=>w.createElement(_N,{ref:i,iconNode:t,className:a1(`lucide-${EN(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.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 NN=Ds("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 66 * @license lucide-react v0.462.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 AN=Ds("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 71 * @license lucide-react v0.462.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 PN=Ds("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 76 * @license lucide-react v0.462.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 RN=Ds("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/** 81 * @license lucide-react v0.462.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 ON=Ds("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);/** 86 * @license lucide-react v0.462.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 MN=Ds("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 91 * @license lucide-react v0.462.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 Lo=Ds("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,223 bytes, line 95
95],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),tm="-",IN=e=>{const t=LN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(tm);return o[0]===""&&o.length!==1&&o.shift(),o1(o,t)||DN(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&r[a]?[...c,...r[a]]:c}}},o1=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?o1(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(tm);return(a=t.validators.find(({validator:o})=>o(i)))==null?void 0:a.classGroupId},_y=/^\[(.+)\]$/,DN=e=>{if(_y.test(e)){const t=_y.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},LN=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return FN(Object.entries(e.classGroups),n).forEach(([i,a])=>{nf(a,r,i,t)}),r},nf=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Ny(t,s);i.classGroupId=n;return}if(typeof s=="function"){if($N(s)){nf(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,a])=>{nf(a,Ny(t,i),n,r)})})},Ny=(e,t)=>{let n=e;return t.split(tm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$N=e=>e.isThemeGetter,FN=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,o])=>[t+a,o])):i);return[n,s]}):e,BN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return s(i,a),a},set(i,a){n.has(i)?n.set(i,a):s(i,a)}}},l1="!",VN=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,a=o=>{const c=[];let u=0,d=0,h;for(let b=0;b<o.length;b++){let g=o[b];if(u===0){if(g===s&&(r||o.slice(b,b+i)===t)){c.push(o.slice(d,b)),d=b+i;continue}if(g==="/"){h=b;continue}}g==="["?u++:g==="]"&&u--}const f=c.length===0?o:o.substring(d),p=f.startsWith(l1),v=p?f.substring(1):f,m=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}};return n?o=>n({className:o,parseClassName:a}):a},UN=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},zN=e=>({cache:BN(e.cacheSize),parseClassName:VN(e),...IN(e)}),WN=/\s+/,HN=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],a=e.trim().split(WN);let o="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let v=!!p,m=r(v?f.substring(0,p):f);if(!m){if(!v){o=u+(o.length>0?" "+o:o);continue}if(m=r(f),!m){o=u+(o.length>0?" "+o:o);continue}v=!1}const b=UN(d).join(":"),g=h?b+l1:b,y=g+m;if(i.includes(y))continue;i.push(y);const x=s(m,v);for(let S=0;S<x.length;++S){const j=x[S];i.push(g+j)}o=u+(o.length>0?" "+o:o)}return o};function qN(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=c1(t))&&(r&&(r+=" "),r+=n);return r}const c1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=c1(e[r]))&&(n&&(n+=" "),n+=t);return n};function KN(e,...t){let n,r,s,i=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return n=zN(u),r=n.cache.get,s=n.cache.set,i=o,o(c)}function o(c){const u=r(c);if(u)return u;const d=HN(c,n);return s(c,d),d}return function(){return i(qN.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},u1=/^\[(?:([a-z-]+):)?(.+)\]$/i,GN=/^\d+\/\d+$/,JN=new Set(["px","full","screen"]),YN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QN=/\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$/,XN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ZN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mn=e=>Ci(e)||JN.has(e)||GN.test(e),cr=e=>ta(e,"length",lA),Ci=e=>!!e&&!Number.isNaN(Number(e)),kd=e=>ta(e,"number",Ci),wa=e=>!!e&&Number.isInteger(Number(e)),tA=e=>e.endsWith("%")&&Ci(e.slice(0,-1)),X=e=>u1.test(e),ur=e=>YN.test(e),nA=new Set(["length","size","percentage"]),rA=e=>ta(e,nA,d1),sA=e=>ta(e,"position",d1),iA=new Set(["image","url"]),aA=e=>ta(e,iA,uA),oA=e=>ta(e,"",cA),ba=()=>!0,ta=(e,t,n)=>{const r=u1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},lA=e=>QN.test(e)&&!XN.test(e),d1=()=>!1,cA=e=>ZN.test(e),uA=e=>eA.test(e),dA=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),s=ue("borderColor"),i=ue("borderRadius"),a=ue("borderSpacing"),o=ue("borderWidth"),c=ue("contrast"),u=ue("grayscale"),d=ue("hueRotate"),h=ue("invert"),f=ue("gap"),p=ue("gradientColorStops"),v=ue("gradientColorStopPositions"),m=ue("inset"),b=ue("margin"),g=ue("opacity"),y=ue("padding"),x=ue("saturate"),S=ue("scale"),j=ue("sepia"),k=ue("skew"),C=ue("space"),E=ue("translate"),N=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",X,t],M=()=>[X,t],H=()=>["",Mn,cr],D=()=>["auto",Ci,X],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",X],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[Ci,X];return{cacheSize:500,separator:":",theme:{colors:[ba],spacing:[Mn,cr],blur:["none","",ur,X],brightness:K(),borderColor:[e],borderRadius:["none","","full",ur,X],borderSpacing:M(),borderWidth:H(),contrast:K(),grayscale:A(),hueRotate:K(),invert:A(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[tA,cr],inset:F(),margin:F(),opacity:K(),padding:M(),saturate:K(),scale:K(),sepia:A(),skew:K(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",X]}],container:["container"],columns:[{columns:[ur]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),X]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wa,X]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",X]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",wa,X]}],"grid-cols":[{"grid-cols":[ba]}],"col-start-end":[{col:["auto",{span:["full",wa,X]},X]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[ba]}],"row-start-end":[{row:["auto",{span:[wa,X]},X]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",X]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",X]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",X,t]}],"min-w":[{"min-w":[X,t,"min","max","fit"]}],"max-w":[{"max-w":[X,t,"none","full","min","max","fit","prose",{screen:[ur]},ur]}],h:[{h:[X,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[X,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[X,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ur,cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kd]}],"font-family":[{font:[ba]}],"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:["tighter","tight","normal","wide","wider","widest",X]}],"line-clamp":[{"line-clamp":["none",Ci,kd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mn,X]}],"list-image":[{"list-image":["none",X]}],"list-style-type":[{list:["none","disc","decimal",X]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mn,cr]}],"underline-offset":[{"underline-offset":["auto",Mn,X]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),sA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 5,172 bytes, line 95
95],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Mn,X]}],"outline-w":[{outline:[Mn,cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Mn,cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ur,oA]}],"shadow-color":[{shadow:[ba]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ur,X]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",X]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",X]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",X]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[wa,X]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",X]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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"]}
vendor: 4,646 bytes, line 95
95],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",X]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mn,cr,kd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},hA=KN(dA);function at(...e){return hA(i1(e))}const fA=kN,h1=w.forwardRef(({className:e,...t},n)=>l.jsx(Xb,{ref:n,className:at("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));h1.displayName=Xb.displayName;const pA=CN("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"}}),f1=w.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(Zb,{ref:r,className:at(pA({variant:t}),e),...n}));f1.displayName=Zb.displayName;const mA=w.forwardRef(({className:e,...t},n)=>l.jsx(n1,{ref:n,className:at("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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));mA.displayName=n1.displayName;const p1=w.forwardRef(({className:e,...t},n)=>l.jsx(r1,{ref:n,className:at("absolute right-2 top-2 rounded-md p-1 text-foreground
95/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(Lo,{className:"h-4 w-4"})}));p1.displayName=r1.displayName;const m1=w.forwardRef(({className:e,...t},n)=>l.jsx(e1,{ref:n,className:at("text-sm font-semibold",e),...t}));m1.displayName=e1.displayName;const g1=w.forwardRef(({className:e,...t},n)=>l.jsx(t1,{ref:n,className:at("text-sm opacity-90",e),...t}));g1.displayName=t1.displayName;function gA(){const{toasts:e}=R_();return l.jsxs(fA,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return l.jsxs(f1,{...i,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(m1,{children:n}),r&&l.jsx(g1,{children:r})]}),s,l.jsx(p1,{})]},t)}),l.jsx(h1,{})]})}var Ay=["light","dark"],yA="(prefers-color-scheme: dark)",vA=w.createContext(void 0),xA={setTheme:e=>{},themes:[]},wA=()=>{var e;return(e=w.useContext(vA))!=null?e:xA};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:a,attrs:o,nonce:c})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Ay.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,m=!1,b=!0)=>{let g=a?a[v]:v,y=m?v+"|| ''":`'${g}'`,x="";return s&&b&&!m&&Ay.includes(v)&&(x+=`d.style.colorScheme = '${v}';`),n==="class"?m||g?x+=`c.add(${y})`:x+="null":g&&(x+=`d[s](n,${y})`),x},p=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${yA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return w.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var bA=e=>{switch(e){case"success":return kA;case"info":return EA;case"warning":return CA;case"error":return TA;default:return null}},SA=Array(12).fill(0),jA=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},SA.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),kA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),CA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),EA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),TA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),_A=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),NA=()=>
95{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},rf=1,AA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:rf++,i=this.toasts.find(o=>o.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(o=>o.id===s?(this.publish({...o,...e,id:s,title:n}),{...o,...e,id:s,dismissible:a,title:n}):o):this.addToast({title:n,...r,dismissible:a,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
95this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,a=r.then(async c=>{if(i=["resolve",c],I.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(RA(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),o=()=>new Promise((c,u)=>a.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||rf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ut=new AA,PA=(e,t)=>{let n=(t==null?void 0:t.id)||rf++;return ut.addToast({title:e,...t,id:n}),n},RA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",OA=PA,MA=()=>ut.toasts,IA=()=>ut.getActiveToasts(),Py=Object.assign(OA,{success:ut.success,info:ut.info,warning:ut.warning,error:ut.error,custom:ut.custom,message:ut.message,promise:ut.promise,dismiss:ut.dismiss,loading:ut.loading},{getHistory:MA,getToasts:IA});function DA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}DA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
95left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
95:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
95--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 96`);function pl(e){return e.label!==void 0}var LA=3,$A="32px",FA="16px",Ry=4e3,BA=356,VA=14,UA=20,zA=200;function Ht(...e){return e.filter(Boolean).join(" ")}function WA(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var HA=e=>{var t,n,r,s,i,a,o,c,u,d,h;let{invert:f,toast:p,unstyled:v,interacting:m,setHeights:b,visibleToasts:g,heights:y,index:x,toasts:S,expanded:j,removeToast:k,defaultRichColors:C,closeButton:E,style:N,cancelButtonStyle:T,actionButtonStyle:F,className:M="",descriptionClassName:H="",duration:D,position:G,gap:z,loadingIcon:Q,expandByDefault:_,classNames:A,icons:L,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:W}
vendor: 4,378 bytes, line 96
96=e,[Z,te]=I.useState(null),[_e,Ke]=I.useState(null),[se,Ls]=I.useState(!1),[nr,es]=I.useState(!1),[rr,$s]=I.useState(!1),[sr,Ho]=I.useState(!1),[Wu,qo]=I.useState(!1),[Hu,ua]=I.useState(0),[Fs,ig]=I.useState(0),da=I.useRef(p.duration||D||Ry),ag=I.useRef(null),ts=I.useRef(null),qC=x===0,KC=x+1<=g,At=p.type,Bs=p.dismissible!==!1,GC=p.className||"",JC=p.descriptionClassName||"",Ko=I.useMemo(()=>y.findIndex(J=>J.toastId===p.id)||0,[y,p.id]),YC=I.useMemo(()=>{var J;return(J=p.closeButton)!=null?J:E},[p.closeButton,E]),og=I.useMemo(()=>p.duration||D||Ry,[p.duration,D]),qu=I.useRef(0),Vs=I.useRef(0),lg=I.useRef(0),Us=I.useRef(null),[QC,XC]=G.split("-"),cg=I.useMemo(()=>y.reduce((J,ae,me)=>me>=Ko?J:J+ae.height,0),[y,Ko]),ug=NA(),ZC=p.invert||f,Ku=At==="loading";Vs.current=I.useMemo(()=>Ko*z+cg,[Ko,cg]),I.useEffect(()=>{da.current=og},[og]),I.useEffect(()=>{Ls(!0)},[]),I.useEffect(()=>{let J=ts.current;if(J){let ae=J.getBoundingClientRect().height;return ig(ae),b(me=>[{toastId:p.id,height:ae,position:p.position},...me]),()=>b(me=>me.filter(Vt=>Vt.toastId!==p.id))}},[b,p.id]),I.useLayoutEffect(()=>{if(!se)return;let J=ts.current,ae=J.style.height;J.style.height="auto";let me=J.getBoundingClientRect().height;J.style.height=ae,ig(me),b(Vt=>Vt.find(Ut=>Ut.toastId===p.id)?Vt.map(Ut=>Ut.toastId===p.id?{...Ut,height:me}:Ut):[{toastId:p.id,height:me,position:p.position},...Vt])},[se,p.title,p.description,b,p.id]);let ir=I.useCallback(()=>{es(!0),ua(Vs.current),b(J=>J.filter(ae=>ae.toastId!==p.id)),setTimeout(()=>{k(p)},zA)},[p,k,b,Vs]);I.useEffect(()=>{if(p.promise&&At==="loading"||p.duration===1/0||p.type==="loading")return;let J;return j||m||W&&ug?(()=>{if(lg.current<qu.current){let ae=new Date().getTime()-qu.current;da.current=da.current-ae}lg.current=new Date().getTime()})():da.current!==1/0&&(qu.current=new Date().getTime(),J=setTimeout(()=>{var ae;(ae=p.onAutoClose)==null||ae.call(p,p),ir()},da.current)),()=>clearTimeout(J)},[j,m,p,At,W,ug,ir]),I.useEffect(()=>{p.delete&&ir()},[ir,p.delete]);function eE(){var J,ae,me;return L!=null&&L.loading?I.createElement("div",{className:Ht(A==null?void 0:A.loader,(J=p==null?void 0:p.classNames)==null?void 0:J.loader,"sonner-loader"),"data-visible":At==="loading"},L.loading):Q?I.createElement("div",{className:Ht(A==null?void 0:A.loader,(ae=p==null?void 0:p.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":At==="loading"},Q):I.createElement(jA,{className:Ht(A==null?void 0:A.loader,(me=p==null?void 0:p.classNames)==null?void 0:me.loader),visible:At==="loading"})}return I.createElement("li",{tabIndex:0,ref:ts,className:Ht(M,GC,A==null?void 0:A.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[At],(n=p==null?void 0:p.classNames)==null?void 0:n[At]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":se,"data-promise":!!p.promise,"data-swiped":Wu,"data-removed":nr,"data-visible":KC,"data-y-position":QC,"data-x-position":XC,"data-index":x,"data-front":qC,"data-swiping":rr,"data-dismissible":Bs,"data-type":At,"data-invert":ZC,"data-swipe-out":sr,"data-swipe-direction":_e,"data-expanded":!!(j||_&&se),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${nr?Hu:Vs.current}px`,"--initial-height":_?"auto":`${Fs}px`,...N,...p.style},onDragEnd:()=>{$s(!1),te(null),Us.current=null},onPointerDown:J=>{Ku||!Bs||(ag.current=new Date,ua(Vs.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&($s(!0),Us.current={x:J.clientX,y:J.clientY}))},onPointerUp:()=>{var J,ae,me,Vt;if(sr||!Bs)return;Us.current=null;let Ut=Number(((J=ts.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ar=Number(((ae=ts.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ns=new Date().getTime()-((me=ag.current)==null?void 0:me.getTime()),zt=Z==="x"?Ut:ar,or=Math.abs(zt)/ns;if(Math.abs(zt)>=UA||or>.11){ua(Vs.current),(Vt=p.onDismiss)==null||Vt.call(p,p),Ke(Z==="x"?Ut>0?"right":"left":ar>0?"down":"up"),ir(),Ho(!0),qo(!1);return}$s(!1),te(null)},onPointerMove:J=>{var ae,me,Vt,Ut;if(!Us.current||!Bs||((ae=window.getSelection())==null?void 0:ae.toString().length)>0)return;let ar=J.clientY-Us.current.y,ns=J.clientX-Us.current.x,zt=(me=e.swipeDirections)!=null?me:WA(G);
96!Z&&(Math.abs(ns)>1||Math.abs(ar)>1)&&te(Math.abs(ns)>Math.abs(ar)?"x":"y");let or={x:0,y:0};Z==="y"?(zt.includes("top")||zt.includes("bottom"))&&(zt.includes("top")&&ar<0||zt.includes("bottom")&&ar>0)&&(or.y=ar):Z==="x"&&(zt.includes("left")||zt.includes("right"))&&(zt.includes("left")&&ns<0||zt.includes("right")&&ns>0)&&(or.x=ns),(Math.abs(or.x)>0||Math.abs(or.y)>0)&&qo(!0),(Vt=ts.current)==null||Vt.style.setProperty("--swipe-amount-x",`${or.x}px`),(Ut=ts.current)==null||Ut.style.setProperty("--swipe-amount-y",`${or.y}px`)}},YC&&!p.jsx?I.createElement("button",{"aria-label":K,"data-disabled":Ku,"data-close-button":!0,onClick:Ku||!Bs?()=>{}:()=>{var J;ir(),(J=p.onDismiss)==null||J.call(p,p)},className:Ht(A==null?void 0:A.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=L==null?void 0:L.close)!=null?i:_A):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:I.createElement(I.Fragment,null,At||p.icon||p.promise?I.createElement("div",{"data-icon":"",className:Ht(A==null?void 0:A.icon,(a=p==null?void 0:p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||eE():null,p.type!=="loading"?p.icon||(L==null?void 0:L[At])||bA(At):null):null,I.createElement("div",{"data-content":"",className:Ht(A==null?void 0:A.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},I.createElement("div",{"data-title":"",className:Ht(A==null?void 0:A.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?I.createElement("div",{"data-description":"",className:Ht(H,JC,A==null?void 0:A.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&pl(p.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||T,onClick:J=>{var ae,me;pl(p.cancel)&&Bs&&((me=(ae=p.cancel).onClick)==null||me.call(ae,J),ir())},className:Ht(A==null?void 0:A.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&pl(p.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:J=>{var ae,me;pl(p.action)&&((me=(ae=p.action).onClick)==null||me.call(ae,J),!J.defaultPrevented&&ir())},className:Ht(A==null?void 0:A.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function Oy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function qA(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,a=i?"--mobile-offset":"--offset",o=i?FA:$A;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(o)}),n}var KA=w.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:p,visibleToasts:v=LA,toastOptions:m,dir:b=Oy(),gap:g=VA,loadingIcon:y,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:j}=e,[k,C]=I.useState([]),E=I.useMemo(()=>Array.from(new Set([r].concat(k.filter(W=>W.position).map(W=>W.position)))),[k,r]),[N,T]=I.useState([]),[F,M]=I.useState(!1),[H,D]=I.useState(!1),[G,z]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=I.useRef(null),_=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=I.useRef(null),L=I.useRef(!1),K=I.useCallback(W=>{C(Z=>{var te;return(te=Z.find(_e=>_e.id===W.id))!=null&&te.delete||ut.dismiss(W.id),Z.filter(({id:_e})=>_e!==W.id)})},[]);return I.useEffect(()=>ut.subscribe(W=>{if(W.dismiss){C(Z=>Z.map(te=>te.id===W.id?{...te,delete:!0}:te));return}setTimeout(()=>{Pb.flushSync(()=>{C(Z=>{let te=Z.findIndex(_e=>_e.id===W.id);return te!==-1?[...Z.slice(0,te),{...Z[te],...W},...Z.slice(te+1)]:[W,...Z]})})})}),[]),I.useEffect(()=>{if(d!=="system"){z(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:Z})=>{z(Z?"dark":"light")})}catch{W.addListener(({matches:te})=>{try{z(te?"dark":"light")}catch(_e){console.error(_e)}})}},[d]),I.useEffect(()=>{k.length<=1&&M(!1)},[k]),I.useEffect(()=>{let W=Z=>{var te,_e;s.every(Ke=>Z[Ke]||Z.code===Ke)&&(M(!0),(te=Q.current)==null||te.focus()),Z.code==="Escape"&&(document.activeElement===Q.current||(_e=Q.current)!=null&&_e.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),I.useEffect(()=>{if(Q.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,L.current=!1)}},[Q.current]),I.createElement("section",{ref:t,"aria-label":`${S} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((W,Z)=>{var te;let[_e,Ke]=W.split("-");return k.length?I.createElement("ol",{key:W,dir:b==="auto"?Oy():b,tabIndex:-1,ref:Q,className:o,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":_e,"data-lifted":F&&k.length>1&&!i,"data-x-position":Ke,style:{"--front-toast-height":`${((te=N[0])==null?void 0:te.height)||0}px`,"--width":`${BA}px`,"--gap":`${g}px`,...p,...qA(c,u)},onBlur:se=>{L.current&&!se.currentTarget.contains(se.relatedTarget)&&(L.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||L.current||(L.current=!0,A.current=se.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{H||M(!1)},onDragEnd:()=>M(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},k.filter(se=>!se.position&&Z===0||se.position===W).map((se,Ls)=>{var nr,es;return I.createElement(HA,{key:se.id,icons:x,index:Ls,toast:se,defaultRichColors:h,duration:(nr=m==null?void 0:m.duration)!=null?nr:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:v,closeButton:(es=m==null?void 0:m.closeButton)!=null?es:a,interacting:H,position:W,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:K,toasts:k.filter(rr=>rr.position==se.position),heights:N.filter(rr=>rr.position==se.position),setHeights:T,expandByDefault:i,gap:g,loadingIcon:y,expanded:F,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const GA=({...e})=>{const{theme:t="system"}=wA();return l.jsx(KA,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var JA=ip[" useId ".trim().toString()]||(()=>{}),YA=0;function Cd(e){const[t,n]=w.useState(JA());return Yn(()=>{e||n(r=>r??String(YA++))},[e]),e||(t?`radix-${t}`:"")}const QA=["top","right","bottom","left"],Vr=Math.min,St=Math.max,Mc=Math.round,ml=Math.floor,Ur=e=>({x:e,y:e}
vendor: 5,305 bytes, line 96
96),XA={left:"right",right:"left",bottom:"top",top:"bottom"},ZA={start:"end",end:"start"};function sf(e,t,n){return St(e,Vr(t,n))}function Qn(e,t){return typeof e=="function"?e(t):e}function Xn(e){return e.split("-")[0]}function na(e){return e.split("-")[1]}function nm(e){return e==="x"?"y":"x"}function rm(e){return e==="y"?"height":"width"}function zr(e){return["top","bottom"].includes(Xn(e))?"y":"x"}function sm(e){return nm(zr(e))}function eP(e,t,n){n===void 0&&(n=!1);const r=na(e),s=sm(e),i=rm(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ic(a)),[a,Ic(a)]}function tP(e){const t=Ic(e);return[af(e),t,af(t)]}function af(e){return e.replace(/start|end/g,t=>ZA[t])}function nP(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:a;default:return[]}}function rP(e,t,n,r){const s=na(e);let i=nP(Xn(e),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),t&&(i=i.concat(i.map(af)))),i}function Ic(e){return e.replace(/left|right|bottom|top/g,t=>XA[t])}function sP(e){return{top:0,right:0,bottom:0,left:0,...e}}function y1(e){return typeof e!="number"?sP(e):{top:e,right:e,bottom:e,left:e}}function Dc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function My(e,t,n){let{reference:r,floating:s}=e;const i=zr(t),a=sm(t),o=rm(a),c=Xn(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[o]/2-s[o]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(na(t)){case"start":p[a]-=f*(n&&u?-1:1);break;case"end":p[a]+=f*(n&&u?-1:1);break}return p}const iP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,o=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=My(u,r,c),f=r,p={},v=0;for(let m=0;m<o.length;m++){const{name:b,fn:g}=o[m],{x:y,y:x,data:S,reset:j}=await g({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,h=x??h,p={...p,[b]:{...p[b],...S}},j&&v<=50&&(v++,typeof j=="object"&&(j.placement&&(f=j.placement),j.rects&&(u=j.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:h}=My(u,f,c)),m=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:p}};async function ho(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:a,elements:o,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Qn(t,e),v=y1(p),b=o[f?h==="floating"?"reference":"floating":h],g=Dc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:c})),y=h==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},j=Dc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:x,strategy:c}):y);return{top:(g.top-j.top+v.top)/S.y,bottom:(j.bottom-g.bottom+v.bottom)/S.y,left:(g.left-j.left+v.left)/S.x,right:(j.right-g.right+v.right)/S.x}}const aP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:a,elements:o,middlewareData:c}=t,{element:u,padding:d=0}=Qn(e,t)||{};if(u==null)return{};const h=y1(d),f={x:n,y:r},p=sm(s),v=rm(p),m=await a.getDimensions(u),b=p==="y",g=b?"top":"left",y=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[p]-f[p]-i.floating[v],j=f[p]-i.reference[p],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let C=k?k[x]:0;(!C||!await(a.isElement==null?void 0:a.isElement(k)))&&(C=o.floating[x]||i.floating[v]);const E=S/2-j/2,N=C/2-m[v]/2-1,T=Vr(h[g],N),F=Vr(h[y],N),M=T,H=C-m[v]-F,D=C/2-m[v]/2+E,G=sf(M,D,H),z=!c.arrow&&na(s)!=null&&D!==G&&i.reference[v]/2-(D<M?T:F)-m[v]/2<0,Q=z?D<M?D-M:D-H:0;return{[p]:f[p]+Q,data:{[p]:G,centerOffset:D-G-Q,...z&&{alignmentOffset:Q}},reset:z}}}),oP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:o,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...b}=Qn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=Xn(s),y=zr(o),x=Xn(o)===o,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=f||(x||!m?[Ic(o)]:tP(o)),k=v!=="none";!f&&k&&j.push(...rP(o,m,v,S));const C=[o,...j],E=await ho(t,b),N=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&N.push(E[g]),h){const D=eP(s,a,S);N.push(E[D[0]],E[D[1]])}if(T=[...T,{placement:s,overflows:N}],!N.every(D=>D<=0)){var F,M;
vendor: 4,891 bytes, line 96
96const D=(((F=i.flip)==null?void 0:F.index)||0)+1,G=C[D];if(G)return{data:{index:D,overflows:T},reset:{placement:G}};let z=(M=T.filter(Q=>Q.overflows[0]<=0).sort((Q,_)=>Q.overflows[1]-_.overflows[1])[0])==null?void 0:M.placement;if(!z)switch(p){case"bestFit":{var H;const Q=(H=T.filter(_=>{if(k){const A=zr(_.placement);return A===y||A==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(A=>A>0).reduce((A,L)=>A+L,0)]).sort((_,A)=>_[1]-A[1])[0])==null?void 0:H[0];Q&&(z=Q);break}case"initialPlacement":z=o;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function Iy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dy(e){return QA.some(t=>e[t]>=0)}const lP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Qn(e,t);switch(r){case"referenceHidden":{const i=await ho(t,{...s,elementContext:"reference"}),a=Iy(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Dy(a)}}}case"escaped":{const i=await ho(t,{...s,altBoundary:!0}),a=Iy(i,n.floating);return{data:{escapedOffsets:a,escaped:Dy(a)}}}default:return{}}}}};async function cP(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Xn(n),o=na(n),c=zr(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,h=Qn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof v=="number"&&(p=o==="end"?v*-1:v),c?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const uP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:a,middlewareData:o}=t,c=await cP(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},dP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:o={fn:b=>{let{x:g,y}=b;return{x:g,y}}},...c}=Qn(e,t),u={x:n,y:r},d=await ho(t,c),h=zr(Xn(s)),f=nm(h);let p=u[f],v=u[h];if(i){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+d[b],x=p-d[g];p=sf(y,p,x)}if(a){const b=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=v+d[b],x=v-d[g];v=sf(y,v,x)}const m=o.fn({...t,[f]:p,[h]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[h]:a}}}}}},hP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:a}=t,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=Qn(e,t),d={x:n,y:r},h=zr(s),f=nm(h);let p=d[f],v=d[h];const m=Qn(o,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const x=f==="y"?"height":"width",S=i.reference[f]-i.floating[x]+b.mainAxis,j=i.reference[f]+i.reference[x]-b.mainAxis;p<S?p=S:p>j&&(p=j)}if(u){var g,y;const x=f==="y"?"width":"height",S=["top","left"].includes(Xn(s)),j=i.reference[h]-i.floating[x]+(S&&((g=a.offset)==null?void 0:g[h])||0)+(S?0:b.crossAxis),k=i.reference[h]+i.reference[x]+(S?0:((y=a.offset)==null?void 0:y[h])||0)-(S?b.crossAxis:0);v<j?v=j:v>k&&(v=k)}return{[f]:p,[h]:v}}}},fP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:a,elements:o}=t,{apply:c=()=>{},...u}=Qn(e,t),d=await ho(t,u),h=Xn(s),f=na(s),p=zr(s)==="y",{width:v,height:m}=i.floating;let b,g;h==="top"||h==="bottom"?(b=h,g=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(g=h,b=f==="end"?"top":"bottom");const y=m-d.top-d.bottom,x=v-d.left-d.right,S=Vr(m-d[b],y),j=Vr(v-d[g],x),k=!t.middlewareData.shift;let C=S,E=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),k&&!f){const T=St(d.left,0),F=St(d.right,0),M=St(d.top,0),H=St(d.bottom,0);p?E=v-2*(T!==0||F!==0?T+F:St(d.left,d.right)):C=m-2*(M!==0||H!==0?M+H:St(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:C});const N=await a.getDimensions(o.floating);return v!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Su(){return typeof window<"u"}function ra(e){return v1(e)?(e.nodeName||"").toLowerCase():"#document"}function Et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rn(e){var t;return(t=(v1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function v1(e){return Su()?e instanceof Node||e instanceof Et(e).Node:!1}function cn(e){return Su()?e instanceof Element||e instanceof Et(e).Element:!1}function An(e){return Su()?e instanceof HTMLElement||e instanceof Et(e).HTMLElement:!1}function Ly(e){return!Su()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Et(e).ShadowRoot}function $o(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=un(e);
vendor: 4,617 bytes, line 96
96return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function pP(e){return["table","td","th"].includes(ra(e))}function ju(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function im(e){const t=am(),n=cn(e)?un(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mP(e){let t=Wr(e);for(;An(t)&&!Wi(t);){if(im(t))return t;if(ju(t))return null;t=Wr(t)}return null}function am(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wi(e){return["html","body","#document"].includes(ra(e))}function un(e){return Et(e).getComputedStyle(e)}function ku(e){return cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wr(e){if(ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ly(e)&&e.host||Rn(e);return Ly(t)?t.host:t}function x1(e){const t=Wr(e);return Wi(t)?e.ownerDocument?e.ownerDocument.body:e.body:An(t)&&$o(t)?t:x1(t)}function fo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=x1(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),a=Et(s);if(i){const o=of(a);return t.concat(a,a.visualViewport||[],$o(s)?s:[],o&&n?fo(o):[])}return t.concat(s,fo(s,[],n))}function of(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function w1(e){const t=un(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=An(e),i=s?e.offsetWidth:n,a=s?e.offsetHeight:r,o=Mc(n)!==i||Mc(r)!==a;return o&&(n=i,r=a),{width:n,height:r,$:o}}function om(e){return cn(e)?e:e.contextElement}function Ei(e){const t=om(e);if(!An(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=w1(t);let a=(i?Mc(n.width):n.width)/r,o=(i?Mc(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const gP=Ur(0);function b1(e){const t=Et(e);return!am()||!t.visualViewport?gP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Et(e)?!1:t}function Rs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=om(e);let a=Ur(1);t&&(r?cn(r)&&(a=Ei(r)):a=Ei(e));const o=yP(i,n,r)?b1(i):Ur(0);let c=(s.left+o.x)/a.x,u=(s.top+o.y)/a.y,d=s.width/a.x,h=s.height/a.y;if(i){const f=Et(i),p=r&&cn(r)?Et(r):r;let v=f,m=of(v);for(;m&&r&&p!==v;){const b=Ei(m),g=m.getBoundingClientRect(),y=un(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,S=g.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,h*=b.y,c+=x,u+=S,v=Et(m),m=of(v)}}return Dc({width:d,height:h,x:c,y:u})}function vP(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",a=Rn(r),o=t?ju(t.floating):!1;if(r===a||o&&i)return n;let c={scrollLeft:0,scrollTop:0},u=Ur(1);const d=Ur(0),h=An(r);if((h||!h&&!i)&&((ra(r)!=="body"||$o(a))&&(c=ku(r)),An(r))){const f=Rs(r);u=Ei(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x,y:n.y*u.y-c.scrollTop*u.y+d.y}}function xP(e){return Array.from(e.getClientRects())}function lf(e,t){const n=ku(e).scrollLeft;return t?t.left+n:Rs(Rn(e)).left+n}function wP(e){const t=Rn(e),n=ku(e),r=e.ownerDocument.body,s=St(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=St(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+lf(e);const o=-n.scrollTop;return un(r).direction==="rtl"&&(a+=St(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:a,y:o}}function bP(e,t){const n=Et(e),r=Rn(e),s=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,o=0,c=0;if(s){i=s.width,a=s.height;const u=am();(!u||u&&t==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}return{width:i,height:a,x:o,y:c}}function SP(e,t){const n=Rs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=An(e)?Ei(e):Ur(1),a=e.clientWidth*i.x,o=e.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:a,height:o,x:c,y:u}}function $y(e,t,n){let r;if(t==="viewport")r=bP(e,n);else if(t==="document")r=wP(Rn(e));else if(cn(t))r=SP(t,n);else{const s=b1(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return Dc(r)}function S1(e,t){const n=Wr(e);return n===t||!cn(n)||Wi(n)?!1:un(n).position==="fixed"||S1(n,t)}function jP(e,t){const n=t.get(e);if(n)return n;let r=fo(e,[],!1).filter(o=>cn(o)&&ra(o)!=="body"),s=null;
vendor: 10,330 bytes, line 96
96const i=un(e).position==="fixed";let a=i?Wr(e):e;for(;cn(a)&&!Wi(a);){const o=un(a),c=im(a);!c&&o.position==="fixed"&&(s=null),(i?!c&&!s:!c&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||$o(a)&&!c&&S1(e,a))?r=r.filter(d=>d!==a):s=o,a=Wr(a)}return t.set(e,r),r}function kP(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?ju(t)?[]:jP(t,this._c):[].concat(n),r],o=a[0],c=a.reduce((u,d)=>{const h=$y(t,d,s);return u.top=St(h.top,u.top),u.right=Vr(h.right,u.right),u.bottom=Vr(h.bottom,u.bottom),u.left=St(h.left,u.left),u},$y(t,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function CP(e){const{width:t,height:n}=w1(e);return{width:t,height:n}}function EP(e,t,n){const r=An(t),s=Rn(t),i=n==="fixed",a=Rs(e,!0,i,t);let o={scrollLeft:0,scrollTop:0};const c=Ur(0);if(r||!r&&!i)if((ra(t)!=="body"||$o(s))&&(o=ku(t)),r){const p=Rs(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else s&&(c.x=lf(s));let u=0,d=0;if(s&&!r&&!i){const p=s.getBoundingClientRect();d=p.top+o.scrollTop,u=p.left+o.scrollLeft-lf(s,p)}const h=a.left+o.scrollLeft-c.x-u,f=a.top+o.scrollTop-c.y-d;return{x:h,y:f,width:a.width,height:a.height}}function Ed(e){return un(e).position==="static"}function Fy(e,t){if(!An(e)||un(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function j1(e,t){const n=Et(e);if(ju(e))return n;if(!An(e)){let s=Wr(e);for(;s&&!Wi(s);){if(cn(s)&&!Ed(s))return s;s=Wr(s)}return n}let r=Fy(e,t);for(;r&&pP(r)&&Ed(r);)r=Fy(r,t);return r&&Wi(r)&&Ed(r)&&!im(r)?n:r||mP(e)||n}const TP=async function(e){const t=this.getOffsetParent||j1,n=this.getDimensions,r=await n(e.floating);return{reference:EP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _P(e){return un(e).direction==="rtl"}const NP={convertOffsetParentRelativeRectToViewportRelativeRect:vP,getDocumentElement:Rn,getClippingRect:kP,getOffsetParent:j1,getElementRects:TP,getClientRects:xP,getDimensions:CP,getScale:Ei,isElement:cn,isRTL:_P};function AP(e,t){let n=null,r;const s=Rn(e);function i(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:h,height:f}=e.getBoundingClientRect();if(o||t(),!h||!f)return;const p=ml(d),v=ml(s.clientWidth-(u+h)),m=ml(s.clientHeight-(d+f)),b=ml(u),y={rootMargin:-p+"px "+-v+"px "+-m+"px "+-b+"px",threshold:St(0,Vr(1,c))||1};let x=!0;function S(j){const k=j[0].intersectionRatio;if(k!==c){if(!x)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return a(!0),i}function PP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=om(e),d=s||i?[...u?fo(u):[],...fo(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const h=u&&o?AP(u,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,m=c?Rs(e):null;c&&b();function b(){const g=Rs(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,v=requestAnimationFrame(b)}return n(),()=>{var g;d.forEach(y=>{s&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),h==null||h(),(g=p)==null||g.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const RP=uP,OP=dP,MP=oP,IP=fP,DP=lP,By=aP,LP=hP,$P=(e,t,n)=>{const r=new Map,s={platform:NP,...n},i={...s.platform,_c:r};return iP(e,t,{...s,platform:i})};var Yl=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Lc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lc(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!Lc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function k1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vy(e,t){const n=k1(e);return Math.round(t*n)/n}function Td(e){const t=w.useRef(e);return Yl(()=>{t.current=e}),t}function FP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=e,[d,h]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(r);Lc(f,r)||p(r);const[v,m]=w.useState(null),[b,g]=w.useState(null),y=w.useCallback(_=>{_!==k.current&&(k.current=_,m(_))},[]),x=w.useCallback(_=>{_!==C.current&&(C.current=_,g(_))},[]),S=i||v,j=a||b,k=w.useRef(null),C=w.useRef(null),E=w.useRef(d),N=c!=null,T=Td(c),F=Td(s),M=Td(u),H=w.useCallback(()=>{if(!k.current||!C.current)return;const _={placement:t,strategy:n,middleware:f};F.current&&(_.platform=F.current),$P(k.current,C.current,_).then(A=>{const L={...A,isPositioned:M.current!==!1};D.current&&!Lc(E.current,L)&&(E.current=L,Xi.flushSync(()=>{h(L)}))})},[f,t,n,F,M]);Yl(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,h(_=>({..._,isPositioned:!1})))},[u]);const D=w.useRef(!1);Yl(()=>(D.current=!0,()=>{D.current=!1}),[]),Yl(()=>{if(S&&(k.current=S),j&&(C.current=j),S&&j){if(T.current)return T.current(S,j,H);H()}},[S,j,H,T,N]);const G=w.useMemo(()=>({reference:k,floating:C,setReference:y,setFloating:x}),[y,x]),z=w.useMemo(()=>({reference:S,floating:j}),[S,j]),Q=w.useMemo(()=>{const _={position:n,left:0,top:0};if(!z.floating)return _;const A=Vy(z.floating,d.x),L=Vy(z.floating,d.y);return o?{..._,transform:"translate("+A+"px, "+L+"px)",...k1(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:L}},[n,o,z.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:H,refs:G,elements:z,floatingStyles:Q}),[d,H,G,z,Q])}const BP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?By({element:r.current,padding:s}).fn(n):{}:r?By({element:r,padding:s}).fn(n):{}}}},VP=(e,t)=>({...RP(e),options:[e,t]}),UP=(e,t)=>({...OP(e),options:[e,t]}),zP=(e,t)=>({...LP(e),options:[e,t]}),WP=(e,t)=>({...MP(e),options:[e,t]}),HP=(e,t)=>({...IP(e),options:[e,t]}),qP=(e,t)=>({...DP(e),options:[e,t]}),KP=(e,t)=>({...BP(e),options:[e,t]});var GP="Arrow",C1=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return l.jsx(Ce.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});C1.displayName=GP;var JP=C1;function E1(e){const[t,n]=w.useState(void 0);return Yn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,o;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var T1="Popper",[_1,N1]=Zi(T1),[_V,A1]=_1(T1),P1="PopperAnchor",R1=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=A1(P1,n),a=w.useRef(null),o=qe(t,a);return w.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.jsx(Ce.div,{...s,ref:o})});R1.displayName=P1;var lm="PopperContent",[YP,QP]=_1(lm),O1=w.forwardRef((e,t)=>{var se,Ls,nr,es,rr,$s;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=e,b=A1(lm,n),[g,y]=w.useState(null),x=qe(t,sr=>y(sr)),[S,j]=w.useState(null),k=E1(S),C=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,N=r+(i!=="center"?"-"+i:""),T=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(u)?u:[u],M=F.length>0,H={padding:T,boundary:F.filter(ZP),altBoundary:M},{refs:D,floatingStyles:G,placement:z,isPositioned:Q,middlewareData:_}=FP({strategy:"fixed",placement:N,whileElementsMounted:(...sr)=>PP(...sr,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[VP({mainAxis:s+E,alignmentAxis:a}),c&&UP({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?zP():void 0,...H}),c&&WP({...H}),HP({...H,apply:({elements:sr,rects:Ho,availableWidth:Wu,availableHeight:qo})=>{const{width:Hu,height:ua}=Ho.reference,Fs=sr.floating.style;Fs.setProperty("--radix-popper-available-width",`${Wu}px`),Fs.setProperty("--radix-popper-available-height",`${qo}px`),Fs.setProperty("--radix-popper-anchor-width",`${Hu}px`),Fs.setProperty("--radix-popper-anchor-height",`${ua}px`)}}),S&&KP({element:S,padding:o}),eR({arrowWidth:C,arrowHeight:E}),f&&qP({strategy:"referenceHidden",...H})]}),[A,L]=D1(z),K=Nn(v);Yn(()=>{Q&&(K==null||K())},[Q,K]);const W=(se=_.arrow)==null?void 0:se.x,Z=(Ls=_.arrow)==null?void 0:Ls.y,te=((nr=_.arrow)==null?void 0:nr.centerOffset)!==0,[_e,Ke]=w.useState();return Yn(()=>{g&&Ke(window.getComputedStyle(g).zIndex)},[g]),l.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:Q?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(es=_.transformOrigin)==null?void 0:es.x,(rr=_.transformOrigin)==null?void 0:rr.y].join(" "),...(($s=_.hide)==null?void 0:$s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(YP,{scope:n,placedSide:A,onArrowChange:j,arrowX:W,arrowY:Z,shouldHideArrow:te,children:l.jsx(Ce.div,{"data-side":A,"data-align":L,...m,ref:x,style:{...m.style,animation:Q?void 0:"none"}})})})});O1.displayName=lm;var M1="PopperArrow",XP={top:"bottom",right:"left",bottom:"top",left:"r
96ight"},I1=w.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=QP(M1,r),a=XP[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:l.jsx(JP,{...s,ref:n,style:{...s.style,display:"block"}})})});I1.displayName=M1;function ZP(e){return e!==null}var eR=e=>({name:"transformOrigin",options:e,fn(t){var b,g,y;const{placement:n,rects:r,middlewareData:s}=t,a=((b=s.arrow)==null?void 0:b.centerOffset)!==0,o=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=D1(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((g=s.arrow)==null?void 0:g.x)??0)+o/2,p=(((y=s.arrow)==null?void 0:y.y)??0)+c/2;let v="",m="";return u==="bottom"?(v=a?h:`${f}px`,m=`${-c}px`):u==="top"?(v=a?h:`${f}px`,m=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,m=a?h:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,m=a?h:`${p}px`),{data:{x:v,y:m}}}});function D1(e){const[t,n="center"]=e.split("-");return[t,n]}var tR=R1,nR=O1,rR=I1,[Cu,NV]=Zi("Tooltip",[N1]),cm=N1(),L1="TooltipProvider",sR=700,Uy="tooltip.open",[iR,$1]=Cu(L1),F1=e=>{const{__scopeTooltip:t,delayDuration:n=sR,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,a=w.useRef(!0),o=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(iR,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:w.useCallback(u=>{o.current=u},[]),disableHoverableContent:s,children:i})};F1.displayName=L1;var B1="Tooltip",[AV,Eu]=Cu(B1),cf="TooltipTrigger",aR=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Eu(cf,n),i=$1(cf,n),a=cm(n),o=w.useRef(null),c=qe(t,o,s.onTriggerChange),u=w.useRef(!1),d=w.useRef(!1),h=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(tR,{asChild:!0,...a,children:l.jsx(Ce.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:he(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:he(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:he(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:he(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:he(e.onBlur,s.onClose),onClick:he(e.onClick,s.onClose)})})});aR.displayName=cf;var oR="TooltipPortal",[PV,lR]=Cu(oR,{forceMount:void 0}),Hi="TooltipContent",V1=w.forwardRef((e,t)=>{const n=lR(Hi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,a=Eu(Hi,e.__scopeTooltip);return l.jsx(ea,{present:r||a.open,children:a.disableHoverableContent?l.jsx(U1,{side:s,...i,ref:t}):l.jsx(cR,{side:s,...i,ref:t})})}),cR=w.forwardRef((e,t)=>{const n=Eu(Hi,e.__scopeTooltip),r=$1(Hi,e.__scopeTooltip),s=w.useRef(null),i=qe(t,s),[a,o]=w.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=w.useCallback(()=>{o(null),h(!1)},[h]),p=w.useCallback((v,m)=>{const b=v.currentTarget,g={x:v.clientX,y:v.clientY},y=pR(g,b.getBoundingClientRect()),x=mR(g,y),S=gR(m.getBoundingClientRect()),j=vR([...x,...S]);o(j),h(!0)},[h]);return w.useEffect(()=>()=>f(),[f]),w.useEffect(()=>{if(c&&d){const v=b=>p(b,d),m=b=>p(b,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",m)}}},[c,d,p,f]),w.useEffect(()=>{if(a){const v=m=>{const b=m.target,g={x:m.clientX,y:m.clientY},y=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),x=!yR(g,a);y?f():x&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,a,u,f]),l.jsx(U1,{...e,ref:i})}),[uR,dR]=Cu(B1,{isInside:!1}),hR=D_("TooltipContent"),U1=w.forwardRef((e,t)=>
vendor: 4,516 bytes, line 96
96{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...o}=e,c=Eu(Hi,n),u=cm(n),{onClose:d}=c;return w.useEffect(()=>(document.addEventListener(Uy,d),()=>document.removeEventListener(Uy,d)),[d]),w.useEffect(()=>{if(c.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),l.jsx(xu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:l.jsxs(nR,{"data-state":c.stateAttribute,...u,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(hR,{children:r}),l.jsx(uR,{scope:n,isInside:!0,children:l.jsx(aN,{id:c.contentId,role:"tooltip",children:s||r})})]})})});V1.displayName=Hi;var z1="TooltipArrow",fR=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=cm(n);return dR(z1,n).isInside?null:l.jsx(rR,{...s,...r,ref:t})});fR.displayName=z1;function pR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function mR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function gR(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function yR(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const o=t[i],c=t[a],u=o.x,d=o.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function vR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),xR(t)}function xR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var wR=F1,W1=V1;const bR=wR,SR=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(W1,{ref:r,sideOffset:t,className:at("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));SR.displayName=W1.displayName;var Tu=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(){}},_u=typeof window>"u"||"Deno"in globalThis;function Qt(){}function jR(e,t){return typeof e=="function"?e(t):e}function kR(e){return typeof e=="number"&&e>=0&&e!==1/0}function CR(e,t){return Math.max(e+(t||0)-Date.now(),0)}function uf(e,t){return typeof e=="function"?e(t):e}function ER(e,t){return typeof e=="function"?e(t):e}function zy(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==um(a,t.options))return!1}else if(!mo(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||i&&!i(t))}function Wy(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(po(t.options.mutationKey)!==po(i))return!1}
vendor: 17,268 bytes, line 96
96else if(!mo(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function um(e,t){return((t==null?void 0:t.queryKeyHashFn)||po)(e)}function po(e){return JSON.stringify(e,(t,n)=>df(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>mo(e[n],t[n])):!1}function H1(e,t){if(e===t)return e;const n=Hy(e)&&Hy(t);if(n||df(e)&&df(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),a=i.length,o=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<a;d++){const h=n?d:i[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(o[h]=void 0,u++):(o[h]=H1(e[h],t[h]),o[h]===e[h]&&e[h]!==void 0&&u++)}return s===a&&u===s?e:o}return t}function Hy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function df(e){if(!qy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!qy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function qy(e){return Object.prototype.toString.call(e)==="[object Object]"}function TR(e){return new Promise(t=>{setTimeout(t,e)})}function _R(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?H1(e,t):t}function NR(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function AR(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dm=Symbol();function q1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===dm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ys,br,Ni,u0,PR=(u0=class extends Tu{constructor(){super();re(this,ys);re(this,br);re(this,Ni);Y(this,Ni,t=>{if(!_u&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,br)||this.setEventListener(P(this,Ni))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,br))==null||t.call(this),Y(this,br,void 0))}setEventListener(t){var n;Y(this,Ni,t),(n=P(this,br))==null||n.call(this),Y(this,br,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,ys)!==t&&(Y(this,ys,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,ys)=="boolean"?P(this,ys):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ys=new WeakMap,br=new WeakMap,Ni=new WeakMap,u0),K1=new PR,Ai,Sr,Pi,d0,RR=(d0=class extends Tu{constructor(){super();re(this,Ai,!0);re(this,Sr);re(this,Pi);Y(this,Pi,t=>{if(!_u&&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(){P(this,Sr)||this.setEventListener(P(this,Pi))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Sr))==null||t.call(this),Y(this,Sr,void 0))}setEventListener(t){var n;Y(this,Pi,t),(n=P(this,Sr))==null||n.call(this),Y(this,Sr,t(this.setOnline.bind(this)))}setOnline(t){P(this,Ai)!==t&&(Y(this,Ai,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,Ai)}},Ai=new WeakMap,Sr=new WeakMap,Pi=new WeakMap,d0),$c=new RR;function OR(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function MR(e){return Math.min(1e3*2**e,3e4)}function G1(e){return(e??"online")==="online"?$c.isOnline():!0}var J1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _d(e){return e instanceof J1}function Y1(e){let t=!1,n=0,r=!1,s;const i=OR(),a=m=>{var b;r||(f(new J1(m)),(b=e.abort)==null||b.call(e))},o=()=>{t=!0},c=()=>{t=!1},u=()=>K1.isFocused()&&(e.networkMode==="always"||$c.isOnline())&&e.canRun(),d=()=>G1(e.networkMode)&&e.canRun(),h=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),s==null||s(),i.resolve(m))},f=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var b;s=g=>{(r||u())&&m(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(h).catch(g=>{var k;if(r)return;const y=e.retry??(_u?0:3),x=e.retryDelay??MR,S=typeof x=="function"?x(n,g):x,j=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,g);if(t||!j){f(g);return}n++,(k=e.onFail)==null||k.call(e,n,g),TR(S).then(()=>u()?void 0:p()).then(()=>{t?f(g):v()})})};return{promise:i,cancel:a,continue:()=>(s==null||s(),i),cancelRetry:o,continueRetry:c,canStart:d,start:()=>(d()?v():p().then(v),i)}}var IR=e=>setTimeout(e,0);function DR(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=IR;const i=o=>{t?e.push(o):s(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var nt=DR(),vs,h0,Q1=(h0=class{constructor(){re(this,vs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kR(this.gcTime)&&Y(this,vs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_u?1/0:5*60*1e3))}clearGcTimeout(){P(this,vs)&&(clearTimeout(P(this,vs)),Y(this,vs,void 0))}},vs=new WeakMap,h0),Ri,xs,Rt,ws,Qe,No,bs,Zt,Ln,f0,LR=(f0=class extends Q1{constructor(t){super();re(this,Zt);re(this,Ri);re(this,xs);re(this,Rt);re(this,ws);re(this,Qe);re(this,No);re(this,bs);Y(this,bs,!1),Y(this,No,t.defaultOptions),this.setOptions(t.options),this.observers=[],Y(this,ws,t.client),Y(this,Rt,P(this,ws).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Y(this,Ri,FR(this.options)),this.state=t.state??P(this,Ri),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Qe))==null?void 0:t.promise}setOptions(t){this.options={...P(this,No),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Rt).remove(this)}setData(t,n){const r=_R(this.state.data,t,this.options);return Ge(this,Zt,Ln).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ge(this,Zt,Ln).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=P(this,Qe))==null?void 0:r.promise;return(s=P(this,Qe))==null||s.cancel(t),n?n.then(Qt).catch(Qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Ri))}isActive(){return this.observers.some(t=>ER(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>uf(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:!CR(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Qe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Qe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,Rt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,Qe)&&(P(this,bs)?P(this,Qe).cancel({revert:!0}):P(this,Qe).cancelRetry()),this.scheduleGc()),P(this,Rt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ge(this,Zt,Ln).call(this,{type:"invalidate"})}fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Qe))return P(this,Qe).continueRetry(),P(this,Qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Y(this,bs,!0),r.signal)})},i=()=>{const f=q1(this.options,n),v=(()=>{const m={client:P(this,ws),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return Y(this,bs,!1),this.options.persister?this.options.persister(f,v,this):f(v)},o=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,ws),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(o,this),Y(this,xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&Ge(this,Zt,Ln).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta});const c=f=>{var p,v,m,b;_d(f)&&f.silent||Ge(this,Zt,Ln).call(this,{type:"error",error:f}),_d(f)||((v=(p=P(this,Rt).config).onError)==null||v.call(p,f,this),(b=(m=P(this,Rt).config).onSettled)==null||b.call(m,this.state.data,f,this)),this.scheduleGc()};return Y(this,Qe,Y1({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,v,m,b;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){c(g);return}(v=(p=P(this,Rt).config).onSuccess)==null||v.call(p,f,this),(b=(m=P(this,Rt).config).onSettled)==null||b.call(m,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,p)=>{Ge(this,Zt,Ln).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{Ge(this,Zt,Ln).call(this,{type:"pause"})},onContinue:()=>{Ge(this,Zt,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),P(this,Qe).start()}},Ri=new WeakMap,xs=new WeakMap,Rt=new WeakMap,ws=new WeakMap,Qe=new WeakMap,No=new WeakMap,bs=new WeakMap,Zt=new WeakSet,Ln=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,...$R(r.data,this.options),fetchMeta:t.meta??null};case"success":return Y(this,xs,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return _d(s)&&s.revert&&P(this,xs)?{...P(this,xs),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Rt).notify({query:this,type:"updated",action:t})})},f0);function $R(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:G1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function FR(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 xn,p0,BR=(p0=class extends Tu{constructor(t={}){super();re(this,xn);this.config=t,Y(this,xn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??um(s,n);let a=this.get(i);return a||(a=new LR({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){P(this,xn).has(t.queryHash)||(P(this,xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,xn).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,xn).get(t)}getAll(){return[...P(this,xn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>zy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>zy(t,r)):n}notify(t){nt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xn=new WeakMap,p0),wn,et,Ss,bn,dr,m0,VR=(m0=class extends Q1{constructor(t){super();re(this,bn);re(this,wn);re(this,et);re(this,Ss);this.mutationId=t.mutationId,Y(this,et,t.mutationCache),Y(this,wn,[]),this.state=t.state||UR(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,wn).includes(t)||(P(this,wn).push(t),this.clearGcTimeout(),P(this,et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Y(this,wn,P(this,wn).filter(n=>n!==t)),this.scheduleGc(),P(this,et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,wn).length||(this.state.status==="pending"?this.scheduleGc():P(this,et).remove(this))}continue(){var t;return((t=P(this,Ss))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,c,u,d,h,f,p,v,m,b,g,y,x,S,j,k,C,E;const n=()=>{Ge(this,bn,dr).call(this,{type:"continue"})};Y(this,Ss,Y1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,T)=>{Ge(this,bn,dr).call(this,{type:"failed",failureCount:N,error:T})},onPause:()=>{Ge(this,bn,dr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,et).canRun(this)}));const r=this.state.status==="pending",s=!P(this,Ss).canStart();try{if(r)n();else{Ge(this,bn,dr).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(i=P(this,et).config).onMutate)==null?void 0:a.call(i,t,this));const T=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));T!==this.state.context&&Ge(this,bn,dr).call(this,{type:"pending",context:T,variables:t,isPaused:s})}const N=await P(this,Ss).start();return await((d=(u=P(this,et).config).onSuccess)==null?void 0:d.call(u,N,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,N,t,this.state.context)),await((v=(p=P(this,et).config).onSettled)==null?void 0:v.call(p,N,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,N,null,t,this.state.context)),Ge(this,bn,dr).call(this,{type:"success",data:N}),N}catch(N){try{throw await((y=(g=P(this,et).config).onError)==null?void 0:y.call(g,N,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,N,t,this.state.context)),await((k=(j=P(this,et).config).onSettled)==null?void 0:k.call(j,void 0,N,this.state.variables,this.state.context,this)),await((E=(C=this.options).onSettled)==null?void 0:E.call(C,void 0,N,t,this.state.context)),N}finally{Ge(this,bn,dr).call(this,{type:"error",error:N})}}finally{P(this,et).runNext(this)}}},wn=new WeakMap,et=new WeakMap,Ss=new WeakMap,bn=new WeakSet,dr=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),nt.batch(()=>{P(this,wn).forEach(r=>{r.onMutationUpdate(t)}),P(this,et).notify({mutation:this,type:"updated",action:t})})},m0);function UR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Un,en,Ao,g0,zR=(g0=class extends Tu{constructor(t={}){super();re(this,Un);re(this,en);re(this,Ao);
96this.config=t,Y(this,Un,new Set),Y(this,en,new Map),Y(this,Ao,0)}build(t,n,r){const s=new VR({mutationCache:this,mutationId:++Go(this,Ao)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){P(this,Un).add(t);const n=gl(t);if(typeof n=="string"){const r=P(this,en).get(n);r?r.push(t):P(this,en).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,Un).delete(t)){const n=gl(t);if(typeof n=="string"){const r=P(this,en).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&P(this,en).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gl(t);if(typeof n=="string"){const r=P(this,en).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=gl(t);if(typeof n=="string"){const s=(r=P(this,en).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nt.batch(()=>{P(this,Un).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,Un).clear(),P(this,en).clear()})}getAll(){return Array.from(P(this,Un))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wy(n,r))}findAll(t={}){return this.getAll().filter(n=>Wy(t,n))}notify(t){nt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return nt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Qt))))}},Un=new WeakMap,en=new WeakMap,Ao=new WeakMap,g0);function gl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ky(e){return{onFetch:(t,n)=>{var d,h,f,p,v;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=q1(t.options,t.fetchOptions),y=async(x,S,j)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const C=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return b(F),F})(),E=await g(C),{maxPages:N}=t.options,T=j?AR:NR;return{pages:T(x.pages,E,N),pageParams:T(x.pageParams,S,N)}};if(s&&i.length){const x=s==="backward",S=x?WR:Gy,j={pages:i,pageParams:a},k=S(r,j);o=await y(j,k,x)}else{const x=e??i.length;do{const S=c===0?a[0]??r.initialPageParam:Gy(r,o);if(c>0&&S==null)break;o=await y(o,S),c++}while(c<x)}return o};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Gy(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 WR(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 be,jr,kr,Oi,Mi,Cr,Ii,Di,y0,HR=(y0=class{constructor(e={}){re(this,be);re(this,jr);re(this,kr);re(this,Oi);re(this,Mi);re(this,Cr);re(this,Ii);re(this,Di);Y(this,be,e.queryCache||new BR),Y(this,jr,e.mutationCache||new zR),Y(this,kr,e.defaultOptions||{}),Y(this,Oi,new Map),Y(this,Mi,new Map),Y(this,Cr,0)}mount(){Go(this,Cr)._++,P(this,Cr)===1&&(Y(this,Ii,K1.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,be).onFocus())})),Y(this,Di,$c.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,be).onOnline())})))}unmount(){var e,t;Go(this,Cr)._--,P(this,Cr)===0&&((e=P(this,Ii))==null||e.call(this),Y(this,Ii,void 0),(t=P(this,Di))==null||t.call(this),Y(this,Di,void 0))}isFetching(e){return P(this,be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,jr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,be).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,be).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(uf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,be).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=P(this,be).get(r.queryHash),i=s==null?void 0:s.state.data,a=jR(t,i);if(a!==void 0)return P(this,be).build(this,r).setData(a,{...n,manual:!0})}
96setQueriesData(e,t,n){return nt.batch(()=>P(this,be).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,be).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,be);nt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,be);return nt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=nt.batch(()=>P(this,be).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Qt).catch(Qt)}invalidateQueries(e,t={}){return nt.batch(()=>(P(this,be).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=nt.batch(()=>P(this,be).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Qt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,be).build(this,t);return n.isStaleByTime(uf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qt).catch(Qt)}fetchInfiniteQuery(e){return e.behavior=Ky(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qt).catch(Qt)}ensureInfiniteQueryData(e){return e.behavior=Ky(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $c.isOnline()?P(this,jr).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,be)}getMutationCache(){return P(this,jr)}getDefaultOptions(){return P(this,kr)}setDefaultOptions(e){Y(this,kr,e)}setQueryDefaults(e,t){P(this,Oi).set(po(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Oi).values()],n={};return t.forEach(r=>{mo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,Mi).set(po(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Mi).values()],n={};return t.forEach(r=>{mo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,kr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=um(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===dm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,kr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,be).clear(),P(this,jr).clear()}},be=new WeakMap,jr=new WeakMap,kr=new WeakMap,Oi=new WeakMap,Mi=new WeakMap,Cr=new WeakMap,Ii=new WeakMap,Di=new WeakMap,y0),qR=w.createContext(void 0),KR=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(qR.Provider,{value:e,children:t}));/** 97 * @remix-run/router v1.23.0 98 * 99 * Copyright (c) Remix Software Inc. 100 * 101 * This source code is licensed under the MIT license found in the 102 * LICENSE.md file in the root directory of this source tree. 103 * 104 * @license MIT 105 */function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(this,arguments)}var _r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_r||(_r={}));const Jy="popstate";function GR(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:a,hash:o}=r.location;return hf("",{pathname:i,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Fc(s)}return YR(t,n,null,e)}function Te(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function X1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JR(){return Math.random().toString(36).substr(2,8)}function Yy(e,t){return{usr:e.state,key:e.key,idx:t}}function hf(e,t,n,r){return n===void 0&&(n=null),go({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sa(t):t,{state:n,key:t&&t.key||r||JR()})}function Fc(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 sa(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 YR(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,o=_r.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(go({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){o=_r.Pop;let b=d(),g=b==null?null:b-u;u=b,c&&c({action:o,location:m.location,delta:g})}function f(b,g){o=_r.Push;let y=hf(m.location,b,g);u=d()+1;let x=Yy(y,u),S=m.createHref(y);try{a.pushState(x,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(S)}i&&c&&c({action:o,location:m.location,delta:1})}function p(b,g){o=_r.Replace;let y=hf(m.location,b,g);u=d();let x=Yy(y,u),S=m.createHref(y);a.replaceState(x,"",S),i&&c&&c({action:o,location:m.location,delta:0})}function v(b){let g=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof b=="string"?b:Fc(b);
vendor: 2,909 bytes, line 105
105return y=y.replace(/ $/,"%20"),Te(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let m={get action(){return o},get location(){return e(s,a)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Jy,h),c=b,()=>{s.removeEventListener(Jy,h),c=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let g=v(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:p,go(b){return a.go(b)}};return m}var Qy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qy||(Qy={}));function QR(e,t,n){return n===void 0&&(n="/"),XR(e,t,n,!1)}function XR(e,t,n,r){let s=typeof t=="string"?sa(t):t,i=hm(s.pathname||"/",n);if(i==null)return null;let a=Z1(e);ZR(a);let o=null;for(let c=0;o==null&&c<a.length;++c){let u=uO(i);o=lO(a[c],u,r)}return o}function Z1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,a,o)=>{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(Te(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=$r([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(Te(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Z1(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:aO(u,i.index),routesMeta:d})};return e.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let c of eS(i.path))s(i,a,c)}),t}function eS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=eS(r.join("/")),o=[];return o.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&o.push(...a),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function ZR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:oO(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const eO=/^:[\w-]+$/,tO=3,nO=2,rO=1,sO=10,iO=-2,Xy=e=>e==="*";function aO(e,t){let n=e.split("/"),r=n.length;return n.some(Xy)&&(r+=iO),t&&(r+=nO),n.filter(s=>!Xy(s)).reduce((s,i)=>s+(eO.test(i)?tO:i===""?rO:sO),r)}function oO(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function lO(e,t,n){let{routesMeta:r}=e,s={},i="/",a=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=Zy({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=Zy({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,180 bytes, lines 105-114
105Object.assign(s,h.params),a.push({params:s,pathname:$r([i,h.pathname]),pathnameBase:pO($r([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=$r([i,h.pathnameBase]))}return a}function Zy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=cO(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let m=o[h]||"";a=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const v=o[h];return p&&!v?u[f]=void 0:u[f]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function cO(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),X1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function uO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return X1(!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 hm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function dO(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?sa(e):e;return{pathname:n?n.startsWith("/")?n:hO(n,t):t,search:mO(r),hash:gO(s)}}function hO(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Nd(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 fO(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fm(e,t){let n=fO(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function pm(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=sa(e):(s=go({},e),Te(!s.pathname||!s.pathname.includes("?"),Nd("?","pathname","search",s)),Te(!s.pathname||!s.pathname.includes("#"),Nd("#","pathname","hash",s)),Te(!s.search||!s.search.includes("#"),Nd("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,o;if(a==null)o=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}o=h>=0?t[h]:"/"}let c=dO(s,o),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const $r=e=>e.join("/").replace(/\/\/+/g,"/"),pO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const tS=["post","put","patch","delete"];new Set(tS);const vO=["get",...tS];new Set(vO);/** 106 * React Router v6.30.1 107 * 108 * Copyright (c) Remix Software Inc. 109 * 110 * This source code is licensed under the MIT license found in the 111 * LICENSE.md file in the root directory of this source tree. 112 * 113 * @license MIT 114 */function yo(){return yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yo.apply(this,arguments)}const mm=w.createContext(null),xO=w.createContext(null),Yr=w.createContext(null),Nu=w.createContext(null),Qr=w.createContext({outlet:null,matches:[],isDataRoute:!1}),nS=w.createContext(null);function wO(e,t){let{relative:n}=t===void 0?{}:t;ia()||Te(!1);let{basename:r,navigator:s}=w.useContext(Yr),{hash:i,pathname:a,search:o}=iS(e,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:$r([r,a])),s.createHref({pathname:c,search:o,hash:i})}function ia(){return w.useContext(Nu)!=null}function On(){return ia()||Te(!1),w.useContext(Nu).location}function rS(e){w.useContext(Yr).static||w.useLayoutEffect(e)}function sS(){let{isDataRoute:e}=w.useContext(Qr);return e?OO():bO()}function bO(){ia()||Te(!1);let e=w.useContext(mm),{basename:t,future:n,navigator:r}=w.useContext(Yr),{matches:s}=w.useContext(Qr),{pathname:i}=On(),a=JSON.stringify(fm(s,n.v7_relativeSplatPath)),o=w.useRef(!1);return rS(()=>{o.current=!0}),w.useCallback(function(u,d){if(d===void 0&&(d={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let h=pm(u,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:$r([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,a,i,e])}function iS(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=w.useContext(Yr),{matches:s}=w.useContext(Qr),{pathname:i}=On(),a=JSON.stringify(fm(s,r.v7_relativeSplatPath));return w.useMemo(()=>pm(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function SO(e,t){return jO(e,t)}function jO(e,t,n,r){ia()||Te(!1);let{navigator:s}=w.useContext(Yr),{matches:i}=w.useContext(Qr),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=On(),d;if(t){var h;let b=typeof t=="string"?sa(t):t;c==="/"||(h=b.pathname)!=null&&h.startsWith(c)||Te(!1),d=b}else d=u;let f=d.pathname||"/",p=f;if(c!=="/"){let b=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=QR(e,{pathname:p}),m=_O(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},o,b.params),pathname:$r([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:$r([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&m?w.createElement(Nu.Provider,{value:{location:yo({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:_r.Pop}},m):m}function kO(){let e=RO(),t=yO(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:s},n):null,null)}const CO=w.createElement(kO,null);class EO extends w.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?w.createElement(Qr.Provider,{value:this.props.routeContext},w.createElement(nS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TO(e){let{routeContext:t,match:n,children:r}=e,s=w.useContext(mm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Qr.Provider,{value:t},r)}function _O(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(s=n)==null?void 0:s.errors;if(o!=null){let d=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);d>=0||Te(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:p}=n,v=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||v){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,f)=>{let p,v=!1,m=null,b=null;n&&(p=o&&h.route.id?o[h.route.id]:void 0,m=h.route.errorElement||CO,c&&(u<0&&f===0?(v=!0,b=null):u===f&&(v=!0,b=h.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,f+1)),y=()=>{let x;return p?x=m:v?x=b:h.route.Component?x=w.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,w.createElement(TO,{match:h,routeC
114ontext:{outlet:d,matches:g,isDataRoute:n!=null},children:x})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?w.createElement(EO,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var aS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(aS||{}),Bc=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}(Bc||{});function NO(e){let t=w.useContext(mm);return t||Te(!1),t}function AO(e){let t=w.useContext(xO);return t||Te(!1),t}function PO(e){let t=w.useContext(Qr);return t||Te(!1),t}function oS(e){let t=PO(),n=t.matches[t.matches.length-1];return n.route.id||Te(!1),n.route.id}function RO(){var e;let t=w.useContext(nS),n=AO(Bc.UseRouteError),r=oS(Bc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function OO(){let{router:e}=NO(aS.UseNavigateStable),t=oS(Bc.UseNavigateStable),n=w.useRef(!1);return rS(()=>{n.current=!0}),w.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,yo({fromRouteId:t},i)))},[e,t])}function MO(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ev(e){let{to:t,replace:n,state:r,relative:s}=e;ia()||Te(!1);let{future:i,static:a}=w.useContext(Yr),{matches:o}=w.useContext(Qr),{pathname:c}=On(),u=sS(),d=pm(t,fm(o,i.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return w.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function Ie(e){Te(!1)}function IO(e){let{basename:t="/",children:n=null,location:r,navigationType:s=_r.Pop,navigator:i,static:a=!1,future:o}=e;ia()&&Te(!1);let c=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:c,navigator:i,static:a,future:yo({v7_relativeSplatPath:!1},o)}),[c,o,i,a]);typeof r=="string"&&(r=sa(r));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:v="default"}=r,m=w.useMemo(()=>{let b=hm(d,c);return b==null?null:{location:{pathname:b,search:h,hash:f,state:p,key:v},navigationType:s}},[c,d,h,f,p,v,s]);return m==null?null:w.createElement(Yr.Provider,{value:u},w.createElement(Nu.Provider,{children:n,value:m}))}function DO(e){let{children:t,location:n}=e;return SO(ff(t),n)}new Promise(()=>{});function ff(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,s)=>{if(!w.isValidElement(r))return;let i=[...t,s];if(r.type===w.Fragment){n.push.apply(n,ff(r.props.children,i));return}r.type!==Ie&&Te(!1),!r.props.index||!r.props.children||Te(!1);let a={id:r.props.id||i.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&&(a.children=ff(r.props.children,i)),n.push(a)}),n}/** 115 * React Router DOM v6.30.1 116 * 117 * Copyright (c) Remix Software Inc. 118 * 119 * This source code is licensed under the MIT license found in the 120 * LICENSE.md file in the root directory of this source tree. 121 * 122 * @license MIT 123 */function pf(){return pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pf.apply(this,arguments)}function LO(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function $O(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FO(e,t){return e.button===0&&(!t||t==="_self")&&!$O(e)}const BO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],VO="6";try{window.__reactRouterVersion=VO}catch{}const UO="startTransition",tv=ip[UO];function zO(e){let{basename:t,children:n,future:r,window:s}=e,i=w.useRef();i.current==null&&(i.current=GR({window:s,v5Compat:!0}));let a=i.current,[o,c]=w.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=w.useCallback(h=>{u&&tv?tv(()=>c(h)):c(h)},[c,u]);return w.useLayoutEffect(()=>a.listen(d),[a,d]),w.useEffect(()=>MO(r),[r]),w.createElement(IO,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const WO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",HO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ke=w.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:o,target:c,to:u,preventScrollReset:d,viewTransition:h}
123=t,f=LO(t,BO),{basename:p}=w.useContext(Yr),v,m=!1;if(typeof u=="string"&&HO.test(u)&&(v=u,WO))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),j=hm(S.pathname,p);S.origin===x.origin&&j!=null?u=j+S.search+S.hash:m=!0}catch{}let b=wO(u,{relative:s}),g=qO(u,{replace:a,state:o,target:c,preventScrollReset:d,relative:s,viewTransition:h});function y(x){r&&r(x),x.defaultPrevented||g(x)}return w.createElement("a",pf({},f,{href:v||b,onClick:m||i?r:y,ref:n,target:c}))});var nv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(nv||(nv={}));var rv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(rv||(rv={}));function qO(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:o}=t===void 0?{}:t,c=sS(),u=On(),d=iS(e,{relative:a});return w.useCallback(h=>{if(FO(h,n)){h.preventDefault();let f=r!==void 0?r:Fc(u)===Fc(d);c(e,{replace:f,state:s,preventScrollReset:i,relative:a,viewTransition:o})}},[u,c,d,r,s,n,e,i,a,o])}const gm="https://magic-camps.com",KO=`${gm}/og-image.jpg`,In=(e,t,n)=>({selector:`meta[${e}="${t}"]`,create:()=>{const r=document.createElement("meta");return r.setAttribute(e,t),r},attr:"content",value:n}),yt=({path:e,title:t,description:n,image:r=KO,jsonLd:s})=>(w.useEffect(()=>{const i=`${gm}${e==="/"?"/":e}`,a=[In("name","description",n),{selector:'link[rel="canonical"]',create:()=>{const u=document.createElement("link");return u.setAttribute("rel","canonical"),u},attr:"href",value:i},In("property","og:url",i),In("property","og:title",t),In("property","og:description",n),In("property","og:image",r),In("name","twitter:url",i),In("name","twitter:title",t),In("name","twitter:description",n),In("name","twitter:image",r)],o=document.title;document.title=t;const c=a.map(u=>{const d=document.head.querySelector(u.selector);if(d){const f=d.getAttribute(u.attr);return d.setAttribute(u.attr,u.value),()=>{f===null?d.removeAttribute(u.attr):d.setAttribute(u.attr,f)}}const h=u.create();return h.setAttribute(u.attr,u.value),h.setAttribute("data-route-seo",""),document.head.appendChild(h),()=>h.remove()});if(s){const u=document.createElement("script");u.type="application/ld+json",u.setAttribute("data-route-seo",""),u.textContent=JSON.stringify(s),document.head.appendChild(u),c.push(()=>u.remove())}return()=>{c.forEach(u=>u()),document.title=o}},[e,t,n,r,s]),null),vt={"/privacy":{title:"Privacy and Cookies | Magic Camps Wahiba Sands",description:"How Magic Camps Wahiba Sands uses necessary storage, optional analytics and marketing cookies, and booking data, and how to change your choices."},"/":{title:"Eco-Chic Luxury Desert Camp in Wahiba Sands | Magic Camps",description:"Magic Camps Wahiba Sands: 16 tents opening onto the dunes of Oman, with private dining, curated desert experiences and warm Omani hospitality."},"/story":{title:"Our Story | Magic Camps Wahiba Sands",description:"From the beginnings of Magic Travels to Magic Camps in the Wahiba Sands: the story, values and pioneering spirit behind our desert camps."},"/magic-camps":{title:"Private Eco-Chic Desert Camp in Oman | Magic Camps",description:"Bedroom tents, private bathrooms, a desert lou
123nge, dining under the stars and campfire stargazing at our private camp in the Omani desert."},"/magic-collection":{title:"Magic Collection Luxury Camps and Lodges | Magic Camps",description:"Discover the Magic Collection: AMAR Luxury Desert Ecolodge, the GAÃA Dahabiya on the Nile and Magic Camps in the Wahiba Sands of Oman."},"/accommodation":{title:"Luxury Tents with Private Bathrooms | Magic Camps Wahiba",description:"Sleep under the stars in canvas suites with canopy beds and private Bedouin-inspired bathrooms, each tent opening onto the Wahiba Sands."},"/camp-life":{title:"Desert Experiences and Camp Life in Oman | Magic Camps",description:"Days written by the desert: the Sunset Lounge, the Majlis, fire and stars, and a Leave No Trace approach to camp life in the Wahiba Sands."},"/gastronomy":{title:"Desert Dining Under the Stars | Magic Camps Wahiba",description:"Omani flavours from sunrise coffee to candlelit dinners: mezze, Bedouin-inspired feasts, sunset dune setups and starlit private dinners."},"/wellness":{title:"Desert Wellness and Private Retreats | Magic Camps Wahiba",description:"Sunrise yoga on the dunes, guided desert walks, Omani massage rituals with frankincense, and stargazing meditation at Magic Camps."},"/sustainability":{title:"Solar-Powered Eco-Chic Camp in Oman | Magic Camps",description:"Leave no trace: conscious design, low-impact solar operations, respect for desert ecosystems, local heritage and responsible sourcing."},"/gallery":{title:"Magic Camps Wahiba Sands Photo Gallery",description:"Photos of Magic Camps in the Wahiba Sands: tents, dunes, dining, lounges and desert nights in Oman."},"/press":{title:"Press and Media | Magic Camps Wahiba Sands",description:"Magic Camps Wahiba Sands in the press, including Le Figaro Voyages and Cosmopolitan, plus news from Magic Travels."},"/contact":{title:"Contact and Plan Your Stay | Magic Camps Wahiba",description:"Contact Magic Camps to plan your stay in the Wahiba Sands. Send an enquiry and our team will reply personally."},"/camp-activities":{title:"Wahiba Sands Desert Activities | Magic Camps",description:"Camel rides, 4x4 dune drives, fat bikes in the dunes, wadi days, Bedouin home visits and local crafts around Magic Camps Wahiba Sands."}},GO={"@context":"https://schema.org","@type":"LodgingBusiness",name:"Magic Camps Wahiba Sands",url:`${gm}/`,email:"[email protected]",telephone:"+968 2412 1805",checkinTime:"15:00",checkoutTime:"10:00",numberOfRooms:16,sameAs:["https://www.instagram.com/magiccamps/"],amenityFeature:[{"@type":"LocationFeatureSpecification",name:"Private bathrooms",value:!0},{"@type":"LocationFeatureSpecification",name:"Solar-powered operation",value:!0}]},ym=w.createContext({});function vm(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const JO=typeof window<"u",lS=JO?w.useLayoutEffect:w.useEffect,Au=w.createContext(null);function xm(e,t){e.indexOf(t)===-1&&e.push(t)}function Vc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pn=(e,t,n)=>n>t?t:n<e?e:n;let Pu=()=>{},qi=()=>{};const Hr={},cS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function uS(e){return typeof e=="object"&&e!==null}const dS=e=>/^0[^.\s]+$/u.test(e);function hS(e){let t;return()=>(t===void 0&&(t=e()),t)}const $t=e=>e,YO=(e,t)=>n=>t(e(n)),Fo=(...e)=>e.reduce(YO),vo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class wm{constructor(){this.subscriptions=[]}add(t){return xm(this.subscriptions,t),()=>Vc(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const gt=e=>e*1e3,Dt=e=>e/1e3;function fS(e,t){return t?e*(1e3/t):0}const pS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,QO=1e-7,XO=12;function ZO(e,t,n,r,s){let i,a,o=0;do a=t+(n-t)/2,i=pS(a,r,s)-e,i>0?n=a:t=a;while(Math.abs(i)>QO&&++o<XO);return a}function Bo(e,t,n,r){if(e===t&&n===r)return $t;const s=i=>ZO(i,0,1,e,n);return i=>i===0||i===1?i:pS(s(i),t,r)}const mS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gS=e=>t=>1-e(1-t),yS=Bo(.33,1.53,.69,.99),bm=gS(yS),vS=mS(bm),xS=e=>e>=1?1:(e*=2)<1?.5*bm(e):.5*(2-Math.pow(2,-10*(e-1))),Sm=e=>1-Math.sin(Math.acos(e)),wS=gS(Sm),bS=mS(Sm),e2=Bo(.42,0,1,1),t2=Bo(0,0,.58,1),SS=Bo(.42,0,.58,1),n2=e=>Array.isArray(e)&&typeof e[0]!="number",jS=e=>Array.isArray(e)&&typeof e[0]=="number",sv={linear:$t,easeIn:e2,easeInOut:SS,easeOut:t2,circIn:Sm,cir
vendor: 27,489 bytes, line 123
123cInOut:bS,circOut:wS,backIn:bm,backInOut:vS,backOut:yS,anticipate:xS},r2=e=>typeof e=="string",iv=e=>{if(jS(e)){qi(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Bo(t,n,r,s)}else if(r2(e))return qi(sv[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),sv[e];return e},yl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],av={value:null,addProjectionMetrics:null};function s2(e,t){let n=new Set,r=new Set,s=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){a.has(h)&&(d.schedule(h),e()),c++,h(o)}const d={schedule:(h,f=!1,p=!1)=>{const m=p&&s?n:r;return f&&a.add(h),m.add(h),h},cancel:h=>{r.delete(h),a.delete(h)},process:h=>{if(o=h,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),t&&av.value&&av.value.frameloop[t].push(c),c=0,n.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const i2=40;function kS(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=yl.reduce((x,S)=>(x[S]=s2(i,t?S:void 0),x),{}),{setup:o,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:p,postRender:v}=a,m=()=>{const x=Hr.useManualTiming,S=x?s.timestamp:performance.now();n=!1,x||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,i2),1)),s.timestamp=S,s.isProcessing=!0,o.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),p.process(s),v.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(m))},b=()=>{n=!0,r=!0,s.isProcessing||e(m)};return{schedule:yl.reduce((x,S)=>{const j=a[S];return x[S]=(k,C=!1,E=!1)=>(n||b(),j.schedule(k,C,E)),x},{}),cancel:x=>{for(let S=0;S<yl.length;S++)a[yl[S]].cancel(x)},state:s,steps:a}}const{schedule:oe,cancel:qr,state:Ue,steps:Ad}=kS(typeof requestAnimationFrame<"u"?requestAnimationFrame:$t,!0);let Ql;function a2(){Ql=void 0}const rt={now:()=>(Ql===void 0&&rt.set(Ue.isProcessing||Hr.useManualTiming?Ue.timestamp:performance.now()),Ql),set:e=>{Ql=e,queueMicrotask(a2)}},CS=e=>t=>typeof t=="string"&&t.startsWith(e),ES=CS("--"),o2=CS("var(--"),jm=e=>o2(e)?l2.test(e.split("/*")[0].trim()):!1,l2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ov(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const aa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xo={...aa,transform:e=>Pn(0,1,e)},vl={...aa,default:1},Va=e=>Math.round(e*1e5)/1e5,km=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function c2(e){return e==null}const u2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Cm=(e,t)=>n=>!!(typeof n=="string"&&u2.test(n)&&n.startsWith(e)||t&&!c2(n)&&Object.prototype.hasOwnProperty.call(n,t)),TS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,o]=r.match(km);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},d2=e=>Pn(0,255,e),Pd={...aa,transform:e=>Math.round(d2(e))},ps={test:Cm("rgb","red"),parse:TS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pd.transform(e)+", "+Pd.transform(t)+", "+Pd.transform(n)+", "+Va(xo.transform(r))+")"};function h2(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const mf={test:Cm("#"),parse:h2,transform:ps.transform},Vo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),hr=Vo("deg"),_n=Vo("%"),V=Vo("px"),f2=Vo("vh"),p2=Vo("vw"),lv={..._n,parse:e=>_n.parse(e)/100,transform:e=>_n.transform(e*100)},mi={test:Cm("hsl","hue"),parse:TS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_n.transform(Va(t))+", "+_n.transform(Va(n))+", "+Va(xo.transform(r))+")"},Ae={test:e=>ps.test(e)||mf.test(e)||mi.test(e),parse:e=>ps.test(e)?ps.parse(e):mi.test(e)?mi.parse(e):mf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ps.transform(e):mi.transform(e),getAnimatableNone:e=>{const t=Ae.parse(e);return t.alpha=0,Ae.transform(t)}},m2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function g2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(km))==null?void 0:t.length)||0)+(((n=e.match(m2))==null?void 0:n.length)||0)>0}const _S="number",NS="color",y2="var",v2="var(",cv="${}",x2=/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 Ki(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const o=t.replace(x2,c=>(Ae.test(c)?(r.color.push(i),s.push(NS),n.push(Ae.parse(c))):c.startsWith(v2)?(r.var.push(i),s.push(y2),n.push(c)):(r.number.push(i),s.push(_S),n.push(parseFloat(c))),++i,cv)).split(cv);return{values:n,split:o,indexes:r,types:s}}function w2(e){return Ki(e).values}function AS({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const a=t[i];a===_S?s+=Va(r[i]):a===NS?s+=Ae.transform(r[i]):s+=r[i]}return s}}function b2(e){return AS(Ki(e))}const S2=e=>typeof e=="number"?0:Ae.test(e)?Ae.getAnimatableNone(e):e,j2=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:S2(e);function k2(e){const t=Ki(e);return AS(t)(t.values.map((r,s)=>j2(r,t.split[s])))}const on={test:g2,parse:w2,createTransformer:b2,getAnimatableNone:k2};function Rd(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 C2({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,a=0;if(!t)s=i=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,c=2*n-o;s=Rd(c,o,e+1/3),i=Rd(c,o,e),a=Rd(c,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Uc(e,t){return n=>n>0?t:e}const fe=(e,t,n)=>e+(t-e)*n,Od=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},E2=[mf,ps,mi],T2=e=>E2.find(t=>t.test(e));function uv(e){const t=T2(e);if(Pu(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===mi&&(n=C2(n)),n}const dv=(e,t)=>{const n=uv(e),r=uv(t);if(!n||!r)return Uc(e,t);const s={...n};return i=>(s.red=Od(n.red,r.red,i),s.green=Od(n.green,r.green,i),s.blue=Od(n.blue,r.blue,i),s.alpha=fe(n.alpha,r.alpha,i),ps.transform(s))},gf=new Set(["none","hidden"]);function _2(e,t){return gf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function N2(e,t){return n=>fe(e,t,n)}function Em(e){return typeof e=="number"?N2:typeof e=="string"?jm(e)?Uc:Ae.test(e)?dv:R2:Array.isArray(e)?PS:typeof e=="object"?Ae.test(e)?dv:A2:Uc}function PS(e,t){const n=[...e],r=n.length,s=e.map((i,a)=>Em(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function A2(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Em(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function P2(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][r[i]],o=e.values[a]??0;n[s]=o,r[i]++}return n}const R2=(e,t)=>{const n=on.createTransformer(t),r=Ki(e),s=Ki(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?gf.has(e)&&!s.values.length||gf.has(t)&&!r.values.length?_2(e,t):Fo(PS(P2(r,s),s.values),n):(Pu(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Uc(e,t))};function RS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fe(e,t,n):Em(e)(e,t)}const O2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>oe.update(t,n),stop:()=>qr(t),now:()=>Ue.isProcessing?Ue.timestamp:rt.now()}},OS=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},zc=2e4;function Tm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zc;)t+=n,r=e.next(t);return t>=zc?1/0:t}function M2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Tm(r),zc);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Dt(s)}}const ye={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};function yf(e,t){return e*Math.sqrt(1-t*t)}const I2=12;function D2(e,t,n){let r=n;for(let s=1;s<I2;s++)r=r-e(r)/t(r);return r}const Md=.001;function L2({duration:e=ye.duration,bounce:t=ye.bounce,velocity:n=ye.velocity,mass:r=ye.mass}){let s,i;Pu(e<=gt(ye.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Pn(ye.minDamping,ye.maxDamping,a),e=Pn(ye.minDuration,ye.maxDuration,Dt(e)),a<1?(s=u=>{const d=u*a,h=d*e,f=d-n,p=yf(u,a),v=Math.exp(-h);return Md-f/p*v},i=u=>{const h=u*a*e,f=h*n+n,p=Math.pow(a,2)*Math.pow(u,2)*e,v=Math.exp(-h),m=yf(Math.pow(u,2),a);return(-s(u)+Md>0?-1:1)*((f-p)*v)/m}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-Md+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const o=5/e,c=D2(s,i,o);if(e=gt(e),isNaN(c))return{stiffness:ye.stiffness,damping:ye.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const $2=["duration","bounce"],F2=["stiffness","damping","mass"];function hv(e,t){return t.some(n=>e[n]!==void 0)}function B2(e){let t={velocity:ye.velocity,stiffness:ye.stiffness,damping:ye.damping,mass:ye.mass,isResolvedFromDuration:!1,...e};if(!hv(e,F2)&&hv(e,$2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Pn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ye.mass,stiffness:s,damping:i}}else{const n=L2({...e,velocity:0});t={...t,...n,mass:ye.mass},t.isResolvedFromDuration=!0}return t}function Wc(e=ye.visualDuration,t=ye.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=B2({...n,velocity:-Dt(n.velocity||0)}),v=f||0,m=u/(2*Math.sqrt(c*d)),b=a-i,g=Dt(Math.sqrt(c/d)),y=Math.abs(b)<5;r||(r=y?ye.restSpeed.granular:ye.restSpeed.default),s||(s=y?ye.restDelta.granular:ye.restDelta.default);let x,S,j,k,C,E;if(m<1)j=yf(g,m),k=(v+m*g*b)/j,x=T=>{const F=Math.exp(-m*g*T);return a-F*(k*Math.sin(j*T)+b*Math.cos(j*T))},C=m*g*k+b*j,E=m*g*b-k*j,S=T=>Math.exp(-m*g*T)*(C*Math.sin(j*T)+E*Math.cos(j*T));else if(m===1){x=F=>a-Math.exp(-g*F)*(b+(v+g*b)*F);const T=v+g*b;S=F=>Math.exp(-g*F)*(g*T*F-v)}else{const T=g*Math.sqrt(m*m-1);x=D=>{const G=Math.exp(-m*g*D),z=Math.min(T*D,300);return a-G*((v+m*g*b)*Math.sinh(z)+T*b*Math.cosh(z))/T};const F=(v+m*g*b)/T,M=m*g*F-b*T,H=m*g*b-F*T;S=D=>{const G=Math.exp(-m*g*D),z=Math.min(T*D,300);return G*(M*Math.sinh(z)+H*Math.cosh(z))}}const N={calculatedDuration:p&&h||null,velocity:T=>gt(S(T)),next:T=>{if(!p&&m<1){const M=Math.exp(-m*g*T),H=Math.sin(j*T),D=Math.cos(j*T),G=a-M*(k*H+b*D),z=gt(M*(C*H+E*D));return o.done=Math.abs(z)<=r&&Math.abs(a-G)<=s,o.value=o.done?a:G,o}const F=x(T);if(p)o.done=T>=h;else{const M=gt(S(T));o.done=Math.abs(M)<=r&&Math.abs(a-F)<=s}return o.value=o.done?a:F,o},toString:()=>{const T=Math.min(Tm(N),zc),F=OS(M=>N.next(T*M).value,T,30);return T+"ms "+F},toTransition:()=>{}};return N}Wc.applyToOptions=e=>{const t=M2(e,100,Wc);return e.ease=t.ease,e.duration=gt(t.duration),e.type="keyframes",e};const V2=5;function MS(e,t,n){const r=Math.max(t-V2,0);return fS(n-e(r),t-r)}function vf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:o,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},p=E=>o!==void 0&&E<o||c!==void 0&&E>c,v=E=>o===void 0?c:c===void 0||Math.abs(o-E)<Math.abs(c-E)?o:c;let m=n*t;const b=h+m,g=a===void 0?b:a(b);g!==b&&(m=g-h);const y=E=>-m*Math.exp(-E/r),x=E=>g+y(E),S=E=>{const N=y(E),T=x(E);f.done=Math.abs(N)<=u,f.value=f.done?g:T};let j,k;const C=E=>{p(f.value)&&(j=E,k=Wc({keyframes:[f.value,v(f.value)],velocity:MS(x,E,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:E=>{let N=!1;return!k&&j===void 0&&(N=!0,S(E),C(E)),j!==void 0&&E>=j?k.next(E-j):(!N&&S(E),f)}}}function U2(e,t,n){const r=[],s=n||Hr.mix||RS,i=e.length-1;for(let a=0;a<i;a++){let o=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||$t:t;o=Fo(c,o)}r.push(o)}return r}function z2(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(qi(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=U2(t,r,s),c=o.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=vo(e[h],e[h+1],d);return o[h](f)};return n?d=>u(Pn(e[0],e[i-1],d)):u}function W2(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=vo(0,t,r);e.push(fe(n,1,s))}}function H2(e){const t=[0];return W2(t,e.length-1),t}function q2(e,t){return e.map(n=>n*t)}function K2(e,t){return e.map(()=>t||SS).splice(0,e.length-1)}function Ua({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=n2(r)?r.map(iv):iv(r),i={done:!1,value:t[0]},a=q2(n&&n.length===t.length?n:H2(t),e),o=z2(a,t,{ease:Array.isArray(s)?s:K2(t,s)});return{calculatedDuration:e,next:c=>(i.value=o(c),i.done=c>=e,i)}}const G2=e=>e!==null;function Ru(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(G2),o=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const J2={decay:vf,inertia:vf,tween:Ua,keyframes:Ua,spring:Wc};function IS(e){typeof e.type=="string"&&(e.type=J2[e.type])}class _m{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Y2=e=>e/100;class Hc extends _m{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==rt.now()&&this.tick(rt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;IS(t);const{type:n=Ua,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=t;let{keyframes:o}=t;const c=n||Ua;c!==Ua&&typeof o[0]!="number"&&(this.mixKeyframes=Fo(Y2,RS(o[0],o[1])),o=[0,100]);const u=c({...t,keyframes:o});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...o].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=Tm(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:v,onUpdate:m,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,S=r;if(h){const E=Math.min(this.currentTime,s)/o;let N=Math.floor(E),T=E%1;!T&&E>=1&&(T=1),T===1&&N--,N=Math.min(N,h+1),!!(N%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/o)):f==="mirror"&&(S=a)),x=Pn(0,1,T)*o}let j;y?(this.delayState.value=d[0],j=this.delayState):j=S.next(x),i&&!y&&(j.value=i(j.value));let{done:k}=j;!y&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return C&&v!==vf&&(j.value=Ru(d,this.options,b,this.speed)),m&&m(j.value),C&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return Dt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Dt(t)}get time(){return Dt(this.currentTime)}set time(t){t=gt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return MS(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(rt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Dt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=O2,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(rt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Q2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ms=e=>e*180/Math.PI,xf=e=>{const t=ms(Math.atan2(e[1],e[0]));return wf(t)},X2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:xf,rotateZ:xf,skewX:e=>ms(Math.atan(e[1])),skewY:e=>ms(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wf=e=>(e=e%360,e<0&&(e+=360),e),fv=xf,pv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mv=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pv,scaleY:mv,scale:e=>(pv(e)+mv(e))/2,rotateX:e=>wf(ms(Math.atan2(e[6],e[5]))),rotateY:e=>wf(ms(Math.atan2(-e[2],e[0]))),rotateZ:fv,rotate:fv,skewX:e=>ms(Math.atan(e[4])),skewY:e=>ms(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bf(e){return e.includes("scale")?1:0}function Sf(e,t){if(!e||e==="none")return bf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Z2,s=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=X2,s=o}if(!s)return bf(t);const i=r[t],a=s[1].split(",").map(tM);return typeof i=="function"?i(a):a[i]}const eM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sf(n,t)};function tM(e){return parseFloat(e.trim())}const oa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],la=new Set(oa),gv=e=>e===aa||e===V,nM=new Set(["x","y","z"]),rM=oa.filter(e=>!nM.has(e));function sM(e){const t=[];return rM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Nr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-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:(e,{transform:t})=>Sf(t,"x"),y:(e,{transform:t})=>Sf(t,"y")};Nr.translateX=Nr.x;Nr.translateY=Nr.y;const Cs=new Set;let jf=!1,kf=!1,Cf=!1;function DS(){if(kf){const e=Array.from(Cs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=sM(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,a])=>{var o;(o=r.getValue(i))==null||o.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kf=!1,jf=!1,Cs.forEach(e=>e.complete(Cf)),Cs.clear()}function LS(){Cs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(kf=!0)})}function iM(){Cf=!0,LS(),DS(),Cf=!1}class Nm{constructor(t,n,r,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Cs.add(this),jf||(jf=!0,oe.read(LS),oe.resolveKeyframes(DS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const o=r.readValue(n,a);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}Q2(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Cs.delete(this)}cancel(){this.state==="scheduled"&&(Cs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const aM=e=>e.startsWith("--");function $S(e,t,n){aM(t)?e.style.setProperty(t,n):e.style[t]=n}const oM={};function FS(e,t){const n=hS(e);return()=>oM[t]??n()}const lM=FS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),BS=FS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_a=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,yv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_a([0,.65,.55,1]),circOut:_a([.55,0,1,.45]),backIn:_a([.31,.01,.66,-.59]),backOut:_a([.33,1.53,.69,.99])};function VS(e,t){if(e)return typeof e=="function"?BS()?OS(e,t):"ease-out":jS(e)?_a(e):Array.isArray(e)?e.map(n=>VS(n,t)||yv.easeOut):yv[e]}function cM(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:o="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=VS(o,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function US(e){return typeof e=="function"&&"applyToOptions"in e}function uM({type:e,...t}){return US(e)&&BS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class zS extends _m{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,qi(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=uM(t);this.animation=cM(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Ru(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(d),$S(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Dt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Dt(t)}get time(){return Dt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=gt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&lM()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),$t):s(this)}}const WS={anticipate:xS,backInOut:vS,circInOut:bS};function dM(e){return e in WS}function hM(e){typeof e.ease=="string"&&dM(e.ease)&&(e.ease=WS[e.ease])}const Id=10;class fM extends zS{constructor(t){hM(t),IS(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new Hc({...a,autoplay:!1}),c=Math.max(Id,rt.now()-this.startTime),u=Pn(0,Id,c-Id),d=o.sample(c).value,{name:h}=this.options;i&&h&&$S(i,h,d),n.setWithVelocity(o.sample(Math.max(0,c-u)).value,d,u),o.stop()}}const vv=(e,t)=>
123t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(on.test(e)||e==="0")&&!e.startsWith("url("));function pM(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 mM(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=vv(s,t),o=vv(i,t);return Pu(a===o,`You are trying to animate ${t} from "${s}" to "${i}". "${a?i:s}" is not an animatable value.`,"value-not-animatable"),!a||!o?!1:pM(e)||(n==="spring"||US(n))&&r}function Ef(e){e.duration=0,e.type="keyframes"}const HS=new Set(["opacity","clipPath","filter","transform"]),gM=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function yM(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&gM.test(e[t]))return!0;return!1}const vM=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),xM=hS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function wM(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:a,keyframes:o}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return xM()&&n&&(HS.has(n)||vM.has(n)&&yM(o))&&(n!=="transform"||!d)&&!u&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}const bM=40;class SM extends _m{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:c,motionValue:u,element:d,...h}){var v;super(),this.stop=()=>{var m,b;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=rt.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,name:c,motionValue:u,element:d,...h},p=(d==null?void 0:d.KeyframeResolver)||Nm;this.keyframeResolver=new p(o,(m,b,g)=>this.onKeyframesResolved(m,b,f,!g),c,u,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){var g,y;this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=rt.now();let h=!0;mM(t,i,a,o)||(h=!1,(Hr.instantAnimations||!c)&&(d==null||d(Ru(t,r,n))),t[0]=t[t.length-1],Ef(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>bM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=h&&!u&&wM(p),m=(y=(g=p.motionValue)==null?void 0:g.owner)==null?void 0:y.current;let b;if(v)try{b=new fM({...p,element:m})}catch{b=new Hc(p)}else b=new Hc(p);b.finished.then(()=>{this.notifyFinished()}).catch($t),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),iM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function qS(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),a=e.size,o=(a-1)*r;return typeof n=="function"?n(i,a):s===1?i*r:o-i*r}const jM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kM(e){const t=jM.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const CM=4;function KS(e,t,n=1){qi(n<=CM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=kM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return cS(a)?parseFloat(a):a}return jm(s)?KS(s,t,n+1):s}const EM={type:"spring",stiffness:500,damping:25,restSpeed:10},TM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_M={type:"keyframes",duration:.8},NM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AM=(e,{keyframes:t})=>t.length>2?_M:la.has(e)?e.startsWith("scale")?TM(t[1]):EM:NM;function GS(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Am(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?GS(n,e):n}const PM=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function RM(e){for(const t in e)if(!PM.has(t))return!0;return!1}const Pm=(e,t,n,r={},s,i)=>a=>{const o=Am(r,e)||{},c=o.delay||r.delay||0;let{elapsed:u=0}=r;u=u-gt(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:s};RM(o)||Object.assign(d,AM(e,d)),d.duration&&(d.duration=gt(d.duration)),d.repeatDelay&&(d.repeatDelay=gt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Ef(d),d.delay===0&&(h=!0)),(Hr.instantAnimations||Hr.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,Ef(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,h&&!i&&t.get()!==void 0){const f=Ru(d.keyframes,o);if(f!==void 0){oe.update(()=>{d.onUpdate(f),d.onComplete()});return}}return o.isSync?new Hc(d):new SM(d)};function xv(e){const t=[{},{}];
vendor: 60,392 bytes, line 123
123return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Rm(e,t,n,r){if(typeof t=="function"){const[s,i]=xv(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=xv(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Es(e,t,n){const r=e.getProps();return Rm(r,t,n!==void 0?n:r.custom,e)}const JS=new Set(["width","height","top","left","right","bottom",...oa]),wv=30,OM=e=>!isNaN(parseFloat(e));class MM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=rt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=rt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=OM(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 wm);const r=this.events[t].add(n);return t==="change"?()=>{r(),oe.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=rt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wv);return fS(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Gi(e,t){return new MM(e,t)}const Tf=e=>Array.isArray(e);function IM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gi(n))}function DM(e){return Tf(e)?e[e.length-1]||0:e}function LM(e,t){const n=Es(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const o=DM(i[a]);IM(e,a,o)}}const ze=e=>!!(e&&e.getVelocity);function $M(e){return!!(ze(e)&&e.add)}function _f(e,t){const n=e.getValue("willChange");if($M(n))return n.add(t);if(!n&&Hr.WillChange){const r=new Hr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Om(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const FM="framerAppearId",YS="data-"+Om(FM);function QS(e){return e.props[YS]}function BM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function XS(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:a,...o}=t;const c=e.getDefaultTransition();i=i?GS(i,c):c;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in o){const p=e.getValue(f,e.latestValues[f]??null),v=o[f];if(v===void 0||h&&BM(h,f))continue;const m={delay:n,...Am(i||{},f)},b=p.get();if(b!==void 0&&!p.isAnimating()&&!Array.isArray(v)&&v===b&&!m.velocity){oe.update(()=>p.set(v));continue}let g=!1;if(window.MotionHandoffAnimation){const S=QS(e);if(S){const j=window.MotionHandoffAnimation(S,f,oe);j!==null&&(m.startTime=j,g=!0)}}_f(e,f);const y=u??e.shouldReduceMotion;p.start(Pm(f,p,v,y&&JS.has(f)?{type:!1}:m,e,g));const x=p.animation;x&&d.push(x)}if(a){const f=()=>oe.update(()=>{a&&LM(e,a)});d.length?Promise.all(d).then(f):f()}return d}function Nf(e,t,n={}){var c;const r=Es(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(XS(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return VM(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:o}=s;if(o){const[u,d]=o==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function VM(e,t,n=0,r=0,s=0,i=1,a){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),o.push(Nf(c,t,{...a,delay:n+(typeof r=="function"?0:r)+qS(e.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(o)}function UM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Nf(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Nf(e,t,n);else{const s=typeof t=="function"?Es(e,t,n.custom):t;r=Promise.all(XS(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const zM={test:e=>e==="auto",parse:e=>e},ZS=e=>t=>t.test(e),ej=[aa,V,_n,hr,p2,f2,zM],bv=e=>ej.find(ZS(e));function WM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dS(e):!0}const HM=new Set(["brightness","contrast","saturate","opacity"]);function qM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(km)||[];if(!r)return e;const s=n.replace(r,"");let i=HM.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const KM=/\b([a-z-]*)\(.*?\)/gu,Af={...on,getAnimatableNone:e=>{const t=e.match(KM);return t?t.map(qM).join(" "):e}},Pf={...on,getAnimatableNone:e=>{const t=on.parse(e);return on.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Sv={...aa,transform:Math.round},GM={rotate:hr,rotateX:hr,rotateY:hr,rotateZ:hr,scale:vl,scaleX:vl,scaleY:vl,scaleZ:vl,skew:hr,skewX:hr,skewY:hr,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:xo,originX:lv,originY:lv,originZ:V},Mm={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...GM,zIndex:Sv,fillOpacity:xo,strokeOpacity:xo,numOctaves:Sv},JM={...Mm,color:Ae,backgroundColor:Ae,outlineColor:Ae,fill:Ae,stroke:Ae,borderColor:Ae,borderTopColor:Ae,borderRightColor:Ae,borderBottomColor:Ae,borderLeftColor:Ae,filter:Af,WebkitFilter:Af,mask:Pf,WebkitMask:Pf},tj=e=>JM[e],YM=new Set([Af,Pf]);function nj(e,t){let n=tj(e);return YM.has(n)||(n=on),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const QM=new Set(["auto","none","0"]);function XM(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!QM.has(i)&&Ki(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=nj(n,s)}class ZM extends Nm{constructor(t,n,r,s,i){super(t,n,r,s,i,!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(),jm(h))){const f=KS(h,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!JS.has(r)||t.length!==2)return;const[s,i]=t,a=bv(s),o=bv(i),c=ov(s),u=ov(i);if(c!==u&&Nr[r]){this.needsMeasurement=!0;return}if(a!==o)if(gv(a)&&gv(o))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Nr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||WM(t[s]))&&r.push(s);r.length&&XM(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=Nr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var o;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Nr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Im(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const rj=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Xl(e){return uS(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Dm,cancel:RV}=kS(queueMicrotask,!1),Gt={x:!1,y:!1};function sj(){return Gt.x||Gt.y}function eI(e){return e==="x"||e==="y"?Gt[e]?null:(Gt[e]=!0,()=>{Gt[e]=!1}):Gt.x||Gt.y?null:(Gt.x=Gt.y=!0,()=>{Gt.x=Gt.y=!1})}function ij(e,t){const n=Im(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function tI(e){return!(e.pointerType==="touch"||sj())}function nI(e,t,n={}){const[r,s,i]=ij(e,n);return r.forEach(a=>{let o=!1,c=!1,u;const d=()=>{a.removeEventListener("pointerleave",v)},h=b=>{u&&(u(b),u=void 0),d()},f=b=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(b))},p=()=>{o=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},v=b=>{if(b.pointerType!=="touch"){if(o){c=!0;return}h(b)}},m=b=>{if(!tI(b))return;c=!1;const g=t(a,b);typeof g=="function"&&(u=g,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",m,s),a.addEventListener("pointerdown",p,s)}),i}const aj=(e,t)=>t?e===t?!0:aj(e,t.parentElement):!1,Lm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sI(e){return rI.has(e.tagName)||e.isContentEditable===!0}const iI=new Set(["INPUT","SELECT","TEXTAREA"]);function aI(e){return iI.has(e.tagName)||e.isContentEditable===!0}const Zl=new WeakSet;function jv(e){return t=>{t.key==="Enter"&&e(t)}}function Dd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const oI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=jv(()=>{if(Zl.has(n))return;Dd(n,"down");const s=jv(()=>{Dd(n,"up")}),i=()=>Dd(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function kv(e){return Lm(e)&&!sj()}const Cv=new WeakSet;function lI(e,t,n={}){const[r,s,i]=ij(e,n),a=o=>{const c=o.currentTarget;if(!kv(o)||Cv.has(o))return;Zl.add(c),n.stopPropagation&&Cv.add(o);const u=t(c,o),d=(p,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Zl.has(c)&&Zl.delete(c),kv(p)&&typeof u=="function"&&u(p,{success:v})},h=p=>{d(p,c===window||c===document||n.useGlobalTarget||aj(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),Xl(o)&&(o.addEventListener("focus",u=>oI(u,s)),!sI(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),i}function $m(e){return uS(e)&&"ownerSVGElement"in e}const ec=new WeakMap;let fr;const oj=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:$m(r)&&"getBBox"in r?r.getBBox()[t]:r[n],cI=oj("inline","width","offsetWidth"),uI=oj("block","height","offsetHeight");function dI({target:e,borderBoxSize:t}){var n;(n=ec.get(e))==null||n.forEach(r=>{r(e,{get width(){return cI(e,t)},get height(){return uI(e,t)}})})}function hI(e){e.forEach(dI)}function fI(){typeof ResizeObserver>"u"||(fr=new ResizeObserver(hI))}function pI(e,t){fr||fI();const n=Im(e);return n.forEach(r=>{let s=ec.get(r);s||(s=new Set,ec.set(r,s)),s.add(t),fr==null||fr.observe(r)}),()=>{n.forEach(r=>{const s=ec.get(r);s==null||s.delete(t),s!=null&&s.size||fr==null||fr.unobserve(r)})}}const tc=new Set;let gi;function mI(){gi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};tc.forEach(t=>t(e))},window.addEventListener("resize",gi)}function gI(e){return tc.add(e),gi||mI(),()=>{tc.delete(e),!tc.size&&typeof gi=="function"&&(window.removeEventListener("resize",gi),gi=void 0)}}function Ev(e,t){return typeof e=="function"?gI(e):pI(e,t)}function yI(e){return $m(e)&&e.tagName==="svg"}const vI=[...ej,Ae,on],xI=e=>vI.find(ZS(e)),Tv=()=>({translate:0,scale:1,origin:0,originPoint:0}),yi=()=>({x:Tv(),y:Tv()}),_v=()=>({min:0,max:0}),Re=()=>({x:_v(),y:_v()}),wI=new WeakMap;function Ou(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wo(e){return typeof e=="string"||Array.isArray(e)}const Fm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bm=["initial",...Fm];function Mu(e){return Ou(e.animate)||Bm.some(t=>wo(e[t]))}function lj(e){return!!(Mu(e)||e.variants)}function bI(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ze(s))e.addValue(r,s);else if(ze(i))e.addValue(r,Gi(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,Gi(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Rf={current:null},cj={current:!1},SI=typeof window<"u";function jI(){if(cj.current=!0,!!SI)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Rf.current=e.matches;e.addEventListener("change",t),t()}else Rf.current=!1}const Nv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let qc={};function uj(e){qc=e}function kI(){return qc}class CI{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:a,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Nm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 p=rt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,oe.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=Mu(n),this.isVariantNode=lj(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const v=f[p];u[p]!==void 0&&ze(v)&&v.set(u[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,wI.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.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(cj.current||jI(),this.shouldReduceMotion=Rf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),qr(this.notifyUpdate),qr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&HS.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:c,ease:u,duration:d}=n.accelerate,h=new zS({element:this.current,name:t,keyframes:o,times:c,ease:u,duration:gt(d)}),f=a(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=la.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&oe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),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 qc){const n=qc[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Re()}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<Nv.length;r++){const s=Nv[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=t[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=bI(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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=Gi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(cS(r)||dS(r))?r=parseFloat(r):!xI(r)&&on.test(n)&&(r=nj(t,n)),this.setBaseTarget(t,ze(r)?r.get():r)),ze(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Rm(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ze(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new wm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Dm.render(this.render)}}class dj extends CI{constructor(){super(...arguments),this.KeyframeResolver=ZM}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Xr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function hj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function EI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TI(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 Ld(e){return e===void 0||e===1}function Of({scale:e,scaleX:t,scaleY:n}){return!Ld(e)||!Ld(t)||!Ld(n)}function cs(e){return Of(e)||fj(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fj(e){return Av(e.x)||Av(e.y)}function Av(e){return e&&e!=="0%"}function Kc(e,t,n){const r=e-n,s=t*r;return n+s}function Pv(e,t,n,r,s){return s!==void 0&&(e=Kc(e,s,r)),Kc(e,n,r)+t}function Mf(e,t=0,n=1,r,s){e.min=Pv(e.min,t,n,r,s),e.max=Pv(e.max,t,n,r,s)}function pj(e,{x:t,y:n}){Mf(e.x,t.translate,t.scale,t.originPoint),Mf(e.y,n.translate,n.scale,n.originPoint)}const Rv=.999999999999,Ov=1.0000000000001;function _I(e,t,n,r=!1){var o;const s=n.length;if(!s)return;t.x=t.y=1;let i,a;for(let c=0;c<s;c++){i=n[c],a=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Sn(e.x,-i.scroll.offset.x),Sn(e.y,-i.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,pj(e,a)),r&&cs(i.latestValues)&&nc(e,i.latestValues,(o=i.layout)==null?void 0:o.layoutBox))}t.x<Ov&&t.x>Rv&&(t.x=1),t.y<Ov&&t.y>Rv&&(t.y=1)}function Sn(e,t){e.min+=t,e.max+=t}function Mv(e,t,n,r,s=.5){const i=fe(e.min,e.max,s);Mf(e,t,n,i,r)}function Iv(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function nc(e,t,n){const r=n??e;Mv(e.x,Iv(t.x,r.x),t.scaleX,t.scale,t.originX),Mv(e.y,Iv(t.y,r.y),t.scaleY,t.scale,t.originY)}function mj(e,t){return hj(TI(e.getBoundingClientRect(),t))}function NI(e,t,n){const r=mj(e,n),{scroll:s}=t;return s&&(Sn(r.x,s.offset.x),Sn(r.y,s.offset.y)),r}const AI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PI=oa.length;function RI(e,t,n){let r="",s=!0;for(let i=0;i<PI;i++){const a=oa[i],o=e[a];if(o===void 0)continue;let c=!0;if(typeof o=="number")c=o===(a.startsWith("scale")?1:0);else{const u=parseFloat(o);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=rj(o,Mm[a]);if(!c){s=!1;const d=AI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Vm(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let a=!1,o=!1;for(const c in t){const u=t[c];if(la.has(c)){a=!0;continue}else if(ES(c)){s[c]=u;continue}else{const d=rj(u,Mm[c]);c.startsWith("origin")?(o=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=RI(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}function gj(e,{style:t,vars:n},r,s){const i=e.style;let a;for(a in t)i[a]=t[a];s==null||s.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function Dv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Sa={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(V.test(e))e=parseFloat(e);else return e;const n=Dv(e,t.target.x),r=Dv(e,t.target.y);return`${n}% ${r}%`}},OI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=on.parse(e);if(s.length>5)return r;const i=on.createTransformer(e),a=typeof s[0]!="number"?1:0,o=n.x.scale*t.x,c=n.y.scale*t.y;s[0+a]/=o,s[1+a]/=c;const u=fe(o,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),i(s)}},If={borderRadius:{...Sa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sa,borderTopRightRadius:Sa,borderBottomLeftRadius:Sa,borderBottomRightRadius:Sa,boxShadow:OI};function yj(e,{layout:t,layoutId:n}){return la.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!If[e]||e==="opacity")}function Um(e,t,n){var a;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const o in r)(ze(r[o])||s&&ze(s[o])||yj(o,e)||((a=n==null?void 0:n.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=r[o]);return i}function MI(e){return window.getComputedStyle(e)}class II extends dj{constructor(){super(...arguments),this.type="html",this.renderInstance=gj}readValueFromInstance(t,n){var r;if(la.has(n))return(r=this.projection)!=null&&r.isProjecting?bf(n):eM(t,n);{const s=MI(t),i=(ES(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mj(t,n)}build(t,n,r){Vm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Um(t,n,r)}}const DI={offset:"stroke-dashoffset",array:"stroke-dasharray"},LI={offset:"strokeDashoffset",array:"strokeDasharray"};function $I(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?DI:LI;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const FI=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vj(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...o},c,u,d){if(Vm(e,o,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const p of FI)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&$I(h,s,i,a,!1)}const xj=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"]),wj=e=>typeof e=="string"&&e.toLowerCase()==="svg";function BI(e,t,n,r){gj(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(xj.has(s)?s:Om(s),t.attrs[s])}function bj(e,t,n){const r=Um(e,t,n);for(const s in e)if(ze(e[s])||ze(t[s])){const i=oa.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class VI extends dj{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Re}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(la.has(n)){const r=tj(n);return r&&r.default||0}return n=xj.has(n)?n:Om(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return bj(t,n,r)}build(t,n,r){vj(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){BI(t,n,r,s)}mount(t){this.isSVGTag=wj(t.tagName),super.mount(t)}}const UI=Bm.length;function Sj(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Sj(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<UI;n++){const r=Bm[n],s=e.props[r];(wo(s)||s===!1)&&(t[r]=s)}return t}function jj(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}const zI=[...Fm].reverse(),WI=Fm.length;function HI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>UM(e,n,r)))}function qI(e){let t=HI(e),n=Lv(),r=!0,s=!1;const i=u=>(d,h)=>{var p;const f=Es(e,h,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:v,transitionEnd:m,...b}=f;d={...d,...b,...m}}return d};function a(u){t=u(e)}function o(u){const{props:d}=e,h=Sj(e.parent)||{},f=[],p=new Set;let v={},m=1/0;for(let g=0;g<WI;g++){const y=zI[g],x=n[y],S=d[y]!==void 0?d[y]:h[y],j=wo(S),k=y===u?x.isActive:null;k===!1&&(m=g);let C=S===h[y]&&S!==d[y]&&j;if(C&&(r||s)&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...v},!x.isActive&&k===null||!S&&!x.prevProp||Ou(S)||typeof S=="boolean")continue;if(y==="exit"&&x.isActive&&k!==!0){x.prevResolvedValues&&(v={...v,...x.prevResolvedValues});continue}const E=KI(x.prevProp,S);let N=E||y===u&&x.isActive&&!C&&j||g>m&&j,T=!1;const F=Array.isArray(S)?S:[S];let M=F.reduce(i(y),{});k===!1&&(M={});const{prevResolvedValues:H={}}=x,D={...H,...M},G=_=>{N=!0,p.has(_)&&(T=!0,p.delete(_)),x.needsAnimating[_]=!0;const A=e.getValue(_);A&&(A.liveStyle=!1)};for(const _ in D){const A=M[_],L=H[_];if(v.hasOwnProperty(_))continue;let K=!1;Tf(A)&&Tf(L)?K=!jj(A,L):K=A!==L,K?A!=null?G(_):p.add(_):A!==void 0&&p.has(_)?G(_):x.protectedKeys[_]=!0}x.prevProp=S,x.prevResolvedValues=M,x.isActive&&(v={...v,...M}),(r||s)&&e.blockInitialAnimation&&(N=!1);const z=C&&E;N&&(!z||T)&&f.push(...F.map(_=>{const A={type:y};if(typeof _=="string"&&(r||s)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,K=Es(L,_);if(L.enteringChildren&&K){const{delayChildren:W}=K.transition||{};A.delay=qS(L.enteringChildren,e,W)}}return{animation:_,options:A}}))}if(p.size){const g={};if(typeof d.initial!="boolean"){const y=Es(e,Array.isArray(d.initial)?d.initial[0]:d.initial);y&&y.transition&&(g.transition=y.transition)}p.forEach(y=>{const x=e.getBaseTarget(y),S=e.getValue(y);S&&(S.liveStyle=!0),g[y]=x??null}),f.push({animation:g})}let b=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?t(f):Promise.resolve()}function c(u,d){var f;if(n[u].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var v;return(v=p.animationState)==null?void 0:v.setActive(u,d)}),n[u].isActive=d;const h=o(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:o,setActive:c,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Lv(),s=!0}}}function KI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!jj(t,e):!1}function rs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lv(){return{animate:rs(!0),whileInView:rs(),whileHover:rs(),whileTap:rs(),whileDrag:rs(),whileFocus:rs(),exit:rs()}}function Df(e,t){e.min=t.min,e.max=t.max}function qt(e,t){Df(e.x,t.x),Df(e.y,t.y)}function $v(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const kj=1e-4,GI=1-kj,JI=1+kj,Cj=.01,YI=0-Cj,QI=0+Cj;function st(e){return e.max-e.min}function XI(e,t,n){return Math.abs(e-t)<=n}function Fv(e,t,n,r=.5){e.origin=r,e.originPoint=fe(t.min,t.max,e.origin),e.scale=st(n)/st(t),e.translate=fe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=GI&&e.scale<=JI||isNaN(e.scale))&&(e.scale=1),(e.translate>=YI&&e.translate<=QI||isNaN(e.translate))&&(e.translate=0)}function za(e,t,n,r){Fv(e.x,t.x,n.x,r?r.originX:void 0),Fv(e.y,t.y,n.y,r?r.originY:void 0)}function Bv(e,t,n,r=0){const s=r?fe(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+st(t)}function ZI(e,t,n,r){Bv(e.x,t.x,n.x,r==null?void 0:r.x),Bv(e.y,t.y,n.y,r==null?void 0:r.y)}function Vv(e,t,n,r=0){const s=r?fe(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+st(t)}function Gc(e,t,n,r){Vv(e.x,t.x,n.x,r==null?void 0:r.x),Vv(e.y,t.y,n.y,r==null?void 0:r.y)}function Uv(e,t,n,r,s){return e-=t,e=Kc(e,1/n,r),s!==void 0&&(e=Kc(e,1/s,r)),e}function eD(e,t=0,n=1,r=.5,s,i=e,a=e){if(_n.test(t)&&(t=parseFloat(t),t=fe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=fe(i.min,i.max,r);e===i&&(o-=t),e.min=Uv(e.min,t,n,o,s),e.max=Uv(e.max,t,n,o,s)}function zv(e,t,[n,r,s],i,a){eD(e,t[n],t[r],t[s],t.scale,i,a)}const tD=["x","scaleX","originX"],nD=["y","scaleY","originY"];function Wv(e,t,n,r){zv(e.x,t,tD,n?n.x:void 0,r?r.x:void 0),zv(e.y,t,nD,n?n.y:void 0,r?r.y:void 0)}function Hv(e){return e.translate===0&&e.scale===1}function Ej(e){return Hv(e.x)&&Hv(e.y)}function qv(e,t){return e.min===t.min&&e.max===t.max}function rD(e,t){return qv(e.x,t.x)&&qv(e.y,t.y)}function Kv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Tj(e,t){return Kv(e.x,t.x)&&Kv(e.y,t.y)}function Gv(e){return st(e.x)/st(e.y)}function Jv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function yn(e){return[e("x"),e("y")]}function sD(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||i||a)&&(r=`translate3d(${s}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const o=e.x.scale*t.x,c=e.y.scale*t.y;return(o!==1||c!==1)&&(r+=`scale(${o}, ${c})`),r||"none"}const _j=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],iD=_j.length,Yv=e=>typeof e=="string"?parseFloat(e):e,Qv=e=>typeof e=="number"||V.test(e);function aD(e,t,n,r,s,i){s?(e.opacity=fe(0,n.opacity??1,oD(r)),e.opacityExit=fe(t.opacity??1,0,lD(r))):i&&(e.opacity=fe(t.opacity??1,n.opacity??1,r));for(let a=0;a<iD;a++){const o=_j[a];let c=Xv(t,o),u=Xv(n,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Qv(c)===Qv(u)?(e[o]=Math.max(fe(Yv(c),Yv(u),r),0),(_n.test(u)||_n.test(c))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=fe(t.rotate||0,n.rotate||0,r))}function Xv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const oD=Nj(0,.5,wS),lD=Nj(.5,.95,$t);function Nj(e,t,n){return r=>r<e?0:r>t?1:n(vo(e,t,r))}function cD(e,t,n){const r=ze(e)?e:Gi(e);return r.start(Pm("",r,t,n)),r.animation}function bo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const uD=(e,t)=>e.depth-t.depth;class dD{constructor(){this.children=[],this.isDirty=!1}add(t){xm(this.children,t),this.isDirty=!0}remove(t){Vc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uD),this.isDirty=!1,this.children.forEach(t)}}function hD(e,t){const n=rt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(qr(r),e(i-t))};return oe.setup(r,!0),()=>qr(r)}function rc(e){return ze(e)?e.get():e}class fD{constructor(){this.members=[]}add(t){xm(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Vc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Vc(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){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:a}=t.options;(i===void 0||i!==a)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,a;(r=(n=t.options).onExitComplete)==null||r.call(n),(a=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||a.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$d=["","X","Y","Z"],pD=1e3;let mD=0;function Fd(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Aj(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=QS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",oe,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Aj(r)}function Pj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},o=t==null?void 0:t()){this.id=mD++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vD),this.nodes.forEach(kD),this.nodes.forEach(CD),this.nodes.forEach(xD)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new dD)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new wm),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=$m(a)&&!yI(a),this.instance=a;const{layoutId:o,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;oe.read(()=>{h=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,d&&d(),d=hD(f,250),sc.hasAnimatedSinceResize&&(sc.hasAnimatedSinceResize=!1,this.nodes.forEach(tx)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||AD,{onLayoutAnimationStart:m,onLayoutAnimationComplete:b}=u.getProps(),g=!this.targetLayout||!Tj(this.targetLayout,p),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Am(v,"layout"),onPlay:m,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,y)}else h||tx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qr(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(ED),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Aj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(bD),this.nodes.forEach(Zv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ex);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(SD),this.nodes.forEach(jD),this.nodes.forEach(gD),this.nodes.forEach(yD)):this.nodes.forEach(ex),this.clearAllSnapshots();const o=rt.now();Ue.delta=Pn(0,1e3/60,o-Ue.timestamp),Ue.timestamp=o,Ue.isProcessing=!0,Ad.update.process(Ue),Ad.preRender.process(Ue),Ad.render.process(Ue),Ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wD),this.sharedNodes.forEach(TD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!st(this.snapshot.measuredBox.x)&&!st(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Re()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Ej(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(o||cs(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),PD(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Re();const o=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(RD))){const{scroll:d}=this.root;d&&(Sn(o.x,d.offset.x),Sn(o.y,d.offset.y))}return o}removeElementScroll(a){var c;const o=Re();if(qt(o,a),(c=this.scroll)!=null&&c.wasRoot)return o;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&qt(o,a),Sn(o.x,h.offset.x),Sn(o.y,h.offset.y))}return o}applyTransform(a,o=!1,c){var d,h;const u=c||Re();qt(u,a);for(let f=0;f<this.path.length;f++){const p=this.path[f];!o&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Sn(u.x,-p.scroll.offset.x),Sn(u.y,-p.scroll.offset.y)),cs(p.latestValues)&&nc(u,p.latestValues,(d=p.layout)==null?void 0:d.layoutBox)}return cs(this.latestValues)&&nc(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(a){var c;const o=Re();qt(o,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!cs(d.latestValues))continue;let h;d.instance&&(Of(d.latestValues)&&d.updateSnapshot(),h=Re(),qt(h,d.measurePageBox())),Wv(o,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,h)}return cs(this.latestValues)&&Wv(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ue.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=Ue.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Re(),this.targetWithTransforms=Re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZI(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):qt(this.target,this.layout.layoutBox),pj(this.target,this.targetDelta)):qt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Of(this.parent.latestValues)||fj(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Re(),this.relativeTargetOrigin=Re(),Gc(this.relativeTargetOrigin,o,c,this.options.layoutAnchor||void 0),qt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const a=this.getLead(),o=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ue.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;qt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;_I(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Re());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($v(this.prevProjectionDelta.x,this.projectionDelta.x),$v(this.prevProjectionDelta.y,this.projectionDelta.y)),za(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Jv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Jv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yi(),this.projectionDelta=yi(),this.projectionDeltaWithTransform=yi()}setAnimationOrigin(a,o=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=yi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=Re(),p=c?c.source:void 0,v=this.layout?this.layout.source:void 0,m=p!==v,b=this.getStack(),g=!b||b.members.length<=1,y=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(ND));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const j=S/1e3;nx(h.x,a.x,j),nx(h.y,a.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),_D(this.relativeTarget,this.relativeTargetOrigin,f,j),x&&rD(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Re()),qt(x,this.relativeTarget)),m&&(this.animationValues=d,aD(d,u,this.latestValues,j,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var o,c,u;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(qr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{sc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Gi(0)),this.motionValue.jump(0,!1),this.currentAnimation=cD(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:d}=a;if(!(!o||!c||!u)){if(this!==a&&this.layout&&u&&Rj(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Re();const h=st(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const f=st(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}qt(o,c),nc(o,d),za(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new fD),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const u={};c.z&&Fd("z",a,u,this.animationValues);for(let d=0;d<$d.length;d++)Fd(`rotate${$d[d]}`,a,u,this.animationValues),Fd(`skew${$d[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=rc(o==null?void 0:o.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=rc(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!cs(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=sD(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),a.transform=h;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in If){if(d[v]===void 0)continue;const{correct:m,applyTo:b,isCSSVariable:g}=If[v],y=h==="none"?d[v]:m(d[v],u);if(b){const x=b.length;for(let S=0;S<x;S++)a[b[S]]=y}else g?this.options.visualElement.renderState.vars[v]=y:a[v]=y}this.options.layoutId&&(a.pointerEvents=u===this?rc(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(Zv),this.root.sharedNodes.clear()}}}function gD(e){e.updateLayout()}function yD(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i==="size")yn(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],p=st(f);f.min=r[h].min,f.max=f.min+p});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";Df(a?t.measuredBox[h]:t.layoutBox[h],r[h])}else Rj(i,t.layoutBox,r)&&yn(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],p=st(r[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const o=yi();za(o,r,t.layoutBox);const c=yi();a?za(c,e.applyTransform(s,!0),t.measuredBox):za(c,r,t.layoutBox);const u=!Ej(o);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const v=e.options.layoutAnchor||void 0,m=Re();Gc(m,t.layoutBox,f.layoutBox,v);const b=Re();Gc(b,r,p.layoutBox,v),Tj(m,b)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=m,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vD(e){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 xD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wD(e){e.clearSnapshot()}function Zv(e){e.clearMeasurements()}function bD(e){e.isLayoutDirty=!0,e.updateLayout()}function ex(e){e.isLayoutDirty=!1}function SD(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function jD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kD(e){e.resolveTargetDelta()}function CD(e){e.calcProjection()}
123function ED(e){e.resetSkewAndRotation()}function TD(e){e.removeLeadSnapshot()}function nx(e,t,n){e.translate=fe(t.translate,0,n),e.scale=fe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rx(e,t,n,r){e.min=fe(t.min,n.min,r),e.max=fe(t.max,n.max,r)}function _D(e,t,n,r){rx(e.x,t.x,n.x,r),rx(e.y,t.y,n.y,r)}function ND(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AD={duration:.45,ease:[.4,0,.1,1]},sx=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ix=sx("applewebkit/")&&!sx("chrome/")?Math.round:$t;function ax(e){e.min=ix(e.min),e.max=ix(e.max)}function PD(e){ax(e.x),ax(e.y)}function Rj(e,t,n){return e==="position"||e==="preserve-aspect"&&!XI(Gv(t),Gv(n),.2)}function RD(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const OD=Pj({attachResizeListener:(e,t)=>bo(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Bd={current:void 0},Oj=Pj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bd.current){const e=new OD({});e.mount(window),e.setOptions({layoutScroll:!0}),Bd.current=e}return Bd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),zm=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ox(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function MD(...e){return t=>{let n=!1;const r=e.map(s=>{const i=ox(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():ox(e[s],null)}}}}function ID(...e){return w.useCallback(MD(...e),e)}class DD extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Xl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Xl(r)&&r.offsetWidth||0,i=Xl(r)&&r.offsetHeight||0,a=getComputedStyle(n),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=i-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function LD({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var f;const a=w.useId(),o=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(zm),d=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),h=ID(o,d);return w.useInsertionEffect(()=>{const{width:p,height:v,top:m,left:b,right:g,bottom:y}=c.current;if(t||i===!1||!o.current||!p||!v)return;const x=n==="left"?`left: ${b}`:`right: ${g}`,S=r==="bottom"?`bottom: ${y}`:`top: ${m}`;o.current.dataset.motionPopId=a;const j=document.createElement("style");u&&(j.nonce=u);const k=s??document.head;return k.appendChild(j),j.sheet&&j.sheet.insertRule(` 124 [data-motion-pop-id="${a}"] { 125 position: absolute !important; 126 width: ${p}px !important; 127 height: ${v}px !important; 128 ${x}px !important; 129 ${S}px !important; 130 } 131 `),()=>{var C;(C=o.current)==null||C.removeAttribute("data-motion-pop-id"),k.contains(j)&&k.removeChild(j)}},[t]),l.jsx(DD,{isPresent:t,childRef:o,sizeRef:c,pop:i,children:i===!1?e:w.cloneElement(e,{ref:h})})}const $D=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:a,anchorX:o,anchorY:c,root:u})=>{const d=vm(FD),h=w.useId();let f=!0,p=w.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:v=>{d.set(v,!0);for(const m of d.values())if(!m)return;r&&r()},register:v=>(d.set(v,!1),()=>d.delete(v))}),[n,d,r]);return i&&f&&(p={...p}),w.useMemo(()=>{d.forEach((v,m)=>d.set(m,!1))},[n]),w.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=l.jsx(LD,{pop:a==="popLayout",isPresent:n,anchorX:o,anchorY:c,root:u,children:e}),l.jsx(Au.Provider,{value:p,children:e})};function FD(){return new Map}function Mj(e=!0){const t=w.useContext(Au);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=w.useId();w.useEffect(()=>{if(e)return s(i)},[e]);const a=w.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const xl=e=>e.key||"";function lx(e){const t=[];
vendor: 6,301 bytes, line 131
131return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const dn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1,anchorX:o="left",anchorY:c="top",root:u})=>{const[d,h]=Mj(a),f=w.useMemo(()=>lx(e),[e]),p=a&&!d?[]:f.map(xl),v=w.useRef(!0),m=w.useRef(f),b=vm(()=>new Map),g=w.useRef(new Set),[y,x]=w.useState(f),[S,j]=w.useState(f);lS(()=>{v.current=!1,m.current=f;for(let E=0;E<S.length;E++){const N=xl(S[E]);p.includes(N)?(b.delete(N),g.current.delete(N)):b.get(N)!==!0&&b.set(N,!1)}},[S,p.length,p.join("-")]);const k=[];if(f!==y){let E=[...f];for(let N=0;N<S.length;N++){const T=S[N],F=xl(T);p.includes(F)||(E.splice(N,0,T),k.push(T))}return i==="wait"&&k.length&&(E=k),j(lx(E)),x(f),null}const{forceRender:C}=w.useContext(ym);return l.jsx(l.Fragment,{children:S.map(E=>{const N=xl(E),T=a&&!d?!1:f===S||p.includes(N),F=()=>{if(g.current.has(N))return;if(b.has(N))g.current.add(N),b.set(N,!0);else return;let M=!0;b.forEach(H=>{H||(M=!1)}),M&&(C==null||C(),j(m.current),a&&(h==null||h()),r&&r())};return l.jsx($D,{isPresent:T,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:T?void 0:F,anchorX:o,anchorY:c,children:E},N)})})},Ij=w.createContext({strict:!1}),cx={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"]};let ux=!1;function BD(){if(ux)return;const e={};for(const t in cx)e[t]={isEnabled:n=>cx[t].some(r=>!!n[r])};uj(e),ux=!0}function Dj(){return BD(),kI()}function VD(e){const t=Dj();for(const n in e)t[n]={...t[n],...e[n]};uj(t)}const UD=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","propagate","ignoreStrict","viewport"]);function Jc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||UD.has(e)}let Lj=e=>!Jc(e);function zD(e){typeof e=="function"&&(Lj=t=>t.startsWith("on")?!Jc(t):e(t))}try{zD(require("@emotion/is-prop-valid").default)}catch{}function WD(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||ze(e[s])||(Lj(s)||n===!0&&Jc(s)||!t&&!Jc(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Iu=w.createContext({});function HD(e,t){if(Mu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||wo(n)?n:void 0,animate:wo(r)?r:void 0}}return e.inherit!==!1?t:{}}function qD(e){const{initial:t,animate:n}=HD(e,w.useContext(Iu));return w.useMemo(()=>({initial:t,animate:n}),[dx(t),dx(n)])}function dx(e){return Array.isArray(e)?e.join(" "):e}const Wm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $j(e,t,n){for(const r in t)!ze(t[r])&&!yj(r,n)&&(e[r]=t[r])}function KD({transformTemplate:e},t){return w.useMemo(()=>{const n=Wm();return Vm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function GD(e,t){const n=e.style||{},r={};return $j(r,n,e),Object.assign(r,KD(e,t)),r}function JD(e,t){const n={},r=GD(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}const Fj=()=>({...Wm(),attrs:{}});function YD(e,t,n,r){const s=w.useMemo(()=>{const i=Fj();return vj(i,t,wj(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};$j(i,e.style,e),s.style={...i,...s.style}}return s}const QD=["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 Hm(e){return typeof e!="string"||e.includes("-")?!1:!!(QD.indexOf(e)>-1||/[A-Z]/u.test(e))}function XD(e,t,n,{latestValues:r},s,i=!1,a){const c=(a??Hm(e)?YD:JD)(t,r,s,e),u=WD(t,typeof e=="string",i),d=e!==w.Fragment?{...u,...c,ref:n}:{},{children:h}=t,f=w.useMemo(()=>ze(h)?h.get():h,[h]);return w.createElement(e,{...d,children:f})}function ZD({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:eL(n,r,s,e),renderState:t()}}function eL(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=rc(i[f]);let{initial:a,animate:o}=e;const c=Mu(e),u=lj(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?o:a;if(h&&typeof h!="boolean"&&!Ou(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const v=Rm(e,f[p]);if(v){const{transitionEnd:m,transition:b,...g}=v;for(const y in g){let x=g[y];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(s[y]=x)}for(const y in m)s[y]=m[y]}}}return s}const Bj=e=>(t,n)=>{const r=w.useContext(Iu),s=w.useContext(Au),i=()=>ZD(e,t,r,s);return n?i():vm(i)},tL=Bj({scrapeMotionValuesFromProps:Um,createRenderState:Wm}),nL=Bj({scrapeMotionValuesFromProps:bj,createRenderState:Fj}),rL=Symbol.for("motionComponentSymbol");function sL(e,t,n){const r=w.useRef(n);w.useInsertionEffect(()=>{r.current=n});const s=w.useRef(null);return w.useCallback(i=>{var o;i&&((o=e.onMount)==null||o.call(e,i));const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(i);else a&&(a.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const Vj=w.createContext({});function Xs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function iL(e,t,n,r,s,i){var x,S;const{visualElement:a}=w.useContext(Iu),o=w.useContext(Ij),c=w.useContext(Au),u=w.useContext(zm),d=u.reducedMotion,h=u.ski
vendor: 21,037 bytes, line 131
131pAnimations,f=w.useRef(null),p=w.useRef(!1);r=r||o.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,m=w.useContext(Vj);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&aL(f.current,n,s,m);const b=w.useRef(!1);w.useInsertionEffect(()=>{v&&b.current&&v.update(n,c)});const g=n[YS],y=w.useRef(!!g&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,g))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,g)));return lS(()=>{p.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),y.current&&v.animationState&&v.animationState.animateChanges())}),w.useEffect(()=>{v&&(!y.current&&v.animationState&&v.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,g)}),y.current=!1),v.enteringChildren=void 0)}),v}function aL(e,t,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:o,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Uj(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||o&&Xs(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Uj(e){if(e)return e.options.allowProjection!==!1?e.projection:Uj(e.parent)}function Vd(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&VD(r);const i=n?n==="svg":Hm(e),a=i?nL:tL;function o(u,d){let h;const f={...w.useContext(zm),...u,layoutId:oL(u)},{isStatic:p}=f,v=qD(u),m=a(u,p);if(!p&&typeof window<"u"){lL();const b=cL(f);h=b.MeasureLayout,v.visualElement=iL(e,m,f,s,b.ProjectionNode,i)}return l.jsxs(Iu.Provider,{value:v,children:[h&&v.visualElement?l.jsx(h,{visualElement:v.visualElement,...f}):null,XD(e,u,sL(m,v.visualElement,d),m,p,t,i)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(o);return c[rL]=e,c}function oL({layoutId:e}){const t=w.useContext(ym).id;return t&&e!==void 0?t+"-"+e:e}function lL(e,t){w.useContext(Ij).strict}function cL(e){const t=Dj(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function uL(e,t){if(typeof Proxy>"u")return Vd;const n=new Map,r=(i,a)=>Vd(i,a,e,t),s=(i,a)=>r(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Vd(a,void 0,e,t)),n.get(a))})}const dL=(e,t)=>t.isSVG??Hm(e)?new VI(t):new II(t,{allowProjection:e!==w.Fragment});class hL extends Xr{constructor(t){super(t),t.animationState||(t.animationState=qI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ou(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.call(this)}}let fL=0;class pL extends Xr{constructor(){super(...arguments),this.id=fL++,this.isExitComplete=!1}update(){var i;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;if(t&&r===!1){if(this.isExitComplete){const{initial:a,custom:o}=this.node.getProps();if(typeof a=="string"){const c=Es(this.node,a,o);if(c){const{transition:u,transitionEnd:d,...h}=c;for(const f in h)(i=this.node.getValue(f))==null||i.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mL={animation:{Feature:hL},exit:{Feature:pL}};function Uo(e){return{point:{x:e.pageX,y:e.pageY}}}const gL=e=>t=>Lm(t)&&e(t,Uo(t));function Wa(e,t,n,r){return bo(e,t,gL(n),r)}const zj=({current:e})=>e?e.ownerDocument.defaultView:null,hx=(e,t)=>Math.abs(e-t);function yL(e,t){const n=hx(e.x,t.x),r=hx(e.y,t.y);return Math.sqrt(n**2+r**2)}const fx=new Set(["auto","scroll"]);class Wj{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wl(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Ud(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,m=yL(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!m)return;const{point:b}=p,{timestamp:g}=Ue;this.history.push({...b,timestamp:g});const{onStart:y,onMove:x}=this.handlers;v||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=v,this.lastMoveEventInfo=wl(v,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:m,onSessionEnd:b,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ud(p.type==="pointercancel"?this.lastMoveEventInfo:wl(v,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,y),b&&b(p,y)},!Lm(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const c=Uo(t),u=wl(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=Ue;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,Ud(u,this.history)),this.removeListeners=Fo(Wa(this.contextWindow,"pointermove",this.handlePointerMove),Wa(this.contextWindow,"pointerup",this.handlePointerUp),Wa(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(fx.has(r.overflowX)||fx.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),oe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),qr(this.updatePoint)}}function wl(e,t){return t?{point:t(e.point)}:e}function px(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ud({point:e},t){return{point:e,delta:px(e,Hj(t)),offset:px(e,vL(t)),velocity:xL(t,.1)}}function vL(e){return e[0]}function Hj(e){return e[e.length-1]}function xL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Hj(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>gt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>gt(t)*2&&(r=e[1]);const i=Dt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function wL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?fe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?fe(n,e,r.max):Math.min(e,n)),e}function mx(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 bL(e,{top:t,left:n,bottom:r,right:s}){return{x:mx(e.x,n,s),y:mx(e.y,t,r)}}function gx(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 SL(e,t){return{x:gx(e.x,t.x),y:gx(e.y,t.y)}}function jL(e,t){let n=.5;const r=st(e),s=st(t);return s>r?n=vo(t.min,t.max-r,e.min):r>s&&(n=vo(e.min,e.max-s,t.min)),Pn(0,1,n)}function kL(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 Lf=.35;function CL(e=Lf){return e===!1?e=0:e===!0&&(e=Lf),{x:yx(e,"left","right"),y:yx(e,"top","bottom")}}function yx(e,t,n){return{min:vx(e,t),max:vx(e,n)}}function vx(e,t){return typeof e=="number"?e:e[t]||0}const EL=new WeakMap;class TL{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=Re(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(Uo(h).point),this.stopAnimation()},a=(h,f)=>{const{drag:p,dragPropagation:v,onDragStart:m}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eI(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yn(g=>{let y=this.getAxisMotionValue(g).get()||0;if(_n.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[g];S&&(y=st(S)*(parseFloat(y)/100))}}this.originPoint[g]=y}),m&&oe.update(()=>m(h,f),!1,!0),_f(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},o=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:m,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:g}=f;if(v&&this.currentDirection===null){this.currentDirection=NL(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),b&&oe.update(()=>b(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Wj(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:zj(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&oe.postRender(()=>o(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!bl(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=wL(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Xs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=bL(r.layoutBox,t):this.constraints=!1,this.elastic=CL(n),s!==this.constraints&&!Xs(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&yn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=kL(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Xs(t))return!1;const r=t.current;qi(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=NI(r,s.root,this.visualElement.getTransformPagePoint());let a=SL(s.layout.layoutBox,i);if(n){const o=n(EI(a));this.hasMutatedConstraints=!!o,o&&(a=hj(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=yn(d=>{if(!bl(d,n,this.currentDirection))return;let h=c&&c[d]||{};(a===!0||a===d)&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return _f(this.visualElement,t),r.start(Pm(t,r,0,n,this.visualElement,!1))}stopAnimation(){yn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yn(n=>{const{drag:r}=this.getProps();if(!bl(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:o}=s.layout.layoutBox[n],c=i.get()||0;i.set(t[n]-fe(a,o,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};yn(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const c=o.get();s[a]=jL({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),yn(a=>{if(!bl(a,t,null))return;const o=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];o.set(fe(c,u,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;EL.set(this.visualElement,this);const t=this.visualElement.current,n=Wa(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),f=u.target,p=f!==t&&aI(f);d&&h&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();Xs(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=_L(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),oe.read(s);const o=bo(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(yn(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=Lf,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function xx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function _L(e,t,n){const r=Ev(e,xx(n)),s=Ev(t,xx(n));return()=>{r(),s()}}function bl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function NL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class AL extends Xr{constructor(t){super(t),this.removeGroupControls=$t,this.removeListeners=$t,this.controls=new TL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$t}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const zd=e=>(t,n)=>{e&&oe.update(()=>e(t,n),!1,!0)};class PL extends Xr{constructor(){super(...arguments),this.removePointerDownListener=$t}onPointerDown(t){this.session=new Wj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zj(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:zd(t),onStart:zd(n),onMove:zd(r),onEnd:(i,a)=>{delete this.session,s&&oe.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Wa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Wd=!1;class RL extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Wd&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Wd=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||oe.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Dm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Wd=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function qj(e){const[t,n]=Mj(),r=w.useContext(ym);return l.jsx(RL,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Vj),isPresent:t,safeToRemove:n})}const OL={pan:{Feature:PL},drag:{Feature:AL,ProjectionNode:Oj,MeasureLayout:qj}};function wx(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&oe.postRender(()=>i(t,Uo(t)))}class ML extends Xr{mount(){const{current:t}=this.node;t&&(this.unmount=nI(t,(n,r)=>(wx(this.node,r,"Start"),s=>wx(this.node,s,"End"))))}unmount(){}}class IL extends Xr{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=Fo(bo(this.node.current,"focus",()=>this.onFocus()),bo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function bx(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&oe.postRender(()=>i(t,Uo(t)))}class DL extends Xr{mount(){const{current:t}=this.node;if(!t)return;
131const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=lI(t,(s,i)=>(bx(this.node,i,"Start"),(a,{success:o})=>bx(this.node,a,o?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const $f=new WeakMap,Hd=new WeakMap,LL=e=>{const t=$f.get(e.target);t&&t(e)},$L=e=>{e.forEach(LL)};function FL({root:e,...t}){const n=e||document;Hd.has(n)||Hd.set(n,{});const r=Hd.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver($L,{root:e,...t})),r[s]}function BL(e,t,n){const r=FL(t);return $f.set(e,n),r.observe(e),()=>{$f.delete(e),r.unobserve(e)}}const VL={some:0,all:1};class UL extends Xr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:VL[s]},o=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=d?h:f;p&&p(u)};this.stopObserver=BL(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(zL(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function zL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const WL={inView:{Feature:UL},tap:{Feature:DL},focus:{Feature:IL},hover:{Feature:ML}},HL={layout:{ProjectionNode:Oj,MeasureLayout:qj}},qL={...mL,...WL,...OL,...HL},R=uL(qL,dL),KL={some:0,all:1};function GL(e,t,{root:n,margin:r,amount:s="some"}={}){const i=Im(e),a=new WeakMap,o=u=>{u.forEach(d=>{const h=a.get(d.target);if(d.isIntersecting!==!!h)if(d.isIntersecting){const f=t(d.target,d);typeof f=="function"?a.set(d.target,f):c.unobserve(d.target)}else typeof h=="function"&&(h(d),a.delete(d.target))})},c=new IntersectionObserver(o,{root:n,rootMargin:r,threshold:typeof s=="number"?s:KL[s]});return i.forEach(u=>c.observe(u)),()=>c.disconnect()}function Zr(e,{root:t,margin:n,amount:r,once:s=!1,initial:i=!1}={}){const[a,o]=w.useState(i);return w.useEffect(()=>{if(!e.current||s&&a)return;const c=()=>(o(!0),s?void 0:()=>o(!1)),u={root:t&&t.current||void 0,margin:n,amount:r};return GL(e.current,c,u)},[t,e,n,s,r]),a}const JL="/assets/magic-camps-logo-C1k8ib2q.png",Kj=[{label:"Home",href:"/",children:[{label:"Our Story",href:"/story"},{label:"Magic Camps",href:"/magic-camps"},{label:"Magic Collection",href:"/magic-collection"}]},{label:"Accommodation",href:"/accommodation",children:[{label:"Canvas Tents",href:"/accommodation#tents"},{label:"Bathroom",href:"/accommodation#bathroom"}]},{label:"Experience",href:"/camp-life",children:[{label:"Journey inspirations",href:"/camp-life"},{label:"Camp Activities",href:"/camp-activities"},{label:"Wellness",href:"/wellness"},{label:"Gastronomy",href:"/gastronomy"}]},{label:"Sustainability",href:"/sustainability"},{label:"Gallery",href:"/gallery",children:[{label:"Camp",href:"/gallery"},{label:"Interiors",href:"/gallery"},{label:"Experiences",href:"/gallery"}]},{label:"Presse",href:"/press"}],xt=()=>{const e=On(),[t,n]=w.useState(!1),[r,s]=w.useState(null),i=e.pathname==="/";w.useEffect(()=>{const u=()=>{n(window.scrollY>50)};return window.addEventListener("scroll",u),()=>window.removeEventListener("scroll",u)},[]);const a=(u,d)=>{if(u.startsWith("/#")){const h=u.substring(2);if(i){d.preventDefault();const f=document.getElementById(h);f==null||f.scrollIntoView({behavior:"smooth"})}}},o="text-[10px] tracking-[0.25em] uppercase font-light transition-colors duration-300 text-charcoal hover:text-copper",c=u=>u.href?u.href.startsWith("/")&&!u.href.includes("#")?l.jsx(ke,{to:u.href,className:`${o} ${e.pathname===u.href?"text-copper":""}`,children:u.label}):l.jsx("a",{href:u.href,onClick:d=>a(u.href,d),className:o,children:u.label}):l.jsx("span",{className:`${o} cursor-default`,children:u.label});return l.jsx("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 bg-sand/95 backdrop-blur-sm border-b border-charcoal/10 ${t?"shadow-sm py-3":"py-5"}`,children:l.jsx("div",{className:"max-w-7xl mx-auto px-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(R.div,{initial:{opacity:0}
131,animate:{opacity:1},transition:{duration:1,delay:.3},children:l.jsx(ke,{to:"/","aria-label":"Magic Camps â Home",className:"flex items-center",children:l.jsx("img",{src:JL,alt:"Magic Camps",className:`w-auto transition-all duration-500 ${t?"h-10 md:h-12":"h-12 md:h-14"}`})})}),l.jsx(R.nav,{className:"hidden lg:flex items-center gap-7",initial:{opacity:0},animate:{opacity:1},transition:{duration:1,delay:.5},children:Kj.map(u=>l.jsxs("div",{className:"relative",onMouseEnter:()=>u.children&&s(u.label),onMouseLeave:()=>u.children&&s(null),children:[l.jsx("div",{className:"flex items-center gap-1 py-2",children:c(u)}),u.children&&l.jsx(dn,{children:r===u.label&&l.jsx(R.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.25},className:"absolute left-1/2 -translate-x-1/2 top-full pt-4",children:l.jsx("div",{className:"min-w-[260px] bg-card border border-border border-t-2 border-t-copper shadow-xl py-5",children:u.children.map(d=>d.href.startsWith("/")&&!d.href.includes("#")?l.jsx(ke,{to:d.href,className:"block px-7 py-3 text-[11px] tracking-[0.22em] uppercase text-charcoal hover:text-copper hover:bg-sand-deep transition-colors duration-200 whitespace-nowrap",children:d.label},d.label):l.jsx("a",{href:d.href,onClick:h=>a(d.href,h),className:"block px-7 py-3 text-[11px] tracking-[0.22em] uppercase text-charcoal hover:text-copper hover:bg-sand-deep transition-colors duration-200 whitespace-nowrap",children:d.label},d.label))})})})]},u.label))}),l.jsxs(R.div,{className:"flex items-center gap-5",initial:{opacity:0}
131,animate:{opacity:1},transition:{duration:1,delay:.6},children:[l.jsx(ke,{to:"/contact",className:"hidden md:inline-flex items-center justify-center px-8 py-3 text-[11px] tracking-[0.3em] uppercase font-medium transition-all duration-500 border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand",children:"Contact"}),l.jsx(YL,{scrolled:t})]})]})})})},YL=({scrolled:e})=>{const[t,n]=w.useState(!1),[r,s]=w.useState(null),a=On().pathname==="/";w.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]);const o=c=>{if(n(!1),s(null),c.startsWith("/#")){const u=c.substring(2);a&&setTimeout(()=>{const d=document.getElementById(u);d==null||d.scrollIntoView({behavior:"smooth"})},100)}};return l.jsxs(l.Fragment,{children:[l.jsxs("button",{onClick:()=>n(!t),className:"lg:hidden flex flex-col items-center justify-center w-10 h-10 gap-1.5","aria-label":"Toggle menu",children:[l.jsx(R.span,{className:"block w-6 h-px",animate:{rotate:t?45:0,y:t?3:0,backgroundColor:"hsl(var(--charcoal))"},transition:{duration:.3}}),l.jsx(R.span,{className:"block w-6 h-px",animate:{rotate:t?-45:0,y:t?-3:0,backgroundColor:"hsl(var(--charcoal))"},transition:{duration:.3}})]}),typeof document<"u"&&Xi.createPortal(l.jsx(dn,{children:t&&l.jsx(R.div,{className:"fixed inset-0 z-[100] bg-sand overflow-y-auto lg:hidden",style:{height:"100dvh"},initial:{opacity:0}
131,animate:{opacity:1},exit:{opacity:0},children:l.jsxs("nav",{className:"min-h-full flex flex-col items-center justify-center text-center py-24 px-6 w-full max-w-md mx-auto",children:[l.jsx("ul",{className:"space-y-5",children:Kj.map((c,u)=>l.jsx(R.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:u*.08},children:c.children?l.jsxs("div",{children:[l.jsx("button",{onClick:()=>s(r===c.label?null:c.label),className:"font-serif text-3xl text-charcoal hover:text-copper transition-colors",children:c.label}),l.jsx(dn,{children:r===c.label&&l.jsx(R.ul,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-3 space-y-2 overflow-hidden",children:c.children.map(d=>l.jsx("li",{children:d.href.startsWith("/")&&!d.href.includes("#")?l.jsx(ke,{to:d.href,onClick:()=>{n(!1),s(null)},className:"block text-sm tracking-[0.2em] uppercase text-charcoal-muted hover:text-copper transition-colors py-1",children:d.label}):l.jsx("a",{href:d.href,onClick:()=>o(d.href),className:"block text-sm tracking-[0.2em] uppercase text-charcoal-muted hover:text-copper transition-colors py-1",children:d.label})},d.label))})})]}):c.href.startsWith("/")&&!c.href.includes("#")?l.jsx(ke,{to:c.href,onClick:()=>n(!1),className:"font-serif text-3xl text-charcoal hover:text-copper transition-colors",children:c.label}):l.jsx("a",{href:c.href,onClick:()=>o(c.href),className:"font-serif text-3xl text-charcoal hover:text-copper transition-colors",children:c.label})},c.label))}),l.jsx(R.div,{className:"mt-10",initial:{opacity:0}
131,animate:{opacity:1},transition:{delay:.5},children:l.jsx(ke,{to:"/contact",onClick:()=>n(!1),className:"inline-block px-8 py-3 border border-charcoal text-charcoal text-sm tracking-[0.2em] uppercase",children:"Contact"})})]})})}),document.body)]})},Gj="/assets/hero-lounge-CeU73UhH.jpg",QL="/assets/hero-sunset-camp-UZiFV-sJ.jpg",Jj="/assets/hero-canopy-bed-D5nKwDAa.jpg",XL="/assets/hero-aerial-camp-BXPFF1Ys.jpg",ZL=({isOpen:e,onClose:t,videoSrc:n})=>{const r=w.useRef(null),s=w.useRef(null),[i,a]=w.useState(!0),[o,c]=w.useState(!1),[u,d]=w.useState(!1);w.useEffect(()=>{if(e&&s.current){a(!0),d(!1);const v=setTimeout(async()=>{try{s.current&&!document.fullscreenElement&&await s.current.requestFullscreen()}catch{}r.current&&r.current.play()},100);return()=>clearTimeout(v)}},[e]),w.useEffect(()=>{const v=()=>c(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",v),()=>document.removeEventListener("fullscreenchange",v)},[]);const h=async()=>{if(s.current)try{document.fullscreenElement?await document.exitFullscreen():await s.current.requestFullscreen()}catch(v){console.error("Fullscreen error:",v)}},f=async()=>{if(d(!0),document.fullscreenElement)try{await document.exitFullscreen()}catch{}setTimeout(()=>{t(),d(!1)},600)},p=()=>{r.current&&r.current.pause(),f()};return l.jsx(dn,{children:e&&l.jsxs(R.div,{ref:s,className:"fixed inset-0 z-[100] flex items-center justify-center bg-black",initial:{opacity:0}
131,animate:{opacity:u?0:1},exit:{opacity:0},transition:{duration:u?.6:.3,ease:"easeInOut"},children:[l.jsx(R.div,{className:"absolute inset-0 bg-black/90 backdrop-blur-sm",onClick:p,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),l.jsxs("div",{className:"absolute top-6 right-6 z-10 flex items-center gap-4",children:[l.jsx("button",{onClick:h,className:"p-2 text-white/70 hover:text-white transition-colors","aria-label":o?"Exit fullscreen":"Fullscreen",children:o?l.jsx(ON,{size:28}):l.jsx(RN,{size:28})}),l.jsx("button",{onClick:p,className:"p-2 text-white/70 hover:text-white transition-colors","aria-label":"Close video",children:l.jsx(Lo,{size:32})})]}),l.jsx(dn,{children:i&&l.jsx(R.div,{className:"absolute inset-0 z-20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:l.jsx(PN,{className:"w-16 h-16 text-copper animate-spin"})})}),l.jsx(R.div,{className:"relative z-10 w-full h-full max-w-[95vw] max-h-[90vh] flex items-center justify-center",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{duration:.3,delay:.1},children:l.jsx("video",{ref:r,src:n,className:"max-w-full max-h-full rounded-sm object-contain",controls:!0,autoPlay:!0,playsInline:!0,onLoadedData:()=>a(!1),onCanPlay:()=>a(!1),onEnded:f})})]})})}
131,e3="https://www.magic-collection-dmc.com/videos/camps-hero.mp4",ss=[{src:Gj,alt:"Magic Camps luxury lounge with rattan lamps in Wahiba Sands"},{src:QL,alt:"Wahiba Sands camp at golden hour with majlis lounge on the dune"},{src:Jj,alt:"Open-air canopy bed under a vast desert sky"},{src:XL,alt:"Aerial view of the Magic Camps tents nestled in the dunes"}],t3=()=>{const[e,t]=w.useState(!1),[n,r]=w.useState(0);return w.useEffect(()=>{const s=setInterval(()=>{r(i=>(i+1)%ss.length)},6e3);return()=>clearInterval(s)},[]),l.jsxs("section",{className:"relative min-h-screen w-full overflow-hidden flex items-center justify-center",children:[l.jsx("div",{className:"absolute inset-0",children:l.jsx(dn,{mode:"sync",children:l.jsx(R.img,{src:ss[n].src,alt:ss[n].alt,className:"absolute inset-0 w-full h-full object-cover object-[center_30%]",initial:{opacity:0,scale:1},animate:{opacity:1,scale:1.08},exit:{opacity:0},transition:{opacity:{duration:1.4,ease:"easeInOut"},scale:{duration:7,ease:"linear"}}},n)})}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-charcoal/40 via-charcoal/20 to-charcoal/60"}),l.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center px-6 text-center pt-20",children:[l.jsx(R.div,{className:"w-10 h-px bg-sand/70 mb-10",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.9,delay:.3}}),l.jsxs(R.h1,{className:"font-serif font-light text-sand text-3xl md:text-5xl lg:text-6xl max-w-4xl leading-[1.1] tracking-wide",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:1.2,delay:.5},style:{textShadow:"0 4px 30px rgba(0,0,0,0.35)"},children:["Magic Camps",l.jsx("span",{className:"block italic font-light text-copper-light/95 mt-2",children:"Wahiba Sands"})]}),l.jsx(R.p,{className:"mt-8 text-sand/85 text-xs md:text-sm tracking-[0.15em] uppercase max-w-xl leading-relaxed font-light",initial:{opacity:0}
131,animate:{opacity:1},transition:{duration:1,delay:.9},style:{textShadow:"0 2px 10px rgba(0,0,0,0.3)"},children:"Unparalleled slow luxury in the heart of Oman's desert"}),l.jsx(R.div,{className:"mt-12 flex flex-col items-center gap-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:1.2},children:l.jsxs("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"home-hero",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-3 text-sand hover:text-copper-light transition-colors",children:[l.jsx("span",{className:"flex items-center justify-center w-11 h-11 rounded-full border border-sand/80 bg-charcoal/30 backdrop-blur-sm group-hover:border-copper-light group-hover:bg-charcoal/50 transition-all",children:l.jsx(MN,{size:14,fill:"currentColor"})}),l.jsx("span",{className:"text-[11px] tracking-[0.3em] uppercase font-sans font-medium",children:"Begin Your Journey"})]})})]}),l.jsx(ZL,{isOpen:e,onClose:()=>t(!1),videoSrc:e3}),l.jsx("button",{onClick:()=>r(s=>(s-1+ss.length)%ss.length),"aria-label":"Previous photo",className:"absolute left-4 md:left-8 top-1/2 -translate-y-1/2 z-20 flex items-center justify-center w-11 h-11 md:w-12 md:h-12 rounded-full border border-sand/60 bg-charcoal/25 backdrop-blur-sm text-sand hover:text-copper-light hover:border-copper-light hover:bg-charcoal/45 transition-all",children:l.jsx(NN,{size:18,strokeWidth:1.5})}),l.jsx("button",{onClick:()=>r(s=>(s+1)%ss.length),"aria-label":"Next photo",className:"absolute right-4 md:right-8 top-1/2 -translate-y-1/2 z-20 flex items-center justify-center w-11 h-11 md:w-12 md:h-12 rounded-full border border-sand/60 bg-charcoal/25 backdrop-blur-sm text-sand hover:text-copper-light hover:border-copper-light hover:bg-charcoal/45 transition-all",children:l.jsx(AN,{size:18,strokeWidth:1.5})}),l.jsx("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2 flex items-center gap-3 z-20",children:ss.map((s,i)=>l.jsx("button",{onClick:()=>r(i),"aria-label":`Go to slide ${i+1}`,className:"group py-3",children:l.jsx("span",{className:`block h-px transition-all duration-700 ${i===n?"w-10 bg-sand":"w-5 bg-sand/40 group-hover:bg-sand/70"}`})},i))})]})},n3=()=>l.jsx("section",{className:"bg-sand py-24 md:py-32",children:l.jsxs("div",{className:"max-w-5xl mx-auto px-6 text-center",children:[l.jsx(R.p,{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.8},children:"Magic Camps"}),l.jsxs(R.h2,{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-10",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9,delay:.1},children:["A private ",l.jsx("span",{className:"italic",children:"desert"})," experience"]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mb-10"}),l.jsxs(R.div,{className:"space-y-6 text-charcoal-soft text-base md:text-lg leading-relaxed",initial:{opacity:0}
131,whileInView:{opacity:1},viewport:{once:!0,margin:"-80px"},transition:{duration:1,delay:.2},children:[l.jsx("p",{children:"Magic Camps offers a unique way to experience the beauty, silence, and soul of the desert. Designed for travellers seeking privacy, authenticity, and refined comfort, each camp creates an intimate retreat in the heart of exceptional natural landscapes."}),l.jsx("p",{children:"Blending traditional Arabian inspiration with contemporary touches, Magic Camps brings together elegant tented accommodation, private dining, curated experiences, and warm hospitality."}),l.jsx("p",{children:"From sunrise moments over the sand to starlit dinners and immersive desert activities, Magic Camps is more than a place to stay. It is a private desert experience designed for couples, families, groups, and special events â where every detail is crafted to create lasting memories."})]})]})}),r3=[{value:"32",label:"Guests",note:"A truly intimate retreat"},{value:"16",label:"Tents",note:"Each opening on the dunes"},{value:"100%",label:"Solar Powered",note:"A camp that leaves no trace"},{value:"I",label:"Hidden Valley",note:"Reached only by 4x4"}],s3=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-80px"});return l.jsx("section",{ref:e,className:"bg-sand py-20 md:py-28",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6",children:l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-12 md:gap-8",children:r3.map((n,r)=>l.jsxs(R.div,{className:"text-center",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.15*r},children:[l.jsx("p",{className:"font-serif font-light text-5xl md:text-6xl text-copper mb-3",children:n.value}),l.jsx("p",{className:"text-charcoal text-xs tracking-[0.3em] uppercase mb-2",children:n.label}),l.jsx("p",{className:"text-charcoal/60 text-sm font-light italic",children:n.note})]},n.label))})})})},qm="/assets/tent-interior-h1YTii76.jpg",Du="/assets/aerial-camp-valley-B1GpT4wn.jpg",Yj="/assets/camp-dusk-glow-VC2ECaew.jpg",Qj="/assets/camp-night-lights-row-BFa6LNGn.jpeg",Km="/assets/majlis-rattan-pendants-night-zOjGtaBF.jpg",Xj="/assets/bedouin-woman-red-veil-night-AZy5oPNG.jpeg",Gm="/assets/canopy-bed-dunes-Z2rOQnGM.jpg",Zj="/assets/bedouin-stargazer-milkyway-BbT5yx2Q.jpg",ek="/assets/camel-handler-golden-dunes-deLdQYlk.jpeg",zo="/assets/dining-tent-lanterns-N8lF6pBh.jpg",tk="/assets/tent-bed-starry-opening-C5xWOHGR.jpg",nk="/assets/guest-overlooking-camp-dunes-BIPDaTsU.jpeg",rk="/assets/dune-dining-camp-vista-DCFellEF.jpg",sk="/assets/omani-host-aerial-camp-lanterns-B8XRLpmG.jpg",ik="/assets/majlis-lounge-dune-view-BOCot4wi.jpg",ak="/assets/bell-tent-interior-dune-view-CZL_my_l.jpg",ok="/assets/breakfast-tent-dune-view-DhgD77r7.jpg",lk="/assets/two-tents-dunes-day-BUi2kILx.jpg",ck="/assets/firepit-twilight-camp-CM3IIfLy.jpg",uk="/assets/stretch-tent-lantern-path-twilight-DL3pf8Dm.jpg",dk="/assets/guest-bedouin-camels-sunset-B0y28iM6.jpg",hk="/assets/bedouin-house-coffee-A_DK3_Fa.jpg",fk="/assets/camel-ride-by-tents-DigOMDiT.jpg",pk="/assets/dinner-couple-BcAbp5YA.jpg",mk="/assets/fat-bike-dunes-BRZd85aD.jpg",i3=[{src:Du,alt:"Aerial view of the camp arranged in a V-shape across the Wahiba dunes",category:"Camp"},{src:qm,alt:"Inside a Nature-Chic Tent opening onto the dunes at sunrise",category:"Interiors"},{src:Xj,alt:"Portrait of a Bedouin woman in a crimson veil illuminated by lanterns at night",category:"Experiences"},{src:Yj,alt:"Canvas tents glowing warmly along the dunes at blue-hour dusk",category:"Camp"},{src:Km,alt:"Majlis lounge under sculptural rattan pendants with hurricane lanterns and telescope on the open sand at night",category:"Interiors"},{src:ek,alt:"Camel handler resting beside a white camel in the golden dunes at sunrise",category:"Experiences"},{src:Qj,alt:"Canvas tents glowing along a lantern-lit pathway under a deep blue starry desert night sky",category:"Camp"},{src:tk,alt:"Tent bed dressed in linen with woven lamps and the tent opening onto a starry desert sky",category:"Interiors"},{src:Zj,alt:"Bedouin guide kneeling on a dune with a telescope beneath the Milky Way arching over the Wahiba Sands",category:"Experiences"},{src:nk,alt:"Guest seated on a dune overlooking the camp and sculpted Wahiba Sands horizon",category:"Camp"},{src:zo,alt:"Private dining tent dressed for dinner under a canopy of brass and coloured glass lanterns",category:"Interiors"},{src:Gm,alt:"Open-air canopy bed with billowing white drapes and Moroccan lantern overlooking the dunes at sunrise",category:"Experiences"},{src:rk,alt:"Dining pergola above the dunes overlooking the canvas camp in Wahiba Sands",category:"Camp"},{src:sk,alt:"Omani host lighting hurricane lanterns along a sand path with the canvas camp aligned across the Wahiba dunes behind",category:"Camp"},{src:ik,alt:"Open stretch-tent majlis lounge with kilim rugs, embroidered cushions and agave plants opening onto a golden Wahiba dune",category:"Interiors"},{src:ak,alt:"Inside a canvas bell tent with linen bed, woven striped cushions and rattan chair opening onto the Wahiba dune",category:"Interiors"},{src:ok,alt:"Breakfast laid out on a wooden table with crimson cushions, agave plants and rattan chairs under a canvas tent overlooking the dunes",category:"Experiences"},{src:lk,alt:"Two canvas suites side by side beneath a vast Wahiba dune under a clear blue sky",category:"Camp"},{src:ck,alt:"Crackling firepit ringed by woven leather chairs with glowing canvas tents along the dunes at twilight",category:"Experiences"},{src:uk,alt:"Grand stretch tent lounge glowing with rattan pendants and a constellation of hurricane lanterns leading across the dunes at twilight",category:"Camp"},{src:dk,alt:"Guest seated on the dunes with a Bedouin guide and two camels at sunset in the Wahiba Sands",category:"Experiences"},{src:hk,alt:"Omani host serving traditional coffee to a guest inside a Bedouin house lit with warm desert textiles",category:"Experiences"},{src:fk,alt:"Guest riding a camel through Magic Camps with white canvas tents and sculpted dunes behind",category:"Experiences"},{src:pk,alt:"Couple enjoying a candlelit private dinner served under the desert night at Magic Camps",category:"Gastronomy"},{src:mk,alt:"Guests riding fat bikes across the dunes beside the canvas camp under a clear blue sky",category:"Experiences"}],a3=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-50px"}),[n,r]=w.useState(null);return l.jsxs("section",{id:"gallery",ref:e,className:"section-luxury bg-sand",children:[l.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-12 md:mb-16",children:[l.jsx(R.p,{className:"text-copper text-sm tracking-[0.3em] uppercase mb-4",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8},children:"Visual Journey"}),l.jsx(R.h2,{className:"font-serif text-3xl md:text-5xl text-charcoal",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.2},children:"Gallery"})]}),l.jsx(R.div,{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",initial:{opacity:0}
131,animate:t?{opacity:1}:{opacity:0},transition:{duration:.8,delay:.4},children:i3.map((s,i)=>l.jsx(R.div,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.5,delay:.5+i*.1},className:"cursor-pointer group aspect-[4/3] overflow-hidden",onClick:()=>r(s),children:l.jsx("img",{src:s.src,alt:s.alt,className:"w-full h-full object-cover object-[center_30%] transition-transform duration-700 group-hover:scale-105"})},s.src))}),l.jsx(R.div,{className:"text-center mt-12",initial:{opacity:0},animate:t?{opacity:1}:{opacity:0},transition:{duration:.8,delay:1},children:l.jsx(ke,{to:"/gallery",className:"btn-luxury border-copper/40 text-charcoal hover:text-sand",children:l.jsx("span",{children:"View Full Gallery"})})})]}),l.jsx(dn,{children:n&&l.jsxs(R.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-charcoal/95 p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(null),children:[l.jsx("button",{className:"absolute top-6 right-6 text-sand hover:text-copper transition-colors",onClick:()=>r(null),children:l.jsx(Lo,{size:32})}),l.jsx(R.img,{src:n.src,alt:n.alt,className:"max-w-full max-h-[90vh] object-contain",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:s=>s.stopPropagation()})]})})]})},o3=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-80px"});return l.jsx("section",{ref:e,className:"section-luxury bg-sand",children:l.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[l.jsx(R.p,{className:"text-copper text-sm tracking-[0.3em] uppercase mb-6",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8},children:"Guest Voices"}),l.jsxs(R.h2,{className:"font-serif font-light text-4xl md:text-6xl text-charcoal mb-12",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.2},children:["Stories of ",l.jsx("span",{className:"italic text-copper",children:"wonder"})]}),l.jsx(R.blockquote,{className:"font-serif font-light italic text-2xl md:text-3xl text-charcoal-soft leading-relaxed mb-12",initial:{opacity:0}
131,animate:t?{opacity:1}:{opacity:0},transition:{duration:1,delay:.4},children:'"We arrived as travellers and left as something quieter. Every meal, every dawn upon the dunes, every fire raised at dusk was composed with the kind of care I have rarely encountered, anywhere."'}),l.jsxs(R.div,{className:"flex flex-col items-center",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8,delay:.7},children:[l.jsx("div",{className:"w-12 h-12 rounded-full border border-copper/40 flex items-center justify-center mb-4",children:l.jsx("span",{className:"font-serif text-copper text-sm tracking-wider",children:"CR"})}),l.jsx("p",{className:"font-serif text-lg text-charcoal",children:"Caroline R."}),l.jsx("p",{className:"text-charcoal-muted text-xs tracking-[0.25em] uppercase mt-1",children:"Paris · February 2026"})]})]})})},l3="/assets/oman-minimal-map-CfzadmiR.jpg",c3=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-50px"});return l.jsx("section",{id:"location",ref:e,className:"section-luxury bg-sand overflow-x-clip",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-16",children:[l.jsx(R.p,{className:"text-copper text-sm tracking-[0.3em] uppercase mb-4",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8},children:"Find Us"}),l.jsx(R.h2,{className:"font-serif text-3xl md:text-5xl text-charcoal",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.2},children:"Location & Journey"})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[l.jsxs(R.div,{className:"relative overflow-hidden rounded-sm shadow-lg",initial:{opacity:0,x:-50},animate:t?{opacity:1,x:0}:{opacity:0,x:-50},transition:{duration:.8,delay:.4},children:[l.jsx("img",{src:l3,alt:"Illustrated map of Oman showing Magic Camps location in Wahiba Sands",className:"w-full h-auto"}),l.jsx("div",{className:"absolute inset-0 pointer-events-none border border-copper/20"})]}),l.jsx(R.div,{className:"flex flex-col justify-center",initial:{opacity:0,x:50},animate:t?{opacity:1,x:0}:{opacity:0,x:50},transition:{duration:.8,delay:.6},children:l.jsxs("div",{className:"space-y-8",children:[l.jsx("div",{className:"flex gap-6 border-l border-copper/30 pl-6",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-2",children:"Location"}),l.jsx("h3",{className:"font-serif text-xl text-charcoal mb-2",children:"Wahiba Sands"}),l.jsxs("p",{className:"text-charcoal-muted leading-relaxed",children:["Sharqiya Sands (Wahiba Sands)",l.jsx("br",{}),"30 minutes from the nearest road, deep in Oman's most iconic desert",l.jsx("br",{}),l.jsx("span",{className:"text-sm",children:"GPS: 22°306042'N, 58°882774'E"})]})]})}),l.jsx("div",{className:"flex gap-6 border-l border-copper/30 pl-6",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-2",children:"The Journey"}),l.jsx("h3",{className:"font-serif text-xl text-charcoal mb-2",children:"Getting There"}),l.jsxs("p",{className:"text-charcoal-muted leading-relaxed",children:[l.jsx("strong",{children:"From Muscat:"})," 3 hours by car",l.jsx("br",{}),l.jsx("strong",{children:"From Nizwa:"})," 3 hours",l.jsx("br",{}),l.jsx("strong",{children:"From Jebel Akhdar:"})," 3.5 hours",l.jsx("br",{}),l.jsx("strong",{children:"Nearest Airport:"})," Muscat International (MCT)"]})]})}),l.jsx("div",{className:"flex gap-6 border-l border-copper/30 pl-6",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-2",children:"Season"}),l.jsx("h3",{className:"font-serif text-xl text-charcoal mb-2",children:"Open Season"}),l.jsxs("p",{className:"text-charcoal-muted leading-relaxed",children:[l.jsx("strong",{children:"October to April"}),l.jsx("br",{}),"Open from 1 October to 30 April; other dates can be arranged on request."]})]})}),l.jsx("div",{className:"flex gap-6 border-l border-copper/30 pl-6",children:l.jsxs("div",{children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-2",children:"Reservations"}),l.jsx("h3",{className:"font-serif text-xl text-charcoal mb-2",children:"Contact"}),l.jsxs("p",{className:"text-charcoal-muted leading-relaxed",children:[l.jsx("a",{href:"tel:+96824121805",className:"hover:text-copper transition-colors",children:"+968 2412 1805"}),l.jsx("br",{}),l.jsx("a",{href:"mailto:[email protected]",className:"hover:text-copper transition-colors",children:"[email protected]"})]})]})})]})})]})]})})},u3=()=>l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep/30",children:l.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[l.jsx(R.p,{className:"text-copper text-xs tracking-[0.3em] uppercase mb-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},children:"Part of Magic Travels Group"}),l.jsxs(R.h2,{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,delay:.1},children:["A ",l.jsx("span",{className:"italic",children:"Magic Collection"})," experience"]}),l.jsx("div",{className:"copper-line mx-auto mb-10"}),l.jsx(R.p,{className:"text-charcoal-soft leading-relaxed mb-12 max-w-2xl mx-auto",initial:{opacity:0}
131,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.9,delay:.2},children:"Magic Camps is part of Magic Travels Group, an independent DMC founded in 1985 and operating across the Middle East, Europe and the Caucasus. As part of the Magic Collection by Magic Travels, Magic Camps reflects our long-standing expertise in creating private, authentic and beautifully crafted travel experiences."}),l.jsx("a",{href:"https://www.magic-dmc.com/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Visit Magic Travels"})]})});function d3(e,t,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function o(d){try{u(r.next(d))}catch(h){a(h)}}function c(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?i(d.value):s(d.value).then(o,c)}u((r=r.apply(e,t||[])).next())})}const h3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Jm extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class f3 extends Jm{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Sx extends Jm{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class jx extends Jm{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ff;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ff||(Ff={}));class p3{constructor(t,{headers:n={},customFetch:r,region:s=Ff.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=h3(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return d3(this,arguments,void 0,function*(n,r={}){var s;let i,a;try{const{headers:o,method:c,body:u,signal:d,timeout:h}=r;let f={},{region:p}=r;p||(p=this.region);const v=new URL(`${this.url}/${n}`);p&&p!=="any"&&(f["x-region"]=p,v.searchParams.set("forceFunctionRegion",p));let m;u&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(f["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(f["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let b=d;h&&(a=new AbortController,i=setTimeout(()=>a.abort(),h),d?(b=a.signal,d.addEventListener("abort",()=>a.abort())):b=a.signal);const g=yield this.fetch(v.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),o),body:m,signal:b}).catch(j=>{throw new f3(j)}),y=g.headers.get("x-relay-error");if(y&&y==="true")throw new Sx(g);if(!g.ok)throw new jx(g);let x=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return x==="application/json"?S=yield g.json():x==="application/octet-stream"||x==="application/pdf"?S=yield g.blob():x==="text/event-stream"?S=g:x==="multipart/form-data"?S=yield g.formData():S=yield g.text(),{data:S,error:null,response:g}}catch(o){return{data:null,error:o,response:o instanceof jx||o instanceof Sx?o.context:void 0}}finally{i&&clearTimeout(i)}})}}const gk=3,kx=e=>Math.min(1e3*2**e,3e4),m3=[520,503],yk=["GET","HEAD","OPTIONS"];var g3=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
131de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Cx(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function y3(e,t,n,r){return!(!r||n>=gk||!yk.includes(e)||!m3.includes(t))}var v3=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const a=this.headers.get("Accept");a==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!a||a==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let a=0;for(;;){const u=new Headers(n.headers);a>0&&u.set("X-Retry-Count",String(a));let d;try{d=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(h,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(h){if(h instanceof Error&&(h.name==="AbortError"||"code"in h&&h.code==="ABORT_ERR")||!yk.includes(n.method))throw h;if(n.retryEnabled&&a<gk){const f=kx(a);a++,await Cx(f,n.signal);continue}throw h}if(y3(n.method,d.status,a,n.retryEnabled)){var o,c;const h=(o=(c=d.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&o!==void 0?o:null,f=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:kx(a);await d.text(),a++,await Cx(f,n.signal);continue}return await n.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(a=>{var o;let c="",u="",d="";const h=a==null?void 0:a.cause;if(h){var f,p,v,m;const y=(f=h==null?void 0:h.message)!==null&&f!==void 0?f:"",x=(p=h==null?void 0:h.code)!==null&&p!==void 0?p:"";c=`${(v=a==null?void 0:a.name)!==null&&v!==void 0?v:"FetchError"}: ${a==null?void 0:a.message}`,c+=` 132 133Caused by: ${(m=h==null?void 0:h.name)!==null&&m!==void 0?m:"Error"}: ${y}`,x&&(c+=` (${x})`),h!=null&&h.stack&&(c+=` 134${h.stack}`)}else{var b;c=(b=a==null?void 0:a.stack)!==null&&b!==void 0?b:""}const g=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${g} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(u+=`. Your request URL is ${g} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:c,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
134)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,a=e.statusText;if(e.ok){var o,c;if(t.method!=="HEAD"){var u;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const d=(o=t.headers.get("Prefer"))===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),h=(c=e.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");d&&h&&h.length>1&&(s=parseInt(h[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,a="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const d=await e.text();try{n=JSON.parse(d),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,a="OK")}catch{e.status===404&&d===""?(i=204,a="No Content"):n={message:d}}if(n&&t.shouldThrowOnError)throw new g3(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:a}}returns(){return this}overrideTypes(){return this}},x3=class extends v3{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var a;const o=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${o};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Ex=new RegExp("[,()]");var Zs=class extends x3{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Ex.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Ex.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
134n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},w3=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const a=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:o,headers:c}=this.cloneRequestState();return o.searchParams.set("select",a),r&&c.append("Prefer",`count=${r}`),new Zs({method:s,url:o,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),n||a.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(o.length>0){const c=[...new Set(o)].map(u=>`"${u}"`);i.searchParams.set("columns",c.join(","))}}return new Zs({method:s,url:i,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const a="POST",{url:o,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&o.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);o.searchParams.set("columns",d.join(","))}}return new Zs({method:a,url:o,headers:c,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Zs({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Zs({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function So(e){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(e)}function b3(e,t){if(So(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(So(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S3(e){var t=b3(e,"string");return So(t)=="symbol"?t:t+""}function j3(e,t,n){return(t=S3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(n),!0).forEach(function(r){j3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var k3=class vk{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=a;const c=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const h=new AbortController,f=setTimeout(()=>h.abort(),i),p=d==null?void 0:d.signal;if(p){if(p.aborted)return clearTimeout(f),c(u,d);const v=()=>{clearTimeout(f),h.abort()};return p.addEventListener("abort",v,{once:!0}),c(u,Sl(Sl({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(f),p.removeEventListener("abort",v)})}return c(u,Sl(Sl({},d),{},{signal:h.signal})).finally(()=>clearTimeout(f))}:this.fetch=c,this.retry=o}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");
134return new w3(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new vk(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var a;let o;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),h=r&&Object.values(n).some(d);h?(o="POST",u=n):r||s?(o=r?"HEAD":"GET",Object.entries(n).filter(([p,v])=>v!==void 0).map(([p,v])=>[p,Array.isArray(v)?`{${v.join(",")}}`:`${v}`]).forEach(([p,v])=>{c.searchParams.append(p,v)})):(o="POST",u=n);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Zs({method:o,url:c,headers:f,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class C3{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const a=i.node,o=parseInt(a.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 135import ws from "ws" 136new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 137 138Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const E3="2.105.3",T3=`realtime-js/${E3}`,_3="1.0.0",xk="2.0.0",N3=xk,A3=1e4,P3=100,xr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},wk={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Bf={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class R3{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},a=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,n,r){var s,i;const a=t.topic,o=(s=t.ref)!==null&&s!==void 0?s:"",c=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`ref length ${o.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+o.length+a.length+u.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let v=new DataView(p),m=0;v.setUint8(m++,this.KINDS.userBroadcastPush),v.setUint8(m++,c.length),v.setUint8(m++,o.length),v.setUint8(m++,a.length),v.setUint8(m++,u.length),v.setUint8(m++,h.length),v.setUint8(m++,n),Array.from(c,g=>v.setUint8(m++,g.charCodeAt(0))),Array.from(o,g=>v.setUint8(m++,g.charCodeAt(0))),Array.from(a,g=>v.setUint8(m++,g.charCodeAt(0))),Array.from(u,g=>v.setUint8(m++,g.charCodeAt(0))),Array.from(h,g=>v.setUint8(m++,g.charCodeAt(0)));var b=new Uint8Array(p.byteLength+r.byteLength);return b.set(new Uint8Array(p),0),b.set(new Uint8Array(r),p.byteLength),b.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,a,o,c]=r;
138return n({join_ref:s,ref:i,topic:a,event:o,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),a=n.getUint8(3),o=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+s));c=c+s;const d=r.decode(t.slice(c,c+i));c=c+i;const h=r.decode(t.slice(c,c+a));c=c+a;const f=t.slice(c,t.byteLength),p=o===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,v={type:this.BROADCAST_EVENT,event:d,payload:p};return a>0&&(v.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var le;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(le||(le={}));const _x=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,a)=>(i[a]=O3(a,e,t,s),i),{}):{}},O3=(e,t,n,r)=>{const s=t.find(o=>o.name===e),i=s==null?void 0:s.type,a=n[e];return i&&!r.includes(i)?bk(i,a):Vf(a)},bk=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return L3(t,n)}switch(e){case le.bool:return M3(t);case le.float4:case le.float8:case le.int2:case le.int4:case le.int8:case le.numeric:case le.oid:return I3(t);case le.json:case le.jsonb:return D3(t);case le.timestamp:return $3(t);case le.abstime:case le.date:case le.daterange:case le.int4range:case le.int8range:case le.money:case le.reltime:case le.text:case le.time:case le.timestamptz:case le.timetz:case le.tsrange:case le.tstzrange:return Vf(t);default:return Vf(t)}},Vf=e=>e,M3=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},I3=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},D3=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},L3=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const a=e.slice(1,n);try{i=JSON.parse("["+a+"]")}catch{i=a?a.split(","):[]}return i.map(o=>bk(t,o))}return e},$3=e=>typeof e=="string"?e.replace(" ","T"):e,Sk=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Ha=e=>typeof e=="function"?e:function(){return e},F3=typeof self<"u"?self:null,ei=typeof window<"u"?window:null,vn=F3||ei||globalThis,B3="2.0.0",V3=1e4,U3=1e3,jn={connecting:0,open:1,closing:2,closed:3},ct={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Fn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Uf={longpoll:"longpoll",websocket:"websocket"},z3={complete:4},zf="base64url.bearer.phx.",jl=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 138
138matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},jk=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},W3=class{constructor(e,t,n){this.state=ct.closed,this.topic=e,this.params=Ha(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new jl(this,Fn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new jk(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=ct.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=ct.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=ct.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=ct.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new jl(this,Fn.leave,Ha({}),this.timeout).send(),this.state=ct.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Fn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ct.closed,this.bindings=[]}onClose(e){this.on(Fn.close,e)}onError(e){return this.on(Fn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new jl(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ct.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Fn.close,"leave")},n=new jl(this,Fn.leave,Ha({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ct.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(a=>a.event===e&&this.filterBindings(a,t,n));for(let a=0;a<i.length;a++)i[a].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===ct.closed}isErrored(){return this.state===ct.errored}isJoined(){return this.state===ct.joined}isJoining(){return this.state===ct.joining}isLeaving(){return this.state===ct.leaving}},Yc=class{static request(e,t,n,r,s,i,a){if(vn.XDomainRequest){let o=new vn.XDomainRequest;return this.xdomainRequest(o,e,t,r,s,i,a)}else if(vn.XMLHttpRequest){let o=new vn.XMLHttpRequest;return this.xhrRequest(o,e,t,n,r,s,i,a)}else{if(vn.fetch&&vn.AbortController)return this.fetchRequest(e,t,n,r,s,i,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,a){let o={method:e,headers:n,body:r},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),o.signal=c.signal),vn.fetch(t,o).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>a&&a(u)).catch(u=>{u.name==="AbortError"&&i?i():a&&a(null)}),c}static xdomainRequest(e,t,n,r,s,i,a){return e.timeout=s,e.open(t,n),e.onload=()=>{let o=this.parseJSON(e.responseText);a&&a(o)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,a,o){e.open(t,n,!0),e.timeout=i;for(let[c,u]of Object.entries(r))e.setRequestHeader(c,u);return e.onerror=()=>o&&o(null),e.onreadystatechange=()=>{if(e.readyState===z3.complete&&o){let c=this.parseJSON(e.responseText);o(c)}},a&&(e.ontimeout=a),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},H3=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},Ws=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(zf)&&(this.authToken=atob(t[1].slice(zf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=jn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Uf.websocket),"$1/"+Uf.longpoll)}endpointURL(){return Yc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=jn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===jn.open||this.readyState===jn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=jn.open,this.onopen({}),this.poll();break;
138case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=H3(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 139`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=jn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,a=()=>{this.reqs.delete(i),r()};i=Yc.request(e,this.endpointURL(),t,n,this.timeout,a,o=>{this.reqs.delete(i),this.isActive()&&s(o)}),this.reqs.add(i)}},q3=class Na{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Na.syncState(this.state,s,i,a),this.pendingDiffs.forEach(c=>{this.state=Na.syncDiff(this.state,c,i,a)}),this.pendingDiffs=[],o()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Na.syncDiff(this.state,s,i,a),o())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Na.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),a={},o={};return this.map(i,(c,u)=>{n[c]||(o[c]=u)}),this.map(n,(c,u)=>{let d=i[c];if(d){let h=u.metas.map(m=>m.phx_ref),f=d.metas.map(m=>m.phx_ref),p=u.metas.filter(m=>f.indexOf(m.phx_ref)<0),v=d.metas.filter(m=>h.indexOf(m.phx_ref)<0);p.length>0&&(a[c]=u,a[c].metas=p),v.length>0&&(o[c]=this.clone(d),o[c].metas=v)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:o},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:a}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(o,c)=>{let u=t[o];if(t[o]=this.clone(c),u){let d=t[o].metas.map(f=>f.phx_ref),h=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);t[o].metas.unshift(...h)}r(o,u,c)}),this.map(a,(o,c)=>{let u=t[o];if(!u)return;let d=c.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(o,u,c),u.metas.length===0&&delete t[o]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},kl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,a]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:a})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,a=this.META_LENGTH+t.length+n.length+s.length+r.length,o=new ArrayBuffer(this.HEADER_LENGTH+a),c=new DataView(o),u=0;c.setUint8(u++,this.KINDS.push),c.setUint8(u++,t.length),c.setUint8(u++,n.length),c.setUint8(u++,s.length),c.setUint8(u++,r.length),Array.from(t,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(o.byteLength+i.byteLength);return d.set(new Uint8Array(o),0),d.set(new Uint8Array(i),o.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,459 bytes, line 139
139,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,o=n.decode(e.slice(a,a+r));a=a+r;let c=n.decode(e.slice(a,a+s));a=a+s;let u=n.decode(e.slice(a,a+i));a=a+i;let d=e.slice(a,e.byteLength);return{join_ref:o,ref:null,topic:c,event:u,payload:d}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),a=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(o,o+r));o=o+r;let u=n.decode(e.slice(o,o+s));o=o+s;let d=n.decode(e.slice(o,o+i));o=o+i;let h=n.decode(e.slice(o,o+a));o=o+a;let f=e.slice(o,e.byteLength),p={status:h,response:f};return{join_ref:c,ref:u,topic:d,event:Fn.reply,payload:p}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,a=n.decode(e.slice(i,i+r));i=i+r;let o=n.decode(e.slice(i,i+s));i=i+s;let c=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:a,event:o,payload:c}}},K3=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||V3,this.transport=t.transport||vn.WebSocket||Ws,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||vn&&vn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=kl.encode.bind(kl),this.defaultDecoder=kl.decode.bind(kl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ws?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;ei&&ei.addEventListener&&(ei.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),ei.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),ei.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Ha(t.params||{}),this.endPoint=`${e}/${Uf.websocket}`,this.vsn=t.vsn||B3,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new jk(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ws}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Yc.appendParams(Yc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Ha(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ws?this.connectWithFallback(Ws,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Ws:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${zf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,a=this.transportName(e),o=c=>{this.log("transport",`falling back to ${a}...`,c),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o("memorized");this.fallbackTimer=setTimeout(o,t),i=this.onError(c=>{this.log("transport","error",c),r&&!n&&(clearTimeout(this.fallbackTimer),o(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),U3,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===jn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 139
139triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Fn.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case jn.connecting:return"connecting";case jn.open:return"open";case jn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new W3(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:a}=t;if(i&&i===this.pendingHeartbeatRef){const o=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",o)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let o=0;o<this.channels.length;o++){const c=this.channels[o];c.isMember(n,r,s,a)&&c.trigger(r,s,i,a)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class qa{constructor(t,n){const r=J3(n);this.presence=new q3(t.getChannel(),r),this.presence.onJoin((s,i,a)=>{const o=qa.onJoinPayload(s,i,a);t.getChannel().trigger("presence",o)}),this.presence.onLeave((s,i,a)=>{const o=qa.onLeavePayload(s,i,a);t.getChannel().trigger("presence",o)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return qa.transformState(this.presence.state)}static transformState(t){return t=G3(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=ic(s),n},{})}static onJoinPayload(t,n,r){const s=Nx(n),i=ic(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=Nx(n),i=ic(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function ic(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function G3(e){return JSON.parse(JSON.stringify(e))}function J3(e){return(e==null?void 0:e.events)&&{events:e.events}}function Nx(e){return e!=null&&e.metas?ic(e):[]}var Ax;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Ax||(Ax={}));class Y3{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new qa(this.channel.channelAdapter,n)}}function Q3(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
139if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class X3{constructor(t,n,r){const s=Z3(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>P3){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===xr.joined}isJoined(){return this.state===xr.joined}isJoining(){return this.state===xr.joining}isClosed(){return this.state===xr.closed}isLeaving(){return this.state===xr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function Z3(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Px;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Px||(Px={}));var vi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(vi||(vi={}));var Bn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Bn||(Bn={}));class Ka{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new X3(this.socket.socketAdapter,t,this.params),this.presence=new Y3(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Sk(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:o,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[vi.PRESENCE]&&this.bindings[vi.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(Bn.CHANNEL_ERROR,Q3(p))}),this._onClose(()=>t==null?void 0:t(Bn.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Bn.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}
139).receive("error",p=>{this.state=xr.errored;const v=Object.values(p).join(", ")||"error";t==null||t(Bn.CHANNEL_ERROR,new Error(v,{cause:p}))}).receive("timeout",()=>{t==null||t(Bn.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,a=[];for(let o=0;o<i;o++){const c=s[o],{filter:{event:u,schema:d,table:h,filter:f}}=c,p=t&&t[o];if(p&&p.event===u&&Ka.isFilterValueEqual(p.schema,d)&&Ka.isFilterValueEqual(p.table,h)&&Ka.isFilterValueEqual(p.filter,f))a.push(Object.assign(Object.assign({},c),{id:p.id}));else{this.unsubscribe(),this.state=xr.errored,n==null||n(Bn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=xr.errored&&n&&n(Bn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===vi.PRESENCE||t===vi.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(o.status===202)return{success:!0};let c=o.statusText;try{const u=await o.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
139in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:a}=t,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var a,o,c;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),a=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),a}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),a={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,a,o,c,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const f=(s=this.bindings[h])===null||s===void 0?void 0:s.find(p=>p.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const p=f.id,v=(i=f.filter)===null||i===void 0?void 0:i.event;return p&&((a=n.ids)===null||a===void 0?void 0:a.includes(p))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((o=n.data)===null||o===void 0?void 0:o.type.toLocaleLowerCase()))}else{const p=(u=(c=f==null?void 0:f.filter)===null||c===void 0?void 0:c.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:a}=wk;return n&&[r,s,i,a].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:a,commit_timestamp:o,type:c,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:a,commit_timestamp:o,eventType:c,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=_x(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=_x(t.columns,t.old_record)),n}}class e${constructor(t,n){this.socket=new K3(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Bf.connecting}isDisconnecting(){return this.socket.connectionState()==Bf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Rx={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},t$=[1e3,2e3,5e3,1e4],n$=1e4,r$=` 140 addEventListener("message", (e) => { 141 if (e.data.event === "start") { 142 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 143 } 144 });`;class s${get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
144,this.ref=0,this.serializer=new R3,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...a)=>i(...a):(...a)=>fetch(...a),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new e$(t,s),this.httpEndpoint=Sk(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 145 146To use Realtime in Node.js, you need to provide a WebSocket implementation: 147 148Option 1: Use Node.js 22+ which has native WebSocket support 149Option 2: Install and provide the "ws" package: 150 151 npm install ws 152 153 import ws from "ws" 154 const client = new RealtimeClient(url, { 155 ...options, 156 transport: ws 157 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Bf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Ka(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
157this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:T3};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(wk.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([r$],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,a,o,c,u,d,h,f;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const p={};p.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:A3,p.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Rx.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(a=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&a!==void 0?a:2*((o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:Rx.HEARTBEAT_INTERVAL),p.transport=(c=t==null?void 0:t.transport)!==null&&c!==void 0?c:C3.getWebSocketConstructor(),p.params=t==null?void 0:t.params,p.logger=t==null?void 0:t.logger,p.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),p.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:g=>t$[g-1]||n$;let v,m;const b=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:N3;switch(b){case _3:v=(g,y)=>y(JSON.stringify(g)),m=(g,y)=>y(JSON.parse(g));break;case xk:v=this.serializer.encode.bind(this.serializer),m=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${p.vsn}`)}if(p.vsn=b,p.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:v,p.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:m,p.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,p.params=Object.assign(Object.assign({},p.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,p.autoSendHeartbeat=!this.worker}return p}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
157var jo=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function i$(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function a$(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function o$(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:a}){const o=i$(e.baseUrl,r,s),c=await a$(e.auth),u=await t(o,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...c,...a},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const p=h?f:void 0,v=p==null?void 0:p.error;throw new jo((v==null?void 0:v.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:p})}return{status:u.status,headers:u.headers,data:f}}}}function Cl(e){return e.join("�")}var l$=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Cl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Cl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Cl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Cl(e.namespace)}`}),!0}catch(t){if(t instanceof jo&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof jo&&n.status===409)return;throw n}}};function Hs(e){return e.join("�")}var c$=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof jo&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof jo&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},u$=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=o$({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new l$(this.client,t),this.tableOps=new c$(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
157async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ko(e)}function d$(e,t){if(ko(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ko(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h$(e){var t=d$(e,"string");return ko(t)=="symbol"?t:t+""}
157function f$(e,t,n){return(t=h$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ox(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ox(Object(n),!0).forEach(function(r){f$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ox(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Lu=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function $u(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Wf=class extends Lu{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return q({},super.toJSON())}},kk=class extends Lu{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Qc(e,t,n){const r=q({},e),s=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function p$(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const m$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),g$=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Hf=e=>{if(Array.isArray(e))return e.map(n=>Hf(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Hf(r)}),t},y$=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Mx=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},v$=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||i+"";t(new Wf(Mx(a),i,o,r))}).catch(()=>{const a=i+"";t(new Wf(s.statusText||`HTTP ${i} error`,i,a,r))})}else t(new kk(Mx(e),e,r))},x$=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return q(q({},s),n);if(g$(r)){var i;const a=(t==null?void 0:t.headers)||{};let o;for(const[c,u]of Object.entries(a))c.toLowerCase()==="content-type"&&(o=u);s.headers=Qc(a,"Content-Type",(i=o)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),q(q({},s),n)};async function ja(e,t,n,r,s,i,a){return new Promise((o,c)=>{e(n,x$(t,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(a==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>o(u)).catch(u=>v$(u,c,r,a))})}function Ck(e="storage"){return{get:async(t,n,r,s)=>ja(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>ja(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>ja(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>ja(t,"HEAD",n,q(q({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>ja(t,"DELETE",n,s,i,r,e)}}const w$=Ck("storage"),{get:Co,post:Xt,put:qf,head:b$,remove:Ym}=w$,jt=Ck("vectors");var ca=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=p$(t),this.fetch=m$(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Qc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if($u(n))return{data:null,error:n};throw n}}},S$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($u(t))return{data:null,error:t};throw t}}};let Ek;Ek=Symbol.toStringTag;var j$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ek]="BlobDownloadBuilder",this.promise=null}asStream(){return new S$(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($u(t))return{data:null,error:t};throw t}}};const k$={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ix={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var C$=class extends ca{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const a=q(q({},Ix),r);let o=q(q({},s.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",a.cacheControl),c&&i.append("metadata",s.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",a.cacheControl),c&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(c))):(i=n,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,c&&(o["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!a.duplex&&(a.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))o=Qc(o,f,p);const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?qf:Xt)(s.fetch,`${s.url}/object/${d}`,i,q({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),a=s._getFinalPath(i),o=new URL(s.url+`/object/upload/sign/${a}`);return o.searchParams.set("token",t),s.handleOperation(async()=>{let c;const u=q(q({},Ix),r);let d=q(q({},s.headers),{"x-upsert":String(u.upsert)});const h=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),h&&c.append("metadata",s.encodeMetadata(h)),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),h&&!c.has("metadata")&&c.append("metadata",s.encodeMetadata(h))):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType,h&&(d["x-metadata"]=s.toBase64(s.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))d=Qc(d,f,p);return{path:i,fullPath:(await qf(s.fetch,o.toString(),c,q({headers:d},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=q({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Xt(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),a=new URL(n.url+i.url),o=a.searchParams.get("token");if(!o)throw new Lu("No token returned by API");return{signedUrl:a.toString(),path:e,token:o}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Xt(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
157stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Xt(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let a=await Xt(r.fetch,`${r.url}/object/sign/${s}`,q({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const o=new URLSearchParams;n!=null&&n.download&&o.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&o.set("cacheNonce",String(n.cacheNonce));const c=o.toString();return{signedUrl:encodeURI(`${r.url}${a.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await Xt(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const a=i.toString();return s.map(o=>q(q({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${a?`&${a}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),a=this._getFinalPath(e),o=()=>Co(this.fetch,`${this.url}/${r}/${a}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new j$(o,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Hf(await Co(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await b$(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if($u(s)){var r;const i=s instanceof Wf?s.status:s instanceof kk?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Ym(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=q(q(q({},k$),t),{},{prefix:e||""});return await Xt(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=q({},e);return await Xt(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const E$="2.105.3",Wo={"X-Client-Info":`storage-js/${E$}`};var T$=class extends ca{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),a=q(q({},Wo),t);super(i,a,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Co(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Co(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Xt(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await qf(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Xt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ym(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},_$=class extends ca{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},Wo),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Xt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Co(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ym(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!y$(e))throw new Lu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new u$({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
157),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const a=s[i];return typeof a!="function"?a:async(...o)=>{try{return{data:await a.apply(s,o),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},N$=class extends ca{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},Wo),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await jt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await jt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},A$=class extends ca{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},Wo),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},P$=class extends ca{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=q(q({},Wo),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await jt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},R$=class extends P${constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new O$(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},O$=class extends N${constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new M$(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
157,M$=class extends A${constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,q(q({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},I$=class extends T${constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new C$(this.url,this.headers,e,this.fetch)}get vectors(){return new R$(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _$(this.url+"/iceberg",this.headers,this.fetch)}};function Fu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}const Tk="2.105.3",ti=30*1e3,Kf=3,qd=Kf*ti,D$="http://localhost:9999",L$="supabase.auth.token",$$={"X-Client-Info":`gotrue-js/${Tk}`},Gf="X-Supabase-Api-Version",_k={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},F$=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,B$=10*60*1e3;class Eo extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function $(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class V$ extends Eo{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function U$(e){return $(e)&&e.name==="AuthApiError"}class rn extends Eo{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class er extends Eo{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class De extends er{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function El(e){return $(e)&&e.name==="AuthSessionMissingError"}class qs extends er{constructor(){super("Auth session or user missing","AuthInvalidToken
157ResponseError",500,void 0)}}class Tl extends er{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class _l extends er{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function z$(e){return $(e)&&e.name==="AuthImplicitGrantRedirectError"}class Dx extends er{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class W$ extends er{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Jf extends er{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Kd(e){return $(e)&&e.name==="AuthRetryableFetchError"}class Lx extends er{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Yf extends er{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Xc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),$x=` 158\r=`.split(""),H$=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<$x.length;t+=1)e[$x[t].charCodeAt(0)]=-2;for(let t=0;t<Xc.length;t+=1)e[Xc[t].charCodeAt(0)]=t;return e})();function Fx(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Xc[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Xc[r]),t.queuedBits-=6}}function Nk(e,t,n){const r=H$[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Bx(e){const t=[],n=a=>{t.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=a=>{G$(a,r,n)};for(let a=0;a<e.length;a+=1)Nk(e.charCodeAt(a),s,i);return t.join("")}function q$(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function K$(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}q$(r,t)}}function G$(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Ti(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Nk(e.charCodeAt(s),n,r);return new Uint8Array(t)}function J$(e){const t=[];return K$(e,n=>t.push(n)),new Uint8Array(t)}function gs(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Fx(s,n,r)),Fx(null,n,r),t.join("")}function Y$(e){return Math.round(Date.now()/1e3)+e}function Q$(){return Symbol("auth-callback")}const Be=()=>typeof window<"u"&&typeof document<"u",is={tested:!1,writable:!1},Ak=()=>{if(!Be())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(is.tested)return is.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),is.tested=!0,is.writable=!0}catch{is.tested=!0,is.writable=!1}return is.writable};
158function X$(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const Pk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Z$=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ni=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},as=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Fe=async(e,t)=>{await e.removeItem(t)};class Bu{constructor(){this.promise=new Bu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Bu.promiseConstructor=Promise;function Nl(e){const t=e.split(".");if(t.length!==3)throw new Yf("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!F$.test(t[r]))throw new Yf("JWT not in base64url format");return{header:JSON.parse(Bx(t[0])),payload:JSON.parse(Bx(t[1])),signature:Ti(t[2]),raw:{header:t[0],payload:t[1]}}}async function e4(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function t4(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const a=await e(i);if(!t(i,null,a)){r(a);return}}catch(a){if(!t(i,a)){s(a);return}}})()})}function n4(e){return("0"+e.toString(16)).substr(-2)}function r4(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,n4).join("")}async function s4(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function i4(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await s4(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ks(e,t,n=!1){const r=r4();let s=r;n&&(s+="/recovery"),await ni(e,`${t}-code-verifier`,s);const i=await i4(r);return[i,r===i?"plain":"s256"]}const a4=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function o4(e){const t=e.headers.get(Gf);if(!t||!t.match(a4))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function l4(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function c4(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const u4=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Dn(e){if(!u4.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Jt(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Gd(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function d4(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
158if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function Vx(e){return JSON.parse(JSON.stringify(e))}const us=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},h4=[502,503,504,520,521,522,523,524,530];async function Ux(e){var t;if(!Z$(e))throw new Jf(us(e),0);if(h4.includes(e.status))throw new Jf(us(e),e.status);let n;try{n=await e.json()}catch(i){throw new rn(us(i),i)}let r;const s=o4(e);if(s&&s.getTime()>=_k["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Lx(us(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new De}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,a)=>i&&typeof a=="string",!0))throw new Lx(us(n),e.status,n.weak_password.reasons);throw new V$(us(n),e.status||500,r)}const f4=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function U(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Gf]||(i[Gf]=_k["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const a=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await p4(e,t,n+o,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function p4(e,t,n,r,s,i){const a=f4(t,r,s,i);let o;try{o=await e(n,Object.assign({},a))}catch(c){throw console.error(c),new Jf(us(c),0)}if(o.ok||await Ux(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(c){await Ux(c)}}function Pt(e){var t;let n=null;y4(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=Y$(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function zx(e){const t=Pt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function wr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function m4(e){return{data:e,error:null}}function g4(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,a=Fu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},c=Object.assign({},a);return{data:{properties:o,user:c},error:null}}function Wx(e){return e}function y4(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Jd=["global","local","others"];class v4{constructor({url:t="",headers:n={},fetch:r,experimental:s}){this.url=t,this.headers=n,this.fetch=Pk(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,n=Jd[0]){if(Jd.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Jd.join(", ")}`);try{return await U(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await U(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:wr})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Fu(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await U(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:g4,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if($(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await U(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:wr})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,a,o,c;try{const u={nextPage:null,lastPage:0,total:0},d=await U(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Wx});if(d.error)throw d.error;const h=await d.json(),f=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,p=(c=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&c!==void 0?c:[];return p.length>
1580&&(p.forEach(v=>{const m=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);u[`${b}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if($(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Dn(t);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:wr})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Dn(t);try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:wr})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Dn(t);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:wr})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Dn(t.userId);try{const{data:n,error:r}=await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Dn(t.userId),Dn(t.id);try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,a,o,c;try{const u={nextPage:null,lastPage:0,total:0},d=await U(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Wx});if(d.error)throw d.error;const h=await d.json(),f=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,p=(c=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(v=>{const m=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);u[`${b}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if($(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await U(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await U(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await U(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await U(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if($(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await U(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await U(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await U(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await U(this.fetch,"DELET
158E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){Jt(this.experimental),Dn(t.userId);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){Jt(this.experimental),Dn(t.userId),Dn(t.passkeyId);try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}}function Hx(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const pn={debug:!!(globalThis&&Ak()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Rk extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class qx extends Rk{}async function x4(e,t,n){pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),pn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new qx(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(pn.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&t>0){if(r.signal.aborted)return pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async a=>{if(a){pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,a.name);try{return await n()}finally{pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,a.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw pn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new qx(`Lock "${e}" was released because another request stole it`)}throw i}}function w4(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Ok(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function b4(e){return parseInt(e,16)}function S4(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function j4(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 159`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=Ok(e.address),v=d?`${d}://${r}`:r,m=e.statement?`${e.statement} 160`:"",b=`${v} wants you to sign in with your Ethereum account: 161${p} 162 163${m}`;let g=`URI: ${h} 164Version: ${f} 165Chain ID: ${n}${a?` 166Nonce: ${a}`:""} 167Issued At: ${i.toISOString()}`;if(s&&(g+=` 168Expiration Time: ${s.toISOString()}`),o&&(g+=` 169Not Before: ${o.toISOString()}
169`),c&&(g+=` 170Request ID: ${c}`),u){let y=` 171Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);y+=` 172- ${x}`}g+=y}return`${b} 173${g}`}class Ne extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Zc extends Ne{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function k4({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ne({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ne({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ne({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ne({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ne({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ne({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new Ne({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ne({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(Mk(a)){if(i.rp.id!==a)return new Ne({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ne({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function C4({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ne({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ne({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(Mk(r)){if(n.rpId!==r)return new Ne({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ne({message:`${window.location.hostname}
173 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class E4{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Qf=new E4;function Kx(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Fu(e,["challenge","user","excludeCredentials"]),i=Ti(t).buffer,a=Object.assign(Object.assign({},n),{id:Ti(n.id).buffer}),o=Object.assign(Object.assign({},s),{challenge:i,user:a});if(r&&r.length>0){o.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];o.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Ti(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function Gx(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Fu(e,["challenge","allowCredentials"]),s=Ti(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let a=0;a<n.length;a++){const o=n[a];i.allowCredentials[a]=Object.assign(Object.assign({},o),{id:Ti(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return i}function Jx(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:gs(new Uint8Array(e.response.attestationObject)),clientDataJSON:gs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Yx(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:gs(new Uint8Array(s.authenticatorData)),clientDataJSON:gs(new Uint8Array(s.clientDataJSON)),signature:gs(new Uint8Array(s.signature)),userHandle:s.userHandle?gs(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Mk(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function eu(){var e,t;return!!(Be()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Ik(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Zc("Browser returned unexpected credential type",t)}:{data:null,error:new Zc("Empty credential response",t)}}catch(t){return{data:null,error:k4({error:t,options:e})}}}async function Dk(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Zc("Browser returned unexpected credential type",t)}:{data:null,error:new Zc("Empty credential response",t)}}
173catch(t){return{data:null,error:C4({error:t,options:e})}}}const T4={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},_4={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function tu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const a=s[i];if(a!==void 0)if(Array.isArray(a))r[i]=a;else if(n(a))r[i]=a;else if(t(a)){const o=r[i];t(o)?r[i]=tu(o,a):r[i]=tu(a)}else r[i]=a}return r}function N4(e,t){return tu(T4,e,t||{})}function A4(e,t){return tu(_4,e,t||{})}class P4{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var a;try{const{data:o,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!o)return{data:null,error:c};const u=s??Qf.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:d}=o.webauthn.credential_options.publicKey;if(!d.name){const h=r;if(h)d.name=`${d.id}:${h}`;else{const p=(await this.client.getUser()).data.user,v=((a=p==null?void 0:p.user_metadata)===null||a===void 0?void 0:a.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${v}`}}d.displayName||(d.displayName=d.name)}switch(o.webauthn.type){case"create":{const d=N4(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:f}=await Ik({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const d=A4(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:f}=await Dk(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new rn("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Eo("rpId is required for WebAuthn authentication")};try{if(!eu())return{data:null,error:new rn("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!a)return{data:null,error:o};const{webauthn:c}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(a){return $(a)?{data:null,error:a}:{data:null,error:new rn("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Eo("rpId is required for WebAuthn registration")};try{if(!eu())return{data:null,error:new rn("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:o};const{data:c,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return c?this._verify({factorId:a.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(a){return $(a)?{data:null,error:a}:{data:null,error:new rn("Unexpected error in register",a)}}}}w4();const R4={url:D$,storageKey:L$,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:$$,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};
173async function Qx(e,t,n){return await n()}const Gs={};class To{get jwks(){var t,n;return(n=(t=Gs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Gs[this.storageKey]=Object.assign(Object.assign({},Gs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Gs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Gs[this.storageKey]=Object.assign(Object.assign({},Gs[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},R4),t);if(this.storageKey=a.storageKey,this.instanceID=(n=To.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,To.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Be()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.experimental=(r=a.experimental)!==null&&r!==void 0?r:{},this.admin=new v4({url:a.url,headers:a.headers,fetch:a.fetch,experimental:this.experimental}),this.url=a.url,this.headers=a.headers,this.fetch=Pk(a.fetch),this.lock=a.lock||Qx,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&Be()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=x4:this.lock=Qx,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new P4(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:Ak()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Hx(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=Hx(this.memoryStorage)),Be()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(c){this._debug("#broadcastChannel","error",c)}})}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Tk}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Be()&&(n=X$(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Be()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),z$(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:a,redirectType:o}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return $(n)?this._returnResult({error:n}):this._returnResult({error:new rn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Pt}),{data:a,error:o}=i;if(o||!a)return this._returnResult({data:{user:null,session:null},error:o});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if($(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let p=null,v=null;this.flowType==="pkce"&&([p,v]=await Ks(this.storage,this.storageKey)),i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:v},xform:Pt})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Pt})}else throw new Tl("You must provide either an email or phone number and a password");const{data:a,error:o}=i;if(o||!a)return await Fe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:a,options:o}=t;n=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:zx})}else if("phone"in t){const{phone:i,password:a,options:o}=t;n=await U(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:zx})}else throw new Tl("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new qs;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,a,o,c,u,d,h,f;let p,v;if("message"in t)p=t.message,v=t.signature;else{const{chain:m,wallet:b,statement:g,options:y}=t;let x;if(Be())if(typeof b=="object")x=b;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")x=N.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=b}const S=new URL((n=y==null?void 0:y.url)!==null&&n!==void 0?n:window.location.href),j=await x.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!j||j.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=Ok(j[0]);let C=(r=y==null?void 0:y.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!C){const N=await x.request({method:"eth_chainId"});C=b4(N)}const E={domain:S.host,address:k,statement:g,uri:S.href,version:"1",chainId:C,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=y==null?void 0:y.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=y==null?void 0:y.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=j4(E),v=await x.request({method:"personal_sign",params:[S4(p),k]})}try{const{data:m,error:b}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:v}
173,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Pt});if(b)throw b;if(!m||!m.session||!m.user){const g=new qs;return this._returnResult({data:{user:null,session:null},error:g})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:b})}catch(m){if($(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,s,i,a,o,c,u,d,h,f,p;let v,m;if("message"in t)v=t.message,m=t.signature;else{const{chain:b,wallet:g,statement:y,options:x}=t;let S;if(Be())if(typeof g=="object")S=g;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=g}const j=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),y?{statement:y}:null));let C;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")C=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)C=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)v=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${j.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(s=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((h=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...x.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(` 174`);const k=await S.signMessage(new TextEncoder().encode(v),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:b,error:g}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:gs(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Pt});if(g)throw g;if(!b||!b.session||!b.user){const y=new qs;return this._returnResult({data:{user:null,session:null},error:y})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:g})}catch(b){if($(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await as(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new W$;const{data:i,error:a}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Pt});if(await Fe(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!i||!i.session||!i.user){const o=new qs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:a})}catch(i){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:a}=t,o=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Pt}),{data:c,error:u}=o;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new qs;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,a;try{if("email"in t){const{email:o,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Ks(this.storage,this.storageKey));const{error:h}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:o,options:c}=t,{data:u,error:d}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Tl("You must provide either an email or phone number.")}catch(o){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:o}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Pt});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,u=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if($(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,a;try{let o=null,c=null;this.flowType==="pkce"&&([o,c]=await Ks(this.storage,this.storageKey));const u=await U(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}
174:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:c}),headers:this.headers,xform:m4});return!((i=u.data)===null||i===void 0)&&i.url&&Be()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(o){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(o))return this._returnResult({data:null,error:o});throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new De;const{error:s}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if($(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:a}=await U(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:a,error:o}=await U(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o})}throw new Tl("You must provide either an email or phone number and a type")}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await as(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<qd:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const a=await as(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=Gd()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=d4(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:wr}):await this._useSession(async n=>{var r,s,i;const{data:a,error:o}=n;
174if(o)throw o;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new De}:await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:wr})})}catch(n){if($(n))return El(n)&&(await this._removeSession(),await Fe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new De;const a=s.session;let o=null,c=null;this.flowType==="pkce"&&t.email!=null&&([o,c]=await Ks(this.storage,this.storageKey));const{data:u,error:d}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:c}),jwt:a.access_token,xform:wr});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(r){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new De;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:a}=Nl(t.access_token);if(a.exp&&(r=a.exp,s=r<=n),s){const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!o)return{data:{user:null,session:null},error:null};i=o}else{const{data:o,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});i={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if($(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:a,error:o}=n;if(o)throw o;t=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new De;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!Be())throw new _l("No browser detected.");if(t.error||t.error_description||t.error_code)throw new _l(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Dx("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new _l("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Dx("No code detected.");const{data:x,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:x.session,redirectType:(r=x.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:c,expires_at:u,token_type:d}=t;if(!a||!c||!o||!d)throw new _l("No session defined in URL");const h=Math.round(Date.now()/1e3),f=parseInt(c);let p=h+f;u&&(p=parseInt(u));const v=p-h;
174v*1e3<=ti&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${f}s`);const m=p-f;h-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,p,h):h-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,p,h);const{data:b,error:g}=await this._getUser(a);if(g)throw g;const y={provider_token:s,provider_refresh_token:i,access_token:a,expires_in:f,expires_at:p,refresh_token:o,token_type:d,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await as(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!El(i))return this._returnResult({error:i});const a=(r=s.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:o}=await this.admin.signOut(a,t);if(o&&!(U$(o)&&(o.status===404||o.status===401||o.status===403)||El(o)))return this._returnResult({error:o})}return t!=="others"&&(await this._removeSession(),await Fe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=Q$(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),El(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Ks(this.storage,this.storageKey,!0));try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var a,o,c,u,d;const{data:h,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await U(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Be()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if($(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
174if(s)throw s;const{options:a,provider:o,token:c,access_token:u,nonce:d}=t,h=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:o,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Pt}),{data:f,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new qs}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(s){if(await Fe(this.storage,`${this.storageKey}-code-verifier`),$(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:a}=n;if(a)throw a;return await U(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await t4(async s=>(s>0&&await e4(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Pt})),(s,i)=>{const a=200*Math.pow(2,s);return i&&Kd(i)&&Date.now()+a-r<ti})}catch(r){if(this._debug(n,"error",r),$(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Be()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await as(this.storage,this.storageKey);if(s&&this.userStorage){let a=await as(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await ni(this.userStorage,this.storageKey+"-user",a)),s.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:Gd()}else if(s&&!s.user&&!s.user){const a=await as(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await Fe(this.storage,this.storageKey+"-user"),await ni(this.storage,this.storageKey,s)):s.user=Gd()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<qd;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${qd}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),Kd(a)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(s.access_token);!o&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new De;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Bu;const{data:i,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!i.session)throw new De;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const o={data:i.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(i){if(this._debug(s,"error",i),$(i)){const a={data:null,error:i};return Kd(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(a),i.length>0){for(let o=0;o<i.length;o+=1)console.error(i[o]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Fe(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await ni(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=Vx(s);await ni(this.storage,this.storageKey,i)}else{const s=Vx(n);await ni(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Fe(this.storage,this.storageKey),await Fe(this.storage,this.storageKey+"-code-verifier"),await Fe(this.storage,this.storageKey+"-user"),this.userStorage&&await Fe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Be()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
174catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ti);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/ti);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ti}ms, refresh threshold is ${Kf} ticks`),s<=Kf&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof Rk)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Be()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,a]=await Ks(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(o.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await U(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await U(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Jx(t.webauthn.credential_response):Yx(t.
174webauthn.credential_response)})}:{code:t.code}),{data:o,error:c}=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:c}))})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const a=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(a.error)return a;const{data:o}=a;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:Kx(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:Gx(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:p}=Nl(t);let v=null;p.aal&&(v=p.aal);let m=v;const{data:{user:b},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((r=(n=b==null?void 0:b.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const x=p.amr||[];return{data:{currentLevel:v,nextLevel:m,currentAuthenticationMethods:x},error:null}}catch(p){if($(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:a},error:o}
174=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Nl(a.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((i=(s=a.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await U(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new De})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new De});const a=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Be()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new De});const a=await U(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Be()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await U(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new De})})}catch(t){if($(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await U(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new De})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(o=>o.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(o=>o.kid===t),r&&this.jwks_cached_at+B$>s)return r;const{data:i,error:a}=await U(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(o=>o.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:v}
174=await this.getSession();if(v||!p.session)return this._returnResult({data:null,error:v});r=p.session.access_token}const{header:s,payload:i,signature:a,raw:{header:o,payload:c}}=Nl(r);n!=null&&n.allowExpired||l4(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:a},error:null}}const d=c4(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,a,J$(`${o}.${c}`)))throw new Yf("Invalid JWT signature");return{data:{claims:i,header:s,signature:a},error:null}}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,s;Jt(this.experimental);try{if(!eu())return this._returnResult({data:null,error:new rn("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(a||!i)return this._returnResult({data:null,error:a});const o=Gx(i.options),c=(s=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:Qf.createNewAbortSignal(),{data:u,error:d}=await Dk({publicKey:o,signal:c});if(d||!u)return this._returnResult({data:null,error:d??new rn("WebAuthn ceremony failed",null)});const h=Yx(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if($(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var n,r;Jt(this.experimental);try{if(!eu())return this._returnResult({data:null,error:new rn("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const a=Kx(s.options),o=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:Qf.createNewAbortSignal(),{data:c,error:u}=await Ik({publicKey:a,signal:o});if(u||!c)return this._returnResult({data:null,error:u??new rn("WebAuthn ceremony failed",null)});const d=Jx(c);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:d})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Jt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new De});const{data:s,error:i}=await U(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if($(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Jt(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new De});const{data:i,error:a}=await U(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;Jt(this.experimental);try{const{data:r,error:s}=await U(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){Jt(this.experimental);try{const{data:n,error:r}=await U(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Pt});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){Jt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new De});const{data:s,error:i}=await U(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if($(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Jt(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new De});const{data:i,error:a}=await U(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){Jt(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new De});const{error:i}
174=await U(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}}To.nextInstanceID={};const O4=To,M4="2.105.3";let Aa="";typeof Deno<"u"?Aa="deno":typeof document<"u"?Aa="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Aa="react-native":Aa="node";const I4={"X-Client-Info":`supabase-js-${Aa}/${M4}`},D4={headers:I4},L4={schema:"public"},$4={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},F4={};function _o(e){"@babel/helpers - typeof";return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(e)}function B4(e,t){if(_o(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_o(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V4(e){var t=B4(e,"string");return _o(t)=="symbol"?t:t+""}function U4(e,t,n){return(t=V4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xx(Object(n),!0).forEach(function(r){U4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const z4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),W4=()=>Headers,H4=(e,t,n)=>{const r=z4(n),s=W4();return async(i,a)=>{var o;const c=(o=await t())!==null&&o!==void 0?o:e;let u=new s(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(i,Se(Se({},a),{},{headers:u}))}};function q4(e){return e.endsWith("/")?e:e+"/"}function K4(e,t){var n,r;const{db:s,auth:i,realtime:a,global:o}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:Se(Se({},c),s),auth:Se(Se({},u),i),realtime:Se(Se({},d),a),storage:{},global:Se(Se(Se({},h),o),{},{headers:Se(Se({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=o==null?void 0:o.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function G4(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(q4(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var J4=class extends O4{constructor(e){super(e)}},Y4=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=G4(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const a=`sb-${i.hostname.split(".")[0]}-auth-token`,o={db:L4,realtime:F4,auth:Se(Se({},$4),{},{storageKey:a}),global:D4},c=K4(n??{},o);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=H4(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Se({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new k3(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new I$(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new p3(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
174channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:a,lock:o,debug:c,throwOnError:u,experimental:d,lockAcquireTimeout:h,skipAutoInitialize:f},p,v){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new J4({url:this.authUrl.href,headers:Se(Se({},m),p),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:a,lock:o,debug:c,throwOnError:u,experimental:d,fetch:v,lockAcquireTimeout:h,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new s$(this.realtimeUrl.href,Se(Se({},e),{},{params:Se(Se({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Q4=(e,t,n)=>new Y4(e,t,n);function X4(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}X4()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function Z4(){var b,g;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(y=>e===y||e.endsWith("."+y)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((g=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:g[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const a=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),o=a?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,c=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=c&&o.test(c)?[c]:a?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],d="lovable-preview-auth:result",h=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),p=(y,x,S)=>new Promise(j=>{const k=f();let C=!1,E;const N=M=>{C||(C=!0,clearTimeout(E),window.removeEventListener("message",T),j(M))},T=M=>{if(u.indexOf(M.origin)<0)return;const H=M.data;H&&H.type===d&&H.requestId===k&&N(H)};window.addEventListener("message",T);const F={type:y,requestId:k,projectId:s,key:x};S!==void 0&&(F.value=S);for(const M of u)window.parent.postMessage(F,M);E=setTimeout(()=>N(null),h)});let v=!0;const m=250;return{getItem:async y=>{let x=await p("lovable-preview-auth:get",y);return!x&&v&&(await new Promise(S=>setTimeout(S,m)),x=await p("lovable-preview-auth:get",y)),v=!1,x&&x.ok&&typeof x.value=="string"?x.value===""?(localStorage.removeItem(y),null):x.value:localStorage.getItem(y)},setItem:(y,x)=>(localStorage.setItem(y,x),p("lovable-preview-auth:set",y,x).then(S=>{S&&S.ok&&typeof S.value=="string"&&localStorage.getItem(y)===x&&(S.value===""?localStorage.removeItem(y):localStorage.setItem(y,S.value))})),removeItem:y=>(localStorage.removeItem(y),p("lovable-preview-auth:remove",y).then(()=>{}))}}const e5="https://fozhiopujgnaayhjokff.supabase.co",t5="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZvemhpb3B1amduYWF5aGpva2ZmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzgxMjY4OTksImV4cCI6MjA5MzcwMjg5OX0.gm_VL3qLtWQXWvhQ170vfCz7cp2Kx52l6KC66jORSLI",n5=Q4(e5,t5,{auth:{storage:Z4(),persistSession:!0,autoRefreshToken:!0}}),r5=["Magic Camps â Wahiba Sands","Magic Camps Private Oman","Magic Camps Private UAE","N
174ot sure yet"],s5=["Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo","Costa Rica","Côte dâIvoire","Croatia","Cuba","Cyprus","Czechia","Democratic Republic of the Congo","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","North Korea","North Macedonia","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"],i5={firstName:"",lastName:"",company:"",email:"",phone:"",country:"",destination:"",guests:"",travelDates:"",lengthOfStay:"",message:""},Kt="w-full bg-transparent border-b border-charcoal/20 text-charcoal py-3 focus:outline-none focus:border-copper transition-colors duration-300 placeholder:text-charcoal/40",mn="block text-charcoal/70 text-[10px] tracking-[0.3em] uppercase mb-3",Yd="text-copper text-[11px] tracking-[0.3em] uppercase mb-8",Al=()=>l.jsx("span",{className:"text-copper ml-1",children:"*"}),Lk=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-100px"}),[n,r]=w.useState(i5),[s,i]=w.useState(!1),[a,o]=w.useState(!1),c=(d,h)=>r(f=>({...f,[d]:h})),u=async d=>{if(d.preventDefault(),!a){o(!0);try{const{error:h}=await n5.functions.invoke("send-contact-email",{body:n});if(h)throw h;i(!0),Py.success("Your enquiry has been sent.")}catch(h){console.error(h),Py.error("Something went wrong. Please try again or email [email protected] directly.")}finally{o(!1)}}};return l.jsx("section",{id:"contact",ref:e,className:"py-16 md:py-24 bg-sand",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-14",children:[l.jsx(R.p,{className:"text-copper text-xs tracking-[0.3em] uppercase mb-5",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.6},children:"Enquire"}),l.jsxs(R.h2,{className:"font-serif font-light text-4xl md:text-5xl text-charcoal leading-tight",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.7,delay:.1},children:["Start planning your ",l.jsx("span",{className:"italic",children:"Magic Camps experience."})]}),l.jsx("div",{className:"copper-line mx-auto my-8"}),l.jsx("p",{className:"text-charcoal-soft max-w-lg mx-auto leading-relaxed text-sm",children:"Tell us a few details about your project, and our team will get back to you to design the most suitable desert camp experience."})]}),s?l.jsxs(R.div,{className:"text-center py-20",initial:{opacity:0,y:20}
174,animate:{opacity:1,y:0},children:[l.jsx("div",{className:"copper-line mx-auto mb-10"}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-6",children:"Thank you for your enquiry."}),l.jsx("p",{className:"text-charcoal-soft max-w-lg mx-auto leading-relaxed",children:"Our team will review your request and get back to you shortly to start designing your Magic Camps experience."})]}):l.jsxs("form",{onSubmit:u,className:"space-y-16",children:[l.jsxs("fieldset",{children:[l.jsx("legend",{className:Yd,children:"Personal Details"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-8",children:[l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"first-name",className:mn,children:["First Name",l.jsx(Al,{})]}),l.jsx("input",{id:"first-name",name:"firstName",type:"text",required:!0,maxLength:100,autoComplete:"given-name",value:n.firstName,onChange:d=>c("firstName",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"last-name",className:mn,children:["Last Name",l.jsx(Al,{})]}),l.jsx("input",{id:"last-name",name:"lastName",type:"text",required:!0,maxLength:100,autoComplete:"family-name",value:n.lastName,onChange:d=>c("lastName",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"email",className:mn,children:["Email Address",l.jsx(Al,{})]}),l.jsx("input",{id:"email",name:"email",type:"email",required:!0,maxLength:255,autoComplete:"email",value:n.email,onChange:d=>c("email",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"company",className:mn,children:"Company / Agency"}),l.jsx("input",{id:"company",name:"company",type:"text",maxLength:150,autoComplete:"organization",value:n.company,onChange:d=>c("company",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"phone",className:mn,children:"Phone Number"}),l.jsx("input",{id:"phone",name:"phone",type:"tel",maxLength:40,autoComplete:"tel",value:n.phone,onChange:d=>c("phone",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"country",className:mn,children:["Country",l.jsx(Al,{})]}),l.jsxs("select",{id:"country",name:"country",required:!0,autoComplete:"country-name",value:n.country,onChange:d=>c("country",d.target.value),className:Kt,children:[l.jsx("option",{value:"",children:"Select..."}),s5.map(d=>l.jsx("option",{value:d,children:d},d))]})]})]})]}),l.jsxs("fieldset",{children:[l.jsx("legend",{className:Yd,children:"Enquiry Details"}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-8",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"destination",className:mn,children:"Preferred Destination"}),l.jsxs("select",{id:"destination",name:"destination",value:n.destination,onChange:d=>c("destination",d.target.value),className:Kt,children:[l.jsx("option",{value:"",children:"Select..."}),r5.map(d=>l.jsx("option",{value:d,children:d},d))]})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"guests",className:mn,children:"Number of Guests"}),l.jsx("input",{id:"guests",name:"guests",type:"number",min:1,value:n.guests,onChange:d=>c("guests",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"travel-dates",className:mn,children:"Preferred Travel Dates"}),l.jsx("input",{id:"travel-dates",name:"travelDates",type:"text",maxLength:120,placeholder:"e.g. 12 â 16 November 2026",value:n.travelDates,onChange:d=>c("travelDates",d.target.value),className:Kt})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"length-of-stay",className:mn,children:"Length of Stay"}),l.jsx("input",{id:"length-of-stay",name:"lengthOfStay",type:"text",maxLength:60,placeholder:"e.g. 2 nights",value:n.lengthOfStay,onChange:d=>c("lengthOfStay",d.target.value),className:Kt})]})]})]}),l.jsxs("fieldset",{children:[l.jsxs("legend",{className:Yd,children:["Your Message",l.jsx("span",{className:"text-copper ml-1",children:"*"})]}),l.jsx("textarea",{id:"message",name:"message",required:!0,value:n.message,onChange:d=>c("message",d.target.value),rows:6,maxLength:2e3,placeholder:"Tell us more about your project, guests, expectations, preferred atmosphere, or any specific requirements.",className:`${Kt} resize-none`})]}),l.jsxs("div",{className:"text-center pt-2",children:[l.jsx("button",{type:"submit",disabled:a,className:"inline-flex items-center justify-center px-12 py-4 text-[11px] tracking-[0.3em] uppercase font-medium border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500 disabled:opacity-50 disabled:cursor-not-allowed",children:a?"Sendingâ¦":"Send Enquiry"}),l.jsxs("p",{className:"mt-5 text-[10px] tracking-[0.2em] uppercase text-charcoal/40",children:["Fields marked with ",l.jsx("span",{className:"text-copper",children:"*"})," are required"]})]})]}),l.jsxs("div",{className:"mt-20 pt-12 border-t border-charcoal/10 text-center",children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-4",children:"Prefer to speak with us directly?"}),l.jsx("p",{className:"text-charcoal-soft max-w-xl mx-auto mb-8 leading-relaxed text-sm",children:"For private stays, camp privatisations, groups, incentives and special events, our team will be happy to guide you personally."}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 max-w-xl mx-auto",children:[l.jsx("a",{href:"mailto:[email protected]",className:"font-serif text-lg text-charcoal hover:text-copper transition-colors",children:"[email protected]"}),l.jsx("a",{href:"tel:+96824121805",className:"font-serif text-lg text-charcoal hover:text-copper transition-colors",children:"+968 2412 1805"})]}),l.jsxs("p",{className:"mt-8 text-[10px] tracking-[0.3em] uppercase text-charcoal/50",children:["A Magic Collection experience by"," ",l.jsx("a",{href:"https://www.magic-dmc.com/",target:"_blank",rel:"noopener noreferrer",className:"text-copper hover:text-charcoal transition-colors",children:"Magic Travels"})]})]})]})})},$k="mc_consent_v1",Fk=1,a5=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return t.version===Fk&&typeof t.analytics=="boolean"&&typeof t.marketing=="boolean"&&typeof t.updatedAt=="string"},o5=()=>{try{const e=window.localStorage.getItem($k);if(!e)return null;const t=JSON.parse(e);return a5(t)?t:null}catch{return null}},l5=()=>(window.dataLayer=window.dataLayer||[],window.gtag||(window.gtag=function(){window.dataLayer.push(arguments)}),window.gtag),Xf=new Set;let Bk=typeof window<"u"?o5():null;const Qd=()=>Bk,c5=e=>(Xf.add(e),()=>{Xf.delete(e)}),u5=(e,t)=>{const n={version:Fk,analytics:e,marketing:t,updatedAt:new Date().toISOString()};try{window.localStorage.setItem($k,JSON.stringify(n))}catch{}const r=l5(),s=t?"granted":"denied";return r("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:s,ad_user_data:s,ad_personalization:s}),window.dataLayer.push({event:"consent_update",analytics:e,marketing:t}),Bk=n,Xf.forEach(i=>
174i()),n},d5=e=>e?e.analytics&&e.marketing?"all":e.analytics?"analytics":e.marketing?"marketing":"none":"unset",h5=(e,t)=>{try{const n=new URL(e,window.location.href);return n.searchParams.set("mc_consent",d5(t)),n.toString()}catch{return e}},Zf="mc:open-cookie-preferences",Vk=()=>window.dispatchEvent(new Event(Zf)),wt=()=>{const e=new Date().getFullYear();return l.jsx("footer",{className:"bg-sand py-16 md:py-24",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-12 md:gap-8",children:[l.jsxs("div",{className:"md:col-span-2",children:[l.jsxs("div",{className:"flex flex-col items-start leading-none mb-6",children:[l.jsx("span",{className:"font-serif font-light text-copper text-4xl tracking-[0.25em]",children:"MAGIC"}),l.jsx("span",{className:"mt-2 text-[10px] tracking-[0.3em] uppercase text-charcoal/70 font-light",children:"Desert Camps · Wahiba Sands"})]}),l.jsx("p",{className:"text-charcoal/60 text-sm leading-relaxed max-w-sm mb-4",children:"Eco-chic luxury desert camp in Wahiba Sands, Oman. Blending Bedouin tradition with modern comfort, all underpinned by a deep commitment to sustainability."}),l.jsx("p",{className:"text-copper text-sm tracking-[0.1em]",children:"Open: October to April"}),l.jsx("div",{className:"flex gap-4 mt-6",children:l.jsx("a",{href:"https://www.instagram.com/magiccamps/?hl=en",target:"_blank",rel:"noopener noreferrer",className:"text-charcoal/60 hover:text-copper transition-colors","aria-label":"Instagram",children:l.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})})})})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-charcoal/70 text-sm tracking-[0.2em] uppercase mb-6",children:"Explore"}),l.jsxs("ul",{className:"space-y-3",children:[l.jsx("li",{children:l.jsx(ke,{to:"/",className:"text-charcoal/80 hover:text-copper transition-colors duration-500 text-sm",children:"Home"})}),l.jsx("li",{children:l.jsx(ke,{to:"/gallery",className:"text-charcoal/80 hover:text-copper transition-colors duration-500 text-sm",children:"Gallery"})}),l.jsx("li",{children:l.jsx(ke,{to:"/#suites",className:"text-charcoal/80 hover:text-copper transition-colors duration-500 text-sm",children:"Tents"})}),l.jsx("li",{children:l.jsx(ke,{to:"/#location",className:"text-charcoal/80 hover:text-copper transition-colors duration-500 text-sm",children:"Location"})})]})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-charcoal/70 text-sm tracking-[0.2em] uppercase mb-6",children:"Contact"}),l.jsxs("ul",{className:"space-y-3 text-sm",children:[l.jsx("li",{children:l.jsx("a",{href:"mailto:[email protected]",className:"text-charcoal/80 hover:text-copper transition-colors duration-500",children:"[email protected]"})}),l.jsx("li",{children:l.jsx("a",{href:"tel:+96824121805",className:"text-charcoal/80 hover:text-copper transition-colors duration-500",children:"+968 2412 1805"})}),l.jsx("li",{className:"text-charcoal/60",children:"Wahiba Sands, Oman"}),l.jsx("li",{className:"pt-4",children:l.jsx("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"footer",target:"_blank",rel:"noopener noreferrer",className:"inline-block px-6 py-2 border border-charcoal text-charcoal hover:bg-charcoal hover:text-sand transition-all duration-500 text-sm tracking-[0.15em] uppercase",children:"Reservations"})})]})]})]}),l.jsxs("div",{className:"mt-12 pt-8 border-t border-charcoal/10",children:[l.jsx("p",{className:"text-charcoal/40 text-xs tracking-[0.1em] text-center mb-4",children:"Certified by"}),l.jsxs("div",{className:"flex justify-center items-center gap-8 opacity-50",children:[l.jsx("span",{className:"text-charcoal text-xs tracking-[0.15em] uppercase",children:"Virtuoso"}),l.jsx("span",{className:"text-charcoal text-xs tracking-[0.15em] uppercase",children:"Travelife"}),l.jsx("span",{className:"text-charcoal text-xs tracking-[0.15em] uppercase",children:"Serandipians"})]})]}),l.jsxs("div",{className:"mt-8 pt-8 border-t border-charcoal/10 flex flex-col md:flex-row justify-between items-center gap-4",children:[l.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-2 md:gap-4",children:[l.jsxs("p",{className:"text-charcoal/40 text-xs tracking-[0.1em]",children:["© ",e," Magic Camps. All rights reserved."]}),l.jsx("span",{className:"hidden md:inline text-charcoal/20 text-xs",children:"·"}),l.jsxs("p",{className:"text-charcoal/50 text-xs tracking-[0.1em]",children:["A Magic Collection experience by"," ",l.jsx("a",{href:"https://www.magic-dmc.com/",target:"_blank",rel:"noopener noreferrer",className:"text-copper hover:text-charcoal transition-colors",children:"Magic Travels"})]})]}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-6",children:[l.jsx(ke,{to:"/privacy",className:"text-charcoal/60 hover:text-copper text-xs tracking-[0.1em] uppercase transition-colors duration-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-copper",children:"Privacy & Cookies"}),l.jsx("button",{type:"button",onClick:Vk,className:"text-charcoal/60 hover:text-copper text-xs tracking-[0.1em] uppercase transition-colors duration-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-copper",children:"Cookie settings"})]})]})]})})},f5=()=>{const e=On();return w.useEffect(()=>{if(window.location.hash!=="#location"){window.scrollTo(0,0);return}let t;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(()=>{var s;(s=document.getElementById("location"))==null||s.scrollIntoView({behavior:"instant"})})}),r=window.setTimeout(()=>{var s;(s=document.getElementById("location"))==null||s.scrollIntoView({behavior:"instant"})},150);return()=>{cancelAnimationFrame(n),t!==void 0&&cancelAnimationFrame(t),window.clearTimeout(r)}},[e.hash,e.key]),l.jsxs("div",{children:[l.jsx(yt,{path:"/",...vt["/"],jsonLd:GO}),l.jsx(xt,{}),l.jsxs("main",{children:[l.jsx(t3,{}),l.jsx(n3,{}),l.jsx(s3,{}),l.jsx(u3,{}),l.jsx(a3,{}),l.jsx(o3,{}),l.jsx(c3,{}),l.jsx(Lk,{})]}),l.jsx(wt,{})]})},tr=({image:e,imageAlt:t,eyebrow:n,title:r})=>l.jsxs("section",{className:"relative h-[70vh] overflow-hidden bg-charcoal flex items-center justify-center",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx("img",{src:e,alt:t,className:"w-full h-full object-cover object-[center_30%]"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-charcoal/60 via-charcoal/40 to-charcoal/80"})]}),l.jsxs("div",{className:"relative z-10 text-center px-6 max-w-3xl [text-shadow:0_2px_12px_rgba(0,0,0,0.45)]",children:[l.jsx(R.div,{className:"w-10 h-px bg-sand/80 mx-auto mb-10",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.9,delay:.3}}),l.jsx(R.p,{className:"text-copper-light text-sm tracking-[0.3em] uppercase mb-6 font-semibold drop-shadow-[0_2px_8px_rgba(0,0,0,0.7)]",initial:{opacity:0,y:20}
174,animate:{opacity:1,y:0},transition:{delay:.4},children:n}),l.jsx(R.h1,{className:"font-serif font-light text-5xl md:text-7xl text-sand leading-[1.05]",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.5},children:r})]})]}),p5="/assets/story-stargazer-BMayzNR7.jpg",m5="/assets/magic-travels-heritage-camp-sunset-B_7ZnCqr.jpg",g5="/assets/camp-twilight-aerial-row-CTg2I-yk.jpg",y5="/assets/libya-first-camp-Drsl-nED.jpg",v5="/assets/amar-luxury-desert-lodge-uae-CLdB5NLT.jpg",x5="/assets/magic-camps-private-starry-night-D0e6fE1_.jpg",w5="/assets/magic-camps-salalah-twilight-BoabI8fR.jpg",b5="/assets/gaia-dahabiya-deck-nile-Cm8E-kPy.jpg",Qm="/assets/aerial-camp-vshape-CSGm2db0.jpg",Uk="/assets/camel-guide-sunset-dunes-fzHEDwyn.jpg",S5=[{year:"1985",eyebrow:"The beginning of Magic Travels",title:l.jsxs(l.Fragment,{children:["Forty years of ",l.jsx("span",{className:"italic",children:"meaningful journeys"})]}),body:l.jsxs(l.Fragment,{children:["Founded in 1985, Magic Travels began as an independent destination management company with a passion for creating meaningful journeys across extraordinary landscapes. Over the decades, the group developed a deep expertise in the Middle East, North Africa and beyond, combining local knowledge, operational precision and a genuine sense of hospitality.",l.jsx("br",{}),l.jsx("br",{}),"Magic Camps was born from this heritage â a desire to offer travellers a more intimate, private and beautifully crafted way to experience the desert."]}),image:m5,alt:"Heritage lantern-lit desert scene evoking the founding spirit of Magic Travels"},{year:"2003",eyebrow:"A pioneering spirit",title:l.jsxs(l.Fragment,{children:["The first camp, beneath the ",l.jsx("span",{className:"italic",children:"Libyan sky"})]}),body:l.jsxs(l.Fragment,{children:["The story of Magic Camps began in 2003, when Magic Travels created its first private desert camp experience in the Libyan desert. It was designed for travellers seeking something rare and deeply connected to place â silence, remoteness, warm hospitality, and the feeling of sleeping beneath an endless sky.",l.jsx("br",{}),l.jsx("br",{}),"This first camp shaped the philosophy that still guides Magic Camps today: authentic desert experiences, refined simplicity, privacy, and respect for the landscape."]}),image:y5,alt:"The first Magic Camps private desert camp at twilight in the Libyan desert"},{year:"2015",eyebrow:"Magic Camps Private",title:l.jsxs(l.Fragment,{children:["Mobile sanctuaries across ",l.jsx("span",{className:"italic",children:"Oman & the UAE"})]}),body:l.jsxs(l.Fragment,{children:["In 2015, Magic Travels expanded the concept with Magic Camps Private Oman & UAE â luxury mobile camps designed for individuals, families, private groups and incentives. Fully tailor-made, they could be set up in exceptional natural locations, offering guests a private desert world created around their journey, their rhythm and their occasion.",l.jsx("br",{}),l.jsx("br",{}),"From intimate escapes to exclusive group experiences, Magic Camps Private brought together the flexibility of a mobile camp with the comfort, creativity and operational expertise of Magic Travels."]}),image:x5,alt:"A luxury mobile stretch tent camp set among the dunes at dusk",objectPosition:"center 75%"},{year:"2019",eyebrow:"Magic Camps Wahiba Sands",title:l.jsxs(l.Fragment,{children:["A permanent camp in the ",l.jsx("span",{className:"italic",children:"golden dunes"})]}),body:l.jsxs(l.Fragment,{children:["In 2019, Magic Camps took a new step with the creation of Magic Camps Wahiba Sands â a permanent desert camp in one of Oman's most iconic landscapes. Set among the golden dunes, the camp was designed as a peaceful desert sanctuary, combining spacious tents, private bathrooms, warm Omani hospitality and immersive desert experiences.",l.jsx("br",{}),l.jsx("br",{}),"Magic Camps Wahiba Sands reflects the essence of the brand: authentic, intimate, comfortable, and deeply connected to the rhythm of the dunes."]}),image:g5,alt:"Aerial view of Magic Camps Wahiba Sands tents glowing along the dunes at twilight"},{year:"2023",eyebrow:"Magic Camps Salalah",title:l.jsxs(l.Fragment,{children:["Another extraordinary ",l.jsx("span",{className:"italic",children:"side of Oman"})]}),body:l.jsxs(l.Fragment,{children:["In 2023, the Magic Camps spirit c
174ontinued to evolve with Magic Camps Salalah, bringing the brand's desert hospitality to another extraordinary side of Oman. Surrounded by the unique landscapes of southern Oman, Salalah offered a different atmosphere â softer, seasonal, and deeply connected to the natural contrasts of the region.",l.jsx("br",{}),l.jsx("br",{}),"This new chapter reinforced Magic Camps' ability to adapt its concept to exceptional places, while keeping the same values of privacy, comfort, authenticity and tailor-made hospitality."]}),image:w5,alt:"Lush southern Oman landscape evoking the seasonal contrasts of Salalah"},{year:"Sept. 2024",eyebrow:"GAIA â our Dahabiya on the Nile",title:l.jsxs(l.Fragment,{children:["The story extends beyond the ",l.jsx("span",{className:"italic",children:"desert"})]}),body:l.jsxs(l.Fragment,{children:["In September 2024, Magic Travels launched GAIA â an intimate Dahabiya sailing the Nile in Egypt. As part of the Magic Collection, GAIA extended the group's philosophy beyond the desert: rare places, slow travel, authentic hospitality and beautifully crafted experiences.",l.jsx("br",{}),l.jsx("br",{}),"With GAIA, Magic Travels continued to develop owned and operated experiences that combine a strong sense of place with elegance, privacy and emotional travel."]}),image:b5,alt:"Refined editorial scene evoking GAIA, the Magic Collection Dahabiya on the Nile",caption:l.jsxs(l.Fragment,{children:["GAIA â Dahabiya on the Nile, part of the ",l.jsx("span",{className:"italic",children:"Magic Collection"})]})},{year:"2025",eyebrow:"AMAR Luxury Desert Ecolodge",title:l.jsxs(l.Fragment,{children:["A new permanent expression of ",l.jsx("span",{className:"italic",children:"desert hospitality"})]}),body:l.jsxs(l.Fragment,{children:["In 2025, the story continued with AMAR Luxury Desert Ecolodge â a new desert retreat created to offer a more permanent and elevated expression of Magic Travels' desert hospitality. AMAR reflects the group's commitment to meaningful luxury, sustainability, design and a deeper connection with the desert landscape.",l.jsx("br",{}),l.jsx("br",{}),"Together with Magic Camps and GAIA, AMAR forms part of the Magic Collection â a family of owned and operated experiences created for travellers seeking rare places, refined comfort and a genuine sense of soul."]}),image:v5,alt:"AMAR â luxury desert ecolodge, part of the Magic Collection",caption:l.jsxs(l.Fragment,{children:["AMAR â luxury desert ecolodge, part of the ",l.jsx("span",{className:"italic",children:"Magic Collection"})]})}],j5=[{title:"Authenticity",note:"True Arabian hospitality, drawn from the people of the desert."},{title:"Privacy",note:"Hidden camps, intimate scale, the quiet of true exclusivity."},{title:"Refined simplicity",note:"Comfort without ostentation â luxury measured in silence and light."},{title:"Sustainability",note:"Solar power, low impact, and a careful measure of every drop."},{title:"Local inspiration",note:"Crafts, fragrances and flavours sourced from inner Oman and Arabia."},{title:"Tailor-made",note:"Each stay orchestrated to your wishes â from a single night to a full privatisation."}],k5=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/story",...vt["/story"]}),l.jsx(xt,{}),l.jsx(tr,{image:p5,imageAlt:"Magic Camps glowing at twilight in the Wahiba Sands",eyebrow:"Magic Camps",title:l.jsxs(l.Fragment,{children:["Our ",l.jsx("span",{className:"font-medium italic",children:"story"})]})}),l.jsxs("main",{children:[l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx(R.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-6",children:"Our Heritage"}),l.jsxs(R.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.9,delay:.1},className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-10",children:["Born from a passion for the ",l.jsx("span",{className:"italic",children:"desert"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mb-10"}),l.jsx(R.p,{initial:{opacity:0}
174,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:1,delay:.2},className:"text-charcoal-soft text-base md:text-lg leading-relaxed font-light",children:"Magic Camps was born from Magic Travels' enduring passion for the desert â and from the desire to create journeys that are private, authentic, and deeply human. A continuation of more than four decades of expertise in destination management, immersive travel, and Arabian hospitality."})]})}),l.jsx("section",{className:"pb-24 md:pb-32 bg-sand",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6 space-y-24 md:space-y-32",children:S5.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9},className:`grid md:grid-cols-2 gap-10 md:gap-16 items-center ${t%2===1?"md:[&>*:first-child]:order-2":""}`,children:[l.jsxs("div",{className:"overflow-hidden",children:[l.jsx("img",{src:e.image,alt:e.alt,style:{objectPosition:e.objectPosition??"center"},className:"w-full h-[340px] md:h-[460px] object-cover transition-transform duration-[1.2s] hover:scale-105"}),e.caption&&l.jsx("p",{className:"mt-3 text-[10px] tracking-[0.25em] uppercase text-charcoal-muted",children:e.caption})]}),l.jsxs("div",{children:[l.jsx("p",{className:"font-serif italic text-5xl md:text-6xl text-copper mb-4 leading-none",children:e.year}),l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-charcoal-muted mb-5",children:e.eyebrow}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-6 leading-tight",children:e.title}),l.jsx("div",{className:"w-10 h-px bg-copper mb-6"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:e.body})]})]},e.year))})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"font-serif italic text-2xl md:text-3xl text-charcoal-muted leading-relaxed",children:'"True luxury is the absence of the unnecessary."'}),l.jsx("p",{className:"mt-6 text-[10px] tracking-[0.35em] uppercase text-copper",children:"â An Ancient Wisdom"})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16 md:mb-20",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Our Philosophy"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["The values that ",l.jsx("span",{className:"italic",children:"shape every camp"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-x-12 gap-y-12",children:j5.map((e,t)=>l.jsxs(R.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t*.05},className:"border-t border-copper/30 pt-6",children:[l.jsx("h3",{className:"font-serif font-light text-2xl text-charcoal mb-3",children:e.title}),l.jsx("p",{className:"text-charcoal-soft text-sm leading-relaxed",children:e.note})]},e.title))})]})}),l.jsx("section",{className:"bg-sand py-12 md:py-16",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-8 md:gap-12",children:[l.jsx("div",{className:"bg-white p-3 shadow-sm",children:l.jsx("div",{className:"overflow-hidden aspect-[4/5]",children:l.jsx("img",{src:Qm,alt:"Aerial view of Magic Camps tents arranged in a V across the golden dunes",className:"w-full h-full object-cover"})})}),l.jsx("div",{className:"bg-white p-3 shadow-sm",children:l.jsx("div",{className:"overflow-hidden aspect-[4/5]",children:l.jsx("img",{src:Uk,alt:"Bedouin guide and guest with camels at sunset in the dunes",className:"w-full h-full object-cover"})})})]})})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"The Magic Collection"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal leading-tight mb-8",children:["A collection born from ",l.jsx("span",{className:"italic",children:"experience"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mb-8"}),l.jsxs("p",{className:"text-charcoal-soft leading-relaxed mb-10",children:["From the first private camp in the Libyan desert to Magic Camps Wahiba Sands, GAIA on the Nile and AMAR Luxury Desert Ecolodge, each chapter reflects the same vision: to create rare travel experiences rooted in place, shaped by hospital
174ity, and crafted with care.",l.jsx("br",{}),l.jsx("br",{}),"Magic Camps remains the desert expression of this vision â intimate, authentic, private, and deeply connected to the landscapes that inspired it."]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center",children:[l.jsx("a",{href:"/",className:"inline-flex items-center justify-center px-8 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Discover Magic Camps"}),l.jsx("a",{href:"https://www.magic-collection-dmc.com/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-8 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Explore the Magic Collection"}),l.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center px-8 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Enquire"})]})]})})]}),l.jsx(wt,{})]})),Xm="/assets/camp-twilight-BgPqLSD2.jpg",C5="/assets/bedouin-bathroom-interior-DkOZ0Ydl.jpg",E5="/assets/story-stargazer-BMayzNR7.jpg",zk="/assets/lantern-bw-dunes-BtKd25Mg.jpg",Zm="/assets/sunset-lounge-vista-CYovWmRW.jpg",T5="/assets/desert-lounge-rattan-pendants-B_VbCu21.jpg",_5="/assets/omani-host-majlis-BYbV3ZWD.jpg",N5="/assets/illuminated-tents-night-BhZGZcjk.jpg",A5=[{q:"What makes Magic Camps one of the best desert camps in Oman?",a:"Magic Camps stands out by offering an exceptional blend of luxury, comfort, and authentic cultural immersion. Our private tents are elegantly furnished with modern amenities while keeping traditional Arabian design. We focus on personalised guest experiences, eco-friendly operations, and exclusive access to the stunning Wahiba Sands."},{q:"Where is Magic Camps located?",a:"Magic Camps operates private camps in the Wahiba Sands of Oman and in the desert landscapes of the UAE â each one set deep within iconic dune scenery, away from light pollution and the rhythm of the city."},{q:"What types of accommodation are available?",a:"Spacious canvas bedroom tents, each with a private bathroom, refined natural materials, quality bedding, and soft lighting. Tents can be arranged for couples, families or groups, and the camp can be fully privatised for events."},{q:"How does Magic Camps approach sustainability?",a:"Solar power, careful water management, no fossil fuels on site, eco-conscious amenities, local sourcing, and a crew almost entirely from the surrounding villages â a luxurious experience with the lightest possible footprint."},{q:"Is Magic Camps suitable for families, groups and events?",a:"Yes. The camp welcomes individual travellers, families, groups, incentives and private celebrations. Full or semi-privatisation can be arranged on request."},{q:"When is Magic Camps open?",a:"Magic Camp Wahiba operates from October to April, when the desert offers its most pleasant temperatures and clearest skies."}],P5=[{title:"Bedroom Tents",body:"Spacious canvas tents shaped by natural materials, soft lighting and quality bedding â a calm, intimate atmosphere in the heart of the dunes.",image:qm},{title:"Private Bathrooms",body:"Each bedroom tent includes its own bathroom with shower and toilet, offering true comfort and privacy without ever leaving the desert.",image:C5},{title:"Desert Lounge",body:"Low seating, woven cushions, brass lanterns and open views over the sand â a peaceful place to gather, read, or watch the sunset unfold.",image:T5},{title:"Dining Under the Stars",body:"Private dinners, traditional Omani flavours and elegant table settings â unforgettable evenings beneath the open desert sky.",image:zo},{title:"Campfire & Stargazing",body:"A quiet ritual at dayâs end, where guests gather around the fire before looking up to one of the clearest skies in the region.",image:E5},{title:"Tailor-Made Experiences",body:"Camel rides, sunrise walks, yoga, cultural encounters, private celebrations, incentives and exclusive events â orchestrated around each stay.",image:Uk}],R5=[{label:"Location",value:"Oman"},{label:"Setting",value:"Private desert camps among the dunes"},{label:"Accommodation",value:"Spacious canvas bedroom tents"},{label:"Bathrooms",value:"Private shower room and toilet"},{label:"Capacity",value:"FIT, families, groups & private events"},{label:"Experience",value:"Stay, dining, activities & wellness"},{label:"Best for",value:"Private escapes, celebrations, incentives"},{label:"Operated by",value:"Magic Travels Group · since 1985"}],O5=[{n:"01",title:"Privacy",body:"A camp designed as a world of its own â to disconnect, gather, celebrate, or simply enjoy the silence of the dunes."},{n:"02",title:"Authenticity",body:"A desert experience rooted in Arabian hospital
174ity â local inspiration, natural materials, meaningful encounters."},{n:"03",title:"Comfort",body:"Spacious tents, private bathrooms, thoughtful service and refined details â the desert experienced without compromise."},{n:"04",title:"Sustainability",body:"A low-impact approach to desert hospitality â respect for the landscape, careful operations, lasting beauty."}],M5=()=>{w.useEffect(()=>{window.scrollTo(0,0)},[]);const[e,t]=w.useState(null);return l.jsxs("div",{children:[l.jsx(yt,{path:"/magic-camps",...vt["/magic-camps"]}),l.jsx(xt,{}),l.jsx(tr,{image:Qm,imageAlt:"Magic Camps in the Wahiba Sands at twilight",eyebrow:"The Camps",title:l.jsxs(l.Fragment,{children:["A dream beneath the ",l.jsx("span",{className:"font-medium italic",children:"desert sky"})]})}),l.jsxs("main",{children:[l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 grid md:grid-cols-2 gap-12 md:gap-20 items-center",children:[l.jsx(R.div,{initial:{opacity:0,x:-40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.9},className:"overflow-hidden",children:l.jsx("img",{src:Xm,alt:"Magic Camps at twilight in the Wahiba Sands",className:"w-full h-[420px] md:h-[560px] object-cover"})}),l.jsxs(R.div,{initial:{opacity:0,x:40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.9},children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Magic Camps"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-6",children:["An authentic private desert camp in the ",l.jsx("span",{className:"italic",children:"Wahiba Sands of Oman"})]}),l.jsx("p",{className:"font-serif italic text-xl md:text-2xl text-copper mb-8 leading-snug",children:"Inspired by the timeless beauty of the Arabian desert."}),l.jsx("div",{className:"w-10 h-px bg-copper mb-8"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-5",children:"Long before luxury became a word, the desert was a place of hospitality, silence, movement and wonder. Magic Camps Wahiba was created in this spirit â a private retreat of sixteen canvas tents where firelight, local traditions and refined comfort come together beneath endless skies."}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:"Born from Magic Travels' first private desert camp experience in Libya in 2003, our permanent camp of sixteen tents is set deep within the golden dunes of the Wahiba Sands â remote yet welcoming, simple yet elegant, and entirely shaped around the rhythm of the desert."})]})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16 md:mb-20",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"The Camp"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["Spaces & services ",l.jsx("span",{className:"italic",children:"at camp"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-x-10 gap-y-16",children:P5.map((n,r)=>l.jsxs(R.article,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:r*.05},children:[l.jsxs("div",{className:"relative overflow-hidden mb-6 bg-sand-deep",children:[l.jsx("img",{src:n.image,alt:n.title,className:"w-full h-[260px] object-cover transition-transform duration-[1.2s] hover:scale-105 saturate-[0.9] contrast-[0.96] brightness-[0.97] sepia-[0.12]"}),l.jsx("div",{className:"pointer-events-none absolute inset-0 bg-copper/10 mix-blend-multiply"}),l.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-charcoal/12 via-transparent to-sand/12"})]}),l.jsx("h3",{className:"font-serif font-light text-2xl text-charcoal mb-3",children:n.title}),l.jsx("div",{className:"w-8 h-px bg-copper mb-4"}),l.jsx("p",{className:"text-charcoal-soft text-sm leading-relaxed",children:n.body})]},n.title))})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-12 md:gap-20 items-center mb-16",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"The Desert Lounge"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["Low cushions, warm lanterns â and the ",l.jsx("span",{className:"italic",children:"dunes, always in view"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper mb-8"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:"Woven rugs, linen cushions, brass lanterns and the soft glow of sunset. At the heart of the camp, the lounge becomes the natural meeting point of the day â a place for mint tea, quiet conversations, slow afternoons and evenings that unfold beneath the stars."})]}),l.jsx(R.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:1},className:"overflow-hidden",children:l.jsx("img",{src:Km,alt:"Lantern-lit desert lou
174nge at Magic Camps",className:"w-full h-[420px] md:h-[520px] object-cover"})})]}),l.jsx("div",{className:"grid grid-cols-3 gap-4 md:gap-6",children:[zk,Zm,N5].map((n,r)=>l.jsx("div",{className:"overflow-hidden aspect-[4/5]",children:l.jsx("img",{src:n,alt:"",className:"w-full h-full object-cover transition-transform duration-[1.2s] hover:scale-105"})},r))})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-16",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"The Camps"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["In ",l.jsx("span",{className:"italic",children:"figures"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("dl",{className:"grid md:grid-cols-2 gap-x-16 gap-y-8 mb-14",children:R5.map(n=>l.jsxs("div",{className:"flex justify-between gap-6 border-b border-charcoal/1
1745 pb-4",children:[l.jsx("dt",{className:"text-[11px] tracking-[0.25em] uppercase text-charcoal-muted",children:n.label}),l.jsx("dd",{className:"font-serif text-lg text-charcoal text-right",children:n.value})]},n.label))}),l.jsx("div",{className:"text-center",children:l.jsx("a",{href:"/accommodation",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Discover the Accommodation"})})]})}),l.jsx("section",{className:"bg-sand",children:l.jsxs("div",{className:"grid md:grid-cols-2",children:[l.jsx(R.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:1},className:"overflow-hidden aspect-[4/5] md:aspect-auto md:min-h-[560px]",children:l.jsx("img",{src:_5,alt:"Omani host on a traditional majlis at Magic Camps",className:"w-full h-full object-cover object-[24%_center]"})}),l.jsx("div",{className:"flex items-center px-6 md:px-16 py-20 md:py-28",children:l.jsxs("div",{className:"max-w-lg",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Inspired by the Desert"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["By the hands, textures and ",l.jsx("span",{className:"italic",children:"traditions of Arabia"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper mb-8"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:"Every detail at Magic Camps is guided by the spirit of the desert: natural canvas, warm textiles, low seating, lantern light, local hospitality and a careful respect for the surrounding landscape. The camp is designed to feel rooted in place â with materials and atmospheres that age gracefully and belong naturally to the dunes."})]})})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"The Magic Camps Promise"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-10",children:["A private desert world, ",l.jsx("span",{className:"italic",children:"held with care"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mb-10"}),l.jsxs("div",{className:"space-y-6 text-charcoal-soft text-base md:text-lg leading-relaxed text-left md:text-center",children:[l.jsx("p",{children:"Every stay at Magic Camps is shaped by hand â a sunrise walk across the dunes, a private dinner under the stars, a yoga session at first light, a celebration around the fire, or a fully exclusive camp designed for a group or incentive."}),l.jsx("p",{children:"Owned and operated by Magic Travels â a family house founded in 1985 with deep experience across the Middle East â Magic Camps is the natural expression of decades spent creating journeys in remote and extraordinary landscapes."}),l.jsx("p",{children:"From arrival to departure, every detail is crafted with discretion, warmth and precision â creating a desert experience that feels seamless, personal and unforgettable."})]})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16 md:mb-20",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Our expertise"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["Four convictions, one ",l.jsx("span",{className:"italic",children:"desert philosophy"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-x-10 gap-y-12",children:O5.map((n,r)=>l.jsxs(R.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:r*.05},children:[l.jsx("p",{className:"font-serif italic text-4xl text-copper mb-4",children:n.n}),l.jsx("h3",{className:"font-serif font-light text-2xl text-charcoal mb-3",children:n.title}),l.jsx("div",{className:"w-8 h-px bg-copper mb-4"}),l.jsx("p",{className:"text-charcoal-soft text-sm leading-relaxed",children:n.body})]},n.n))})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-16",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Good to know"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["Frequently asked ",l.jsx("span",{className:"italic",children:"questions"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}
174),l.jsx("div",{className:"divide-y divide-charcoal/15 border-y border-charcoal/15",children:A5.map((n,r)=>{const s=e===r;return l.jsxs("div",{children:[l.jsxs("button",{onClick:()=>t(s?null:r),className:"w-full text-left py-6 flex justify-between items-start gap-6 group",children:[l.jsx("span",{className:"font-serif text-lg md:text-xl text-charcoal group-hover:text-copper transition-colors",children:n.q}),l.jsx("span",{className:"text-copper text-2xl leading-none mt-1 shrink-0",children:s?"â":"+"})]}),s&&l.jsx(R.p,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"text-charcoal-soft text-base leading-relaxed pb-6 pr-10",children:n.a})]},r)})})]})}),l.jsx("section",{className:"relative",children:l.jsxs("div",{className:"relative h-[60vh] min-h-[420px] overflow-hidden",children:[l.jsx("img",{src:Du,alt:"Magic Camps nestled in a hidden Wahiba valley",className:"absolute inset-0 w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/50"}),l.jsx("div",{className:"relative z-10 h-full flex items-center justify-center px-6",children:l.jsxs("div",{className:"max-w-2xl text-center text-sand",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-sand/80 mb-5",children:"An invitation"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-6xl leading-tight mb-8",children:["Step into the ",l.jsx("span",{className:"italic",children:"desert"})]}),l.jsx("p",{className:"text-sand/85 text-base md:text-lg leading-relaxed mb-10",children:"A private camp experience in Oman may be arranged for guests, families, groups or events seeking a rare and meaningful connection with the desert."}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[l.jsx("a",{href:"/camp-life",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase bg-sand text-charcoal hover:bg-copper hover:text-sand transition-all duration-500",children:"Explore the Camps"}),l.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-sand text-sand hover:bg-sand hover:text-charcoal transition-all duration-500",children:"Enquire"})]})]})})]})})]}),l.jsx(wt,{})]})},Wk="/assets/magic-camps-wahiba-C9Xgfj-O.jpg",I5="/assets/amar-lodge-BEXftJe0.jpg",D5="/assets/gaia-nile-D_9xhILb.jpg",L5=[{eyebrow:"AMAR Luxury Desert Ecolodge",name:"Amar Lodge",location:"Abu Dhabi Desert, Al Ajban â United Arab Emirates",pitch:"100% solar-powered eco-luxury at the heart of the Emirati desert",description:"Amar Luxury Desert Ecolodge is our ultra-luxury signature in the heart of the Abu Dhabi desert (Al Ajban). Ten exclusive 32 m² tents, 100% solar-powered â not one more â for an intimate sanctuary where luxury is measured by the depth of silence and the immensity of the dunes. Contemporary Bedouin hospitality, signature cuisine at Dar Al Amar, total immersion in nature, and a near-zero environmental impact.",highlights:["Only 10 private 32 m² tents â 100% solar energy","Zero environmental impact, 75% water savings","Signature restaurant Dar Al Amar, in-tent or open-air spa","Camel rides, henna, stargazing"],image:I5,primary:{label:"Visit amar-lodges.com â",href:"https://www.amar-lodges.com/"},secondary:{label:"See Emirates",href:"https://www.magic-dmc.com/destinations/emirats"},tertiary:{label:"Request a quote",href:"https://www.magic-dmc.com/contact"}},{eyebrow:"GAÃA Dahabiya",name:"GAIA â Dahabiya on the Nile",location:"Egypt â cruises Aswan â Luxor",pitch:"The art of sailing the Nile differently",description:"GAIA is our dahabiya â a traditional Egyptian wooden sailboat â that drifts to the rhythm of the Nile between Aswan and Luxor. On board: elegant suites and cabins, panoramic lounge, refined cuisine, private stops at temples and villages. Dive into the cool waters of the Nile, enjoy a sunset cocktail in the lounge, take in live chamber music under the stars or an Egyptian cooking class on board.",highlights:["8 suites & cabins with views over the Nile","Panoramic lounge, high tea & sunset cocktails","Privatised stops at the temples between Aswan and Luxor","Cooking classes, live music, swimming in the Nile"],image:D5,primary:{label:"Visit gaia-dmc.com â",href:"https://www.gaia-dmc.com/"},secondary:{label:"See Egypt",href:"https://www.magic-dmc.com/destinations/egypte"},tertiary:{label:"Request a quote",href:"https://www.magic-dmc.com/contact"}},{eyebrow:"Magic Camps",name:"Magic Camp Wahiba",location:"Sharqiya Desert, Wahiba Sands â Oman",pitch:"Eco-chic glamping & starlit nights in the heart of Wahiba",description:"An eco-chic camp in the heart of the Sharqiya Desert (Wahiba Sands), Magic Camp Wahiba blends Bedouin tradition with glamping comfort.
17416 beautifully decorated tents, premium beds and an attached private bathroom, built from natural materials with zero fossil energy. Gourmet Omani cuisine under the vast sky, 4x4 safari, camel rides, stargazing â a nomadic, intimate and deeply sustainable experience.",highlights:["16 eco-chic glamping tents, private bathroom","Natural materials, zero fossil energy","4x4 safari, camel rides, campfire","Gourmet Omani cuisine under the Sharqiya stars"],image:Wk,primary:{label:"Visit magic-camps.com â",href:"https://www.magic-camps.com/"},secondary:{label:"See Oman",href:"https://www.magic-dmc.com/destinations/oman"},tertiary:{label:"Request a quote",href:"https://www.magic-dmc.com/contact"}}],$5=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/magic-collection",...vt["/magic-collection"]}),l.jsx(xt,{}),l.jsx(tr,{image:Wk,imageAlt:"Magic Collection â signature stays in the Middle East",eyebrow:"Magic",title:l.jsx(l.Fragment,{children:"Collection"})}),l.jsxs("main",{children:[l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsx("div",{className:"max-w-3xl mx-auto px-6 text-center",children:l.jsxs(R.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"text-charcoal-soft text-lg md:text-xl leading-relaxed font-light",children:["Magic Collection brings together our signature, in-house operated stays and experiences: three exceptional addresses â"," ",l.jsx("span",{className:"italic text-copper",children:"Amar Lodge"})," at the heart of the Omani desert, ",l.jsx("span",{className:"italic text-copper",children:"GAIA"})," on the Nile, and"," ",l.jsx("span",{className:"italic text-copper",children:"Magic Camps"})," at Wahiba â to live our destinations as no one else can."]})})}),l.jsx("section",{className:"bg-sand pb-12",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-4",children:"Our Products"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["A Collection of ",l.jsx("span",{className:"italic",children:"signature experiences"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]})}),l.jsx("section",{className:"pb-24 md:pb-32 bg-sand",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6 space-y-24 md:space-y-32",children:L5.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9},className:`grid md:grid-cols-2 gap-10 md:gap-16 items-center ${t%2===1?"md:[&>*:first-child]:order-2":""}`,children:[l.jsx("div",{className:"overflow-hidden",children:l.jsx("img",{src:e.image,alt:e.name,className:"w-full h-[340px] md:h-[460px] object-cover object-[center_30%] transition-transform duration-[1.2s] hover:scale-105"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-4",children:e.eyebrow}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-3",children:e.name}),l.jsx("p",{className:"text-[11px] tracking-[0.18em] uppercase text-charcoal-muted mb-6",children:e.location}),l.jsx("p",{className:"font-serif italic text-xl text-copper mb-6",children:e.pitch}),l.jsx("div",{className:"w-10 h-px bg-copper mb-6"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-6",children:e.description}),l.jsx("ul",{className:"space-y-2 mb-8",children:e.highlights.map(n=>l.jsxs("li",{className:"flex gap-3 text-charcoal-soft text-sm leading-relaxed",children:[l.jsx("span",{className:"text-copper mt-1",children:"â"}),l.jsx("span",{children:n})]},n))}),l.jsx("div",{className:"flex flex-wrap gap-3",children:l.jsx("a",{href:e.primary.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-6 py-3 text-[10px] tracking-[0.25em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:e.primary.label})})]})]},e.name))})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Official website"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["Discover the ",l.jsx("span",{className:"italic",children:"Magic Collection"})," universe"]}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-10",children:"Explore our signature stays, exclusive experiences and plan your next escape on the dedicated Magic Collection website."}
174),l.jsx("a",{href:"https://www.magic-collection-dmc.com/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Visit magic-collection-dmc.com â"})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Bespoke"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["Each product can be ",l.jsx("span",{className:"italic",children:"combined and privatised"})]}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-10",children:"Each Magic Collection product can be combined, privatised and orchestrated to your wishes by our DMC teams."}),l.jsx("a",{href:"https://www.magic-dmc.com/contact",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-copper text-copper hover:bg-copper hover:text-sand transition-all duration-500",children:"Plan my experience"})]})})]}),l.jsx(wt,{})]})),F5="/assets/gallery-hero-aerial-CtTHO3J3.png",B5="/assets/aerial-camp-dunes-Cd4Wbp9q.jpg",V5="/assets/aerial-camp-topdown-BDs97U4C.jpg",Hk="/assets/lantern-camp-sunset-tD2mvwAV.jpg",U5="/assets/bedouin-bathroom-Cw5QWhJ0.jpg",z5="/assets/camp-night-dunes-DpzlIIQ6.jpg",W5="/assets/tents-starry-night-BBdNMJvL.jpg",H5="/assets/majlis-desert-view-BdhBHZyW.jpg",qk="/assets/desert-canopy-daybed-CDJQg2hI.jpg",Kk="/assets/omani-host-portrait-night-B6bdG5PT.jpeg",q5="/assets/guest-descending-dune-camp-CeRtKC9x.jpeg",K5="/assets/dining-tent-table-setting-CJ10tlCJ.jpg",G5="/assets/brass-glass-pendants-q2eYG3vO.jpg",Gk="/assets/telescope-desert-twilight-Br368qz_.jpg",J5="/assets/lounge-tent-camels-dusk-9N04gKBU.jpg",Jk="/assets/stretch-tent-camel-dusk-CbWxCpJq.jpg",Y5="/assets/guest-bathroom-tent-robe-DtR8_M7V.jpg",Q5="/assets/fat-bikes-camp-dunes-CCLPUhnB.jpg",X5="/assets/silhouette-dune-sunrise-Ba-T0OLw.jpg",Z5="/assets/guest-desert-grazing-view-CNlHc2ky.jpg",eF="/assets/tent-entrance-striped-cushions-Qsv5AbpE.jpg",tF="/assets/lounge-tent-staff-tray-DTgp-qHU.jpg",nF="/assets/palm-shade-bar-camp-vista-D41J1l5Y.jpg",rF="/assets/sandboarding-dune-BSYTUP5O.jpg",sF="/assets/family-tent-twin-beds-BywNhJ8G.jpg",Yk="/assets/camel-caravan-lantern-path-DIlq005o.jpg",iF="/assets/tent-starry-night-sky-DKTpdmq5.jpg",aF="/assets/mezze-feast-table-BsfQIKp0.jpg",oF="/assets/chess-tent-bw-ClZtlZH_.jpg",Qk="/assets/coffee-dunes-view-DwHjeuts.jpg",Zx=[{src:rF,alt:"Guest sandboarding down a Wahiba dune in a burst of golden sand",category:"Experiences"},{src:nF,alt:"Palm-thatch shaded high table with wooden stools set in the dunes overlooking the Magic Camps tents",category:"Camp"},{src:eF,alt:"Canvas bell tent entrance with striped cushions and lantern set against the Wahiba dunes",category:"Camp"},{src:tF,alt:"Magic Camps host welcoming guests with fresh juices in the open lounge tent overlooking the dunes",category:"Experiences"},{src:Z5,alt:"Guest looking across the dunes from the lounge as grazing goats pass through the Wahiba Sands",category:"Experiences"},{src:X5,alt:"Lone figure silhouetted against the sun on a dune crest in the Wahiba Sands",category:"Experiences"},{src:Q5,alt:"Two guests pushing fat bikes across the dunes toward the camp lookout",category:"Experiences"},{src:Y5,alt:"Guest in white robe at the basin inside the canvas bathroom tent",category:"Interiors"},{src:W5,alt:"Two glowing canvas tents beneath a vast starry sky over the Wahiba dunes",category:"Camp"},{src:sk,alt:"Omani host lighting hurricane lanterns along a sand path with the canvas camp aligned across the Wahiba dunes behind",category:"Camp"},{src:ik,alt:"Open stretch-tent majlis lounge with kilim rugs, embroidered cushions and agave plants opening onto a golden Wahiba dune",category:"Interiors"},{src:ak,alt:"Inside a canvas bell tent with linen bed, woven striped cushions and rattan chair opening onto the Wahiba dune",category:"Interiors"},{src:ok,alt:"Breakfast laid out on a wooden table with crimson cushions, agave plants and rattan chairs under a canvas tent overlooking the dunes",category:"Experiences"},{src:lk,alt:"Two canvas suites side by side beneath a vast Wahiba dune under a clear blue sky",category:"Camp"},{src:ck,alt:"Crackling firepit ringed by woven leather chairs with glowing canvas tents along the dunes at twilight",category:"Experiences"},{src:uk,alt:"Grand stretch tent lounge glowing with rattan pendants and a constellation of hurricane lanterns leading across the dunes at twilight",category:"Camp"},{src:dk,alt:"Guest seated on the dunes with a Bedouin guide and two camels at sunset in the Wahiba Sands",category:"Experiences"},{src:hk,alt:"Omani host serving traditional coffee to a guest inside a Bedouin house lit with warm desert textiles",category:"Experiences"},{src:fk,alt:"Guest riding a camel through Magic Camps with white canvas tents and sculpted dunes behind",category:"Experiences"},{src:pk,alt:"Couple enjoying a candlelit private dinner served under the desert night at Magic Camps",category:"Gastronomy"},{src:mk,alt:"Guests riding fat bikes across the dunes beside the canvas camp under a clear blue sky",category:"Experiences"},{src:Du,alt:"Aerial view of the camp arranged in a V-shape across the Wahiba dunes",category:"Camp"},{src:qm,alt:"Inside a Nature-Chic Tent opening onto the dunes at sunrise",category:"Interiors"},{src:Xj,alt:"Portrait of a Bedouin woman in a crimson veil illuminated by lanterns at night",category:"Experiences"},{src:Yj,alt:"Canvas tents glowing warmly along the dunes at blue-hour dusk",category:"Camp"},{src:Km,alt:"Majlis lounge under sculptural rattan pendants with hurricane lanterns and telescope on the open sand at night",category:"Interiors"},{src:ek,alt:"Camel handler resting beside a white camel in the golden dunes at sunrise",category:"Experiences"},{src:B5,alt:"Drone view of canvas tents lining a sculpted desert valley at golden hour",category:"Camp"},{src:U5,alt:"Bedouin-style bathroom with tadelakt jar and Indian shower opening on the dunes",category:"Interiors"},{src:Zj,alt:"Bedouin guide kneeling on a dune with a telescope beneath the Milky Way arching over the Wahiba Sands",category:"Experiences"},{src:Jk,alt:"Grand stretch tent lounge with rattan lanterns and a decorated camel beside the camp at blue hour",category:"Camp"},{src:Qk,alt:"Arabic coffee, dates and nuts served at sunrise overlooking the camp tents in the dunes",category:"Experiences"},{src:Qj,alt:"Canvas tents glowing along a lantern-lit pathway under a deep blue starry desert night sky",category:"Camp"},{src:H5,alt:"Majlis lounge opening onto the dunes with lanterns and telescope",category:"Interiors"},{src:Kk,alt:"Portrait of an Omani host in traditional dress by the evening firelight",category:"Experiences"},{src:Qm,alt:"Aerial perspective of the camp tents forming a chevron in the Wahiba Sands",category:"Camp"},{src:G5,alt:"Cluster of pierced brass and blown-glass pendant lamps glowing inside a tent",category:"Interiors"},{src:Gm,alt:"Open-air canopy bed with billowing white drapes and Moroccan lantern overlooking the dunes at sunrise",category:"Experiences"},{src:q5,alt:"Guest descending a dune toward the canvas camp laid out in a sweeping desert hollow",category:"Camp"},{src:z5,alt:"Two glowing canvas tents standing alone in the silvered Wahiba dunes under a deep blue night sky",category:"Camp"},{src:sF,alt:"Family Tent with twin beds, woven rattan lamps and dune view through the open canopy",category:"Interiors"},{src:Gk,alt:"Telescope set on the dunes at twilight, ready for a Signature stargazing experience over the Wahiba Sands",category:"Experiences"},{src:Hk,alt:"Hurricane lantern lit at dusk above the camp tents along the dunes",category:"Camp"},{src:Gj,alt:"Luxury lounge with rattan lamps",category:"Interiors"},{src:V5,alt:"Top-down drone view of the camp arrowed into the dunes",category:"Camp"},{src:tk,alt:"Tent bed dressed in linen with woven lamps and the tent opening onto a starry desert sky",category:"Interiors"},{src:Yk,alt:"Camel caravan with bedouin guides cresting a dune along a lantern-lined pathway",category:"Experiences"},{src:iF,alt:"Glowing canvas tent under a vast starry desert sky with lantern-lit terrace",category:"Camp"},{src:J5,alt:"Majlis lounge under woven rattan pendants with a caravan of camels resting beside the camp at dusk",category:"Interiors"},{src:K5,alt:"Intimate dining table dressed with linen napkins, ceramic plates and rattan chairs inside a private canvas tent",category:"Experiences"},{src:Xm,alt:"Magic Camps tents glowing at twilight in the Wahiba Sands",category:"Camp"},{src:aF,alt:"Magic Camps mezze feast with hummus, salads and Omani tagine on a candlelit dining table",category:"Experiences"},{src:nk,alt:"Guest seated on a dune overlooking the camp and sculpted Wahiba Sands horizon",category:"Camp"},{src:oF,alt:"Wooden chess set on a majlis table looking out to the canvas tents in the dunes, black and white",category:"Experiences"},{src:Zm,alt:"Sunset Lounge overlooking the desert valley at golden hour",category:"Camp"},{src:zo,alt:"Private dining tent dressed for dinner under a canopy of brass and coloured glass lanterns",category:"Interiors"},{src:qk,alt:"Canopied daybed set privately atop the dunes for a Signature Experience in the open desert",category:"Experiences"},{src:rk,alt:"Dining pergola above the dunes overlooking the canvas camp in Wahiba Sands",category:"Camp"},{src:zk,alt:"Hurricane lantern hanging on an iron stand along the dunes, black and white",category:"Camp"}],lF=["All","Camp","Interiors","Experiences"],cF=()=>{const[e,t]=w.useState("All"),[n,r]=w.useState(null);w.useEffect(()=>{window.scrollTo(0,0)},[]);const s=e==="All"?Zx:Zx.filter(i=>i.category===e);return l.jsxs("div",{children:[l.jsx(yt,{path:"/gallery",...vt["/gallery"]}),l.jsx(xt,{}),l.jsxs("section",{className:"relative h-[70vh] overflow-hidden bg-charcoal flex items-center justify-center",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx("img",{src:F5,alt:"Aerial view of Magic Camps tents arranged in a chevron across the Wahiba Sands at sunset",className:"w-full h-full object-cover object-[center_30%]"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-charcoal/40 via-charcoal/20 to-charcoal/70"})]}),l.jsxs("div",{className:"relative z-10 text-center px-6 max-w-3xl",children:[l.jsx(R.div,{className:"w-10 h-px bg-sand/70 mx-auto mb-10",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.9,delay:.3}}),l.jsx(R.p,{className:"text-copper-light text-sm tracking-[0.3em] uppercase mb-6",initial:{opacity:0,y:20}
174,animate:{opacity:1,y:0},transition:{delay:.4},children:"Visual Journey"}),l.jsxs(R.h1,{className:"font-serif font-light text-5xl md:text-7xl text-sand leading-[1.05]",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.5},children:["Moments of ",l.jsx("span",{className:"font-medium",children:"desert elegance"})]})]})]}),l.jsx("section",{className:"bg-sand pt-20 md:pt-28",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx(R.p,{className:"font-serif font-light italic text-2xl md:text-3xl text-charcoal-soft leading-relaxed",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},children:'"A camp is a story told in light, in canvas, in the silence between two dunes."'}),l.jsx("div",{className:"copper-line mx-auto mt-12"})]})}),l.jsx("section",{className:"section-luxury bg-sand",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[l.jsx(R.div,{className:"flex flex-wrap justify-center gap-4 mb-12",initial:{opacity:0},animate:{opacity:1},transition:{duration:.8,delay:.4},children:lF.map(i=>l.jsx("button",{onClick:()=>t(i),className:`px-4 py-2 text-sm tracking-[0.15em] uppercase transition-all duration-500 border-b-2 ${e===i?"text-copper border-copper":"text-charcoal-muted border-transparent hover:text-charcoal"}`,children:i},i))}),l.jsx(R.div,{className:"columns-1 md:columns-2 lg:columns-3 gap-6 space-y-6",initial:{opacity:0}
174,animate:{opacity:1},transition:{duration:.8,delay:.6},children:l.jsx(dn,{mode:"popLayout",children:s.map((i,a)=>l.jsx(R.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.5,delay:a*.1},className:"break-inside-avoid cursor-pointer group",onClick:()=>r(i),children:l.jsxs("div",{className:"relative overflow-hidden",children:[l.jsx("img",{src:i.src,alt:i.alt,className:"w-full transition-transform duration-700 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/0 group-hover:bg-charcoal/20 transition-colors duration-500"}),l.jsx("div",{className:"absolute bottom-4 left-4 opacity-0 group-hover:opacity-100 transition-opacity duration-500",children:l.jsx("span",{className:"text-sand text-sm tracking-[0.15em] uppercase bg-charcoal/50 px-3 py-1",children:i.category})})]})},i.src))})})]})}),l.jsx(dn,{children:n&&l.jsxs(R.div,{className:"fixed inset-0 z-50 flex items-center justify-center bg-charcoal/95 p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(null),children:[l.jsx("button",{className:"absolute top-6 right-6 text-sand hover:text-copper transition-colors z-10",onClick:()=>r(null),children:l.jsx(Lo,{size:32})}),l.jsx(R.img,{src:n.src,alt:n.alt,className:"max-w-full max-h-[90vh] object-contain",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:i=>i.stopPropagation()})]})}),l.jsx(wt,{})]})},uF="/assets/chess-board-camp-zyEp3ZX2.jpg",dF="/assets/camel-ride-boy-handler-CEgTLRu0.png",hF="/assets/4x4-dune-drive-DToAzUER.jpg",Xk="/assets/wadi-oman-real-C-lXQUQI.jpg",Zk="/assets/jebel-akhdar-village-DsKnrl2-.jpg",fF="/assets/fat-bike-dunes-BRZd85aD.jpg",eC="/assets/camp-dunes-vista-DM24WDAM.png",pF="/assets/omani-host-smiling-camp-VhBsfRQi.jpg",mF=[{title:"Camel Ride in the Dunes",body:"A timeless way to experience the Wahiba Sands, following the rhythm of the desert with local guides. Ideal at sunrise or sunset, when the dunes glow in soft golden light.",image:dF},{title:"Visit of a Traditional Bedouin Home",body:"A meaningful encounter with local desert culture, offering a glimpse into Omani hospitality, traditions, and daily life in the Wahiba region.",image:Kk},{title:"Fat Bike Experience in the Dunes",body:"A fun and original way to explore the desert landscape. Guided fat bike rides can be adapted to the guestsâ level â perfect for active travellers seeking a different perspective on the dunes.",image:fF},{title:"4x4 Dune Drive",body:"A scenic desert drive across the Wahiba Sands, combining soft adventure, panoramic viewpoints and golden-hour photo stops. Refined, professionally operated, and quietly thrilling.",image:hF},{title:"Wadi Day Experience",body:"A full-day escape to one of Omanâs beautiful wadis: fresh water, dramatic landscapes and time to relax or explore. The perfect contrast to the silence of the dunes.",image:Xk},{title:"Local Crafts & Cultural Encounters",body:"Depending on availability and seasonality, guests may discover local crafts, traditional stories, music, or food preparation â moments rooted in Omani desert life.",image:Zk}],gF=["FIT guests","Families","Couples","Small private groups","Incentive groups","Active travellers","Cultural travellers","Celebration groups"],yF=[{title:"Seasonality",body:"Activities may vary with the season, weather conditions and local availability."},{title:"Pace",body:"All experiences can be adapted, from gentle and contemplative to more active and adventurous."},{title:"Safety",body:"Activities are arranged with trusted local teams and guides, with care for comfort and safety."},{title:"Timing",body:"Sunrise and sunset are often the most beautiful moments for desert activities."},{title:"Tailor-Made",body:"Activities can be combined into a half-day, full-day or multi-day desert journey."}],vF=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/camp-activities",...vt["/camp-activities"]}),l.jsx(xt,{}),l.jsxs("section",{className:"relative h-[80vh] overflow-hidden bg-charcoal flex items-center justify-center",children:[l.jsx(R.img,{src:Yk,alt:"Camel caravan in the Wahiba Sands",className:"absolute inset-0 w-full h-full object-cover object-center opacity-60",initial:{scale:1.1},animate:{scale:1},transition:{duration:1.6}}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-charcoal/40 via-charcoal/20 to-charcoal/70"}),l.jsxs("div",{className:"relative z-10 text-center px-6 max-w-3xl",children:[l.jsx(R.div,{className:"w-10 h-px bg-sand/70 mx-auto mb-10",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.9,delay:.3}}),l.jsx(R.p,{className:"text-copper-light text-sm tracking-[0.3em] uppercase mb-6",initial:{opacity:0,y:20}
174,animate:{opacity:1,y:0},transition:{delay:.4},children:"Camp Activities"}),l.jsxs(R.h1,{className:"font-serif font-light text-5xl md:text-7xl text-sand leading-[1.05]",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.5},children:["Beyond the camp,",l.jsx("br",{}),"the desert ",l.jsx("span",{className:"italic font-medium",children:"unfolds."})]}),l.jsx(R.p,{className:"mt-8 text-sand/85 max-w-xl mx-auto leading-relaxed",initial:{opacity:0},animate:{opacity:1},transition:{delay:.7},children:"Around Magic Camps, every activity reveals another side of Oman: golden dunes, quiet desert life, warm hospitality and the natural beauty of nearby wadis and villages."})]})]}),l.jsx("section",{className:"bg-sand py-24 md:py-32",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 grid md:grid-cols-2 gap-14 md:gap-20 items-center",children:[l.jsxs(R.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-6",children:"A Gateway to Oman"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-5xl text-charcoal leading-tight mb-8",children:["Experiences rooted in the ",l.jsx("span",{className:"italic",children:"Wahiba Sands."})]}),l.jsx("div",{className:"copper-line mb-8"}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed mb-5",children:"Magic Camps is not only a place to stay, but a gateway to the desert and its surrounding landscapes. Each activity can be tailored to the rhythm of the guests â soft adventure, cultural discovery, family-friendly moments, or a full day of exploration."}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed",children:"From a peaceful camel ride at golden hour to a fat bike experience across the dunes, from visiting a traditional Bedouin home to spending the day in a wadi, every moment is designed with the same care: authentic, comfortable, well-paced and deeply connected to place."})]}),l.jsx(R.div,{className:"aspect-[4/5] overflow-hidden",initial:{opacity:0,scale:1.05},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:1},children:l.jsx("img",{src:uF,alt:"Hand-carved wooden chess set in a Magic Camps lounge",className:"w-full h-full object-cover"})})]})}),l.jsx("section",{className:"bg-sand-deep/30 py-24 md:py-32",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-20",children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-4",children:"The Programme"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-5xl text-charcoal",children:["Desert activities & ",l.jsx("span",{className:"italic",children:"discoveries."})]}),l.jsx("div",{className:"copper-line mx-auto mt-8"})]}),l.jsx("div",{className:"space-y-20 md:space-y-28",children:mF.map((e,t)=>l.jsxs(R.div,{className:`grid md:grid-cols-2 gap-10 md:gap-16 items-center ${t%2===1?"md:[&>*:first-child]:order-2":""}`,initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.8},children:[l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-700"})}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-4",children:["0",t+1]}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-6 leading-tight",children:e.title}),l.jsx("div",{className:"copper-line mb-6"}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed",children:e.body})]})]},e.title))})]})}),l.jsxs("section",{className:"relative py-32 md:py-40 overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx("img",{src:Xk,alt:"Wadi in Oman",className:"w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/60"})]}),l.jsxs("div",{className:"relative z-10 max-w-3xl mx-auto px-6 text-center text-sand",children:[l.jsx("p",{className:"text-copper-light text-xs tracking-[0.3em] uppercase mb-6",children:"Signature Moment"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-6xl leading-tight mb-8",children:["A day from dunes ",l.jsx("span",{className:"italic",children:"to wadi."})]}),l.jsx("div",{className:"w-12 h-px bg-copper-light mx-auto mb-8"}),l.jsx("p",{className:"text-sand/90 leading-relaxed mb-6",children:"For guests wishing to explore beyond the camp, a full-day experience can be designed from the Wahiba Sands to one of Omanâs nearby wadis. After crossing desert landscapes and local villages, guests discover a very different side of Oman: rocky valleys, fresh water, palm trees and natural beauty shaped by time."}),l.jsx("p",{className:"text-sand/90 leading-relaxed mb-12",children:"This contrast between sand and water, silence and movement, desert and oasis, creates one of the most memorable days of the journey."}),l.jsx(ke,{to:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium border border-sand text-sand hover:bg-sand hover:text-charcoal transition-all duration-500",children:"Design Your Day Experience"})]})]}),l.jsx("section",{className:"bg-sand py-24 md:py-32",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 grid md:grid-cols-2 gap-14 md:gap-20 items-center",children:[l.jsx(R.div,{className:"aspect-[4/5] overflow-hidden order-2 md:order-1",initial:{opacity:0,scale:1.05},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:1},children:l.jsx("img",{src:pF,alt:"Camp at dusk",className:"w-full h-full object-cover"})}),l.jsxs(R.div,{className:"order-1 md:order-2",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-6",children:"Tailor-Made Activities"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-5xl text-charcoal leading-tight mb-8",children:["One desert, ",l.jsx("span",{className:"italic",children:"many rhythms."})]}),l.jsx("div",{className:"copper-line mb-8"}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed mb-5",children:"Every activity can be adapted to the guestsâ profile, pace and interests. A family may prefer gentle c
174amel rides and cultural encounters; couples may choose a private sunset moment; active travellers may enjoy fat biking or dune exploration; while groups and incentives can combine several experiences into a dynamic desert programme."}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed mb-10",children:"Magic Travelsâ local teams ensure that every activity is arranged with the right timing, safety, comfort and sense of place."}),l.jsx("ul",{className:"grid grid-cols-2 gap-x-6 gap-y-3",children:gF.map(e=>l.jsxs("li",{className:"flex items-center gap-3 text-charcoal-soft text-sm",children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-copper rounded-full"}),e]},e))})]})]})}),l.jsx("section",{className:"bg-sand-deep/30 py-24 md:py-32",children:l.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-16",children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-4",children:"Good to Know"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-5xl text-charcoal",children:["A few ",l.jsx("span",{className:"italic",children:"refined notes."})]}),l.jsx("div",{className:"copper-line mx-auto mt-8"})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-px bg-copper/15",children:[yF.map(e=>l.jsxs("div",{className:"bg-sand p-10",children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-4",children:e.title}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed",children:e.body})]},e.title)),l.jsx("div",{className:"bg-sand p-10 hidden md:block"})]})]})}),l.jsxs("section",{className:"relative py-32 md:py-40 overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx("img",{src:eC,alt:"Magic Camps at sunset",className:"w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/65"})]}),l.jsxs("div",{className:"relative z-10 max-w-3xl mx-auto px-6 text-center text-sand",children:[l.jsx("p",{className:"text-copper-light text-xs tracking-[0.3em] uppercase mb-6",children:"Plan Your Days"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-6xl leading-tight mb-8",children:["Choose your rhythm ",l.jsx("span",{className:"italic",children:"in the desert."})]}),l.jsx("div",{className:"w-12 h-px bg-copper-light mx-auto mb-8"}),l.jsx("p",{className:"text-sand/90 leading-relaxed mb-12",children:"From camel rides and cultural encounters to fat biking, dune drives and wadi discoveries, Magic Camps invites guests to experience Oman beyond the camp â with activities designed around their pace and interests."}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[l.jsx("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"camp-activities-cta",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium border border-sand text-sand hover:bg-sand hover:text-charcoal transition-all duration-500",children:"Plan Your Stay"}),l.jsx(ke,{to:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium bg-copper border border-copper text-sand hover:bg-copper-dark transition-all duration-500",children:"Enquire"})]})]})]}),l.jsx(wt,{})]})),xF="/assets/tent-bedroom-YAJtpKRG.jpg",wF="/assets/tent-bathroom-BDH_WGJH.jpg",bF="/assets/bedouin-bathroom-Cw5QWhJ0.jpg",SF="/assets/tent-private-lounge-DHLqmE24.jpg",jF="/assets/two-tents-dunes-day-BUi2kILx.jpg",kF="/assets/bedouin-bathroom-interior-DkOZ0Ydl.jpg",Xd={tents:{label:"Canvas Tents",eyebrow:"The Canvas Tents",title:"The Canvas Suite",description:"Sixteen luxury tents with private bathroom. Spacious bedrooms (6m diameter, 3m high) furnished with handcrafted objects and natural materials, real mattresses, cotton bedding, duvets and pillows â composing an intimate sanctuary at nightfall.",image:xF,specs:[{label:"Diameter",value:"6 metres"},{label:"Height",value:"3 metres"},{label:"Tents",value:"16 luxury"},{label:"Lighting",value:"Warm · Dimmable"}],bedding:{options:[{name:"Twin",size:"2 à 90 à 200 cm"},{name:"Double King",size:"180 à 200 cm"},{name:"Extra Bed",size:"On request · max 1"}],capacity:"3 adults · or 2 adults + 2 children under 12",note:"A maximum of one extra bed per tent. The second child shares the parents' bed."},amenities:["Spacious bedroom (à 6 m, 3 m high)","Handcrafted decor & natural materials","Real mattresses · cotton bedding · duvet · pillows","Warm dimmable lighting","USB power outlets","Mineral water","Hangers for clothing","Private outdoor lounge with chair, armchair & table"],schedule:[{label:"Check-in",value:"3:00 PM"},{label:"Check-out",value:"10:00 AM"}],gallery:[{src:bF,alt:"Inside a canvas suite opening onto the dunes at first light",caption:"Tent at first light"},{src:SF,alt:"View from inside the tent onto the private outdoor lounge with lantern and dunes",caption:"Private outdoor lounge"}]},bathroom:{label:"Bathroom",eyebrow:"The Bedouin Ritual",title:"The Private Bathroom",description:"Set just beside the main tent, each private bathroom is a refined, water-conscious ritual rooted in desert tradition â terracotta basin, Indian-style shower drawn from a tadelakt jar, and a complete eco-conscious recycling system.",image:wF,specs:[{label:"Location",value:"Adjacent to tent"},{label:"Basin",value:"Indian terracotta"},{label:"Shower",value:"Tadelakt jar"},{label:"Hot water",value:"On request"}],amenities:["Private bathroom set beside the main tent","Portable toilet","Indian-style terracotta basin (hot water on request)","Shower system available (hot water on request)","Toiletries: soap, shower gel & shampoo","Cotton towels and bathrobes","Mirror, towel rack & toiletry articles","Mineral water","Water recycling & waste disposal system"],gallery:[{src:jF,alt:"Two canvas tents nestled in the Wahiba dunes under a clear blue sky",caption:"Tents in the dunes"},{src:kF,alt:"Inside a canvas tent with wooden floor, tadelakt jars, mirror and handcrafted furnishings",caption:"Handcrafted interior"}]}},CF=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-50px"}),n=On(),[r,s]=w.useState("tents"),i=n.hash==="#tents"||n.hash==="#bathroom";w.useEffect(()=>{n.hash==="#bathroom"?(s("bathroom"),setTimeout(()=>{var o;(o=document.getElementById("suites-detail"))==null||o.scrollIntoView({behavior:"smooth"})},50)):(n.hash==="#tents"||n.hash==="#suites")&&(s("tents"),setTimeout(()=>{var o;(o=document.getElementById("suites-detail"))==null||o.scrollIntoView({behavior:"smooth"})},50))},[n.hash,n.key]);const a=Xd[r];return l.jsx("section",{id:"suites",ref:e,className:"section-luxury bg-sand",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[!i&&l.jsxs("div",{className:"text-center mb-14 md:mb-20",children:[l.jsx(R.p,{className:"text-copper text-sm tracking-[0.3em] uppercase mb-4",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8},children:"Accommodation"}),l.jsxs(R.h2,{className:"font-serif text-3xl md:text-5xl text-charcoal mb-6",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.2},children:["Accommodation at ",l.jsx("span",{className:"italic text-copper",children:"Magic Camp"})]}),l.jsxs(R.div,{className:"text-charcoal-muted max-w-6xl mx-auto
174space-y-5 text-left md:text-center",initial:{opacity:0},animate:t?{opacity:1}:{opacity:0},transition:{duration:.8,delay:.4},children:[l.jsx("p",{children:"At Magic Camp, accommodation has been designed to offer the perfect balance between desert authenticity, privacy, and refined comfort."}),l.jsx("p",{children:"Set in the heart of Oman's spectacular Wahiba Sands, the camp features 16 spacious bedroom tents, each thoughtfully designed to reflect the spirit of traditional Arabian hospitality while offering the comfort expected from a high-end private desert retreat."}),l.jsx("p",{children:"Crafted with a focus on natural materials, local inspiration, and understated elegance, each tent creates a warm and peaceful sanctuary after a day of desert exploration. Inside, guests will find comfortable bedding, carefully selected furnishings, and a private bathroom with shower and toilet, ensuring both convenience and privacy throughout the stay."}),l.jsx("p",{children:"Whether travelling as a couple, a family, or a private group, Magic Camp offers an intimate and exclusive setting where guests can fully embrace the beauty of the desert without compromising on comfort."}),l.jsx("p",{children:"From the silence of the dunes to evenings under the stars, every detail has been considered to create a memorable stay in one of Oman's most breathtaking landscapes."})]})]}),l.jsxs("div",{id:"suites-detail",className:"scroll-mt-24",children:[l.jsx("div",{className:"flex justify-center mb-12 md:mb-16",children:l.jsx("div",{className:"flex items-center gap-10 border-b border-charcoal/1
1745",children:Object.keys(Xd).map(o=>l.jsxs("button",{onClick:()=>s(o),className:`relative pb-4 text-[11px] tracking-[0.3em] uppercase font-light transition-colors duration-300 ${r===o?"text-charcoal":"text-charcoal-muted hover:text-charcoal"}`,children:[Xd[o].label,r===o&&l.jsx(R.span,{layoutId:"suites-tab-underline",className:"absolute left-0 right-0 -bottom-px h-px bg-copper",transition:{duration:.4,ease:[.25,.1,.25,1]}})]},o))})}),l.jsx(dn,{mode:"wait",children:l.jsxs(R.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.5,ease:[.25,.1,.25,1]},className:"grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-14 items-start",children:[l.jsx("div",{className:"md:col-span-7 relative group overflow-hidden md:sticky md:top-28",children:l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:a.image,alt:a.title,className:"w-full h-full object-cover object-[center_30%] transition-transform duration-1000 group-hover:scale-105"})})}),l.jsxs("div",{className:"md:col-span-5",children:[l.jsx("p",{className:"text-copper text-[11px] tracking-[0.3em] uppercase mb-4",children:a.eyebrow}),l.jsx("h3",{className:"font-serif text-3xl md:text-4xl text-charcoal mb-6 leading-tight",children:a.title}),l.jsx("div",{className:"copper-line mb-6"}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed mb-8",children:a.description}),l.jsx("dl",{className:"grid grid-cols-2 gap-x-6 gap-y-5 mb-10 border-t border-charcoal/10 pt-6",children:a.specs.map(o=>l.jsxs("div",{children:[l.jsx("dt",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-1",children:o.label}),l.jsx("dd",{className:"font-serif text-lg text-charcoal",children:o.value})]},o.label))}),a.bedding&&l.jsxs("div",{className:"mb-10 border-t border-charcoal/10 pt-6",children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-5",children:"Bedding Configurations"}),l.jsx("ul",{className:"space-y-3 mb-5",children:a.bedding.options.map(o=>l.jsxs("li",{className:"flex items-baseline justify-between gap-4 border-b border-dashed border-charcoal/1
1745 pb-3",children:[l.jsx("span",{className:"font-serif text-lg text-charcoal",children:o.name}),l.jsx("span",{className:"text-charcoal-muted text-sm tracking-wide",children:o.size})]},o.name))}),l.jsxs("p",{className:"text-charcoal text-sm leading-relaxed",children:[l.jsx("span",{className:"text-copper text-[10px] tracking-[0.3em] uppercase block mb-1",children:"Capacity"}),a.bedding.capacity]}),l.jsx("p",{className:"text-charcoal-muted text-xs italic mt-2 leading-relaxed",children:a.bedding.note})]}),l.jsxs("div",{className:"mb-10 border-t border-charcoal/10 pt-6",children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-5",children:"In-Tent Amenities"}),l.jsx("ul",{className:"space-y-2.5",children:a.amenities.map(o=>l.jsxs("li",{className:"flex items-start gap-3 text-charcoal-soft text-sm leading-relaxed",children:[l.jsx("span",{className:"mt-2 flex-shrink-0 w-3 h-px bg-copper"}),l.jsx("span",{children:o})]},o))})]}),a.schedule&&l.jsx("dl",{className:"grid grid-cols-2 gap-x-6 mb-10 border-t border-charcoal/10 pt-6",children:a.schedule.map(o=>l.jsxs("div",{children:[l.jsx("dt",{className:"text-copper text-[10px] tracking-[0.3em] uppercase mb-1",children:o.label}),l.jsx("dd",{className:"font-serif text-lg text-charcoal",children:o.value})]},o.label))}),l.jsxs("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"suites-section",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-copper text-[11px] tracking-[0.3em] uppercase hover:text-charcoal transition-colors duration-500",children:["Reserve Your Stay",l.jsx("span",{className:"ml-3 w-10 h-px bg-current"})]})]})]},r)}),l.jsx(dn,{mode:"wait",children:l.jsxs(R.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.6,ease:[.25,.1,.25,1]},className:"mt-20 md:mt-28",children:[l.jsxs("div",{className:"text-center mb-10",children:[l.jsx("p",{className:"text-copper text-[11px] tracking-[0.3em] uppercase mb-3",children:"A Closer Look"}),l.jsx("h4",{className:"font-serif text-2xl md:text-3xl text-charcoal",children:r==="tents"?l.jsxs(l.Fragment,{children:["Inside the ",l.jsx("span",{className:"italic text-copper",children:"Canvas Tents"})]}):l.jsxs(l.Fragment,{children:["The ",l.jsx("span",{className:"italic text-copper",children:"Bedouin"})," Bathroom"]})})]}),l.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 gap-6 ${a.gallery.length>=4?"lg:grid-cols-4":a.gallery.length===2?"max-w-4xl mx-auto":"lg:grid-cols-3"}`,children:a.gallery.map((o,c)=>l.jsxs(R.figure,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:c*.1},className:"group",children:[l.jsx("div",{className:"relative aspect-[4/5] overflow-hidden",children:l.jsx("img",{src:o.src,alt:o.alt,className:"w-full h-full object-cover object-[center_30%] transition-transform duration-1000 group-hover:scale-105"})}),l.jsx("figcaption",{className:"mt-4 text-charcoal-muted text-xs tracking-[0.2em] uppercase text-center",children:o.caption})]},o.src))})]},`${r}-gallery`)}),l.jsx(R.div,{className:"mt-20 md:mt-28 grid grid-cols-2 md:grid-cols-4 gap-8 text-center border-t border-charcoal/10 pt-12",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.8},children:[{number:"16",label:"Tents"},{number:"100%",label:"Solar Powered"},{number:"5.0",label:"Guest Rating"},{number:"24/7",label:"Concierge"}].map((o,c)=>l.jsxs("div",{children:[l.jsx("span",{className:"block font-serif text-3xl md:text-4xl text-copper mb-2",children:o.number}),l.jsx("span",{className:"text-charcoal-muted text-[10px] tracking-[0.3em] uppercase",children:o.label})]},c))})]})]})})},EF=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/accommodation",...vt["/accommodation"]}),l.jsx(xt,{}),l.jsx(tr,{image:Jj,imageAlt:"Canopy bed open onto the dunes â Magic Camps tent",eyebrow:"Tents",title:l.jsxs(l.Fragment,{children:["Sleeping under ",l.jsx("span",{className:"font-medium",children:"the stars"})]})}),l.jsx("main",{children:l.jsx(CF,{})}),l.jsx(wt,{})]})),TF=[{numeral:"I",title:"The Sunset Lounge",description:"Set high above an adjacent dune, our open-air lounge frames a vast valley where the day ends in copper and rose. A glass in hand, the silence is the only soundtrack."},{numeral:"II",title:"The Majlis",description:"Inspired by traditional Bedu tents, the heart of the camp gathers travellers around lounge corners, a communal table for families and friends, and intimate settings for two â all bathed in the warm glow of suspended straw lamps and lanterns."},{numeral:"III",title:"Fire & Stars",description:"After dinner, gather by the fire as flames dance against the desert night. Candles, oil lamps and a thousand stars conjure the romance of the Arabian Nights."},{numeral:"IV",title:"Leave No Trace",description:"Inspired by the nomadic Bedu, we tread lightly: locally s
174ourced food, 100% solar power, mindful water use, eco-friendly amenities and employment for the local community."}],_F=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-80px"});return l.jsx("section",{id:"camp-life",ref:e,className:"section-luxury bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-16 md:mb-20",children:[l.jsx(R.p,{className:"text-copper text-sm tracking-[0.3em] uppercase mb-4",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8},children:"Camp Life"}),l.jsx(R.h2,{className:"font-serif text-3xl md:text-5xl text-charcoal max-w-3xl mx-auto leading-tight",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.2},children:"A day, from first light to a thousand stars"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 md:gap-14",children:TF.map((n,r)=>l.jsxs(R.div,{className:"flex gap-8",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.7,delay:.3+r*.15},children:[l.jsx("div",{className:"flex-shrink-0 pt-1",children:l.jsx("span",{className:"font-serif text-2xl text-copper tracking-widest",children:n.numeral})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-serif text-2xl text-charcoal mb-3",children:n.title}),l.jsx("div",{className:"copper-line mb-4"}),l.jsx("p",{className:"text-charcoal-muted leading-relaxed",children:n.description})]})]},n.title))})]})})},NF="/assets/lantern-pathway-tents-aerial-BcfsmLE3.jpg",AF=[{image:Du,image_alt:"Aerial view of Magic Camps in the Wahiba valley with Oman landscapes",duration:"6 Nights · Oman Discovery",title:"The Complete",titleAccent:"Oman Escape",itinerary:"2 nights Muscat · 1 night Jebel Akhdar · 1 night Magic Camps Wahiba Sands · 1 night Muscat",description:"A beautifully balanced journey through Oman's contrasts: the elegance of Muscat, the mountain landscapes of Jebel Akhdar, and a night beneath the stars at Magic Camps in the Wahiba Sands before returning to the capital."},{image:Zk,image_alt:"Stone village terraces of Jebel Akhdar above the Omani mountains",duration:"5 Nights · Mountains & Desert",title:"The Oman",titleAccent:"Contrast",itinerary:"1 night Muscat · 2 nights Jebel Akhdar · 2 nights Magic Camps Wahiba Sands",description:"A slower journey combining the cool heights of Jebel Akhdar with the golden silence of the Wahiba Sands. Ideal for travellers seeking nature, authenticity, and a deeper immersion into Oman's landscapes."},{image:NF,image_alt:"Aerial view of a guide walking the lantern-lit pathway leading to Magic Camps tents in the Wahiba dunes",duration:"3 Nights · Desert Immersion",title:"The Magic Camps",titleAccent:"Experience",itinerary:"3 nights Magic Camps Wahiba Sands",description:"A full desert retreat designed for guests who wish to disconnect, slow down, and experience the rhythm of the dunes over several days â from sunrise walks and camel rides to private dining and stargazing."},{image:Zm,image_alt:"Private lounge overlooking the dunes at sunset, set for a bespoke desert evening",duration:"Flexible Duration · Bespoke Journey",title:"Your Oman, Designed",titleAccent:"by Magic",itinerary:"Muscat · Jebel Akhdar · Wahiba Sands · Wadis · Coastal Oman · Private experiences",description:"For guests, families, groups, or incentives looking for a fully tailor-made Oman journey, our Magic team can design a bespoke itinerary combining culture, nature, desert camp life, private dining, activities, and exclusive moments."}],PF=()=>{const e=w.useRef(null),t=Zr(e,{once:!0,margin:"-80px"});return l.jsx("section",{id:"journeys",ref:e,className:"section-luxury bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center mb-16 md:mb-20",children:[l.jsx(R.p,{className:"text-copper text-sm tracking-[0.3em] uppercase mb-4",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8},children:"Journey Inspirations"}),l.jsxs(R.h2,{className:"font-serif font-light text-4xl md:text-6xl text-charcoal mb-6",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.2},children:["Oman ",l.jsx("span",{className:"font-medium italic text-copper",children:"journey"})," inspirations"]}),l.jsx(R.p,{className:"text-charcoal-muted leading-relaxed max-w-2xl mx-auto",initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.8,delay:.35},children:"From Muscat to the mountains and the dunes, Magic Camps can be woven into a wider Oman journey designed around your rhythm, your guests, and your occasion."})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 md:gap-12",children:AF.map((n,r)=>l.jsxs(R.article,{className:"group flex flex-col",initial:{opacity:0,y:40},animate:t?{opacity:1,y:0}:{opacity:0,y:40},transition:{duration:.8,delay:.3+r*.15},children:[l.jsxs("div",{className:"relative aspect-[4/5] overflow-hidden mb-6",children:[l.jsx("img",{src:n.image,alt:n.image_alt,className:"w-full h-full object-cover object-[center_30%] transition-transform duration-[1200ms] group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/0 group-hover:bg-charcoal/1
1745 transition-colors duration-700"})]}),l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-3",children:n.duration}),l.jsxs("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-4",children:[n.title," ",l.jsx("span",{className:"font-medium",children:n.titleAccent})]}),l.jsx("div",{className:"copper-line mb-4"}),l.jsx("p",{className:"font-serif italic text-charcoal-muted text-lg mb-4 leading-relaxed",children:n.itinerary}),l.jsx("p",{className:"text-charcoal-muted leading-relaxed mb-6 flex-grow",children:n.description}),l.jsx(ke,{to:"/contact",className:"inline-block self-start border border-charcoal text-charcoal text-xs tracking-[0.3em] uppercase px-6 py-3 hover:bg-charcoal hover:text-sand transition-colors duration-500",children:"Contact Our Magic Team"})]},n.titleAccent))}),l.jsxs(R.div,{className:"mt-20 md:mt-24 max-w-3xl mx-auto text-center border-t border-copper/30 pt-16",initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{opacity:0,y:30},transition:{duration:.8,delay:.6},children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-4",children:"A Tailor-Made Approach"}),l.jsxs("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-6",children:["Build Your Own ",l.jsx("span",{className:"font-medium italic text-copper",children:"Oman Journey"})]}),l.jsx("p",{className:"text-charcoal-muted leading-relaxed mb-8",children:"These journeys are only starting points. Our Magic team can adapt every itinerary according to your travel dates, guest profile, pace, budget, and expectations."}),l.jsx(ke,{to:"/contact",className:"inline-block bg-charcoal text-sand text-xs tracking-[0.3em] uppercase px-8 py-4 hover:bg-copper transition-colors duration-500",children:"Contact Our Magic Team"})]})]})})},RF=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/camp-life",...vt["/camp-life"]}),l.jsx(xt,{}),l.jsx(tr,{image:Xm,imageAlt:"Magic Camps tents glowing at twilight in the Wahiba Sands",eyebrow:"Camp Life",title:l.jsxs(l.Fragment,{children:["Days written by ",l.jsx("span",{className:"font-medium",children:"the desert"})]})}),l.jsxs("main",{children:[l.jsx(_F,{}),l.jsx(PF,{})]}),l.jsx(wt,{})]})),OF="/assets/illuminated-tents-night-BhZGZcjk.jpg",tC="/assets/breakfast-tent-Dctr3_qy.jpg",MF="/assets/mezze-table-spread-DwvmS5Wx.jpg",IF="/assets/mezze-feast-CHnh9S8N.jpg",eg="/assets/dining-tent-candlelight-C2iS5xHU.jpg",DF="/assets/lounge-tent-lanterns-DAfSsthK.jpg",nC="/assets/carved-doors-table-8b6yHAFw.jpg",rC="/assets/sunset-aperitif-dunes-nmsfn9em.jpg",LF="/assets/campfire-moments-camp-Lob4OJ4k.jpg",$F=[{eyebrow:"At first light",title:l.jsxs(l.Fragment,{children:["Sunrise ",l.jsx("span",{className:"italic",children:"breakfast"})]}),body:"Soft morning light over the dunes, freshly baked breads, seasonal fruits, eggs prepared to order, homemade touches and a steaming cup of Omani coffee â a peaceful way to greet the desert as it awakens.",image:tC,alt:"Breakfast served in the desert tent at sunrise"},{eyebrow:"In the shade",title:l.jsxs(l.Fragment,{children:["Lunch in the ",l.jsx("span",{className:"italic",children:"shade"})]}),body:"A relaxed midday pause beneath canvas â fresh salads, mezze, grilled specialities and light menus shaped to the desert climate. Generous, slow, and gently spiced.",image:IF,alt:"Mezze feast under canvas in the Wahiba Sands"},{eyebrow:"Golden hour",title:l.jsxs(l.Fragment,{children:["Sunset ",l.jsx("span",{className:"italic",children:"aperitif"})]}),body:"A golden-hour ritual on the dunes â refreshing drinks, dates, small bites and a private setting overlooking the Sharqiya as the sand turns from copper to amber to rose.",image:rC,alt:"Sunset aperitif on the dunes at Magic Camps"},{eyebrow:"Beneath the stars",title:l.jsxs(l.Fragment,{children:["Dinner under ",l.jsx("span",{className:"italic",children:"the stars"})]}),body:"The signature Magic Camps experience: lanterns and firelight, elegant table settings framed by carved Omani doors, and an Arabian-inspired menu served slowly beneath an unbroken sky.",image:eg,alt:"Candlelit dinner in the dining tent"},{eyebrow:"After dinner",title:l.jsxs(l.Fragment,{children:["Campfire ",l.jsx("span",{className:"italic",children:"moments"})]}),body:"Mint tea, dates, homemade sweets and the soft crackle of the fire â quiet conversations, shared silence, and the deep dark sky of the Wahiba above.",image:LF,alt:"Campfire moments at Magic Camps"}
174],FF=[{title:"Bedouin-inspired Dinner",body:"A warm, generous evening shaped by traditional desert hospitality â local flavours, firelight and a relaxed atmosphere shared at long tables.",image:zo},{title:"Starlit Private Dinner",body:"An intimate table beneath the night sky â for couples, anniversaries, or simply unforgettable moments away from everything.",image:eg},{title:"Sunset Dune Setup",body:"A private aperitif or light dining experience arranged on a quiet dune as the sun sets over the Sharqiya.",image:rC},{title:"Group & Incentive Dining",body:"Exclusive dining concepts for groups, retreats and incentive programmes, supported by Magic Travelsâ operational expertise.",image:DF},{title:"Wellness Breakfast",body:"A fresh, peaceful morning menu after yoga, sunrise walks or a meditation session in the dunes.",image:tC},{title:"Celebration Dinner",body:"Tailor-made setups for birthdays, anniversaries, private events and special gatherings beneath the stars.",image:nC}],BF=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/gastronomy",...vt["/gastronomy"]}),l.jsx(xt,{}),l.jsx(tr,{image:zo,imageAlt:"Dining tent under lanterns in the Wahiba Sands",eyebrow:"Gastronomy",title:l.jsxs(l.Fragment,{children:["Flavours of the desert, served beneath"," ",l.jsx("span",{className:"font-medium italic",children:"the stars"})]})}),l.jsxs("main",{children:[l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 grid md:grid-cols-2 gap-12 md:gap-20 items-center",children:[l.jsx(R.div,{initial:{opacity:0,x:-40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.9},className:"overflow-hidden",children:l.jsx("img",{src:OF,alt:"Lantern-lit dining table in the Wahiba Sands",className:"w-full h-[420px] md:h-[560px] object-cover"})}),l.jsxs(R.div,{initial:{opacity:0,x:40},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.9},children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Gastronomy"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-6",children:["A table in the heart of the ",l.jsx("span",{className:"italic",children:"Wahiba Sands"})]}),l.jsx("p",{className:"font-serif italic text-xl md:text-2xl text-copper mb-8 leading-snug",children:"Dining where the dunes meet the sky."}),l.jsx("div",{className:"w-10 h-px bg-copper mb-8"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-5",children:"From the first cup of Omani coffee to a private dinner beneath a sky full of stars, dining at Magic Camps is designed as an experience in itself. Menus are inspired by the region's traditions, local flavours and the generous spirit of Arabian hospitality â refined, fresh, and shaped to each journey."}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:"In the desert, meals follow a different rhythm: breakfast with the first light on the dunes, relaxed lunches in the shade, sunset drinks as the sand changes colour, and candlelit dinners around the fire. Every setting is prepared with care â creating a sense of intimacy, warmth and place."})]})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16 md:mb-20",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"A day at the table"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["Dining moments ",l.jsx("span",{className:"italic",children:"at camp"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("div",{className:"space-y-24 md:space-y-32",children:$F.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9},className:`grid md:grid-cols-2 gap-10 md:gap-16 items-center ${t%2===1?"md:[&>*:first-child]:order-2":""}`,children:[l.jsx("div",{className:"overflow-hidden",children:l.jsx("img",{src:e.image,alt:e.alt,className:"w-full h-[340px] md:h-[460px] object-cover transition-transform duration-[1.2s] hover:scale-105"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-4",children:e.eyebrow}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-6 leading-tight",children:e.title}),l.jsx("div",{className:"w-10 h-px bg-copper mb-6"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:e.body})]})]},e.eyebrow))})]})}),l.jsx("section",{className:"bg-sand",children:l.jsxs("div",{className:"grid md:grid-cols-2",children:[l.jsx(R.div,{initial:{opacity:0}
174,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:1},className:"aspect-[4/5] md:aspect-auto md:min-h-[560px] bg-sand p-8 md:p-12 flex items-center justify-center",children:l.jsx("img",{src:MF,alt:"Generous spread of Omani-inspired mezze on a desert dining table",className:"max-w-full max-h-full object-contain shadow-sm"})}),l.jsx("div",{className:"flex items-center px-6 md:px-16 py-20 md:py-28",children:l.jsxs("div",{className:"max-w-lg",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Inspired by Oman"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["Local flavours, ",l.jsx("span",{className:"italic",children:"generous hospitality"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper mb-8"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-5",children:"The culinary experience at Magic Camps is inspired by the flavours and traditions of Oman and the wider Arabian Peninsula â dates, spices, grilled meats and fish, fresh salads, warm breads, fragrant rice, mezze, coffee, tea and homemade sweets, served in menus that are generous, elegant and adapted to the desert setting."}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:"Rather than formal dining, the experience is built around atmosphere: the scent of charcoal, the glow of lanterns, the softness of carpets underfoot, and the silence of the dunes surrounding the table."})]})})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 grid md:grid-cols-2 gap-12 md:gap-20 items-center",children:[l.jsx(R.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:1},className:"overflow-hidden md:order-2",children:l.jsx("img",{src:nC,alt:"Private dining table framed by carved Omani doors",className:"w-full h-[420px] md:h-[560px] object-cover"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Private Dining"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["A table set ",l.jsx("span",{className:"italic",children:"only for you"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper mb-8"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-5",children:"Whether for a romantic dinner, a family celebration, a group gathering or an incentive evening, each dining setup is tailored to the occasion. Tables may be arranged in the open desert, near the camp, around the fire, or in a more intimate corner of the dunes."}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-10",children:"From simple elegance to fully scenographed dinners, Magic Camps designs each moment with discretion, warmth and precision â including dietary adaptations whenever required."}),l.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Design Your Dining Experience"})]})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16 md:mb-20",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Signature"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["Signature desert ",l.jsx("span",{className:"italic",children:"dining experiences"})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-x-10 gap-y-16",children:FF.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t*.05},children:[l.jsx("div",{className:"overflow-hidden mb-6",children:l.jsx("img",{src:e.image,alt:e.title,className:"w-full h-[260px] object-cover transition-transform duration-[1.2s] hover:scale-105"})}),l.jsx("h3",{className:"font-serif font-light text-2xl text-charcoal mb-3",children:e.title}),l.jsx("div",{className:"w-8 h-px bg-copper mb-4"}),l.jsx("p",{className:"text-charcoal-soft text-sm leading-relaxed",children:e.body})]},e.title))})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"The Magic Camps Promise"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-10",children:["Every meal, a ",l.jsx("span",{className:"italic",children:"memory of the desert"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mb-10"}),l.jsx("p",{className:"text-charcoal-soft text-base md:text-lg leading-relaxed mb-6",children:"At Magic Camps, dining is never separate from the landscape. It is part of the silence, the light, the fire, the hospital
174ity and the rhythm of the desert. Every meal is designed to feel personal, generous and beautifully placed â whether shared at sunrise, beneath a canvas shade, or under a sky full of stars."}),l.jsx("p",{className:"text-charcoal-soft text-base md:text-lg leading-relaxed",children:"With the support of Magic Travels' local teams and years of experience in desert operations, each dining moment is prepared with care, comfort and attention to detail."})]})}),l.jsx("section",{className:"relative",children:l.jsxs("div",{className:"relative h-[60vh] min-h-[420px] overflow-hidden",children:[l.jsx("img",{src:eg,alt:"Candlelit dinner under the desert sky at Magic Camps",className:"absolute inset-0 w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/55"}),l.jsx("div",{className:"relative z-10 h-full flex items-center justify-center px-6",children:l.jsxs("div",{className:"max-w-2xl text-center text-sand",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-sand/80 mb-5",children:"An invitation"}),l.jsxs("h2",{className:"font-serif font-light text-4xl md:text-6xl leading-tight mb-8",children:["Taste the silence of the ",l.jsx("span",{className:"italic",children:"Wahiba Sands"})]}),l.jsx("p",{className:"text-sand/85 text-base md:text-lg leading-relaxed mb-10",children:"From sunrise breakfasts to starlit dinners, Magic Camps invites guests to discover a more intimate and memorable way to dine in the desert."}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[l.jsx("a",{href:"/magic-camps",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase bg-sand text-charcoal hover:bg-copper hover:text-sand transition-all duration-500",children:"Explore the Camp"}),l.jsx("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"gastronomy-cta",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-sand text-sand hover:bg-sand hover:text-charcoal transition-all duration-500",children:"Plan Your Stay"}),l.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-sand text-sand hover:bg-sand hover:text-charcoal transition-all duration-500",children:"Enquire"})]})]})})]})})]}),l.jsx(wt,{})]})),VF=[{eyebrow:"Sunrise",title:l.jsxs(l.Fragment,{children:["Morning ",l.jsx("span",{className:"italic",children:"yoga"})," session"]}),time:"6:30 â 7:30 · on the dunes",body:"Greet the first light of the Sharqiya barefoot in the sand. Vinyasa, hatha or restorative â each practice is shaped to your level, from gentle alignment to a deeper, meditative flow beneath the open canvas of a stretch tent.",highlights:["Hatha, vinyasa or restorative","Private or small-group sessions","Mats, bolsters & blankets provided"],image:Jk},{eyebrow:"Movement",title:l.jsxs(l.Fragment,{children:["Morning ",l.jsx("span",{className:"italic",children:"walk"})," in the dunes"]}),time:"Early morning · 60 to 90 minutes",body:"Set out at first light with a guide who knows every fold of the Sharqiya sands. A slow, contemplative walk along the crests â ochre dunes, cool morning air and the soft hush of the awakening desert.",highlights:["Guided by a local desert expert","Cardamom tea & dates on the dune","Suited to all levels"],image:Qk},{eyebrow:"Touch",title:l.jsxs(l.Fragment,{children:["Signature ",l.jsx("span",{className:"italic",children:"massage"})," rituals"]}),time:"On request · 60 to 90 minutes",body:"Skilled hands guide you through deeply restorative treatments using Arabian botanicals â frankincense, rose, argan and amber. Choose between a traditional Omani ritual, a deep-tissue release or a slow, intuitive full-body massage.",highlights:["Traditional Omani ritual with frankincense","Deep-tissue & muscle release","In your tent or beneath the canopy"],image:Gm},{eyebrow:"Twilight",title:l.jsxs(l.Fragment,{children:["Stargazing & ",l.jsx("span",{className:"italic",children:"silent meditation"})]}),time:"After dinner · weather permitting",body:"A guided meditation under one of the worldâs most generous skies â followed by a telescope session with our resident stargazer. Where silence becomes a luxury and the constellations tell their oldest stories.",highlights:["Guided silent meditation","Telescope observation","Storytelling under the Milky Way"],image:Gk}],UF=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/wellness",...vt["/wellness"]}),l.jsx(xt,{}),l.jsx(tr,{image:qk,imageAlt:"Desert canopy daybed for moments of slow rest",eyebrow:"Wellness",title:l.jsxs(l.Fragment,{children:["A sanctuary of ",l.jsx("span",{className:"font-medium italic",children:"stillness"})]})}),l.jsxs("main",{children:[l.jsx("section",{className:"py-24 md:py-32 bg-sand-deep",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Our Rituals"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["From sunrise to ",l.jsx("span",{className:"italic",children:"starlight"})]}),l.jsx("p",{className:"text-charcoal-soft text-base md:text-lg leading-relaxed",children:"A daily journey shaped by the rhythm of the desert â breath, movement, touch and contemplation. Each ritual can be lived privately or shared, in your tent or beneath the open sky."}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-10"})]})}),l.jsx("section",{className:"pb-24 md:pb-32 bg-sand-deep",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6 space-y-24 md:space-y-32",children:VF.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9},className:`grid md:grid-cols-2 gap-10 md:gap-16 items-center ${t%2===1?"md:[&>*:first-child]:order-2":""}`,children:[l.jsx("div",{className:"overflow-hidden",children:l.jsx("img",{src:e.image,alt:"",className:"w-full h-[340px] md:h-[450px] object-cover object-center transition-transform duration-[1.2s] hover:scale-105"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-4",children:e.eyebrow}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-3 leading-tight",children:e.title}),l.jsx("p",{className:"text-[11px] tracking-[0.18em] uppercase text-charcoal-muted mb-6",children:e.time}),l.jsx("div",{className:"w-10 h-px bg-copper mb-6"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-6",children:e.body}),l.jsx("ul",{className:"space-y-2",children:e.highlights.map(n=>l.jsxs("li",{className:"flex gap-3 text-charcoal-soft text-sm leading-relaxed",children:[l.jsx("span",{className:"text-copper mt-1",children:"â"}),l.jsx("span",{children:n})]},n))})]})]},t))})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-5",children:"Bespoke"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["Compose your ",l.jsx("span",{className:"italic",children:"wellness journey"})]}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed mb-10",children:"Every ritual can be combined and orchestrated to your wishes â from a single sunrise session to a full retreat woven across your stay."}),l.jsx("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"wellness-cta",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Begin Your Journey"})]})})]}),l.jsx(wt,{})]})),zF="/assets/magic-collection-hero-CLCI4s6g.jpg",WF="/assets/solar-panels-desert-PBZKUDIm.jpg",HF="/assets/bedouin-portrait-FzyUgRhI.jpg",qF="/assets/brass-lantern-craft-O0kxvxzf.jpg",KF="/assets/guests-walking-dunes-vMbmCpnI.jpg",GF="/assets/camp-shaped-by-desert-4M26wOuU.jpg",JF=[{image:GF,alt:"Magic Camps tents nestled discreetly in a hidden Wahiba valley",eyebrow:"Conscious design",title:l.jsxs(l.Fragment,{children:["A camp shaped by ",l.jsx("span",{className:"italic",children:"the desert"}),"."]}),body:"Magic Camps was conceived as a low-impact retreat from the ground up â canvas tents, natural ventilation, locally s
174ourced materials and an architecture that works with the dunes, not against them. Every structure is designed to minimise its footprint while maximising harmony with the Wahiba landscape."},{image:KF,alt:"Guests walking together across the Wahiba dunes, leaving only soft footprints",eyebrow:"Biodiversity & ecosystems",title:l.jsxs(l.Fragment,{children:["Custodians of ",l.jsx("span",{className:"italic",children:"the dunes"}),"."]}),body:"From the fragile dune ecosystems of the Wahiba Sands to the modest desert flora that holds the sand in place, we are custodians of the environment we inhabit. We monitor our impact on the surrounding land, keep our footprint contained and ensure that our presence preserves the natural balance of the desert.",reversed:!0},{image:WF,alt:"Sun rising softly over the quiet Wahiba dunes",eyebrow:"Low-impact operations",title:l.jsxs(l.Fragment,{children:["Powered by the sun, ",l.jsx("span",{className:"italic",children:"honoured by silence"}),"."]}),body:"Solar energy and battery storage allow us to operate with a lighter footprint and without the constant hum of generators. Electricity is intentionally limited to four hours per tent each day â enough for comfort, light enough to preserve the deep quiet of the Wahiba. Water is treated as the most precious resource of the desert and single-use plastic is avoided across the camp."},{image:HF,alt:"Young Omani in traditional dress, embodying the heritage of the Sharqiya",eyebrow:"Culture & heritage",title:l.jsxs(l.Fragment,{children:["Honouring ",l.jsx("span",{className:"italic",children:"Bedouin codes"}),"."]}),body:"We believe luxury travel should celebrate the traditions it touches. The Bedu codes of hospitality â silence, generosity, the offering of coffee and dates â guide the way guests are welcomed at Magic Camps. From the rituals of the table to the rhythm of the day, intangible heritage is safeguarded through every experience we craft.",reversed:!0,position:"object-top"},{image:qF,alt:"Stacks of hand-crafted Omani terracotta pottery with carved patterns",eyebrow:"Responsible sourcing",title:l.jsxs(l.Fragment,{children:["Hospitality drawn from ",l.jsx("span",{className:"italic",children:"close to the camp"}),"."]}),body:"Wherever possible, we source from the Sharqiya â fresh produce, traditional breads, dates and small-scale suppliers. Furnishings favour canvas, wood, woven palm, warm cottons and brass lanterns: natural materials chosen for their honesty and their connection to desert life. The table reflects the region: generous, seasonal and shaped by the families and farms around us.",reversed:!0}],YF=["Solar arrays and battery storage instead of full-time generators.","Electricity intentionally limited to four hours per tent each day.","Water consumption monitored and minimised across the camp.","Single-use plastic avoided; filtered water served in glass and brass.","Eco-conscious bathroom amenities and discreet daily operations.","Local employment, training and apprenticeships for the Sharqiya.","Fresh produce, breads and dates sourced from regional suppliers.","Camp design built to leave the dunes intact at the end of each season."],QF=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/sustainability",...vt["/sustainability"]}),l.jsx(xt,{}),l.jsx(tr,{image:zF,imageAlt:"Sustainable luxury in the desert",eyebrow:"Sustainability",title:l.jsxs(l.Fragment,{children:["Leave ",l.jsx("span",{className:"font-medium italic",children:"no trace"})]})}),l.jsxs("main",{children:[l.jsx("section",{className:"bg-sand py-24 md:py-32",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx(R.p,{className:"text-copper text-[10px] tracking-[0.4em] uppercase mb-8",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},children:"Our Commitment"}),l.jsxs(R.h2,{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-10",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8,delay:.1},children:["A responsibility rooted in ",l.jsx("span",{className:"italic",children:"who we are."})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mb-10"}),l.jsx(R.p,{className:"text-charcoal-soft leading-relaxed mb-6",initial:{opacity:0}
174,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.8,delay:.2},children:"Magic Camps is part of the Magic Collection by Magic Travels â a family of properties where sustainability is not a programme, but inseparable from the way each experience is conceived, built and operated. Every choice reflects a deep respect for the lands, cultures and people that give life to the collection."}),l.jsx(R.p,{className:"text-charcoal-soft leading-relaxed",initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.8,delay:.3},children:"In the Wahiba Sands, this philosophy becomes concrete. Every choice matters: the way we use energy, protect silence, manage water, source food, work with the local community and respect the fragile beauty of the desert."})]})}),l.jsx("section",{className:"py-24 md:py-32 bg-sand",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6 space-y-24 md:space-y-32",children:JF.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9},className:`grid md:grid-cols-2 gap-10 md:gap-16 items-center ${e.reversed?"md:[&>*:first-child]:order-2":""}`,children:[l.jsx("div",{className:"overflow-hidden",children:l.jsx("img",{src:e.image,alt:e.alt,loading:"lazy",className:`w-full h-[340px] md:h-[480px] object-cover ${e.position??"object-center"} transition-transform duration-[1.2s] hover:scale-105`})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] tracking-[0.35em] uppercase text-copper mb-4",children:e.eyebrow}),l.jsx("h3",{className:"font-serif font-light text-3xl md:text-4xl text-charcoal mb-3 leading-tight",children:e.title}),l.jsx("div",{className:"w-10 h-px bg-copper mb-6"}),l.jsx("p",{className:"text-charcoal-soft text-base leading-relaxed",children:e.body})]})]},t))})}),l.jsx("section",{className:"bg-sand-deep py-24 md:py-32",children:l.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[l.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-14 md:mb-16",children:[l.jsx("p",{className:"text-copper text-[10px] tracking-[0.4em] uppercase mb-5",children:"In Practice"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight",children:["Concrete actions ",l.jsx("span",{className:"italic",children:"at the camp."})]}),l.jsx("div",{className:"w-10 h-px bg-copper mx-auto mt-8"})]}),l.jsx("ul",{className:"grid md:grid-cols-2 gap-x-12 gap-y-6",children:YF.map((e,t)=>l.jsxs(R.li,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.6,delay:t*.04},className:"flex gap-5 items-start border-t border-copper/20 pt-5",children:[l.jsx("span",{className:"font-serif text-copper text-sm pt-1 tracking-wide",children:String(t+1).padStart(2,"0")}),l.jsx("p",{className:"text-charcoal-soft text-[15px] leading-relaxed",children:e})]},t))})]})}),l.jsxs("section",{className:"relative py-28 md:py-40 overflow-hidden",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx("img",{src:eC,alt:"",className:"w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-charcoal/60"})]}),l.jsxs("div",{className:"relative z-10 max-w-2xl mx-auto px-6 text-center text-sand",children:[l.jsx("p",{className:"text-copper-light text-[10px] tracking-[0.4em] uppercase mb-6",children:"Our Promise"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl leading-tight mb-8",children:["Experience the desert ",l.jsx("span",{className:"italic",children:"with care"}),"."]}),l.jsx("div",{className:"w-10 h-px bg-copper-light mx-auto mb-8"}),l.jsx("p",{className:"text-sand/85 leading-relaxed mb-12",children:"Magic Camps invites guests to discover the Wahiba Sands with comfort, privacy and respect for the fragile beauty of the desert."}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[l.jsx("a",{href:"https://us2.cloudbeds.com/reservation/8OUiJl","data-booking-cta":"true","data-cta-location":"sustainability-cta",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium border border-sand text-sand hover:bg-sand hover:text-charcoal transition-all duration-500",children:"Plan Your Stay"}),l.jsx(ke,{to:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium bg-copper border border-copper text-sand hover:bg-copper-dark transition-all duration-500",children:"Enquire"})]})]})]})]}),l.jsx(wt,{})]})),XF=[{date:"March 2023",sortKey:"2023-03-16",publication:"La Quotidienne",title:"Magic Travels, the luxury DMC that keeps growing",excerpt:"An interview with Lucie Delfosse at ITB Berlin, announcing a second luxury Magic Camp in Salalah (Oman), a future Magic Camp in Wadi Rum (Jordan) and the continued development of Magic Camps experiences across the region.",image:"https://www.laquotidienne.fr/wp-content/uploads/2023/03/Magic-Travels-Lucie-Delfosse-a-ITB.jpg",link:"https://www.laquotidienne.fr/magic-travels-le-dmc-de-luxe-qui-ne-cesse-de-grandir/"}
174,{date:"2022",sortKey:"2022-01-01",publication:"Hôtel & Lodge",title:"Magic Camps Wahiba Sands â 4th most beautiful lodge in the world",excerpt:"Magic Camps Wahiba Sands named among the most beautiful hotels in the world by Hôtel & Lodge magazine, in a special issue dedicated to the worldâs 100 finest lodges, voted by the ARCHILIVE jury.",image:"https://www.magic-dmc.com/assets/press-hotel-lodge-magic-camps-DotzDf1i.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"8 February 2022",sortKey:"2022-02-08",publication:"Meet and Travel Mag",title:"Magic Travels and Oman Air take 8 agencies to discover the Sultanate",excerpt:"A fam trip organised with Oman Air and the Oman Tourism Board, immersing eight agencies in the Sultanate â including a stay at Magic Camps in the Wahiba Sands.",image:"https://www.magic-dmc.com/assets/oman-team-desert-BcFb-e02.jpg",link:"https://meetandtravelmag.com/magic-travels-et-oman-air-emmenent-8-agences-a-la-decouverte-du-sultanat/"},{date:"2021",sortKey:"2021-06-01",publication:"Le Figaro Magazine",title:"âIt is the most beautiful of the Wahiba Sands campsâ",excerpt:"Magic Camps Wahiba Sands featured in Le Figaro Magazine â an article by Marine Sanclemente celebrating one of the finest camps of the Wahiba Sands desert.",image:"https://www.magic-dmc.com/assets/press-figaro-magazine-magic-camps-Ct_GgGRY.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"2021",sortKey:"2021-05-01",publication:"Décideurs Magazine",title:"âA unique experience combining luxury and environmental responsibilityâ",excerpt:"Magic Camps Wahiba Sands featured in Décideurs Magazine, the French publication dedicated to business, finance and corporate law â celebrating a unique experience combining luxury and environmental responsibility.",image:"https://www.magic-dmc.com/assets/press-decideurs-magic-camps-DOInXNKJ.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"2021",sortKey:"2021-04-01",publication:"TF1 â 50â Inside",title:"50â Inside puts Magic Camps in the spotlight",excerpt:"Magic Camps featured on French television in the famous show 50â Inside on TF1 â a televised journey into the silence and magic of the Wahiba Sands.",image:"https://www.magic-dmc.com/assets/press-50-inside-magic-camps-BMfTVJ2n.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"2020",sortKey:"2020-09-01",publication:"Le Figaro Voyages",title:"Tested and approved â Magic Camps in Le Figaro Voyages",excerpt:"Magic Camps in Oman featured in a special issue of Le Figaro Voyages, highlighting the eco-responsibility and authentic simplicity of our luxury camp at the heart of the Wahiba Sands.",image:"https://www.magic-dmc.com/assets/press-figaro-voyages-magic-camps-XPV85gQV.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"August 2020",sortKey:"2020-08-01",publication:"Cosmopolitan",title:"Magic Camps Wahiba Sands featured in Cosmopolitan",excerpt:"Magic Camps Wahiba Sands appears in the French edition of Cosmopolitan Magazine, in a piece by Marie La Fonta capturing the Magic Camps experience.",image:"https://www.magic-dmc.com/assets/press-cosmopolitan-august-magic-camps-C0FmvsXc.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"2020",sortKey:"2020-07-01",publication:"Cosmopolitan",title:"Magic Camps Wahiba Sands praised by Cosmopolitan",excerpt:"âThis camp is magical, and every detail conveys a sense of well-being, peace and absolute luxury.â Marie La Fonta shares her Magic Camps experience in a French issue of Cosmopolitan.",image:"https://www.magic-dmc.com/assets/press-cosmopolitan-magic-camps-BezTOcuU.png",link:"https://www.magic-dmc.com/magic-journal/press"},{date:"2017",sortKey:"2017-01-01",publication:"Le Quotidien du Tourisme",title:"Magic Travels opens a permanent luxury camp in the Omani desert",excerpt:"Le Quotidien du Tourisme reports on the opening of a permanent luxury camp in the heart of the Omani desert â the founding chapter of the Magic Camps story in Oman.",image:"https://www.magic-dmc.com/assets/press-oman-camp-fixed-pQV467wR.jpg",link:"https://www.quotidiendutourisme.com/actualite/destinations/magic-travels-ouvre-un-camp-de-luxe-fixe-dans-le-desert-omanais-557480.php"}],ZF=[...XF].sort((e,t)=>
174e.sortKey<t.sortKey?1:-1),eB=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/press",...vt["/press"]}),l.jsx(xt,{}),l.jsxs("section",{className:"relative h-[70vh] overflow-hidden bg-charcoal flex items-center justify-center",children:[l.jsx(R.img,{src:Hk,alt:"Magic Camps in the Wahiba Sands at sunset",className:"absolute inset-0 w-full h-full object-cover opacity-55",initial:{scale:1.1},animate:{scale:1},transition:{duration:1.6}}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-charcoal/40 via-charcoal/20 to-charcoal/70"}),l.jsxs("div",{className:"relative z-10 text-center px-6 max-w-3xl",children:[l.jsx(R.div,{className:"w-10 h-px bg-sand/70 mx-auto mb-10",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.9,delay:.3}}),l.jsx(R.p,{className:"text-copper-light text-sm tracking-[0.3em] uppercase mb-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},children:"Press"}),l.jsxs(R.h1,{className:"font-serif font-light text-5xl md:text-7xl text-sand leading-[1.05]",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{delay:.5},children:["Magic Camps ",l.jsx("span",{className:"italic font-medium",children:"in the press."})]}),l.jsx(R.p,{className:"mt-8 text-sand/85 max-w-xl mx-auto leading-relaxed",initial:{opacity:0}
174,animate:{opacity:1},transition:{delay:.7},children:"Selected press features and media mentions highlighting Magic Camps, our private desert experiences and the Magic Collection by Magic Travels."})]})]}),l.jsx("section",{className:"bg-sand py-24 md:py-32",children:l.jsx("div",{className:"max-w-6xl mx-auto px-6",children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10 md:gap-12",children:ZF.map((e,t)=>l.jsxs(R.article,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.7,delay:t%3*.1},className:"group flex flex-col",children:[l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"block aspect-[4/3] overflow-hidden bg-sand-deep/40 mb-6",children:l.jsx("img",{src:e.image,alt:e.title,loading:"lazy",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),l.jsxs("div",{className:"flex items-baseline gap-3 text-[10px] tracking-[0.3em] uppercase mb-4",children:[l.jsx("span",{className:"text-copper",children:e.publication}),l.jsx("span",{className:"text-charcoal/30",children:"·"}),l.jsx("span",{className:"text-charcoal-muted",children:e.date})]}),l.jsx("h3",{className:"font-serif font-light text-2xl text-charcoal leading-snug mb-4 group-hover:text-copper transition-colors",children:e.title}),l.jsx("p",{className:"text-charcoal-soft text-sm leading-relaxed mb-6 flex-1",children:e.excerpt}),l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:"self-start text-[11px] tracking-[0.3em] uppercase text-charcoal border-b border-copper pb-1 hover:text-copper transition-colors",children:"Read Article"})]},e.title))})})}),l.jsx("section",{className:"bg-sand-deep/30 py-20",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-5",children:"Press enquiries"}),l.jsx("h2",{className:"font-serif font-light text-2xl md:text-3xl text-charcoal mb-6",children:"For interviews, visuals or press visits."}),l.jsx("p",{className:"text-charcoal-soft mb-6",children:"Our communications team welcomes journalists, editors and storytellers wishing to discover Magic Camps."}),l.jsx("a",{href:"mailto:[email protected]",className:"font-serif text-lg text-charcoal hover:text-copper transition-colors",children:"[email protected]"})]})}),l.jsx("section",{className:"bg-sand py-24 md:py-32",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[l.jsx("p",{className:"text-copper text-xs tracking-[0.3em] uppercase mb-5",children:"Discover Magic Camps"}),l.jsxs("h2",{className:"font-serif font-light text-3xl md:text-5xl text-charcoal leading-tight mb-8",children:["Step into the ",l.jsx("span",{className:"italic",children:"magic of the desert."})]}),l.jsx("div",{className:"copper-line mx-auto mb-10"}),l.jsx("p",{className:"text-charcoal-soft leading-relaxed mb-12",children:"From private desert stays to exclusive camp experiences in Oman and the UAE, Magic Camps invites travellers to discover the desert with privacy, comfort and soul."}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[l.jsx(ke,{to:"/magic-camps",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium border border-charcoal text-charcoal hover:bg-copper hover:border-copper hover:text-sand transition-all duration-500",children:"Explore the Camps"}),l.jsx(ke,{to:"/contact",className:"inline-flex items-center justify-center px-10 py-4 text-[11px] tracking-[0.3em] uppercase font-medium bg-copper border border-copper text-sand hover:bg-copper-dark transition-all duration-500",children:"Enquire"})]})]})}),l.jsx(wt,{})]})),tB="/assets/contact-hero-BiNABATM.jpg",nB=()=>(w.useEffect(()=>{window.scrollTo(0,0)},[]),l.jsxs("div",{children:[l.jsx(yt,{path:"/contact",...vt["/contact"]}),l.jsx(xt,{}),l.jsx(tr,{image:tB,imageAlt:"Magic Camps tent under a starlit desert sky",eyebrow:"Magic Camps",title:l.jsxs(l.Fragment,{children:["Begin your ",l.jsx("span",{className:"font-medium italic",children:"journey"})]})}),l.jsx("main",{children:l.jsx(Lk,{})}),l.jsx(wt,{})]})),rB=()=>{const e=On();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),l.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),l.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},sB=[{title:"Data controller",body:l.jsxs("p",{children:["This website is operated by Magic Camps Wahiba Sands. For any privacy question, contact us at"," ",l.jsx("a",{className:"underline underline-offset-4 hover:text-copper",href:"mailto:[email protected]",children:"[email protected]"}),"."]})},{title:"Necessary storage",body:l.jsx("p",{children:"We use strictly necessary browser storage to operate the site and remember your cookie choice. It cannot be switched off."})},{title:"Optional analytics",body:l.jsx("p",{children:"With your consent, we measure site usage in aggregate to understand which pages are useful and improve the experience."})},{title:"Optional marketing",body:l.jsx("p",{children:"With your consent, advertising partners may measure the effectiveness of our campaigns and show more relevant content."})},{title:"Google Tag Manager and Google Analytics",body:l.jsx("p",{children:"We use Google Tag Manager to manage measurement tags. Google Analytics only stores cookies if you accept analytics. Google Consent Mode respects your choice before any tag runs."})},{title:"Bookings with Cloudbeds",body:l.jsx("p",{children:"Online reservations are handled by Cloudbeds, our booking technology provider, on its own domain. When you follow a booking link we pass only your cookie choice (for example âallâ or ânoneâ), never personal data."})},{title:"Data collected during booking",body:l.jsx("p",{children:"To process a reservation we collect details such as your name, contact information, stay dates, number of guests, special requests and payment information handled by the provider."})},{title:"Retention",body:l.jsx("p",{children:"We keep personal data only as long as needed for your stay and for our operational, accounting and legal obligations."})},{title:"Your rights",body:l.jsx("p",{children:"Subject to applicable law, you may request access, correction, deleti
174on or restriction of your data, and object to certain processing, by writing to [email protected]."})},{title:"Changing your cookie choices",body:l.jsxs("p",{children:["You can change your choice at any time via âCookie settingsâ in the footer, or"," ",l.jsx("button",{type:"button",onClick:Vk,className:"underline underline-offset-4 hover:text-copper focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-copper",children:"open cookie settings now"}),"."]})}],iB=()=>l.jsxs("div",{children:[l.jsx(yt,{path:"/privacy",...vt["/privacy"]}),l.jsx(xt,{}),l.jsx("main",{className:"bg-sand pt-40 pb-24",children:l.jsxs("div",{className:"max-w-3xl mx-auto px-6",children:[l.jsx("p",{className:"text-copper text-sm tracking-[0.3em] uppercase mb-6",children:"Privacy"}),l.jsx("h1",{className:"font-serif font-light text-4xl md:text-6xl text-charcoal mb-12",children:"Privacy & cookies"}),l.jsx("div",{className:"space-y-10 text-charcoal/80 leading-relaxed",children:sB.map(e=>l.jsxs("section",{children:[l.jsx("h2",{className:"font-serif text-2xl text-charcoal mb-3",children:e.title}),e.body]},e.title))})]})}),l.jsx(wt,{})]});var Zd="focusScope.autoFocusOnMount",eh="focusScope.autoFocusOnUnmount",e0={bubbles:!1,cancelable:!0},aB="FocusScope",sC=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[o,c]=w.useState(null),u=Nn(s),d=Nn(i),h=w.useRef(null),f=qe(t,m=>c(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(x){if(p.paused||!o)return;const S=x.target;o.contains(S)?h.current=S:pr(h.current,{select:!0})},b=function(x){if(p.paused||!o)return;const S=x.relatedTarget;S!==null&&(o.contains(S)||pr(h.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const j of x)j.removedNodes.length>0&&pr(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(g);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[r,o,p.paused]),w.useEffect(()=>{if(o){n0.add(p);const m=document.activeElement;if(!o.contains(m)){const g=new CustomEvent(Zd,e0);o.addEventListener(Zd,u),o.dispatchEvent(g),g.defaultPrevented||(oB(hB(iC(o)),{select:!0}),document.activeElement===m&&pr(o))}return()=>{o.removeEventListener(Zd,u),setTimeout(()=>{const g=new CustomEvent(eh,e0);o.addEventListener(eh,d),o.dispatchEvent(g),g.defaultPrevented||pr(m??document.body,{select:!0}),o.removeEventListener(eh,d),n0.remove(p)},0)}}},[o,u,d,p]);const v=w.useCallback(m=>{if(!n&&!r||p.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(b&&g){const y=m.currentTarget,[x,S]=lB(y);x&&S?!m.shiftKey&&g===S?(m.preventDefault(),n&&pr(x,{select:!0})):m.shiftKey&&g===x&&(m.preventDefault(),n&&pr(S,{select:!0})):g===y&&m.preventDefault()}},[n,r,p.paused]);return l.jsx(Ce.div,{tabIndex:-1,...a,ref:f,onKeyDown:v})});sC.displayName=aB;function oB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pr(r,{select:t}),document.activeElement!==n)return}function lB(e){const t=iC(e),n=t0(t,e),r=t0(t.reverse(),e);return[n,r]}function iC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function t0(e,t){for(const n of e)if(!cB(n,{upTo:t}))return n}function cB(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 uB(e){return e instanceof HTMLInputElement&&"select"in e}function pr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uB(e)&&t&&e.select()}}var n0=dB();function dB(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=r0(e,t),e.unshift(t)},remove(t){var n;e=r0(e,t),(n=e[0])==null||n.resume()}}}function r0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hB(e){return e.filter(t=>t.tagName!=="A")}var th=0;function fB(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??s0()),document.body.insertAdjacentElement("beforeend",e[1]??s0()),th++,()=>{th===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),th--}},[])}function s0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 174-189
174style.position="fixed",e.style.pointerEvents="none",e}var Cn=function(){return Cn=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Cn.apply(this,arguments)};function aC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function pB(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ac="right-scroll-bar-position",oc="width-before-scroll-bar",mB="with-scroll-bars-hidden",gB="--removed-body-scroll-bar-size";function nh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yB(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var vB=typeof window<"u"?w.useLayoutEffect:w.useEffect,i0=new WeakMap;function xB(e,t){var n=yB(null,function(r){return e.forEach(function(s){return nh(s,r)})});return vB(function(){var r=i0.get(n);if(r){var s=new Set(r),i=new Set(e),a=n.current;s.forEach(function(o){i.has(o)||nh(o,null)}),i.forEach(function(o){s.has(o)||nh(o,a)})}i0.set(n,e)},[e]),n}function wB(e){return e}function bB(e,t){t===void 0&&(t=wB);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(o){return i(o)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return s}function SB(e){e===void 0&&(e={});var t=bB(null);return t.options=Cn({async:!0,ssr:!1},e),t}var oC=function(e){var t=e.sideCar,n=aC(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 w.createElement(r,Cn({},n))};oC.isSideCarExport=!0;function jB(e,t){return e.useMedium(t),oC}var lC=SB(),rh=function(){},Vu=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:rh,onWheelCapture:rh,onTouchMoveCapture:rh}),s=r[0],i=r[1],a=e.forwardProps,o=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noRelative,v=e.noIsolation,m=e.inert,b=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,x=e.gapMode,S=aC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=f,k=xB([n,t]),C=Cn(Cn({},S),s);return w.createElement(w.Fragment,null,d&&w.createElement(j,{sideCar:lC,removeScrollBar:u,shards:h,noRelative:p,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:x}),a?w.cloneElement(w.Children.only(o),Cn(Cn({},C),{ref:k})):w.createElement(y,Cn({},C,{className:c,ref:k}),o))});Vu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vu.classNames={fullWidth:oc,zeroRight:ac};var kB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kB();return t&&e.setAttribute("nonce",t),e}function EB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function TB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _B=function(){var e=0,t=null;return{add:function(n){e==0&&(t=CB())&&(EB(t,n),TB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},NB=function(){var e=_B();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cC=function(){var e=NB(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},AB={left:0,top:0,right:0,gap:0},sh=function(e){return parseInt(e||"",10)||0},PB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[sh(n),sh(r),sh(s)]},RB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return AB;var t=PB(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])}},OB=cC(),_i="data-scroll-locked",MB=function(e,t,n,r){var s=e.left,i=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),` 175 .`.concat(mB,` { 176 overflow: hidden `).concat(r,`; 177 padding-right: `).concat(o,"px ").concat(r,`; 178 } 179 body[`).concat(_i,`] { 180 overflow: hidden `).concat(r,`; 181 overscroll-behavior: contain; 182 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 183 padding-left: `.concat(s,`px; 184 padding-top: `).concat(i,`px; 185 padding-right: `).concat(a,`px; 186 margin-left:0; 187 margin-top:0; 188 margin-right: `).concat(o,"px ").concat(r,`; 189 `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";
189")].filter(Boolean).join(""),` 190 } 191 192 .`).concat(ac,` { 193 right: `).concat(o,"px ").concat(r,`; 194 } 195 196 .`).concat(oc,` { 197 margin-right: `).concat(o,"px ").concat(r,`; 198 } 199 200 .`).concat(ac," .").concat(ac,` { 201 right: 0 `).concat(r,`; 202 } 203 204 .`).concat(oc," .").concat(oc,` { 205 margin-right: 0 `).concat(r,`; 206 } 207 208 body[`).concat(_i,`] { 209 `).concat(gB,": ").concat(o,`px; 210 } 211`)},a0=function(){var e=parseInt(document.body.getAttribute(_i)||"0",10);return isFinite(e)?e:0},IB=function(){w.useEffect(function(){return document.body.setAttribute(_i,(a0()+1).toString()),function(){var e=a0()-1;e<=0?document.body.removeAttribute(_i):document.body.setAttribute(_i,e.toString())}},[])},DB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;IB();var i=w.useMemo(function(){return RB(s)},[s]);return w.createElement(OB,{styles:MB(i,!t,s,n?"":"!important")})},ep=!1;if(typeof window<"u")try{var Pl=Object.defineProperty({},"passive",{get:function(){return ep=!0,!0}});window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{ep=!1}var Js=ep?{passive:!1}:!1,LB=function(e){return e.tagName==="TEXTAREA"},uC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LB(e)&&n[t]==="visible")},$B=function(e){return uC(e,"overflowY")},FB=function(e){return uC(e,"overflowX")},o0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=dC(e,r);if(s){var i=hC(e,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},BB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},VB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dC=function(e,t){return e==="v"?$B(t):FB(t)},hC=function(e,t){return e==="v"?BB(t):VB(t)},UB=function(e,t){return e==="h"&&t==="rtl"?-1:1},zB=function(e,t,n,r,s){var i=UB(e,window.getComputedStyle(t).direction),a=i*r,o=n.target,c=t.contains(o),u=!1,d=a>0,h=0,f=0;do{if(!o)break;var p=hC(e,o),v=p[0],m=p[1],b=p[2],g=m-b-i*v;(v||g)&&dC(e,o)&&(h+=g,f+=v);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},Rl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},l0=function(e){return[e.deltaX,e.deltaY]},c0=function(e){return e&&"current"in e?e.current:e},WB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},HB=function(e){return` 212 .block-interactivity-`.concat(e,` {pointer-events: none;} 213 .allow-interactivity-`).concat(e,` {pointer-events: all;} 214`)},qB=0,Ys=[];function KB(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),s=w.useState(qB++)[0],i=w.useState(cC)[0],a=w.useRef(e);w.useEffect(function(){a.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=pB([e.lockRef.current],(e.shards||[]).map(c0),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var o=w.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var g=Rl(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-g[0],S="deltaY"in m?m.deltaY:y[1]-g[1],j,k=m.target,C=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&C==="h"&&k.type==="range")return!1;var E=o0(C,k);if(!E)return!0;if(E?j=C:(j=C==="v"?"h":"v",E=o0(C,k)),!E)return!1;if(!r.current&&"changedTouches"in m&&(x||S)&&(r.current=j),!j)return!0;var N=r.current||j;return zB(N,b,m,N==="h"?x:S,!0)},[]),c=w.useCallback(function(m){var b=m;if(!(!Ys.length||Ys[Ys.length-1]!==i)){var g="deltaY"in b?l0(b):Rl(b),y=t.current.filter(function(j){return j.name===b.type&&(j.target===b.target||b.target===j.shadowParent)&&WB(j.delta,g)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}
vendor: 4,333 bytes, line 214
214if(!y){var x=(a.current.shards||[]).map(c0).filter(Boolean).filter(function(j){return j.contains(b.target)}),S=x.length>0?o(b,x[0]):!a.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=w.useCallback(function(m,b,g,y){var x={name:m,delta:b,target:g,should:y,shadowParent:GB(g)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),d=w.useCallback(function(m){n.current=Rl(m),r.current=void 0},[]),h=w.useCallback(function(m){u(m.type,l0(m),m.target,o(m,e.lockRef.current))},[]),f=w.useCallback(function(m){u(m.type,Rl(m),m.target,o(m,e.lockRef.current))},[]);w.useEffect(function(){return Ys.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Js),document.addEventListener("touchmove",c,Js),document.addEventListener("touchstart",d,Js),function(){Ys=Ys.filter(function(m){return m!==i}),document.removeEventListener("wheel",c,Js),document.removeEventListener("touchmove",c,Js),document.removeEventListener("touchstart",d,Js)}},[]);var p=e.removeScrollBar,v=e.inert;return w.createElement(w.Fragment,null,v?w.createElement(i,{styles:HB(s)}):null,p?w.createElement(DB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const JB=jB(lC,KB);var fC=w.forwardRef(function(e,t){return w.createElement(Vu,Cn({},e,{ref:t,sideCar:JB}))});fC.classNames=Vu.classNames;var YB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qs=new WeakMap,Ol=new WeakMap,Ml={},ih=0,pC=function(e){return e&&(e.host||pC(e.parentNode))},QB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pC(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})},XB=function(e,t,n,r){var s=QB(t,Array.isArray(e)?e:[e]);Ml[n]||(Ml[n]=new WeakMap);var i=Ml[n],a=[],o=new Set,c=new Set(s),u=function(h){!h||o.has(h)||(o.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(o.has(f))d(f);else try{var p=f.getAttribute(r),v=p!==null&&p!=="false",m=(Qs.get(f)||0)+1,b=(i.get(f)||0)+1;Qs.set(f,m),i.set(f,b),a.push(f),m===1&&v&&Ol.set(f,!0),b===1&&f.setAttribute(n,"true"),v||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return d(t),o.clear(),ih++,function(){a.forEach(function(h){var f=Qs.get(h)-1,p=i.get(h)-1;Qs.set(h,f),i.set(h,p),f||(Ol.has(h)||h.removeAttribute(r),Ol.delete(h)),p||h.removeAttribute(n)}),ih--,ih||(Qs=new WeakMap,Qs=new WeakMap,Ol=new WeakMap,Ml={})}},ZB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=YB(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),XB(r,s,n,"aria-hidden")):function(){return null}},Uu="Dialog",[mC,MV]=Zi(Uu),[eV,hn]=mC(Uu),gC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,o=w.useRef(null),c=w.useRef(null),[u,d]=Qp({prop:r,defaultProp:s??!1,onChange:i,caller:Uu});return l.jsx(eV,{scope:t,triggerRef:o,contentRef:c,contentId:Cd(),titleId:Cd(),descriptionId:Cd(),open:u,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(h=>!h),[d]),modal:a,children:n})};gC.displayName=Uu;var yC="DialogTrigger",tV=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hn(yC,n),i=qe(t,s.triggerRef);return l.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":rg(s.open),...r,ref:i,onClick:he(e.onClick,s.onOpenToggle)})});tV.displayName=yC;var tg="DialogPortal",[nV,vC]=mC(tg,{forceMount:void 0}),xC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=hn(tg,t);return l.jsx(nV,{scope:t,forceMount:n,children:w.Children.map(r,a=>l.jsx(ea,{present:n||i.open,children:l.jsx(Yp,{asChild:!0,container:s,children:a})}))})};xC.displayName=tg;var nu="DialogOverlay",wC=w.forwardRef((e,t)=>{const n=vC(nu,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=hn(nu,e.__scopeDialog);return i.modal?l.jsx(ea,{present:r||i.open,children:l.jsx(sV,{...s,ref:t})}):null});wC.displayName=nu;var rV=Oc("DialogOverlay.RemoveScroll"),sV=w.forwardRef((e,t)=>
vendor: 4,628 bytes, lines 214-218
214{const{__scopeDialog:n,...r}=e,s=hn(nu,n);return l.jsx(fC,{as:rV,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(Ce.div,{"data-state":rg(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Os="DialogContent",bC=w.forwardRef((e,t)=>{const n=vC(Os,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=hn(Os,e.__scopeDialog);return l.jsx(ea,{present:r||i.open,children:i.modal?l.jsx(iV,{...s,ref:t}):l.jsx(aV,{...s,ref:t})})});bC.displayName=Os;var iV=w.forwardRef((e,t)=>{const n=hn(Os,e.__scopeDialog),r=w.useRef(null),s=qe(t,n.contentRef,r);return w.useEffect(()=>{const i=r.current;if(i)return ZB(i)},[]),l.jsx(SC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:he(e.onFocusOutside,i=>i.preventDefault())})}),aV=w.forwardRef((e,t)=>{const n=hn(Os,e.__scopeDialog),r=w.useRef(!1),s=w.useRef(!1);return l.jsx(SC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),SC=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=e,o=hn(Os,n),c=w.useRef(null),u=qe(t,c);return fB(),l.jsxs(l.Fragment,{children:[l.jsx(sC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:l.jsx(xu,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":rg(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(oV,{titleId:o.titleId}),l.jsx(cV,{contentRef:c,descriptionId:o.descriptionId})]})]})}),ng="DialogTitle",jC=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hn(ng,n);return l.jsx(Ce.h2,{id:s.titleId,...r,ref:t})});jC.displayName=ng;var kC="DialogDescription",CC=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hn(kC,n);return l.jsx(Ce.p,{id:s.descriptionId,...r,ref:t})});CC.displayName=kC;var EC="DialogClose",TC=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=hn(EC,n);return l.jsx(Ce.button,{type:"button",...r,ref:t,onClick:he(e.onClick,()=>s.onOpenChange(!1))})});TC.displayName=EC;function rg(e){return e?"open":"closed"}var _C="DialogTitleWarning",[IV,NC]=O_(_C,{contentName:Os,titleName:ng,docsSlug:"dialog"}),oV=({titleId:e})=>{const t=NC(_C),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 215 216If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 217 218For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},lV="DialogDescriptionWarning",cV=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${NC(lV).contentName}}.`;return w.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},uV=gC,dV=xC,AC=wC,PC=bC,RC=jC,OC=CC,hV=TC;const fV=uV,pV=dV,MC=w.forwardRef(({className:e,...t},n)=>l.jsx(AC,{ref:n,className:at("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}));MC.displayName=AC.displayName;const IC=w.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(pV,{children:[l.jsx(MC,{}),l.jsxs(PC,{ref:r,className:at("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:rou
218nded-lg",e),...n,children:[t,l.jsxs(hV,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(Lo,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));IC.displayName=PC.displayName;const DC=({className:e,...t})=>l.jsx("div",{className:at("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DC.displayName="DialogHeader";const LC=({className:e,...t})=>l.jsx("div",{className:at("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});LC.displayName="DialogFooter";const $C=w.forwardRef(({className:e,...t},n)=>l.jsx(RC,{ref:n,className:at("text-lg font-semibold leading-none tracking-tight",e),...t}));$C.displayName=RC.displayName;const FC=w.forwardRef(({className:e,...t},n)=>l.jsx(OC,{ref:n,className:at("text-sm text-muted-foreground",e),...t}));FC.displayName=OC.displayName;function mV(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zu="Switch",[gV,DV]=Zi(zu),[yV,vV]=gV(zu),BC=w.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:a,disabled:o,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,p]=w.useState(null),v=qe(t,x=>p(x)),m=w.useRef(!1),b=f?d||!!f.closest("form"):!0,[g,y]=Qp({prop:s,defaultProp:i??!1,onChange:u,caller:zu});return l.jsxs(yV,{scope:n,checked:g,disabled:o,children:[l.jsx(Ce.button,{type:"button",role:"switch","aria-checked":g,"aria-required":a,"data-state":WC(g),"data-disabled":o?"":void 0,disabled:o,value:c,...h,ref:v,onClick:he(e.onClick,x=>{y(S=>!S),b&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),b&&l.jsx(zC,{control:f,bubbles:!m.current,name:r,value:c,checked:g,required:a,disabled:o,form:d,style:{transform:"translateX(-100%)"}})]})});BC.displayName=zu;var VC="SwitchThumb",UC=w.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=vV(VC,n);return l.jsx(Ce.span,{"data-state":WC(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});UC.displayName=VC;var xV="SwitchBubbleInput",zC=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},i)=>{const a=w.useRef(null),o=qe(a,i),c=mV(n),u=E1(t);return w.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&p){const v=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(v)}},[c,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});zC.displayName=xV;function WC(e){return e?"checked":"unchecked"}var HC=BC,wV=UC;const lc=w.forwardRef(({className:e,...t},n)=>l.jsx(HC,{className:at("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:l.jsx(wV,{className:at("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));lc.displayName=HC.displayName;const sg="min-h-11 px-6 py-3 text-xs tracking-[0.2em] uppercase transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-copper focus-visible:ring-offset-2 focus-visible:ring-offset-sand",Il=`${sg} bg-charcoal text-sand border border-charcoal hover:bg-copper hover:border-copper`,bV=`${sg} text-charcoal underline underline-offset-4 hover:text-copper`,SV=()=>{const e=w.useSyncExternalStore(c5,Qd,()=>null),[t,n]=w.useState(!1),[r,s]=w.useState(!1),[i,a]=w.useState(!1),o=w.useRef(null),c=w.useRef(null),u=()=>{const p=document.activeElement;o.current=p instanceof HTMLElement&&p!==document.body?p:null},d=p=>{p.preventDefault();const v=o.current,m=(v==null?void 0:v.dataset.consentOpener)==="manage",b=()=>
218v&&v.isConnected&&!m?v:c.current&&c.current.isConnected?c.current:document.querySelector('[data-consent-opener="manage"]');requestAnimationFrame(()=>{const g=b();if(g){g.focus();return}setTimeout(()=>{var y;return(y=b())==null?void 0:y.focus()},0)})};w.useEffect(()=>{const p=()=>{u();const v=Qd();s((v==null?void 0:v.analytics)??!1),a((v==null?void 0:v.marketing)??!1),n(!0)};return window.addEventListener(Zf,p),()=>window.removeEventListener(Zf,p)},[]),w.useEffect(()=>{const p=m=>{const b=m.target;if(!(b instanceof Element))return;const g=b.closest('a[data-booking-cta="true"]');if(!g)return;const y=g.getAttribute("href");y&&g.setAttribute("href",h5(y,Qd()))},v=["click","auxclick","contextmenu"];return v.forEach(m=>document.addEventListener(m,p,!0)),()=>v.forEach(m=>document.removeEventListener(m,p,!0))},[]);const h=(p,v)=>{u5(p,v),n(!1)},f=()=>{u(),s((e==null?void 0:e.analytics)??!1),a((e==null?void 0:e.marketing)??!1),n(!0)};return l.jsxs(l.Fragment,{children:[!e&&!t&&l.jsx("section",{role:"region","aria-label":"Cookie consent","aria-describedby":"mc-consent-text",className:"fixed inset-x-0 bottom-0 z-[60] border-t border-charcoal/1
2185 bg-sand text-charcoal shadow-2xl",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-6 md:py-8 flex flex-col md:flex-row md:items-center gap-6",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("h2",{className:"font-serif text-2xl font-light mb-2",children:"Your privacy"}),l.jsxs("p",{id:"mc-consent-text",className:"text-sm leading-relaxed text-charcoal/80 max-w-2xl",children:["We use necessary storage to run this site. With your permission, we would also like to use analytics and marketing cookies to understand visits and improve our communication. See our"," ",l.jsx(ke,{to:"/privacy",className:"underline underline-offset-4 hover:text-copper focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-copper",children:"Privacy & Cookies"})," ","page."]})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:items-center",children:[l.jsx("button",{type:"button",className:Il,onClick:()=>h(!1,!1),children:"Reject non-essential"}),l.jsx("button",{type:"button",className:Il,onClick:()=>h(!0,!0),children:"Accept all"}),l.jsx("button",{ref:c,type:"button","data-consent-opener":"manage",className:bV,onClick:f,children:"Manage preferences"})]})]})}),l.jsx(fV,{open:t,onOpenChange:n,children:l.jsxs(IC,{className:"bg-sand text-charcoal border-charcoal/1
2185 max-h-[90dvh] overflow-y-auto",onCloseAutoFocus:d,children:[l.jsxs(DC,{children:[l.jsx($C,{className:"font-serif text-2xl font-light",children:"Cookie preferences"}),l.jsx(FC,{className:"text-charcoal/75",children:"Choose which optional storage we may use. You can change this at any time via âCookie settingsâ in the footer."})]}),l.jsxs("div",{className:"divide-y divide-charcoal/10",children:[l.jsxs("div",{className:"py-4 flex items-start justify-between gap-6",children:[l.jsxs("div",{children:[l.jsx("p",{id:"mc-necessary-label",className:"font-medium",children:"Necessary"}),l.jsx("p",{className:"text-sm text-charcoal/75 mt-1",children:"Required for the site to work and to remember your cookie choice. Always on."})]}),l.jsx(lc,{checked:!0,disabled:!0,"aria-labelledby":"mc-necessary-label"})]}),l.jsxs("div",{className:"py-4 flex items-start justify-between gap-6",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"mc-analytics",className:"font-medium",children:"Analytics"}),l.jsx("p",{id:"mc-analytics-desc",className:"text-sm text-charcoal/75 mt-1",children:"Helps us understand how visitors use the site (e.g. Google Analytics via Google Tag Manager), so we can improve it."})]}),l.jsx(lc,{id:"mc-analytics",checked:r,onCheckedChange:s,"aria-describedby":"mc-analytics-desc"})]}),l.jsxs("div",{className:"py-4 flex items-start justify-between gap-6",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"mc-marketing",className:"font-medium",children:"Marketing"}),l.jsx("p",{id:"mc-marketing-desc",className:"text-sm text-charcoal/75 mt-1",children:"Allows advertising partners to measure campaigns and show more relevant content."})]}),l.jsx(lc,{id:"mc-marketing",checked:i,onCheckedChange:a,"aria-describedby":"mc-marketing-desc"})]})]}),l.jsxs(LC,{className:"gap-3 sm:gap-3",children:[l.jsx("button",{type:"button",className:Il,onClick:()=>h(!1,!1),children:"Reject non-essential"}),l.jsx("button",{type:"button",className:Il,onClick:()=>h(!0,!0),children:"Accept all"}),l.jsx("button",{type:"button",className:`${sg} border border-charcoal text-charcoal hover:bg-charcoal hover:text-sand`,onClick:()=>h(r,i),children:"Save preferences"})]})]})})]})},jV=()=>l.jsx(ke,{to:"/contact",className:"fixed bottom-5 right-5 z-50 inline-flex items-center justify-center px-6 py-3 text-xs tracking-[0.2em] uppercase bg-copper text-sand border border-copper hover:bg-charcoal hover:text-sand transition-all duration-500 rounded-sm shadow-lg shadow-charcoal/20 ring-2 ring-sand/80",children:"Contact Us"}),kV=new HR,CV=()=>l.jsx(KR,{client:kV,children:l.jsxs(bR,{children:[l.jsx(gA,{}),l.jsx(GA,{}),l.jsxs(zO,{children:[l.jsx(jV,{}),l.jsx(SV,{}),l.jsxs(DO,{children:[l.jsx(Ie,{path:"/",element:l.jsx(f5,{})}),l.jsx(Ie,{path:"/story",element:l.jsx(k5,{})}),l.jsx(Ie,{path:"/magic-camps",element:l.jsx(M5,{})}),l.jsx(Ie,{path:"/magic-collection",element:l.jsx($5,{})}),l.jsx(Ie,{path:"/accommodation",element:l.jsx(EF,{})}),l.jsx(Ie,{path:"/camp-life",element:l.jsx(RF,{})}),l.jsx(Ie,{path:"/gastronomy",element:l.jsx(BF,{})}),l.jsx(Ie,{path:"/wellness",element:l.jsx(UF,{})}),l.jsx(Ie,{path:"/sustainability",element:l.jsx(QF,{})}),l.jsx(Ie,{path:"/gallery",element:l.jsx(cF,{})}),l.jsx(Ie,{path:"/press",element:l.jsx(eB,{})}),l.jsx(Ie,{path:"/contact",element:l.jsx(nB,{})}),l.jsx(Ie,{path:"/privacy",element:l.jsx(iB,{})}),l.jsx(Ie,{path:"/camp-activities",element:l.jsx(vF,{})}),l.jsx(Ie,{path:"/the-tents-1",element:l.jsx(ev,{to:"/accommodation",replace:!0})}),l.jsx(Ie,{path:"/the-location",element:l.jsx(ev,{to:"/#location",replace:!0})}),l.jsx(Ie,{path:"*",element:l.jsx(rB,{})})]})]})]})});Rb(document.getElementById("root")).render(l.jsx(CV,{}));
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.