vendor: 4,303 bytes, lines 1-9
1var wC=Object.defineProperty;var fx=e=>{throw TypeError(e)};var jC=(e,t,n)=>t in e?wC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var or=(e,t,n)=>jC(e,typeof t!="symbol"?t+"":t,n),fh=(e,t,n)=>t.has(e)||fx("Cannot "+n);var C=(e,t,n)=>(fh(e,t,"read from private field"),n?n.call(e):t.get(e)),ne=(e,t,n)=>t.has(e)?fx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(fh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ae=(e,t,n)=>(fh(e,t,"access private method"),n);var ac=(e,t,n,r)=>({set _(s){H(e,t,s,n)},get _(){return C(e,t,r)}});function kC(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fw={exports:{}},bu={},Bw={exports:{}},ce={};/** 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 Wl=Symbol.for("react.element"),SC=Symbol.for("react.portal"),NC=Symbol.for("react.fragment"),_C=Symbol.for("react.strict_mode"),CC=Symbol.for("react.profiler"),TC=Symbol.for("react.provider"),EC=Symbol.for("react.context"),PC=Symbol.for("react.forward_ref"),AC=Symbol.for("react.suspense"),RC=Symbol.for("react.memo"),MC=Symbol.for("react.lazy"),mx=Symbol.iterator;function OC(e){return e===null||typeof e!="object"?null:(e=mx&&e[mx]||e["@@iterator"],typeof e=="function"?e:null)}var Uw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zw=Object.assign,Vw={};function Qo(e,t,n){this.props=e,this.context=t,this.refs=Vw,this.updater=n||Uw}Qo.prototype.isReactComponent={};Qo.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")};Qo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ww(){}Ww.prototype=Qo.prototype;function Wp(e,t,n){this.props=e,this.context=t,this.refs=Vw,this.updater=n||Uw}var Hp=Wp.prototype=new Ww;Hp.constructor=Wp;zw(Hp,Qo.prototype);Hp.isPureReactComponent=!0;var px=Array.isArray,Hw=Object.prototype.hasOwnProperty,qp={current:null},qw={key:!0,ref:!0,__self:!0,__source:!0};function Kw(e,t,n){var r,s={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Hw.call(t,r)&&!qw.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Wl,type:e,key:o,ref:a,props:s,_owner:qp.current}}function IC(e,t){return{$$typeof:Wl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Kp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wl}function DC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var gx=/\/+/g;function mh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?DC(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function Yc(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Wl:case SC:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+mh(a,0):r,px(s)?(n="",e!=null&&(n=e.replace(gx,"$&/")+"/"),Yc(s,t,n,"",function(d){return d})):s!=null&&(Kp(s)&&(s=IC(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(gx,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",px(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+mh(o,l);a+=Yc(o,t,n,c,s)}else if(c=OC(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+mh(o,l++),a+=Yc(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function lc(e,t,n){if(e==null)return e;var r=[],s=0;return Yc(e,r,"","",function(o){return t.call(n,o,s++)}),r}function LC(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 St={current:null},Jc={transition:null},$C={ReactCurrentDispatcher:St,ReactCurrentBatchConfig:Jc,ReactCurrentOwner:qp};function Gw(){throw Error("act(...) is not supported in production builds of React.")}ce.Children={map:lc,forEach:function(e,t,n){lc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return lc(e,function(){t++}),t},toArray:function(e){return lc(e,function(t){return t})||[]},only:function(e){if(!Kp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Component=Qo;ce.Fragment=NC;ce.Profiler=CC;ce.PureComponent=Wp;ce.StrictMode=_C;ce.Suspense=AC;ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$C;ce.act=Gw;ce.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=zw({},e.props),s=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=qp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Hw.call(t,c)&&!qw.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];r.children=l}return{$$typeof:Wl,type:e.type,key:s,ref:o,props:r,_owner:a}};ce.createContext=function(e){return e={$$typeof:EC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:TC,_context:e},e.Consumer=e};ce.createElement=Kw;ce.createFactory=function(e){var t=Kw.bind(null,e);return t.type=e,t};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:PC,render:e}};ce.isValidElement=Kp;ce.lazy=function(e){return{$$typeof:MC,_payload:{_status:-1,_result:e},_init:LC}};ce.memo=function(e,t){return{$$typeof:RC,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=Jc.transition;Jc.transition={};try{e()}finally{Jc.transition=t}};ce.unstable_act=Gw;ce.useCallback=function(e,t){return St.current.useCallback(e,t)};ce.useContext=function(e){return St.current.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e){return St.current.useDeferredValue(e)};ce.useEffect=function(e,t){return St.current.useEffect(e,t)};ce.useId=function(){return St.current.useId()};ce.useImperativeHandle=function(e,t,n){return St.current.useImperativeHandle(e,t,n)};ce.useInsertionEffect=function(e,t){return St.current.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return St.current.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return St.current.useMemo(e,t)};ce.useReducer=function(e,t,n){return St.current.useReducer(e,t,n)};ce.useRef=function(e){return St.current.useRef(e)};ce.useState=function(e){return St.current.useState(e)};ce.useSyncExternalStore=function(e,t,n){return St.current.useSyncExternalStore(e,t,n)};ce.useTransition=function(){return St.current.useTransition()};ce.version="18.3.1";Bw.exports=ce;var x=Bw.exports;const U=Vl(x),Gp=kC({__proto__:null,default:U},[x]);/** 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 FC=x,BC=Symbol.for("react.element"),UC=Symbol.for("react.fragment"),zC=Object.prototype.hasOwnProperty,VC=FC.__SECRET_INT
vendor: 11,393 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,WC={key:!0,ref:!0,__self:!0,__source:!0};function Yw(e,t,n){var r,s={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zC.call(t,r)&&!WC.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:BC,type:e,key:o,ref:a,props:s,_owner:VC.current}}bu.Fragment=UC;bu.jsx=Yw;bu.jsxs=Yw;Fw.exports=bu;var i=Fw.exports,Jw={exports:{}},Kt={},Qw={exports:{}},Xw={};/** 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(_,E){var D=_.length;_.push(E);e:for(;0<D;){var G=D-1>>>1,W=_[G];if(0<s(W,E))_[G]=E,_[D]=W,D=G;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var E=_[0],D=_.pop();if(D!==E){_[0]=D;e:for(var G=0,W=_.length,se=W>>>1;G<se;){var L=2*(G+1)-1,M=_[L],X=L+1,Z=_[X];if(0>s(M,D))X<W&&0>s(Z,M)?(_[G]=Z,_[X]=D,G=X):(_[G]=M,_[L]=D,G=L);else if(X<W&&0>s(Z,D))_[G]=Z,_[X]=D,G=X;else break e}}return E}function s(_,E){var D=_.sortIndex-E.sortIndex;return D!==0?D:_.id-E.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],d=[],u=1,h=null,f=3,m=!1,y=!1,p=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(_){for(var E=n(d);E!==null;){if(E.callback===null)r(d);else if(E.startTime<=_)r(d),E.sortIndex=E.expirationTime,t(c,E);else break;E=n(d)}}function j(_){if(p=!1,v(_),!y)if(n(c)!==null)y=!0,z(k);else{var E=n(d);E!==null&&q(j,E.startTime-_)}}function k(_,E){y=!1,p&&(p=!1,b(T),T=-1),m=!0;var D=f;try{for(v(E),h=n(c);h!==null&&(!(h.expirationTime>E)||_&&!F());){var G=h.callback;if(typeof G=="function"){h.callback=null,f=h.priorityLevel;var W=G(h.expirationTime<=E);E=e.unstable_now(),typeof W=="function"?h.callback=W:h===n(c)&&r(c),v(E)}else r(c);h=n(c)}if(h!==null)var se=!0;else{var L=n(d);L!==null&&q(j,L.startTime-E),se=!1}return se}finally{h=null,f=D,m=!1}}var S=!1,N=null,T=-1,R=5,P=-1;function F(){return!(e.unstable_now()-P<R)}function O(){if(N!==null){var _=e.unstable_now();P=_;var E=!0;try{E=N(!0,_)}finally{E?V():(S=!1,N=null)}}else S=!1}var V;if(typeof g=="function")V=function(){g(O)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,I=A.port2;A.port1.onmessage=O,V=function(){I.postMessage(null)}}else V=function(){w(O,0)};function z(_){N=_,S||(S=!0,V())}function q(_,E){T=w(function(){_(e.unstable_now())},E)}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(){y||m||(y=!0,z(k))},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"):R=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 E=3;break;default:E=f}var D=f;f=E;try{return _()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,E){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var D=f;f=_;try{return E()}finally{f=D}},e.unstable_scheduleCallback=function(_,E,D){var G=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?G+D:G):D=G,_){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=D+W,_={id:u++,callback:E,priorityLevel:_,startTime:D,expirationTime:W,sortIndex:-1},D>G?(_.sortIndex=D,t(d,_),n(c)===null&&_===n(d)&&(p?(b(T),T=-1):p=!0,q(j,D-G))):(_.sortIndex=W,t(c,_),y||m||(y=!0,z(k))),_},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(_){var E=f;return function(){var D=f;f=E;try{return _.apply(this,arguments)}finally{f=D}}}})(Xw);Qw.exports=Xw;var HC=Qw.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 qC=x,qt=HC;function B(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 Zw=new Set,sl={};function Si(e,t){$o(e,t),$o(e+"Capture",t)}function $o(e,t){for(sl[e]=t,e=0;e<t.length;e++)Zw.add(t[e])}var br=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rf=Object.prototype.hasOwnProperty,KC=/^[: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]*$/,yx={},xx={};function GC(e){return Rf.call(xx,e)?!0:Rf.call(yx,e)?!1:KC.test(e)?xx[e]=!0:(yx[e]=!0,!1)}function YC(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 JC(e,t,n,r){if(t===null||typeof t>"u"||YC(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 Nt(e,t,n,r,s,o,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=o,this.removeEmptyString=a}var ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ct[e]=new Nt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ct[t]=new Nt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ct[e]=new Nt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ct[e]=new Nt(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){ct[e]=new Nt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ct[e]=new Nt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ct[e]=new Nt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ct[e]=new Nt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ct[e]=new Nt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yp=/[\-:]([a-z])/g;function Jp(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(Yp,Jp);ct[t]=new Nt(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(Yp,Jp);ct[t]=new Nt(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(Yp,Jp);ct[t]=new Nt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ct[e]=new Nt(e,1,!1,e.toLowerCase(),null,!1,!1)});ct.xlinkHref=new Nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ct[e]=new Nt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qp(e,t,n,r){var s=ct.hasOwnProperty(t)?ct[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(JC(t,n,s,r)&&(n=null),r||s===null?GC(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 Tr=qC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cc=Symbol.for("react.element"),Ji=Symbol.for("react.portal"),Qi=Symbol.for("react.fragment"),Xp=Symbol.for("react.strict_mode"),Mf=Symbol.for("react.profiler"),e1=Symbol.for("react.provider"),t1=Symbol.for("react.context"),Zp=Symbol.for("react.forward_ref"),Of=Symbol.for("react.suspense"),If=Symbol.for("react.suspense_list"),eg=Symbol.for("react.memo"),Hr=Symbol.for("react.lazy"),n1=Symbol.for("react.offscreen"),vx=Symbol.iterator;function ma(e){return e===null||typeof e!="object"?null:(e=vx&&e[vx]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,ph;function Ra(e){if(ph===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ph=t&&t[1]||""}return` 34`+ph+e}var gh=!1;function yh(e,t){if(!e||gh)return"";gh=!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(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}
vendor: 5,497 bytes, lines 34-37
34catch(d){if(d&&r&&typeof d.stack=="string"){for(var s=d.stack.split(` 35`),o=r.stack.split(` 36`),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l]){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<=l);break}}}finally{gh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ra(e):""}function QC(e){switch(e.tag){case 5:return Ra(e.type);case 16:return Ra("Lazy");case 13:return Ra("Suspense");case 19:return Ra("SuspenseList");case 0:case 2:case 15:return e=yh(e.type,!1),e;case 11:return e=yh(e.type.render,!1),e;case 1:return e=yh(e.type,!0),e;default:return""}}function Df(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 Qi:return"Fragment";case Ji:return"Portal";case Mf:return"Profiler";case Xp:return"StrictMode";case Of:return"Suspense";case If:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case t1:return(e.displayName||"Context")+".Consumer";case e1:return(e._context.displayName||"Context")+".Provider";case Zp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eg:return t=e.displayName||null,t!==null?t:Df(e.type)||"Memo";case Hr:t=e._payload,e=e._init;try{return Df(e(t))}catch{}}return null}function XC(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 Df(t);case 8:return t===Xp?"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 Ss(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function r1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ZC(e){var t=r1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,o.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 dc(e){e._valueTracker||(e._valueTracker=ZC(e))}function s1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=r1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sd(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 Lf(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ss(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 i1(e,t){t=t.checked,t!=null&&Qp(e,"checked",t,!1)}function $f(e,t){i1(e,t);var n=Ss(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")?Ff(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ff(e,t.type,Ss(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wx(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 Ff(e,t,n){(t!=="number"||Sd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ma=Array.isArray;function fo(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=""+Ss(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 Bf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return Le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));
vendor: 8,494 bytes, line 37
37if(Ma(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ss(n)}}function o1(e,t){var n=Ss(t.value),r=Ss(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 kx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function a1(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 Uf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?a1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var uc,l1=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(uc=uc||document.createElement("div"),uc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=uc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function il(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ba={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},eT=["Webkit","ms","Moz","O"];Object.keys(Ba).forEach(function(e){eT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ba[t]=Ba[e]})});function c1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ba.hasOwnProperty(e)&&Ba[e]?(""+t).trim():t+"px"}function d1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=c1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var tT=Le({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 zf(e,t){if(t){if(tT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Vf(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 Wf=null;function tg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hf=null,mo=null,po=null;function Sx(e){if(e=Kl(e)){if(typeof Hf!="function")throw Error(B(280));var t=e.stateNode;t&&(t=Nu(t),Hf(e.stateNode,e.type,t))}}function u1(e){mo?po?po.push(e):po=[e]:mo=e}function h1(){if(mo){var e=mo,t=po;if(po=mo=null,Sx(e),t)for(e=0;e<t.length;e++)Sx(t[e])}}function f1(e,t){return e(t)}function m1(){}var xh=!1;function p1(e,t,n){if(xh)return e(t,n);xh=!0;try{return f1(e,t,n)}finally{xh=!1,(mo!==null||po!==null)&&(m1(),h1())}}function ol(e,t){var n=e.stateNode;if(n===null)return null;var r=Nu(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(B(231,t,typeof n));return n}var qf=!1;if(br)try{var pa={};Object.defineProperty(pa,"passive",{get:function(){qf=!0}}),window.addEventListener("test",pa,pa),window.removeEventListener("test",pa,pa)}catch{qf=!1}function nT(e,t,n,r,s,o,a,l,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(u){this.onError(u)}}var Ua=!1,Nd=null,_d=!1,Kf=null,rT={onError:function(e){Ua=!0,Nd=e}};function sT(e,t,n,r,s,o,a,l,c){Ua=!1,Nd=null,nT.apply(rT,arguments)}function iT(e,t,n,r,s,o,a,l,c){if(sT.apply(this,arguments),Ua){if(Ua){var d=Nd;Ua=!1,Nd=null}else throw Error(B(198));_d||(_d=!0,Kf=d)}}function Ni(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 g1(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 Nx(e){if(Ni(e)!==e)throw Error(B(188))}function oT(e){var t=e.alternate;if(!t){if(t=Ni(e),t===null)throw Error(B(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Nx(s),e;if(o===r)return Nx(s),t;o=o.sibling}throw Error(B(188))}if(n.return!==r.return)n=s,r=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=o;break}if(l===r){a=!0,r=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=s;break}if(l===r){a=!0,r=o,n=s;break}l=l.sibling}if(!a)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function y1(e){return e=oT(e),e!==null?x1(e):null}function x1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=x1(e);if(t!==null)return t;e=e.sibling}return null}var v1=qt.unstable_scheduleCallback,_x=qt.unstable_cancelCallback,aT=qt.unstable_shouldYield,lT=qt.unstable_requestPaint,Ue=qt.unstable_now,cT=qt.unstable_getCurrentPriorityLevel,ng=qt.unstable_ImmediatePriority,b1=qt.unstable_UserBlockingPriority,Cd=qt.unstable_NormalPriority,dT=qt.unstable_LowPriority,w1=qt.unstable_IdlePriority,wu=null,Gn=null;function uT(e){if(Gn&&typeof Gn.onCommitFiberRoot=="function")try{Gn.onCommitFiberRoot(wu,e,void 0,(e.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:mT,hT=Math.log,fT=Math.LN2;function mT(e){return e>>>=0,e===0?32:31-(hT(e)/fT|0)|0}var hc=64,fc=4194304;function Oa(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 Td(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=Oa(l):(o&=a,o!==0&&(r=Oa(o)))}else a=n&~s,a!==0?r=Oa(a):o!==0&&(r=Oa(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nn(t),s=1<<n,r|=e[n],t&=~s;return r}function pT(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 gT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Nn(o),l=1<<a,c=s[a];c===-1?(!(l&n)||l&r)&&(s[a]=pT(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Gf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function j1(){var e=hc;
vendor: 1,678 bytes, line 37
37return hc<<=1,!(hc&4194240)&&(hc=64),e}function vh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Hl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nn(t),e[t]=n}function yT(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-Nn(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function rg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ge=0;function k1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var S1,sg,N1,_1,C1,Yf=!1,mc=[],fs=null,ms=null,ps=null,al=new Map,ll=new Map,Kr=[],xT="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 Cx(e,t){switch(e){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":ms=null;break;case"mouseover":case"mouseout":ps=null;break;case"pointerover":case"pointerout":al.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ll.delete(t.pointerId)}}function ga(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Kl(t),t!==null&&sg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function vT(e,t,n,r,s){switch(t){case"focusin":return fs=ga(fs,e,t,n,r,s
vendor: 14,686 bytes, line 37
37),!0;case"dragenter":return ms=ga(ms,e,t,n,r,s),!0;case"mouseover":return ps=ga(ps,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return al.set(o,ga(al.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,ll.set(o,ga(ll.get(o)||null,e,t,n,r,s)),!0}return!1}function T1(e){var t=Ks(e.target);if(t!==null){var n=Ni(t);if(n!==null){if(t=n.tag,t===13){if(t=g1(n),t!==null){e.blockedOn=t,C1(e.priority,function(){N1(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 Qc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wf=r,n.target.dispatchEvent(r),Wf=null}else return t=Kl(n),t!==null&&sg(t),e.blockedOn=n,!1;t.shift()}return!0}function Tx(e,t,n){Qc(e)&&n.delete(t)}function bT(){Yf=!1,fs!==null&&Qc(fs)&&(fs=null),ms!==null&&Qc(ms)&&(ms=null),ps!==null&&Qc(ps)&&(ps=null),al.forEach(Tx),ll.forEach(Tx)}function ya(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,bT)))}function cl(e){function t(s){return ya(s,e)}if(0<mc.length){ya(mc[0],e);for(var n=1;n<mc.length;n++){var r=mc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(fs!==null&&ya(fs,e),ms!==null&&ya(ms,e),ps!==null&&ya(ps,e),al.forEach(t),ll.forEach(t),n=0;n<Kr.length;n++)r=Kr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Kr.length&&(n=Kr[0],n.blockedOn===null);)T1(n),n.blockedOn===null&&Kr.shift()}var go=Tr.ReactCurrentBatchConfig,Ed=!0;function wT(e,t,n,r){var s=ge,o=go.transition;go.transition=null;try{ge=1,ig(e,t,n,r)}finally{ge=s,go.transition=o}}function jT(e,t,n,r){var s=ge,o=go.transition;go.transition=null;try{ge=4,ig(e,t,n,r)}finally{ge=s,go.transition=o}}function ig(e,t,n,r){if(Ed){var s=Jf(e,t,n,r);if(s===null)Eh(e,t,r,Pd,n),Cx(e,r);else if(vT(s,e,t,n,r))r.stopPropagation();else if(Cx(e,r),t&4&&-1<xT.indexOf(e)){for(;s!==null;){var o=Kl(s);if(o!==null&&S1(o),o=Jf(e,t,n,r),o===null&&Eh(e,t,r,Pd,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Eh(e,t,r,null,n)}}var Pd=null;function Jf(e,t,n,r){if(Pd=null,e=tg(r),e=Ks(e),e!==null)if(t=Ni(e),t===null)e=null;else if(n=t.tag,n===13){if(e=g1(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 Pd=e,null}function E1(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(cT()){case ng:return 1;case b1:return 4;case Cd:case dT:return 16;case w1:return 536870912;default:return 16}default:return 16}}var ls=null,og=null,Xc=null;function P1(){if(Xc)return Xc;var e,t=og,n=t.length,r,s="value"in ls?ls.value:ls.textContent,o=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[o-r];r++);return Xc=s.slice(e,1<r?1-r:void 0)}function Zc(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 pc(){return!0}function Ex(){return!1}function Gt(e){function t(n,r,s,o,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?pc:Ex,this.isPropagationStopped=Ex,this}return Le(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=pc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pc)},persist:function(){},isPersistent:pc}),t}var Xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ag=Gt(Xo),ql=Le({},Xo,{view:0,detail:0}),kT=Gt(ql),bh,wh,xa,ju=Le({},ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lg,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!==xa&&(xa&&e.type==="mousemove"?(bh=e.screenX-xa.screenX,wh=e.screenY-xa.screenY):wh=bh=0,xa=e),bh)},movementY:function(e){return"movementY"in e?e.movementY:wh}}),Px=Gt(ju),ST=Le({},ju,{dataTransfer:0}),NT=Gt(ST),_T=Le({},ql,{relatedTarget:0}),jh=Gt(_T),CT=Le({},Xo,{animationName:0,elapsedTime:0,pseudoElement:0}),TT=Gt(CT),ET=Le({},Xo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PT=Gt(ET),AT=Le({},Xo,{data:0}),Ax=Gt(AT),RT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MT={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"},OT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=OT[e])?!!t[e]:!1}function lg(){return IT}var DT=Le({},ql,{key:function(e){if(e.key){var t=RT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?MT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lg,charCode:function(e){return e.type==="keypress"?Zc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),LT=Gt(DT),$T=Le({},ju,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rx=Gt($T),FT=Le({},ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lg}),BT=Gt(FT),UT=Le({},Xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),zT=Gt(UT),VT=Le({},ju,{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}),WT=Gt(VT),HT=[9,13,27,32],cg=br&&"CompositionEvent"in window,za=null;br&&"documentMode"in document&&(za=document.documentMode);var qT=br&&"TextEvent"in window&&!za,A1=br&&(!cg||za&&8<za&&11>=za),Mx=" ",Ox=!1;function R1(e,t){switch(e){case"keyup":return HT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function KT(e,t){switch(e){case"compositionend":return M1(t);case"keypress":return t.which!==32?null:(Ox=!0,Mx);case"textInput":return e=t.data,e===Mx&&Ox?null:e;default:return null}}function GT(e,t){if(Xi)return e==="compositionend"||!cg&&R1(e,t)?(e=P1(),Xc=og=ls=null,Xi=!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 A1&&t.locale!=="ko"?null:t.data;default:return null}}var YT={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 Ix(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!YT[e.type]:t==="textarea"}function O1(e,t,n,r){u1(r),t=Ad(t,"onChange"),0<t.length&&(n=new ag("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Va=null,dl=null;function JT(e){H1(e,0)}function ku(e){var t=to(e);if(s1(t))return e}function QT(e,t){if(e==="change")return t}var I1=!1;if(br){var kh;if(br){var Sh="oninput"in document;if(!Sh){var Dx=document.createElement("div");Dx.setAttribute("oninput","return;"),Sh=typeof Dx.oninput=="function"}kh=Sh}else kh=!1;I1=kh&&(!document.documentMode||9<document.documentMode)}function Lx(){Va&&(Va.detachEvent("onpropertychange",D1),dl=Va=null)}function D1(e){if(e.propertyName==="value"&&ku(dl)){var t=[];O1(t,dl,e,tg(e)),p1(JT,t)}}function XT(e,t,n){e==="focusin"?(Lx(),Va=t,dl=n,Va.attachEvent("onpropertychange",D1)):e==="focusout"&&Lx()}function ZT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ku(dl)}function eE(e,t){if(e==="click")return ku(t)}function tE(e,t){if(e==="input"||e==="change")return ku(t)}function nE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:nE;function ul(e,t){if(En(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(!Rf.call(t,s)||!En(e[s],t[s]))return!1}return!0}function $x(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fx(e,t){var n=$x(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=$x(n)}}function L1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $1(){for(var e=window,t=Sd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sd(e.document)}return t}function dg(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 rE(e){var t=$1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&L1(n.ownerDocument.documentElement,n)){if(r!==null&&dg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Fx(n,o);var a=Fx(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(),o>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 sE=br&&"documentMode"in document&&11>=document.documentMode,Zi=null,Qf=null,Wa=null,Xf=!1;function Bx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xf||Zi==null||Zi!==Sd(r)||(r=Zi,"selectionStart"in r&&dg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Wa&&ul(Wa,r)||(Wa=r,r=Ad(Qf,"onSelect"),0<r.length&&(t=new ag("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zi)))}function gc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var eo={animationend:gc("Animation","AnimationEnd"),animationiteration:gc("Animation","AnimationIteration"),animationstart:gc("Animation","AnimationStart"),transitionend:gc("Transition","TransitionEnd")},Nh={},F1={};br&&(F1=document.createElement("div").style,"AnimationEvent"in window||(delete eo.animationend.animation,delete eo.animationiteration.animation,delete eo.animationstart.animation),"TransitionEvent"in window||delete eo.transitionend.transition);function Su(e){if(Nh[e])return Nh[e];if(!eo[e])return e;var t=eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in F1)return Nh[e]=t[n];return e}var B1=Su("animationend"),U1=Su("animationiteration"),z1=Su("animationstart"),V1=Su("transitionend"),W1=new Map,Ux="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 As(e,t){W1.set(e,t),Si(t,[e])}for(var _h=0;_h<Ux.length;_h++){var Ch=Ux[_h],iE=Ch.toLowerCase(),oE=Ch[0].toUpperCase()+Ch.slice(1);
vendor: 5,155 bytes, line 37
37As(iE,"on"+oE)}As(B1,"onAnimationEnd");As(U1,"onAnimationIteration");As(z1,"onAnimationStart");As("dblclick","onDoubleClick");As("focusin","onFocus");As("focusout","onBlur");As(V1,"onTransitionEnd");$o("onMouseEnter",["mouseout","mouseover"]);$o("onMouseLeave",["mouseout","mouseover"]);$o("onPointerEnter",["pointerout","pointerover"]);$o("onPointerLeave",["pointerout","pointerover"]);Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Si("onBeforeInput",["compositionend","keypress","textInput","paste"]);Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ia="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(" "),aE=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ia));function zx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,iT(r,t,void 0,e),e.currentTarget=null}function H1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;zx(s,l,d),o=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,d=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;zx(s,l,d),o=c}}}if(_d)throw e=Kf,_d=!1,Kf=null,e}function Ne(e,t){var n=t[rm];n===void 0&&(n=t[rm]=new Set);var r=e+"__bubble";n.has(r)||(q1(t,e,2,!1),n.add(r))}function Th(e,t,n){var r=0;t&&(r|=4),q1(n,e,r,t)}var yc="_reactListening"+Math.random().toString(36).slice(2);function hl(e){if(!e[yc]){e[yc]=!0,Zw.forEach(function(n){n!=="selectionchange"&&(aE.has(n)||Th(n,!1,e),Th(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yc]||(t[yc]=!0,Th("selectionchange",!1,t))}}function q1(e,t,n,r){switch(E1(t)){case 1:var s=wT;break;case 4:s=jT;break;default:s=ig}n=s.bind(null,t,n,e),s=void 0,!qf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Eh(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.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(;l!==null;){if(a=Ks(l),a===null)return;if(c=a.tag,c===5||c===6){r=o=a;continue e}l=l.parentNode}}r=r.return}p1(function(){var d=o,u=tg(n),h=[];e:{var f=W1.get(e);if(f!==void 0){var m=ag,y=e;switch(e){case"keypress":if(Zc(n)===0)break e;case"keydown":case"keyup":m=LT;break;case"focusin":y="focus",m=jh;break;case"focusout":y="blur",m=jh;break;case"beforeblur":case"afterblur":m=jh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Px;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=NT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=BT;break;case B1:case U1:case z1:m=TT;break;case V1:m=zT;break;case"scroll":m=kT;break;case"wheel":m=WT;break;case"copy":case"cut":case"paste":m=PT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Rx}var p=(t&4)!==0,w=!p&&e==="scroll",b=p?f!==null?f+"Capture":null:f;p=[];for(var g=d,v;g!==null;){v=g;var j=v.stateNode;if(v.tag===5&&j!==null&&(v=j,b!==null&&(j=ol(g,b),j!=null&&p.push(fl(g,j,v)))),w)break;g=g.return}0<p.length&&(f=new m(f,y,null,n,u),h.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Wf&&(y=n.relatedTarget||n.fromElement)&&(Ks(y)||y[wr]))break e;if((m||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,m?(y=n.relatedTarget||n.toElement,m=d,y=y?Ks(y):null,y!==null&&(w=Ni(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=d),m!==y)){if(p=Px,j="onMouseLeave",b="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(p=Rx,j="onPointerLeave",b="onPointerEnter",g="pointer"),w=m==null?f:to(m),v=y==null?f:to(y),f=new p(j,g+"leave",m,n,u),f.target=w,f.relatedTarget=v,j=null,Ks(u)===d&&(p=new p(b,g+"enter",y,n,u),p.target=v,p.relatedTarget=w,j=p),w=j,m&&y)t:{for(p=m,b=y,g=0,v=p;v;v=Mi(v))g++;for(v=0,j=b;j;j=Mi(j))v++;for(;0<g-v;)p=Mi(p),g--;for(;0<v-g;)b=Mi(b),v--;for(;g--;){if(p===b||b!==null&&p===b.alternate)break t;
vendor: 7,678 bytes, lines 37-38
37p=Mi(p),b=Mi(b)}p=null}else p=null;m!==null&&Vx(h,f,m,p,!1),y!==null&&w!==null&&Vx(h,w,y,p,!0)}}e:{if(f=d?to(d):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var k=QT;else if(Ix(f))if(I1)k=tE;else{k=ZT;var S=XT}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=eE);if(k&&(k=k(e,d))){O1(h,k,n,u);break e}S&&S(e,f,d),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Ff(f,"number",f.value)}switch(S=d?to(d):window,e){case"focusin":(Ix(S)||S.contentEditable==="true")&&(Zi=S,Qf=d,Wa=null);break;case"focusout":Wa=Qf=Zi=null;break;case"mousedown":Xf=!0;break;case"contextmenu":case"mouseup":case"dragend":Xf=!1,Bx(h,n,u);break;case"selectionchange":if(sE)break;case"keydown":case"keyup":Bx(h,n,u)}var N;if(cg)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Xi?R1(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(A1&&n.locale!=="ko"&&(Xi||T!=="onCompositionStart"?T==="onCompositionEnd"&&Xi&&(N=P1()):(ls=u,og="value"in ls?ls.value:ls.textContent,Xi=!0)),S=Ad(d,T),0<S.length&&(T=new Ax(T,e,null,n,u),h.push({event:T,listeners:S}),N?T.data=N:(N=M1(n),N!==null&&(T.data=N)))),(N=qT?KT(e,n):GT(e,n))&&(d=Ad(d,"onBeforeInput"),0<d.length&&(u=new Ax("onBeforeInput","beforeinput",null,n,u),h.push({event:u,listeners:d}),u.data=N))}H1(h,t)})}function fl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ol(e,n),o!=null&&r.unshift(fl(e,o,s)),o=ol(e,t),o!=null&&r.push(fl(e,o,s))),e=e.return}return r}function Mi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Vx(e,t,n,r,s){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,d=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&d!==null&&(l=d,s?(c=ol(n,o),c!=null&&a.unshift(fl(n,c,l))):s||(c=ol(n,o),c!=null&&a.push(fl(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var lE=/\r\n?/g,cE=/\u0000|\uFFFD/g;function Wx(e){return(typeof e=="string"?e:""+e).replace(lE,` 38`).replace(cE,"")}function xc(e,t,n){if(t=Wx(t),Wx(e)!==t&&n)throw Error(B(425))}function Rd(){}var Zf=null,em=null;function tm(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 nm=typeof setTimeout=="function"?setTimeout:void 0,dE=typeof clearTimeout=="function"?clearTimeout:void 0,Hx=typeof Promise=="function"?Promise:void 0,uE=typeof queueMicrotask=="function"?queueMicrotask:typeof Hx<"u"?function(e){return Hx.resolve(null).then(e).catch(hE)}:nm;function hE(e){setTimeout(function(){throw e})}function Ph(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),cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);cl(t)}function gs(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 qx(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 Zo=Math.random().toString(36).slice(2),Hn="__reactFiber$"+Zo,ml="__reactProps$"+Zo,wr="__reactContainer$"+Zo,rm="__reactEvents$"+Zo,fE="__reactListeners$"+Zo,mE="__reactHandles$"+Zo;function Ks(e){var t=e[Hn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[wr]||n[Hn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qx(e);e!==null;){if(n=e[Hn])return n;e=qx(e)}return t}e=n,n=e.parentNode}return null}function Kl(e){return e=e[Hn]||e[wr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function to(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Nu(e){return e[ml]||null}var sm=[],no=-1;function Rs(e){return{current:e}}function Ce(e){0>no||(e.current=sm[no],sm[no]=null,no--)}function ke(e,t){no++,sm[no]=e.current,e.current=t}var Ns={},pt=Rs(Ns),Mt=Rs(!1),mi=Ns;function Fo(e,t){var n=e.type.contextTypes;if(!n)return Ns;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ot(e){return e=e.childContextTypes,e!=null}function Md(){Ce(Mt),Ce(pt)}function Kx(e,t,n){if(pt.current!==Ns)throw Error(B(168));ke(pt,t),ke(Mt,n)}function K1(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(B(108,XC(e)||"Unknown",s));return Le({},n,r)}function Od(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ns,mi=pt.current,ke(pt,e),ke(Mt,Mt.current),!0}function Gx(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=K1(e,t,mi),r.__reactInternalMemoizedMergedChildContext=e,Ce(Mt),Ce(pt),ke(pt,e)):Ce(Mt),ke(Mt,n)}var hr=null,_u=!1,Ah=!1;function G1(e){hr===null?hr=[e]:hr.push(e)}function pE(e){_u=!0,G1(e)}function Ms(){if(!Ah&&hr!==null){Ah=!0;var e=0,t=ge;try{var n=hr;for(ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}hr=null,_u=!1}catch(s){throw hr!==null&&(hr=hr.slice(e+1)),v1(ng,Ms),s}finally{ge=t,Ah=!1}}return null}var ro=[],so=0,Id=null,Dd=0,en=[],tn=0,pi=null,pr=1,gr="";function Us(e,t){ro[so++]=Dd,ro[so++]=Id,Id=e,Dd=t}function Y1(e,t,n){en[tn++]=pr,en[tn++]=gr,en[tn++]=pi,pi=e;var r=pr;e=gr;var s=32-Nn(r)-1;r&=~(1<<s),n+=1;var o=32-Nn(t)+s;if(30<o){var a=s-s%5;o=(r&(1<<a)-1).toString(32),r>>=a,s-=a,pr=1<<32-Nn(t)+s|n<<s|r,gr=o+e}else pr=1<<o|n<<s|r,gr=e}function ug(e){e.return!==null&&(Us(e,1),Y1(e,1,0))}function hg(e){for(;e===Id;)Id=ro[--so],ro[so]=null,Dd=ro[--so],ro[so]=null;for(;e===pi;)pi=en[--tn],en[tn]=null,gr=en[--tn],en[tn]=null,pr=en[--tn],en[tn]=null}var Wt=null,Vt=null,Pe=!1,kn=null;function J1(e,t){var n=nn(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 Yx(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,Wt=e,Vt=gs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pi!==null?{id:pr,overflow:gr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Vt=null,!0):!1;default:return!1}}function im(e){return(e.mode&1)!==0&&(e.flags&128)===0}function om(e){if(Pe){var t=Vt;if(t){var n=t;if(!Yx(e,t)){if(im(e))throw Error(B(418));t=gs(n.nextSibling);var r=Wt;t&&Yx(e,t)?J1(r,n):(e.flags=e.flags&-4097|2,Pe=!1,Wt=e)}}else{if(im(e))throw Error(B(418));e.flags=e.flags&-4097|2,Pe=!1,Wt=e}}}function Jx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function vc(e){if(e!==Wt)return!1;if(!Pe)return Jx(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tm(e.type,e.memoizedProps)),t&&(t=Vt)){if(im(e))throw Q1(),Error(B(418));for(;t;)J1(e,t),t=gs(t.nextSibling)}if(Jx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317)
vendor: 13,966 bytes, line 38
38);e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=gs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Wt?gs(e.stateNode.nextSibling):null;return!0}function Q1(){for(var e=Vt;e;)e=gs(e.nextSibling)}function Bo(){Vt=Wt=null,Pe=!1}function fg(e){kn===null?kn=[e]:kn.push(e)}var gE=Tr.ReactCurrentBatchConfig;function va(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(B(309));var r=n.stateNode}if(!r)throw Error(B(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=s.refs;a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,e))}return e}function bc(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qx(e){var t=e._init;return t(e._payload)}function X1(e){function t(b,g){if(e){var v=b.deletions;v===null?(b.deletions=[g],b.flags|=16):v.push(g)}}function n(b,g){if(!e)return null;for(;g!==null;)t(b,g),g=g.sibling;return null}function r(b,g){for(b=new Map;g!==null;)g.key!==null?b.set(g.key,g):b.set(g.index,g),g=g.sibling;return b}function s(b,g){return b=bs(b,g),b.index=0,b.sibling=null,b}function o(b,g,v){return b.index=v,e?(v=b.alternate,v!==null?(v=v.index,v<g?(b.flags|=2,g):v):(b.flags|=2,g)):(b.flags|=1048576,g)}function a(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,g,v,j){return g===null||g.tag!==6?(g=$h(v,b.mode,j),g.return=b,g):(g=s(g,v),g.return=b,g)}function c(b,g,v,j){var k=v.type;return k===Qi?u(b,g,v.props.children,j,v.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Hr&&Qx(k)===g.type)?(j=s(g,v.props),j.ref=va(b,g,v),j.return=b,j):(j=od(v.type,v.key,v.props,null,b.mode,j),j.ref=va(b,g,v),j.return=b,j)}function d(b,g,v,j){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Fh(v,b.mode,j),g.return=b,g):(g=s(g,v.children||[]),g.return=b,g)}function u(b,g,v,j,k){return g===null||g.tag!==7?(g=di(v,b.mode,j,k),g.return=b,g):(g=s(g,v),g.return=b,g)}function h(b,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=$h(""+g,b.mode,v),g.return=b,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case cc:return v=od(g.type,g.key,g.props,null,b.mode,v),v.ref=va(b,null,g),v.return=b,v;case Ji:return g=Fh(g,b.mode,v),g.return=b,g;case Hr:var j=g._init;return h(b,j(g._payload),v)}if(Ma(g)||ma(g))return g=di(g,b.mode,v,null),g.return=b,g;bc(b,g)}return null}function f(b,g,v,j){var k=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:l(b,g,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case cc:return v.key===k?c(b,g,v,j):null;case Ji:return v.key===k?d(b,g,v,j):null;case Hr:return k=v._init,f(b,g,k(v._payload),j)}if(Ma(v)||ma(v))return k!==null?null:u(b,g,v,j,null);bc(b,v)}return null}function m(b,g,v,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return b=b.get(v)||null,l(g,b,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case cc:return b=b.get(j.key===null?v:j.key)||null,c(g,b,j,k);case Ji:return b=b.get(j.key===null?v:j.key)||null,d(g,b,j,k);case Hr:var S=j._init;return m(b,g,v,S(j._payload),k)}if(Ma(j)||ma(j))return b=b.get(v)||null,u(g,b,j,k,null);bc(g,j)}return null}function y(b,g,v,j){for(var k=null,S=null,N=g,T=g=0,R=null;N!==null&&T<v.length;T++){N.index>T?(R=N,N=null):R=N.sibling;var P=f(b,N,v[T],j);if(P===null){N===null&&(N=R);break}e&&N&&P.alternate===null&&t(b,N),g=o(P,g,T),S===null?k=P:S.sibling=P,S=P,N=R}if(T===v.length)return n(b,N),Pe&&Us(b,T),k;if(N===null){for(;T<v.length;T++)N=h(b,v[T],j),N!==null&&(g=o(N,g,T),S===null?k=N:S.sibling=N,S=N);return Pe&&Us(b,T),k}for(N=r(b,N);T<v.length;T++)R=m(N,b,T,v[T],j),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?T:R.key),g=o(R,g,T),S===null?k=R:S.sibling=R,S=R);return e&&N.forEach(function(F){return t(b,F)}),Pe&&Us(b,T),k}function p(b,g,v,j){var k=ma(v);if(typeof k!="function")throw Error(B(150));if(v=k.call(v),v==null)throw Error(B(151));for(var S=k=null,N=g,T=g=0,R=null,P=v.next();N!==null&&!P.done;T++,P=v.next()){N.index>T?(R=N,N=null):R=N.sibling;var F=f(b,N,P.value,j);if(F===null){N===null&&(N=R);break}e&&N&&F.alternate===null&&t(b,N),g=o(F,g,T),S===null?k=F:S.sibling=F,S=F,N=R}if(P.done)return n(b,N),Pe&&Us(b,T),k;if(N===null){for(;!P.done;T++,P=v.next())P=h(b,P.value,j),P!==null&&(g=o(P,g,T),S===null?k=P:S.sibling=P,S=P);return Pe&&Us(b,T),k}for(N=r(b,N);!P.done;T++,P=v.next())P=m(N,b,T,P.value,j),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?T:P.key),g=o(P,g,T),S===null?k=P:S.sibling=P,S=P);return e&&N.forEach(function(O){return t(b,O)}),Pe&&Us(b,T),k}function w(b,g,v,j){if(typeof v=="object"&&v!==null&&v.type===Qi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case cc:e:{for(var k=v.key,S=g;S!==null;){if(S.key===k){if(k=v.type,k===Qi){if(S.tag===7){n(b,S.sibling),g=s(S,v.props.children),g.return=b,b=g;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Hr&&Qx(k)===S.type){n(b,S.sibling),g=s(S,v.props),g.ref=va(b,S,v),g.return=b,b=g;break e}n(b,S);break}else t(b,S);S=S.sibling}v.type===Qi?(g=di(v.props.children,b.mode,j,v.key),g.return=b,b=g):(j=od(v.type,v.key,v.props,null,b.mode,j),j.ref=va(b,g,v),j.return=b,b=j)}return a(b);case Ji:e:{for(S=v.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(b,g.sibling),g=s(g,v.children||[]),g.return=b,b=g;break e}else{n(b,g);break}else t(b,g);g=g.sibling}g=Fh(v,b.mode,j),g.return=b,b=g}return a(b);case Hr:return S=v._init,w(b,g,S(v._payload),j)}if(Ma(v))return y(b,g,v,j);if(ma(v))return p(b,g,v,j);bc(b,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(b,g.sibling),g=s(g,v),g.return=b,b=g):(n(b,g),g=$h(v,b.mode,j),g.return=b,b=g),a(b)):n(b,g)}return w}var Uo=X1(!0),Z1=X1(!1),Ld=Rs(null),$d=null,io=null,mg=null;function pg(){mg=io=$d=null}function gg(e){var t=Ld.current;Ce(Ld),e._currentValue=t}function am(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 yo(e,t){$d=e,mg=io=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Rt=!0),e.firstContext=null)}function an(e){var t=e._currentValue;if(mg!==e)if(e={context:e,memoizedValue:t,next:null},io===null){if($d===null)throw Error(B(308));io=e,$d.dependencies={lanes:0,firstContext:e}}else io=io.next=e;return t}var Gs=null;function yg(e){Gs===null?Gs=[e]:Gs.push(e)}function ej(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,yg(t)):(n.next=s.next,s.next=n),t.interleaved=n,jr(e,r)}function jr(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 qr=!1;function xg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tj(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 xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ys(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,he&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,jr(e,n)}return s=r.interleaved,s===null?(t.next=t,yg(r)):(t.next=s.next,s.next=t),r.interleaved=t,jr(e,n)}function ed(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,rg(e,n)}}function Xx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fd(e,t,n,r){var s=e.updateQueue;qr=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,d=c.next;c.next=null,a===null?o=d:a.next=d,a=c;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==a&&(l===null?u.firstBaseUpdate=d:l.next=d,u.lastBaseUpdate=c))}if(o!==null){var h=s.baseState;a=0,u=d=c=null,l=o;do{var f=l.lane,m=l.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,p=l;switch(f=t,m=n,p.tag){case 1:if(y=p.payload,typeof y=="function"){h=y.call(m,h,f);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,f=typeof y=="function"?y.call(m,h,f):y,f==null)break e;h=Le({},h,f);break e;case 2:qr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else m={eventTime:m,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(d=u=m,c=h):u=u.next=m,a|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(u===null&&(c=h),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);yi|=a,e.lanes=a,e.memoizedState=h}}function Zx(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(B(191,s));s.call(r)}}}var Gl={},Yn=Rs(Gl),pl=Rs(Gl),gl=Rs(Gl);function Ys(e){if(e===Gl)throw Error(B(174));return e}function vg(e,t){switch(ke(gl,t),ke(pl,e),ke(Yn,Gl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Uf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Uf(t,e)}Ce(Yn),ke(Yn,t)}function zo(){Ce(Yn),Ce(pl),Ce(gl)}function nj(e){Ys(gl.current);var t=Ys(Yn.current),n=Uf(t,e.type);t!==n&&(ke(pl,e),ke(Yn,n))}function bg(e){pl.current===e&&(Ce(Yn),Ce(pl))}var Ie=Rs(0);function Bd(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 Rh=[];function wg(){for(var e=0;e<Rh.length;e++)Rh[e]._workInProgressVersionPrimary=null;Rh.length=0}var td=Tr.ReactCurrentDispatcher,Mh=Tr.ReactCurrentBatchConfig,gi=0,De=null,Ye=null,Ze=null,Ud=!1,Ha=!1,yl=0,yE=0;function ut(){throw Error(B(321))}function jg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function kg(e,t,n,r,s,o){if(gi=o,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,td.current=e===null||e.memoizedState===null?wE:jE,e=n(r,s),Ha){o=0;do{if(Ha=!1,yl=0,25<=o)throw Error(B(301));o+=1,Ze=Ye=null,t.updateQueue=null,td.current=kE,e=n(r,s)}while(Ha)}if(td.current=zd,t=Ye!==null&&Ye.next!==null,gi=0,Ze=Ye=De=null,Ud=!1,t)throw Error(B(300));return e}function Sg(){var e=yl!==0;return yl=0,e}function Ln(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?De.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function ln(){if(Ye===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Ze===null?De.memoizedState:Ze.next;if(t!==null)Ze=t,Ye=e;else{if(e===null)throw Error(B(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Ze===null?De.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function xl(e,t){return typeof t=="function"?t(e):t}function Oh(e){var t=ln(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=Ye,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=a=null,c=null,d=o;do{var u=d.lane;if((gi&u)===u)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(l=c=h,a=r):c=c.next=h,De.lanes|=u,yi|=u}d=d.next}while(d!==null&&d!==o);c===null?a=r:c.next=l,En(r,t.memoizedState)||(Rt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,De.lanes|=o,yi|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ih(e){var t=ln(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do o=e(o,a.action),a=a.next;while(a!==s);En(o,t.memoizedState)||(Rt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function rj(){}function sj(e,t){var n=De,r=ln(),s=t(),o=!En(r.memoizedState,s);if(o&&(r.memoizedState=s,Rt=!0),r=r.queue,Ng(aj.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ze!==null&&Ze.memoizedState.tag&1){if(n.flags|=2048,vl(9,oj.bind(null,n,r,s,t),void 0,null),tt===null)throw Error(B(349));
vendor: 4,230 bytes, line 38
38gi&30||ij(n,t,s)}return s}function ij(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function oj(e,t,n,r){t.value=n,t.getSnapshot=r,lj(t)&&cj(e)}function aj(e,t,n){return n(function(){lj(t)&&cj(e)})}function lj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function cj(e){var t=jr(e,1);t!==null&&_n(t,e,1,-1)}function ev(e){var t=Ln();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xl,lastRenderedState:e},t.queue=e,e=e.dispatch=bE.bind(null,De,e),[t.memoizedState,e]}function vl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.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 dj(){return ln().memoizedState}function nd(e,t,n,r){var s=Ln();De.flags|=e,s.memoizedState=vl(1|t,n,void 0,r===void 0?null:r)}function Cu(e,t,n,r){var s=ln();r=r===void 0?null:r;var o=void 0;if(Ye!==null){var a=Ye.memoizedState;if(o=a.destroy,r!==null&&jg(r,a.deps)){s.memoizedState=vl(t,n,o,r);return}}De.flags|=e,s.memoizedState=vl(1|t,n,o,r)}function tv(e,t){return nd(8390656,8,e,t)}function Ng(e,t){return Cu(2048,8,e,t)}function uj(e,t){return Cu(4,2,e,t)}function hj(e,t){return Cu(4,4,e,t)}function fj(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 mj(e,t,n){return n=n!=null?n.concat([e]):null,Cu(4,4,fj.bind(null,t,e),n)}function _g(){}function pj(e,t){var n=ln();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gj(e,t){var n=ln();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yj(e,t,n){return gi&21?(En(n,t)||(n=j1(),De.lanes|=n,yi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Rt=!0),e.memoizedState=n)}function xE(e,t){var n=ge;ge=n!==0&&4>n?n:4,e(!0);var r=Mh.transition;Mh.transition={};try{e(!1),t()}finally{ge=n,Mh.transition=r}}function xj(){return ln().memoizedState}function vE(e,t,n){var r=vs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vj(e))bj(t,n);else if(n=ej(e,t,n,r),n!==null){var s=jt();_n(n,e,r,s),wj(n,t,r)}}function bE(e,t,n){var r=vs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vj(e))bj(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(s.hasEagerState=!0,s.eagerState=l,En(l,a)){var c=t.interleaved;c===null?(s.next=s,yg(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=ej(e,t,s,r),n!==null&&(s=jt(),_n(n,e,r,s),wj(n,t,r))}}function vj(e){var t=e.alternate;return e===De||t!==null&&t===De}function bj(e,t){Ha=Ud=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rg(e,n)}}var zd={readContext:an,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},wE={readContext:an,useCallback:function(e,t){return Ln().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:tv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nd(4194308,4,fj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nd(4194308,4,e,t)},useInsertionEffect:function(e,t){return nd(4,2,e,t)},useMemo:function(e,t){var n=Ln();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ln();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=vE.bind(null,De,e),[r.memoizedState,e]}
vendor: 5,548 bytes, lines 38-40
38,useRef:function(e){var t=Ln();return e={current:e},t.memoizedState=e},useState:ev,useDebugValue:_g,useDeferredValue:function(e){return Ln().memoizedState=e},useTransition:function(){var e=ev(!1),t=e[0];return e=xE.bind(null,e[1]),Ln().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=De,s=Ln();if(Pe){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),tt===null)throw Error(B(349));gi&30||ij(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,tv(aj.bind(null,r,o,e),[e]),r.flags|=2048,vl(9,oj.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ln(),t=tt.identifierPrefix;if(Pe){var n=gr,r=pr;n=(r&~(1<<32-Nn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=yE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jE={readContext:an,useCallback:pj,useContext:an,useEffect:Ng,useImperativeHandle:mj,useInsertionEffect:uj,useLayoutEffect:hj,useMemo:gj,useReducer:Oh,useRef:dj,useState:function(){return Oh(xl)},useDebugValue:_g,useDeferredValue:function(e){var t=ln();return yj(t,Ye.memoizedState,e)},useTransition:function(){var e=Oh(xl)[0],t=ln().memoizedState;return[e,t]},useMutableSource:rj,useSyncExternalStore:sj,useId:xj,unstable_isNewReconciler:!1},kE={readContext:an,useCallback:pj,useContext:an,useEffect:Ng,useImperativeHandle:mj,useInsertionEffect:uj,useLayoutEffect:hj,useMemo:gj,useReducer:Ih,useRef:dj,useState:function(){return Ih(xl)},useDebugValue:_g,useDeferredValue:function(e){var t=ln();return Ye===null?t.memoizedState=e:yj(t,Ye.memoizedState,e)},useTransition:function(){var e=Ih(xl)[0],t=ln().memoizedState;return[e,t]},useMutableSource:rj,useSyncExternalStore:sj,useId:xj,unstable_isNewReconciler:!1};function xn(e,t){if(e&&e.defaultProps){t=Le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function lm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Tu={isMounted:function(e){return(e=e._reactInternals)?Ni(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jt(),s=vs(e),o=xr(r,s);o.payload=t,n!=null&&(o.callback=n),t=ys(e,o,s),t!==null&&(_n(t,e,s,r),ed(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jt(),s=vs(e),o=xr(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ys(e,o,s),t!==null&&(_n(t,e,s,r),ed(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jt(),r=vs(e),s=xr(n,r);s.tag=2,t!=null&&(s.callback=t),t=ys(e,s,r),t!==null&&(_n(t,e,r,n),ed(t,e,r))}};function nv(e,t,n,r,s,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!ul(n,r)||!ul(s,o):!0}function jj(e,t,n){var r=!1,s=Ns,o=t.contextType;return typeof o=="object"&&o!==null?o=an(o):(s=Ot(t)?mi:pt.current,r=t.contextTypes,o=(r=r!=null)?Fo(e,s):Ns),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Tu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function rv(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&&Tu.enqueueReplaceState(t,t.state,null)}function cm(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},xg(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=an(o):(o=Ot(t)?mi:pt.current,s.context=Fo(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(lm(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Tu.enqueueReplaceState(s,s.state,null),Fd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Vo(e,t){try{var n="",r=t;do n+=QC(r),r=r.return;while(r);var s=n}catch(o){s=` 39Error generating stack: `+o.message+` 40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Dh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function dm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var SE=typeof WeakMap=="function"?WeakMap:Map;function kj(e,t,n){n=xr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wd||(Wd=!0,bm=r),dm(e,t)},n}function Sj(e,t,n){n=xr(-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(){dm(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){dm(e,t),typeof r!="function"&&(xs===null?xs=new Set([this]):xs.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function sv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new SE;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=$E.bind(null,e,t,n),t.then(e,e))}function iv(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}
vendor: 10,915 bytes, line 40
40function ov(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=xr(-1,1),t.tag=2,ys(n,t,1))),n.lanes|=1),e)}var NE=Tr.ReactCurrentOwner,Rt=!1;function xt(e,t,n,r){t.child=e===null?Z1(t,null,n,r):Uo(t,e.child,n,r)}function av(e,t,n,r,s){n=n.render;var o=t.ref;return yo(t,s),r=kg(e,t,n,r,o,s),n=Sg(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,kr(e,t,s)):(Pe&&n&&ug(t),t.flags|=1,xt(e,t,r,s),t.child)}function lv(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Og(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Nj(e,t,o,r,s)):(e=od(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:ul,n(a,r)&&e.ref===t.ref)return kr(e,t,s)}return t.flags|=1,e=bs(o,r),e.ref=t.ref,e.return=t,t.child=e}function Nj(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(ul(o,r)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(Rt=!0);else return t.lanes=e.lanes,kr(e,t,s)}return um(e,t,n,r,s)}function _j(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(ao,Bt),Bt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(ao,Bt),Bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ke(ao,Bt),Bt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ke(ao,Bt),Bt|=r;return xt(e,t,s,n),t.child}function Cj(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function um(e,t,n,r,s){var o=Ot(n)?mi:pt.current;return o=Fo(t,o),yo(t,s),n=kg(e,t,n,r,o,s),r=Sg(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,kr(e,t,s)):(Pe&&r&&ug(t),t.flags|=1,xt(e,t,n,s),t.child)}function cv(e,t,n,r,s){if(Ot(n)){var o=!0;Od(t)}else o=!1;if(yo(t,s),t.stateNode===null)rd(e,t),jj(t,n,r),cm(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=an(d):(d=Ot(n)?mi:pt.current,d=Fo(t,d));var u=n.getDerivedStateFromProps,h=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||c!==d)&&rv(t,a,r,d),qr=!1;var f=t.memoizedState;a.state=f,Fd(t,r,a,s),c=t.memoizedState,l!==r||f!==c||Mt.current||qr?(typeof u=="function"&&(lm(t,n,u,r),c=t.memoizedState),(l=qr||nv(t,n,l,r,f,c,d))?(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=d,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,tj(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:xn(t.type,l),a.props=d,h=t.pendingProps,f=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=an(c):(c=Ot(n)?mi:pt.current,c=Fo(t,c));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==h||f!==c)&&rv(t,a,r,c),qr=!1,f=t.memoizedState,a.state=f,Fd(t,r,a,s);var y=t.memoizedState;l!==h||f!==y||Mt.current||qr?(typeof m=="function"&&(lm(t,n,m,r),y=t.memoizedState),(d=qr||nv(t,n,d,r,f,y,c)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),a.props=r,a.state=y,a.context=c,r=d):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return hm(e,t,n,r,o,s)}function hm(e,t,n,r,s,o){Cj(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&Gx(t,n,!1),kr(e,t,o);r=t.stateNode,NE.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Uo(t,e.child,null,o),t.child=Uo(t,null,l,o)):xt(e,t,l,o),t.memoizedState=r.state,s&&Gx(t,n,!0),t.child}function Tj(e){var t=e.stateNode;t.pendingContext?Kx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Kx(e,t.context,!1),vg(e,t.containerInfo)}function dv(e,t,n,r,s){return Bo(),fg(s),t.flags|=256,xt(e,t,n,r),t.child}var fm={dehydrated:null,treeContext:null,retryLane:0};function mm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ej(e,t,n){var r=t.pendingProps,s=Ie.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ke(Ie,s&1),e===null)return om(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,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Au(a,r,0,null),e=di(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=mm(n),t.memoizedState=fm,e):Cg(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return _E(e,t,a,r,l,s,n);if(o){o=r.fallback,a=t.mode,s=e.child,l=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=bs(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=bs(l,o):(o=di(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?mm(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=fm,r}return o=e.child,e=o.sibling,r=bs(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Cg(e,t){return t=Au({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wc(e,t,n,r){return r!==null&&fg(r),Uo(t,e.child,null,n),e=Cg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _E(e,t,n,r,s,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Dh(Error(B(422))),wc(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Au({mode:"visible",children:r.children},s,0,null),o=di(o,s,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Uo(t,e.child,null,a),t.child.memoizedState=mm(a),t.memoizedState=fm,o);if(!(t.mode&1))return wc(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(B(419)),r=Dh(o,r,void 0),wc(e,t,a,r)}if(l=(a&e.childLanes)!==0,Rt||l){if(r=tt,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!==o.retryLane&&(o.retryLane=s,jr(e,s),_n(r,e,s,-1))}return Mg(),r=Dh(Error(B(421))),wc(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=FE.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Vt=gs(s.nextSibling),Wt=t,Pe=!0,kn=null,e!==null&&(en[tn++]=pr,en[tn++]=gr,en[tn++]=pi,pr=e.id,gr=e.overflow,pi=t),t=Cg(t,r.children),t.flags|=4096,t)}function uv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),am(e.return,t,n)}function Lh(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function Pj(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(xt(e,t,r.children,n),r=Ie.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&&uv(e,n,t);else if(e.tag===19)uv(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(ke(Ie,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&&Bd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Lh(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Bd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Lh(t,!0,n,null,o);break;case"together":Lh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function rd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=bs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function CE(e,t,n){switch(t.tag){case 3:Tj(t),Bo();break;case 5:nj(t);break;case 1:Ot(t.type)&&Od(t);break;case 4:vg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ke(Ld,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ke(Ie,Ie.current&1),t.flags|=128,null):n&t.child.childLanes?Ej(e,t,n):(ke(Ie,Ie.current&1),e=kr(e,t,n),e!==null?e.sibling:null);ke(Ie,Ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pj(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ke(Ie,Ie.current),r)break;return null;
vendor: 4,597 bytes, line 40
40case 22:case 23:return t.lanes=0,_j(e,t,n)}return kr(e,t,n)}var Aj,pm,Rj,Mj;Aj=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}};pm=function(){};Rj=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Ys(Yn.current);var o=null;switch(n){case"input":s=Lf(e,s),r=Lf(e,r),o=[];break;case"select":s=Le({},s,{value:void 0}),r=Le({},r,{value:void 0}),o=[];break;case"textarea":s=Bf(e,s),r=Bf(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Rd)}zf(n,r);var a;n=null;for(d in s)if(!r.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var l=s[d];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(sl.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in r){var c=r[d];if(l=s!=null?s[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(sl.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&Ne("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};Mj=function(e,t,n,r){n!==r&&(t.flags|=4)};function ba(e,t){if(!Pe)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 ht(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 TE(e,t,n){var r=t.pendingProps;switch(hg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return Ot(t.type)&&Md(),ht(t),null;case 3:return r=t.stateNode,zo(),Ce(Mt),Ce(pt),wg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(vc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(km(kn),kn=null))),pm(e,t),ht(t),null;case 5:bg(t);var s=Ys(gl.current);if(n=t.type,e!==null&&t.stateNode!=null)Rj(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return ht(t),null}if(e=Ys(Yn.current),vc(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Hn]=t,r[ml]=o,e=(t.mode&1)!==0,n){case"dialog":Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":case"embed":Ne("load",r);break;case"video":case"audio":for(s=0;s<Ia.length;s++)Ne(Ia[s],r);break;case"source":Ne("error",r);break;case"img":case"image":case"link":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"input":bx(r,o),Ne("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ne("invalid",r);break;case"textarea":jx(r,o),Ne("invalid",r)}zf(n,o),s=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&xc(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&xc(r.textContent,l,e),s=["children",""+l]):sl.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Ne("scroll",r)}switch(n){case"input":dc(r),wx(r,o,!0);break;case"textarea":dc(r),kx(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Rd)}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=a1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>
40",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[Hn]=t,e[ml]=r,Aj(e,t,!1,!1),t.stateNode=e;e:{switch(a=Vf(n,r),n){case"dialog":Ne("cancel",e),Ne("close",e),s=r;break;case"iframe":case"object":case"embed":Ne("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ia.length;s++)Ne(Ia[s],e);s=r;break;case"source":Ne("error",e),s=r;break;case"img":case"image":case"link":Ne("error",e),Ne("load",e),s=r;break;case"details":Ne("toggle",e),s=r;break;case"input":bx(e,r),s=Lf(e,r),Ne("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Le({},r,{value:void 0}),Ne("invalid",e);break;case"textarea":jx(e,r),s=Bf(e,r),Ne("invalid",e);break;default:s=r}zf(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?d1(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&l1(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&il(e,c):typeof c=="number"&&il(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(sl.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Ne("scroll",e):c!=null&&Qp(e,o,c,a))}switch(n){case"input":dc(e),wx(e,r,!1);break;case"textarea":dc(e),kx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ss(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?fo(e,!!r.multiple,o,!1):r.defaultValue!=null&&fo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Rd)}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 ht(t),null;case 6:if(e&&t.stateNode!=null)Mj(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=Ys(gl.current),Ys(Yn.current),vc(t)){if(r=t.stateNode,n=t.memoizedProps,r[Hn]=t,(o=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:xc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Hn]=t,t.stateNode=r}return ht(t),null;case 13:if(Ce(Ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&Vt!==null&&t.mode&1&&!(t.flags&128))Q1(),Bo(),t.flags|=98560,o=!1;else if(o=vc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(B(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(B(317)
vendor: 25,533 bytes, line 40
40);o[Hn]=t}else Bo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ht(t),o=!1}else kn!==null&&(km(kn),kn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ie.current&1?Qe===0&&(Qe=3):Mg())),t.updateQueue!==null&&(t.flags|=4),ht(t),null);case 4:return zo(),pm(e,t),e===null&&hl(t.stateNode.containerInfo),ht(t),null;case 10:return gg(t.type._context),ht(t),null;case 17:return Ot(t.type)&&Md(),ht(t),null;case 19:if(Ce(Ie),o=t.memoizedState,o===null)return ht(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)ba(o,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Bd(e),a!==null){for(t.flags|=128,ba(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ke(Ie,Ie.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ue()>Wo&&(t.flags|=128,r=!0,ba(o,!1),t.lanes=4194304)}else{if(!r)if(e=Bd(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ba(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Pe)return ht(t),null}else 2*Ue()-o.renderingStartTime>Wo&&n!==1073741824&&(t.flags|=128,r=!0,ba(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ue(),t.sibling=null,n=Ie.current,ke(Ie,r?n&1|2:n&1),t):(ht(t),null);case 22:case 23:return Rg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Bt&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function EE(e,t){switch(hg(t),t.tag){case 1:return Ot(t.type)&&Md(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zo(),Ce(Mt),Ce(pt),wg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bg(t),null;case 13:if(Ce(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Bo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ie),null;case 4:return zo(),null;case 10:return gg(t.type._context),null;case 22:case 23:return Rg(),null;case 24:return null;default:return null}}var jc=!1,mt=!1,PE=typeof WeakSet=="function"?WeakSet:Set,Y=null;function oo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Be(e,t,r)}else n.current=null}function gm(e,t,n){try{n()}catch(r){Be(e,t,r)}}var hv=!1;function AE(e,t){if(Zf=Ed,e=$1(),dg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,d=0,u=0,h=e,f=null;t:for(;;){for(var m;h!==n||s!==0&&h.nodeType!==3||(l=a+s),h!==o||r!==0&&h.nodeType!==3||(c=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(m=h.firstChild)!==null;)f=h,h=m;for(;;){if(h===e)break t;if(f===n&&++d===s&&(l=a),f===o&&++u===r&&(c=a),(m=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(em={focusedElem:e,selectionRange:n},Ed=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,w=y.memoizedState,b=t.stateNode,g=b.getSnapshotBeforeUpdate(t.elementType===t.type?p:xn(t.type,p),w);b.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(j){Be(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return y=hv,hv=!1,y}function qa(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&gm(t,n,o)}s=s.next}while(s!==r)}}function Eu(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 ym(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 Oj(e){var t=e.alternate;t!==null&&(e.alternate=null,Oj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hn],delete t[ml],delete t[rm],delete t[fE],delete t[mE])),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 Ij(e){return e.tag===5||e.tag===3||e.tag===4}function fv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ij(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 xm(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=Rd));else if(r!==4&&(e=e.child,e!==null))for(xm(e,t,n),e=e.sibling;e!==null;)xm(e,t,n),e=e.sibling}function vm(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(vm(e,t,n),e=e.sibling;e!==null;)vm(e,t,n),e=e.sibling}var it=null,jn=!1;function Lr(e,t,n){for(n=n.child;n!==null;)Dj(e,t,n),n=n.sibling}function Dj(e,t,n){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(wu,n)}catch{}switch(n.tag){case 5:mt||oo(n,t);case 6:var r=it,s=jn;it=null,Lr(e,t,n),it=r,jn=s,it!==null&&(jn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(jn?(e=it,n=n.stateNode,e.nodeType===8?Ph(e.parentNode,n):e.nodeType===1&&Ph(e,n),cl(e)):Ph(it,n.stateNode));break;case 4:r=it,s=jn,it=n.stateNode.containerInfo,jn=!0,Lr(e,t,n),it=r,jn=s;break;case 0:case 11:case 14:case 15:if(!mt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&gm(n,t,a),s=s.next}while(s!==r)}Lr(e,t,n);break;case 1:if(!mt&&(oo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Be(n,t,l)}Lr(e,t,n);break;case 21:Lr(e,t,n);break;case 22:n.mode&1?(mt=(r=mt)||n.memoizedState!==null,Lr(e,t,n),mt=r):Lr(e,t,n);break;default:Lr(e,t,n)}}function mv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new PE),t.forEach(function(r){var s=BE.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:it=l.stateNode,jn=!1;break e;case 3:it=l.stateNode.containerInfo,jn=!0;break e;case 4:it=l.stateNode.containerInfo,jn=!0;break e}l=l.return}if(it===null)throw Error(B(160));Dj(o,a,s),it=null,jn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(d){Be(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lj(t,e),t=t.sibling}function Lj(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fn(t,e),In(e),r&4){try{qa(3,e,e.return),Eu(3,e)}catch(p){Be(e,e.return,p)}try{qa(5,e,e.return)}catch(p){Be(e,e.return,p)}}break;case 1:fn(t,e),In(e),r&512&&n!==null&&oo(n,n.return);break;case 5:if(fn(t,e),In(e),r&512&&n!==null&&oo(n,n.return),e.flags&32){var s=e.stateNode;try{il(s,"")}catch(p){Be(e,e.return,p)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&i1(s,o),Vf(l,a);var d=Vf(l,o);for(a=0;a<c.length;a+=2){var u=c[a],h=c[a+1];u==="style"?d1(s,h):u==="dangerouslySetInnerHTML"?l1(s,h):u==="children"?il(s,h):Qp(s,u,h,d)}switch(l){case"input":$f(s,o);break;case"textarea":o1(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?fo(s,!!o.multiple,m,!1):f!==!!o.multiple&&(o.defaultValue!=null?fo(s,!!o.multiple,o.defaultValue,!0):fo(s,!!o.multiple,o.multiple?[]:"",!1))}s[ml]=o}catch(p){Be(e,e.return,p)}}break;case 6:if(fn(t,e),In(e),r&4){if(e.stateNode===null)throw Error(B(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(p){Be(e,e.return,p)}}break;case 3:if(fn(t,e),In(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{cl(t.containerInfo)}catch(p){Be(e,e.return,p)}break;case 4:fn(t,e),In(e);break;case 13:fn(t,e),In(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Pg=Ue())),r&4&&mv(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(mt=(d=mt)||u,fn(t,e),mt=d):fn(t,e),In(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&e.mode&1)for(Y=e,u=e.child;u!==null;){for(h=Y=u;Y!==null;){switch(f=Y,m=f.child,f.tag){case 0:case 11:case 14:case 15:qa(4,f,f.return);break;case 1:oo(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(p){Be(r,n,p)}}break;case 5:oo(f,f.return);break;case 22:if(f.memoizedState!==null){gv(h);continue}}m!==null?(m.return=f,Y=m):gv(h)}u=u.sibling}e:for(u=null,h=e;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,d?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=c1("display",a))}catch(p){Be(e,e.return,p)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(p){Be(e,e.return,p)}}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;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fn(t,e),In(e),r&4&&mv(e);break;case 21:break;default:fn(t,e),In(e)}}function In(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ij(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(il(s,""),r.flags&=-33);var o=fv(e);vm(e,o,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=fv(e);xm(e,l,a);break;default:throw Error(B(161))}}catch(c){Be(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function RE(e,t,n){Y=e,$j(e)}function $j(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var s=Y,o=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||jc;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||mt;l=jc;var d=mt;if(jc=a,(mt=c)&&!d)for(Y=s;Y!==null;)a=Y,c=a.child,a.tag===22&&a.memoizedState!==null?yv(s):c!==null?(c.return=a,Y=c):yv(s);for(;o!==null;)Y=o,$j(o),o=o.sibling;Y=s,jc=l,mt=d}pv(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,Y=o):pv(e)}}function pv(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mt||Eu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:xn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Zx(t,o,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}Zx(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;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 d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&cl(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}mt||t.flags&512&&ym(t)}catch(f){Be(t,t.return,f)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function gv(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function yv(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Eu(4,t)}catch(c){Be(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Be(t,s,c)}}var o=t.return;try{ym(t)}catch(c){Be(t,o,c)}break;case 5:var a=t.return;try{ym(t)}catch(c){Be(t,a,c)}}}catch(c){Be(t,t.return,c)}if(t===e){Y=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Y=l;break}Y=t.return}}var ME=Math.ceil,Vd=Tr.ReactCurrentDispatcher,Tg=Tr.ReactCurrentOwner,sn=Tr.ReactCurrentBatchConfig,he=0,tt=null,qe=null,lt=0,Bt=0,ao=Rs(0),Qe=0,bl=null,yi=0,Pu=0,Eg=0,Ka=null,Pt=null,Pg=0,Wo=1/0,cr=null,Wd=!1,bm=null,xs=null,kc=!1,cs=null,Hd=0,Ga=0,wm=null,sd=-1,id=0;function jt(){return he&6?Ue():sd!==-1?sd:sd=Ue()}function vs(e){return e.mode&1?he&2&<!==0?lt&-lt:gE.transition!==null?(id===0&&(id=j1()),id):(e=ge,e!==0||(e=window.event,e=e===void 0?16:E1(e.type)),e):1}function _n(e,t,n,r){if(50<Ga)throw Ga=0,wm=null,Error(B(185));Hl(e,n,r),(!(he&2)||e!==tt)&&(e===tt&&(!(he&2)&&(Pu|=n),Qe===4&&Gr(e,lt)),It(e,r),n===1&&he===0&&!(t.mode&1)&&(Wo=Ue()+500,_u&&Ms()))}function It(e,t){var n=e.callbackNode;gT(e,t);var r=Td(e,e===tt?lt:0);if(r===0)n!==null&&_x(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_x(n),t===1)e.tag===0?pE(xv.bind(null,e)):G1(xv.bind(null,e)),uE(function(){!(he&6)&&Ms()}),n=null;else{switch(k1(r)){case 1:n=ng;break;case 4:n=b1;break;case 16:n=Cd;break;case 536870912:n=w1;break;default:n=Cd}n=qj(n,Fj.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fj(e,t){if(sd=-1,id=0,he&6)throw Error(B(327));var n=e.callbackNode;if(xo()&&e.callbackNode!==n)return null;var r=Td(e,e===tt?lt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=qd(e,r);else{t=r;var s=he;he|=2;var o=Uj();(tt!==e||lt!==t)&&(cr=null,Wo=Ue()+500,ci(e,t));do try{DE();break}catch(l){Bj(e,l)}while(!0);pg(),Vd.current=o,he=s,qe!==null?t=0:(tt=null,lt=0,t=Qe)}if(t!==0){if(t===2&&(s=Gf(e),s!==0&&(r=s,t=jm(e,s))),t===1)throw n=bl,ci(e,0),Gr(e,r),It(e,Ue()),n;if(t===6)Gr(e,r);else{if(s=e.current.alternate,!(r&30)&&!OE(s)&&(t=qd(e,r),t===2&&(o=Gf(e),o!==0&&(r=o,t=jm(e,o))),t===1))throw n=bl,ci(e,0),Gr(e,r),It(e,Ue()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:zs(e,Pt,cr);break;case 3:if(Gr(e,r),(r&130023424)===r&&(t=Pg+500-Ue(),10<t)){if(Td(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){jt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=nm(zs.bind(null,e,Pt,cr),t);break}zs(e,Pt,cr);break;case 4:if(Gr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-Nn(r);o=1<<a,a=t[a],a>s&&(s=a),r&=~o}if(r=s,r=Ue()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ME(r/1960))-r,10<r){e.timeoutHandle=nm(zs.bind(null,e,Pt,cr),r);break}zs(e,Pt,cr);break;case 5:zs(e,Pt,cr);break;default:throw Error(B(329))}}}return It(e,Ue()),e.callbackNode===n?Fj.bind(null,e):null}function jm(e,t){var n=Ka;return e.current.memoizedState.isDehydrated&&(ci(e,t).flags|=256),e=qd(e,t),e!==2&&(t=Pt,Pt=n,t!==null&&km(t)),e}function km(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function OE(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!En(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Gr(e,t){for(t&=~Eg,t&=~Pu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nn(t),r=1<<n;e[n]=-1,t&=~r}}function xv(e){if(he&6)throw Error(B(327));xo();var t=Td(e,0);if(!(t&1))return It(e,Ue()),null;var n=qd(e,t);if(e.tag!==0&&n===2){var r=Gf(e);r!==0&&(t=r,n=jm(e,r))}if(n===1)throw n=bl,ci(e,0),Gr(e,t),It(e,Ue()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zs(e,Pt,cr),It(e,Ue()),null}function Ag(e,t){var n=he;he|=1;try{return e(t)}finally{he=n,he===0&&(Wo=Ue()+500,_u&&Ms())}}function xi(e){cs!==null&&cs.tag===0&&!(he&6)&&xo();var t=he;he|=1;var n=sn.transition,r=ge;try{if(sn.transition=null,ge=1,e)return e()}finally{ge=r,sn.transition=n,he=t,!(he&6)&&Ms()}}function Rg(){Bt=ao.current,Ce(ao)}function ci(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dE(n)),qe!==null)for(n=qe.return;n!==null;){var r=n;switch(hg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Md();break;case 3:zo(),Ce(Mt),Ce(pt),wg();break;case 5:bg(r);break;case 4:zo();break;case 13:Ce(Ie);break;case 19:Ce(Ie);break;case 10:gg(r.type._context);break;case 22:case 23:Rg()}n=n.return}if(tt=e,qe=e=bs(e.current,null),lt=Bt=t,Qe=0,bl=null,Eg=Pu=yi=0,Pt=Ka=null,Gs!==null){for(t=0;t<Gs.length;t++)if(n=Gs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=s,r.next=a}n.pending=r}Gs=null}return e}function Bj(e,t){do{var n=qe;try{if(pg(),td.current=zd,Ud){for(var r=De.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ud=!1}if(gi=0,Ze=Ye=De=null,Ha=!1,yl=0,Tg.current=null,n===null||n.return===null){Qe=1,bl=t,qe=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=lt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,u=l,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=iv(a);if(m!==null){m.flags&=-257,ov(m,a,l,o,t),m.mode&1&&sv(o,d,t),t=m,c=d;var y=t.updateQueue;if(y===null){var p=new Set;p.add(c),t.updateQueue=p}else y.add(c);break e}else{if(!(t&1)){sv(o,d,t),Mg();break e}c=Error(B(426))}}else if(Pe&&l.mode&1){var w=iv(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ov(w,a,l,o,t),fg(Vo(c,l));break e}}o=c=Vo(c,l),Qe!==4&&(Qe=2),Ka===null?Ka=[o]:Ka.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var b=kj(o,c,t);Xx(o,b);break e;case 1:l=c;var g=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(xs===null||!xs.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var j=Sj(o,l,t);Xx(o,j);break e}}o=o.return}while(o!==null)}Vj(n)}catch(k){t=k,qe===n&&n!==null&&(qe=n=n.return);continue}break}while(!0)}function Uj(){var e=Vd.current;return Vd.current=zd,e===null?zd:e}function Mg(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),tt===null||!(yi&268435455)&&!(Pu&268435455)||Gr(tt,lt)}function qd(e,t){var n=he;he|=2;var r=Uj();(tt!==e||lt!==t)&&(cr=null,ci(e,t));do try{IE();break}catch(s){Bj(e,s)}while(!0);if(pg(),he=n,Vd.current=r,qe!==null)throw Error(B(261));return tt=null,lt=0,Qe}function IE(){for(;qe!==null;)zj(qe)}function DE(){for(;qe!==null&&!aT();)zj(qe)}function zj(e){var t=Hj(e.alternate,e,Bt);e.memoizedProps=e.pendingProps,t===null?Vj(e):qe=t,Tg.current=null}function Vj(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=EE(n,t),n!==null){n.flags&=32767,qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,qe=null;return}}else if(n=TE(n,t,Bt),n!==null){qe=n;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);Qe===0&&(Qe=5)}function zs(e,t,n){var r=ge,s=sn.transition;try{sn.transition=null,ge=1,LE(e,t,n,r)}finally{sn.transition=s,ge=r}return null}function LE(e,t,n,r){do xo();while(cs!==null);if(he&6)throw Error(B(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(B(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(yT(e,o),e===tt&&(qe=tt=null,lt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||kc||(kc=!0,qj(Cd,function(){return xo(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=sn.transition,sn.transition=null;var a=ge;ge=1;var l=he;he|=4,Tg.current=null,AE(e,n),Lj(n,e),rE(em),Ed=!!Zf,em=Zf=null,e.current=n,RE(n),lT(),he=l,ge=a,sn.transition=o}else e.current=n;if(kc&&(kc=!1,cs=e,Hd=s),o=e.pendingLanes,o===0&&(xs=null),uT(n.stateNode),It(e,Ue()),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(Wd)throw Wd=!1,e=bm,bm=null,e;return Hd&1&&e.tag!==0&&xo(),o=e.pendingLanes,o&1?e===wm?Ga++:(Ga=0,wm=e):Ga=0,Ms(),null}function xo(){if(cs!==null){var e=k1(Hd),t=sn.transition,n=ge;try{if(sn.transition=null,ge=16>e?16:e,cs===null)var r=!1;else{if(e=cs,cs=null,Hd=0,he&6)throw Error(B(331));var s=he;for(he|=4,Y=e.current;Y!==null;){var o=Y,a=o.child;if(Y.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var d=l[c];for(Y=d;Y!==null;){var u=Y;switch(u.tag){case 0:case 11:case 15:qa(8,u,o)}var h=u.child;if(h!==null)h.return=u,Y=h;else for(;Y!==null;){u=Y;var f=u.sibling,m=u.return;if(Oj(u),u===d){Y=null;break}if(f!==null){f.return=m,Y=f;break}Y=m}}}var y=o.alternate;if(y!==null){var p=y.child;if(p!==null){y.child=null;do{var w=p.sibling;p.sibling=null,p=w}while(p!==null)}}Y=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,Y=a;else e:for(;Y!==null;){if(o=Y,o.flags&2048)switch(o.tag){case 0:case 11:case 15:qa(9,o,o.return)}var b=o.sibling;if(b!==null){b.return=o.return,Y=b;break e}Y=o.return}}var g=e.current;for(Y=g;Y!==null;){a=Y;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,Y=v;else e:for(a=g;Y!==null;){if(l=Y,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Eu(9,l)}}catch(k){Be(l,l.return,k)}if(l===a){Y=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,Y=j;break e}Y=l.return}}if(he=s,Ms(),Gn&&typeof Gn.onPostCommitFiberRoot=="function")try{Gn.onPostCommitFiberRoot(wu,e)}catch{}r=!0}return r}finally{ge=n,sn.transition=t}}return!1}function vv(e,t,n){t=Vo(n,t),t=kj(e,t,1),e=ys(e,t,1),t=jt(),e!==null&&(Hl(e,1,t),It(e,t))}function Be(e,t,n){if(e.tag===3)vv(e,e,n);else for(;t!==null;){if(t.tag===3){vv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xs===null||!xs.has(r))){e=Vo(n,e),e=Sj(t,e,1),t=ys(t,e,1),e=jt(),t!==null&&(Hl(t,1,e),It(t,e));break}}t=t.return}}function $E(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=jt(),e.pingedLanes|=e.suspendedLanes&n,tt===e&&(lt&n)===n&&(Qe===4||Qe===3&&(lt&130023424)===lt&&500>Ue()-Pg?ci(e,0):Eg|=n),It(e,t)}function Wj(e,t){t===0&&(e.mode&1?(t=fc,fc<<=1,!(fc&130023424)&&(fc=4194304)):t=1);var n=jt();e=jr(e,t),e!==null&&(Hl(e,t,n),It(e,n))}function FE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wj(e,n)}function BE(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(B(314))}r!==null&&r.delete(t),Wj(e,n)}var Hj;Hj=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Rt=!1,CE(e,t,n);Rt=!!(e.flags&131072)}else Rt=!1,Pe&&t.flags&1048576&&Y1(t,Dd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rd(e,t),e=t.pendingProps;var s=Fo(t,pt.current);yo(t,n),s=kg(null,t,r,e,s,n);var o=Sg();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,Ot(r)?(o=!0,Od(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,xg(t),s.updater=Tu,t.stateNode=s,s._reactInternals=t,cm(t,r,e,n),t=hm(null,t,r,!0,o,n)):(t.tag=0,Pe&&o&&ug(t),xt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=zE(r),e=xn(r,e),s){case 0:t=um(null,t,r,e,n);break e;case 1:t=cv(null,t,r,e,n);break e;case 11:t=av(null,t,r,e,n);break e;case 14:t=lv(null,t,r,xn(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),um(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),cv(e,t,r,s,n);case 3:e:{if(Tj(t),e===null)throw Error(B(387));
vendor: 4,674 bytes, line 40
40r=t.pendingProps,o=t.memoizedState,s=o.element,tj(e,t),Fd(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=Vo(Error(B(423)),t),t=dv(e,t,r,n,s);break e}else if(r!==s){s=Vo(Error(B(424)),t),t=dv(e,t,r,n,s);break e}else for(Vt=gs(t.stateNode.containerInfo.firstChild),Wt=t,Pe=!0,kn=null,n=Z1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Bo(),r===s){t=kr(e,t,n);break e}xt(e,t,r,n)}t=t.child}return t;case 5:return nj(t),e===null&&om(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,a=s.children,tm(r,s)?a=null:o!==null&&tm(r,o)&&(t.flags|=32),Cj(e,t),xt(e,t,a,n),t.child;case 6:return e===null&&om(t),null;case 13:return Ej(e,t,n);case 4:return vg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Uo(t,null,r,n):xt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),av(e,t,r,s,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,ke(Ld,r._currentValue),r._currentValue=a,o!==null)if(En(o.value,a)){if(o.children===s.children&&!Mt.current){t=kr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=xr(-1,n&-n),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),am(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(B(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),am(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}xt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,yo(t,n),s=an(s),r=r(s),t.flags|=1,xt(e,t,r,n),t.child;case 14:return r=t.type,s=xn(r,t.pendingProps),s=xn(r.type,s),lv(e,t,r,s,n);case 15:return Nj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:xn(r,s),rd(e,t),t.tag=1,Ot(r)?(e=!0,Od(t)):e=!1,yo(t,n),jj(t,r,s),cm(t,r,s,n),hm(null,t,r,!0,e,n);case 19:return Pj(e,t,n);case 22:return _j(e,t,n)}throw Error(B(156,t.tag))};function qj(e,t){return v1(e,t)}function UE(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 nn(e,t,n,r){return new UE(e,t,n,r)}function Og(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zE(e){if(typeof e=="function")return Og(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zp)return 11;if(e===eg)return 14}return 2}function bs(e,t){var n=e.alternate;return n===null?(n=nn(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 od(e,t,n,r,s,o){var a=2;if(r=e,typeof e=="function")Og(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Qi:return di(n.children,s,o,t);case Xp:a=8,s|=8;break;case Mf:return e=nn(12,n,t,s|2),e.elementType=Mf,e.lanes=o,e;case Of:return e=nn(13,n,t,s),e.elementType=Of,e.lanes=o,e;case If:return e=nn(19,n,t,s),e.elementType=If,e.lanes=o,e;case n1:return Au(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case e1:a=10;break e;case t1:a=9;break e;case Zp:a=11;break e;case eg:a=14;break e;case Hr:a=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=nn(a,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=nn(7,e,r,t),e.lanes=n,e}function Au(e,t,n,r){return e=nn(22,e,r,t),e.elementType=n1,e.lanes=n,e.stateNode={isHidden:!1},e}
vendor: 4,686 bytes, line 40
40function $h(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function Fh(e,t,n){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function VE(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=vh(0),this.expirationTimes=vh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ig(e,t,n,r,s,o,a,l,c){return e=new VE(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=nn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},xg(o),e}function WE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ji,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Kj(e){if(!e)return Ns;e=e._reactInternals;e:{if(Ni(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(Ot(n))return K1(e,n,t)}return t}function Gj(e,t,n,r,s,o,a,l,c){return e=Ig(n,r,!0,e,s,o,a,l,c),e.context=Kj(null),n=e.current,r=jt(),s=vs(n),o=xr(r,s),o.callback=t??null,ys(n,o,s),e.current.lanes=s,Hl(e,s,r),It(e,r),e}function Ru(e,t,n,r){var s=t.current,o=jt(),a=vs(s);return n=Kj(n),t.context===null?t.context=n:t.pendingContext=n,t=xr(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ys(s,t,a),e!==null&&(_n(e,s,a,o),ed(e,s,a)),a}function Kd(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 bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Dg(e,t){bv(e,t),(e=e.alternate)&&bv(e,t)}function HE(){return null}var Yj=typeof reportError=="function"?reportError:function(e){console.error(e)};function Lg(e){this._internalRoot=e}Mu.prototype.render=Lg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));Ru(e,t,null,null)};Mu.prototype.unmount=Lg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xi(function(){Ru(null,e,null,null)}),t[wr]=null}};function Mu(e){this._internalRoot=e}Mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=_1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kr.length&&t!==0&&t<Kr[n].priority;n++);Kr.splice(n,0,e),n===0&&T1(e)}};function $g(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ou(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function wv(){}function qE(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var d=Kd(a);o.call(d)}}var a=Gj(t,r,e,0,null,!1,!1,"",wv);return e._reactRootContainer=a,e[wr]=a.current,hl(e.nodeType===8?e.parentNode:e),xi(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var d=Kd(c);l.call(d)}}var c=Ig(e,0,!1,null,null,!1,!1,"",wv);return e._reactRootContainer=c,e[wr]=c.current,hl(e.nodeType===8?e.parentNode:e),xi(function(){Ru(t,c,n,r)}),c}function Iu(e,t,n,r,s){var o=n._reactRootContainer;if(o){var a=o;if(typeof s=="function"){var l=s;s=function(){var c=Kd(a);l.call(c)}}Ru(t,a,e,s)}else a=qE(n,t,e,s,r);return Kd(a)}S1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Oa(t.pendingLanes);n!==0&&(rg(t,n|1),It(t,Ue()),!(he&6)&&(Wo=Ue()+500,Ms()))}break;case 13:xi(function(){var r=jr(e,1);if(r!==null){var s=jt();_n(r,e,1,s)}}),Dg(e,1)}};sg=function(e){if(e.tag===13){var t=jr(e,134217728);if(t!==null){var n=jt();_n(t,e,134217728,n)}Dg(e,134217728)}};N1=function(e){if(e.tag===13){var t=vs(e),n=jr(e,t);if(n!==null){var r=jt();_n(n,e,t,r)}Dg(e,t)}};_1=function(){return ge};C1=function(e,t){var n=ge;try{return ge=e,t()}finally{ge=n}};Hf=function(e,t,n){switch(t){case"input":if($f(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=Nu(r);
40if(!s)throw Error(B(90));s1(r),$f(r,s)}}}break;case"textarea":o1(e,n);break;case"select":t=n.value,t!=null&&fo(e,!!n.multiple,t,!1)}};f1=Ag;m1=xi;var KE={usingClientEntryPoint:!1,Events:[Kl,to,Nu,u1,h1,Ag]},wa={findFiberByHostInstance:Ks,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},GE={bundleType:wa.bundleType,version:wa.version,rendererPackageName:wa.rendererPackageName,rendererConfig:wa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=y1(e),e===null?null:e.stateNode},findFiberByHostInstance:wa.findFiberByHostInstance||HE,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 Sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sc.isDisabled&&Sc.supportsFiber)try{wu=Sc.inject(GE),Gn=Sc}catch{}}Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KE;Kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$g(t))throw Error(B(200));return WE(e,t,null,n)};Kt.createRoot=function(e,t){if(!$g(e))throw Error(B(299));var n=!1,r="",s=Yj;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ig(e,1,!1,null,null,n,!1,r,s),e[wr]=t.current,hl(e.nodeType===8?e.parentNode:e),new Lg(t)};Kt.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(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=y1(t),e=e===null?null:e.stateNode,e};Kt.flushSync=function(e){return xi(e)};Kt.hydrate=function(e,t,n){if(!Ou(t))throw Error(B(200));return Iu(null,e,t,!0,n)};Kt.hydrateRoot=function(e,t,n){if(!$g(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",a=Yj;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Gj(t,null,e,1,n??null,s,!1,o,a),e[wr]=t.current,hl(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 Mu(t)};Kt.render=function(e,t,n){if(!Ou(t))throw Error(B(200));return Iu(null,e,t,!1,n)};Kt.unmountComponentAtNode=function(e){if(!Ou(e))throw Error(B(40));return e._reactRootContainer?(xi(function(){Iu(null,null,e,!1,function(){e._reactRootContainer=null,e[wr]=null})}),!0):!1};Kt.unstable_batchedUpdates=Ag;Kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ou(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return Iu(e,t,n,!1,r)};Kt.version="18.3.1-next-f1338f8080-20240426";function Jj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jj)}catch(e){console.error(e)}}Jj(),Jw.exports=Kt;var Yl=Jw.exports;const Qj=Vl(Yl);var Xj,jv=Yl;Xj=jv.createRoot,jv.hydrateRoot;var YE=typeof Element<"u",JE=typeof Map=="function",QE=typeof Set=="function",XE=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ad(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ad(e[r],t[r]))return!1;return!0}var o;if(JE&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!ad(r.value[1],t.get(r.value[0])))return!1;return!0}if(QE&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(XE&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(YE&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!ad(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var ZE=function(t,n){try{return ad(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const eP=Vl(ZE);var tP=function(e,t,n,r,s,o,a,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,r,s,o,a,l],u=0;c=new Error(t.replace(/%s/g,function(){return d[u++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},nP=tP;const kv=Vl(nP);var rP=function(t,n,r,s){var o=r?r.call(s,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;
40if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),d=0;d<a.length;d++){var u=a[d];if(!c(u))return!1;var h=t[u],f=n[u];if(o=r?r.call(s,h,f,u):void 0,o===!1||o===void 0&&h!==f)return!1}return!0};const sP=Vl(rP);var Zj=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Zj||{}),Bh={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Sv=Object.values(Zj),Fg={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},iP=Object.entries(Fg).reduce((e,[t,n])=>(e[n]=t,e),{}),Sn="data-rh",vo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},bo=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},oP=e=>{let t=bo(e,"title");const n=bo(e,vo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=bo(e,vo.DEFAULT_TITLE);return t||r||void 0},aP=e=>bo(e,vo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Uh=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),lP=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let o=0;o<s.length;o+=1){const l=s[o].toLowerCase();if(e.indexOf(l)!==-1&&r[l])return n.concat(r)}}return n},[]),cP=e=>console&&typeof console.warn=="function"&&console.warn(e),ja=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&cP(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const a={};o.filter(c=>{let d;const u=Object.keys(c);for(let f=0;f<u.length;f+=1){const m=u[f],y=m.toLowerCase();t.indexOf(y)!==-1&&!(d==="rel"&&c[d].toLowerCase()==="canonical")&&!(y==="rel"&&c[y].toLowerCase()==="stylesheet")&&(d=y),t.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(d=m)}if(!d||!c[d])return!1;const h=c[d].toLowerCase();return r[d]||(r[d]={}),a[d]||(a[d]={}),r[d][h]?!1:(a[d][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const l=Object.keys(a);for(let c=0;c<l.length;c+=1){const d=l[c],u={...r[d],...a[d]};r[d]=u}return s},[]).reverse()},dP=(e,t)=>
40{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},uP=e=>({baseTag:lP(["href"],e),bodyAttributes:Uh("bodyAttributes",e),defer:bo(e,vo.DEFER),encode:bo(e,vo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Uh("htmlAttributes",e),linkTags:ja("link",["rel","href"],e),metaTags:ja("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:ja("noscript",["innerHTML"],e),onChangeClientState:aP(e),scriptTags:ja("script",["src","innerHTML"],e),styleTags:ja("style",["cssText"],e),title:oP(e),titleAttributes:Uh("titleAttributes",e),prioritizeSeoTags:dP(e,vo.PRIORITIZE_SEO_TAGS)}),ek=e=>Array.isArray(e)?e.join(""):e,hP=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},zh=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(hP(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Nv=(e,t)=>({...e,[t]:void 0}),fP=["noscript","script","style"],Sm=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),tk=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),mP=(e,t,n,r)=>{const s=tk(n),o=ek(t);return s?`<${e} ${Sn}="true" ${s}>${Sm(o,r)}</${e}>`:`<${e} ${Sn}="true">${Sm(o,r)}</${e}>`},pP=(e,t,n=!0)=>t.reduce((r,s)=>{const o=s,a=Object.keys(o).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,u)=>{const h=typeof o[u]>"u"?u:`${u}="${Sm(o[u],n)}"`;return d?`${d} ${h}`:h},""),l=o.innerHTML||o.cssText||"",c=fP.indexOf(e)===-1;return`${r}<${e} ${Sn}="true" ${a}${c?"/>":`>${l}</${e}>`}`},""),nk=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=Fg[r];return n[s||r]=e[r],n},t),gP=(e,t,n)=>{const r={key:t,[Sn]:!0},s=nk(n,r);return[U.createElement("title",s,t)]},ld=(e,t)=>t.map((n,r)=>{const s={key:r,[Sn]:!0};return Object.keys(n).forEach(o=>{const l=Fg[o]||o;if(l==="innerHTML"||l==="cssText"){const c=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=n[o]}),U.createElement(e,s)}),Qt=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>gP(e,t.title,t.titleAttributes),toString:()=>mP(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>nk(t),toString:()=>tk(t)};default:return{toComponent:()=>ld(e,t),toString:()=>pP(e,t,n)}}},yP=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=zh(e,Bh.meta),o=zh(t,Bh.link),a=zh(n,Bh.script);return{priorityMethods:{toComponent:()=>[...ld("meta",s.priority),...ld("link",o.priority),...ld("script",a.priority)],toString:()=>`${Qt("meta",s.priority,r)} ${Qt("link",o.priority,r)} ${Qt("script",a.priority,r)}`},metaTags:s.default,linkTags:o.default,scriptTags:a.default}},xP=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:o,styleTags:a,title:l="",titleAttributes:c,prioritizeSeoTags:d}=e;let{linkTags:u,metaTags:h,scriptTags:f}=e,m={toComponent:()=>{},toString:()=>""};return d&&({priorityMethods:m,linkTags:u,metaTags:h,scriptTags:f}=yP(e)),{priority:m,base:Qt("base",t,r),bodyAttributes:Qt("bodyAttributes",n,r),htmlAttributes:Qt("htmlAttributes",s,r),link:Qt("link",u,r),meta:Qt("meta",h,r),noscript:Qt("noscript",o,r),script:Qt("script",f,r),style:Qt("style",a,r),title:Qt("title",{title:l,titleAttributes:c},r)}},Nm=xP,Nc=[],rk=!!(typeof window<"u"&&window.document&&window.document.createElement),_m=class{constructor(e,t){or(this,"instances",[]);or(this,"canUseDOM",rk);or(this,"context");or(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Nc:this.instances,add:e=>{(this.canUseDOM?Nc:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Nc:this.instances).indexOf(e);(this.canUseDOM?Nc:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Nm({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},vP={},sk=U.createContext(vP),Zs,ik=(Zs=class extends x.Component{constructor(n){super(n);or(this,"helmetData");this.helmetData=new _m(this.props.context||{},Zs.canUseDOM)}render(){return U.createElement(sk.Provider,{value:this.helmetData.value},this.props.children)}},or(Zs,"canUseDOM",rk),Zs),Oi=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Sn}]`),s=[].slice.call(r),o=[];let a;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d))if(d==="innerHTML")c.innerHTML=l.innerHTML;else if(d==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const u=d,h=typeof l[u]>"u"?"":l[u];c.setAttribute(d,h)}c.setAttribute(Sn,"true"),s.some((d,u)=>(a=u,c.isEqualNode(d)))?s.splice(a,1):o.push(c)}
40),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),o.forEach(l=>n.appendChild(l)),{oldTags:s,newTags:o}},Cm=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Sn),s=r?r.split(","):[],o=[...s],a=Object.keys(t);for(const l of a){const c=t[l]||"";n.getAttribute(l)!==c&&n.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const d=o.indexOf(l);d!==-1&&o.splice(d,1)}for(let l=o.length-1;l>=0;l-=1)n.removeAttribute(o[l]);s.length===o.length?n.removeAttribute(Sn):n.getAttribute(Sn)!==a.join(",")&&n.setAttribute(Sn,a.join(","))},bP=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=ek(e)),Cm("title",t)},_v=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:o,metaTags:a,noscriptTags:l,onChangeClientState:c,scriptTags:d,styleTags:u,title:h,titleAttributes:f}=e;Cm("body",r),Cm("html",s),bP(h,f);const m={baseTag:Oi("base",n),linkTags:Oi("link",o),metaTags:Oi("meta",a),noscriptTags:Oi("noscript",l),scriptTags:Oi("script",d),styleTags:Oi("style",u)},y={},p={};Object.keys(m).forEach(w=>{const{newTags:b,oldTags:g}=m[w];b.length&&(y[w]=b),g.length&&(p[w]=m[w].oldTags)}),t&&t(),c(e,y,p)},ka=null,wP=e=>{ka&&cancelAnimationFrame(ka),e.defer?ka=requestAnimationFrame(()=>{_v(e,()=>{ka=null})}):(_v(e),ka=null)},jP=wP,Cv=class extends x.Component{constructor(){super(...arguments);or(this,"rendered",!1)}shouldComponentUpdate(t){return!sP(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=uP(t.get().map(o=>{const a={...o.props};return delete a.context,a}));ik.canUseDOM?jP(s):Nm&&(r=Nm(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Af,kP=(Af=class extends x.Component{shouldComponentUpdate(e){return!eP(Nv(this.props,"helmetData"),Nv(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}warnOnInvalidChildren(e,t){return kv(Sv.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Sv.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),kv(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return U.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...o}=r.props,a=Object.keys(o).reduce((c,d)=>(c[iP[d]||d]=o[d],c),{});let{type:l}=r;
40switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(r,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,a,s);break;default:t=this.mapObjectTypeChildren(r,t,a,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof _m)){const s=r;r=new _m(s.context,!0),delete n.helmetData}return r?U.createElement(Cv,{...n,context:r.value}):U.createElement(sk.Consumer,null,s=>U.createElement(Cv,{...n,context:s}))}},or(Af,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Af),ea=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(){}},vi=typeof window>"u"||"Deno"in globalThis;function vt(){}function SP(e,t){return typeof e=="function"?e(t):e}function Tm(e){return typeof e=="number"&&e>=0&&e!==1/0}function ok(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ws(e,t){return typeof e=="function"?e(t):e}function Zt(e,t){return typeof e=="function"?e(t):e}function Tv(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==Bg(a,t.options))return!1}else if(!wl(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||o&&!o(t))}function Ev(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(bi(t.options.mutationKey)!==bi(o))return!1}else if(!wl(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Bg(e,t){return((t==null?void 0:t.queryKeyHashFn)||bi)(e)}function bi(e){return JSON.stringify(e,(t,n)=>Em(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function wl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>wl(e[n],t[n])):!1}function ak(e,t){if(e===t)return e;const n=Pv(e)&&Pv(t);if(n||Em(e)&&Em(t)){const r=n?e:Object.keys(e),s=r.length,o=n?t:Object.keys(t),a=o.length,l=n?[]:{},c=new Set(r);let d=0;for(let u=0;u<a;u++){const h=n?u:o[u];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,d++):(l[h]=ak(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&d++)}return s===a&&d===s?e:l}return t}function Gd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Pv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Em(e){if(!Av(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Av(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Av(e){return Object.prototype.toString.call(e)==="[object Object]"}function NP(e){return new Promise(t=>{setTimeout(t,e)})}function Pm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ak(e,t):t}function _P(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function CP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ug=Symbol();function lk(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ug?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ck(e,t){return typeof e=="function"?e(...t):!!e}var ei,Xr,_o,Ew,TP=(Ew=class extends ea{constructor(){super();ne(this,ei);ne(this,Xr);ne(this,_o);H(this,_o,t=>{if(!vi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Xr)||this.setEventListener(C(this,_o))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Xr))==null||t.call(this),H(this,Xr,void 0))}setEventListener(t){var n;
vendor: 5,128 bytes, line 40
40H(this,_o,t),(n=C(this,Xr))==null||n.call(this),H(this,Xr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,ei)!==t&&(H(this,ei,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,ei)=="boolean"?C(this,ei):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ei=new WeakMap,Xr=new WeakMap,_o=new WeakMap,Ew),zg=new TP,Co,Zr,To,Pw,EP=(Pw=class extends ea{constructor(){super();ne(this,Co,!0);ne(this,Zr);ne(this,To);H(this,To,t=>{if(!vi&&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(){C(this,Zr)||this.setEventListener(C(this,To))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Zr))==null||t.call(this),H(this,Zr,void 0))}setEventListener(t){var n;H(this,To,t),(n=C(this,Zr))==null||n.call(this),H(this,Zr,t(this.setOnline.bind(this)))}setOnline(t){C(this,Co)!==t&&(H(this,Co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,Co)}},Co=new WeakMap,Zr=new WeakMap,To=new WeakMap,Pw),Yd=new EP;function Am(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});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 PP(e){return Math.min(1e3*2**e,3e4)}function dk(e){return(e??"online")==="online"?Yd.isOnline():!0}var uk=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Vh(e){return e instanceof uk}function hk(e){let t=!1,n=0,r=!1,s;const o=Am(),a=p=>{var w;r||(f(new uk(p)),(w=e.abort)==null||w.call(e))},l=()=>{t=!0},c=()=>{t=!1},d=()=>zg.isFocused()&&(e.networkMode==="always"||Yd.isOnline())&&e.canRun(),u=()=>dk(e.networkMode)&&e.canRun(),h=p=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,p),s==null||s(),o.resolve(p))},f=p=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,p),s==null||s(),o.reject(p))},m=()=>new Promise(p=>{var w;s=b=>{(r||d())&&p(b)},(w=e.onPause)==null||w.call(e)}).then(()=>{var p;s=void 0,r||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(r)return;let p;const w=n===0?e.initialPromise:void 0;try{p=w??e.fn()}catch(b){p=Promise.reject(b)}Promise.resolve(p).then(h).catch(b=>{var S;if(r)return;const g=e.retry??(vi?0:3),v=e.retryDelay??PP,j=typeof v=="function"?v(n,b):v,k=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,b);if(t||!k){f(b);return}n++,(S=e.onFail)==null||S.call(e,n,b),NP(j).then(()=>d()?void 0:m()).then(()=>{t?f(b):y()})})};return{promise:o,cancel:a,continue:()=>(s==null||s(),o),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?y():m().then(y),o)}}var AP=e=>setTimeout(e,0);function RP(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=AP;const o=l=>{t?e.push(l):s(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Je=RP(),ti,Aw,fk=(Aw=class{constructor(){ne(this,ti)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Tm(this.gcTime)&&H(this,ti,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vi?1/0:5*60*1e3))}clearGcTimeout(){C(this,ti)&&(clearTimeout(C(this,ti)),H(this,ti,void 0))}},ti=new WeakMap,Aw),Eo,ni,Xt,ri,ft,Fl,si,bn,lr,Rw,MP=(Rw=class extends fk{constructor(t){super();ne(this,bn);ne(this,Eo);ne(this,ni);ne(this,Xt);ne(this,ri);ne(this,ft);ne(this,Fl);ne(this,si);H(this,si,!1),H(this,Fl,t.defaultOptions),this.setOptions(t.options),this.observers=[],H(this,ri,t.client),H(this,Xt,C(this,ri).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,H(this,Eo,OP(this.options)),this.state=t.state??C(this,Eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,ft))==null?void 0:t.promise}setOptions(t){this.options={...C(this,Fl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Xt).remove(this)}setData(t,n){const r=Pm(this.state.data,t,this.options);return ae(this,bn,lr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ae(this,bn,lr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=C(this,ft))==null?void 0:r.promise;return(s=C(this,ft))==null||s.cancel(t),n?n.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Eo))}isActive(){return this.observers.some(t=>Zt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ug||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 40
40Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ws(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ok(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Xt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,ft)&&(C(this,si)?C(this,ft).cancel({revert:!0}):C(this,ft).cancelRetry()),this.scheduleGc()),C(this,Xt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ae(this,bn,lr).call(this,{type:"invalidate"})}
vendor: 26,961 bytes, line 40
40fetch(t,n){var d,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,ft))return C(this,ft).continueRetry(),C(this,ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(H(this,si,!0),r.signal)})},o=()=>{const f=lk(this.options,n),y=(()=>{const p={client:C(this,ri),queryKey:this.queryKey,meta:this.meta};return s(p),p})();return H(this,si,!1),this.options.persister?this.options.persister(f,y,this):f(y)},l=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,ri),state:this.state,fetchFn:o};return s(f),f})();(d=this.options.behavior)==null||d.onFetch(l,this),H(this,ni,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=l.fetchOptions)==null?void 0:u.meta))&&ae(this,bn,lr).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=f=>{var m,y,p,w;Vh(f)&&f.silent||ae(this,bn,lr).call(this,{type:"error",error:f}),Vh(f)||((y=(m=C(this,Xt).config).onError)==null||y.call(m,f,this),(w=(p=C(this,Xt).config).onSettled)==null||w.call(p,this.state.data,f,this)),this.scheduleGc()};return H(this,ft,hk({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var m,y,p,w;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){c(b);return}(y=(m=C(this,Xt).config).onSuccess)==null||y.call(m,f,this),(w=(p=C(this,Xt).config).onSettled)==null||w.call(p,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,m)=>{ae(this,bn,lr).call(this,{type:"failed",failureCount:f,error:m})},onPause:()=>{ae(this,bn,lr).call(this,{type:"pause"})},onContinue:()=>{ae(this,bn,lr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),C(this,ft).start()}},Eo=new WeakMap,ni=new WeakMap,Xt=new WeakMap,ri=new WeakMap,ft=new WeakMap,Fl=new WeakMap,si=new WeakMap,bn=new WeakSet,lr=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,...mk(r.data,this.options),fetchMeta:t.meta??null};case"success":return H(this,ni,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 Vh(s)&&s.revert&&C(this,ni)?{...C(this,ni),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),Je.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,Xt).notify({query:this,type:"updated",action:t})})},Rw);function mk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function OP(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 Bn,Mw,IP=(Mw=class extends ea{constructor(t={}){super();ne(this,Bn);this.config=t,H(this,Bn,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Bg(s,n);let a=this.get(o);return a||(a=new MP({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){C(this,Bn).has(t.queryHash)||(C(this,Bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,Bn).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,Bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Je.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Bn).get(t)}getAll(){return[...C(this,Bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Tv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Tv(t,r)):n}notify(t){Je.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Je.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Je.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bn=new WeakMap,Mw),Un,gt,ii,zn,Ur,Ow,DP=(Ow=class extends fk{constructor(t){super();ne(this,zn);ne(this,Un);ne(this,gt);ne(this,ii);this.mutationId=t.mutationId,H(this,gt,t.mutationCache),H(this,Un,[]),this.state=t.state||pk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Un).includes(t)||(C(this,Un).push(t),this.clearGcTimeout(),C(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){H(this,Un,C(this,Un).filter(n=>n!==t)),this.scheduleGc(),C(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Un).length||(this.state.status==="pending"?this.scheduleGc():C(this,gt).remove(this))}continue(){var t;return((t=C(this,ii))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,c,d,u,h,f,m,y,p,w,b,g,v,j,k,S,N,T;const n=()=>{ae(this,zn,Ur).call(this,{type:"continue"})};H(this,ii,hk({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,P)=>{ae(this,zn,Ur).call(this,{type:"failed",failureCount:R,error:P})},onPause:()=>{ae(this,zn,Ur).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,gt).canRun(this)}));const r=this.state.status==="pending",s=!C(this,ii).canStart();try{if(r)n();else{ae(this,zn,Ur).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(o=C(this,gt).config).onMutate)==null?void 0:a.call(o,t,this));const P=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));P!==this.state.context&&ae(this,zn,Ur).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const R=await C(this,ii).start();return await((u=(d=C(this,gt).config).onSuccess)==null?void 0:u.call(d,R,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,R,t,this.state.context)),await((y=(m=C(this,gt).config).onSettled)==null?void 0:y.call(m,R,null,this.state.variables,this.state.context,this)),await((w=(p=this.options).onSettled)==null?void 0:w.call(p,R,null,t,this.state.context)),ae(this,zn,Ur).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(b=C(this,gt).config).onError)==null?void 0:g.call(b,R,t,this.state.context,this)),await((j=(v=this.options).onError)==null?void 0:j.call(v,R,t,this.state.context)),await((S=(k=C(this,gt).config).onSettled)==null?void 0:S.call(k,void 0,R,this.state.variables,this.state.context,this)),await((T=(N=this.options).onSettled)==null?void 0:T.call(N,void 0,R,t,this.state.context)),R}finally{ae(this,zn,Ur).call(this,{type:"error",error:R})}}finally{C(this,gt).runNext(this)}}},Un=new WeakMap,gt=new WeakMap,ii=new WeakMap,zn=new WeakSet,Ur=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),Je.batch(()=>{C(this,Un).forEach(r=>{r.onMutationUpdate(t)}),C(this,gt).notify({mutation:this,type:"updated",action:t})})},Ow);function pk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fr,wn,Bl,Iw,LP=(Iw=class extends ea{constructor(t={}){super();ne(this,fr);ne(this,wn);ne(this,Bl);this.config=t,H(this,fr,new Set),H(this,wn,new Map),H(this,Bl,0)}build(t,n,r){const s=new DP({mutationCache:this,mutationId:++ac(this,Bl)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){C(this,fr).add(t);const n=_c(t);if(typeof n=="string"){const r=C(this,wn).get(n);r?r.push(t):C(this,wn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,fr).delete(t)){const n=_c(t);if(typeof n=="string"){const r=C(this,wn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&C(this,wn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_c(t);if(typeof n=="string"){const r=C(this,wn).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=_c(t);if(typeof n=="string"){const s=(r=C(this,wn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Je.batch(()=>{C(this,fr).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,fr).clear(),C(this,wn).clear()})}getAll(){return Array.from(C(this,fr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ev(n,r))}findAll(t={}){return this.getAll().filter(n=>Ev(t,n))}notify(t){Je.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Je.batch(()=>Promise.all(t.map(n=>n.continue().catch(vt))))}},fr=new WeakMap,wn=new WeakMap,Bl=new WeakMap,Iw);function _c(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Rv(e){return{onFetch:(t,n)=>{var u,h,f,m,y;const r=t.options,s=(f=(h=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let p=!1;const w=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},b=lk(t.options,t.fetchOptions),g=async(v,j,k)=>{if(p)return Promise.reject();if(j==null&&v.pages.length)return Promise.resolve(v);const N=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};return w(F),F})(),T=await b(N),{maxPages:R}=t.options,P=k?CP:_P;return{pages:P(v.pages,T,R),pageParams:P(v.pageParams,j,R)}};if(s&&o.length){const v=s==="backward",j=v?$P:Mv,k={pages:o,pageParams:a},S=j(r,k);l=await g(k,S,v)}else{const v=e??o.length;do{const j=c===0?a[0]??r.initialPageParam:Mv(r,l);if(c>0&&j==null)break;l=await g(l,j),c++}while(c<v)}return l};t.options.persister?t.fetchFn=()=>{var p,w;return(w=(p=t.options).persister)==null?void 0:w.call(p,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function Mv(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 $P(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 $e,es,ts,Po,Ao,ns,Ro,Mo,Dw,FP=(Dw=class{constructor(e={}){ne(this,$e);ne(this,es);ne(this,ts);ne(this,Po);ne(this,Ao);ne(this,ns);ne(this,Ro);ne(this,Mo);H(this,$e,e.queryCache||new IP),H(this,es,e.mutationCache||new LP),H(this,ts,e.defaultOptions||{}),H(this,Po,new Map),H(this,Ao,new Map),H(this,ns,0)}mount(){ac(this,ns)._++,C(this,ns)===1&&(H(this,Ro,zg.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,$e).onFocus())})),H(this,Mo,Yd.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,$e).onOnline())})))}unmount(){var e,t;ac(this,ns)._--,C(this,ns)===0&&((e=C(this,Ro))==null||e.call(this),H(this,Ro,void 0),(t=C(this,Mo))==null||t.call(this),H(this,Mo,void 0))}isFetching(e){return C(this,$e).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,es).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,$e).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,$e).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ws(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,$e).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=C(this,$e).get(r.queryHash),o=s==null?void 0:s.state.data,a=SP(t,o);if(a!==void 0)return C(this,$e).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Je.batch(()=>C(this,$e).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,$e).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,$e);Je.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,$e);return Je.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Je.batch(()=>C(this,$e).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(e,t={}){return Je.batch(()=>(C(this,$e).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=Je.batch(()=>C(this,$e).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(vt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(vt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,$e).build(this,t);return n.isStaleByTime(ws(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vt).catch(vt)}fetchInfiniteQuery(e){return e.behavior=Rv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vt).catch(vt)}ensureInfiniteQueryData(e){return e.behavior=Rv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yd.isOnline()?C(this,es).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,$e)}getMutationCache(){return C(this,es)}getDefaultOptions(){return C(this,ts)}setDefaultOptions(e){H(this,ts,e)}setQueryDefaults(e,t){C(this,Po).set(bi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Po).values()],n={};return t.forEach(r=>{wl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Ao).set(bi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Ao).values()],n={};return t.forEach(r=>{wl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,ts).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bg(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===Ug&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,ts).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,$e).clear(),C(this,es).clear()}},$e=new WeakMap,es=new WeakMap,ts=new WeakMap,Po=new WeakMap,Ao=new WeakMap,ns=new WeakMap,Ro=new WeakMap,Mo=new WeakMap,Dw),Ct,de,Ul,yt,oi,Oo,rs,ss,zl,Io,Do,ai,li,is,Lo,fe,Da,Rm,Mm,Om,Im,Dm,Lm,$m,gk,Lw,BP=(Lw=class extends ea{constructor(t,n){super();ne(this,fe);ne(this,Ct);ne(this,de);ne(this,Ul);ne(this,yt);ne(this,oi);ne(this,Oo);ne(this,rs);ne(this,ss);ne(this,zl);ne(this,Io);ne(this,Do);ne(this,ai);ne(this,li);ne(this,is);ne(this,Lo,new Set);this.options=n,H(this,Ct,t),H(this,ss,null),H(this,rs,Am()),this.options.experimental_prefetchInRender||C(this,rs).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,de).addObserver(this),Ov(C(this,de),this.options)?ae(this,fe,Da).call(this):this.updateResult(),ae(this,fe,Im).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fm(C(this,de),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fm(C(this,de),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ae(this,fe,Dm).call(this),ae(this,fe,Lm).call(this),C(this,de).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,de);if(this.options=C(this,Ct).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zt(this.options.enabled,C(this,de))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ae(this,fe,$m).call(this),C(this,de).setOptions(this.options),n._defaulted&&!Gd(this.options,n)&&C(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,de),observer:this});const s=this.hasListeners();s&&Iv(C(this,de),r,this.options,n)&&ae(this,fe,Da).call(this),this.updateResult(),s&&(C(this,de)!==r||Zt(this.options.enabled,C(this,de))!==Zt(n.enabled,C(this,de))||ws(this.options.staleTime,C(this,de))!==ws(n.staleTime,C(this,de)))&&ae(this,fe,Rm).call(this);const o=ae(this,fe,Mm).call(this);s&&(C(this,de)!==r||Zt(this.options.enabled,C(this,de))!==Zt(n.enabled,C(this,de))||o!==C(this,is))&&ae(this,fe,Om).call(this,o)}getOptimisticResult(t){const n=C(this,Ct).getQueryCache().build(C(this,Ct),t),r=this.createResult(n,t);return zP(this,r)&&(H(this,yt,r),H(this,Oo,this.options),H(this,oi,C(this,de).state)),r}getCurrentResult(){return C(this,yt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){C(this,Lo).add(t)}getCurrentQuery(){return C(this,de)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Ct).defaultQueryOptions(t),r=C(this,Ct).getQueryCache().build(C(this,Ct),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ae(this,fe,Da).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,yt)))}createResult(t,n){var R;const r=C(this,de),s=this.options,o=C(this,yt),a=C(this,oi),l=C(this,Oo),d=t!==r?t.state:C(this,Ul),{state:u}=t;let h={...u},f=!1,m;if(n._optimisticResults){const P=this.hasListeners(),F=!P&&Ov(t,n),O=P&&Iv(t,r,n,s);(F||O)&&(h={...h,...mk(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:w}=h;m=h.data;let b=!1;if(n.placeholderData!==void 0&&m===void 0&&w==="pending"){let P;o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(P=o.data,b=!0):P=typeof n.placeholderData=="function"?n.placeholderData((R=C(this,Do))==null?void 0:R.state.data,C(this,Do)):n.placeholderData,P!==void 0&&(w="success",m=Pm(o==null?void 0:o.data,P,n),f=!0)}if(n.select&&m!==void 0&&!b)if(o&&m===(a==null?void 0:a.data)&&n.select===C(this,zl))m=C(this,Io);else try{H(this,zl,n.select),m=n.select(m),m=Pm(o==null?void 0:o.data,m,n),H(this,Io,m),H(this,ss,null)}catch(P){H(this,ss,P)}C(this,ss)&&(y=C(this,ss),m=C(this,Io),p=Date.now(),w="error");const g=h.fetchStatus==="fetching",v=w==="pending",j=w==="error",k=v&&g,S=m!==void 0,T={status:w,fetchStatus:h.fetchStatus,isPending:v,isSuccess:w==="success",isError:j,isInitialLoading:k,isLoading:k,data:m,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:g,isRefetching:g&&!v,isLoadingError:j&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:j&&S,isStale:Vg(t,n),refetch:this.refetch,promise:C(this,rs),isEnabled:Zt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=V=>{T.status==="error"?V.reject(T.error):T.data!==void 0&&V.resolve(T.data)},F=()=>{const V=H(this,rs,T.promise=Am());P(V)},O=C(this,rs);switch(O.status){case"pending":t.queryHash===r.queryHash&&P(O);break;case"fulfilled":(T.status==="error"||T.data!==O.value)&&F();break;case"rejected":(T.status!=="error"||T.error!==O.reason)&&F();break}}return T}updateResult(){const t=C(this,yt),n=this.createResult(C(this,de),this.options);if(H(this,oi,C(this,de).state),H(this,Oo,this.options),C(this,oi).data!==void 0&&H(this,Do,C(this,de)),Gd(n,t))return;H(this,yt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!C(this,Lo).size)return!0;const a=new Set(o??C(this,Lo));return this.options.throwOnError&&a.add("error"),Object.keys(C(this,yt)).some(l=>{const c=l;return C(this,yt)[c]!==t[c]&&a.has(c)})};ae(this,fe,gk).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ae(this,fe,Im).call(this)}},Ct=new WeakMap,de=new WeakMap,Ul=new WeakMap,yt=new WeakMap,oi=new WeakMap,Oo=new WeakMap,rs=new WeakMap,ss=new WeakMap,zl=new WeakMap,Io=new WeakMap,Do=new WeakMap,ai=new WeakMap,li=new WeakMap,is=new WeakMap,Lo=new WeakMap,fe=new WeakSet,Da=function(t){ae(this,fe,$m).call(this);let n=C(this,de).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(vt)),n},Rm=function(){ae(this,fe,Dm).call(this);const t=ws(this.options.staleTime,C(this,de));if(vi||C(this,yt).isStale||!Tm(t))return;const r=ok(C(this,yt).dataUpdatedAt,t)+1;H(this,ai,setTimeout(()=>{C(this,yt).isStale||this.updateResult()},r))},Mm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,de)):this.options.refetchInterval)??!1},Om=function(t){ae(this,fe,Lm).call(this),H(this,is,t),!(vi||Zt(this.options.enabled,C(this,de))===!1||!Tm(C(this,is))||C(this,is)===0)&&H(this,li,setInterval(()=>{(this.options.refetchIntervalInBackground||zg.isFocused())&&ae(this,fe,Da).call(this)},C(this,is)))},Im=function(){ae(this,fe,Rm).call(this),ae(this,fe,Om).call(this,ae(this,fe,Mm).call(this))},Dm=function(){C(this,ai)&&(clearTimeout(C(this,ai)),H(this,ai,void 0))},Lm=function(){C(this,li)&&(clearInterval(C(this,li)),H(this,li,void 0))},$m=function(){const t=C(this,Ct).getQueryCache().build(C(this,Ct),this.options);if(t===C(this,de))return;const n=C(this,de);H(this,de,t),H(this,Ul,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},gk=function(t){Je.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,yt))}),C(this,Ct).getQueryCache().notify({query:C(this,de),type:"observerResultsUpdated"})})},Lw);function UP(e,t){return Zt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ov(e,t){return UP(e,t)||e.state.data!==void 0&&Fm(e,t,t.refetchOnMount)}function Fm(e,t,n){if(Zt(t.enabled,e)!==!1&&ws(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Vg(e,t)}return!1}function Iv(e,t,n,r){return(e!==t||Zt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Vg(e,n)}function Vg(e,t){return Zt(t.enabled,e)!==!1&&e.isStaleByTime(ws(t.staleTime,e))}function zP(e,t){return!Gd(e.getCurrentResult(),t)}var os,as,Tt,mr,vr,cd,Bm,$w,VP=($w=class extends ea{constructor(n,r){super();ne(this,vr);ne(this,os);ne(this,as);ne(this,Tt);ne(this,mr);H(this,os,n),this.setOptions(r),this.bindMethods(),ae(this,vr,cd).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=C(this,os).defaultMutationOptions(n),Gd(this.options,r)||C(this,os).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Tt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&bi(r.mutationKey)!==bi(this.options.mutationKey)?this.reset():((s=C(this,Tt))==null?void 0:s.state.status)==="pending"&&C(this,Tt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Tt))==null||n.removeObserver(this)}onMutationUpdate(n){ae(this,vr,cd).call(this),ae(this,vr,Bm).call(this,n)}getCurrentResult(){return C(this,as)}reset(){var n;(n=C(this,Tt))==null||n.removeObserver(this),H(this,Tt,void 0),ae(this,vr,cd).call(this),ae(this,vr,Bm).call(this)}mutate(n,r){var s;return H(this,mr,r),(s=C(this,Tt))==null||s.removeObserver(this),H(this,Tt,C(this,os).getMutationCache().build(C(this,os),this.options)),C(this,Tt).addObserver(this),C(this,Tt).execute(n)}},os=new WeakMap,as=new WeakMap,Tt=new WeakMap,mr=new WeakMap,vr=new WeakSet,cd=function(){var r;const n=((r=C(this,Tt))==null?void 0:r.state)??pk();H(this,as,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Bm=function(n){Je.batch(()=>{var r,s,o,a,l,c,d,u;if(C(this,mr)&&this.hasListeners()){const h=C(this,as).variables,f=C(this,as).context;(n==null?void 0:n.type)==="success"?((s=(r=C(this,mr)).onSuccess)==null||s.call(r,n.data,h,f),(a=(o=C(this,mr)).onSettled)==null||a.call(o,n.data,null,h,f)):(n==null?void 0:n.type)==="error"&&((c=(l=C(this,mr)).onError)==null||c.call(l,n.error,h,f),(u=(d=C(this,mr)).onSettled)==null||u.call(d,void 0,n.error,h,f))}this.listeners.forEach(h=>{h(C(this,as))})})},$w),yk=x.createContext(void 0),Du=e=>{const t=x.useContext(yk);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},WP=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(yk.Provider,{value:e,children:t})),xk=x.createContext(!1),HP=()=>x.useContext(xk);xk.Provider;function qP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
40var KP=x.createContext(qP()),GP=()=>x.useContext(KP),YP=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},JP=e=>{x.useEffect(()=>{e.clearReset()},[e])},QP=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||ck(n,[e.error,r])),XP=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ZP=(e,t)=>e.isLoading&&e.isFetching&&!t,eA=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Dv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function tA(e,t,n){var h,f,m,y,p;const r=HP(),s=GP(),o=Du(),a=o.defaultQueryOptions(e);(f=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||f.call(h,a),a._optimisticResults=r?"isRestoring":"optimistic",XP(a),YP(a,s),JP(s);const l=!o.getQueryCache().get(a.queryHash),[c]=x.useState(()=>new t(o,a)),d=c.getOptimisticResult(a),u=!r&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(w=>{const b=u?c.subscribe(Je.batchCalls(w)):vt;return c.updateResult(),b},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),x.useEffect(()=>{c.setOptions(a)},[a,c]),eA(a,d))throw Dv(a,c,s);if(QP({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:o.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((y=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||y.call(m,a,d),a.experimental_prefetchInRender&&!vi&&ZP(d,r)){const w=l?Dv(a,c,s):(p=o.getQueryCache().get(a.queryHash))==null?void 0:p.promise;w==null||w.catch(vt).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function At(e,t){return tA(e,BP)}function vk(e,t){const n=Du(),[r]=x.useState(()=>new VP(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const s=x.useSyncExternalStore(x.useCallback(a=>r.subscribe(Je.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=x.useCallback((a,l)=>{r.mutate(a,l).catch(vt)},[r]);if(s.error&&ck(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/** 41 * @remix-run/router v1.23.0 42 * 43 * Copyright (c) Remix Software Inc. 44 * 45 * This source code is licensed under the MIT license found in the 46 * LICENSE.md file in the root directory of this source tree. 47 * 48 * @license MIT 49 */function jl(){return jl=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},jl.apply(this,arguments)}var ds;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ds||(ds={}));const Lv="popstate";function nA(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:a,hash:l}=r.location;return Um("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Jd(s)}return sA(t,n,null,e)}function ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bk(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rA(){return Math.random().toString(36).substr(2,8)}function $v(e,t){return{usr:e.state,key:e.key,idx:t}}function Um(e,t,n,r){return n===void 0&&(n=null),jl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ta(t):t,{state:n,key:t&&t.key||r||rA()})}function Jd(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 ta(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 sA(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,a=s.history,l=ds.Pop,c=null,d=u();d==null&&(d=0,a.replaceState(jl({},a.state,{idx:d}),""));function u(){return(a.state||{idx:null}).idx}function h(){l=ds.Pop;let w=u(),b=w==null?null:w-d;d=w,c&&c({action:l,location:p.location,delta:b})}function f(w,b){l=ds.Push;let g=Um(p.location,w,b);d=u()+1;let v=$v(g,d),j=p.createHref(g);try{a.pushState(v,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(j)}o&&c&&c({action:l,location:p.location,delta:1})}function m(w,b){l=ds.Replace;let g=Um(p.location,w,b);d=u();let v=$v(g,d),j=p.createHref(g);a.replaceState(v,"",j),o&&c&&c({action:l,location:p.location,delta:0})}function y(w){let b=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof w=="string"?w:Jd(w);return g=g.replace(/ $/,"%20"),ze(b,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,b)}let p={get action(){return l},get location(){return e(s,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Lv,h),c=w,()=>{s.removeEventListener(Lv,h),c=null}},createHref(w){return t(s,w)},createURL:y,encodeLocation(w){let b=y(w);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(w){return a.go(w)}};return p}var Fv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Fv||(Fv={}));function iA(e,t,n){return n===void 0&&(n="/"),oA(e,t,n,!1)}function oA(e,t,n,r){let s=typeof t=="string"?ta(t):t,o=Wg(s.pathname||"/",n);if(o==null)return null;let a=wk(e);aA(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let d=xA(o);l=gA(a[c],d,r)}return l}function wk(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,a,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(ze(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=js([r,c.relativePath]),u=n.concat(c);o.children&&o.children.length>0&&(ze(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),wk(o.children,t,u,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:mA(d,o.index),routesMeta:u})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of jk(o.path))s(o,a,c)}),t}function jk(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let a=jk(r.join("/")),l=[];return l.push(...a.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function aA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:pA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lA=/^:[\w-]+$/,cA=3,dA=2,uA=1,hA=10,fA=-2,Bv=e=>e==="*";function mA(e,t){let n=e.split("/"),r=n.length;return n.some(Bv)&&(r+=fA),t&&(r+=dA),n.filter(s=>!Bv(s)).reduce((s,o)=>s+(lA.test(o)?cA:o===""?uA:hA),r)}function pA(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 gA(e,t,n){let{routesMeta:r}=e,s={},o="/",a=[];for(let l=0;l<r.length;++l){let c=r[l],d=l===r.length-1,u=o==="/"?t:t.slice(o.length)||"/",h=Uv({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},u),f=c.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=Uv({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!h)return null;
vendor: 9,263 bytes, lines 49-58
49Object.assign(s,h.params),a.push({params:s,pathname:js([o,h.pathname]),pathnameBase:jA(js([o,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(o=js([o,h.pathnameBase]))}return a}function Uv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yA(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((d,u,h)=>{let{paramName:f,isOptional:m}=u;if(f==="*"){let p=l[h]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const y=l[h];return m&&!y?d[f]=void 0:d[f]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:a,pattern:e}}function yA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),bk(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,l,c)=>(r.push({paramName:l,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 xA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return bk(!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 Wg(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 vA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ta(e):e;return{pathname:n?n.startsWith("/")?n:bA(n,t):t,search:kA(r),hash:SA(s)}}function bA(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 Wh(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 wA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Hg(e,t){let n=wA(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function qg(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ta(e):(s=jl({},e),ze(!s.pathname||!s.pathname.includes("?"),Wh("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),Wh("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),Wh("#","search","hash",s)));let o=e===""||s.pathname==="",a=o?"/":s.pathname,l;if(a==null)l=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("/")}l=h>=0?t[h]:"/"}let c=vA(s,l),d=a&&a!=="/"&&a.endsWith("/"),u=(o||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||u)&&(c.pathname+="/"),c}const js=e=>e.join("/").replace(/\/\/+/g,"/"),jA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function NA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const kk=["post","put","patch","delete"];new Set(kk);const _A=["get",...kk];new Set(_A);/** 50 * React Router v6.30.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */function kl(){return kl=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},kl.apply(this,arguments)}const Kg=x.createContext(null),CA=x.createContext(null),Os=x.createContext(null),Lu=x.createContext(null),Er=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Sk=x.createContext(null);function TA(e,t){let{relative:n}=t===void 0?{}:t;na()||ze(!1);let{basename:r,navigator:s}=x.useContext(Os),{hash:o,pathname:a,search:l}=Ck(e,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:js([r,a])),s.createHref({pathname:c,search:l,hash:o})}function na(){return x.useContext(Lu)!=null}function Pr(){return na()||ze(!1),x.useContext(Lu).location}function Nk(e){x.useContext(Os).static||x.useLayoutEffect(e)}function Mn(){let{isDataRoute:e}=x.useContext(Er);return e?UA():EA()}function EA(){na()||ze(!1);let e=x.useContext(Kg),{basename:t,future:n,navigator:r}=x.useContext(Os),{matches:s}=x.useContext(Er),{pathname:o}=Pr(),a=JSON.stringify(Hg(s,n.v7_relativeSplatPath)),l=x.useRef(!1);return Nk(()=>{l.current=!0}),x.useCallback(function(d,u){if(u===void 0&&(u={}),!l.current)return;if(typeof d=="number"){r.go(d);return}let h=qg(d,JSON.parse(a),o,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:js([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,a,o,e])}function _k(){let{matches:e}=x.useContext(Er),t=e[e.length-1];return t?t.params:{}}function Ck(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Os),{matches:s}=x.useContext(Er),{pathname:o}=Pr(),a=JSON.stringify(Hg(s,r.v7_relativeSplatPath));return x.useMemo(()=>qg(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function PA(e,t){return AA(e,t)}function AA(e,t,n,r){na()||ze(!1);let{navigator:s}=x.useContext(Os),{matches:o}=x.useContext(Er),a=o[o.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let d=Pr(),u;if(t){var h;let w=typeof t=="string"?ta(t):t;c==="/"||(h=w.pathname)!=null&&h.startsWith(c)||ze(!1),u=w}else u=d;let f=u.pathname||"/",m=f;if(c!=="/"){let w=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=iA(e,{pathname:m}),p=DA(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:js([c,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:js([c,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&p?x.createElement(Lu.Provider,{value:{location:kl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ds.Pop}},p):p}function RA(){let e=BA(),t=NA(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const MA=x.createElement(RA,null);class OA extends x.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?x.createElement(Er.Provider,{value:this.props.routeContext},x.createElement(Sk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function IA(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(Kg);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Er.Provider,{value:t},r)}function DA(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let u=a.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);u>=0||ze(!1),a=a.slice(0,Math.min(a.length,u+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<a.length;u++){let h=a[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=u),h.route.id){let{loaderData:f,errors:m}=n,y=h.route.loader&&f[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||y){c=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((u,h,f)=>{let m,y=!1,p=null,w=null;n&&(m=l&&h.route.id?l[h.route.id]:void 0,p=h.route.errorElement||MA,c&&(d<0&&f===0?(y=!0,w=null):d===f&&(y=!0,w=h.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,f+1)),g=()=>{let v;return m?v=p:y?v=w:h.route.Component?v=x.createElement(h.route.Component,null):h.route.element?v=h.route.element:v=u,x.createElement(IA,{match:h,routeC
58ontext:{outlet:u,matches:b,isDataRoute:n!=null},children:v})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?x.createElement(OA,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:g(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):g()},null)}var Tk=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Tk||{}),Qd=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}(Qd||{});function LA(e){let t=x.useContext(Kg);return t||ze(!1),t}function $A(e){let t=x.useContext(CA);return t||ze(!1),t}function FA(e){let t=x.useContext(Er);return t||ze(!1),t}function Ek(e){let t=FA(),n=t.matches[t.matches.length-1];return n.route.id||ze(!1),n.route.id}function BA(){var e;let t=x.useContext(Sk),n=$A(Qd.UseRouteError),r=Ek(Qd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function UA(){let{router:e}=LA(Tk.UseNavigateStable),t=Ek(Qd.UseNavigateStable),n=x.useRef(!1);return Nk(()=>{n.current=!0}),x.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,kl({fromRouteId:t},o)))},[e,t])}function zA(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function VA(e){let{to:t,replace:n,state:r,relative:s}=e;na()||ze(!1);let{future:o,static:a}=x.useContext(Os),{matches:l}=x.useContext(Er),{pathname:c}=Pr(),d=Mn(),u=qg(t,Hg(l,o.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(u);return x.useEffect(()=>d(JSON.parse(h),{replace:n,state:r,relative:s}),[d,h,s,n,r]),null}function me(e){ze(!1)}function WA(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ds.Pop,navigator:o,static:a=!1,future:l}=e;na()&&ze(!1);let c=t.replace(/^\/*/,"/"),d=x.useMemo(()=>({basename:c,navigator:o,static:a,future:kl({v7_relativeSplatPath:!1},l)}),[c,l,o,a]);typeof r=="string"&&(r=ta(r));let{pathname:u="/",search:h="",hash:f="",state:m=null,key:y="default"}=r,p=x.useMemo(()=>{let w=Wg(u,c);return w==null?null:{location:{pathname:w,search:h,hash:f,state:m,key:y},navigationType:s}},[c,u,h,f,m,y,s]);return p==null?null:x.createElement(Os.Provider,{value:d},x.createElement(Lu.Provider,{children:n,value:p}))}function HA(e){let{children:t,location:n}=e;return PA(zm(t),n)}new Promise(()=>{});function zm(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let o=[...t,s];if(r.type===x.Fragment){n.push.apply(n,zm(r.props.children,o));return}r.type!==me&&ze(!1),!r.props.index||!r.props.children||ze(!1);let a={id:r.props.id||o.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=zm(r.props.children,o)),n.push(a)}),n}/** 59 * React Router DOM v6.30.1 60 * 61 * Copyright (c) Remix Software Inc. 62 * 63 * This source code is licensed under the MIT license found in the 64 * LICENSE.md file in the root directory of this source tree. 65 * 66 * @license MIT 67 */function Vm(){return Vm=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},Vm.apply(this,arguments)}function qA(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function KA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function GA(e,t){return e.button===0&&(!t||t==="_self")&&!KA(e)}function Wm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function YA(e,t){let n=Wm(e);return t&&t.forEach((r,s)=>
67{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const JA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],QA="6";try{window.__reactRouterVersion=QA}catch{}const XA="startTransition",zv=Gp[XA];function ZA(e){let{basename:t,children:n,future:r,window:s}=e,o=x.useRef();o.current==null&&(o.current=nA({window:s,v5Compat:!0}));let a=o.current,[l,c]=x.useState({action:a.action,location:a.location}),{v7_startTransition:d}=r||{},u=x.useCallback(h=>{d&&zv?zv(()=>c(h)):c(h)},[c,d]);return x.useLayoutEffect(()=>a.listen(u),[a,u]),x.useEffect(()=>zA(r),[r]),x.createElement(WA,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const e4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",t4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xe=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:a,state:l,target:c,to:d,preventScrollReset:u,viewTransition:h}=t,f=qA(t,JA),{basename:m}=x.useContext(Os),y,p=!1;if(typeof d=="string"&&t4.test(d)&&(y=d,e4))try{let v=new URL(window.location.href),j=d.startsWith("//")?new URL(v.protocol+d):new URL(d),k=Wg(j.pathname,m);j.origin===v.origin&&k!=null?d=k+j.search+j.hash:p=!0}catch{}let w=TA(d,{relative:s}),b=n4(d,{replace:a,state:l,target:c,preventScrollReset:u,relative:s,viewTransition:h});function g(v){r&&r(v),v.defaultPrevented||b(v)}return x.createElement("a",Vm({},f,{href:y||w,onClick:p||o?r:g,ref:n,target:c}))});var Vv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Vv||(Vv={}));var Wv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Wv||(Wv={}));function n4(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:a,viewTransition:l}=t===void 0?{}:t,c=Mn(),d=Pr(),u=Ck(e,{relative:a});return x.useCallback(h=>{if(GA(h,n)){h.preventDefault();let f=r!==void 0?r:Jd(d)===Jd(u);c(e,{replace:f,state:s,preventScrollReset:o,relative:a,viewTransition:l})}},[d,c,u,r,s,n,e,o,a,l])}function Gg(e){let t=x.useRef(Wm(e)),n=x.useRef(!1),r=Pr(),s=x.useMemo(()=>YA(r.search,n.current?null:t.current),[r.search]),o=Mn(),a=x.useCallback((l,c)=>{const d=Wm(typeof l=="function"?l(s):l);n.current=!0,o("?"+d,c)},[o,s]);return[s,a]}var Hv=["light","dark"],r4="(prefers-color-scheme: dark)",s4=x.createContext(void 0),i4={setTheme:e=>{},themes:[]},o4=()=>{var e;return(e=x.useContext(s4))!=null?e:i4};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:a,attrs:l,nonce:c})=>{let d=o==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Hv.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,p=!1,w=!0)=>{let b=a?a[y]:y,g=p?y+"|| ''":`'${b}'`,v="";return s&&w&&!p&&Hv.includes(y)&&(v+=`d.style.colorScheme = '${y}';`),n==="class"?p||b?v+=`c.add(${g})`:v+="null":b&&(v+=`d[s](n,${g})`),v},m=e?`!function(){${u}${f(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${r4}',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)}}${d?"":"else{"+f(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(o,!1,!1)};}${h}}catch(t){}}();`;return x.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var a4=e=>{switch(e){case"success":return d4;case"info":return h4;case"warning":return u4;case"error":return f4;default:return null}},l4=Array(12).fill(0),c4=({visible:e,className:t})=>U.createElement("div",{className:["sonner-loading-wrapper",t].filter(
67Boolean).join(" "),"data-visible":e},U.createElement("div",{className:"sonner-spinner"},l4.map((n,r)=>U.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),d4=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),u4=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},U.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"})),h4=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),f4=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),m4=U.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"},U.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),U.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),p4=()=>{let[e,t]=U.useState(document.hidden);return U.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Hm=1,g4=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:Hm++,o=this.toasts.find(l=>l.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:a,title:n}):l):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)=>
67this.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,o,a=r.then(async c=>{if(o=["resolve",c],U.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(x4(c)&&!c.ok){s=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:d,description:u})}else if(t.success!==void 0){s=!1;let d=typeof t.success=="function"?await t.success(c):t.success,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:d,description:u})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let d=typeof t.error=="function"?await t.error(c):t.error,u=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:d,description:u})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,d)=>a.then(()=>o[0]==="reject"?d(o[1]):c(o[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Hm++;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}},Et=new g4,y4=(e,t)=>{let n=(t==null?void 0:t.id)||Hm++;return Et.addToast({title:e,...t,id:n}),n},x4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",v4=y4,b4=()=>Et.toasts,w4=()=>Et.getActiveToasts(),Xd=Object.assign(v4,{success:Et.success,info:Et.info,warning:Et.warning,error:Et.error,custom:Et.custom,message:Et.message,promise:Et.promise,dismiss:Et.dismiss,loading:Et.loading},{getHistory:b4,getToasts:w4});function j4(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))}j4(`: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;
67left: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}
67: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%);
67--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%)} 68`);function Cc(e){return e.label!==void 0}var k4=3,S4="32px",N4="16px",qv=4e3,_4=356,C4=14,T4=20,E4=200;function mn(...e){return e.filter(Boolean).join(" ")}function P4(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var A4=e=>{var t,n,r,s,o,a,l,c,d,u,h;let{invert:f,toast:m,unstyled:y,interacting:p,setHeights:w,visibleToasts:b,heights:g,index:v,toasts:j,expanded:k,removeToast:S,defaultRichColors:N,closeButton:T,style:R,cancelButtonStyle:P,actionButtonStyle:F,className:O="",descriptionClassName:V="",duration:A,position:I,gap:z,loadingIcon:q,expandByDefault:_,classNames:E,icons:D,closeButtonAriaLabel:G="Close toast",pauseWhenPageIsHidden:W}=e,[se,L]=U.useState(null),[M,X]=U.useState(null),[Z,be]=U.useState(!1),[le,Re]=U.useState(!1),[Rr,Ti]=U.useState(!1),[Mr,sc]=U.useState(!1),[ch,ic]=U.useState(!1),[dh,ha]=U.useState(0),[Ei,ax]=U.useState(0),fa=U.useRef(m.duration||A||qv),lx=U.useRef(null),Ds=U.useRef(null),hC=v===0,fC=v+1<=b,Jt=m.type,Pi=m.dismissible!==!1,mC=m.className||"",pC=m.descriptionClassName||"",oc=U.useMemo(()=>g.findIndex(ie=>ie.toastId===m.id)||0,[g,m.id]),gC=U.useMemo(()=>{var ie;return(ie=m.closeButton)!=null?ie:T},[m.closeButton,T]),cx=U.useMemo(()=>m.duration||A||qv,[m.duration,A]),uh=U.useRef(0),Ai=U.useRef(0),dx=U.useRef(0),Ri=U.useRef(null),[yC,xC]=I.split("-"),ux=U.useMemo(()=>g.reduce((ie,ye,Te)=>Te>=oc?ie:ie+ye.height,0),[g,oc]),hx=p4(),vC=m.invert||f,hh=Jt==="loading";Ai.current=U.useMemo(()=>oc*z+ux,[oc,ux]),U.useEffect(()=>{fa.current=cx},[cx]),U.useEffect(()=>{be(!0)},[]),U.useEffect(()=>{let ie=Ds.current;if(ie){let ye=ie.getBoundingClientRect().height;return ax(ye),w(Te=>[{toastId:m.id,height:ye,position:m.position},...Te]),()=>w(Te=>Te.filter(dn=>dn.toastId!==m.id))}},[w,m.id]),U.useLayoutEffect(()=>{if(!Z)return;let ie=Ds.current,ye=ie.style.height;ie.style.height="auto";let Te=ie.getBoundingClientRect().height;ie.style.height=ye,ax(Te),w(dn=>dn.find(un=>un.toastId===m.id)?dn.map(un=>un.toastId===m.id?{...un,height:Te}:un):[{toastId:m.id,height:Te,position:m.position},...dn])},[Z,m.title,m.description,w,m.id]);let Or=U.useCallback(()=>{Re(!0),ha(Ai.current),w(ie=>ie.filter(ye=>ye.toastId!==m.id)),setTimeout(()=>{S(m)},E4)},[m,S,w,Ai]);U.useEffect(()=>{if(m.promise&&Jt==="loading"||m.duration===1/0||m.type==="loading")return;let ie;return k||p||W&&hx?(()=>{if(dx.current<uh.current){let ye=new Date().getTime()-uh.current;fa.current=fa.current-ye}
68dx.current=new Date().getTime()})():fa.current!==1/0&&(uh.current=new Date().getTime(),ie=setTimeout(()=>{var ye;(ye=m.onAutoClose)==null||ye.call(m,m),Or()},fa.current)),()=>clearTimeout(ie)},[k,p,m,Jt,W,hx,Or]),U.useEffect(()=>{m.delete&&Or()},[Or,m.delete]);function bC(){var ie,ye,Te;return D!=null&&D.loading?U.createElement("div",{className:mn(E==null?void 0:E.loader,(ie=m==null?void 0:m.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Jt==="loading"},D.loading):q?U.createElement("div",{className:mn(E==null?void 0:E.loader,(ye=m==null?void 0:m.classNames)==null?void 0:ye.loader,"sonner-loader"),"data-visible":Jt==="loading"},q):U.createElement(c4,{className:mn(E==null?void 0:E.loader,(Te=m==null?void 0:m.classNames)==null?void 0:Te.loader),visible:Jt==="loading"})}return U.createElement("li",{tabIndex:0,ref:Ds,className:mn(O,mC,E==null?void 0:E.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,E==null?void 0:E.default,E==null?void 0:E[Jt],(n=m==null?void 0:m.classNames)==null?void 0:n[Jt]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:N,"data-styled":!(m.jsx||m.unstyled||y),"data-mounted":Z,"data-promise":!!m.promise,"data-swiped":ch,"data-removed":le,"data-visible":fC,"data-y-position":yC,"data-x-position":xC,"data-index":v,"data-front":hC,"data-swiping":Rr,"data-dismissible":Pi,"data-type":Jt,"data-invert":vC,"data-swipe-out":Mr,"data-swipe-direction":M,"data-expanded":!!(k||_&&Z),style:{"--index":v,"--toasts-before":v,"--z-index":j.length-v,"--offset":`${le?dh:Ai.current}px`,"--initial-height":_?"auto":`${Ei}px`,...R,...m.style},onDragEnd:()=>{Ti(!1),L(null),Ri.current=null},onPointerDown:ie=>{hh||!Pi||(lx.current=new Date,ha(Ai.current),ie.target.setPointerCapture(ie.pointerId),ie.target.tagName!=="BUTTON"&&(Ti(!0),Ri.current={x:ie.clientX,y:ie.clientY}))},onPointerUp:()=>{var ie,ye,Te,dn;if(Mr||!Pi)return;Ri.current=null;let un=Number(((ie=Ds.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ir=Number(((ye=Ds.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ls=new Date().getTime()-((Te=lx.current)==null?void 0:Te.getTime()),hn=se
68==="x"?un:Ir,Dr=Math.abs(hn)/Ls;if(Math.abs(hn)>=T4||Dr>.11){ha(Ai.current),(dn=m.onDismiss)==null||dn.call(m,m),X(se==="x"?un>0?"right":"left":Ir>0?"down":"up"),Or(),sc(!0),ic(!1);return}Ti(!1),L(null)},onPointerMove:ie=>{var ye,Te,dn,un;if(!Ri.current||!Pi||((ye=window.getSelection())==null?void 0:ye.toString().length)>0)return;let Ir=ie.clientY-Ri.current.y,Ls=ie.clientX-Ri.current.x,hn=(Te=e.swipeDirections)!=null?Te:P4(I);!se&&(Math.abs(Ls)>1||Math.abs(Ir)>1)&&L(Math.abs(Ls)>Math.abs(Ir)?"x":"y");let Dr={x:0,y:0};se==="y"?(hn.includes("top")||hn.includes("bottom"))&&(hn.includes("top")&&Ir<0||hn.includes("bottom")&&Ir>0)&&(Dr.y=Ir):se==="x"&&(hn.includes("left")||hn.includes("right"))&&(hn.includes("left")&&Ls<0||hn.includes("right")&&Ls>0)&&(Dr.x=Ls),(Math.abs(Dr.x)>0||Math.abs(Dr.y)>0)&&ic(!0),(dn=Ds.current)==null||dn.style.setProperty("--swipe-amount-x",`${Dr.x}px`),(un=Ds.current)==null||un.style.setProperty("--swipe-amount-y",`${Dr.y}px`)}},gC&&!m.jsx?U.createElement("button",{"aria-label":G,"data-disabled":hh,"data-close-button":!0,onClick:hh||!Pi?()=>{}:()=>{var ie;Or(),(ie=m.onDismiss)==null||ie.call(m,m)},className:mn(E==null?void 0:E.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},(o=D==null?void 0:D.close)!=null?o:m4):null,m.jsx||x.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:U.createElement(U.Fragment,null,Jt||m.icon||m.promise?U.createElement("div",{"data-icon":"",className:mn(E==null?void 0:E.icon,(a=m==null?void 0:m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||bC():null,m.type!=="loading"?m.
68icon||(D==null?void 0:D[Jt])||a4(Jt):null):null,U.createElement("div",{"data-content":"",className:mn(E==null?void 0:E.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},U.createElement("div",{"data-title":"",className:mn(E==null?void 0:E.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?U.createElement("div",{"data-description":"",className:mn(V,pC,E==null?void 0:E.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),x.isValidElement(m.cancel)?m.cancel:m.cancel&&Cc(m.cancel)?U.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:ie=>{var ye,Te;Cc(m.cancel)&&Pi&&((Te=(ye=m.cancel).onClick)==null||Te.call(ye,ie),Or())},className:mn(E==null?void 0:E.cancelButton,(u=m==null?void 0:m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,x.isValidElement(m.action)?m.action:m.action&&Cc(m.action)?U.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||F,onClick:ie=>{var ye,Te;Cc(m.action)&&((Te=(ye=m.action).onClick)==null||Te.call(ye,ie),!ie.defaultPrevented&&Or())},className:mn(E==null?void 0:E.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function Kv(){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 R4(e,t){let n={};return[e,t].forEach((r,s)=>{let o=s===1,a=o?"--mobile-offset":"--offset",l=o?N4:S4;function c(d){["top","right","bottom","left"].forEach(u=>{n[`${a}-${u}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${a}-${d}`]=l:n[`${a}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),n}var M4=x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:h,duration:f,style:m,visibleToasts:y=k4,toastOptions:p,dir:w=Kv(),gap:b=C4,loadingIcon:g,icons:v,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:k}=e,[S,N]=U.useState([]),T=U.useMemo(()=>Array.from(new Set([r].concat(S.filter(W=>W.position).map(W=>W.position)))),[S,r]),[R,P]=U.useState([]),[F,O]=U.useState(!1),[V,A]=U.useState(!1),[I,z]=U.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=U.useRef(null),_=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=U.useRef(null),D=U.useRef(!1),G=U.useCallback(W=>{N(se=>{var L;return(L=se.find(M=>M.id===W.id))!=null&&L.delete||Et.dismiss(W.id),se.filter(({id:M})=>M!==W.id)})},[]);return U.useEffect(()=>Et.subscribe(W=>{if(W.dismiss){N(se=>se.map(L=>L.id===W.id?{...L,delete:!0}:L));return}setTimeout(()=>{Qj.flushSync(()=>{N(se=>{let L=se.findIndex(M=>M.id===W.id);return L!==-1?[...se.slice(0,L),{...se[L],...W},...se.slice(L+1)]:[W,...se]})})})}),[]),U.useEffect(()=>{if(u!=="system"){z(u);return}if(u==="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:se})=>{z(se?"dark":"light")})}catch{W.addListener(({matches:L})=>{try{z(L?"dark":"light")}catch(M){console.error(M)}})}},[u]),U.useEffect(()=>{S.length<=1&&O(!1)},[S]),U.useEffect(()=>{let W=se=>{var L,M;s.every(X=>se[X]||se.code===X)&&(O(!0),(L=q.current)==null||L.focus()),se.code==="Escape"&&(document.activeElement===q.current||(M=q.current)!=null&&M.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),U.useEffect(()=>{if(q.current)return()=>{E.current&&(E.current.focus({preventScroll:!0}),E.current=null,D.current=!1)}},[q.current]),U.createElement("section",{ref:t,"aria-label":`${j} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((W,se)=>{var L;let[M,X]=W.split("-");return S.length?U.createElement("ol",{key:W,dir:w==="auto"?Kv():w,tabIndex:-1,ref:q,className:l,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":M,"data-lifted":F&&S.length>1&&!o,"data-x-position":X,style:{"--front-toast-height":`${((L=R[0])==null?void 0:L.height)||0}px`,"--width":`${_4}px`,"--gap":`${b}px`,...m,...R4(c,d)},onBlur:Z=>{D.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(D.current=!1,E.current&&(E.current.focus({preventScroll:!0}),E.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||D.current||(D.current=!0,E.current=Z.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{V||O(!1)},onDragEnd:()=>O(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},S.filter(Z=>!Z.position&&se===0||Z.position===W).map((Z,be)=>{var le,Re;return U.createElement(A4,{key:Z.id,icons:v,index:be,toast:Z,defaultRichColors:h,duration:(le=p==null?void 0:p.duration)!=null?le:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:y,closeButton:(Re=p==null?void 0:p.closeButton)!=null?Re:a,interacting:V,position:W,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:G,toasts:S.filter(Rr=>Rr.position==Z.position),heights:R.filter(Rr=>Rr.position==Z.position),setHeights:P,expandByDefault:o,gap:b,loadingIcon:g,expanded:F,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const O4=({...e})=>{const{theme:t="system"}=o4();return i.jsx(M4,{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})},I4=1,D4=1e6;let Hh=0;function L4(){return Hh=(Hh+1)%Number.MAX_SAFE_INTEGER,Hh.toString()}const qh=new Map,Gv=e=>{if(qh.has(e))return;const t=setTimeout(()=>{qh.delete(e),Ya({type:"REMOVE_TOAST",toastId:e})},D4);qh.set(e,t)},$4=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,I4)};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;
vendor: 13,981 bytes, line 68
68return n?Gv(n):e.toasts.forEach(r=>{Gv(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)}}},dd=[];let ud={toasts:[]};function Ya(e){ud=$4(ud,e),dd.forEach(t=>{t(ud)})}function F4({...e}){const t=L4(),n=s=>Ya({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Ya({type:"DISMISS_TOAST",toastId:t});return Ya({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Yt(){const[e,t]=x.useState(ud);return x.useEffect(()=>(dd.push(t),()=>{const n=dd.indexOf(t);n>-1&&dd.splice(n,1)}),[e]),{...e,toast:F4,dismiss:n=>Ya({type:"DISMISS_TOAST",toastId:n})}}function je(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 Yv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pk(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Yv(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Yv(e[s],null)}}}}function dt(...e){return x.useCallback(Pk(...e),e)}function B4(e,t){const n=x.createContext(t),r=o=>{const{children:a,...l}=o,c=x.useMemo(()=>l,Object.values(l));return i.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function s(o){const a=x.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function ra(e,t=[]){let n=[];function r(o,a){const l=x.createContext(a),c=n.length;n=[...n,a];const d=h=>{var b;const{scope:f,children:m,...y}=h,p=((b=f==null?void 0:f[e])==null?void 0:b[c])||l,w=x.useMemo(()=>y,Object.values(y));return i.jsx(p.Provider,{value:w,children:m})};d.displayName=o+"Provider";function u(h,f){var p;const m=((p=f==null?void 0:f[e])==null?void 0:p[c])||l,y=x.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,u]}const s=()=>{const o=n.map(a=>x.createContext(a));return function(l){const c=(l==null?void 0:l[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,U4(s,...t)]}function U4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((l,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...l,...h}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Sl(e){const t=V4(e),n=x.forwardRef((r,s)=>{const{children:o,...a}=r,l=x.Children.toArray(o),c=l.find(H4);if(c){const d=c.props.children,u=l.map(h=>h===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:h);return i.jsx(t,{...a,ref:s,children:x.isValidElement(d)?x.cloneElement(d,void 0,u):null})}return i.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var z4=Sl("Slot");function V4(e){const t=x.forwardRef((n,r)=>{const{children:s,...o}=n;if(x.isValidElement(s)){const a=K4(s),l=q4(o,s.props);return s.type!==x.Fragment&&(l.ref=r?Pk(r,a):a),x.cloneElement(s,l)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ak=Symbol("radix.slottable");function W4(e){const t=({children:n})=>i.jsx(i.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ak,t}function H4(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ak}function q4(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...l)=>{const c=o(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function K4(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 G4(e){const t=e+"CollectionProvider",[n,r]=ra(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:w,children:b}=p,g=U.useRef(null),v=U.useRef(new Map).current;return i.jsx(s,{scope:w,itemMap:v,collectionRef:g,children:b})};a.displayName=t;const l=e+"CollectionSlot",c=Sl(l),d=U.forwardRef((p,w)=>{const{scope:b,children:g}=p,v=o(l,b),j=dt(w,v.collectionRef);return i.jsx(c,{ref:j,children:g})});d.displayName=l;const u=e+"CollectionItemSlot",h="data-radix-collection-item",f=Sl(u),m=U.forwardRef((p,w)=>{const{scope:b,children:g,...v}=p,j=U.useRef(null),k=dt(w,j),S=o(u,b);return U.useEffect(()=>(S.itemMap.set(j,{ref:j,...v}),()=>void S.itemMap.delete(j))),i.jsx(f,{[h]:"",ref:k,children:g})});m.displayName=u;function y(p){const w=o(e+"CollectionConsumer",p);return U.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((S,N)=>v.indexOf(S.ref.current)-v.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:d,ItemSlot:m},y,r]}var Y4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Y4.reduce((e,t)=>{const n=Sl(`Primitive.${t}`),r=x.forwardRef((s,o)=>{const{asChild:a,...l}=s,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rk(e,t){e&&Yl.flushSync(()=>e.dispatchEvent(t))}function Xn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function J4(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e);x.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 Q4="DismissableLayer",qm="dismissableLayer.update",X4="dismissableLayer.pointerDownOutside",Z4="dismissableLayer.focusOutside",Jv,Mk=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$u=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=e,d=x.useContext(Mk),[u,h]=x.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),y=dt(t,N=>h(N)),p=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(w),g=u?p.indexOf(u):-1,v=d.layersWithOutsidePointerEventsDisabled.size>0,j=g>=b,k=tR(N=>{const T=N.target,R=[...d.branches].some(P=>P.contains(T));!j||R||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},f),S=nR(N=>{const T=N.target;[...d.branches].some(P=>P.contains(T))||(o==null||o(N),a==null||a(N),N.defaultPrevented||l==null||l())},f);return J4(N=>{g===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},f),x.useEffect(()=>{if(u)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Jv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Qv(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Jv)}},[u,f,n,d]),x.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Qv())},[u,d]),x.useEffect(()=>{const N=()=>m({});return document.addEventListener(qm,N),()=>document.removeEventListener(qm,N)},[]),i.jsx(Ae.div,{...c,ref:y,style:{pointerEvents:v?j?"auto":"none":void 0,...e.style},onFocusCapture:je(e.onFocusCapture,S.onFocusCapture),onBlurCapture:je(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:je(e.onPointerDownCapture,k.onPointerDownCapture)})});$u.displayName=Q4;var eR="DismissableLayerBranch",Ok=x.forwardRef((e,t)=>{const n=x.useContext(Mk),r=x.useRef(null),s=dt(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),i.jsx(Ae.div,{...e,ref:s})});Ok.displayName=eR;function tR(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){Ik(X4,n,d,{discrete:!0})};const d={originalEvent:l};l.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",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nR(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=x.useRef(!1);return x.useEffect(()=>{const s=o=>{o.target&&!r.current&&Ik(Z4,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qv(){const e=new CustomEvent(qm);document.dispatchEvent(e)}function Ik(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Rk(s,o):s.dispatchEvent(o)}var rR=$u,sR=Ok,Sr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},iR="Portal",Yg=x.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,o]=x.useState(!1);Sr(()=>o(!0),[]);const a=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Qj.createPortal(i.jsx(Ae.div,{...r,ref:t}),a):null});Yg.displayName=iR;function oR(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var _i=e=>{const{present:t,children:n}=e,r=aR(t),s=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=dt(r.ref,lR(s));return typeof n=="function"||r.isPresent?x.cloneElement(s,{ref:o}):null};_i.displayName="Presence";function aR(e){const[t,n]=x.useState(),r=x.useRef(null),s=x.useRef(e),o=x.useRef("none"),a=e?"mounted":"unmounted",[l,c]=oR(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=Tc(r.current);o.current=l==="mounted"?d:"none"},[l]),Sr(()=>{const d=r.current,u=s.current;if(u!==e){const f=o.current,m=Tc(d);e?c("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&f!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Sr(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,h=m=>{const p=Tc(r.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=m=>{m.target===t&&(o.current=Tc(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Tc(e){return(e==null?void 0:e.animationName)||"none"}function lR(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 cR=Gp[" useInsertionEffect ".trim().toString()]||Sr;function Jg({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,a]=dR({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const u=x.useRef(e!==void 0);x.useEffect(()=>{const h=u.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"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.`),u.current=l},[l,r])}const d=x.useCallback(u=>{var h;if(l){const f=uR(u)?u(e):u;f!==e&&((h=a.current)==null||h.call(a,f))}else o(u)},[l,e,o,a]);return[c,d]}function dR({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),s=x.useRef(n),o=x.useRef(t);return cR(()=>{o.current=t},[t]),x.useEffect(()=>{var a;s.current!==n&&((a=o.current)==null||a.call(o,n),s.current=n)},[n,s]),[n,r,o]}function uR(e){return typeof e=="function"}var hR=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"}),fR="VisuallyHidden",Fu=x.forwardRef((e,t)=>i.jsx(Ae.span,{...e,ref:t,style:{...hR,...e.style}}));Fu.displayName=fR;var mR=Fu,Qg="ToastProvider",[Xg,pR,gR]=G4("Toast"),[Dk,dH]=ra("Toast",[gR]),[yR,Bu]=Dk(Qg),Lk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:a}=e,[l,c]=x.useState(null),[d,u]=x.useState(0),h=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Qg}\`. Expected non-empty \`string\`.`),i.jsx(Xg.Provider,{scope:t,children:i.jsx(yR,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:d,viewport:l,onViewportChange:c,onToastAdd:x.useCallback(()=>u(m=>m+1),[]),onToastRemove:x.useCallback(()=>u(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:a})})};Lk.displayName=Qg;var $k="ToastViewport",xR=["F8"],Km="toast.viewportPause",Gm="toast.viewportResume",Fk=x.forwardRef((e,t)=>
68{const{__scopeToast:n,hotkey:r=xR,label:s="Notifications ({hotkey})",...o}=e,a=Bu($k,n),l=pR(n),c=x.useRef(null),d=x.useRef(null),u=x.useRef(null),h=x.useRef(null),f=dt(t,h,a.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=a.toastCount>0;x.useEffect(()=>{const w=b=>{var v;r.length!==0&&r.every(j=>b[j]||b.code===j)&&((v=h.current)==null||v.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),x.useEffect(()=>{const w=c.current,b=h.current;if(y&&w&&b){const g=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(Km);b.dispatchEvent(S),a.isClosePausedRef.current=!0}},v=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(Gm);b.dispatchEvent(S),a.isClosePausedRef.current=!1}},j=S=>{!w.contains(S.relatedTarget)&&v()},k=()=>{w.contains(document.activeElement)||v()};return w.addEventListener("focusin",g),w.addEventListener("focusout",j),w.addEventListener("pointermove",g),w.addEventListener("pointerleave",k),window.addEventListener("blur",g),window.addEventListener("focus",v),()=>{w.removeEventListener("focusin",g),w.removeEventListener("focusout",j),w.removeEventListener("pointermove",g),w.removeEventListener("pointerleave",k),window.removeEventListener("blur",g),window.removeEventListener("focus",v)}}},[y,a.isClosePausedRef]);const p=x.useCallback(({tabbingDirection:w})=>{const g=l().map(v=>{const j=v.ref.current,k=[j,...AR(j)];return w==="forwards"?k:k.reverse()});return(w==="forwards"?g.reverse():g).flat()},[l]);return x.useEffect(()=>{const w=h.current;if(w){const b=g=>{var k,S,N;const v=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!v){const T=document.activeElement,R=g.shiftKey;if(g.target===w&&R){(k=d.current)==null||k.focus();return}const O=p({tabbingDirection:R?"backwards":"forwards"}),V=O.findIndex(A=>A===T);Kh(O.slice(V+1))?g.preventDefault():R?(S=d.current)==null||S.focus():(N=u.current)==null||N.focus()}};return w.addEventListener("keydown",b),()=>w.removeEventListener("keydown",b)}},[l,p]),i.jsxs(sR,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&i.jsx(Ym,{ref:d,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"forwards"});Kh(w)}}),i.jsx(Xg.Slot,{scope:n,children:i.jsx(Ae.ol,{tabIndex:-1,...o,ref:f})}),y&&i.jsx(Ym,{ref:u,onFocusFromOutsideViewport:()=>{const w=p({tabbingDirection:"backwards"});Kh(w)}})]})});Fk.displayName=$k;var Bk="ToastFocusProxy",Ym=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Bu(Bk,n);return i.jsx(Fu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var d;const l=a.relatedTarget;!((d=o.viewport)!=null&&d.contains(l))&&r()}})});Ym.displayName=Bk;var Jl="Toast",vR="toast.swipeStart",bR="toast.swipeMove",wR="toast.swipeCancel",jR="toast.swipeEnd",Uk=x.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...a}=e,[l,c]=Jg({prop:r,defaultProp:s??!0,onChange:o,caller:Jl});return i.jsx(_i,{present:n||l,children:i.jsx(NR,{open:l,...a,ref:t,onClose:()=>c(!1),onPause:Xn(e.onPause),onResume:Xn(e.onResume),onSwipeStart:je(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:je(e.onSwipeMove,d=>{const{x:u,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:je(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:je(e.onSwipeEnd,d=>{const{x:u,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Uk.displayName=Jl;var[kR,SR]=Dk(Jl,{onClose(){}}),NR=x.forwardRef((e,t)=>
68{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:a,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:m,...y}=e,p=Bu(Jl,n),[w,b]=x.useState(null),g=dt(t,A=>b(A)),v=x.useRef(null),j=x.useRef(null),k=s||p.duration,S=x.useRef(0),N=x.useRef(k),T=x.useRef(0),{onToastAdd:R,onToastRemove:P}=p,F=Xn(()=>{var I;(w==null?void 0:w.contains(document.activeElement))&&((I=p.viewport)==null||I.focus()),a()}),O=x.useCallback(A=>{!A||A===1/0||(window.clearTimeout(T.current),S.current=new Date().getTime(),T.current=window.setTimeout(F,A))},[F]);x.useEffect(()=>{const A=p.viewport;if(A){const I=()=>{O(N.current),d==null||d()},z=()=>{const q=new Date().getTime()-S.current;N.current=N.current-q,window.clearTimeout(T.current),c==null||c()};return A.addEventListener(Km,z),A.addEventListener(Gm,I),()=>{A.removeEventListener(Km,z),A.removeEventListener(Gm,I)}}},[p.viewport,k,c,d,O]),x.useEffect(()=>{o&&!p.isClosePausedRef.current&&O(k)},[o,k,p.isClosePausedRef,O]),x.useEffect(()=>(R(),()=>P()),[R,P]);const V=x.useMemo(()=>w?Gk(w):null,[w]);return p.viewport?i.jsxs(i.Fragment,{children:[V&&i.jsx(_R,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),i.jsx(kR,{scope:n,onClose:F,children:Yl.createPortal(i.jsx(Xg.ItemSlot,{scope:n,children:i.jsx(rR,{asChild:!0,onEscapeKeyDown:je(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||F(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:i.jsx(Ae.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:je(e.onKeyDown,A=>{A.key==="Escape"&&(l==null||l(A.nativeEvent),A.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:je(e.onPointerDown,A=>{A.button===0&&(v.current={x:A.clientX,y:A.clientY})}),onPointerMove:je(e.onPointerMove,A=>{if(!v.current)return;const I=A.clientX-v.current.x,z=A.clientY-v.current.y,q=!!j.current,_=["left","right"].includes(p.swipeDirection),E=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,D=_?E(0,I):0,G=_?0:E(0,z),W=A.pointerType==="touch"?10:2,se={x:D,y:G},L={originalEvent:A,delta:se};q?(j.current=se,Ec(bR,h,L,{discrete:!1})):Xv(se,p.swipeDirection,W)?(j.current=se,Ec(vR,u,L,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(I)>W||Math.abs(z)>W)&&(v.current=null)}),onPointerUp:je(e.onPointerUp,A=>{const I=j.current,z=A.target;if(z.hasPointerCapture(A.pointerId)&&z.releasePointerCapture(A.pointerId),j.current=null,v.current=null,I){const q=A.currentTarget,_={originalEvent:A,delta:I};Xv(I,p.swipeDirection,p.swipeThreshold)?Ec(jR,m,_,{discrete:!0}):Ec(wR,f,_,{discrete:!0}),q.addEventListener("click",E=>E.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),_R=e=>{const{__scopeToast:t,children:n,...r}=e,s=Bu(Jl,t),[o,a]=x.useState(!1),[l,c]=x.useState(!1);return ER(()=>a(!0)),x.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:i.jsx(Yg,{asChild:!0,children:i.jsx(Fu,{...r,children:o&&i.jsxs(i.Fragment,{children:[s.label," ",n]})})})},CR="ToastTitle",zk=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Ae.div,{...r,ref:t})});zk.displayName=CR;var TR="ToastDescription",Vk=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return i.jsx(Ae.div,{...r,ref:t})});Vk.displayName=TR;var Wk="ToastAction",Hk=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?i.jsx(Kk,{altText:n,asChild:!0,children:i.jsx(Zg,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Wk}\`. Expected non-empty \`string\`.`),null)});Hk.displayName=Wk;var qk="ToastClose",Zg=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=SR(qk,n);return i.jsx(Kk,{asChild:!0,children:i.jsx(Ae.button,{type:"button",...r,ref:t,onClick:je(e.onClick,s.onClose)})})});Zg.displayName=qk;var Kk=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return i.jsx(Ae.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Gk(e){const t=[];
vendor: 9,409 bytes, lines 68-173
68return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),PR(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Gk(r))}}),t}function Ec(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Rk(s,o):s.dispatchEvent(o)}var Xv=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function ER(e=()=>{}){const t=Xn(e);Sr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function PR(e){return e.nodeType===e.ELEMENT_NODE}function AR(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 Kh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var RR=Lk,Yk=Fk,Jk=Uk,Qk=zk,Xk=Vk,Zk=Hk,eS=Zg;function tS(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=tS(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nS(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=tS(e))&&(r&&(r+=" "),r+=t);return r}const Zv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,eb=nS,ey=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return eb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(d=>{const u=n==null?void 0:n[d],h=o==null?void 0:o[d];if(u===null)return null;const f=Zv(u)||Zv(h);return s[d][f]}),l=n&&Object.entries(n).reduce((d,u)=>{let[h,f]=u;return f===void 0||(d[h]=f),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,u)=>{let{class:h,className:f,...m}=u;return Object.entries(m).every(y=>{let[p,w]=y;return Array.isArray(w)?w.includes({...o,...l}[p]):{...o,...l}[p]===w})?[...d,h,f]:d},[]);return eb(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 69 * @license lucide-react v0.462.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const MR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rS=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 74 * @license lucide-react v0.462.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */var OR={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"};/** 79 * @license lucide-react v0.462.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const IR=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...l},c)=>x.createElement("svg",{ref:c,...OR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:rS("lucide",s),...l},[...a.map(([d,u])=>x.createElement(d,u)),...Array.isArray(o)?o:[o]]));/** 84 * @license lucide-react v0.462.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const te=(e,t)=>{const n=x.forwardRef(({className:r,...s},o)=>x.createElement(IR,{ref:o,iconNode:t,className:rS(`lucide-${MR(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 89 * @license lucide-react v0.462.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const Zn=te("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 94 * @license lucide-react v0.462.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const ue=te("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 99 * @license lucide-react v0.462.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const DR=te("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 104 * @license lucide-react v0.462.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const LR=te("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 109 * @license lucide-react v0.462.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const $R=te("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 114 * @license lucide-react v0.462.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const Dt=te("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 119 * @license lucide-react v0.462.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const sS=te("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 124 * @license lucide-react v0.462.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const iS=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 129 * @license lucide-react v0.462.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const ty=te("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 134 * @license lucide-react v0.462.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const Uu=te("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 139 * @license lucide-react v0.462.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const FR=te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 144 * @license lucide-react v0.462.0 - ISC 145 * 146 * This source code is licensed under the ISC license. 147 * See the LICENSE file in the root directory of this source tree. 148 */const Ja=te("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 149 * @license lucide-react v0.462.0 - ISC 150 * 151 * This source code is licensed under the ISC license. 152 * See the LICENSE file in the root directory of this source tree. 153 */const Ho=te("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 154 * @license lucide-react v0.462.0 - ISC 155 * 156 * This source code is licensed under the ISC license. 157 * See the LICENSE file in the root directory of this source tree. 158 */const oS=te("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** 159 * @license lucide-react v0.462.0 - ISC 160 * 161 * This source code is licensed under the ISC license. 162 * See the LICENSE file in the root directory of this source tree. 163 */const aS=te("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 164 * @license lucide-react v0.462.0 - ISC 165 * 166 * This source code is licensed under the ISC license. 167 * See the LICENSE file in the root directory of this source tree. 168 */const Pn=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 169 * @license lucide-react v0.462.0 - ISC 170 * 171 * This source code is licensed under the ISC license. 172 * See the LICENSE file in the root directory of this source tree. 173 */const BR=te("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
173y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 174 * @license lucide-react v0.462.0 - ISC 175 * 176 * This source code is licensed under the ISC license. 177 * See the LICENSE file in the root directory of this source tree. 178 */const UR=te("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 179 * @license lucide-react v0.462.0 - ISC 180 * 181 * This source code is licensed under the ISC license. 182 * See the LICENSE file in the root directory of this source tree. 183 */const wo=te("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 184 * @license lucide-react v0.462.0 - ISC 185 * 186 * This source code is licensed under the ISC license. 187 * See the LICENSE file in the root directory of this source tree. 188 */const Ql=te("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 189 * @license lucide-react v0.462.0 - ISC 190 * 191 * This source code is licensed under the ISC license. 192 * See the LICENSE file in the root directory of this source tree. 193 */const Zd=te("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 194 * @license lucide-react v0.462.0 - ISC 195 * 196 * This source code is licensed under the ISC license. 197 * See the LICENSE file in the root directory of this source tree. 198 */const lS=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 199 * @license lucide-react v0.462.0 - ISC 200 * 201 * This source code is licensed under the ISC license. 202 * See the LICENSE file in the root directory of this source tree. 203 */const ny=te("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 204 * @license lucide-react v0.462.0 - ISC 205 * 206 * This source code is licensed under the ISC license. 207 * See the LICENSE file in the root directory of this source tree. 208 */const zR=te("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 209 * @license lucide-react v0.462.0 - ISC 210 * 211 * This source code is licensed under the ISC license. 212 * See the LICENSE file in the root directory of this source tree. 213 */const VR=te("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 214 * @license lucide-react v0.462.0 - ISC 215 * 216 * This source code is licensed under the ISC license. 217 * See the LICENSE file in the root directory of this source tree. 218 */const Cn=te("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 219 * @license lucide-react v0.462.0 - ISC 220 * 221 * This source code is licensed under the ISC license. 222 * See the LICENSE file in the root directory of this source tree. 223 */const cS=te("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 224 * @license lucide-react v0.462.0 - ISC 225 * 226 * This source code is licensed under the ISC license. 227 * See the LICENSE file in the root directory of this source tree. 228 */const er=te("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 229 * @license lucide-react v0.462.0 - ISC 230 * 231 * This source code is licensed under the ISC license. 232 * See the LICENSE file in the root directory of this source tree. 233 */const WR=te("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 234 * @license lucide-react v0.462.0 - ISC 235 * 236 * This source code is licensed under the ISC license. 237 * See the LICENSE file in the root directory of this source tree. 238 */const HR=te("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 239 * @license lucide-react v0.462.0 - ISC 240 * 241 * This source code is licensed under the ISC license. 242 * See the LICENSE file in the root directory of this source tree. 243 */const Jm=te("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 244 * @license lucide-react v0.462.0 - ISC 245 * 246 * This source code is licensed under the ISC license. 247 * See the LICENSE file in the root directory of this source tree. 248 */const qR=te("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 249 * @license lucide-react v0.462.0 - ISC 250 * 251 * This source code is licensed under the ISC license. 252 * See the LICENSE file in the root directory of this source tree. 253 */const _s=te("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 254 * @license lucide-react v0.462.0 - ISC 255 * 256 * This source code is licensed under the ISC license. 257 * See the LICENSE file in the root directory of this source tree. 258 */const KR=te("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 259 * @license lucide-react v0.462.0 - ISC 260 * 261 * This source code is licensed under the ISC license. 262 * See the LICENSE file in the root directory of this source tree. 263 */const GR=te("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 264 * @license lucide-react v0.462.0 - ISC 265 * 266 * This source code is licensed under the ISC license. 267 * See the LICENSE file in the root directory of this source tree. 268 */const YR=te("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 269 * @license lucide-react v0.462.0 - ISC 270 * 271 * This source code is licensed under the ISC license. 272 * See the LICENSE file in the root directory of this source tree. 273 */const dS=te("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 274 * @license lucide-react v0.462.0 - ISC 275 * 276 * This source code is licensed under the ISC license. 277 * See the LICENSE file in the root directory of this source tree. 278 */const ry=te("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 279 * @license lucide-react v0.462.0 - ISC 280 * 281 * This source code is licensed under the ISC license. 282 * See the LICENSE file in the root directory of this source tree. 283 */const JR=te("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
283y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 284 * @license lucide-react v0.462.0 - ISC 285 * 286 * This source code is licensed under the ISC license. 287 * See the LICENSE file in the root directory of this source tree. 288 */const uS=te("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 289 * @license lucide-react v0.462.0 - ISC 290 * 291 * This source code is licensed under the ISC license. 292 * See the LICENSE file in the root directory of this source tree. 293 */const QR=te("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 294 * @license lucide-react v0.462.0 - ISC 295 * 296 * This source code is licensed under the ISC license. 297 * See the LICENSE file in the root directory of this source tree. 298 */const tr=te("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 299 * @license lucide-react v0.462.0 - ISC 300 * 301 * This source code is licensed under the ISC license. 302 * See the LICENSE file in the root directory of this source tree. 303 */const XR=te("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** 304 * @license lucide-react v0.462.0 - ISC 305 * 306 * This source code is licensed under the ISC license. 307 * See the LICENSE file in the root directory of this source tree. 308 */const ZR=te("SquareSplitHorizontal",[["path",{d:"M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3",key:"lubmu8"}],["path",{d:"M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3",key:"1ag34g"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** 309 * @license lucide-react v0.462.0 - ISC 310 * 311 * This source code is licensed under the ISC license. 312 * See the LICENSE file in the root directory of this source tree. 313 */const Qm=te("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 314 * @license lucide-react v0.462.0 - ISC 315 * 316 * This source code is licensed under the ISC license. 317 * See the LICENSE file in the root directory of this source tree. 318 */const zu=te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 319 * @license lucide-react v0.462.0 - ISC 320 * 321 * This source code is licensed under the ISC license. 322 * See the LICENSE file in the root directory of this source tree. 323 */const hS=te("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 324 * @license lucide-react v0.462.0 - ISC 325 * 326 * This source code is licensed under the ISC license. 327 * See the LICENSE file in the root directory of this source tree. 328 */const eM=te("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 329 * @license lucide-react v0.462.0 - ISC 330 * 331 * This source code is licensed under the ISC license. 332 * See the LICENSE file in the root directory of this source tree. 333 */const Xm=te("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 334 * @license lucide-react v0.462.0 - ISC 335 * 336 * This source code is licensed under the ISC license. 337 * See the LICENSE file in the root directory of this source tree. 338 */const tM=te("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 339 * @license lucide-react v0.462.0 - ISC 340 * 341 * This source code is licensed under the ISC license. 342 * See the LICENSE file in the root directory of this source tree. 343 */const sy=te("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 344 * @license lucide-react v0.462.0 - ISC 345 * 346 * This source code is licensed under the ISC license. 347 * See the LICENSE file in the root directory of this source tree. 348 */const cn=te("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 349 * @license lucide-react v0.462.0 - ISC 350 * 351 * This source code is licensed under the ISC license. 352 * See the LICENSE file in the root directory of this source tree. 353 */const Vu=te("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** 354 * @license lucide-react v0.462.0 - ISC 355 * 356 * This source code is licensed under the ISC license. 357 * See the LICENSE file in the root directory of this source tree. 358 */const nM=te("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/** 359 * @license lucide-react v0.462.0 - ISC 360 * 361 * This source code is licensed under the ISC license. 362 * See the LICENSE file in the root directory of this source tree. 363 */const wi=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,913 bytes, line 363
363],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),iy="-",rM=e=>{const t=iM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(iy);return l[0]===""&&l.length!==1&&l.shift(),fS(l,t)||sM(a)},getConflictingClassGroupIds:(a,l)=>{const c=n[a]||[];return l&&r[a]?[...c,...r[a]]:c}}},fS=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?fS(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(iy);return(a=t.validators.find(({validator:l})=>l(o)))==null?void 0:a.classGroupId},tb=/^\[(.+)\]$/,sM=e=>{if(tb.test(e)){const t=tb.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return aM(Object.entries(e.classGroups),n).forEach(([o,a])=>{Zm(a,r,o,t)}),r},Zm=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:nb(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(oM(s)){Zm(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{Zm(a,nb(t,o),n,r)})})},nb=(e,t)=>{let n=e;return t.split(iy).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},oM=e=>e.isThemeGetter,aM=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,l])=>[t+a,l])):o);return[n,s]}):e,lM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},mS="!",cM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,a=l=>{const c=[];let d=0,u=0,h;for(let w=0;w<l.length;w++){let b=l[w];if(d===0){if(b===s&&(r||l.slice(w,w+o)===t)){c.push(l.slice(u,w)),u=w+o;continue}if(b==="/"){h=w;continue}}b==="["?d++:b==="]"&&d--}const f=c.length===0?l:l.substring(u),m=f.startsWith(mS),y=m?f.substring(1):f,p=h&&h>u?h-u:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}};return n?l=>n({className:l,parseClassName:a}):a},dM=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},uM=e=>({cache:lM(e.cacheSize),parseClassName:cM(e),...rM(e)}),hM=/\s+/,fM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],a=e.trim().split(hM);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{modifiers:u,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=n(d);let y=!!m,p=r(y?f.substring(0,m):f);if(!p){if(!y){l=d+(l.length>0?" "+l:l);continue}if(p=r(f),!p){l=d+(l.length>0?" "+l:l);continue}y=!1}const w=dM(u).join(":"),b=h?w+mS:w,g=b+p;if(o.includes(g))continue;o.push(g);const v=s(p,y);for(let j=0;j<v.length;++j){const k=v[j];o.push(b+k)}l=d+(l.length>0?" "+l:l)}return l};function mM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=pS(t))&&(r&&(r+=" "),r+=n);return r}const pS=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pS(e[r]))&&(n&&(n+=" "),n+=t);return n};function pM(e,...t){let n,r,s,o=a;function a(c){const d=t.reduce((u,h)=>h(u),e());return n=uM(d),r=n.cache.get,s=n.cache.set,o=l,l(c)}function l(c){const d=r(c);if(d)return d;const u=fM(c,n);return s(c,u),u}return function(){return o(mM.apply(null,arguments))}}const Se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gS=/^\[(?:([a-z-]+):)?(.+)\]$/i,gM=/^\d+\/\d+$/,yM=new Set(["px","full","screen"]),xM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vM=/\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$/,bM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=e=>jo(e)||yM.has(e)||gM.test(e),$r=e=>sa(e,"length",PM),jo=e=>!!e&&!Number.isNaN(Number(e)),Gh=e=>sa(e,"number",jo),Sa=e=>!!e&&Number.isInteger(Number(e)),kM=e=>e.endsWith("%")&&jo(e.slice(0,-1)),oe=e=>gS.test(e),Fr=e=>xM.test(e),SM=new Set(["length","size","percentage"]),NM=e=>sa(e,SM,yS),_M=e=>sa(e,"position",yS),CM=new Set(["image","url"]),TM=e=>sa(e,CM,RM),EM=e=>sa(e,"",AM),Na=()=>!0,sa=(e,t,n)=>{const r=gS.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PM=e=>vM.test(e)&&!bM.test(e),yS=()=>!1,AM=e=>wM.test(e),RM=e=>jM.test(e),MM=()=>{const e=Se("colors"),t=Se("spacing"),n=Se("blur"),r=Se("brightness"),s=Se("borderColor"),o=Se("borderRadius"),a=Se("borderSpacing"),l=Se("borderWidth"),c=Se("contrast"),d=Se("grayscale"),u=Se("hueRotate"),h=Se("invert"),f=Se("gap"),m=Se("gradientColorStops"),y=Se("gradientColorStopPositions"),p=Se("inset"),w=Se("margin"),b=Se("opacity"),g=Se("padding"),v=Se("saturate"),j=Se("scale"),k=Se("sepia"),S=Se("skew"),N=Se("space"),T=Se("translate"),R=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",oe,t],O=()=>[oe,t],V=()=>["",ar,$r],A=()=>["auto",jo,oe],I=()=>["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"],E=()=>["","0",oe],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[jo,oe];return{cacheSize:500,separator:":",theme:{colors:[Na],spacing:[ar,$r],blur:["none","",Fr,oe],brightness:G(),borderColor:[e],borderRadius:["n
363one","","full",Fr,oe],borderSpacing:O(),borderWidth:V(),contrast:G(),grayscale:E(),hueRotate:G(),invert:E(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[kM,$r],inset:F(),margin:F(),opacity:G(),padding:O(),saturate:G(),scale:G(),sepia:E(),skew:G(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",oe]}],container:["container"],columns:[{columns:[Fr]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...I(),oe]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sa,oe]}],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",oe]}],grow:[{grow:E()}],shrink:[{shrink:E()}],order:[{order:["first","last","none",Sa,oe]}],"grid-cols":[{"grid-cols":[Na]}],"col-start-end":[{col:["auto",{span:["full",Sa,oe]},oe]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Na]}],"row-start-end":[{row:["auto",{span:[Sa,oe]},oe]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",oe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",oe]}],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:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",oe,t]}],"min-w":[{"min-w":[oe,t,"min","max","fit"]}],"max-w":[{"max-w":[oe,t,"none","full","min","max","fit","prose",{screen:[Fr]},Fr]}],h:[{h:[oe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[oe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fr,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Gh]}],"font-family":[{font:[Na]}],"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",oe]}],"line-clamp":[{"line-clamp":["none",jo,Gh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ar,oe]}],"list-image":[{"list-image":["none",oe]}],"list-style-type":[{list:["none","disc","decimal",oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ar,$r]}],"underline-offset":[{"underline-offset":["auto",ar,oe]}],"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:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe]}],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",oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),_M]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",NM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}
vendor: 4,885 bytes, line 363
363],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"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":[ar,oe]}],"outline-w":[{outline:[ar,$r]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ar,$r]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fr,EM]}],"shadow-color":[{shadow:[Na]}],opacity:[{opacity:[b]}],"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",Fr,oe]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[v]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"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",oe]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",oe]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Sa,oe]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",oe]}],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",oe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
vendor: 4,942 bytes, line 363
363],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ar,$r,Gh]}],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"]}}},OM=pM(MM);function Xe(...e){return OM(nS(e))}const IM=RR,xS=x.forwardRef(({className:e,...t},n)=>i.jsx(Yk,{ref:n,className:Xe("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}));xS.displayName=Yk.displayName;const DM=ey("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"}}),vS=x.forwardRef(({className:e,variant:t,...n},r)=>i.jsx(Jk,{ref:r,className:Xe(DM({variant:t}),e),...n}));vS.displayName=Jk.displayName;const LM=x.forwardRef(({className:e,...t},n)=>i.jsx(Zk,{ref:n,className:Xe("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}));LM.displayName=Zk.displayName;const bS=x.forwardRef(({className:e,...t},n)=>i.jsx(eS,{ref:n,className:Xe("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 13,157 bytes, line 363
363/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:i.jsx(wi,{className:"h-4 w-4"})}));bS.displayName=eS.displayName;const wS=x.forwardRef(({className:e,...t},n)=>i.jsx(Qk,{ref:n,className:Xe("text-sm font-semibold",e),...t}));wS.displayName=Qk.displayName;const jS=x.forwardRef(({className:e,...t},n)=>i.jsx(Xk,{ref:n,className:Xe("text-sm opacity-90",e),...t}));jS.displayName=Xk.displayName;function $M(){const{toasts:e}=Yt();return i.jsxs(IM,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return i.jsxs(vS,{...o,children:[i.jsxs("div",{className:"grid gap-1",children:[n&&i.jsx(wS,{children:n}),r&&i.jsx(jS,{children:r})]}),s,i.jsx(bS,{})]},t)}),i.jsx(xS,{})]})}var FM=Gp[" useId ".trim().toString()]||(()=>{}),BM=0;function Yh(e){const[t,n]=x.useState(FM());return Sr(()=>{e||n(r=>r??String(BM++))},[e]),e||(t?`radix-${t}`:"")}const UM=["top","right","bottom","left"],Cs=Math.min,Ut=Math.max,eu=Math.round,Pc=Math.floor,Jn=e=>({x:e,y:e}),zM={left:"right",right:"left",bottom:"top",top:"bottom"},VM={start:"end",end:"start"};function ep(e,t,n){return Ut(e,Cs(t,n))}function Nr(e,t){return typeof e=="function"?e(t):e}function _r(e){return e.split("-")[0]}function ia(e){return e.split("-")[1]}function oy(e){return e==="x"?"y":"x"}function ay(e){return e==="y"?"height":"width"}const WM=new Set(["top","bottom"]);function Kn(e){return WM.has(_r(e))?"y":"x"}function ly(e){return oy(Kn(e))}function HM(e,t,n){n===void 0&&(n=!1);const r=ia(e),s=ly(e),o=ay(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=tu(a)),[a,tu(a)]}function qM(e){const t=tu(e);return[tp(e),t,tp(t)]}function tp(e){return e.replace(/start|end/g,t=>VM[t])}const rb=["left","right"],sb=["right","left"],KM=["top","bottom"],GM=["bottom","top"];function YM(e,t,n){switch(e){case"top":case"bottom":return n?t?sb:rb:t?rb:sb;case"left":case"right":return t?KM:GM;default:return[]}}function JM(e,t,n,r){const s=ia(e);let o=YM(_r(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(tp)))),o}function tu(e){return e.replace(/left|right|bottom|top/g,t=>zM[t])}function QM(e){return{top:0,right:0,bottom:0,left:0,...e}}function kS(e){return typeof e!="number"?QM(e):{top:e,right:e,bottom:e,left:e}}function nu(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 ib(e,t,n){let{reference:r,floating:s}=e;const o=Kn(t),a=ly(t),l=ay(a),c=_r(t),d=o==="y",u=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let m;switch(c){case"top":m={x:u,y:r.y-s.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-s.width,y:h};break;default:m={x:r.x,y:r.y}}switch(ia(t)){case"start":m[a]-=f*(n&&d?-1:1);break;case"end":m[a]+=f*(n&&d?-1:1);break}return m}const XM=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,l=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=ib(d,r,c),f=r,m={},y=0;for(let p=0;p<l.length;p++){const{name:w,fn:b}=l[p],{x:g,y:v,data:j,reset:k}=await b({x:u,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:m,rects:d,platform:a,elements:{reference:e,floating:t}});u=g??u,h=v??h,m={...m,[w]:{...m[w],...j}},k&&y<=50&&(y++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(d=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:u,y:h}=ib(d,f,c)),p=-1)}return{x:u,y:h,placement:f,strategy:s,middlewareData:m}};async function Nl(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Nr(t,e),y=kS(m),w=l[f?h==="floating"?"reference":"floating":h],b=nu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),g=h==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),j=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},k=nu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:v,strategy:c}):g);return{top:(b.top-k.top+y.top)/j.y,bottom:(k.bottom-b.bottom+y.bottom)/j.y,left:(b.left-k.left+y.left)/j.x,right:(k.right-b.right+y.right)/j.x}}const ZM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=Nr(e,t)||{};if(d==null)return{};const h=kS(u),f={x:n,y:r},m=ly(s),y=ay(m),p=await a.getDimensions(d),w=m==="y",b=w?"top":"left",g=w?"bottom":"right",v=w?"clientHeight":"clientWidth",j=o.reference[y]+o.reference[m]-f[m]-o.floating[y],k=f[m]-o.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let N=S?S[v]:0;(!N||!await(a.isElement==null?void 0:a.isElement(S)))&&(N=l.floating[v]||o.floating[y]);const T=j/2-k/2,R=N/2-p[y]/2-1,P=Cs(h[b],R),F=Cs(h[g],R),O=P,V=N-p[y]-F,A=N/2-p[y]/2+T,I=ep(O,A,V),z=!c.arrow&&ia(s)!=null&&A!==I&&o.reference[y]/2-(A<O?P:F)-p[y]/2<0,q=z?A<O?A-O:A-V:0;return{[m]:f[m]+q,data:{[m]:I,centerOffset:A-I-q,...z&&{alignmentOffset:q}},reset:z}}}),eO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...w}=Nr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=_r(s),g=Kn(l),v=_r(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=f||(v||!p?[tu(l)]:qM(l)),S=y!=="none";!f&&S&&k.push(...JM(l,p,y,j));const N=[l,...k],T=await Nl(t,w),R=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&R.push(T[b]),h){const A=HM(s,a,j);R.push(T[A[0]],T[A[1]])}if(P=[...P,{placement:s,overflows:R}],!R.every(A=>A<=0)){var F,O;const A=(((F=o.flip)==null?void 0:F.index)||0)+1,I=N[A];if(I&&(!(h==="alignment"?g!==Kn(I):!1)||P.every(_=>_.overflows[0]>0&&Kn(_.placement)===g)))return{data:{index:A,overflows:P},reset:{placement:I}};let z=(O=P.filter(q=>q.overflows[0]<=0).sort((q,_)=>q.overflows[1]-_.overflows[1])[0])==null?void 0:O.placement;if(!z)switch(m){case"bestFit":{var V;const q=(V=P.filter(_=>{if(S){const E=Kn(_.placement);return E===g||E==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(E=>E>0).reduce((E,D)=>E+D,0)]).sort((_,E)=>_[1]-E[1])[0])==null?void 0:V[0];q&&(z=q);break}case"initialPlacement":z=l;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function ob(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ab(e){return UM.some(t=>e[t]>=0)}const tO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Nr(e,t);switch(r){case"referenceHidden":{const o=await Nl(t,{...s,elementContext:"reference"}),a=ob(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ab(a)}}}case"escaped":{const o=await Nl(t,{...s,altBoundary:!0}),a=ob(o,n.floating);return{data:{escapedOffsets:a,escaped:ab(a)}}}default:return{}}}}},SS=new Set(["left","top"]);async function nO(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=_r(n),l=ia(n),c=Kn(n)==="y",d=SS.has(a)?-1:1,u=o&&c?-1:1,h=Nr(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),c?{x:m*u,y:f*d}:{x:f*d,y:m*u}}const rO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:l}=t,c=await nO(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:a}}}}},sO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:b,y:g}=w;return{x:b,y:g}}},...c}=Nr(e,t),d={x:n,y:r},u=await Nl(t,c),h=Kn(_r(s)),f=oy(h);let m=d[f],y=d[h];if(o){const w=f==="y"?"top":"left",b=f==="y"?"bottom":"right",g=m+u[w],v=m-u[b];m=ep(g,m,v)}if(a){const w=h==="y"?"top":"left",b=h==="y"?"bottom":"right",g=y+u[w],v=y-u[b];y=ep(g,y,v)}const p=l.fn({...t,[f]:m,[h]:y});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:o,[h]:a}}}}}},iO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=Nr(e,t),u={x:n,y:r},h=Kn(s),f=oy(h);let m=u[f],y=u[h];const p=Nr(l,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const v=f==="y"?"height":"width",j=o.reference[f]-o.floating[v]+w.mainAxis,k=o.reference[f]+o.reference[v]-w.mainAxis;m<j?m=j:m>k&&(m=k)}if(d){var b,g;const v=f==="y"?"width":"height",j=SS.has(_r(s)),k=o.reference[h]-o.floating[v]+(j&&((b=a.offset)==null?void 0:b[h])||0)+(j?0:w.crossAxis),S=o.reference[h]+o.reference[v]+(j?0:((g=a.offset)==null?void 0:g[h])||0)-(j?w.crossAxis:0);y<k?y=k:y>S&&(y=S)}return{[f]:m,[h]:y}}}},oO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:a,elements:l}=t,{apply:c=()=>{},...d}=Nr(e,t),u=await Nl(t,d),h=_r(s),f=ia(s),m=Kn(s)==="y",{width:y,height:p}=o.floating;let w,b;h==="top"||h==="bottom"?(w=h,b=f===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(b=h,w=f==="end"?"top":"bottom");const g=p-u.top-u.bottom,v=y-u.left-u.right,j=Cs(p-u[w],g),k=Cs(y-u[b],v),S=!t.middlewareData.shift;let N=j,T=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=g),S&&!f){const P=Ut(u.left,0),F=Ut(u.right,0),O=Ut(u.top,0),V=Ut(u.bottom,0);m?T=y-2*(P!==0||F!==0?P+F:Ut(u.left,u.right)):N=p-2*(O!==0||V!==0?O+V:Ut(u.top,u.bottom))}await c({...t,availableWidth:T,availableHeight:N});const R=await a.getDimensions(l.floating);return y!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function Wu(){return typeof window<"u"}function oa(e){return NS(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(NS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NS(e){return Wu()?e instanceof Node||e instanceof Ht(e).Node:!1}function An(e){return Wu()?e instanceof Element||e instanceof Ht(e).Element:!1}function nr(e){return Wu()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function lb(e){return!Wu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}const aO=new Set(["inline","contents"]);function Xl(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Rn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!aO.has(s)}const lO=new Set(["table","td","th"]);function cO(e){return lO.has(oa(e))}const dO=[":popover-open",":modal"];function Hu(e){return dO.some(t=>{try{return e.matches(t)}catch{return!1}})}const uO=["transform","translate","scale","rotate","perspective"],hO=["transform","translate","scale","rotate","perspective","filter"],fO=["paint","layout","strict","content"];function cy(e){const t=dy(),n=An(e)?Rn(e):e;return uO.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||hO.some(r=>(n.willChange||"").includes(r))||fO.some(r=>(n.contain||"").includes(r))}function mO(e){let t=Ts(e);for(;nr(t)&&!qo(t);){if(cy(t))return t;if(Hu(t))return null;t=Ts(t)}return null}function dy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pO=new Set(["html","body","#document"]);function qo(e){return pO.has(oa(e))}function Rn(e){return Ht(e).getComputedStyle(e)}function qu(e){return An(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ts(e){if(oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lb(e)&&e.host||ir(e);return lb(t)?t.host:t}function _S(e){const t=Ts(e);return qo(t)?e.ownerDocument?e.ownerDocument.body:e.body:nr(t)&&Xl(t)?t:_S(t)}function _l(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=_S(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=Ht(s);if(o){const l=np(a);
vendor: 4,772 bytes, line 363
363return t.concat(a,a.visualViewport||[],Xl(s)?s:[],l&&n?_l(l):[])}return t.concat(s,_l(s,[],n))}function np(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function CS(e){const t=Rn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=nr(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,l=eu(n)!==o||eu(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function uy(e){return An(e)?e:e.contextElement}function ko(e){const t=uy(e);if(!nr(t))return Jn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=CS(t);let a=(o?eu(n.width):n.width)/r,l=(o?eu(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const gO=Jn(0);function TS(e){const t=Ht(e);return!dy()||!t.visualViewport?gO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function ji(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=uy(e);let a=Jn(1);t&&(r?An(r)&&(a=ko(r)):a=ko(e));const l=yO(o,n,r)?TS(o):Jn(0);let c=(s.left+l.x)/a.x,d=(s.top+l.y)/a.y,u=s.width/a.x,h=s.height/a.y;if(o){const f=Ht(o),m=r&&An(r)?Ht(r):r;let y=f,p=np(y);for(;p&&r&&m!==y;){const w=ko(p),b=p.getBoundingClientRect(),g=Rn(p),v=b.left+(p.clientLeft+parseFloat(g.paddingLeft))*w.x,j=b.top+(p.clientTop+parseFloat(g.paddingTop))*w.y;c*=w.x,d*=w.y,u*=w.x,h*=w.y,c+=v,d+=j,y=Ht(p),p=np(y)}}return nu({width:u,height:h,x:c,y:d})}function hy(e,t){const n=qu(e).scrollLeft;return t?t.left+n:ji(ir(e)).left+n}function ES(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:hy(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function xO(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=ir(r),l=t?Hu(t.floating):!1;if(r===a||l&&o)return n;let c={scrollLeft:0,scrollTop:0},d=Jn(1);const u=Jn(0),h=nr(r);if((h||!h&&!o)&&((oa(r)!=="body"||Xl(a))&&(c=qu(r)),nr(r))){const m=ji(r);d=ko(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=a&&!h&&!o?ES(a,c,!0):Jn(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+u.x+f.x,y:n.y*d.y-c.scrollTop*d.y+u.y+f.y}}function vO(e){return Array.from(e.getClientRects())}function bO(e){const t=ir(e),n=qu(e),r=e.ownerDocument.body,s=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+hy(e);const l=-n.scrollTop;return Rn(r).direction==="rtl"&&(a+=Ut(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:l}}function wO(e,t){const n=Ht(e),r=ir(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,c=0;if(s){o=s.width,a=s.height;const d=dy();(!d||d&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:a,x:l,y:c}}const jO=new Set(["absolute","fixed"]);function kO(e,t){const n=ji(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=nr(e)?ko(e):Jn(1),a=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,d=r*o.y;return{width:a,height:l,x:c,y:d}}function cb(e,t,n){let r;if(t==="viewport")r=wO(e,n);else if(t==="document")r=bO(ir(e));else if(An(t))r=kO(t,n);else{const s=TS(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return nu(r)}function PS(e,t){const n=Ts(e);return n===t||!An(n)||qo(n)?!1:Rn(n).position==="fixed"||PS(n,t)}function SO(e,t){const n=t.get(e);if(n)return n;let r=_l(e,[],!1).filter(l=>An(l)&&oa(l)!=="body"),s=null;const o=Rn(e).position==="fixed";let a=o?Ts(e):e;for(;An(a)&&!qo(a);){const l=Rn(a),c=cy(a);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&jO.has(s.position)||Xl(a)&&!c&&PS(e,a))?r=r.filter(u=>u!==a):s=l,a=Ts(a)}return t.set(e,r),r}function NO(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?Hu(t)?[]:SO(t,this._c):[].concat(n),r],l=a[0],c=a.reduce((d,u)=>{const h=cb(t,u,s);return d.top=Ut(h.top,d.top),d.right=Cs(h.right,d.right),d.bottom=Cs(h.bottom,d.bottom),d.left=Ut(h.left,d.left),d},cb(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function _O(e){const{width:t,height:n}=CS(e);return{width:t,height:n}}function CO(e,t,n){const r=nr(t),s=ir(t),o=n==="fixed",a=ji(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=Jn(0);function d(){c.x=hy(s)}if(r||!r&&!o)if((oa(t)!=="body"||Xl(s))&&(l=qu(t)),r){const m=ji(t,!0,o,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else s&&d();o&&!r&&s&&d();const u=s&&!r&&!o?ES(s,l):Jn(0),h=a.left+l.scrollLeft-c.x-u.x,f=a.top+l.scrollTop-c.y-u.y;return{x:h,y:f,width:a.width,height:a.height}}function Jh(e){return Rn(e).position==="static"}function db(e,t){if(!nr(e)||Rn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ir(e)===n&&(n=n.ownerDocument.body),n}function AS(e,t){const n=Ht(e);
vendor: 8,983 bytes, line 363
363if(Hu(e))return n;if(!nr(e)){let s=Ts(e);for(;s&&!qo(s);){if(An(s)&&!Jh(s))return s;s=Ts(s)}return n}let r=db(e,t);for(;r&&cO(r)&&Jh(r);)r=db(r,t);return r&&qo(r)&&Jh(r)&&!cy(r)?n:r||mO(e)||n}const TO=async function(e){const t=this.getOffsetParent||AS,n=this.getDimensions,r=await n(e.floating);return{reference:CO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function EO(e){return Rn(e).direction==="rtl"}const PO={convertOffsetParentRelativeRectToViewportRelativeRect:xO,getDocumentElement:ir,getClippingRect:NO,getOffsetParent:AS,getElementRects:TO,getClientRects:vO,getDimensions:_O,getScale:ko,isElement:An,isRTL:EO};function RS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AO(e,t){let n=null,r;const s=ir(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const d=e.getBoundingClientRect(),{left:u,top:h,width:f,height:m}=d;if(l||t(),!f||!m)return;const y=Pc(h),p=Pc(s.clientWidth-(u+f)),w=Pc(s.clientHeight-(h+m)),b=Pc(u),v={rootMargin:-y+"px "+-p+"px "+-w+"px "+-b+"px",threshold:Ut(0,Cs(1,c))||1};let j=!0;function k(S){const N=S[0].intersectionRatio;if(N!==c){if(!j)return a();N?a(!1,N):r=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!RS(d,e.getBoundingClientRect())&&a(),j=!1}try{n=new IntersectionObserver(k,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,v)}n.observe(e)}return a(!0),o}function RO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=uy(e),u=s||o?[...d?_l(d):[],..._l(t)]:[];u.forEach(b=>{s&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const h=d&&l?AO(d,n):null;let f=-1,m=null;a&&(m=new ResizeObserver(b=>{let[g]=b;g&&g.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),d&&!c&&m.observe(d),m.observe(t));let y,p=c?ji(e):null;c&&w();function w(){const b=ji(e);p&&!RS(p,b)&&n(),p=b,y=requestAnimationFrame(w)}return n(),()=>{var b;u.forEach(g=>{s&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(y)}}const MO=rO,OO=sO,IO=eO,DO=oO,LO=tO,ub=ZM,$O=iO,FO=(e,t,n)=>{const r=new Map,s={platform:PO,...n},o={...s.platform,_c:r};return XM(e,t,{...s,platform:o})};var BO=typeof document<"u",UO=function(){},hd=BO?x.useLayoutEffect:UO;function ru(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(!ru(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!ru(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function MS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hb(e,t){const n=MS(e);return Math.round(t*n)/n}function Qh(e){const t=x.useRef(e);return hd(()=>{t.current=e}),t}function zO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,h]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=x.useState(r);ru(f,r)||m(r);const[y,p]=x.useState(null),[w,b]=x.useState(null),g=x.useCallback(_=>{_!==S.current&&(S.current=_,p(_))},[]),v=x.useCallback(_=>{_!==N.current&&(N.current=_,b(_))},[]),j=o||y,k=a||w,S=x.useRef(null),N=x.useRef(null),T=x.useRef(u),R=c!=null,P=Qh(c),F=Qh(s),O=Qh(d),V=x.useCallback(()=>{if(!S.current||!N.current)return;const _={placement:t,strategy:n,middleware:f};F.current&&(_.platform=F.current),FO(S.current,N.current,_).then(E=>{const D={...E,isPositioned:O.current!==!1};A.current&&!ru(T.current,D)&&(T.current=D,Yl.flushSync(()=>{h(D)}))})},[f,t,n,F,O]);hd(()=>{d===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(_=>({..._,isPositioned:!1})))},[d]);const A=x.useRef(!1);hd(()=>(A.current=!0,()=>{A.current=!1}),[]),hd(()=>{if(j&&(S.current=j),k&&(N.current=k),j&&k){if(P.current)return P.current(j,k,V);V()}},[j,k,V,P,R]);const I=x.useMemo(()=>({reference:S,floating:N,setReference:g,setFloating:v}),[g,v]),z=x.useMemo(()=>({reference:j,floating:k}),[j,k]),q=x.useMemo(()=>{const _={position:n,left:0,top:0};if(!z.floating)return _;const E=hb(z.floating,u.x),D=hb(z.floating,u.y);return l?{..._,transform:"translate("+E+"px, "+D+"px)",...MS(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:E,top:D}},[n,l,z.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:V,refs:I,elements:z,floatingStyles:q}),[u,V,I,z,q])}const VO=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?ub({element:r.current,padding:s}).fn(n):{}:r?ub({element:r,padding:s}).fn(n):{}}}},WO=(e,t)=>({...MO(e),options:[e,t]}),HO=(e,t)=>({...OO(e),options:[e,t]}),qO=(e,t)=>({...$O(e),options:[e,t]}),KO=(e,t)=>({...IO(e),options:[e,t]}),GO=(e,t)=>({...DO(e),options:[e,t]}),YO=(e,t)=>({...LO(e),options:[e,t]}),JO=(e,t)=>({...VO(e),options:[e,t]});var QO="Arrow",OS=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return i.jsx(Ae.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});OS.displayName=QO;var XO=OS;function IS(e){const[t,n]=x.useState(void 0);return Sr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,l;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,l=d.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var DS="Popper",[LS,$S]=ra(DS),[uH,FS]=LS(DS),BS="PopperAnchor",US=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=FS(BS,n),a=x.useRef(null),l=dt(t,a);return x.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:i.jsx(Ae.div,{...s,ref:l})});US.displayName=BS;var fy="PopperContent",[ZO,e3]=LS(fy),zS=x.forwardRef((e,t)=>{var Z,be,le,Re,Rr,Ti;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,w=FS(fy,n),[b,g]=x.useState(null),v=dt(t,Mr=>g(Mr)),[j,k]=x.useState(null),S=IS(j),N=(S==null?void 0:S.width)??0,T=(S==null?void 0:S.height)??0,R=r+(o!=="center"?"-"+o:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},F=Array.isArray(d)?d:[d],O=F.length>0,V={padding:P,boundary:F.filter(n3),altBoundary:O},{refs:A,floatingStyles:I,placement:z,isPositioned:q,middlewareData:_}=zO({strategy:"fixed",placement:R,whileElementsMounted:(...Mr)=>RO(...Mr,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[WO({mainAxis:s+T,alignmentAxis:a}),c&&HO({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?qO():void 0,...V}),c&&KO({...V}),GO({...V,apply:({elements:Mr,rects:sc,availableWidth:ch,availableHeight:ic})=>{const{width:dh,height:ha}=sc.reference,Ei=Mr.floating.style;Ei.setProperty("--radix-popper-available-width",`${ch}px`),Ei.setProperty("--radix-popper-available-height",`${ic}px`),Ei.setProperty("--radix-popper-anchor-width",`${dh}px`),Ei.setProperty("--radix-popper-anchor-height",`${ha}px`)}}),j&&JO({element:j,padding:l}),r3({arrowWidth:N,arrowHeight:T}),f&&YO({strategy:"referenceHidden",...V})]}),[E,D]=HS(z),G=Xn(y);Sr(()=>{q&&(G==null||G())},[q,G]);const W=(Z=_.arrow)==null?void 0:Z.x,se=(be=_.arrow)==null?void 0:be.y,L=((le=_.arrow)==null?void 0:le.centerOffset)!==0,[M,X]=x.useState();return Sr(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),i.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:q?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M,"--radix-popper-transform-origin":[(Re=_.transformOrigin)==null?void 0:Re.x,(Rr=_.transformOrigin)==null?void 0:Rr.y].join(" "),...((Ti=_.hide)==null?void 0:Ti.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(ZO,{scope:n,placedSide:E,onArrowChange:k,arrowX:W,arrowY:se,shouldHideArrow:L,children:i.jsx(Ae.div,{"data-side":E,"data-align":D,...p,ref:v,style:{...p.style,animation:q?void 0:"none"}})})})});zS.displayName=fy;var VS="PopperArrow",t3={top:"bottom",right:"left",bottom:"top",left:"r
363ight"},WS=x.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=e3(VS,r),a=t3[o.placedSide];return i.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:i.jsx(XO,{...s,ref:n,style:{...s.style,display:"block"}})})});WS.displayName=VS;function n3(e){return e!==null}var r3=e=>({name:"transformOrigin",options:e,fn(t){var w,b,g;const{placement:n,rects:r,middlewareData:s}=t,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,u]=HS(n),h={start:"0%",center:"50%",end:"100%"}[u],f=(((b=s.arrow)==null?void 0:b.x)??0)+l/2,m=(((g=s.arrow)==null?void 0:g.y)??0)+c/2;let y="",p="";return d==="bottom"?(y=a?h:`${f}px`,p=`${-c}px`):d==="top"?(y=a?h:`${f}px`,p=`${r.floating.height+c}px`):d==="right"?(y=`${-c}px`,p=a?h:`${m}px`):d==="left"&&(y=`${r.floating.width+c}px`,p=a?h:`${m}px`),{data:{x:y,y:p}}}});function HS(e){const[t,n="center"]=e.split("-");return[t,n]}var s3=US,i3=zS,o3=WS,[Ku,hH]=ra("Tooltip",[$S]),my=$S(),qS="TooltipProvider",a3=700,fb="tooltip.open",[l3,KS]=Ku(qS),GS=e=>
vendor: 4,256 bytes, line 363
363{const{__scopeTooltip:t,delayDuration:n=a3,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,a=x.useRef(!0),l=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),i.jsx(l3,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:x.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};GS.displayName=qS;var YS="Tooltip",[fH,Gu]=Ku(YS),rp="TooltipTrigger",c3=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Gu(rp,n),o=KS(rp,n),a=my(n),l=x.useRef(null),c=dt(t,l,s.onTriggerChange),d=x.useRef(!1),u=x.useRef(!1),h=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),i.jsx(s3,{asChild:!0,...a,children:i.jsx(Ae.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:je(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:je(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:je(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:je(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:je(e.onBlur,s.onClose),onClick:je(e.onClick,s.onClose)})})});c3.displayName=rp;var d3="TooltipPortal",[mH,u3]=Ku(d3,{forceMount:void 0}),Ko="TooltipContent",JS=x.forwardRef((e,t)=>{const n=u3(Ko,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,a=Gu(Ko,e.__scopeTooltip);return i.jsx(_i,{present:r||a.open,children:a.disableHoverableContent?i.jsx(QS,{side:s,...o,ref:t}):i.jsx(h3,{side:s,...o,ref:t})})}),h3=x.forwardRef((e,t)=>{const n=Gu(Ko,e.__scopeTooltip),r=KS(Ko,e.__scopeTooltip),s=x.useRef(null),o=dt(t,s),[a,l]=x.useState(null),{trigger:c,onClose:d}=n,u=s.current,{onPointerInTransitChange:h}=r,f=x.useCallback(()=>{l(null),h(!1)},[h]),m=x.useCallback((y,p)=>{const w=y.currentTarget,b={x:y.clientX,y:y.clientY},g=y3(b,w.getBoundingClientRect()),v=x3(b,g),j=v3(p.getBoundingClientRect()),k=w3([...v,...j]);l(k),h(!0)},[h]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(c&&u){const y=w=>m(w,u),p=w=>m(w,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",p)}}},[c,u,m,f]),x.useEffect(()=>{if(a){const y=p=>{const w=p.target,b={x:p.clientX,y:p.clientY},g=(c==null?void 0:c.contains(w))||(u==null?void 0:u.contains(w)),v=!b3(b,a);g?f():v&&(f(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,a,d,f]),i.jsx(QS,{...e,ref:o})}),[f3,m3]=Ku(YS,{isInside:!1}),p3=W4("TooltipContent"),QS=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...l}=e,c=Gu(Ko,n),d=my(n),{onClose:u}=c;return x.useEffect(()=>(document.addEventListener(fb,u),()=>document.removeEventListener(fb,u)),[u]),x.useEffect(()=>{if(c.trigger){const h=f=>{const m=f.target;m!=null&&m.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),i.jsx($u,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:i.jsxs(i3,{"data-state":c.stateAttribute,...d,...l,ref:t,style:{...l.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:[i.jsx(p3,{children:r}),i.jsx(f3,{scope:n,isInside:!0,children:i.jsx(mR,{id:c.contentId,role:"tooltip",children:s||r})})]})})});JS.displayName=Ko;var XS="TooltipArrow",g3=x.forwardRef((e,t)=>
363{const{__scopeTooltip:n,...r}=e,s=my(n);return m3(XS,n).isInside?null:i.jsx(o3,{...s,...r,ref:t})});g3.displayName=XS;function y3(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function x3(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 v3(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 b3(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const l=t[o],c=t[a],d=l.x,u=l.y,h=c.x,f=c.y;u>r!=f>r&&n<(h-d)*(r-u)/(f-u)+d&&(s=!s)}return s}function w3(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),j3(t)}function j3(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.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 o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.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 k3=GS,ZS=JS;const S3=k3,N3=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(ZS,{ref:r,sideOffset:t,className:Xe("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}));N3.displayName=ZS.displayName;var qn=function(){return qn=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},qn.apply(this,arguments)};function aa(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 _3(e,t,n,r){function s(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function l(u){try{d(r.next(u))}catch(h){a(h)}}function c(u){try{d(r.throw(u))}catch(h){a(h)}}function d(u){u.done?o(u.value):s(u.value).then(l,c)}d((r=r.apply(e,t||[])).next())})}function C3(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}const T3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class py extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class E3 extends py{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class mb extends py{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class pb extends py{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var sp;(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"})(sp||(sp={}));class P3{constructor(t,{headers:n={},customFetch:r,region:s=sp.Any}={}
363){this.url=t,this.headers=n,this.region=s,this.fetch=T3(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return _3(this,arguments,void 0,function*(n,r={}){var s;let o,a;try{const{headers:l,method:c,body:d,signal:u,timeout:h}=r;let f={},{region:m}=r;m||(m=this.region);const y=new URL(`${this.url}/${n}`);m&&m!=="any"&&(f["x-region"]=m,y.searchParams.set("forceFunctionRegion",m));let p;d&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&d instanceof Blob||d instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",p=d):typeof d=="string"?(f["Content-Type"]="text/plain",p=d):typeof FormData<"u"&&d instanceof FormData?p=d:(f["Content-Type"]="application/json",p=JSON.stringify(d)):d&&typeof d!="string"&&!(typeof Blob<"u"&&d instanceof Blob)&&!(d instanceof ArrayBuffer)&&!(typeof FormData<"u"&&d instanceof FormData)?p=JSON.stringify(d):p=d;let w=u;h&&(a=new AbortController,o=setTimeout(()=>a.abort(),h),u?(w=a.signal,u.addEventListener("abort",()=>a.abort())):w=a.signal);const b=yield this.fetch(y.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),l),body:p,signal:w}).catch(k=>{throw new E3(k)}),g=b.headers.get("x-relay-error");if(g&&g==="true")throw new mb(b);if(!b.ok)throw new pb(b);let v=((s=b.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),j;return v==="application/json"?j=yield b.json():v==="application/octet-stream"||v==="application/pdf"?j=yield b.blob():v==="text/event-stream"?j=b:v==="multipart/form-data"?j=yield b.formData():j=yield b.text(),{data:j,error:null,response:b}}catch(l){return{data:null,error:l,response:l instanceof pb||l instanceof mb?l.context:void 0}}finally{o&&clearTimeout(o)}})}}var A3=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
363de=e.code}},R3=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,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.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;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");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let a=null,l=null,c=null,d=o.status,u=o.statusText;if(o.ok){var h,f;if(n.method!=="HEAD"){var m;const w=await o.text();w===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((m=n.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?l=w:l=JSON.parse(w))}const y=(h=n.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),p=(f=o.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&p&&p.length>1&&(c=parseInt(p[1])),n.isMaybeSingle&&Array.isArray(l)&&(l.length>1?(a={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,d=406,u="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{const y=await o.text();try{a=JSON.parse(y),Array.isArray(a)&&o.status===404&&(l=[],a=null,d=200,u="OK")}catch{o.status===404&&y===""?(d=204,u="No Content"):a={message:y}}if(a&&n.shouldThrowOnError)throw new A3(a)}return{error:a,data:l,count:c,status:d,statusText:u}});return this.shouldThrowOnError||(s=s.catch(o=>{var a;let l="",c="",d="";const u=o==null?void 0:o.cause;if(u){var h,f,m,y;const b=(h=u==null?void 0:u.message)!==null&&h!==void 0?h:"",g=(f=u==null?void 0:u.code)!==null&&f!==void 0?f:"";l=`${(m=o==null?void 0:o.name)!==null&&m!==void 0?m:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 364 365Caused by: ${(y=u==null?void 0:u.name)!==null&&y!==void 0?y:"Error"}: ${b}`,g&&(l+=` (${g})`),u!=null&&u.stack&&(l+=` 366${u.stack}`)}else{var p;l=(p=o==null?void 0:o.stack)!==null&&p!==void 0?p:""}const w=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",c="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${w} 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.`)):((u==null?void 0:u.name)==="HeadersOverflowError"||(u==null?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",c="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(c+=`. Your request URL is ${w} 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.`)),{error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:d},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},M3=class extends R3{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 o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${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`,o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${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}
366explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:o="text"}={}){var a;const l=[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+${o}; for="${c}"; options=${l};`),o==="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 gb=new RegExp("[,()]");var Hi=class extends M3{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"&&gb.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"&&gb.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 o=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>n!==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}},O3=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}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 o=!1;const a=(e??"*").split("").map(d=>/\s/.test(d)&&!o?"":(d==='"'&&(o=!o),d)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",a),r&&c.append("Prefer",`count=${r}`),new Hi({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:o,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),n||a.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){const c=[...new Set(l)].map(d=>`"${d}"`);o.searchParams.set("columns",c.join(","))}}return new Hi({method:s,url:o,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var o;const a="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const d=e.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(d.length>0){const u=[...new Set(d)].map(h=>`"${h}"`);l.searchParams.set("columns",u.join(","))}}return new Hi({method:a,url:l,headers:c,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Hi({method:r,url:s,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Hi({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Cl(e){"@babel/helpers - typeof";return Cl=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},Cl(e)}function I3(e,t){if(Cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D3(e){var t=I3(e,"string");return Cl(t)=="symbol"?t:t+""}function L3(e,t,n){return(t=D3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yb(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 Ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
366t%2?yb(Object(n),!0).forEach(function(r){L3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $3=class eN{constructor(t,{headers:n={},schema:r,fetch:s,timeout:o,urlLengthLimit:a=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=a;const l=s??globalThis.fetch;o!==void 0&&o>0?this.fetch=(c,d)=>{const u=new AbortController,h=setTimeout(()=>u.abort(),o),f=d==null?void 0:d.signal;if(f){if(f.aborted)return clearTimeout(h),l(c,d);const m=()=>{clearTimeout(h),u.abort()};return f.addEventListener("abort",m,{once:!0}),l(c,Ac(Ac({},d),{},{signal:u.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",m)})}return l(c,Ac(Ac({},d),{},{signal:u.signal})).finally(()=>clearTimeout(h))}:this.fetch=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new O3(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new eN(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:o}={}){var a;let l;const c=new URL(`${this.url}/rpc/${t}`);let d;const u=m=>m!==null&&typeof m=="object"&&(!Array.isArray(m)||m.some(u)),h=r&&Object.values(n).some(u);h?(l="POST",d=n):r||s?(l=r?"HEAD":"GET",Object.entries(n).filter(([m,y])=>y!==void 0).map(([m,y])=>[m,Array.isArray(y)?`{${y.join(",")}}`:`${y}`]).forEach(([m,y])=>{c.searchParams.append(m,y)})):(l="POST",d=n);const f=new Headers(this.headers);return h?f.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&f.set("Prefer",`count=${o}
366`),new Hi({method:l,url:c,headers:f,schema:this.schemaName,body:d,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit})}};class F3{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.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"&&globalThis.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 n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor: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: 367import ws from "ws" 368new 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.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 369 370Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const B3="2.101.1",U3=`realtime-js/${B3}`,z3="1.0.0",tN="2.0.0",V3=tN,W3=1e4,H3=100,Yr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},nN={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},ip={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class q3{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,o;const a=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(o=t.join_ref)!==null&&o!==void 0?o:"",d=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(u).length===0?"":JSON.stringify(u);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`userEvent length ${d.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+l.length+a.length+d.length+h.length,m=new ArrayBuffer(this.HEADER_LENGTH+f);let y=new DataView(m),p=0;y.setUint8(p++,this.KINDS.userBroadcastPush),y.setUint8(p++,c.length),y.setUint8(p++,l.length),y.setUint8(p++,a.length),y.setUint8(p++,d.length),y.setUint8(p++,h.length),y.setUint8(p++,n),Array.from(c,b=>y.setUint8(p++,b.charCodeAt(0))),Array.from(l,b=>y.setUint8(p++,b.charCodeAt(0))),Array.from(a,b=>y.setUint8(p++,b.charCodeAt(0))),Array.from(d,b=>y.setUint8(p++,b.charCodeAt(0))),Array.from(h,b=>y.setUint8(p++,b.charCodeAt(0)));var w=new Uint8Array(m.byteLength+r.byteLength);return w.set(new Uint8Array(m),0),w.set(new Uint8Array(r),m.byteLength),w.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,o,a,l,c]=r;
370return n({join_ref:s,ref:o,topic:a,event:l,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),o=n.getUint8(2),a=n.getUint8(3),l=n.getUint8(4);let c=this.HEADER_LENGTH+4;const d=r.decode(t.slice(c,c+s));c=c+s;const u=r.decode(t.slice(c,c+o));c=c+o;const h=r.decode(t.slice(c,c+a));c=c+a;const f=t.slice(c,t.byteLength),m=l===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,y={type:this.BROADCAST_EVENT,event:u,payload:m};return a>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:d,event:this.BROADCAST_EVENT,payload:y}}_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 we;(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"})(we||(we={}));const xb=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((o,a)=>(o[a]=K3(a,e,t,s),o),{}):{}},K3=(e,t,n,r)=>{const s=t.find(l=>
vendor: 5,523 bytes, line 370
370l.name===e),o=s==null?void 0:s.type,a=n[e];return o&&!r.includes(o)?rN(o,a):op(a)},rN=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return Q3(t,n)}switch(e){case we.bool:return G3(t);case we.float4:case we.float8:case we.int2:case we.int4:case we.int8:case we.numeric:case we.oid:return Y3(t);case we.json:case we.jsonb:return J3(t);case we.timestamp:return X3(t);case we.abstime:case we.date:case we.daterange:case we.int4range:case we.int8range:case we.money:case we.reltime:case we.text:case we.time:case we.timestamptz:case we.timetz:case we.tsrange:case we.tstzrange:return op(t);default:return op(t)}},op=e=>e,G3=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Y3=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},J3=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},Q3=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const a=e.slice(1,n);try{o=JSON.parse("["+a+"]")}catch{o=a?a.split(","):[]}return o.map(l=>rN(t,l))}return e},X3=e=>typeof e=="string"?e.replace(" ","T"):e,sN=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 Qa=e=>typeof e=="function"?e:function(){return e},Z3=typeof self<"u"?self:null,qi=typeof window<"u"?window:null,Fn=Z3||qi||globalThis,eI="2.0.0",tI=1e4,nI=1e3,Vn={connecting:0,open:1,closing:2,closed:3},_t={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},dr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ap={longpoll:"longpoll",websocket:"websocket"},rI={complete:4},lp="base64url.bearer.phx.",Rc=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()}matchReceive({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})}},iN=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))}},sI=class{constructor(e,t,n){this.state=_t.closed,this.topic=e,this.params=Qa(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Rc(this,dr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new iN(()=>{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=_t.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=_t.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=_t.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=_t.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 Rc(this,dr.leave,Qa({}),this.timeout).send(),this.state=_t.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(dr.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}
vendor: 5,263 bytes, line 370
370teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=_t.closed,this.bindings=[]}onClose(e){this.on(dr.close,e)}onError(e){return this.on(dr.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 Rc(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=_t.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(dr.close,"leave")},n=new Rc(this,dr.leave,Qa({}),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=_t.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 o=this.bindings.filter(a=>a.event===e&&this.filterBindings(a,t,n));for(let a=0;a<o.length;a++)o[a].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===_t.closed}isErrored(){return this.state===_t.errored}isJoined(){return this.state===_t.joined}isJoining(){return this.state===_t.joining}isLeaving(){return this.state===_t.leaving}},su=class{static request(e,t,n,r,s,o,a){if(Fn.XDomainRequest){let l=new Fn.XDomainRequest;return this.xdomainRequest(l,e,t,r,s,o,a)}else if(Fn.XMLHttpRequest){let l=new Fn.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,s,o,a)}else{if(Fn.fetch&&Fn.AbortController)return this.fetchRequest(e,t,n,r,s,o,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,o,a){let l={method:e,headers:n,body:r},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),l.signal=c.signal),Fn.fetch(t,l).then(d=>d.text()).then(d=>this.parseJSON(d)).then(d=>a&&a(d)).catch(d=>{d.name==="AbortError"&&o?o():a&&a(null)}),c}static xdomainRequest(e,t,n,r,s,o,a){return e.timeout=s,e.open(t,n),e.onload=()=>{let l=this.parseJSON(e.responseText);a&&a(l)},o&&(e.ontimeout=o),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,o,a,l){e.open(t,n,!0),e.timeout=o;for(let[c,d]of Object.entries(r))e.setRequestHeader(c,d);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===rI.complete&&l){let c=this.parseJSON(e.responseText);l(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,o=e[r];typeof o=="object"?n.push(this.serialize(o,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(o))}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)}`}},iI=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)},Ii=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(lp)&&(this.authToken=atob(t[1].slice(lp.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=Vn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ap.websocket),"$1/"+ap.longpoll)}endpointURL(){return su.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Vn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Vn.open||this.readyState===Vn.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(o=>{setTimeout(()=>this.onmessage({data:o}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Vn.open,this.onopen({}),this.poll();break;
370case 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=iI(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(` 371`),()=>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=Vn.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 o,a=()=>{this.reqs.delete(o),r()};o=su.request(e,this.endpointURL(),t,n,this.timeout,a,l=>{this.reqs.delete(o),this.isActive()&&s(l)}),this.reqs.add(o)}},oI=class La{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:o,onLeave:a,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=La.syncState(this.state,s,o,a),this.pendingDiffs.forEach(c=>{this.state=La.syncDiff(this.state,c,o,a)}),this.pendingDiffs=[],l()}),this.channel.on(r.diff,s=>{let{onJoin:o,onLeave:a,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=La.syncDiff(this.state,s,o,a),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return La.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let o=this.clone(t),a={},l={};return this.map(o,(c,d)=>{n[c]||(l[c]=d)}),this.map(n,(c,d)=>{let u=o[c];if(u){let h=d.metas.map(p=>p.phx_ref),f=u.metas.map(p=>p.phx_ref),m=d.metas.filter(p=>f.indexOf(p.phx_ref)<0),y=u.metas.filter(p=>h.indexOf(p.phx_ref)<0);m.length>0&&(a[c]=d,a[c].metas=m),y.length>0&&(l[c]=this.clone(u),l[c].metas=y)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){let{joins:o,leaves:a}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(o,(l,c)=>{let d=t[l];if(t[l]=this.clone(c),d){let u=t[l].metas.map(f=>f.phx_ref),h=d.metas.filter(f=>u.indexOf(f.phx_ref)<0);t[l].metas.unshift(...h)}r(l,d,c)}),this.map(a,(l,c)=>{let d=t[l];if(!d)return;let u=c.metas.map(h=>h.phx_ref);d.metas=d.metas.filter(h=>u.indexOf(h.phx_ref)<0),s(l,d,c),d.metas.length===0&&delete t[l]}),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))}},Mc={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,o,a]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:o,payload:a})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:o}=e,a=this.META_LENGTH+t.length+n.length+s.length+r.length,l=new ArrayBuffer(this.HEADER_LENGTH+a),c=new DataView(l),d=0;c.setUint8(d++,this.KINDS.push),c.setUint8(d++,t.length),c.setUint8(d++,n.length),c.setUint8(d++,s.length),c.setUint8(d++,r.length),Array.from(t,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(d++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(d++,h.charCodeAt(0)));var u=new Uint8Array(l.byteLength+o.byteLength);return u.set(new Uint8Array(l),0),u.set(new Uint8Array(o),l.byteLength),u.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,419 bytes, line 371
371,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,l=n.decode(e.slice(a,a+r));a=a+r;let c=n.decode(e.slice(a,a+s));a=a+s;let d=n.decode(e.slice(a,a+o));a=a+o;let u=e.slice(a,e.byteLength);return{join_ref:l,ref:null,topic:c,event:d,payload:u}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),o=t.getUint8(3),a=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(l,l+r));l=l+r;let d=n.decode(e.slice(l,l+s));l=l+s;let u=n.decode(e.slice(l,l+o));l=l+o;let h=n.decode(e.slice(l,l+a));l=l+a;let f=e.slice(l,e.byteLength),m={status:h,response:f};return{join_ref:c,ref:d,topic:u,event:dr.reply,payload:m}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),o=this.HEADER_LENGTH+2,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let c=e.slice(o,e.byteLength);return{join_ref:null,ref:null,topic:a,event:l,payload:c}}},aI=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||tI,this.transport=t.transport||Fn.WebSocket||Ii,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Fn&&Fn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Mc.encode.bind(Mc),this.defaultDecoder=Mc.decode.bind(Mc),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!==Ii?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;qi&&qi.addEventListener&&(qi.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),qi.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),qi.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,o)=>{console.log(`${r}: ${s}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Qa(t.params||{}),this.endPoint=`${e}/${ap.websocket}`,this.vsn=t.vsn||eI,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new iN(()=>{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 Ii}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=su.appendParams(su.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=Qa(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ii?this.connectWithFallback(Ii,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 Ii:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${lp}${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,o,a=this.transportName(e),l=c=>{this.log("transport",`falling back to ${a}...`,c),this.off([s,o]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),o=this.onError(c=>{this.log("transport","error",c),r&&!n&&(clearTimeout(this.fallbackTimer),l(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(l,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(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),nI,"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===Vn.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(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
371triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(dr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Vn.connecting:return"connecting";case Vn.open:return"open";case Vn.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 sI(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:o}=e;this.log("push",`${t} ${n} (${o}, ${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:o,join_ref:a}=t;if(o&&o===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",l)}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} ${o&&"("+o+")"||""}`.trim(),s);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(n,r,s,a)&&c.trigger(r,s,o,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 Xa{constructor(t,n){const r=cI(n);this.presence=new oI(t.getChannel(),r),this.presence.onJoin((s,o,a)=>{const l=Xa.onJoinPayload(s,o,a);t.getChannel().trigger("presence",l)}),this.presence.onLeave((s,o,a)=>{const l=Xa.onLeavePayload(s,o,a);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Xa.transformState(this.presence.state)}static transformState(t){return t=lI(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=fd(s),n},{})}static onJoinPayload(t,n,r){const s=vb(n),o=fd(r);return{event:"join",key:t,currentPresences:s,newPresences:o}}static onLeavePayload(t,n,r){const s=vb(n),o=fd(r);return{event:"leave",key:t,currentPresences:s,leftPresences:o}}}function fd(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function lI(e){return JSON.parse(JSON.stringify(e))}function cI(e){return(e==null?void 0:e.events)&&{events:e.events}}function vb(e){return e!=null&&e.metas?fd(e):[]}var bb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(bb||(bb={}));class dI{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Xa(this.channel.channelAdapter,n)}}class uI{constructor(t,n,r){const s=hI(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`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>H3){const o=this.channel.pushBuffer.shift();o.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${o.event}`,o.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===Yr.joined}isJoined(){return this.state===Yr.joined}isJoining(){return this.state===Yr.joining}isClosed(){return this.state===Yr.closed}isLeaving(){return this.state===Yr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function hI(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var wb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(wb||(wb={}));var lo;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(lo||(lo={}));var ur;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ur||(ur={}));class Za{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,o;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 uI(this.socket.socketAdapter,t,this.params),this.presence=new dI(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=sN(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:l,private:c}}=this.params,d=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(m=>m.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[lo.PRESENCE]&&this.bindings[lo.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},f={broadcast:a,presence:Object.assign(Object.assign({},l),{enabled:u}),postgres_changes:d,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(m=>{t==null||t(ur.CHANNEL_ERROR,m)}),this._onClose(()=>t==null?void 0:t(ur.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:m})=>
371{if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){t==null||t(ur.SUBSCRIBED);return}this._updatePostgresBindings(m,t)}).receive("error",m=>{this.state=Yr.errored,t==null||t(ur.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ur.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,o=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,a=[];for(let l=0;l<o;l++){const c=s[l],{filter:{event:d,schema:u,table:h,filter:f}}=c,m=t&&t[l];if(m&&m.event===d&&Za.isFilterValueEqual(m.schema,u)&&Za.isFilterValueEqual(m.table,h)&&Za.isFilterValueEqual(m.filter,f))a.push(Object.assign(Object.assign({},c),{id:m.id}));else{this.unsubscribe(),this.state=Yr.errored,n==null||n(ur.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=Yr.errored&&n&&n(ur.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(),o=t===lo.PRESENCE||t===lo.POSTGRES_CHANGES;if(s&&o)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("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;try{const d=await l.json();c=d.error||d.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
371in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:a}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a,private:this.private}]})};try{const d=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=d.body)===null||s===void 0?void 0:s.cancel()),d.ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var a,l,c;const d=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),d.receive("ok",()=>o("ok")),d.receive("error",()=>o("error")),d.receive("timeout",()=>o("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,o=setTimeout(()=>s.abort(),r),a=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),a}_on(t,n,r){const s=t.toLocaleLowerCase(),o=this.channelAdapter.on(t,r),a={type:s,filter:n,callback:r,ref:o};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,o,a,l,c,d,u;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(m=>m.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const m=f.id,y=(o=f.filter)===null||o===void 0?void 0:o.event;return m&&((a=n.ids)===null||a===void 0?void 0:a.includes(m))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((l=n.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const m=(d=(c=f==null?void 0:f.filter)===null||c===void 0?void 0:c.event)===null||d===void 0?void 0:d.toLocaleLowerCase();return m==="*"||m===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:o,join:a}=nN;return n&&[r,s,o,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:o,table:a,commit_timestamp:l,type:c,errors:d}=s;return Object.assign(Object.assign({},{schema:o,table:a,commit_timestamp:l,eventType:c,new:{},old:{},errors:d}),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=xb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=xb(t.columns,t.old_record)),n}}class fI{constructor(t,n){this.socket=new aI(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(o=>{setTimeout(()=>
371o("timeout"),s),this.socket.disconnect(()=>{t(),o("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()==ip.connecting}isDisconnecting(){return this.socket.connectionState()==ip.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const mI={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},pI=[1e3,2e3,5e3,1e4],gI=1e4,yI=` 372 addEventListener("message", (e) => { 373 if (e.data.event === "start") { 374 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 375 } 376 });`;class xI{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={},this.ref=0,this.serializer=new q3,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=o=>o?(...a)=>o(...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 fI(t,s),this.httpEndpoint=sN(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} 377 378To use Realtime in Node.js, you need to provide a WebSocket implementation: 379 380Option 1: Use Node.js 22+ which has native WebSocket support 381Option 2: Install and provide the "ws" package: 382 383 npm install ws 384 385 import ws from "ws" 386 const client = new RealtimeClient(url, { 387 ...options, 388 transport: ws 389 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return 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(),this.channels.length===0&&this.disconnect(),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 this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||ip.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(o=>o.topic===r);if(s)return s;{const o=new Za(`realtime:${t}`,n,this);return this.channels.push(o),o}}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)}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.forEac
389h(s=>{const o={access_token:n,version:U3};n&&s.updateJoinPayload(o),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(nN.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([yI],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,o,a,l,c,d,u;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 h={};h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:W3,h.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:mI.HEARTBEAT_INTERVAL,h.transport=(a=t==null?void 0:t.transport)!==null&&a!==void 0?a:F3.getWebSocketConstructor(),h.params=t==null?void 0:t.params,h.logger=t==null?void 0:t.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),h.reconnectAfterMs=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:p=>pI[p-1]||gI;let f,m;const y=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:V3;switch(y){case z3:f=(p,w)=>w(JSON.stringify(p)),m=(p,w)=>w(JSON.parse(p));break;case tN:f=this.serializer.encode.bind(this.serializer),m=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=y,h.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:f,h.decode=(u=t==null?void 0:t.decode)!==null&&u!==void 0?u:m,h.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,h.params=Object.assign(Object.assign({},h.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,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Tl=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 vI(e,t,n){const r=new URL(t,e);if(n)for(const[s,o]of Object.entries(n))o!==void 0&&r.searchParams.set(s,o);return r.toString()}async function bI(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 wI(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:o,headers:a}){const l=vI(e.baseUrl,r,s),c=await bI(e.auth),d=await t(l,{method:n,headers:{...o?{"Content-Type":"application/json"}:{},...c,...a},body:o?JSON.stringify(o):void 0}),u=await d.text(),h=(d.headers.get("content-type")||"").includes("application/json"),f=h&&u?JSON.parse(u):u;if(!d.ok){const m=h?f:void 0,y=m==null?void 0:m.error;throw new Tl((y==null?void 0:y.message)??`Request failed with status ${d.status}`,{status:d.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:m})}return{status:d.status,headers:d.headers,data:f}}}}function Oc(e){return e.join("�")}var jI=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Oc(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/${Oc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Oc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Oc(e.namespace)}`}),!0}catch(t){if(t instanceof Tl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Tl&&n.status===409)return;throw n}}};function Di(e){return e.join("�")}var kI=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/${Di(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/${Di(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/${Di(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/${Di(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/${Di(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/${Di(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Tl&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Tl&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},SI=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=wI({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new jI(this.client,t),this.tableOps=new k
389I(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)}async 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)}},Yu=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}};function Ju(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var cp=class extends Yu{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{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},oN=class extends Yu{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const NI=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),_I=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)},dp=e=>{if(Array.isArray(e))return e.map(n=>dp(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,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=dp(r)}),t},CI=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function El(e){"@babel/helpers - typeof";return El=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},El(e)}function TI(e,t){if(El(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(El(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EI(e){var t=TI(e,"string");return El(t)=="symbol"?t:t+""}function PI(e,t,n){return(t=EI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jb(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 re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jb(Object(n),!0).forEach(function(r){PI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const kb=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},AI=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let o=parseInt(s.status,10);Number.isFinite(o)||(o=500),s.json().then(a=>{const l=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||o+"";t(new cp(kb(a),o,l,r))}).catch(()=>{const a=o+"";t(new cp(s.statusText||`HTTP ${o} error`,o,a,r))})}else t(new oN(kb(e),e,r))},RI=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?re(re({},s),n):(_I(r)?(s.headers=re({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),re(re({},s),n))};async function _a(e,t,n,r,s,o,a){return new Promise((l,c)=>{e(n,RI(t,r,s,o)).then(d=>{if(!d.ok)throw d;if(r!=null&&r.noResolveJson)return d;if(a==="vectors"){const u=d.headers.get("content-type");if(d.headers.get("content-length")==="0"||d.status===204)return{};if(!u||!u.includes("application/json"))return{}}return d.json()}).then(d=>l(d)).catch(d=>AI(d,c,r,a))})}function aN(e="storage"){return{get:async(t,n,r,s)=>_a(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,o)=>_a(t,"POST",n,s,o,r,e),put:async(t,n,r,s,o)=>_a(t,"PUT",n,s,o,r,e),head:async(t,n,r,s)=>_a(t,"HEAD",n,re(re({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,o)=>_a(t,"DELETE",n,s,o,r,e)}}const MI=aN("storage"),{get:Pl,post:vn,put:up,head:OI,remove:gy}=MI,zt=aN("vectors");var la=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=NI(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=re(re({},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(Ju(n))return{data:null,error:n};throw n}}},II=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(Ju(t))return{data:null,error:t};throw t}}};let lN;lN=Symbol.toStringTag;var DI=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[lN]="BlobDownloadBuilder",this.promise=null}asStream(){return new II(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(Ju(t))return{data:null,error:t};throw t}}};const LI={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Sb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var $I=class extends la{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 o;const a=re(re({},Sb),r);let l=re(re({},s.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",a.cacheControl),c&&o.append("metadata",s.encodeMetadata(c)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",a.cacheControl),c&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(c))):(o=n,l["cache-control"]=`max-age=${a.cacheControl}`,l["content-type"]=a.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!a.duplex&&(a.duplex="half")),r!=null&&r.headers&&(l=re(re({},l),r.headers));const d=s._removeEmptyFolders(t),u=s._getFinalPath(d),h=await(e=="PUT"?up:vn)(s.fetch,`${s.url}/object/${u}`,o,re({headers:l},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:d,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 o=s._removeEmptyFolders(e),a=s._getFinalPath(o),l=new URL(s.url+`/object/upload/sign/${a}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const d=re(re({},Sb),r),u=re(re({},s.headers),{"x-upsert":String(d.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",d.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",d.cacheControl)):(c=n,u["cache-control"]=`max-age=${d.cacheControl}`,u["content-type"]=d.contentType),{path:o,fullPath:(await up(s.fetch,l.toString(),c,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=re({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await vn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),a=new URL(n.url+o.url),l=a.searchParams.get("token");if(!l)throw new Yu("No token returned by API");return{signedUrl:a.toString(),path:e,token:l}})}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 vn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
389stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await vn(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 o=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let a=await vn(r.fetch,`${r.url}/object/sign/${s}`,re({expiresIn:t},o?{transform:n.transform}:{}),{headers:r.headers});const l=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"",c=o&&a.signedURL.includes("/object/sign/")?a.signedURL.replace("/object/sign/","/render/image/sign/"):a.signedURL;return{signedUrl:encodeURI(`${r.url}${c}${l}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await vn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(a=>re(re({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=s?`?${s}`:"",a=this._getFinalPath(e),l=()=>Pl(this.fetch,`${this.url}/${r}/${a}${o}`,{headers:this.headers,noResolveJson:!0},n);return new DI(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>dp(await Pl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await OI(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Ju(s)){var r;const o=s instanceof cp?s.status:s instanceof oN?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(o!==void 0&&[400,404].includes(o))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});a!==""&&r.push(a);let l=r.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${l}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await gy(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=re(re(re({},LI),t),{},{prefix:e||""});return await vn(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=re({},e);return await vn(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,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const FI="2.101.1",Zl={"X-Client-Info":`storage-js/${FI}`};var BI=class extends la{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 o=s.href.replace(/\/$/,""),a=re(re({},Zl),t);super(o,a,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Pl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Pl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await vn(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 up(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 vn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await gy(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():""}},UI=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=re(re({},Zl),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await vn(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 Pl(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await gy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!CI(e))throw new Yu("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 SI({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
389),r=this.shouldThrowOnError;return new Proxy(n,{get(s,o){const a=s[o];return typeof a!="function"?a:async(...l)=>{try{return{data:await a.apply(s,l),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},zI=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=re(re({},Zl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await zt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await zt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},VI=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=re(re({},Zl),{},{"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 zt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await zt.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 zt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await zt.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 zt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},WI=class extends la{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=re(re({},Zl),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},HI=class extends WI{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new qI(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)}},qI=class extends zI{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,re(re({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,re(re({},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 KI(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
389,KI=class extends VI{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,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},GI=class extends BI{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new $I(this.url,this.headers,e,this.fetch)}get vectors(){return new HI(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new UI(this.url+"/iceberg",this.headers,this.fetch)}};const cN="2.101.1",Ki=30*1e3,hp=3,Xh=hp*Ki,YI="http://localhost:9999",JI="supabase.auth.token",QI={"X-Client-Info":`gotrue-js/${cN}`},fp="X-Supabase-Api-Version",dN={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},XI=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ZI=10*60*1e3;class Al extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function Q(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class e5 extends Al{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function t5(e){return Q(e)&&e.name==="AuthApiError"}class qs extends Al{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ar extends Al{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Ft extends Ar{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Zh(e){return Q(e)&&e.name==="AuthSessionMissingError"}class Li extends Ar{constructor(){super("Auth session or user missing","AuthInvalidToken
389ResponseError",500,void 0)}}class Ic extends Ar{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Dc extends Ar{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function n5(e){return Q(e)&&e.name==="AuthImplicitGrantRedirectError"}class Nb extends Ar{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class r5 extends Ar{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 mp extends Ar{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function ef(e){return Q(e)&&e.name==="AuthRetryableFetchError"}class _b extends Ar{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class pp extends Ar{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const iu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Cb=` 390\r=`.split(""),s5=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Cb.length;t+=1)e[Cb[t].charCodeAt(0)]=-2;for(let t=0;t<iu.length;t+=1)e[iu[t].charCodeAt(0)]=t;return e})();function Tb(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(iu[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(iu[r]),t.queuedBits-=6}}function uN(e,t,n){const r=s5[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 Eb(e){const t=[],n=a=>{t.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=a=>{a5(a,r,n)};for(let a=0;a<e.length;a+=1)uN(e.charCodeAt(a),s,o);return t.join("")}function i5(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 o5(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}i5(r,t)}}function a5(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 So(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)uN(e.charCodeAt(s),n,r);return new Uint8Array(t)}function l5(e){const t=[];return o5(e,n=>t.push(n)),new Uint8Array(t)}function Js(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Tb(s,n,r)),Tb(null,n,r),t.join("")}function c5(e){return Math.round(Date.now()/1e3)+e}function d5(){return Symbol("auth-callback")}const st=()=>typeof window<"u"&&typeof document<"u",$s={tested:!1,writable:!1},hN=()=>{if(!st())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($s.tested)return $s.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),$s.tested=!0,$s.writable=!0}catch{$s.tested=!0,$s.writable=!1}return $s.writable};function u5(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
390h((s,o)=>{t[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const fN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),h5=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Gi=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Fs=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},rt=async(e,t)=>{await e.removeItem(t)};class Qu{constructor(){this.promise=new Qu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Qu.promiseConstructor=Promise;function Lc(e){const t=e.split(".");if(t.length!==3)throw new pp("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!XI.test(t[r]))throw new pp("JWT not in base64url format");return{header:JSON.parse(Eb(t[0])),payload:JSON.parse(Eb(t[1])),signature:So(t[2]),raw:{header:t[0],payload:t[1]}}}async function f5(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function m5(e,t){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const a=await e(o);if(!t(o,null,a)){r(a);return}}catch(a){if(!t(o,a)){s(a);return}}})()})}function p5(e){return("0"+e.toString(16)).substr(-2)}function g5(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,p5).join("")}async function y5(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function x5(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 y5(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function $i(e,t,n=!1){const r=g5();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Gi(e,`${t}-code-verifier`,s);const o=await x5(r);return[o,r===o?"plain":"s256"]}const v5=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function b5(e){const t=e.headers.get(fp);if(!t||!t.match(v5))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function w5(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 j5(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 k5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Fi(e){if(!k5.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function tf(){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 S5(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const o=r.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="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 Pb(e){return JSON.parse(JSON.stringify(e))}const Vs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),N5=[502,503,504];async function Ab(e){var t;if(!h5(e))throw new mp(Vs(e),0);if(N5.includes(e.status))throw new mp(Vs(e),e.status);let n;try{n=await e.json()}catch(o){throw new qs(Vs(o),o)}let r;const s=b5(e);if(s&&s.getTime()>=dN["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 _b(Vs(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Ft}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((o,a)=>
390o&&typeof a=="string",!0))throw new _b(Vs(n),e.status,n.weak_password.reasons);throw new e5(Vs(n),e.status||500,r)}const _5=(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 ee(e,t,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);o[fp]||(o[fp]=dN["2024-01-01"].name),r!=null&&r.jwt&&(o.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 l=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await C5(e,t,n+l,{headers:o,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 C5(e,t,n,r,s,o){const a=_5(t,r,s,o);let l;try{l=await e(n,Object.assign({},a))}catch(c){throw console.error(c),new mp(Vs(c),0)}if(l.ok||await Ab(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await Ab(c)}}function gn(e){var t;let n=null;P5(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=c5(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Rb(e){const t=gn(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 Jr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function T5(e){return{data:e,error:null}}function E5(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=e,a=aa(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},c=Object.assign({},a);return{data:{properties:l,user:c},error:null}}function Mb(e){return e}function P5(e){return e.access_token&&e.refresh_token&&e.expires_in}const nf=["global","local","others"];class A5{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=fN(r),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)}}async signOut(t,n=nf[0]){if(nf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${nf.join(", ")}`);try{return await ee(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Q(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await ee(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Jr})}catch(r){if(Q(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=aa(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 ee(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:E5,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Q(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Jr})}catch(n){if(Q(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,o,a,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await ee(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:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Mb});if(u.error)throw u.error;const h=await u.json(),f=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,m=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(y=>{const p=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);d[`${w}Page`]=p}),d.total=parseInt(f)),{data:Object.assign(Object.assign({},h),d),error:null}}catch(d){if(Q(d))return{data:{users:[]},error:d};throw d}}async getUserById(t){Fi(t);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Jr})}catch(n){if(Q(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Fi(t);try{return await ee(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Jr})}catch(r){if(Q(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Fi(t);
390try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Jr})}catch(r){if(Q(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Fi(t.userId);try{const{data:n,error:r}=await ee(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(Q(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Fi(t.userId),Fi(t.id);try{return{data:await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,o,a,l,c;try{const d={nextPage:null,lastPage:0,total:0},u=await ee(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:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:Mb});if(u.error)throw u.error;const h=await u.json(),f=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,m=(c=(l=u.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(y=>{const p=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);d[`${w}Page`]=p}),d.total=parseInt(f)),{data:Object.assign(Object.assign({},h),d),error:null}}catch(d){if(Q(d))return{data:{clients:[]},error:d};throw d}}async _createOAuthClient(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await ee(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Q(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await ee(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await ee(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(Q(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await ee(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Q(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await ee(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Q(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await ee(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Q(n))return{data:null,error:n};throw n}}}function Ob(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Dn={debug:!!(globalThis&&hN()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
390class mN extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Ib extends mN{}async function R5(e,t,n){Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),Dn.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 o=>{if(o){clearTimeout(s),Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await n()}finally{Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Ib(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Dn.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(o){if(t>0&&clearTimeout(s),(o==null?void 0:o.name)==="AbortError"&&t>0){if(r.signal.aborted)return Dn.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){Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,a.name);try{return await n()}finally{Dn.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 Dn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Ib(`Lock "${e}" was released because another request stole it`)}throw o}}function M5(){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 pN(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function O5(e){return parseInt(e,16)}function I5(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function D5(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:o=new Date,nonce:a,notBefore:l,requestId:c,resources:d,scheme:u,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(` 391`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=pN(e.address),y=u?`${u}://${r}`:r,p=e.statement?`${e.statement} 392`:"",w=`${y} wants you to sign in with your Ethereum account: 393${m} 394 395${p}`;let b=`URI: ${h} 396Version: ${f} 397Chain ID: ${n}${a?` 398Nonce: ${a}`:""} 399Issued At: ${o.toISOString()}`;if(s&&(b+=` 400Expiration Time: ${s.toISOString()}`),l&&(b+=` 401Not Before: ${l.toISOString()}
401`),c&&(b+=` 402Request ID: ${c}`),d){let g=` 403Resources:`;for(const v of d){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);g+=` 404- ${v}`}b+=g}return`${w} 405${b}`}class We extends Error{constructor({message:t,code:n,cause:r,name:s}){var o;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(o=s??(r instanceof Error?r.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=n}}class ou extends We{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function L5({error:e,options:t}){var n,r,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new We({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=o.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new We({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=o.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new We({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=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new We({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 We({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new We({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new We({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new We({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(gN(a)){if(o.rp.id!==a)return new We({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new We({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new We({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 We({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 We({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function $5({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 We({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new We({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(gN(r)){if(n.rpId!==r)return new We({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new We({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new We({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
405ROR",cause:e})}return new We({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class F5{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 B5=new F5;function U5(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=aa(e,["challenge","user","excludeCredentials"]),o=So(t).buffer,a=Object.assign(Object.assign({},n),{id:So(n.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:o,user:a});if(r&&r.length>0){l.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const d=r[c];l.excludeCredentials[c]=Object.assign(Object.assign({},d),{id:So(d.id).buffer,type:d.type||"public-key",transports:d.transports})}}return l}function z5(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=aa(e,["challenge","allowCredentials"]),s=So(t).buffer,o=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){o.allowCredentials=new Array(n.length);for(let a=0;a<n.length;a++){const l=n[a];o.allowCredentials[a]=Object.assign(Object.assign({},l),{id:So(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return o}function V5(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:Js(new Uint8Array(e.response.attestationObject)),clientDataJSON:Js(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function W5(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:Js(new Uint8Array(s.authenticatorData)),clientDataJSON:Js(new Uint8Array(s.clientDataJSON)),signature:Js(new Uint8Array(s.signature)),userHandle:s.userHandle?Js(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function gN(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Db(){var e,t;return!!(st()&&"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 H5(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new ou("Browser returned unexpected credential type",t)}:{data:null,error:new ou("Empty credential response",t)}}catch(t){return{data:null,error:L5({error:t,options:e})}}}async function q5(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new ou("Browser returned unexpected credential type",t)}:{data:null,error:new ou("Empty credential response",t)}}catch(t){return{data:null,error:$5({error:t,options:e})}}}const K5={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},G5={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function au(...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 o in s){const a=s[o];if(a!==void 0)if(Array.isArray(a))r[o]=a;else if(n(a))r[o]=a;
405else if(t(a)){const l=r[o];t(l)?r[o]=au(l,a):r[o]=au(a)}else r[o]=a}return r}function Y5(e,t){return au(K5,e,t||{})}function J5(e,t){return au(G5,e,t||{})}class Q5{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},o){var a;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:c};const d=s??B5.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:u}=l.webauthn.credential_options.publicKey;if(!u.name){const h=r;if(h)u.name=`${u.id}:${h}`;else{const m=(await this.client.getUser()).data.user,y=((a=m==null?void 0:m.user_metadata)===null||a===void 0?void 0:a.name)||(m==null?void 0:m.email)||(m==null?void 0:m.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}switch(l.webauthn.type){case"create":{const u=Y5(l.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:h,error:f}=await H5({publicKey:u,signal:d});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const u=J5(l.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:h,error:f}=await q5(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:u,signal:d}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(l){return Q(l)?{data:null,error:l}:{data:null,error:new qs("Unexpected error in challenge",l)}}}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}={}},o){if(!n)return{data:null,error:new Al("rpId is required for WebAuthn authentication")};try{if(!Db())return{data:null,error:new qs("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:o});if(!a)return{data:null,error:l};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 Q(a)?{data:null,error:a}:{data:null,error:new qs("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}={}},o){if(!n)return{data:null,error:new Al("rpId is required for WebAuthn registration")};try{if(!Db())return{data:null,error:new qs("Browser does not support WebAuthn",null)};const{data:a,error:l}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(u=>{var h;return(h=u.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:l};const{data:c,error:d}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:o});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:d}}catch(a){return Q(a)?{data:null,error:a}:{data:null,error:new qs("Unexpected error in register",a)}}}}M5();const X5={url:YI,storageKey:JI,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:QI,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};
405async function Lb(e,t,n){return await n()}const Bi={};class Rl{get jwks(){var t,n;return(n=(t=Bi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Bi[this.storageKey]=Object.assign(Object.assign({},Bi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Bi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Bi[this.storageKey]=Object.assign(Object.assign({},Bi[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;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 o=Object.assign(Object.assign({},X5),t);if(this.storageKey=o.storageKey,this.instanceID=(n=Rl.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Rl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&st()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new A5({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=fN(o.fetch),this.lock=o.lock||Lb,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&st()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=R5:this.lock=Lb,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 Q5(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.persistSession?(o.storage?this.storage=o.storage:hN()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ob(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Ob(this.memoryStorage)),st()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${cN}) ${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(st()&&(n=u5(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),st()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),n5(o)){const c=(t=o.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:o}}return{error:o}}const{session:a,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",l),await this._saveSession(a),setTimeout(async()=>{l==="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 Q(n)?this._returnResult({error:n}):this._returnResult({error:new qs("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const o=await ee(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:gn}),{data:a,error:l}=o;if(l||!a)return this._returnResult({data:{user:null,session:null},error:l});const c=a.session,d=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(o){if(Q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var n,r,s;try{let o;if("email"in t){const{email:u,password:h,options:f}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await $i(this.storage,this.storageKey)),o=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,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:m,code_challenge_method:y},xform:gn})}else if("phone"in t){const{phone:u,password:h,options:f}=t;o=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,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:gn})}else throw new Ic("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await rt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,d=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(o){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:o,password:a,options:l}=t;n=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Rb})}else if("phone"in t){const{phone:o,password:a,options:l}=t;n=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:a,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Rb})}else throw new Ic("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 o=new Li;return this._returnResult({data:{user:null,session:null},error:o})}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(Q(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,o;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:(o=t.o
405ptions)===null||o===void 0?void 0:o.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,o,a,l,c,d,u,h,f;let m,y;if("message"in t)m=t.message,y=t.signature;else{const{chain:p,wallet:w,statement:b,options:g}=t;let v;if(st())if(typeof w=="object")v=w;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")v=R.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 w!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=w}const j=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),k=await v.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=pN(k[0]);let N=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!N){const R=await v.request({method:"eth_chainId"});N=O5(R)}const T={domain:j.host,address:S,statement:b,uri:j.href,version:"1",chainId:N,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(o=g==null?void 0:g.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.requestId,resources:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.resources};m=D5(T),y=await v.request({method:"personal_sign",params:[I5(m),S]})}try{const{data:p,error:w}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:y},!((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:gn});if(w)throw w;if(!p||!p.session||!p.user){const b=new Li;return this._returnResult({data:{user:null,session:null},error:b})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:w})}catch(p){if(Q(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var n,r,s,o,a,l,c,d,u,h,f,m;let y,p;if("message"in t)y=t.message,p=t.signature;else{const{chain:w,wallet:b,statement:g,options:v}=t;let j;if(st())if(typeof b=="object")j=b;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))j=S.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 b!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=b}const k=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in j&&j.signIn){const S=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),g?{statement:g}:null));let N;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")N=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)N=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)y=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),p=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${k.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=v==null?void 0:v.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((d=v==null?void 0:v.signInWithSolana)===null||d===void 0)&&d.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((h=(u=v==null?void 0:v.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...v.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(` 406`);const S=await j.signMessage(new TextEncoder().encode(y),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=S}}try{const{data:w,error:b}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Js(p)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:gn});if(b)throw b;if(!w||!w.session||!w.user){const g=new Li;return this._returnResult({data:{user:null,session:null},error:g})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:b})}catch(w){if(Q(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const n=await Fs(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new r5;const{data:o,error:a}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:gn});if(await rt(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!o||!o.session||!o.user){const l=new Li;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:a})}catch(o){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:o,nonce:a}=t,l=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:gn}),{data:c,error:d}=l;if(d)return this._returnResult({data:{user:null,session:null},error:d});if(!c||!c.session||!c.user){const u=new Li;return this._returnResult({data:{user:null,session:null},error:u})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:d})}catch(n){if(Q(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,o,a;try{if("email"in t){const{email:l,options:c}=t;let d=null,u=null;this.flowType==="pkce"&&([d,u]=await $i(this.storage,this.storageKey));const{error:h}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,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:d,code_challenge_method:u},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:d,error:u}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!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:d==null?void 0:d.message_id},error:u})}throw new Ic("You must provide either an email or phone number.")}catch(l){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var n,r;try{let s,o;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:l}=await ee(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:gn});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,d=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:d,session:c},error:null})}catch(s){if(Q(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,o,a;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await $i(this.storage,this.storageKey));const d=await ee(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}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:T5});return!((o=d.data)===null||o===void 0)&&o.url&&st()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(d.data.url),this._returnResult(d)}catch(l){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(l))return this._returnResult({data:null,error:l});throw l}}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 Ft;const{error:s}=await ee(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(Q(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:o}=t,{error:a}=await ee(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:r,type:s,options:o}=t,{data:a,error:l}=await ee(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new Ic("You must provide either an email or phone number and a type")}catch(n){if(Q(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 Fs(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 val
406id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Xh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const a=await Fs(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=tf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=S5(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):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 ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Jr}):await this._useSession(async n=>{var r,s,o;const{data:a,error:l}=n;if(l)throw l;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ft}:await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Jr})})}catch(n){if(Q(n))return Zh(n)&&(await this._removeSession(),await rt(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:o}=r;if(o)throw o;if(!s.session)throw new Ft;const a=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await $i(this.storage,this.storageKey));const{data:d,error:u}=await ee(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:Jr});if(u)throw u;return a.user=d.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(r){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(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 Ft;const n=Date.now()/1e3;let r=n,s=!0,o=null;const{payload:a}=Lc(t.access_token);if(a.exp&&(r=a.exp,s=r<=n),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};o=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});o={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(n){if(Q(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:l}=n;if(l)throw l;t=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Ft;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(Q(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!st())throw new Dc("No browser detected.");
406if(t.error||t.error_description||t.error_code)throw new Dc(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 Nb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Dc("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 Nb("No code detected.");const{data:g,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:d}=t;if(!o||!l||!a||!d)throw new Dc("No session defined in URL");const u=Math.round(Date.now()/1e3),h=parseInt(l);let f=u+h;c&&(f=parseInt(c));const m=f-u;m*1e3<=Ki&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${h}s`);const y=f-h;u-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,u):u-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,u);const{data:p,error:w}=await this._getUser(o);if(w)throw w;const b={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:f,refresh_token:a,token_type:d,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:t.type},error:null})}catch(r){if(Q(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_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 Fs(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:o}=n;if(o&&!Zh(o))return this._returnResult({error:o});const a=(r=s.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,t);if(l&&!(t5(l)&&(l.status===404||l.status===401||l.status===403)||Zh(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=d5(),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:o},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){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",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await $i(this.storage,this.storageKey,!0));try{return await ee(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(o){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(o))return this._returnResult({data:null,error:o});throw o}}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(Q(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 o=>{var a,l,c,d,u;const{data:h,error:f}=o;if(f)throw f;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ee(this.fetch,"GET",m,{headers:this.headers,jwt:(u=(d=h.session)===null||d===void 0?void 0:d.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return st()&&!(!((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(Q(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:o}}=n;if(s)throw s;const{options:a,provider:l,token:c,access_token:d,nonce:u}=t,h=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=o==null?void 0:o.access_token)!==null&&r!==void 0?r:void 0,body:{provider:l,id_token:c,access_token:d,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:gn}),{data:f,error:m}=h;return m?this._returnResult({data:{user:null,session:null},error:m}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Li}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:m}))}catch(s){if(await rt(this.storage,`${this.storageKey}-code-verifier`),Q(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:o,error:a}=n;
406if(a)throw a;return await ee(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(Q(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 m5(async s=>(s>0&&await f5(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await ee(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:gn})),(s,o)=>{const a=200*Math.pow(2,s);return o&&ef(o)&&Date.now()+a-r<Ki})}catch(r){if(this._debug(n,"error",r),Q(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),st()&&!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 Fs(this.storage,this.storageKey);if(s&&this.userStorage){let a=await Fs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await Gi(this.userStorage,this.storageKey+"-user",a)),s.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:tf()}else if(s&&!s.user&&!s.user){const a=await Fs(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await rt(this.storage,this.storageKey+"-user"),await Gi(this.storage,this.storageKey,s)):s.user=tf()}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 o=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Xh;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${Xh}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),ef(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:l}=await this._getUser(s.access_token);!l&&(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 Ft;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Qu;const{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Ft;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const l={data:o.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(o){if(this._debug(s,"error",o),Q(o)){const a={data:null,error:o};return ef(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}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 o=[],a=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){o.push(c)}});if(await Promise.all(a),o.length>0){for(let l=0;l<o.length;l+=1)console.error(o[l]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await rt(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 Gi(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const o=Pb(s);await Gi(this.storage,this.storageKey,o)}else{const s=Pb(n);await Gi(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await rt(this.storage,this.storageKey),await rt(this.storage,this.storageKey+"-code-verifier"),await rt(this.storage,this.storageKey+"-user"),this.userStorage&&await rt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
406try{t&&st()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ki);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)/Ki);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ki}ms, refresh threshold is ${hp} ticks`),s<=hp&&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.isAcquireTimeout||t instanceof mN)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!st()||!(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[o,a]=await $i(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.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:o}=n;return o?this._returnResult({data:null,error:o}):await ee(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(Q(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:o,error:a}=n;
406if(a)return this._returnResult({data:null,error:a});const l=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:d}=await ee(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return d?this._returnResult({data:null,error:d}):(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(Q(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:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?V5(t.webauthn.credential_response):W5(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ee(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)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(n){if(Q(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:o}=n;if(o)return this._returnResult({data:null,error:o});const a=await ee(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:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:U5(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:z5(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(Q(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 o of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,o;if(t)try{const{payload:m}=Lc(t);let y=null;m.aal&&(y=m.aal);let p=y;const{data:{user:w},error:b}=await this.getUser(t);if(b)return this._returnResult({data:null,error:b});((r=(n=w==null?void 0:w.factors)===null||n===void 0?void 0:n.filter(j=>j.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(p="aal2");const v=m.amr||[];return{data:{currentLevel:y,nextLevel:p,currentAuthenticationMethods:v},error:null}}catch(m){if(Q(m))return this._returnResult({data:null,error:m});throw m}const{data:{session:a},error:l}
406=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Lc(a.access_token);let d=null;c.aal&&(d=c.aal);let u=d;((o=(s=a.user.factors)===null||s===void 0?void 0:s.filter(m=>m.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(u="aal2");const f=c.amr||[];return{data:{currentLevel:d,nextLevel:u,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 ee(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Ft})})}catch(n){if(Q(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:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Ft});const a=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&st()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(Q(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:o}=r;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new Ft});const a=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&st()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(Q(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 ee(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 Ft})})}catch(t){if(Q(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 ee(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 Ft})})}catch(n){if(Q(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+ZI>s)return r;const{data:o,error:a}=await ee(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,r=o.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:m,error:y}
406=await this.getSession();if(y||!m.session)return this._returnResult({data:null,error:y});r=m.session.access_token}const{header:s,payload:o,signature:a,raw:{header:l,payload:c}}=Lc(r);n!=null&&n.allowExpired||w5(o.exp);const d=!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(!d){const{error:m}=await this.getUser(r);if(m)throw m;return{data:{claims:o,header:s,signature:a},error:null}}const u=j5(s.alg),h=await crypto.subtle.importKey("jwk",d,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,a,l5(`${l}.${c}`)))throw new pp("Invalid JWT signature");return{data:{claims:o,header:s,signature:a},error:null}}catch(r){if(Q(r))return this._returnResult({data:null,error:r});throw r}}}Rl.nextInstanceID={};const Z5=Rl,e6="2.101.1";let $a="";typeof Deno<"u"?$a="deno":typeof document<"u"?$a="web":typeof navigator<"u"&&navigator.product==="ReactNative"?$a="react-native":$a="node";const t6={"X-Client-Info":`supabase-js-${$a}/${e6}`},n6={headers:t6},r6={schema:"public"},s6={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},i6={};function Ml(e){"@babel/helpers - typeof";return Ml=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},Ml(e)}function o6(e,t){if(Ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a6(e){var t=o6(e,"string");return Ml(t)=="symbol"?t:t+""}function l6(e,t,n){return(t=a6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $b(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$b(Object(n),!0).forEach(function(r){l6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$b(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const c6=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),d6=()=>Headers,u6=(e,t,n)=>{const r=c6(n),s=d6();return async(o,a)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let d=new s(a==null?void 0:a.headers);return d.has("apikey")||d.set("apikey",e),d.has("Authorization")||d.set("Authorization",`Bearer ${c}`),r(o,Fe(Fe({},a),{},{headers:d}))}};function h6(e){return e.endsWith("/")?e:e+"/"}function f6(e,t){var n,r;const{db:s,auth:o,realtime:a,global:l}=e,{db:c,auth:d,realtime:u,global:h}=t,f={db:Fe(Fe({},c),s),auth:Fe(Fe({},d),o),realtime:Fe(Fe({},u),a),storage:{},global:Fe(Fe(Fe({},h),l),{},{headers:Fe(Fe({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function m6(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(h6(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var p6=class extends Z5{constructor(e){super(e)}},g6=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const o=m6(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const a=`sb-${o.hostname.split(".")[0]}-auth-token`,l={db:r6,realtime:i6,auth:Fe(Fe({},s6),{},{storageKey:a}),global:n6},c=f6(n??{},l);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:(u,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 d;this.auth=this._initSupabaseAuthClient((d=c.auth)!==null&&d!==void 0?d:{},this.headers,c.global.fetch)}this.fetch=u6(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Fe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new $3(new
406URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new GI(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)}channel(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:o,flowType:a,lock:l,debug:c,throwOnError:d},u,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new p6({url:this.authUrl.href,headers:Fe(Fe({},f),u),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:a,lock:l,debug:c,throwOnError:d,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new xI(this.realtimeUrl.href,Fe(Fe({},e),{},{params:Fe(Fe({},{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 y6=(e,t,n)=>new g6(e,t,n);function x6(){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}x6()&&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 v6(){var w,b;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>e===g||e.endsWith("."+g)),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?((w=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:w[1])??((b=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:b[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const a=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),l=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:""),d=c&&l.test(c)?[c]:a?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),m=(g,v,j)=>new Promise(k=>{const S=f();let N=!1,T;const R=O=>{N||(N=!0,clearTimeout(T),window.removeEventListener("message",P),k(O))},P=O=>{if(d.indexOf(O.origin)<0)return;const V=O.data;V&&V.type===u&&V.requestId===S&&R(V)};window.addEventListener("message",P);const F={type:g,requestId:S,projectId:s,key:v};j!==void 0&&(F.value=j);for(const O of d)window.parent.postMessage(F,O);T=setTimeout(()=>R(null),h)});let y=!0;const p=250;return{getItem:async g=>{let v=await m("lovable-preview-auth:get",g);return!v&&y&&(await new Promise(j=>setTimeout(j,p)),v=await m("lovable-preview-auth:get",g)),y=!1,v&&v.ok&&typeof v.value=="string"?v.value===""?(localStorage.removeItem(g),null):v.value:localStorage.getItem(g)},setItem:(g,v)=>(localStorage.setItem(g,v),m("lovable-preview-auth:set",g,v).then(j=>
vendor: 10,754 bytes, line 406
406{j&&j.ok&&typeof j.value=="string"&&localStorage.getItem(g)===v&&(j.value===""?localStorage.removeItem(g):localStorage.setItem(g,j.value))})),removeItem:g=>(localStorage.removeItem(g),m("lovable-preview-auth:remove",g).then(()=>{}))}}const b6="https://ellvyqymdmrobwgeawgv.supabase.co",w6="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVsbHZ5cXltZG1yb2J3Z2Vhd2d2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ3ODY1NTIsImV4cCI6MjA5MDM2MjU1Mn0.9v05GH0GQqZCVoju5xRr-JqGeSHKpZxqGf3IVam3Ogs",K=y6(b6,w6,{auth:{storage:v6(),persistSession:!0,autoRefreshToken:!0}}),yN=x.createContext({user:null,session:null,loading:!0,signOut:async()=>{}}),j6=({children:e})=>{const[t,n]=x.useState(null),[r,s]=x.useState(null),[o,a]=x.useState(!0);x.useEffect(()=>{K.auth.getSession().then(({data:{session:d}})=>{s(d),n((d==null?void 0:d.user)??null),a(!1)});const{data:{subscription:c}}=K.auth.onAuthStateChange((d,u)=>{s(u),n((u==null?void 0:u.user)??null),a(!1)});return()=>c.unsubscribe()},[]);const l=async()=>{await K.auth.signOut()};return i.jsx(yN.Provider,{value:{user:t,session:r,loading:o,signOut:l},children:e})},Ci=()=>x.useContext(yN),yy=x.createContext({});function xy(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const k6=typeof window<"u",xN=k6?x.useLayoutEffect:x.useEffect,Xu=x.createContext(null);function vy(e,t){e.indexOf(t)===-1&&e.push(t)}function lu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const rr=(e,t,n)=>n>t?t:n<e?e:n;let Zu=()=>{},Go=()=>{};const Es={},vN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function bN(e){return typeof e=="object"&&e!==null}const wN=e=>/^0[^.\s]+$/u.test(e);function jN(e){let t;return()=>(t===void 0&&(t=e()),t)}const on=e=>e,S6=(e,t)=>n=>t(e(n)),ec=(...e)=>e.reduce(S6),Ol=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class by{constructor(){this.subscriptions=[]}add(t){return vy(this.subscriptions,t),()=>lu(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 o=0;o<s;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Lt=e=>e*1e3,rn=e=>e/1e3;function kN(e,t){return t?e*(1e3/t):0}const SN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,N6=1e-7,_6=12;function C6(e,t,n,r,s){let o,a,l=0;do a=t+(n-t)/2,o=SN(a,r,s)-e,o>0?n=a:t=a;while(Math.abs(o)>N6&&++l<_6);return a}function tc(e,t,n,r){if(e===t&&n===r)return on;const s=o=>C6(o,0,1,e,n);return o=>o===0||o===1?o:SN(s(o),t,r)}const NN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_N=e=>t=>1-e(1-t),CN=tc(.33,1.53,.69,.99),wy=_N(CN),TN=NN(wy),EN=e=>e>=1?1:(e*=2)<1?.5*wy(e):.5*(2-Math.pow(2,-10*(e-1))),jy=e=>1-Math.sin(Math.acos(e)),PN=_N(jy),AN=NN(jy),T6=tc(.42,0,1,1),E6=tc(0,0,.58,1),RN=tc(.42,0,.58,1),P6=e=>Array.isArray(e)&&typeof e[0]!="number",MN=e=>Array.isArray(e)&&typeof e[0]=="number",Fb={linear:on,easeIn:T6,easeInOut:RN,easeOut:E6,circIn:jy,circInOut:AN,circOut:PN,backIn:wy,backInOut:TN,backOut:CN,anticipate:EN},A6=e=>typeof e=="string",Bb=e=>{if(MN(e)){Go(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return tc(t,n,r,s)}else if(A6(e))return Go(Fb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Fb[e];return e},$c=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ub={value:null,addProjectionMetrics:null};function R6(e,t){let n=new Set,r=new Set,s=!1,o=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function d(h){a.has(h)&&(u.schedule(h),e()),c++,h(l)}const u={schedule:(h,f=!1,m=!1)=>{const p=m&&s?n:r;return f&&a.add(h),p.add(h),h},cancel:h=>{r.delete(h),a.delete(h)},process:h=>{if(l=h,s){o=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(d),t&&Ub.value&&Ub.value.frameloop[t].push(c),c=0,n.clear(),s=!1,o&&(o=!1,u.process(h))}};return u}const M6=40;function ON(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=$c.reduce((v,j)=>(v[j]=R6(o,t?j:void 0),v),{}),{setup:l,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:f,render:m,postRender:y}=a,p=()=>{const v=Es.useManualTiming,j=v?s.timestamp:performance.now();n=!1,v||(s.delta=r?1e3/60:Math.max(Math.min(j-s.timestamp,M6),1)),s.timestamp=j,s.isProcessing=!0,l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),f.process(s),m.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},w=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:$c.reduce((v,j)=>{const k=a[j];return v[j]=(S,N=!1,T=!1)=>(n||w(),k.schedule(S,N,T)),v},{}),cancel:v=>{for(let j=0;j<$c.length;j++)a[$c[j]].cancel(v)},state:s,steps:a}}const{schedule:ve,cancel:Ps,state:ot,steps:rf}=ON(typeof requestAnimationFrame<"u"?requestAnimationFrame:on,!0);let md;function O6(){md=void 0}const bt={now:()=>(md===void 0&&bt.set(ot.isProcessing||Es.useManualTiming?ot.timestamp:performance.now()),md),set:e=>{md=e,queueMicrotask(O6)}},IN=e=>t=>typeof t=="string"&&t.startsWith(e),DN=IN("--"),I6=IN("var(--"),ky=e=>I6(e)?D6.test(e.split("/*")[0].trim()):!1,D6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ca={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Il={...ca,transform:e=>rr(0,1,e)},Fc={...ca,default:1},el=e=>Math.round(e*1e5)/1e5,Sy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function L6(e){return e==null}const $6=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ny=(e,t)=>n=>!!(typeof n=="string"&&$6.test(n)&&n.startsWith(e)||t&&!L6(n)&&Object.prototype.hasOwnProperty.call(n,t)),LN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,a,l]=r.match(Sy);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},F6=e=>rr(0,255,e),sf={...ca,transform:e=>Math.round(F6(e))},Qs={test:Ny("rgb","red"),parse:LN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sf.transform(e)+", "+sf.transform(t)+", "+sf.transform(n)+", "+el(Il.transform(r))+")"};function B6(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 gp={test:Ny("#"),parse:B6,transform:Qs.transform},nc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zr=nc("deg"),Qn=nc("%"),J=nc("px"),U6=nc("vh"),z6=nc("vw"),Vb={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},co={test:Ny("hsl","hue"),parse:LN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(el(t))+", "+Qn.transform(el(n))+", "+el(Il.transform(r))+")"},He={test:e=>Qs.test(e)||gp.test(e)||co.test(e),parse:e=>Qs.test(e)?Qs.parse(e):co.test(e)?co.parse(e):gp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Qs.transform(e):co.transform(e),getAnimatableNone:e=>{const t=He.parse(e);return t.alpha=0,He.transform(t)}},V6=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W6(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Sy))==null?void 0:t.length)||0)+(((n=e.match(V6))==null?void 0:n.length)||0)>0}const $N="number",FN="color",H6="var",q6="var(",Wb="${}",K6=/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 Yo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const l=t.replace(K6,c=>(He.test(c)?(r.color.push(o),s.push(FN),n.push(He.parse(c))):c.startsWith(q6)?(r.var.push(o),s.push(H6),n.push(c)):(r.number.push(o),s.push($N),n.push(parseFloat(c))),++o,Wb)).split(Wb);return{values:n,split:l,indexes:r,types:s}}function G6(e){return Yo(e).values}function BN({split:e,types:t}){const n=e.length;return r=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],r[o]!==void 0){const a=t[o];a===$N?s+=el(r[o]):a===FN?s+=He.transform(r[o]):s+=r[o]}return s}}function Y6(e){return BN(Yo(e))}const J6=e=>typeof e=="number"?0:He.test(e)?He.getAnimatableNone(e):e,Q6=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:J6(e);function X6(e){const t=Yo(e);return BN(t)(t.values.map((r,s)=>Q6(r,t.split[s])))}const Tn={test:W6,parse:G6,createTransformer:Y6,getAnimatableNone:X6};function of(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 Z6({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,a=0;if(!t)s=o=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=of(c,l,e+1/3),o=of(c,l,e),a=of(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function cu(e,t){return n=>n>0?t:e}const _e=(e,t,n)=>e+(t-e)*n,af=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},eD=[gp,Qs,co],tD=e=>eD.find(t=>t.test(e));function Hb(e){const t=tD(e);if(Zu(!!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===co&&(n=Z6(n)),n}const qb=(e,t)=>{const n=Hb(e),r=Hb(t);if(!n||!r)return cu(e,t);const s={...n};return o=>(s.red=af(n.red,r.red,o),s.green=af(n.green,r.green,o),s.blue=af(n.blue,r.blue,o),s.alpha=_e(n.alpha,r.alpha,o),Qs.transform(s))},yp=new Set(["none","hidden"]);function nD(e,t){return yp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rD(e,t){return n=>_e(e,t,n)}function _y(e){return typeof e=="number"?rD:typeof e=="string"?ky(e)?cu:He.test(e)?qb:oD:Array.isArray(e)?UN:typeof e=="object"?He.test(e)?qb:sD:cu}function UN(e,t){const n=[...e],r=n.length,s=e.map((o,a)=>_y(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=s[a](o);return n}}function sD(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=_y(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function iD(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],a=e.indexes[o][r[o]],l=e.values[a]??0;n[s]=l,r[o]++}return n}const oD=(e,t)=>{const n=Tn.createTransformer(t),r=Yo(e),s=Yo(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?yp.has(e)&&!s.values.length||yp.has(t)&&!r.values.length?nD(e,t):ec(UN(iD(r,s),s.values),n):(Zu(!0,`Complex values '${e}' and '${t}
406' 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"),cu(e,t))};function zN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?_e(e,t,n):_y(e)(e,t)}const aD=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ve.update(t,n),stop:()=>Ps(t),now:()=>ot.isProcessing?ot.timestamp:bt.now()}},VN=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},du=2e4;function Cy(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<du;)t+=n,r=e.next(t);return t>=du?1/0:t}function lD(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Cy(r),du);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:rn(s)}}const Oe={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 xp(e,t){return e*Math.sqrt(1-t*t)}const cD=12;function dD(e,t,n){let r=n;for(let s=1;s<cD;s++)r=r-e(r)/t(r);return r}const lf=.001;function uD({duration:e=Oe.duration,bounce:t=Oe.bounce,velocity:n=Oe.velocity,mass:r=Oe.mass}){let s,o;Zu(e<=Lt(Oe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=rr(Oe.minDamping,Oe.maxDamping,a),e=rr(Oe.minDuration,Oe.maxDuration,rn(e)),a<1?(s=d=>{const u=d*a,h=u*e,f=u-n,m=xp(d,a),y=Math.exp(-h);return lf-f/m*y},o=d=>{const h=d*a*e,f=h*n+n,m=Math.pow(a,2)*Math.pow(d,2)*e,y=Math.exp(-h),p=xp(Math.pow(d,2),a);return(-s(d)+lf>0?-1:1)*((f-m)*y)/p}):(s=d=>{const u=Math.exp(-d*e),h=(d-n)*e+1;return-lf+u*h},o=d=>{const u=Math.exp(-d*e),h=(n-d)*(e*e);return u*h});const l=5/e,c=dD(s,o,l);if(e=Lt(e),isNaN(c))return{stiffness:Oe.stiffness,damping:Oe.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const hD=["duration","bounce"],fD=["stiffness","damping","mass"];function Kb(e,t){return t.some(n=>e[n]!==void 0)}function mD(e){let t={velocity:Oe.velocity,stiffness:Oe.stiffness,damping:Oe.damping,mass:Oe.mass,isResolvedFromDuration:!1,...e};if(!Kb(e,fD)&&Kb(e,hD))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*rr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Oe.mass,stiffness:s,damping:o}}else{const n=uD({...e,velocity:0});t={...t,...n,mass:Oe.mass},t.isResolvedFromDuration=!0}return t}function uu(e=Oe.visualDuration,t=Oe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:h,velocity:f,isResolvedFromDuration:m}=mD({...n,velocity:-rn(n.velocity||0)}),y=f||0,p=d/(2*Math.sqrt(c*u)),w=a-o,b=rn(Math.sqrt(c/u)),g=Math.abs(w)<5;r||(r=g?Oe.restSpeed.granular:Oe.restSpeed.default),s||(s=g?Oe.restDelta.granular:Oe.restDelta.default);let v,j,k,S,N,T;if(p<1)k=xp(b,p),S=(y+p*b*w)/k,v=P=>{const F=Math.exp(-p*b*P);return a-F*(S*Math.sin(k*P)+w*Math.cos(k*P))},N=p*b*S+w*k,T=p*b*w-S*k,j=P=>Math.exp(-p*b*P)*(N*Math.sin(k*P)+T*Math.cos(k*P));else if(p===1){v=F=>a-Math.exp(-b*F)*(w+(y+b*w)*F);const P=y+b*w;j=F=>Math.exp(-b*F)*(b*P*F-y)}else{const P=b*Math.sqrt(p*p-1);v=A=>{const I=Math.exp(-p*b*A),z=Math.min(P*A,300);return a-I*((y+p*b*w)*Math.sinh(z)+P*w*Math.cosh(z))/P};const F=(y+p*b*w)/P,O=p*b*F-w*P,V=p*b*w-F*P;j=A=>{const I=Math.exp(-p*b*A),z=Math.min(P*A,300);return I*(O*Math.sinh(z)+V*Math.cosh(z))}}const R={calculatedDuration:m&&h||null,velocity:P=>Lt(j(P)),next:P=>{if(!m&&p<1){const O=Math.exp(-p*b*P),V=Math.sin(k*P),A=Math.cos(k*P),I=a-O*(S*V+w*A),z=Lt(O*(N*V+T*A));return l.done=Math.abs(z)<=r&&Math.abs(a-I)<=s,l.value=l.done?a:I,l}const F=v(P);if(m)l.done=P>=h;else{const O=Lt(j(P));l.done=Math.abs(O)<=r&&Math.abs(a-F)<=s}return l.value=l.done?a:F,l},toString:()=>{const P=Math.min(Cy(R),du),F=VN(O=>R.next(P*O).value,P,30);return P+"ms "+F},toTransition:()=>{}};return R}uu.applyToOptions=e=>{const t=lD(e,100,uu);return e.ease=t.ease,e.duration=Lt(t.duration),e.type="keyframes",e};const pD=5;function WN(e,t,n){const r=Math.max(t-pD,0);return kN(n-e(r),t-r)}function vp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],f={done:!1,value:h},m=T=>l!==void 0&&T<l||c!==void 0&&T>c,y=T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c;let p=n*t;const w=h+p,b=a===void 0?w:a(w);b!==w&&(p=b-h);const g=T=>-p*Math.exp(-T/r),v=T=>b+g(T),j=T=>{const R=g(T),P=v(T);f.done=Math.abs(R)<=d,f.value=f.done?b:P};let k,S;const N=T=>{m(f.value)&&(k=T,S=uu({keyframes:[f.value,y(f.value)],velocity:WN(v,T,f.value),damping:s,stiffness:o,restDelta:d,restSpeed:u}))};return N(0),{calculatedDuration:null,next:T=>{let R=!1;return!S&&k===void 0&&(R=!0,j(T),N(T)),k!==void 0&&T>=k?S.next(T-k):(!R&&j(T),f)}}}function gD(e,t,n){const r=[],s=n||Es.mix||zN,o=e.length-1;for(let a=0;a<o;a++){let l=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||on:t;l=ec(c,l)}r.push(l)}return r}function yD(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Go(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=gD(t,r,s),c=l.length,d=u=>{if(a&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const f=Ol(e[h],e[h+1],u);return l[h](f)};return n?u=>d(rr(e[0],e[o-1],u)):d}function xD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Ol(0,t,r);e.push(_e(n,1,s))}}function vD(e){const t=[0];return xD(t,e.length-1),t}function bD(e,t){return e.map(n=>n*t)}function wD(e,t){return e.map(()=>t||RN).splice(0,e.length-1)}function tl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=P6(r)?r.map(Bb):Bb(r),o={done:!1,value:t[0]},a=bD(n&&n.length===t.length?n:vD(t),e),l=yD(a,t,{ease:Array.isArray(s)?s:wD(t,s)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const jD=e=>e!==null;function eh(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(jD),l=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!l||r===void 0?o[l]:r}const kD={decay:vp,inertia:vp,tween:tl,keyframes:tl,spring:uu};function HN(e){typeof e.type=="string"&&(e.type=kD[e.type])}class Ty{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 SD=e=>e/100;class hu extends Ty{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!==bt.now()&&this.tick(bt.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;HN(t);
vendor: 12,356 bytes, line 406
406const{type:n=tl,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=t;let{keyframes:l}=t;const c=n||tl;c!==tl&&typeof l[0]!="number"&&(this.mixKeyframes=ec(SD,zN(l[0],l[1])),l=[0,100]);const d=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Cy(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}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:o,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:m,type:y,onUpdate:p,finalKeyframe:w}=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 b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,j=r;if(h){const T=Math.min(this.currentTime,s)/l;let R=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(f==="reverse"?(P=1-P,m&&(P-=m/l)):f==="mirror"&&(j=a)),v=rr(0,1,P)*l}let k;g?(this.delayState.value=u[0],k=this.delayState):k=j.next(v),o&&!g&&(k.value=o(k.value));let{done:S}=k;!g&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return N&&y!==vp&&(k.value=eh(u,this.options,w,this.speed)),p&&p(k.value),N&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return rn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rn(t)}get time(){return rn(this.currentTime)}set time(t){t=Lt(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 WN(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(bt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=rn(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=aD,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(o=(s=this.options).onPlay)==null||o.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(bt.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 ND(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Xs=e=>e*180/Math.PI,bp=e=>{const t=Xs(Math.atan2(e[1],e[0]));return wp(t)},_D={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:bp,rotateZ:bp,skewX:e=>Xs(Math.atan(e[1])),skewY:e=>Xs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wp=e=>(e=e%360,e<0&&(e+=360),e),Gb=bp,Yb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Jb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),CD={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yb,scaleY:Jb,scale:e=>(Yb(e)+Jb(e))/2,rotateX:e=>wp(Xs(Math.atan2(e[6],e[5]))),rotateY:e=>wp(Xs(Math.atan2(-e[2],e[0]))),rotateZ:Gb,rotate:Gb,skewX:e=>Xs(Math.atan(e[4])),skewY:e=>Xs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function jp(e){return e.includes("scale")?1:0}function kp(e,t){if(!e||e==="none")return jp(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=CD,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_D,s=l}if(!s)return jp(t);const o=r[t],a=s[1].split(",").map(ED);return typeof o=="function"?o(a):a[o]}const TD=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return kp(n,t)};function ED(e){return parseFloat(e.trim())}const da=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ua=new Set(da),Qb=e=>e===ca||e===J,PD=new Set(["x","y","z"]),AD=da.filter(e=>!PD.has(e));function RD(e){const t=[];return AD.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const us={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})=>kp(t,"x"),y:(e,{transform:t})=>kp(t,"y")};us.translateX=us.x;us.translateY=us.y;const ui=new Set;let Sp=!1,Np=!1,_p=!1;function qN(){if(Np){const e=Array.from(ui).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=RD(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(([o,a])=>{var l;(l=r.getValue(o))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Np=!1,Sp=!1,ui.forEach(e=>e.complete(_p)),ui.clear()}function KN(){ui.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Np=!0)})}function MD(){_p=!0,KN(),qN(),_p=!1}class Ey{constructor(t,n,r,s,o,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=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(ui.add(this),Sp||(Sp=!0,ve.read(KN),ve.resolveKeyframes(qN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}ND(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ui.delete(this)}cancel(){this.state==="scheduled"&&(ui.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const OD=e=>e.startsWith("--");function GN(e,t,n){OD(t)?e.style.setProperty(t,n):e.style[t]=n}const ID={};function YN(e,t){const n=jN(e);return()=>ID[t]??n()}const DD=YN(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),JN=YN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Fa=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Xb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Fa([0,.65,.55,1]),circOut:Fa([.55,0,1,.45]),backIn:Fa([.31,.01,.66,-.59]),backOut:Fa([.33,1.53,.69,.99])};function QN(e,t){if(e)return typeof e=="function"?JN()?VN(e,t):"ease-out":MN(e)?Fa(e):Array.isArray(e)?e.map(n=>QN(n,t)||Xb.easeOut):Xb[e]}function LD(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:l="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const h=QN(l,s);Array.isArray(h)&&(u.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(u,f)}function XN(e){return typeof e=="function"&&"applyToOptions"in e}function $D({type:e,...t}){return XN(e)&&JN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ZN extends Ty{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,Go(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=$D(t);this.animation=LD(n,r,s,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=eh(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(u),GN(n,r,u),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 rn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rn(t)}get time(){return rn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Lt(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 o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&DD()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),on):s(this)}}const e2={anticipate:EN,backInOut:TN,circInOut:AN};function FD(e){return e in e2}function BD(e){typeof e.ease=="string"&&FD(e.ease)&&(e.ease=e2[e.ease])}const cf=10;class UD extends ZN{constructor(t){BD(t),HN(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:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new hu({...a,autoplay:!1}),c=Math.max(cf,bt.now()-this.startTime),d=rr(0,cf,c-cf),u=l.sample(c).value,{name:h}=this.options;o&&h&&GN(o,h,u),n.setWithVelocity(l.sample(Math.max(0,c-d)).value,u,d),l.stop()}}const Zb=(e,t)=>
406t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tn.test(e)||e==="0")&&!e.startsWith("url("));function zD(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 VD(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Zb(s,t),l=Zb(o,t);return Zu(a===l,`You are trying to animate ${t} from "${s}" to "${o}". "${a?o:s}" is not an animatable value.`,"value-not-animatable"),!a||!l?!1:zD(e)||(n==="spring"||XN(n))&&r}function Cp(e){e.duration=0,e.type="keyframes"}const t2=new Set(["opacity","clipPath","filter","transform"]),WD=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function HD(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&WD.test(e[t]))return!0;return!1}const qD=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),KD=jN(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function GD(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:a,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:u}=t.owner.getProps();return KD()&&n&&(t2.has(n)||qD.has(n)&&HD(l))&&(n!=="transform"||!u)&&!d&&!r&&s!=="mirror"&&o!==0&&a!=="inertia"}const YD=40;class JD extends Ty{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",keyframes:l,name:c,motionValue:d,element:u,...h}){var y;super(),this.stop=()=>{var p,w;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=bt.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:a,name:c,motionValue:d,element:u,...h},m=(u==null?void 0:u.KeyframeResolver)||Ey;this.keyframeResolver=new m(l,(p,w,b)=>this.onKeyframesResolved(p,w,f,!b),c,d,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){var b,g;this.keyframeResolver=void 0;const{name:o,type:a,velocity:l,delay:c,isHandoff:d,onUpdate:u}=r;this.resolvedAt=bt.now();let h=!0;VD(t,o,a,l)||(h=!1,(Es.instantAnimations||!c)&&(u==null||u(eh(t,r,n))),t[0]=t[t.length-1],Cp(r),r.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>YD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=h&&!d&&GD(m),p=(g=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:g.current;let w;if(y)try{w=new UD({...m,element:p})}catch{w=new hu(m)}else w=new hu(m);w.finished.then(()=>{this.notifyFinished()}).catch(on),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}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(),MD()),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 n2(e,t,n,r=0,s=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),a=e.size,l=(a-1)*r;return typeof n=="function"?n(o,a):s===1?o*r:l-o*r}const QD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function XD(e){const t=QD.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const ZD=4;function r2(e,t,n=1){Go(n<=ZD,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=XD(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return vN(a)?parseFloat(a):a}return ky(s)?r2(s,t,n+1):s}const e8={type:"spring",stiffness:500,damping:25,restSpeed:10},t8=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),n8={type:"keyframes",duration:.8},r8={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},s8=(e,{keyframes:t})=>t.length>2?n8:ua.has(e)?e.startsWith("scale")?t8(t[1]):e8:r8;function s2(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Py(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?s2(n,e):n}const i8=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function o8(e){for(const t in e)if(!i8.has(t))return!0;return!1}const Ay=(e,t,n,r={},s,o)=>a=>{const l=Py(r,e)||{},c=l.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Lt(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:s};o8(l)||Object.assign(u,s8(e,u)),u.duration&&(u.duration=Lt(u.duration)),u.repeatDelay&&(u.repeatDelay=Lt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Cp(u),u.delay===0&&(h=!0)),(Es.instantAnimations||Es.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,Cp(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,h&&!o&&t.get()!==void 0){const f=eh(u.keyframes,l);if(f!==void 0){ve.update(()=>{u.onUpdate(f),u.onComplete()});return}}return l.isSync?new hu(u):new JD(u)};function e0(e){const t=[{},{}];
vendor: 39,523 bytes, line 406
406return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ry(e,t,n,r){if(typeof t=="function"){const[s,o]=e0(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=e0(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function hi(e,t,n){const r=e.getProps();return Ry(r,t,n!==void 0?n:r.custom,e)}const i2=new Set(["width","height","top","left","right","bottom",...da]),t0=30,a8=e=>!isNaN(parseFloat(e));class l8{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=bt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.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=bt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=a8(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 by);const r=this.events[t].add(n);return t==="change"?()=>{r(),ve.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=bt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>t0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,t0);return kN(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 Jo(e,t){return new l8(e,t)}const Tp=e=>Array.isArray(e);function c8(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Jo(n))}function d8(e){return Tp(e)?e[e.length-1]||0:e}function u8(e,t){const n=hi(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const a in o){const l=d8(o[a]);c8(e,a,l)}}const at=e=>!!(e&&e.getVelocity);function h8(e){return!!(at(e)&&e.add)}function Ep(e,t){const n=e.getValue("willChange");if(h8(n))return n.add(t);if(!n&&Es.WillChange){const r=new Es.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function My(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const f8="framerAppearId",o2="data-"+My(f8);function a2(e){return e.props[o2]}function m8({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function l2(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:a,...l}=t;const c=e.getDefaultTransition();o=o?s2(o,c):c;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const u=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const m=e.getValue(f,e.latestValues[f]??null),y=l[f];if(y===void 0||h&&m8(h,f))continue;const p={delay:n,...Py(o||{},f)},w=m.get();if(w!==void 0&&!m.isAnimating()&&!Array.isArray(y)&&y===w&&!p.velocity){ve.update(()=>m.set(y));continue}let b=!1;if(window.MotionHandoffAnimation){const j=a2(e);if(j){const k=window.MotionHandoffAnimation(j,f,ve);k!==null&&(p.startTime=k,b=!0)}}Ep(e,f);const g=d??e.shouldReduceMotion;m.start(Ay(f,m,y,g&&i2.has(f)?{type:!1}:p,e,b));const v=m.animation;v&&u.push(v)}if(a){const f=()=>ve.update(()=>{a&&u8(e,a)});u.length?Promise.all(u).then(f):f()}return u}function Pp(e,t,n={}){var c;const r=hi(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 o=r?()=>Promise.all(l2(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=s;return p8(e,t,d,u,h,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[d,u]=l==="beforeChildren"?[o,a]:[a,o];return d().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function p8(e,t,n=0,r=0,s=0,o=1,a){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Pp(c,t,{...a,delay:n+(typeof r=="function"?0:r)+n2(e.variantChildren,c,r,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function g8(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Pp(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Pp(e,t,n);else{const s=typeof t=="function"?hi(e,t,n.custom):t;r=Promise.all(l2(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const y8={test:e=>e==="auto",parse:e=>e},c2=e=>t=>t.test(e),d2=[ca,J,Qn,zr,z6,U6,y8],n0=e=>d2.find(c2(e));function x8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wN(e):!0}const v8=new Set(["brightness","contrast","saturate","opacity"]);function b8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sy)||[];if(!r)return e;const s=n.replace(r,"");let o=v8.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const w8=/\b([a-z-]*)\(.*?\)/gu,Ap={...Tn,getAnimatableNone:e=>{const t=e.match(w8);return t?t.map(b8).join(" "):e}},Rp={...Tn,getAnimatableNone:e=>{const t=Tn.parse(e);return Tn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},r0={...ca,transform:Math.round},j8={rotate:zr,rotateX:zr,rotateY:zr,rotateZ:zr,scale:Fc,scaleX:Fc,scaleY:Fc,scaleZ:Fc,skew:zr,skewX:zr,skewY:zr,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:Il,originX:Vb,originY:Vb,originZ:J},Oy={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,inset:J,insetBlock:J,insetBlockStart:J,insetBlockEnd:J,insetInline:J,insetInlineStart:J,insetInlineEnd:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,paddingBlock:J,paddingBlockStart:J,paddingBlockEnd:J,paddingInline:J,paddingInlineStart:J,paddingInlineEnd:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,marginBlock:J,marginBlockStart:J,marginBlockEnd:J,marginInline:J,marginInlineStart:J,marginInlineEnd:J,fontSize:J,backgroundPositionX:J,backgroundPositionY:J,...j8,zIndex:r0,fillOpacity:Il,strokeOpacity:Il,numOctaves:r0},k8={...Oy,color:He,backgroundColor:He,outlineColor:He,fill:He,stroke:He,borderColor:He,borderTopColor:He,borderRightColor:He,borderBottomColor:He,borderLeftColor:He,filter:Ap,WebkitFilter:Ap,mask:Rp,WebkitMask:Rp},u2=e=>k8[e],S8=new Set([Ap,Rp]);function h2(e,t){let n=u2(e);return S8.has(n)||(n=Tn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const N8=new Set(["auto","none","0"]);function _8(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!N8.has(o)&&Yo(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=h2(n,s)}class C8 extends Ey{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),ky(h))){const f=r2(h,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!i2.has(r)||t.length!==2)return;const[s,o]=t,a=n0(s),l=n0(o),c=zb(s),d=zb(o);if(c!==d&&us[r]){this.needsMeasurement=!0;return}if(a!==l)if(Qb(a)&&Qb(l))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else us[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||x8(t[s]))&&r.push(s);r.length&&_8(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=us[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 l;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 o=r.length-1,a=r[o];r[o]=us[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Iy(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 f2=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function pd(e){return bN(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Dy,cancel:pH}=ON(queueMicrotask,!1),yn={x:!1,y:!1};function m2(){return yn.x||yn.y}function T8(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}function p2(e,t){const n=Iy(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function E8(e){return!(e.pointerType==="touch"||m2())}function P8(e,t,n={}){const[r,s,o]=p2(e,n);return r.forEach(a=>{let l=!1,c=!1,d;const u=()=>{a.removeEventListener("pointerleave",y)},h=w=>{d&&(d(w),d=void 0),u()},f=w=>{l=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(w))},m=()=>{l=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},y=w=>{if(w.pointerType!=="touch"){if(l){c=!0;return}h(w)}},p=w=>{if(!E8(w))return;c=!1;const b=t(a,w);typeof b=="function"&&(d=b,a.addEventListener("pointerleave",y,s))};a.addEventListener("pointerenter",p,s),a.addEventListener("pointerdown",m,s)}),o}const g2=(e,t)=>t?e===t?!0:g2(e,t.parentElement):!1,Ly=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,A8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function R8(e){return A8.has(e.tagName)||e.isContentEditable===!0}const M8=new Set(["INPUT","SELECT","TEXTAREA"]);function O8(e){return M8.has(e.tagName)||e.isContentEditable===!0}const gd=new WeakSet;function s0(e){return t=>{t.key==="Enter"&&e(t)}}function df(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const I8=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=s0(()=>{if(gd.has(n))return;df(n,"down");const s=s0(()=>{df(n,"up")}),o=()=>df(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function i0(e){return Ly(e)&&!m2()}const o0=new WeakSet;function D8(e,t,n={}){const[r,s,o]=p2(e,n),a=l=>{const c=l.currentTarget;if(!i0(l)||o0.has(l))return;gd.add(c),n.stopPropagation&&o0.add(l);const d=t(c,l),u=(m,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),gd.has(c)&&gd.delete(c),i0(m)&&typeof d=="function"&&d(m,{success:y})},h=m=>{u(m,c===window||c===document||n.useGlobalTarget||g2(c,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),pd(l)&&(l.addEventListener("focus",d=>I8(d,s)),!R8(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function $y(e){return bN(e)&&"ownerSVGElement"in e}const yd=new WeakMap;let Vr;const y2=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:$y(r)&&"getBBox"in r?r.getBBox()[t]:r[n],L8=y2("inline","width","offsetWidth"),$8=y2("block","height","offsetHeight");function F8({target:e,borderBoxSize:t}){var n;(n=yd.get(e))==null||n.forEach(r=>{r(e,{get width(){return L8(e,t)},get height(){return $8(e,t)}})})}function B8(e){e.forEach(F8)}function U8(){typeof ResizeObserver>"u"||(Vr=new ResizeObserver(B8))}function z8(e,t){Vr||U8();const n=Iy(e);return n.forEach(r=>{let s=yd.get(r);s||(s=new Set,yd.set(r,s)),s.add(t),Vr==null||Vr.observe(r)}),()=>{n.forEach(r=>{const s=yd.get(r);s==null||s.delete(t),s!=null&&s.size||Vr==null||Vr.unobserve(r)})}}const xd=new Set;let uo;function V8(){uo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};xd.forEach(t=>t(e))},window.addEventListener("resize",uo)}function W8(e){return xd.add(e),uo||V8(),()=>{xd.delete(e),!xd.size&&typeof uo=="function"&&(window.removeEventListener("resize",uo),uo=void 0)}}function a0(e,t){return typeof e=="function"?W8(e):z8(e,t)}function H8(e){return $y(e)&&e.tagName==="svg"}const q8=[...d2,He,Tn],K8=e=>q8.find(c2(e)),l0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ho=()=>({x:l0(),y:l0()}),c0=()=>({min:0,max:0}),Ge=()=>({x:c0(),y:c0()}),G8=new WeakMap;function th(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dl(e){return typeof e=="string"||Array.isArray(e)}const Fy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],By=["initial",...Fy];function nh(e){return th(e.animate)||By.some(t=>Dl(e[t]))}function x2(e){return!!(nh(e)||e.variants)}function Y8(e,t,n){for(const r in t){const s=t[r],o=n[r];if(at(s))e.addValue(r,s);else if(at(o))e.addValue(r,Jo(s,{owner:e}));else if(o!==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,Jo(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mp={current:null},v2={current:!1},J8=typeof window<"u";function Q8(){if(v2.current=!0,!!J8)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mp.current=e.matches;e.addEventListener("change",t),t()}else Mp.current=!1}const d0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fu={};function b2(e){fu=e}function X8(){return fu}class Z8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:a,visualState:l},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=Ey,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 m=bt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ve.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=nh(n),this.isVariantNode=x2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const y=f[m];d[m]!==void 0&&at(y)&&y.set(d[m])}}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,G8.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,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(v2.current||Q8(),this.shouldReduceMotion=Mp.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(),Ps(this.notifyUpdate),Ps(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&&t2.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:l,times:c,ease:d,duration:u}=n.accelerate,h=new ZN({element:this.current,name:t,keyframes:l,times:c,ease:d,duration:Lt(u)}),f=a(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=ua.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),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 fu){const n=fu[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 o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ge()}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<d0.length;r++){const s=d0[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,a=t[o];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=Y8(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=Jo(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"&&(vN(r)||wN(r))?r=parseFloat(r):!K8(r)&&Tn.test(n)&&(r=h2(t,n)),this.setBaseTarget(t,at(r)?r.get():r)),at(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Ry(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!at(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 by),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Dy.render(this.render)}}class w2 extends Z8{constructor(){super(...arguments),this.KeyframeResolver=C8}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;at(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Is{constructor(t){this.isMounted=!1,this.node=t}update(){}}function j2({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function eL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tL(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 uf(e){return e===void 0||e===1}function Op({scale:e,scaleX:t,scaleY:n}){return!uf(e)||!uf(t)||!uf(n)}function Ws(e){return Op(e)||k2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function k2(e){return u0(e.x)||u0(e.y)}function u0(e){return e&&e!=="0%"}function mu(e,t,n){const r=e-n,s=t*r;return n+s}function h0(e,t,n,r,s){return s!==void 0&&(e=mu(e,s,r)),mu(e,n,r)+t}function Ip(e,t=0,n=1,r,s){e.min=h0(e.min,t,n,r,s),e.max=h0(e.max,t,n,r,s)}function S2(e,{x:t,y:n}){Ip(e.x,t.translate,t.scale,t.originPoint),Ip(e.y,n.translate,n.scale,n.originPoint)}const f0=.999999999999,m0=1.0000000000001;function nL(e,t,n,r=!1){var l;const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let c=0;c<s;c++){o=n[c],a=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Wn(e.x,-o.scroll.offset.x),Wn(e.y,-o.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,S2(e,a)),r&&Ws(o.latestValues)&&vd(e,o.latestValues,(l=o.layout)==null?void 0:l.layoutBox))}t.x<m0&&t.x>f0&&(t.x=1),t.y<m0&&t.y>f0&&(t.y=1)}function Wn(e,t){e.min+=t,e.max+=t}function p0(e,t,n,r,s=.5){const o=_e(e.min,e.max,s);Ip(e,t,n,o,r)}function g0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function vd(e,t,n){const r=n??e;p0(e.x,g0(t.x,r.x),t.scaleX,t.scale,t.originX),p0(e.y,g0(t.y,r.y),t.scaleY,t.scale,t.originY)}function N2(e,t){return j2(tL(e.getBoundingClientRect(),t))}function rL(e,t,n){const r=N2(e,n),{scroll:s}=t;return s&&(Wn(r.x,s.offset.x),Wn(r.y,s.offset.y)),r}const sL={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iL=da.length;function oL(e,t,n){let r="",s=!0;for(let o=0;o<iL;o++){const a=da[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const d=parseFloat(l);c=a.startsWith("scale")?d===1:d===0}if(!c||n){const d=f2(l,Oy[a]);if(!c){s=!1;const u=sL[a]||a;r+=`${u}(${d}) `}n&&(t[a]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Uy(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const d=t[c];if(ua.has(c)){a=!0;continue}else if(DN(c)){s[c]=d;continue}else{const u=f2(d,Oy[c]);c.startsWith("origin")?(l=!0,o[c]=u):r[c]=u}}if(t.transform||(a||n?r.transform=oL(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;r.transformOrigin=`${c} ${d} ${u}`}}function _2(e,{style:t,vars:n},r,s){const o=e.style;let a;for(a in t)o[a]=t[a];s==null||s.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function y0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ca={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(J.test(e))e=parseFloat(e);else return e;const n=y0(e,t.target.x),r=y0(e,t.target.y);return`${n}% ${r}%`}},aL={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Tn.parse(e);if(s.length>5)return r;const o=Tn.createTransformer(e),a=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+a]/=l,s[1+a]/=c;const d=_e(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),o(s)}},Dp={borderRadius:{...Ca,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ca,borderTopRightRadius:Ca,borderBottomLeftRadius:Ca,borderBottomRightRadius:Ca,boxShadow:aL};function C2(e,{layout:t,layoutId:n}){return ua.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Dp[e]||e==="opacity")}function zy(e,t,n){var a;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const l in r)(at(r[l])||s&&at(s[l])||C2(l,e)||((a=n==null?void 0:n.getValue(l))==null?void 0:a.liveStyle)!==void 0)&&(o[l]=r[l]);return o}function lL(e){return window.getComputedStyle(e)}class cL extends w2{constructor(){super(...arguments),this.type="html",this.renderInstance=_2}readValueFromInstance(t,n){var r;if(ua.has(n))return(r=this.projection)!=null&&r.isProjecting?jp(n):TD(t,n);{const s=lL(t),o=(DN(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return N2(t,n)}build(t,n,r){Uy(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zy(t,n,r)}}const dL={offset:"stroke-dashoffset",array:"stroke-dasharray"},uL={offset:"strokeDashoffset",array:"strokeDasharray"};function hL(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?dL:uL;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const fL=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function T2(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,d,u){if(Uy(e,l,d),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=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const m of fL)h[m]!==void 0&&(f[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&hL(h,s,o,a,!1)}const E2=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"]),P2=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mL(e,t,n,r){_2(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(E2.has(s)?s:My(s),t.attrs[s])}function A2(e,t,n){const r=zy(e,t,n);for(const s in e)if(at(e[s])||at(t[s])){const o=da.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class pL extends w2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ua.has(n)){const r=u2(n);return r&&r.default||0}return n=E2.has(n)?n:My(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return A2(t,n,r)}build(t,n,r){T2(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){mL(t,n,r,s)}mount(t){this.isSVGTag=P2(t.tagName),super.mount(t)}}const gL=By.length;function R2(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?R2(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<gL;n++){const r=By[n],s=e.props[r];(Dl(s)||s===!1)&&(t[r]=s)}return t}function M2(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 yL=[...Fy].reverse(),xL=Fy.length;function vL(e){return t=>Promise.all(t.map(({animation:n,options:r})=>g8(e,n,r)))}function bL(e){let t=vL(e),n=x0(),r=!0,s=!1;const o=d=>(u,h)=>{var m;const f=hi(e,h,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:y,transitionEnd:p,...w}=f;u={...u,...w,...p}}return u};function a(d){t=d(e)}function l(d){const{props:u}=e,h=R2(e.parent)||{},f=[],m=new Set;let y={},p=1/0;for(let b=0;b<xL;b++){const g=yL[b],v=n[g],j=u[g]!==void 0?u[g]:h[g],k=Dl(j),S=g===d?v.isActive:null;S===!1&&(p=b);let N=j===h[g]&&j!==u[g]&&k;if(N&&(r||s)&&e.manuallyAnimateOnMount&&(N=!1),v.protectedKeys={...y},!v.isActive&&S===null||!j&&!v.prevProp||th(j)||typeof j=="boolean")continue;if(g==="exit"&&v.isActive&&S!==!0){v.prevResolvedValues&&(y={...y,...v.prevResolvedValues});continue}const T=wL(v.prevProp,j);let R=T||g===d&&v.isActive&&!N&&k||b>p&&k,P=!1;const F=Array.isArray(j)?j:[j];let O=F.reduce(o(g),{});S===!1&&(O={});const{prevResolvedValues:V={}}=v,A={...V,...O},I=_=>{R=!0,m.has(_)&&(P=!0,m.delete(_)),v.needsAnimating[_]=!0;const E=e.getValue(_);E&&(E.liveStyle=!1)};for(const _ in A){const E=O[_],D=V[_];if(y.hasOwnProperty(_))continue;let G=!1;Tp(E)&&Tp(D)?G=!M2(E,D):G=E!==D,G?E!=null?I(_):m.add(_):E!==void 0&&m.has(_)?I(_):v.protectedKeys[_]=!0}v.prevProp=j,v.prevResolvedValues=O,v.isActive&&(y={...y,...O}),(r||s)&&e.blockInitialAnimation&&(R=!1);const z=N&&T;R&&(!z||P)&&f.push(...F.map(_=>{const E={type:g};if(typeof _=="string"&&(r||s)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:D}=e,G=hi(D,_);if(D.enteringChildren&&G){const{delayChildren:W}=G.transition||{};E.delay=n2(D.enteringChildren,e,W)}}return{animation:_,options:E}}))}if(m.size){const b={};if(typeof u.initial!="boolean"){const g=hi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(b.transition=g.transition)}m.forEach(g=>{const v=e.getBaseTarget(g),j=e.getValue(g);j&&(j.liveStyle=!0),b[g]=v??null}),f.push({animation:b})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?t(f):Promise.resolve()}function c(d,u){var f;if(n[d].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(m=>{var y;return(y=m.animationState)==null?void 0:y.setActive(d,u)}),n[d].isActive=u;const h=l(d);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:a,getState:()=>n,reset:()=>{n=x0(),s=!0}}}function wL(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!M2(t,e):!1}function Bs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x0(){return{animate:Bs(!0),whileInView:Bs(),whileHover:Bs(),whileTap:Bs(),whileDrag:Bs(),whileFocus:Bs(),exit:Bs()}}function Lp(e,t){e.min=t.min,e.max=t.max}function pn(e,t){Lp(e.x,t.x),Lp(e.y,t.y)}function v0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const O2=1e-4,jL=1-O2,kL=1+O2,I2=.01,SL=0-I2,NL=0+I2;function wt(e){return e.max-e.min}function _L(e,t,n){return Math.abs(e-t)<=n}function b0(e,t,n,r=.5){e.origin=r,e.originPoint=_e(t.min,t.max,e.origin),e.scale=wt(n)/wt(t),e.translate=_e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=jL&&e.scale<=kL||isNaN(e.scale))&&(e.scale=1),(e.translate>=SL&&e.translate<=NL||isNaN(e.translate))&&(e.translate=0)}function nl(e,t,n,r){b0(e.x,t.x,n.x,r?r.originX:void 0),b0(e.y,t.y,n.y,r?r.originY:void 0)}function w0(e,t,n,r=0){const s=r?_e(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+wt(t)}function CL(e,t,n,r){w0(e.x,t.x,n.x,r==null?void 0:r.x),w0(e.y,t.y,n.y,r==null?void 0:r.y)}function j0(e,t,n,r=0){const s=r?_e(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+wt(t)}function pu(e,t,n,r){j0(e.x,t.x,n.x,r==null?void 0:r.x),j0(e.y,t.y,n.y,r==null?void 0:r.y)}function k0(e,t,n,r,s){return e-=t,e=mu(e,1/n,r),s!==void 0&&(e=mu(e,1/s,r)),e}function TL(e,t=0,n=1,r=.5,s,o=e,a=e){if(Qn.test(t)&&(t=parseFloat(t),t=_e(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=_e(o.min,o.max,r);e===o&&(l-=t),e.min=k0(e.min,t,n,l,s),e.max=k0(e.max,t,n,l,s)}function S0(e,t,[n,r,s],o,a){TL(e,t[n],t[r],t[s],t.scale,o,a)}const EL=["x","scaleX","originX"],PL=["y","scaleY","originY"];function N0(e,t,n,r){S0(e.x,t,EL,n?n.x:void 0,r?r.x:void 0),S0(e.y,t,PL,n?n.y:void 0,r?r.y:void 0)}function _0(e){return e.translate===0&&e.scale===1}function D2(e){return _0(e.x)&&_0(e.y)}function C0(e,t){return e.min===t.min&&e.max===t.max}function AL(e,t){return C0(e.x,t.x)&&C0(e.y,t.y)}function T0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function L2(e,t){return T0(e.x,t.x)&&T0(e.y,t.y)}function E0(e){return wt(e.x)/wt(e.y)}function P0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $n(e){return[e("x"),e("y")]}function RL(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||o||a)&&(r=`translate3d(${s}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:f,skewX:m,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),u&&(r+=`rotate(${u}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const $2=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ML=$2.length,A0=e=>typeof e=="string"?parseFloat(e):e,R0=e=>typeof e=="number"||J.test(e);function OL(e,t,n,r,s,o){s?(e.opacity=_e(0,n.opacity??1,IL(r)),e.opacityExit=_e(t.opacity??1,0,DL(r))):o&&(e.opacity=_e(t.opacity??1,n.opacity??1,r));for(let a=0;a<ML;a++){const l=$2[a];let c=M0(t,l),d=M0(n,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||R0(c)===R0(d)?(e[l]=Math.max(_e(A0(c),A0(d),r),0),(Qn.test(d)||Qn.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=_e(t.rotate||0,n.rotate||0,r))}function M0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const IL=F2(0,.5,PN),DL=F2(.5,.95,on);function F2(e,t,n){return r=>r<e?0:r>t?1:n(Ol(e,t,r))}function LL(e,t,n){const r=at(e)?e:Jo(e);return r.start(Ay("",r,t,n)),r.animation}function Ll(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const $L=(e,t)=>e.depth-t.depth;class FL{constructor(){this.children=[],this.isDirty=!1}add(t){vy(this.children,t),this.isDirty=!0}remove(t){lu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($L),this.isDirty=!1,this.children.forEach(t)}}function BL(e,t){const n=bt.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Ps(r),e(o-t))};return ve.setup(r,!0),()=>Ps(r)}function bd(e){return at(e)?e.get():e}class UL{constructor(){this.members=[]}add(t){vy(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&&(lu(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(lu(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:o}=r.options,{layoutDependency:a}=t.options;(o===void 0||o!==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,o,a;(r=(n=t.options).onExitComplete)==null||r.call(n),(a=(s=t.resumingFrom)==null?void 0:(o=s.options).onExitComplete)==null||a.call(o)})}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 wd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hf=["","X","Y","Z"],zL=1e3;let VL=0;function ff(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function B2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=a2(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ve,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&B2(r)}function U2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},l=t==null?void 0:t()){this.id=VL++,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=()=>
vendor: 1,496 bytes, line 406
406{this.projectionUpdateScheduled=!1,this.nodes.forEach(qL),this.nodes.forEach(XL),this.nodes.forEach(ZL),this.nodes.forEach(KL)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new FL)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new by),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=$y(a)&&!H8(a),this.instance=a;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;ve.read(()=>{h=window.innerWidth}),e(a,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=BL(f,250),wd.hasAnimatedSinceResize&&(wd.hasAnimatedSinceResize=!1,this.nodes.forEach(D0)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>
vendor: 19,373 bytes, line 406
406{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||s$,{onLayoutAnimationStart:p,onLayoutAnimationComplete:w}=d.getProps(),b=!this.targetLayout||!L2(this.targetLayout,m),g=!h&&f;if(this.options.layoutRoot||this.resumeFrom||g||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Py(y,"layout"),onPlay:p,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,g)}else h||D0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(),Ps(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(e$),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&&B2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];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:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(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(YL),this.nodes.forEach(O0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(I0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(JL),this.nodes.forEach(QL),this.nodes.forEach(WL),this.nodes.forEach(HL)):this.nodes.forEach(I0),this.clearAllSnapshots();const l=bt.now();ot.delta=rr(0,1e3/60,l-ot.timestamp),ot.timestamp=l,ot.isProcessing=!0,rf.update.process(ot),rf.preRender.process(ot),rf.render.process(ot),ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(GL),this.sharedNodes.forEach(t$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wt(this.snapshot.measuredBox.x)&&!wt(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=Ge()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&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,l=this.projectionDelta&&!D2(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;a&&this.instance&&(l||Ws(this.latestValues)||u)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),i$(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:a}=this.options;if(!a)return Ge();const l=a.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(o$))){const{scroll:u}=this.root;u&&(Wn(l.x,u.offset.x),Wn(l.y,u.offset.y))}return l}removeElementScroll(a){var c;const l=Ge();if(pn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:h,options:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&pn(l,a),Wn(l.x,h.offset.x),Wn(l.y,h.offset.y))}return l}applyTransform(a,l=!1,c){var u,h;const d=c||Ge();pn(d,a);for(let f=0;f<this.path.length;f++){const m=this.path[f];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(Wn(d.x,-m.scroll.offset.x),Wn(d.y,-m.scroll.offset.y)),Ws(m.latestValues)&&vd(d,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return Ws(this.latestValues)&&vd(d,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),d}removeTransform(a){var c;const l=Ge();pn(l,a);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Ws(u.latestValues))continue;let h;u.instance&&(Op(u.latestValues)&&u.updateSnapshot(),h=Ge(),pn(h,u.measurePageBox())),N0(l,u.latestValues,(c=u.snapshot)==null?void 0:c.layoutBox,h)}return Ws(this.latestValues)&&N0(l,this.latestValues),l}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!==ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=ot.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=Ge(),this.targetWithTransforms=Ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),CL(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):pn(this.target,this.layout.layoutBox),S2(this.target,this.targetDelta)):pn(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||Op(this.parent.latestValues)||k2(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,l,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ge(),this.relativeTargetOrigin=Ge(),pu(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),pn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ot.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;pn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;nL(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ge());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(v0(this.prevProjectionDelta.x,this.projectionDelta.x),v0(this.prevProjectionDelta.y,this.projectionDelta.y)),nl(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!P0(this.projectionDelta.x,this.prevProjectionDelta.x)||!P0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ho(),this.projectionDelta=ho(),this.projectionDeltaWithTransform=ho()}setAnimationOrigin(a,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=ho();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Ge(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,p=m!==y,w=this.getStack(),b=!w||w.members.length<=1,g=!!(p&&!b&&this.options.crossfade===!0&&!this.path.some(r$));this.animationProgress=0;let v;this.mixTargetDelta=j=>{const k=j/1e3;L0(h.x,a.x,k),L0(h.y,a.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),n$(this.relativeTarget,this.relativeTargetOrigin,f,k),v&&AL(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Ge()),pn(v,this.relativeTarget)),p&&(this.animationValues=u,OL(u,d,this.latestValues,k,g,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var l,c,d;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ps(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ve.update(()=>{wd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Jo(0)),this.motionValue.jump(0,!1),this.currentAnimation=LL(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),a.onUpdate&&a.onUpdate(u)},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(zL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=a;if(!(!l||!c||!d)){if(this!==a&&this.layout&&d&&z2(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Ge();const h=wt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const f=wt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}pn(l,c),vd(l,u),nl(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new UL),this.sharedNodes.get(a).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&ff("z",a,d,this.animationValues);for(let u=0;u<hf.length;u++)ff(`rotate${hf[u]}`,a,d,this.animationValues),ff(`skew${hf[u]}`,a,d,this.animationValues);a.render();for(const u in d)a.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);a.scheduleRender()}applyProjectionStyles(a,l){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=bd(l==null?void 0:l.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=bd(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Ws(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=RL(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),a.transform=h;const{x:f,y:m}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,d.animationValues?a.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in Dp){if(u[y]===void 0)continue;const{correct:p,applyTo:w,isCSSVariable:b}=Dp[y],g=h==="none"?u[y]:p(u[y],d);if(w){const v=w.length;for(let j=0;j<v;j++)a[w[j]]=g}else b?this.options.visualElement.renderState.vars[y]=g:a[y]=g}this.options.layoutId&&(a.pointerEvents=d===this?bd(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(O0),this.root.sharedNodes.clear()}}}function WL(e){e.updateLayout()}function HL(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:o}=e.options,a=t.source!==e.layout.source;if(o==="size")$n(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],m=wt(f);f.min=r[h].min,f.max=f.min+m});else if(o==="x"||o==="y"){const h=o==="x"?"y":"x";Lp(a?t.measuredBox[h]:t.layoutBox[h],r[h])}else z2(o,t.layoutBox,r)&&$n(h=>{const f=a?t.measuredBox[h]:t.layoutBox[h],m=wt(r[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=ho();nl(l,r,t.layoutBox);const c=ho();a?nl(c,e.applyTransform(s,!0),t.measuredBox):nl(c,r,t.layoutBox);const d=!D2(l);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const y=e.options.layoutAnchor||void 0,p=Ge();pu(p,t.layoutBox,f.layoutBox,y);const w=Ge();pu(w,r,m.layoutBox,y),L2(p,w)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=p,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qL(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 KL(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function GL(e){e.clearSnapshot()}function O0(e){e.clearMeasurements()}function YL(e){e.isLayoutDirty=!0,e.updateLayout()}function I0(e){e.isLayoutDirty=!1}function JL(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function QL(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function D0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XL(e){e.resolveTargetDelta()}function ZL(e){e.calcProjection()}
406function e$(e){e.resetSkewAndRotation()}function t$(e){e.removeLeadSnapshot()}function L0(e,t,n){e.translate=_e(t.translate,0,n),e.scale=_e(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $0(e,t,n,r){e.min=_e(t.min,n.min,r),e.max=_e(t.max,n.max,r)}function n$(e,t,n,r){$0(e.x,t.x,n.x,r),$0(e.y,t.y,n.y,r)}function r$(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const s$={duration:.45,ease:[.4,0,.1,1]},F0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),B0=F0("applewebkit/")&&!F0("chrome/")?Math.round:on;function U0(e){e.min=B0(e.min),e.max=B0(e.max)}function i$(e){U0(e.x),U0(e.y)}function z2(e,t,n){return e==="position"||e==="preserve-aspect"&&!_L(E0(t),E0(n),.2)}function o$(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const a$=U2({attachResizeListener:(e,t)=>Ll(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}),mf={current:void 0},V2=U2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mf.current){const e=new a$({});e.mount(window),e.setOptions({layoutScroll:!0}),mf.current=e}return mf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Vy=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function z0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function l$(...e){return t=>{let n=!1;const r=e.map(s=>{const o=z0(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():z0(e[s],null)}}}}function c$(...e){return x.useCallback(l$(...e),e)}class d$ extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(pd(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=pd(r)&&r.offsetWidth||0,o=pd(r)&&r.offsetHeight||0,a=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(a.height),l.width=parseFloat(a.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=s-l.width-l.left,l.bottom=o-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function u$({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var f;const a=x.useId(),l=x.useRef(null),c=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=x.useContext(Vy),u=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),h=c$(l,u);return x.useInsertionEffect(()=>{const{width:m,height:y,top:p,left:w,right:b,bottom:g}=c.current;if(t||o===!1||!l.current||!m||!y)return;const v=n==="left"?`left: ${w}`:`right: ${b}`,j=r==="bottom"?`bottom: ${g}`:`top: ${p}`;l.current.dataset.motionPopId=a;const k=document.createElement("style");d&&(k.nonce=d);const S=s??document.head;return S.appendChild(k),k.sheet&&k.sheet.insertRule(` 407 [data-motion-pop-id="${a}"] { 408 position: absolute !important; 409 width: ${m}px !important; 410 height: ${y}px !important; 411 ${v}px !important; 412 ${j}px !important; 413 } 414 `),()=>{var N;(N=l.current)==null||N.removeAttribute("data-motion-pop-id"),S.contains(k)&&S.removeChild(k)}},[t]),i.jsx(d$,{isPresent:t,childRef:l,sizeRef:c,pop:o,children:o===!1?e:x.cloneElement(e,{ref:h})})}const h$=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:a,anchorX:l,anchorY:c,root:d})=>{const u=xy(f$),h=x.useId();let f=!0,m=x.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:y=>{u.set(y,!0);for(const p of u.values())if(!p)return;r&&r()},register:y=>(u.set(y,!1),()=>u.delete(y))}),[n,u,r]);return o&&f&&(m={...m}),x.useMemo(()=>{u.forEach((y,p)=>u.set(p,!1))},[n]),x.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=i.jsx(u$,{pop:a==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:d,children:e}),i.jsx(Xu.Provider,{value:m,children:e})};function f$(){return new Map}function W2(e=!0){const t=x.useContext(Xu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=x.useId();x.useEffect(()=>{if(e)return s(o)},[e]);const a=x.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const Bc=e=>e.key||"";function V0(e){const t=[];
vendor: 3,322 bytes, line 414
414return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const m$=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:a=!1,anchorX:l="left",anchorY:c="top",root:d})=>{const[u,h]=W2(a),f=x.useMemo(()=>V0(e),[e]),m=a&&!u?[]:f.map(Bc),y=x.useRef(!0),p=x.useRef(f),w=xy(()=>new Map),b=x.useRef(new Set),[g,v]=x.useState(f),[j,k]=x.useState(f);xN(()=>{y.current=!1,p.current=f;for(let T=0;T<j.length;T++){const R=Bc(j[T]);m.includes(R)?(w.delete(R),b.current.delete(R)):w.get(R)!==!0&&w.set(R,!1)}},[j,m.length,m.join("-")]);const S=[];if(f!==g){let T=[...f];for(let R=0;R<j.length;R++){const P=j[R],F=Bc(P);m.includes(F)||(T.splice(R,0,P),S.push(P))}return o==="wait"&&S.length&&(T=S),k(V0(T)),v(f),null}const{forceRender:N}=x.useContext(yy);return i.jsx(i.Fragment,{children:j.map(T=>{const R=Bc(T),P=a&&!u?!1:f===j||m.includes(R),F=()=>{if(b.current.has(R))return;if(w.has(R))b.current.add(R),w.set(R,!0);else return;let O=!0;w.forEach(V=>{V||(O=!1)}),O&&(N==null||N(),k(p.current),a&&(h==null||h()),r&&r())};return i.jsx(h$,{isPresent:P,initial:!y.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:P?void 0:F,anchorX:l,anchorY:c,children:T},R)})})},H2=x.createContext({strict:!1}),W0={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 H0=!1;function p$(){if(H0)return;const e={};for(const t in W0)e[t]={isEnabled:n=>W0[t].some(r=>!!n[r])};b2(e),H0=!0}function q2(){return p$(),X8()}function g$(e){const t=q2();for(const n in e)t[n]={...t[n],...e[n]};b2(t)}const y$=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 gu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||y$.has(e)}let K2=e=>!gu(e);function x$(e){typeof e=="function"&&(K2=t=>t.startsWith("on")?!gu(t):e(t))}try{x$(require("@emotion/is-prop-valid").default)}catch{}function v$(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||at(e[s])||(K2(s)||n===!0&&gu(s)||!t&&!gu(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const rh=x.createContext({});function b$(e,t){if(nh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Dl(n)?n:void 0,animate:Dl(r)?r:void 0}}return e.inherit!==!1?t:{}}function w$(e){const{initial:t,animate:n}=b$(e,x.useContext(rh));return x.useMemo(()=>({initial:t,animate:n}),[q0(t),q0(n)])}function q0(e){return Array.isArray(e)?e.join(" "):e}const Wy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});
vendor: 24,016 bytes, line 414
414function G2(e,t,n){for(const r in t)!at(t[r])&&!C2(r,n)&&(e[r]=t[r])}function j$({transformTemplate:e},t){return x.useMemo(()=>{const n=Wy();return Uy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function k$(e,t){const n=e.style||{},r={};return G2(r,n,e),Object.assign(r,j$(e,t)),r}function S$(e,t){const n={},r=k$(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 Y2=()=>({...Wy(),attrs:{}});function N$(e,t,n,r){const s=x.useMemo(()=>{const o=Y2();return T2(o,t,P2(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};G2(o,e.style,e),s.style={...o,...s.style}}return s}const _$=["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 Hy(e){return typeof e!="string"||e.includes("-")?!1:!!(_$.indexOf(e)>-1||/[A-Z]/u.test(e))}function C$(e,t,n,{latestValues:r},s,o=!1,a){const c=(a??Hy(e)?N$:S$)(t,r,s,e),d=v$(t,typeof e=="string",o),u=e!==x.Fragment?{...d,...c,ref:n}:{},{children:h}=t,f=x.useMemo(()=>at(h)?h.get():h,[h]);return x.createElement(e,{...u,children:f})}function T$({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:E$(n,r,s,e),renderState:t()}}function E$(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=bd(o[f]);let{initial:a,animate:l}=e;const c=nh(e),d=x2(e);t&&d&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const h=u?l:a;if(h&&typeof h!="boolean"&&!th(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const y=Ry(e,f[m]);if(y){const{transitionEnd:p,transition:w,...b}=y;for(const g in b){let v=b[g];if(Array.isArray(v)){const j=u?v.length-1:0;v=v[j]}v!==null&&(s[g]=v)}for(const g in p)s[g]=p[g]}}}return s}const J2=e=>(t,n)=>{const r=x.useContext(rh),s=x.useContext(Xu),o=()=>T$(e,t,r,s);return n?o():xy(o)},P$=J2({scrapeMotionValuesFromProps:zy,createRenderState:Wy}),A$=J2({scrapeMotionValuesFromProps:A2,createRenderState:Y2}),R$=Symbol.for("motionComponentSymbol");function M$(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const s=x.useRef(null);return x.useCallback(o=>{var l;o&&((l=e.onMount)==null||l.call(e,o));const a=r.current;if(typeof a=="function")if(o){const c=a(o);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(o);else a&&(a.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const Q2=x.createContext({});function Yi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function O$(e,t,n,r,s,o){var v,j;const{visualElement:a}=x.useContext(rh),l=x.useContext(H2),c=x.useContext(Xu),d=x.useContext(Vy),u=d.reducedMotion,h=d.skipAnimations,f=x.useRef(null),m=x.useRef(!1);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const y=f.current,p=x.useContext(Q2);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&I$(f.current,n,s,p);const w=x.useRef(!1);x.useInsertionEffect(()=>{y&&w.current&&y.update(n,c)});const b=n[o2],g=x.useRef(!!b&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,b))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,b)));return xN(()=>{m.current=!0,y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),g.current&&y.animationState&&y.animationState.animateChanges())}),x.useEffect(()=>{y&&(!g.current&&y.animationState&&y.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,b)}),g.current=!1),y.enteringChildren=void 0)}),y}function I$(e,t,n,r){const{layoutId:s,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:X2(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!a||l&&Yi(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function X2(e){if(e)return e.options.allowProjection!==!1?e.projection:X2(e.parent)}function pf(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&g$(r);const o=n?n==="svg":Hy(e),a=o?A$:P$;function l(d,u){let h;const f={...x.useContext(Vy),...d,layoutId:D$(d)},{isStatic:m}=f,y=w$(d),p=a(d,m);if(!m&&typeof window<"u"){L$();const w=$$(f);h=w.MeasureLayout,y.visualElement=O$(e,p,f,s,w.ProjectionNode,o)}return i.jsxs(rh.Provider,{value:y,children:[h&&y.visualElement?i.jsx(h,{visualElement:y.visualElement,...f}):null,C$(e,d,M$(p,y.visualElement,u),p,m,t,o)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(l);return c[R$]=e,c}function D$({layoutId:e}){const t=x.useContext(yy).id;return t&&e!==void 0?t+"-"+e:e}function L$(e,t){x.useContext(H2).strict}function $$(e){const t=q2(),{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 F$(e,t){if(typeof Proxy>"u")return pf;const n=new Map,r=(o,a)=>pf(o,a,e,t),s=(o,a)=>r(o,a);return new Proxy(s,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,pf(a,void 0,e,t)),n.get(a))})}const B$=(e,t)=>t.isSVG??Hy(e)?new pL(t):new cL(t,{allowProjection:e!==x.Fragment});class U$ extends Is{constructor(t){super(t),t.animationState||(t.animationState=bL(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();th(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 z$=0;class V$ extends Is{constructor(){super(...arguments),this.id=z$++,this.isExitComplete=!1}update(){var o;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:l}=this.node.getProps();if(typeof a=="string"){const c=hi(this.node,a,l);if(c){const{transition:d,transitionEnd:u,...h}=c;for(const f in h)(o=this.node.getValue(f))==null||o.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 W$={animation:{Feature:U$},exit:{Feature:V$}};function rc(e){return{point:{x:e.pageX,y:e.pageY}}}const H$=e=>t=>Ly(t)&&e(t,rc(t));function rl(e,t,n,r){return Ll(e,t,H$(n),r)}const Z2=({current:e})=>e?e.ownerDocument.defaultView:null,K0=(e,t)=>Math.abs(e-t);function q$(e,t){const n=K0(e.x,t.x),r=K0(e.y,t.y);return Math.sqrt(n**2+r**2)}const G0=new Set(["auto","scroll"]);class e_{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:l}={}){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=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Uc(this.lastRawMoveEventInfo,this.transformPagePoint));const m=gf(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,p=q$(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!p)return;const{point:w}=m,{timestamp:b}=ot;this.history.push({...w,timestamp:b});const{onStart:g,onMove:v}=this.handlers;y||(g&&g(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=Uc(y,this.transformPagePoint),ve.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:p,onSessionEnd:w,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=gf(m.type==="pointercancel"?this.lastMoveEventInfo:Uc(y,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,g),w&&w(m,g)},!Ly(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const c=rc(t),d=Uc(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=ot;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,gf(d,this.history)),this.removeListeners=ec(rl(this.contextWindow,"pointermove",this.handlePointerMove),rl(this.contextWindow,"pointerup",this.handlePointerUp),rl(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(G0.has(r.overflowX)||G0.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},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),ve.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ps(this.updatePoint)}}function Uc(e,t){return t?{point:t(e.point)}:e}function Y0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gf({point:e},t){return{point:e,delta:Y0(e,t_(t)),offset:Y0(e,K$(t)),velocity:G$(t,.1)}}function K$(e){return e[0]}function t_(e){return e[e.length-1]}function G$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=t_(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Lt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Lt(t)*2&&(r=e[1]);const o=rn(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Y$(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?_e(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?_e(n,e,r.max):Math.min(e,n)),e}function J0(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 J$(e,{top:t,left:n,bottom:r,right:s}){return{x:J0(e.x,n,s),y:J0(e.y,t,r)}}function Q0(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 Q$(e,t){return{x:Q0(e.x,t.x),y:Q0(e.y,t.y)}}function X$(e,t){let n=.5;const r=wt(e),s=wt(t);return s>r?n=Ol(t.min,t.max-r,e.min):r>s&&(n=Ol(e.min,e.max-s,t.min)),rr(0,1,n)}function Z$(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 $p=.35;function eF(e=$p){return e===!1?e=0:e===!0&&(e=$p),{x:X0(e,"left","right"),y:X0(e,"top","bottom")}}function X0(e,t,n){return{min:Z0(e,t),max:Z0(e,n)}}function Z0(e,t){return typeof e=="number"?e:e[t]||0}const tF=new WeakMap;class nF{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=Ge(),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 o=h=>{n&&this.snapToCursor(rc(h).point),this.stopAnimation()},a=(h,f)=>{const{drag:m,dragPropagation:y,onDragStart:p}=this.getProps();if(m&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=T8(m),!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),$n(b=>{let g=this.getAxisMotionValue(b).get()||0;if(Qn.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const j=v.layout.layoutBox[b];j&&(g=wt(j)*(parseFloat(g)/100))}}this.originPoint[b]=g}),p&&ve.update(()=>p(h,f),!1,!0),Ep(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:y,onDirectionLock:p,onDrag:w}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=f;if(y&&this.currentDirection===null){this.currentDirection=sF(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),w&&ve.update(()=>w(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new e_(t,{onSessionStart:o,onStart:a,onMove:l,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Z2(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&ve.postRender(()=>l(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||!zc(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Y$(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Yi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=J$(r.layoutBox,t):this.constraints=!1,this.elastic=eF(n),s!==this.constraints&&!Yi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&$n(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Z$(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yi(t))return!1;const r=t.current;Go(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 o=rL(r,s.root,this.visualElement.getTransformPagePoint());let a=Q$(s.layout.layoutBox,o);if(n){const l=n(eL(a));this.hasMutatedConstraints=!!l,l&&(a=j2(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=$n(u=>{if(!zc(u,n,this.currentDirection))return;let h=c&&c[u]||{};(a===!0||a===u)&&(h={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,y)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ep(this.visualElement,t),r.start(Ay(t,r,0,n,this.visualElement,!1))}stopAnimation(){$n(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){$n(n=>{const{drag:r}=this.getProps();if(!zc(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-_e(a,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Yi(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};$n(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();s[a]=X$({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),$n(a=>{if(!zc(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];l.set(_e(c,d,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;tF.set(this.visualElement,this);const t=this.visualElement.current,n=rl(t,"pointerdown",d=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=d.target,m=f!==t&&O8(f);u&&h&&!m&&this.start(d)});let r;const s=()=>{const{dragConstraints:d}=this.getProps();Yi(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=rF(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,a=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ve.read(s);const l=Ll(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&($n(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=d[h].translate,f.set(f.get()+d[h].translate))}),this.visualElement.render())});return()=>{l(),n(),a(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:a=$p,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function ew(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function rF(e,t,n){const r=a0(e,ew(n)),s=a0(t,ew(n));return()=>{r(),s()}}function zc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class iF extends Is{constructor(t){super(t),this.removeGroupControls=on,this.removeListeners=on,this.controls=new nF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||on}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 yf=e=>(t,n)=>{e&&ve.update(()=>e(t,n),!1,!0)};class oF extends Is{constructor(){super(...arguments),this.removePointerDownListener=on}onPointerDown(t){this.session=new e_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Z2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:yf(t),onStart:yf(n),onMove:yf(r),onEnd:(o,a)=>{delete this.session,s&&ve.postRender(()=>s(o,a))}}}mount(){this.removePointerDownListener=rl(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 xf=!1;class aF extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),xf&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),wd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),xf=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ve.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Dy.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;xf=!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 n_(e){const[t,n]=W2(),r=x.useContext(yy);return i.jsx(aF,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Q2),isPresent:t,safeToRemove:n})}const lF={pan:{Feature:oF},drag:{Feature:iF,ProjectionNode:V2,MeasureLayout:n_}};function tw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&ve.postRender(()=>o(t,rc(t)))}class cF extends Is{mount(){const{current:t}=this.node;t&&(this.unmount=P8(t,(n,r)=>(tw(this.node,r,"Start"),s=>tw(this.node,s,"End"))))}unmount(){}}class dF extends Is{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=ec(Ll(this.node.current,"focus",()=>this.onFocus()),Ll(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function nw(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),o=r[s];o&&ve.postRender(()=>o(t,rc(t)))}class uF extends Is{mount(){const{current:t}=this.node;if(!t)return;
414const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=D8(t,(s,o)=>(nw(this.node,o,"Start"),(a,{success:l})=>nw(this.node,a,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Fp=new WeakMap,vf=new WeakMap,hF=e=>{const t=Fp.get(e.target);t&&t(e)},fF=e=>{e.forEach(hF)};function mF({root:e,...t}){const n=e||document;vf.has(n)||vf.set(n,{});const r=vf.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(fF,{root:e,...t})),r[s]}function pF(e,t,n){const r=mF(t);return Fp.set(e,n),r.observe(e),()=>{Fp.delete(e),r.unobserve(e)}}const gF={some:0,all:1};class yF extends Is{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:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:gF[s]},l=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),m=u?h:f;m&&m(d)};this.stopObserver=pF(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xF(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function xF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const vF={inView:{Feature:yF},tap:{Feature:uF},focus:{Feature:dF},hover:{Feature:cF}},bF={layout:{ProjectionNode:V2,MeasureLayout:n_}},wF={...W$,...vF,...lF,...bF},$=F$(wF,B$),jF={some:0,all:1};function kF(e,t,{root:n,margin:r,amount:s="some"}={}){const o=Iy(e),a=new WeakMap,l=d=>{d.forEach(u=>{const h=a.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const f=t(u.target,u);typeof f=="function"?a.set(u.target,f):c.unobserve(u.target)}else typeof h=="function"&&(h(u),a.delete(u.target))})},c=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof s=="number"?s:jF[s]});return o.forEach(d=>c.observe(d)),()=>c.disconnect()}function kt(e,{root:t,margin:n,amount:r,once:s=!1,initial:o=!1}={}){const[a,l]=x.useState(o);return x.useEffect(()=>{if(!e.current||s&&a)return;const c=()=>(l(!0),s?void 0:()=>l(!1)),d={root:t&&t.current||void 0,margin:n,amount:r};return kF(e.current,c,d)},[t,e,n,s,r]),a}const Cr="/assets/logo-bone-BOVpsctS.png",SF=[{label:"All Trainings",href:"#trainings"},{label:"Spinal Attunement",href:"https://www.spinalattunement.com",external:!0},{label:"Self Holding Method",href:"/trainings/self-holding-method",isRoute:!0}],rw=[{label:"Classes",href:"#classes"},{label:"Trainings",href:"#trainings",dropdown:SF},{label:"Masterclasses",href:"/masterclass-library",isRoute:!0}],Ke=()=>{const[e,t]=x.useState(!1),n=Pr(),r=Mn(),s=(o,a)=>{n.pathname!=="/"&&(o.preventDefault(),r("/"+a))};return i.jsxs("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md",children:[i.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-12 flex items-center justify-between h-20",children:[i.jsx(xe,{to:"/",children:i.jsx("img",{src:Cr,alt:"Soma Mystica",className:"h-10 md:h-12 w-auto brightness-[0.3]"})}),i.jsxs("div",{className:"hidden md:flex items-center gap-10",children:[rw.map(o=>o.dropdown?i.jsxs("div",{className:"relative group",children:[i.jsxs("a",{href:o.href,onClick:a=>s(a,o.href),className:"font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors duration-300 inline-flex items-center gap-1.5",children:[o.label,i.jsx(iS,{size:14})]}),i.jsx("div",{className:"absolute left-0 top-full pt-8 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300",children:i.jsx("div",{className:"bg-background border border-border shadow-lg min-w-[15rem] py-2",children:o.dropdown.map(a=>a.external?i.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"block px-5 py-3 font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:a.label},a.label):a.isRoute?i.jsx(xe,{to:a.href,className:"block px-5 py-3 font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:a.label},a.label):i.jsx("a",{href:a.href,onClick:l=>s(l,a.href),className:"block px-5 py-3 font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:a.label},a.label))})})]},o.label):o.isRoute?i.jsx(xe,{to:o.href,className:"font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors duration-300",children:o.label},o.label):i.jsx("a",{href:o.href,onClick:a=>s(a,o.href),className:"font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors duration-300",children:o.label},o.label)),i.jsx("a",{href:"#newsletter",onClick:o=>s(o,"#newsletter"),className:"font-body text-sm tracking-widest uppercase border border-foreground px-6 py-2.5 text-foreground hover:bg-foreground hover:text-primary-foreground transition-all duration-300",children:"Join Us"})]}),i.jsx("button",{className:"md:hidden text-foreground",onClick:()=>t(!e),"aria-label":"Toggle menu",children:e?i.jsx(wi,{size:24}):i.jsx(WR,{size:24})})]}),i.jsx(m$,{children:e&&i.jsx($.div,{initial:{opacity:0,height:0}
414,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden bg-background border-t border-border overflow-hidden",children:i.jsxs("div",{className:"px-6 py-8 flex flex-col gap-6",children:[rw.map(o=>o.dropdown?i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsx("a",{href:o.href,onClick:a=>{s(a,o.href),t(!1)},className:"font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors",children:o.label}),i.jsx("div",{className:"flex flex-col gap-4 pl-4 border-l border-border",children:o.dropdown.filter(a=>a.external||a.isRoute).map(a=>a.external?i.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",onClick:()=>t(!1),className:"font-body text-xs tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors",children:a.label},a.label):i.jsx(xe,{to:a.href,onClick:()=>t(!1),className:"font-body text-xs tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors",children:a.label},a.label))})]},o.label):o.isRoute?i.jsx(xe,{to:o.href,onClick:()=>t(!1),className:"font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors",children:o.label},o.label):i.jsx("a",{href:o.href,onClick:a=>{s(a,o.href),t(!1)},className:"font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors",children:o.label},o.label)),i.jsx("a",{href:"#newsletter",onClick:o=>{s(o,"#newsletter"),t(!1)},className:"font-body text-sm tracking-widest uppercase border border-foreground px-6 py-2.5 text-foreground text-center hover:bg-foreground hover:text-primary-foreground transition-all",children:"Join Us"})]})})})]})},NF=1,_F="34c285c4-237d-4d8e-bad4-ce95f3d03bea",CF="d7020298-ee16-4fdb-b15b-52fc559115b1",TF="/__l5e/assets-v1/34c285c4-237d-4d8e-bad4-ce95f3d03bea/hero-new.jpg",EF="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/34c285c4-237d-4d8e-bad4-ce95f3d03bea/hero-new.jpg",PF="hero-new.jpg",AF=371279,RF="image/jpeg",MF="2026-08-31T03:08:43Z",r_={version:NF,asset_id:_F,project_id:CF,url:TF,r2_key:EF,original_filename:PF,size:AF,content_type:RF,created_at:MF},OF=r_.url,IF=()=>i.jsxs("section",{className:"relative h-screen w-full overflow-hidden",children:[i.jsx("img",{src:OF,alt:"Practitioner in a deep somatic backbend, spine and breath in motion",className:"absolute inset-0 w-full h-full object-cover object-center",width:1061,height:1920}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-foreground
414/20 via-foreground/10 to-foreground/40"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center h-full text-center px-6",children:[i.jsx($.img,{src:Cr,alt:"Soma Mystica® logo",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:1.2},className:"h-20 md:h-28 lg:h-36 w-auto mb-8"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:1,delay:.2},className:"font-body text-sm tracking-widest uppercase text-primary-foreground/80 mb-6",children:"A multi-modality somatic and energetic certification training school"}),i.jsxs($.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:1,delay:.5},className:"font-display text-5xl md:text-7xl lg:text-8xl text-primary-foreground leading-tight",children:["Therapy for the",i.jsx("br",{}),i.jsx("em",{className:"italic",children:"whole self"})]}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:1,delay:.9},className:"font-body text-lg md:text-xl text-primary-foreground/80 mt-6 max-w-lg",children:"Body, Mind, Soul, Spirit. All of you is welcome."}),i.jsxs($.a,{href:"#classes",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:1,delay:1.1},className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground border border-primary-foreground/60 px-8 py-4 hover:bg-primary-foreground hover:text-foreground transition-all duration-500",children:["Begin your journey",i.jsx(ue,{size:16})]})]})]}),DF="/assets/trainings-DzcZibyu.jpg",LF=1,$F="63375b47-5726-4578-bdb1-5dbfb06676ee",FF="d7020298-ee16-4fdb-b15b-52fc559115b1",BF="/__l5e/assets-v1/63375b47-5726-4578-bdb1-5dbfb06676ee/SM_Art_4.webp",UF="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/63375b47-5726-4578-bdb1-5dbfb06676ee/SM_Art_4.webp",zF="SM_Art_4.webp",VF=34070,WF="image/webp",HF="2026-09-03T03:46:10Z",qF={version:LF,asset_id:$F,project_id:FF,url:BF,r2_key:UF,original_filename:zF,size:VF,content_type:WF,created_at:HF},KF=1,GF="f940a700-5744-4ebd-90ea-8d74c46a6a28",YF="d7020298-ee16-4fdb-b15b-52fc559115b1",JF="/__l5e/assets-v1/f940a700-5744-4ebd-90ea-8d74c46a6a28/SM-Mark.png",QF="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/f940a700-5744-4ebd-90ea-8d74c46a6a28/SM-Mark.png",XF="SM-Mark.png",ZF=212806,eB="image/png",tB="2026-09-03T03:38:54Z",nB={version:KF,asset_id:GF,project_id:YF,url:JF,r2_key:QF,original_filename:XF,size:ZF,content_type:eB,created_at:tB},rB=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"});return i.jsxs("section",{id:"philosophy",className:"relative py-32 md:py-40 overflow-hidden",children:[i.jsx("img",{src:DF,alt:"Soft natural light across a still somatic practice space",className:"absolute inset-0 w-full h-full object-cover opacity-20",loading:"lazy",width:1920,height:900}),i.jsx("img",{src:qF.url,alt:"","aria-hidden":"true",loading:"lazy",className:"absolute inset-0 w-full h-full object-cover opacity-70"}),i.jsx("img",{src:nB.url,alt:"","aria-hidden":"true",loading:"lazy",className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[60%] max-w-xl opacity-25"}),i.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-6 text-center",ref:e,children:[i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8},className:"font-body text-sm tracking-widest uppercase text-[hsl(25,30%,25%)] mb-8",children:"Our Philosophy"}),i.jsxs($.h2,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"font-display text-3xl md:text-5xl lg:text-6xl leading-tight text-foreground",children:["The missing link for the",i.jsx("br",{}),i.jsx("em",{className:"italic",children:"trauma healing"})," industry"]}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.4},className:"font-body text-lg md:text-xl text-muted-foreground mt-8 max-w-2xl mx-auto leading-relaxed",children:"Combining Somatics, Energetics, Psychotherapy, Nature Rewilding and Ecological Framework practices to support you to heal the unconscious trauma that's keeping you feeling stuck."}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.6},className:"font-body text-base text-muted-foreground mt-6 max-w-xl mx-auto",children:"Healing happens through the body, by feeling what is suppressed in the unconscious nervous system, where unprocessed trauma is physically stored."})]})]})},sB=1,iB="ce6c800c-d65f-4f76-a977-a65ca0e7cd0f",oB="d7020298-ee16-4fdb-b15b-52fc559115b1",aB="/__l5e/assets-v1/ce6c800c-d65f-4f76-a977-a65ca0e7cd0f/Body_1_cosmos.jpg",lB="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/ce6c800c-d65f-4f76-a977-a65ca0e7cd0f/Body_1_cosmos.jpg",cB="Body_1_cosmos.jpg",dB=62654,uB="image/jpeg",hB="2026-09-03T03:39:05Z",fB={version:sB,asset_id:iB,project_id:oB,url:aB,r2_key:lB,original_filename:cB,size:dB,content_type:uB,created_at:hB},mB=1,pB="f62c4d5e-0ef7-4670-8e74-45fcea90d3a2",gB="d7020298-ee16-4fdb-b15b-52fc559115b1",yB="/__l5e/assets-v1/f62c4d5e-0ef7-4670-8e74-45fcea90d3a2/Body_5_cosmos.jpg",xB="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/f62c4d5e-0ef7-4670-8e74-45fcea90d3a2/Body_5_cosmos.jpg",vB="Body_5_cosmos.jpg",bB=182134,wB="image/jpeg",jB="2026-09-03T03:39:09Z",kB={version:mB,asset_id:pB,project_id:gB,url:yB,r2_key:xB,original_filename:vB,size:bB,content_type:wB,created_at:jB},SB=1,NB="d40ac1e8-8f5c-47be-b10b-a0b703a73a68",_B="d7020298-ee16-4fdb-b15b-52fc559115b1",CB="/__l5e/assets-v1/d40ac1e8-8f5c-47be-b10b-a0b703a73a68/SM_Art_7_2.png",TB="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/d40
414ac1e8-8f5c-47be-b10b-a0b703a73a68/SM_Art_7_2.png",EB="SM_Art_7_2.png",PB=1989600,AB="image/png",RB="2026-09-03T03:46:16Z",MB={version:SB,asset_id:NB,project_id:_B,url:CB,r2_key:TB,original_filename:EB,size:PB,content_type:AB,created_at:RB},OB=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"});return i.jsxs("section",{className:"relative py-24 md:py-32 bg-card overflow-hidden",children:[i.jsx("img",{src:MB.url,alt:"","aria-hidden":"true",loading:"lazy",className:"pointer-events-none absolute inset-x-0 top-0 w-full h-[55%] object-cover opacity-60"}),i.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-[55%] bg-gradient-to-b from-transparent to-card","aria-hidden":"true"}),i.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-6",ref:e,children:[i.jsx($.img,{src:fB.url,alt:"Black and white study of the collarbone and shoulder in soft light",loading:"lazy",initial:{opacity:0},animate:t?{opacity:1}:{},transition:{duration:1.2},className:"w-full max-w-md mx-auto mb-6 object-cover grayscale"}),i.jsx($.img,{src:kB.url,alt:"Black and white study of a folded body form",loading:"lazy",initial:{opacity:0}
414,animate:t?{opacity:1}:{},transition:{duration:1.2,delay:.2},className:"w-full max-w-xs mx-auto mb-14 object-cover grayscale"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8},className:"font-body text-sm tracking-widest uppercase text-muted-foreground mb-8 text-center",children:"The Science Behind the Work"}),i.jsxs($.h2,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"font-display text-3xl md:text-5xl leading-tight text-foreground text-center mb-12",children:["Grounded in emerging biophysics.",i.jsx("br",{}),i.jsx("em",{className:"italic",children:"Confirmed by ancient wisdom."})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.3},className:"font-display text-xl md:text-2xl text-foreground/90 text-center italic",children:"The science is catching up."}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.4},className:"font-body text-base md:text-lg text-muted-foreground leading-relaxed",children:"Peer-reviewed research now documents the body's electromagnetic field extending metres beyond the skin. The living matrix â the fascial and connective tissue network â transmits bioelectric signals at speeds chemical diffusion cannot match. The gut microbiome directly shapes nervous system regulation via the vagus nerve. Bioelectric fields precede and organise physical form."}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.5},className:"font-body text-base md:text-lg text-muted-foreground leading-relaxed",children:"What the ancient traditions called prana, Qi, Sushumna, and the subtle body â science is beginning to measure, map, and confirm."}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.6},className:"font-body text-base md:text-lg text-muted-foreground leading-relaxed",children:"Soma Mystica® trainings are built on this convergence. We don't ask practitioners to choose between evidence and intuition, between biophysics and subtle anatomy. We train them to hold both â and to work from the place where they meet."})]})]})]})},s_="/assets/classes-spinal-BrQGnPY7.jpg",i_="/assets/classes-breathwork-bfUBl-BL.jpg",o_="/assets/classes-meditation-ip6GpxDL.jpg",IB=[{title:"Spinal Attunement",subtitle:"Group Sessions with Sigourney",image:s_,schedule:"2nd & 3rd Wednesday monthly",time:"8:00 AM AEDT",frequency:"2à monthly"},{title:"Parasympathetic Breathwork",subtitle:"with Gem Jordan",image:i_,schedule:"4th Monday monthly",time:"7:30 AM AEDT",frequency:"1à monthly"},{title:"Sensual Yin Yoga",subtitle:"with Gem Jordan",image:o_,schedule:"2nd Monday monthly",time:"7:30 AM AEDT",frequency:"1à monthly"}],DB=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-50px"});return i.jsx("section",{id:"classes",className:"py-24 md:py-32 bg-card",children:i.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-12",ref:e,children:[i.jsxs($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8},className:"mb-16",children:[i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mb-4",children:"Explore"}),i.jsxs("h2",{className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground",children:["Our ",i.jsx("em",{className:"italic",children:"Classes"})]}),i.jsx("p",{className:"font-body text-base text-muted-foreground mt-4 max-w-xl",children:"Join us â we have an international audience and cater for multiple global timezones. All times in AEDT (Melbourne / Sydney)."})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 lg:gap-8",children:IB.map((n,r)=>i.jsx($.div,{initial:{opacity:0,y:40},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2+r*.15},className:"group",children:i.jsxs(xe,{to:"/portal-to-self",className:"cursor-pointer",children:[i.jsxs("div",{className:"relative overflow-hidden aspect-[4/5]",children:[i.jsx("img",{src:n.image,alt:n.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105",loading:"lazy",width:800,height:1e3}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
414/60 via-transparent to-transparent"}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6",children:i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-xl md:text-2xl text-primary-foreground",children:n.title}),i.jsx("p",{className:"font-body text-sm text-primary-foreground/70 mt-1",children:n.subtitle})]}),i.jsx("div",{className:"w-10 h-10 border border-primary-foreground/40 flex items-center justify-center text-primary-foreground group-hover:bg-primary-foreground group-hover:text-foreground transition-all duration-300",children:i.jsx(_s,{size:18})})]})})]}),i.jsxs("div",{className:"pt-4 space-y-1",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent",children:n.frequency}),i.jsxs("p",{className:"font-body text-sm text-foreground",children:[n.schedule," · ",n.time]})]})]})},n.title))}),i.jsx("div",{className:"mt-16 overflow-hidden border-y border-border py-5",children:i.jsx("div",{className:"flex animate-marquee whitespace-nowrap",children:Array.from({length:8}).map((n,r)=>i.jsx("span",{className:"font-display text-2xl md:text-3xl text-muted-foreground/40 mx-8 uppercase tracking-wider",children:"Explore Our Classes â¢"},r))})}),i.jsx($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.6},className:"mt-10 text-center",children:i.jsxs(xe,{to:"/portal-to-self",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Join Our Classes",i.jsx(ue,{size:16})]})})]})})},LB="/assets/harpers-bazaar-logo-TtzEchl4.png",$B=1,FB="2a5358d6-61ee-4a8e-bb14-af6ab92d4f3f",BB="d7020298-ee16-4fdb-b15b-52fc559115b1",UB="/__l5e/assets-v1/2a5358d6-61ee-4a8e-bb14-af6ab92d4f3f/SM_Art_1.webp",zB="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/2a5358d6-61ee-4a8e-bb14-af6ab92d4f3f/SM_Art_1.webp",VB="SM_Art_1.webp",WB=306928,HB="image/webp",qB="2026-09-03T03:46:07Z",KB={version:$B,asset_id:FB,project_id:BB,url:UB,r2_key:zB,original_filename:VB,size:WB,content_type:HB,created_at:qB},GB=[{quote:"This groundbreaking system has empowered tens of thousands of practitioners worldwide, seamlessly integrating ancient wisdom with modern energetics",source:"Harper's Bazaar Australia",logo:LB,href:"https://harpersbazaar.com.au/sigourney-belle-the-powerhouse-behind-high-level-visionaries-and-conscious-leadership/?utm_medium=social&utm_source=linktree&utm_campaign=harpers+bazaar+feature"},{quote:"Sigourney's journey is about more than just innovating; it's about showing the good things that come from changing the rules.",source:"New York Weekly",href:"https://nyweekly.com/lifestyle/bridging-science-and-spirituality-for-global-wellness-the-somamystica-saga-with-sigourney-belle-weldon/?utm_medium=social&utm_source=linktree&utm_campaign=new+york+weekly+feature+for+soma+mystica%C2%AE"}],YB=({data:e})=>{const t=x.useRef(null),n=kt(t,{once:!0,margin:"-100px"}),r=i.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",ref:t,children:[e.logo&&i.jsx($.div,{initial:{opacity:0,y:-10},animate:n?{opacity:1,y:0}:{},transition:{duration:.8},className:"flex justify-center mb-8",children:i.jsx("img",{src:e.logo,alt:e.source,className:"h-10 md:h-14 w-auto object-contain"})}),i.jsxs($.blockquote,{initial:{opacity:0,y:30},animate:n?{opacity:1,y:0}:{},transition:{duration:1},className:"font-display text-2xl md:text-3xl lg:text-4xl text-foreground leading-relaxed italic",children:['"',e.quote,'"']}),i.jsxs($.p,{initial:{opacity:0}
414,animate:n?{opacity:1}:{},transition:{duration:.8,delay:.5},className:"font-body text-sm tracking-widest uppercase text-accent mt-8",children:["â ",e.source]})]});return e.href?i.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"block py-20 md:py-28 border-b border-border hover:bg-muted/30 transition-colors",children:r}):i.jsx("div",{className:"py-20 md:py-28 border-b border-border",children:r})},qy=()=>i.jsxs("div",{className:"relative border-t border-border overflow-hidden",children:[i.jsx("img",{src:KB.url,alt:"","aria-hidden":"true",loading:"lazy",className:"pointer-events-none absolute inset-x-0 top-0 w-full h-full object-cover opacity-60"}),i.jsx("div",{className:"absolute inset-0 bg-background/55","aria-hidden":"true"}),i.jsx("div",{className:"relative z-10",children:GB.map(e=>i.jsx(YB,{data:e},e.source))})]}),JB=1,QB="26e95955-1eb6-4ba9-8ab5-35e96f14be2c",XB="d7020298-ee16-4fdb-b15b-52fc559115b1",ZB="/__l5e/assets-v1/26e95955-1eb6-4ba9-8ab5-35e96f14be2c/planetary-health-lab-logo.jpg",eU="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/26e95955-1eb6-4ba9-8ab5-35e96f14be2c/planetary-health-lab-logo.jpg",tU="planetary-health-lab-logo.jpg",nU=50490,rU="image/jpeg",sU="2026-07-29T23:32:15Z",iU={version:JB,asset_id:QB,project_id:XB,url:ZB,r2_key:eU,original_filename:tU,size:nU,content_type:rU,created_at:sU},oU=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"});return i.jsx("section",{ref:e,className:"py-20 md:py-28 border-b border-border",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8},className:"font-body text-sm tracking-widest uppercase text-accent mb-10",children:"In Partnership With"}),i.jsxs($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.9,delay:.15},className:"flex flex-col items-center gap-8",children:[i.jsx("div",{className:"bg-foreground px-10 py-8 rounded-sm",children:i.jsx("img",{src:iU.url,alt:"Planetary Health Lab logo â partner of Soma Mystica®",loading:"lazy",className:"h-14 md:h-16 w-auto object-contain"})}),i.jsxs("h2",{className:"font-display text-2xl md:text-3xl text-foreground leading-relaxed",children:["Planetary Health Lab",i.jsx("span",{className:"block font-body text-base md:text-lg text-muted-foreground mt-3",children:"& the Oxford Department of Human Flourishing"})]})]})]})})},aU="/assets/trainings-DzcZibyu.jpg",Bp="/assets/temple-farmhouse-aerial-BcV7xizP.jpg",Ky="/assets/accredited-iict-vfRyEZTt.png",Gy="/assets/accredited-iphm-mvap0Gbd.png",lU=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"});return i.jsx("section",{id:"trainings",className:"py-24 md:py-32",children:i.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-12",ref:e,children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center",children:[i.jsx($.div,{initial:{opacity:0,x:-40},animate:t?{opacity:1,x:0}:{},transition:{duration:.8},className:"overflow-hidden",children:i.jsx("img",{src:aU,alt:"Practitioners in a Soma Mystica® certification training, working hands-on in pairs",className:"w-full h-[500px] lg:h-[600px] object-cover",loading:"lazy",width:1200,height:800})}),i.jsxs($.div,{initial:{opacity:0,x:40},animate:t?{opacity:1,x:0}:{},transition:{duration:.8,delay:.2},children:[i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mb-4",children:"Practitioner Trainings"}),i.jsxs("h2",{className:"font-display text-3xl md:text-4xl lg:text-5xl text-foreground leading-tight",children:["Join one of our",i.jsx("br",{}),i.jsx("em",{className:"italic",children:"Globally Accredited"}),i.jsx("br",{}),"Training Programs"]}),i.jsx("p",{className:"font-body text-base md:text-lg text-muted-foreground mt-6 leading-relaxed",children:"A Globally Renowned Teaching Faculty including Naturopathic and Traditional Chinese Medicine Doctors, Psychologists, Psychotherapists, Somatic Therapists, Physiotherapists, Dance Teachers, and Meditation Teachers."}),i.jsx("div",{className:"mt-8 space-y-4",children:[{name:"Spinal Attunement",path:"/trainings/spinal-attunement"},{name:"The Self Holding Method",path:"/trainings/self-holding-method"},{name:"Parasympathetic Breathwork",path:"/trainings/parasympathetic-breathwork"}].map(n=>i.jsxs(xe,{to:n.path,className:"flex items-center gap-4 border-b border-border pb-4 group hover:border-accent transition-colors",children:[i.jsx("span",{className:"w-2 h-2 rounded-full bg-accent"}),i.jsx("span",{className:"font-body text-base text-foreground group-hover:text-accent transition-colors",children:n.name}),i.jsx(ue,{size:14,className:"ml-auto text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]},n.name))}),i.jsxs(xe,{to:"/byron-bay-training",className:"mt-8 block border border-accent/40 bg-accent/10 group hover:bg-accent/20 transition-colors overflow-hidden",children:[i.jsx("img",{src:Bp,alt:"Aerial view of Temple Farmhouse, Byron Bay â venue for the Spinal Attunement live intensive",className:"w-full h-44 object-cover",loading:"lazy"}),i.jsxs("div",{className:"px-6 py-5",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent",children:"Live Intensive · 12 spaces only"}),i.jsx("p",{className:"font-display text-xl text-foreground mt-1",children:"Spinal Attunement Byron Bay â March 4â8, 2027"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-1",children:"Temple Farmhouse with Sigourney Belle · Super Early Bird 15% off until 1 November"}),i.jsxs("span",{className:"mt-3 inline-flex items-center gap-2 font-body text-sm text-accent group-hover:text-foreground transition-colors",children:["Discover the intensive ",i.jsx(ue,{size:14})]})]})]}),i.jsxs("a",{href:"https://spinalattunement.com/",target:"_blank",rel:"noopener noreferrer",className:"mt-6 inline-flex items-center gap-2 font-body text-sm tracking-wide text-accent hover:text-foreground transition-colors",children:["Visit the Spinal Attunement website",i.jsx(ue,{size:14})]}),i.jsxs("div",{className:"mt-8 flex items-center gap-6",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Accredited by"}),i.jsx("img",{src:Ky,alt:"International Institute for Complementary Therapists (IICT) accreditation badge",className:"h-16",style:{filter:"brightness(0) sepia(1) invert(1) sepia(1) saturate(3) hue-rotate(346deg) brightness(0.15)"},loading:"lazy"}),i.jsx("img",{src:Gy,alt:"International Practitioners of Holistic Medicine (IPHM) accreditation badge",className:"h-16",style:{filter:"brightness(0) sepia(1) invert(1) sepia(1) saturate(3) hue-rotate(346deg) brightness(0.15)"},loading:"lazy"})]}),i.jsxs("a",{href:"https://portal.somamystica.com/soma-mystica-application-new-programs",target:"_blank",rel:"noopener noreferrer",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})]})})})},Ta=[{quote:"My chronic pain that I've had for the past five months is gone. Soma Mystica gives you realness, rawness & depth.",author:"Kaja",role:"Spinal Attunement Practitioner"},{quote:"This was the most powerful in-person training I've experienced. Sigourney's softness and loving nature emanates to those around her. It was truly a magical four days.",author:"Carrie Eckert",role:"USA"},{quote:"Having a framework to locate the point of tension that will unravel the whole system is so profoundly powerful. I am deeply in love with this modality.",author:"Christina Rankh",role:"Australia"},{quote:"Not only has my own knowledge become more embodied, but my clients are having mind boggling results. The world needs more of us!",author:"Juliette Karaman",role:"The Scrumptious Woman Podcast"}],cU=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"}
414),[n,r]=x.useState(0),s=()=>r(l=>(l+1)%Ta.length),o=()=>r(l=>(l-1+Ta.length)%Ta.length),a=Ta[n];return i.jsx("section",{className:"py-24 md:py-32 bg-card",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",ref:e,children:[i.jsx($.p,{initial:{opacity:0},animate:t?{opacity:1}:{},className:"font-body text-sm tracking-widest uppercase text-accent mb-8",children:"Testimonials"}),i.jsxs($.div,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"min-h-[280px] flex flex-col items-center justify-center",children:[i.jsxs($.blockquote,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},className:"font-display text-xl md:text-2xl lg:text-3xl text-foreground leading-relaxed italic",children:['"',a.quote,'"']},n),i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-muted-foreground mt-8",children:a.author}),i.jsx("p",{className:"font-body text-xs text-muted-foreground/60 mt-1",children:a.role})]}),i.jsxs("div",{className:"flex items-center justify-center gap-4 mt-8",children:[i.jsx("button",{onClick:o,className:"w-12 h-12 border border-border flex items-center justify-center text-muted-foreground hover:text-foreground hover:border-foreground transition-all","aria-label":"Previous testimonial",children:i.jsx(ty,{size:18})}),i.jsxs("span",{className:"font-body text-xs text-muted-foreground tracking-widest",children:[n+1," / ",Ta.length]}),i.jsx("button",{onClick:s,className:"w-12 h-12 border border-border flex items-center justify-center text-muted-foreground hover:text-foreground hover:border-foreground transition-all","aria-label":"Next testimonial",children:i.jsx(Uu,{size:18})})]})]})})},dU="/assets/membership-bg-3UlNr7sb.jpg",uU=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"});return i.jsxs("section",{id:"membership",className:"relative py-24 md:py-32 overflow-hidden",children:[i.jsx("img",{src:dU,alt:"Members practising guided breathwork in a calm studio setting",className:"absolute inset-0 w-full h-full object-cover opacity-40",loading:"lazy"}),i.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6 text-center",ref:e,children:[i.jsx($.p,{initial:{opacity:0}
414,animate:t?{opacity:1}:{},className:"font-body text-sm tracking-widest uppercase text-accent mb-6",children:"Membership"}),i.jsxs($.h2,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"font-display text-3xl md:text-5xl lg:text-6xl text-foreground leading-tight",children:["Join ",i.jsx("em",{className:"italic",children:"Portal to Self"})]}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.4},className:"font-body text-lg text-muted-foreground mt-6 max-w-xl mx-auto",children:"Our somatic energy clinic membership. 4 live classes per month with a full replay portal available."}),i.jsx($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.6},className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:[{label:"Live Classes",value:"4x/month"},{label:"Replay Portal",value:"Unlimited"},{label:"Community",value:"Global"}].map(n=>i.jsxs("div",{className:"border border-foreground p-8 text-center",children:[i.jsx("p",{className:"font-display text-2xl text-foreground",children:n.value}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-2 tracking-wide uppercase",children:n.label})]},n.label))}),i.jsx($.div,{initial:{opacity:0}
414,animate:t?{opacity:1}:{},transition:{duration:.8,delay:.8},children:i.jsxs(xe,{to:"/portal-to-self",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Join the Membership",i.jsx(ue,{size:16})]})})]})]})},Yy="/assets/carly-rae-jBZTc7oM.jpg",Jy="/assets/richmond-heath-Cr1gvJbp.jpg",Qy="/assets/brittney-laidlaw-J8UcD2X-.jpg",hU=1,fU="b4ed31ce-b070-4f36-ac40-e900c8554208",mU="d7020298-ee16-4fdb-b15b-52fc559115b1",pU="/__l5e/assets-v1/b4ed31ce-b070-4f36-ac40-e900c8554208/commanding-sigourney.png",gU="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/b4ed31ce-b070-4f36-ac40-e900c8554208/commanding-sigourney.png",yU="commanding-sigourney.png",xU=1124463,vU="image/png",bU="2026-08-05T06:41:01Z",sh={version:hU,asset_id:fU,project_id:mU,url:pU,r2_key:gU,original_filename:yU,size:xU,content_type:vU,created_at:bU},wU=sh.url,jU=[{title:"Commanding the Room: The Energetics of Space Holding",presenter:"Sigourney Belle Weldon",imageUrl:wU,bio:"A 30-minute masterclass on the first practice of holding a room so completely that people leave changed â and letting your reputation do the rest."},{title:"Female Pelvic Anatomy",presenter:"Carly Rae",imageUrl:Yy,bio:"Carly Rae specialises in female biology and hands-on pelvic work â a guide into the depths of the female terrain, anatomy, and physiology."},{title:"TRE â Tremor Release Exercises",presenter:"Richmond Heath",imageUrl:Jy,bio:"Richmond Heath is a pioneering somatic trauma educator, Physiotherapist, and the founder of TRE Australia."},{title:"Ecosomatics",presenter:"Brittney Laidlaw",imageUrl:Qy,bio:"Brittany Jane Laidlaw is a Somatic Ecologist, Dancer and Eco-Philosopher with over 11 years of experience in embodied, nature-connection programs."}],kU=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"});return i.jsx("section",{id:"masterclass-library",className:"py-24 md:py-32 border-t border-border",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 text-center",ref:e,children:[i.jsx($.p,{initial:{opacity:0}
414,animate:t?{opacity:1}:{},className:"font-body text-sm tracking-widest uppercase text-accent mb-6",children:"Learn at Your Own Pace"}),i.jsxs($.h2,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"font-display text-3xl md:text-5xl lg:text-6xl text-foreground leading-tight",children:["Masterclass ",i.jsx("em",{className:"italic",children:"Library"})]}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.4},className:"font-body text-lg text-muted-foreground mt-6 max-w-xl mx-auto",children:"Deep-dive recordings from leading practitioners in somatics, breathwork, and holistic health â available on demand."}),i.jsx($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.6},className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:jU.map(n=>i.jsxs("div",{className:"border border-border p-8 text-center flex flex-col items-center",children:[n.imageUrl&&i.jsx("img",{src:n.imageUrl,alt:n.presenter,className:"w-20 h-20 rounded-full object-cover mb-4 border border-border",loading:"lazy"}),i.jsx("p",{className:"font-display text-lg text-foreground",children:n.title}),i.jsxs("p",{className:"font-body text-sm text-muted-foreground mt-2 tracking-wide",children:["with ",n.presenter]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground/80 mt-3 leading-relaxed",children:n.bio})]},n.title))}),i.jsx($.div,{initial:{opacity:0}
414,animate:t?{opacity:1}:{},transition:{duration:.8,delay:.8},children:i.jsxs(xe,{to:"/masterclass-library",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Explore All Masterclasses",i.jsx(ue,{size:16})]})})]})})},SU=sh.url,NU="https://portal.somamystica.com/offers/f4TkuRKy",_U=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-80px"});return i.jsx("section",{id:"commanding-the-room-feature",className:"py-24 md:py-32 border-t border-border bg-secondary/30",children:i.jsx("div",{className:"max-w-6xl mx-auto px-6",ref:e,children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[i.jsx($.div,{initial:{opacity:0,x:-30},animate:t?{opacity:1,x:0}:{},transition:{duration:.8},className:"order-2 lg:order-1",children:i.jsx("div",{className:"relative w-full bg-foreground/5 mx-auto",style:{maxWidth:"360px",aspectRatio:"9 / 16"},children:i.jsx("iframe",{src:"https://player.vimeo.com/video/1217930726?h=091a96630c&badge=0&autopause=0&player_id=0&app_id=58479",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share",referrerPolicy:"strict-origin-when-cross-origin",title:"Commanding the Room: The Energetics of Space Holding with Sigourney Belle",className:"absolute inset-0 w-full h-full"})})}),i.jsxs($.div,{initial:{opacity:0,x:30},animate:t?{opacity:1,x:0}:{},transition:{duration:.8,delay:.15},className:"order-1 lg:order-2",children:[i.jsx("p",{className:"font-body text-xs md:text-sm tracking-[0.25em] uppercase text-accent mb-5",children:"Featured Masterclass · 30 Minutes"}),i.jsxs("h2",{className:"font-display text-3xl md:text-5xl text-foreground leading-tight mb-3",children:["Commanding the ",i.jsx("em",{className:"italic",children:"Room"})]}),i.jsx("p",{className:"font-display text-lg md:text-2xl text-muted-foreground mb-6",children:"The Energetics of Space Holding"}),i.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[i.jsx("img",{src:SU,alt:"Sigourney Belle Weldon, founder of Soma Mystica®",className:"w-14 h-14 rounded-full object-cover border border-border",loading:"lazy"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-display text-base text-foreground",children:"Sigourney Belle Weldon"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Founder of Soma Mystica®"})]})]}),i.jsx("p",{className:"font-body text-base md:text-lg text-muted-foreground leading-relaxed mb-8",children:"A 30-minute masterclass with Sigourney Belle Weldon on the first practice of holding a room so completely that people leave changed â and letting your reputation do the rest."}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[i.jsxs("a",{href:NU,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-3 font-body text-sm tracking-widest uppercase bg-foreground text-background px-8 py-4 hover:bg-foreground
414/85 transition-all duration-500",children:["Enrol Now â $22 USD",i.jsx(ue,{size:16})]}),i.jsxs(xe,{to:"/commanding-the-room",className:"inline-flex items-center justify-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Learn about Commanding the Room",i.jsx(ue,{size:16})]})]}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground/60 mt-4",children:"Watch anytime · Lifetime access"})]})]})})})},CU=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-100px"}),[n,r]=x.useState(""),[s,o]=x.useState(""),[a,l]=x.useState(!1),[c,d]=x.useState(!1),u=async h=>{h.preventDefault(),d(!0);try{await fetch("https://hooks.zapier.com/hooks/catch/15713088/unsbcil/",{method:"POST",headers:{"Content-Type":"application/json"},mode:"no-cors",body:JSON.stringify({name:n,email:s,timestamp:new Date().toISOString()})}),l(!0)}catch(f){console.error("Newsletter signup error:",f)}finally{d(!1)}};return i.jsx("section",{id:"newsletter",className:"py-24 md:py-32 bg-foreground",children:i.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",ref:e,children:[i.jsxs($.h2,{initial:{opacity:0,y:30},animate:t?{opacity:1,y:0}:{},transition:{duration:.8},className:"font-display text-3xl md:text-5xl text-primary-foreground",children:["Stay in the ",i.jsx("em",{className:"italic",children:"Loop"})]}),i.jsx($.p,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.2},className:"font-body text-base text-primary-foreground/60 mt-4",children:"Join our newsletter and be the first to receive new training opportunities and program releases."}),i.jsx($.form,{onSubmit:u,initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.8,delay:.4},className:"mt-10 flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:a?i.jsx("p",{className:"font-body text-sm text-primary-foreground/80 tracking-wide",children:"Thank you for subscribing â¦"}):i.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[i.jsx("input",{type:"text",value:n,onChange:h=>r(h.target.value),placeholder:"Your name",required:!0,className:"w-full bg-transparent border border-primary-foreground/30 px-5 py-3.5 text-primary-foreground placeholder:text-primary-foreground/30 font-body text-sm focus:outline-none focus:border-primary-foreground/60 transition-colors"}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[i.jsx("input",{type:"email",value:s,onChange:h=>o(h.target.value),placeholder:"Your email address",required:!0,className:"flex-1 bg-transparent border border-primary-foreground/30 px-5 py-3.5 text-primary-foreground placeholder:text-primary-foreground/30 font-body text-sm focus:outline-none focus:border-primary-foreground/60 transition-colors"}),i.jsx("button",{type:"submit",disabled:c,className:"px-8 py-3.5 bg-primary-foreground text-foreground font-body text-sm tracking-widest uppercase hover:bg-primary-foreground/90 transition-colors disabled:opacity-50",children:c?"Sending...":"Subscribe"})]})]})}),i.jsxs("div",{className:"mt-16 flex items-center justify-center gap-8 opacity-40",children:[i.jsx("img",{src:Ky,alt:"IICT Accredited",className:"h-14 md:h-16 brightness-0 invert",loading:"lazy"}),i.jsx("img",{src:Gy,alt:"IPHM Accredited",className:"h-14 md:h-16 brightness-0 invert",loading:"lazy"})]})]})})},nt=()=>i.jsx("footer",{className:"py-16 border-t border-border",children:i.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-12",children:[i.jsxs("div",{className:"mb-12 pb-10 border-b border-border",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-3",children:"Acknowledgement of Country"}),i.jsx("p",{className:"font-body text-sm text-foreground/60 leading-relaxed max-w-3xl",children:"Soma Mystica® acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present."})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-10",children:[i.jsxs("div",{className:"md:col-span-2",children:[i.jsx("img",{src:Cr,alt:"Soma Mystica",className:"h-14 w-auto brightness-[0.3]"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-3 max-w-sm leading-relaxed",children:"Therapy for the whole self. Combining Somatics, Energetics, and Psychotherapy to heal the unconscious trauma stored in your nervous system."})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-4",children:"Explore"}),i.jsx("ul",{className:"space-y-3",children:["Classes","Trainings","Membership","Masterclass Library"].map(e=>i.jsx("li",{children:i.jsx("a",{href:`#${e.toLowerCase().replace(/\s+/g,"-")}
414`,className:"font-body text-sm text-foreground/70 hover:text-foreground transition-colors",children:e})},e))})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-4",children:"Connect"}),i.jsx("ul",{className:"space-y-3",children:[{label:"Instagram",url:"https://www.instagram.com/somamystica"},{label:"Website",url:"https://www.somamystica.com"}].map(e=>i.jsx("li",{children:i.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"font-body text-sm text-foreground/70 hover:text-foreground transition-colors",children:e.label})},e.label))})]})]}),i.jsxs("div",{className:"mt-16 pt-8 border-t border-border flex flex-col md:flex-row items-center justify-between gap-4",children:[i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:["© ",new Date().getFullYear()," Soma Mystica®. All rights reserved."]}),i.jsxs("div",{className:"flex items-center gap-6",children:[i.jsx(xe,{to:"/medical-disclaimer",className:"font-body text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Medical Disclaimer"}),i.jsx(xe,{to:"/privacy-policy",className:"font-body text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Privacy Policy"}),i.jsx(xe,{to:"/terms-and-conditions",className:"font-body text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Terms & Conditions"})]})]})]})}),sw="https://somamystica.com",$t=({title:e,description:t,path:n,noindex:r,image:s})=>{const o=`${sw}${n}`,a=s??`${sw}/og-image.png`;return i.jsxs(kP,{children:[i.jsx("title",{children:e}),i.jsx("meta",{name:"description",content:t}),i.jsx("link",{rel:"canonical",href:o}),r&&i.jsx("meta",{name:"robots",content:"noindex, nofollow"}),i.jsx("meta",{property:"og:type",content:"website"}),i.jsx("meta",{property:"og:title",content:e}),i.jsx("meta",{property:"og:description",content:t}),i.jsx("meta",{property:"og:url",content:o}),i.jsx("meta",{property:"og:image",content:a}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:e}),i.jsx("meta",{name:"twitter:description",content:t}),i.jsx("meta",{name:"twitter:image",content:a})]})},TU=()=>i.jsxs("div",{className:"min-h-screen",children:[i.jsx($t,{title:"Soma Mystica® â Neuroscience, Somatics & Energetics Training",description:"Rooted in science. Alive in the body. A global training school teaching the intersection of neuroscience, somatics and energetics.",path:"/"}),i.jsx(Ke,{}),i.jsx(IF,{}),i.jsx(rB,{}),i.jsx(OB,{}),i.jsx(DB,{}),i.jsx(qy,{}),i.jsx(oU,{}),i.jsx(lU,{}),i.jsx(cU,{}),i.jsx(uU,{}),i.jsx(_U,{}),i.jsx(kU,{}),i.jsx(CU,{}),i.jsx(nt,{})]}),EU=()=>i.jsxs("div",{className:"min-h-screen",children:[i.jsx($t,{title:"Medical Disclaimer â Soma Mystica®",description:"Important health and safety information about Soma Mystica® somatic and breathwork practices.",path:"/medical-disclaimer"}),i.jsx(Ke,{}),i.jsx("main",{className:"pt-32 pb-24 px-6 lg:px-12",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx(xe,{to:"/",className:"font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inline-block",children:"â Back to Home"}),i.jsx("h1",{className:"font-display text-4xl md:text-5xl text-foreground mb-4",children:"Medical Disclaimer"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-12",children:"Last updated: March 2026"}),i.jsxs("div",{className:"prose prose-stone max-w-none space-y-8",children:[i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"This disclaimer applies to this website & to the services provided by Soma Mystica® (The Rubra Sanctum Pty Ltd)"}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Intended Use of Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We provide information about the intersection of Spiritual and Medical illness/disease."}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"While we make every effort to make sure the information in this website is accurate and informative, the information does not take the place of professional or medical advice."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-2",children:"Do not use our information:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4",children:[i.jsx("li",{children:"to diagnose, treat, cure or prevent any disease"}),i.jsx("li",{children:"for therapeutic purposes"}),i.jsx("li",{children:"as a substitute for the advice of a health professional."})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mt-4",children:"We do not accept any liability for any injury, loss or damage caused by use of the information provided in our website."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mt-4",children:"The information may include the views or recommendations of third parties and does not necessarily reflect the views of Sigourney Belle or indicate a commitment to a particular course of action."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Quality of Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We make every effort to provide quality information in our website. However we do not provide any guarantees, and assume no legal liability or responsibility for the accuracy, currency or completeness of the information."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"You should obtain advice relevant to your particular circumstances from a relevant health professional."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Links to Other Websites"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"This website contains links to other websites. We provide these to help you find more information. The linked websites do not necessarily reflect:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4",children:[i.jsx("li",{children:"the views of Soma Mystica®"}),i.jsx("li",{children:"our commitment to a particular course of action."})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mt-4",children:"We are careful in selecting the websites we link to, but we are not responsible for and do not necessarily endorse their information. You need to make your own decisions about the accuracy, currency, and reliability of information in linked websites."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Contact"}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:["If you have any queries or concerns about our disclaimer, please contact us:"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:text-foreground transition-colors underline",children:"[email protected]"})]})]})]})]})}),i.jsx(nt,{})]}),PU=[{number:"01",title:"Log In to Your Account",description:"Visit the Practitioner Login page and sign in with the credentials provided to you by Soma Mystica®. If you haven't received your login details, please contact [email protected]."},{number:"02",title:"Complete Your Basic Information",description:"Fill in your full name, email address, city, and country. Phone number is optional. This information helps clients find and contact you."},{number:"03",title:"Upload a Professional Photo",description:"Upload a clear, professional headshot. Choose a well-lit photo with a simple background. This is the first impression clients will have of you."},{number:"04",title:"Write Your Bio",description:"Craft a compelling bio that tells your story. Share your journey with somatic healing, your areas of expertise, and what clients can expect from working with you. Keep it authentic and warm."},{number:"05",title:"Select Your Modalities",description:"Choose the modalities you are certified to practise. Options include Spinal Attunement, Parasympathetic Breathwork, Embodied Processing, Energetic Integration, Somatic Meditation, and Nervous System Regulation."}
414,{number:"06",title:"Choose Your Session Type",description:"Indicate whether you offer sessions online, in person, or both. This is displayed on your directory listing so clients can see at a glance how you work."},{number:"07",title:"Select Your Role",description:"Select your professional role within the Soma Mystica® network. Options include Practitioner or Head Trainer. Your role is displayed on your public directory listing and determines your placement in the directory hierarchy."},{number:"08",title:"Set Your Availability & Pricing",description:"Let clients know when you're available and your session pricing. Be specific â for example: 'MondayâFriday, 9amâ5pm AEST' and '$150 per 60-minute session'."},{number:"09",title:"Connect Stripe for Payments",description:"Set up your Stripe account to accept payments directly through your profile. Click 'Set Up Stripe' in your dashboard and follow the prompts. Once complete, clients can book and pay seamlessly."},{number:"10",title:"Connect Your External Calendar (Calendly / Acuity)",description:"To prevent double-bookings, connect your external scheduling calendar. In your dashboard under the Availability tab, add your Calendly URL and API Token, or your Acuity Scheduling URL, User ID, and API Key. This information is used strictly for backend availability cross-checking and is never displayed on your public profile. The booking system will automatically check your external calendar for conflicts before allowing a client to book, ensuring no time-slot overlaps. Your admin can also configure these settings on your behalf."},{number:"11",title:"Submit for Approval",description:"Once your profile is complete, it will be submitted for review. The Soma Mystica® team will approve your listing, and you'll appear in the Practitioner Directory."}],AU=["Use a warm, professional tone in your bio â write as if you're speaking directly to a potential client.","Keep your availability and pricing up to date to avoid confusion.","Connect your Calendly or Acuity calendar to prevent double-bookings with your external schedule.","If you use Calendly, add your Calendly profile URL (e.g., calendly.com/yourname) in your dashboard settings.","If you use Acuity Scheduling, add your Acuity URL in your dashboard settings.","Include your Instagram or website so clients can learn more about you.","Respond to client reviews to build engagement and trust."],RU=()=>i.jsxs("div",{className:"min-h-screen",children:[i.jsx($t,{title:"Practitioner Guide â Soma Mystica®",description:"The complete guide for Soma Mystica® practitioners: profiles, bookings, session notes and payments.",path:"/practitioner-guide"}),i.jsx(Ke,{}),i.jsx("main",{className:"pt-32 pb-24 px-6 lg:px-12",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx(xe,{to:"/",className:"font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inline-block",children:"â Back to Home"}),i.jsx("h1",{className:"font-display text-4xl md:text-5xl text-foreground mb-4",children:"Practitioner Profile Guide"}),i.jsx("p",{className:"font-body text-lg text-muted-foreground mb-16 max-w-2xl",children:"A step-by-step guide to setting up your practitioner profile on the Soma Mystica® directory."}),i.jsx("div",{className:"space-y-12 mb-20",children:PU.map(e=>i.jsxs("div",{className:"flex gap-6",children:[i.jsx("span",{className:"font-display text-3xl text-accent/40 shrink-0 w-12",children:e.number}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-xl text-foreground mb-2",children:e.title}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:e.description})]})]},e.number))}),i.jsxs("div",{className:"border-t border-border pt-12 mb-12",children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-6",children:"Payment Terms"}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed mb-4",children:"All session payments made through the Soma Mystica® platform are processed via Stripe Connect using a split-payment model:"}),i.jsxs("ul",{className:"space-y-3 mb-6",children:[i.jsxs("li",{className:"flex gap-3",children:[i.jsx("span",{className:"text-accent shrink-0 mt-1",children:"â¢"}
414),i.jsxs("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:[i.jsx("strong",{className:"text-foreground",children:"80%"})," of each payment is deposited directly into your connected Stripe account."]})]}),i.jsxs("li",{className:"flex gap-3",children:[i.jsx("span",{className:"text-accent shrink-0 mt-1",children:"â¢"}),i.jsxs("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:[i.jsx("strong",{className:"text-foreground",children:"20%"})," is retained by Soma Mystica® as a platform commission."]})]})]}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:"Payments are processed automatically at the time of booking. Stripe processing fees are deducted separately by Stripe from the total transaction amount."})]}),i.jsxs("div",{className:"border-t border-border pt-12 mb-12",children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-6",children:"Refunds Policy"}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed mb-4",children:"As a practitioner on the Soma Mystica® platform, you are responsible for managing your own refund and cancellation policy with your clients. Please ensure your clients are aware of your individual terms before booking."}),i.jsxs("ul",{className:"space-y-3 mb-6",children:[i.jsxs("li",{className:"flex gap-3",children:[i.jsx("span",{className:"text-accent shrink-0 mt-1",children:"â¢"}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:"Clients who wish to request a refund must contact their practitioner directly."})]}),i.jsxs("li",{className:"flex gap-3",children:[i.jsx("span",{className:"text-accent shrink-0 mt-1",children:"â¢"}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:"Any refund issued is subject to the individual practitioner's refund policy and is limited to the practitioner's 80% portion of the payment."})]}),i.jsxs("li",{className:"flex gap-3",children:[i.jsx("span",{className:"text-accent shrink-0 mt-1",children:"â¢"}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:i.jsx("strong",{className:"text-foreground",children:"The 20% platform commission retained by Soma Mystica® is non-refundable under any circumstances."})})]})]}),i.jsxs("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:["We recommend clearly communicating your cancellation and refund terms to clients prior to their session. For full details, please refer to our"," ",i.jsx(xe,{to:"/terms",className:"text-accent hover:text-foreground transition-colors underline",children:"Terms & Conditions"}),"."]})]}),i.jsxs("div",{className:"border-t border-border pt-12",children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-6",children:"Tips for a Standout Profile"}),i.jsx("ul",{className:"space-y-4",children:AU.map((e,t)=>i.jsxs("li",{className:"flex gap-3",children:[i.jsx("span",{className:"text-accent shrink-0 mt-1",children:"â¢"}),i.jsx("p",{className:"font-body text-base text-foreground/70 leading-relaxed",children:e})]},t))})]}),i.jsx("div",{className:"mt-16 p-8 bg-secondary/30 border border-border",children:i.jsxs("p",{className:"font-body text-sm text-foreground/70 leading-relaxed",children:["Need help?"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:text-foreground transition-colors underline",children:"[email protected]"})]})})]})}),i.jsx(nt,{})]}),MU=()=>i.jsxs("div",{className:"min-h-screen",children:[i.jsx($t,{title:"Privacy Policy â Soma Mystica®",description:"How Soma Mystica® collects, uses and protects your personal information.",path:"/privacy-policy"}),i.jsx(Ke,{}),i.jsx("main",{className:"pt-32 pb-24 px-6 lg:px-12",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx(xe,{to:"/",className:"font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inline-block",children:"â Back to Home"}),i.jsx("h1",{className:"font-display text-4xl md:text-5xl text-foreground mb-2",children:"Privacy Policy"}),i.jsx("p",{className:"font-display text-xl italic text-foreground
414/60 mb-2",children:"Your Privacy"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-12",children:"Last updated: March 2026"}),i.jsxs("div",{className:"max-w-none space-y-10",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Introduction"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The following websites are owned and operated by RAPSEDI TRUST (ABN 63 891 834 306), our not-for-profit organisation that houses SOMA MYSTICA (business name)."}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:["Websites owned by Soma Mystica®: ",i.jsx("a",{href:"https://www.somamystica.com",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"www.somamystica.com"})]}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:["If you have any questions or need further information, please contact our admin team:"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:text-foreground transition-colors underline",children:"[email protected]"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"This document sets out our Privacy Policy. It describes how we collect and manage your personal information when you interact with our websites. We take our responsibility very seriously. If you have any questions or concerns about how your personal information is being handled, please do not hesitate to contact us."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We comply with the Australian Privacy Principles set out in the Privacy Act 1988 (Cth) (Privacy Act)."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Personal Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you engage with us via our websites, or choose to become our client, we may ask to collect the following kinds of personal information from you, including:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4",children:[i.jsx("li",{children:"your name, email address, phone number and postal address"}),i.jsx("li",{children:"the country that you live in"}),i.jsx("li",{children:"your opinion about future topics, products or services that may interest you"}),i.jsx("li",{children:"information that allows us to tailor our content to your needs when you sign up for one of our webinars or promotional events"}),i.jsx("li",{children:"with your consent, we may collect your IP address, and information about your browsing history to help us improve the usability and appeal of our websites"})]})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Collection and Use"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We may collect your personal information by various means including:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"an opt-in form for our mailing list"}),i.jsx("li",{children:"when you email us"}),i.jsx("li",{children:"automatically, through the use of cookies"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We use this information to:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"respond to your enquiries"}),i.jsx("li",{children:"provide you with relevant news and updates about our services"}),i.jsx("li",{children:"improve our websites and the services we provide"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We will only collect your personal information:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground
414/80 pl-4",children:[i.jsx("li",{children:"with your full awareness and consent, such as when you email us, tick a checkbox or fill in a form to provide us with information"}),i.jsx("li",{children:"if we need it to provide you with information or services that you request"}),i.jsx("li",{children:"for necessary administrative processes if you become our client"}),i.jsx("li",{children:"if we believe that we can demonstrate a legitimate interest in using your data for marketing purposes, although we will always give you a choice to opt out"})]})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Sensitive Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We understand that some personal information is particularly sensitive, and that you are trusting us to keep this information confidential."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We will only collect sensitive information by methods that are reasonably secure, such as:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"through our intake form when you apply to enrol in a program"}),i.jsx("li",{children:"in a zoom consultation or face to face"}),i.jsx("li",{children:"when you send us information in an email"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The reason why we collect this information is:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"so that we can provide you with the services you have contracted for"}),i.jsx("li",{children:"to ensure that we are providing you with the most appropriate services"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The sensitive information we ask you to provide for this purpose may include:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"your medical history and existing medical conditions"}),i.jsx("li",{children:"your next of kin"}),i.jsx("li",{children:"your birth date, and time and place of birth"}),i.jsx("li",{children:"information about your business"}),i.jsx("li",{children:"your astrological profile"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We are committed to securely storing and handling your sensitive information."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Only authorised team members may access sensitive material, and they have signed strict confidentiality agreements with us."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Some sensitive information may be stored securely online, or in the cloud through Google Drive, Kajabi platform and Typeform surveys."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We do not collect sensitive information from children under the age of 18."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"You may choose not to provide us with your sensitive information. However, if you choose not to be completely honest with us, we may not be able to provide you with the services that you request."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Disclosure of Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We may disclose your information to provide you with the services you have requested."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"In order to do this, we may share some relevant information â on a strictly need to know basis â with:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground
414/80 pl-4 mb-4",children:[i.jsx("li",{children:"our administrative team"}),i.jsx("li",{children:"subcontracted program facilitators"}),i.jsx("li",{children:"our email marketing provider"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We will also disclose your information if required by law to do so or in circumstances permitted by the Privacy Act â for example, where we have reasonable grounds to suspect that unlawful activity, or misconduct of a serious nature, that relates to our functions or activities has been, is being or may be engaged in, and in response to a subpoena, discovery request or a court order."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you have any concerns regarding the disclosure of your information in this context, please do not hesitate to get in touch with us to discuss this personally."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We will use all reasonable means to protect the confidentiality of your information while in our possession or control. We will not knowingly share any of your information with any third party other than the service providers who assist us in providing our services. To the extent that we do share your information with a service provider, we would only do so if that party has agreed to comply with our privacy standards or we are satisfied that the service provider has a suitably protective policy of their own. Some of our service providers may be overseas and may not be subject to Australian Privacy Laws. Please contact us if you have any concerns about the potential disclosure of your information."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Security"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We take reasonable physical, technical and administrative safeguards to protect your information from misuse, interference, loss, and unauthorised access, modification and disclosure."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We manage risks to your information by:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"storing information securely"}),i.jsx("li",{children:"ensuring that only key personnel have access to sensitive information"}),i.jsx("li",{children:"releasing information to service providers on a strictly need-to-know basis"}),i.jsx("li",{children:"conducting regular audits of our security systems"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"As mentioned above, your information may also be stored with a third-party provider, where it will be managed under their security policy:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4",children:[i.jsx("li",{children:i.jsx("a",{href:"https://www.facebook.com/business/m/privacy-and-data",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"Facebook Ads"})}),i.jsx("li",{children:i.jsx("a",{href:"https://storage.googleapis.com/gfw-touched-accounts-pdfs/google-cloud-security-and-compliance-whitepaper.pdf",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"GSuite"})}),i.jsx("li",{children:i.jsx("a",{href:"https://zoom.us/docs/en-us/privacy-and-security.html",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"Zoom"})}),i.jsx("li",{children:i.jsx("a",{href:"https://kajabi.com/policies/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"Kajabi"})}),i.jsx("li",{children:i.jsx("a",{href:"https://help.typeform.com/hc/en-us/articles/360029259552-Security-at-Typeform",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"Typeform"})})]})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Cookies and Google Analytics"}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Cookies are small text files that are commonly used by websites to improve a user's experience, collect statistics or marketing information and provide access to secure areas."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"You can choose to configure your browser settings not to accept cookies but this may interfere with the functioning of our website."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Our websites use cookies from Facebook, Kajabi, Youtube, and Squarespace."}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:["We use Google Analytics to collect information about your use of our website so that we can get strategic information about how our website is being used and improve its functionality. You can find out more about the information Google collects and how it is used here:"," ",i.jsx("a",{href:"https://support.google.com/analytics/answer/6004245",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"Google Analytics"}),"."]}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:["Google also provides an add-on for your browser that you can use to opt-out and prevent your data being used by Google Analytics. You can access that add-on here:"," ",i.jsx("a",{href:"https://tools.google.com/dlpage/gaoptout",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"Google Analytics Opt-out"}),"."]})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Access to Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"You can contact us to access, correct or update your personal information at any time. Unless we are subject to a confidentiality obligation or some other restriction on giving access to the information which permits us to refuse you access under the Privacy Act, and we believe there is a valid reason for doing so, we will endeavour to make your information available to you within 30 days."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Complaints"}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:["If a breach of this Privacy Policy occurs, or if you wish to request a change to your personal information, you may contact us by sending an email outlining your concerns to"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:text-foreground transition-colors underline",children:"[email protected]"}),"."]}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:["If you are not satisfied with our response to your complaint you may seek a review by contacting the Office of the Australian Information Commissioner using the information available at"," ",i.jsx("a",{href:"http://www.oaic.gov.au/privacy/privacy-complaints",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"oaic.gov.au"}),"."]})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Notification of Change"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"If we decide to change our Privacy Policy, we will post a copy of the revised policy on our websites."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Notification of Breach"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"If we have reason to suspect that a serious data breach has occurred and that this may result in harm or loss to you, we will immediately assess the situation and take appropriate remedial action. If we still believe that you are at risk, we will notify the Office of the Information Commissioner and either notify you directly, or if that is not possible, publicise a notification of the breach on this website."})]})]})]})}),i.jsx(nt,{})]}),OU=()=>i.jsxs("div",{className:"min-h-screen",children:[i.jsx($t,{title:"Terms & Conditions â Soma Mystica®",description:"The terms governing use of the Soma Mystica® website, trainings, bookings and memberships.",path:"/terms-and-conditions"}),i.jsx(Ke,{}),i.jsx("main",{className:"pt-32 pb-24 px-6 lg:px-12",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx(xe,{to:"/",className:"font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inl
414ine-block",children:"â Back to Home"}),i.jsx("h1",{className:"font-display text-4xl md:text-5xl text-foreground mb-2",children:"Terms & Conditions"}),i.jsx("p",{className:"font-display text-xl italic text-foreground/60 mb-2",children:"Terms & Conditions Policy"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-12",children:"Last updated: March 2026"}),i.jsxs("div",{className:"max-w-none space-y-10",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Introduction"}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:["Hi there! Welcome to the websites of"," ",i.jsx("a",{href:"https://www.somamystica.com",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"www.somamystica.com"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"This website is owned and operated by a not-for-profit organisation, RAPSEDI TRUST (ABN 63 891 834 306)."}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:["If you have any questions or need further information, please contact our admin team:"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:text-foreground transition-colors underline",children:"[email protected]"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"This document sets out the Terms and Conditions you need to be aware of when using this website or purchasing from us. Please take a moment to read it, as it contains important rights and obligations, and we care about making sure you know what to expect from working with us."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"When you visit this website, use our services or purchase our products you agree that you are over the age of 18 and willing to be bound by these Terms and Conditions. If you don't accept this agreement, you must not continue to visit this website or purchase from us."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"These terms may be changed or modified from time to time. Please check back regularly to ensure you are aware of any changes."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"There may be additional specific terms of service provided to you in relation to our services, products and courses. If there is any inconsistency between this document and those specific terms of service, this document is overruled to the extent of the inconsistency."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"All products and services advertised on this website are offered in compliance with Australian Consumer Law."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Website Content Disclaimer"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"On our websites you will find our podcast and ebooks sharing information about our business mystery school and spirituality. This information is provided solely for your education and personal development. Our desire in all our offerings is to help you land your personal vision and anchor in your personal frequency through intuitively guided, spiritual journeys for transformational awakening, based on our registered modalities, The Self Holding Method and Parasympathetic Pleasureâ¢. Our workshops and programs offer you access to ground-breaking revolutionary spiritual healing, teaching you to access your deep inner knowing and navigate from the essence of that space to find your individual path and to be of service in the world."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Content Policy"}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We take lots of care to provide valuable information, but we cannot be responsible for the use that you make of that information. There is no professional relationship formed by your visit to our website unless you explicitly choose to work with us by purchasing our services or products."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Any testimonials or promised results we may display on our websites are based on our experience and those of our previous clients. They are not guarantees that anyone else will achieve the same results."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"While we take all reasonable care to ensure that the information we provide is accurate, relevant and up-to-date, we make no guarantees in this regard and disclaim any legal liability for any inaccuracy, incompleteness or error. If you find something that seems problematic, it would be very helpful if you let us know!"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We may modify the content provided on our websites at any time, including altering or deleting it without notice."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Visitor Responsibilities"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"You take full responsibility for your implementation of any suggestions that we make on our websites or during our training programs. You understand that our advice is always limited to providing you with options for your consideration, and that you are solely responsible for any actions that you choose to take. Always consult your own values and vision, do your own research, and make informed choices about how to proceed. You agree to indemnify us against all consequences arising directly or indirectly from your choices."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"Our training and the information we provide on our websites is designed to help you connect with your own intuitive wisdom and access personal and spiritual healing. It is not a substitute for appropriately qualified medical or mental health advice."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Downloads"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"Where we offer files for download, we make every effort to ensure that they are safe. However, we are not responsible for viruses, other technologically harmful material or any other damage which might occur as a result of downloading material from our websites. It is your responsibility to take your cyber-safety seriously and maintain adequate and up to date internet security."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"External Links"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We may choose to display links to affiliated sites, and we may receive a benefit if you click on or purchase from these links. We select our affiliates carefully and believe them to be businesses that operate with integrity. However, we have no control over and are not responsible for the content of any external sites that may be linked, and we have no part in or responsibility for any transaction you choose to enter into with a third party after following an external link."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Disclaimer for Services and/or Products"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"There are a number of ways you may choose to work with us that are available to purchase through our websites, including exclusive memberships, deep mentoring, unique business branding and development services, and a wide range of training programs founded upon esoteric wisdom from different lineages â Tantra, Shamanism, Taoism, Astrology and more. Our facilitators work with their own ritual processes that have been tailored particularly to match the essence of the frequency of their unique body of work."}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The terms and conditions in this document apply to all of our services and products unless alternative terms are explicitly provided to you. If there is any inconsistency between this document and an agreement specifically provided to you, this document is overruled to the extent of the inconsistency."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"It is important to be aware that we work in flow and there is a fluidity to our teaching school. As a result, programs may change or evolve from their original descriptions to accommodate more expansive experiences. We are a mystery school and that means we pull through teachings that are alive in the moment, so the structure of how things are laid out in the training space is subject to change."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Our Qualifications and Responsibility"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The founder of SOMA MYSTICA® Sigourney Belle Weldon, holds the following qualifications:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsx("li",{children:"Bachelor of Science â Physiotherapy with Distinctions with additional study in the field of Neurology"}),i.jsx("li",{children:"Holistic Pelvic Care Practitioner (trained under Tami Lee Kent)"}),i.jsx("li",{children:"Maternal Medicine Training (Matriarch Training) â under Dr. Oscar Serralach"}),i.jsx("li",{children:"Acutonics Practitioner (completed Level One and Two)"}),i.jsx("li",{children:"Yoga Therapist & Yin Yoga Teacher"}),i.jsx("li",{children:"Certified Dry Needling Practitioner"}),i.jsx("li",{children:"Certified Reiki Practitioner"}),i.jsx("li",{children:"Access Bars Therapist"}),i.jsx("li",{children:"Certified Spiral Practitioner (Spiral School of Awakening)"}),i.jsx("li",{children:"Heart Touch Practitioner (Trained under Dr. Simon Martin)"}),i.jsx("li",{children:"Trained in Kundalini Tantra Bodywork + Practitioner with The Embodied School of Awakening (formerly Eliyah School)"}),i.jsx("li",{children:"Trained Meditation Teacher (Tibetan Buddhist Lineage + Sahajh Samahdhi)"}),i.jsx("li",{children:"Trained Death Doula â Preparing The Way, Helen Callaghan"}),i.jsx("li",{children:"Training in Tibetan Buddhist Tantric Teachings â studied the Lam Rim at Kopan Monastery under Lama Zopa Rinpoche"}),i.jsx("li",{children:"Additional Psychological Training in Trauma Informed Practice"}),i.jsx("li",{children:"Training under Judith Hill in Medical Astrology"}),i.jsx("li",{children:"Mentorship in Shamanism by private teachers"}),i.jsx("li",{children:"Trained in Astro-Herbalism with Sajah Popham"})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Sigourney also has experience in hospital systems throughout Australia and has worked with thousands of patients both in-patient, out-patient and rehab using trauma informed practice. She has over eight years' experience running a successful online spiritual-based business."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We undertake to deliver our content with integrity, be diligent, careful and competent, and to offer our services through appropriately qualified and skilled facilitators."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Our training programs are delivered by expert mentors and guides in the space of Somatics & Psychology. Our business and branding programs are delivered by a team of branding, design, marketing and business consulting specialists, all psychic seers, who have the ability to intuitively bring forth the embodiment of your brand. All our trainers and facilitators have completed intensive Mentorship with Sigourney. Only experienced practitioners are accepted into the Mentorship program, and they are all highly qualified in their individual fields."}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We will provide you with ongoing community support, maintaining a safe container for all our participants."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We promise to guide you to find your own answers. Where we feel that there is dependence on us to provide you with the answer, we will help you to connect to your own intuition and access your inner knowing, supporting you to have confidence in your own decision making."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Your Responsibility"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"As a participant in any of our training programs, you must be committed to doing the work, implementing the practices or integration tasks you are given. Please ensure you have completed any introductory content (available on the online training portal) before your training program commences."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"You agree to show up and be present for all training sessions, and you need to attend for the entirety of the session. We ask that you respect the integrity of the facilitator / participant relationship and maintain a professional level of behaviour. This is particularly important to us, given the deeply vulnerable and intimate work we are undertaking with you. Pursuing a personal relationship with one or more of our facilitators while you are a participant in one of our training programs is considered inappropriate behaviour and may result in us terminating your participation in any program you have enrolled in."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Important Information"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Our trainings are known for creating profound inner transformation, but we cannot guarantee this will happen for you. We encourage you to come into this program with a strong intention, as that helps to create your experience. However, it is important to realise that what you achieve depends on a wide range of factors unique to you which are beyond our knowledge and control."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"It is important that you maintain receptivity to advice and stay open to hearing uncomfortable truths. You will need to approach your participation in our training programs from a place of honesty and vulnerability, being authentic about your situation, willing to look at and admit to the narratives underlying your beliefs and actions."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Your results depend on your capacity to follow the expert advice we provide, including following recommendations around nervous system care and integration. If you are not willing to be more internal with the process and engage in self-care there is a chance that you may miss the results you might otherwise achieve."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We are committed to monitoring your safety. If we have genuine concerns about your psychological state, we reserve the right to follow up with next of kin in order to help you process whatever you are experiencing and transition back into a place of calm consciousness. However, this does not extend our duty of care towards you. We are not mental health professionals, and we may miss important signs. You are solely responsible for your own mental health and any adverse physical, mental or emotional reactions you experience as a result of your participation in the training."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"While Sigourney and some of our facilitators may have medical background or be trained in diagnostics, we do not offer any kind of diagnoses in our trainings. Nor do we provide any kind of legal or financial advice when assisting with your business development. It is y
414our responsibility to consult an appropriately qualified professional if you have questions or concerns that go beyond the scope of our services."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"You will know if you are guided to do this work. You will get the most out of working with us if you see yourself as a leader and teacher of the new paradigm, keen to create impact on the world, and if you are ready to put your own agenda to the side and trust in the medicine of the space in order to receive. This work may not be suitable for you if you are not willing to take responsibility for creating change, are not ready to transmute advice into action, have trouble respecting boundaries (fair warning â we take an uncompromising approach to boundary enforcement in order to maintain the safety of our work as sacred space holders), or are disrespectful of our work."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Waiver of Liability"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We do not make any guarantees or warranties about the accuracy of any material displayed on our websites, with the exception of any non-excludable consumer guarantees and other consumer protection provisions set out in the Australian Consumer Law. We are human and errors creep in despite the best of intentions. If you see something that doesn't seem right, please let us know."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"While we make all reasonable efforts to ensure that our services and products meet with the highest standards of best practice, if something does go wrong that is not a direct result of our negligence, misrepresentation or deliberate fault, you agree that, to the fullest extent permitted by law, we will not be liable for any damages whatsoever, including but without limitation to any direct, indirect, special, consequential, punitive or incidental damages, or damages for loss of use, profits, data or other intangibles, damage to goodwill or reputation, or the cost of procurement of substitute goods and services, arising out of or related to the use, inability to use, performance or failures of our websites, any products or services purchased through it, or any material posted on them, irrespective of whether such damages were foreseeable or arise in contract, tort, equity, restitution, by statute, at common law or otherwise."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Intellectual Property"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:"Copyright"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The content of our websites and in all our courses is protected by copyright laws and treaties around the world, with all rights reserved. You may not copy or reproduce any part of our content without our written consent. Commercial exploitation of our content in any way that competes with our business is strictly prohibited."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"You are welcome to share blog posts or other publicly available content through social media, but you must provide a link back to the website where you located the content."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-6",children:"You may link to our home pages, provided you do so in a way that is fair and legal and does not damage our reputation or take advantage of it, but you must not establish a link in such a way as to suggest any form of association, approval or endorsement on our part where none exists."}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:"Trade Marks"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We own the registered or unregistered trade marks, logos, and service marks displayed on our websites, including Soma Mystica®, Body Cosmology®, Depth Medicine®, EADEN® and Parasympathetic Pleasureâ¢."}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"These trade marks whether registered or unregistered, may not be used in connection with any other product or service without a licence, or in any way that is likely to cause confusion in the marketplace, or in any manner that disparages us or our business."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Payment Terms"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Prices for all our programs are listed on our websites, along with any available payment plans. When you enrol in a training program you wish to participate in, this creates your payment obligation. You may choose to pay the full price upfront or enter into a payment plan if one is offered. All payment plans are processed automatically by Stripe, as a direct debit from your nominated account. You must make your first payment at least 7 days before the training program is due to start."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you are signing onto a practitioner training, there is an optional yearly practitioner fee of $499USD that you are able to pay when you sign up to one of our practitioner trainings. This will give you access to our practitioner space + also receive a license to teach the work and register with the IICT for insurance. This can be paid yearly or monthly. If the payments default, you will lose access to the content, when the practitioner payment expires. You will lose access to our practitioner training content, if you do not renew your practitioner membership fee."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"All fees are in US dollars, and if you are Australian, the quote is inclusive of GST."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Payment may be made by Stripe on the website platform. If you are paying in full, you may request to pay via direct deposit or Paypal. If you elect to pay by monthly instalments, you authorise Stripe to charge your credit card for the agreed instalment amount each month."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"It is your responsibility to ensure that there are sufficient funds in your account to process your payment plan instalments. If payment fails, Stripe will attempt to process the payment twice more. If payment still fails to go through, your access to the program will be paused while we contact you to remedy the situation. All sessions, calls and services are postponed until payment is received."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We reserve the right to charge an administrative fee of $20 USD on late payments if we must contact you to arrange payment."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"You agree to pay all costs, including debt collection agency fees and solicitor's costs, that we may incur in taking steps to recover any money that you owe under this agreement, whether or not legal proceedings are issued in relation to the debt."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Delivery"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Our training programs are delivered through a mixture of live online workshops and self-directed learning. There may also be occasional live in-person events held at retreat centres. All online live training is delivered through Zoom."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Full details about the delivery of the training programs are provided in the online training portal. You will receive access to the portal after you sign or accept the relevant agreement."}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"LIVE trainings are available via your online portal for the duration of the training + 3 months post the training."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"Online trainings are available for 6 months."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Appointment Policies"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Attendance at live online training sessions is compulsory, except in cases of serious illness or circumstances beyond your control. Please give us at least 48 hours' notice if you are unable to attend a 1:1 training session."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"If a training session must be cancelled due to ill-health of the facilitator or technical issues, a rescheduling email will be sent within 12 hours."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Refund Policy & Consumer Guarantees"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"When you choose to participate in one of our programs, you are making a commitment to show up and do the work, and you are asking us to hold you accountable during this process. As a result, it is essential that you conduct your research and confirm that you are ready to undertake this work before you enrol."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4 font-semibold",children:"There is NO REFUND IF YOU CHANGE YOUR MIND regardless of when you choose to withdraw from any training program. You understand that once you have paid your deposit, you have committed to doing the work and paying for the full program."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Payment plans are offered solely to assist you in making this investment in your personal or business growth. You are required to complete payment in full, even if you choose to withdraw from the program."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Our programs require a wholehearted prioritisation of self-love to activate your inner truth and find your intuitive path. In some cases, this may involve a radical departure from your previous habits or understandings, and deep emotional exploration which may bring up blocks, limiting beliefs and subconscious sabotage. We would not be supporting you in your goals for personal and spiritual growth if we did not hold you accountable in your commitment to stay in the room and complete the training."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you are prevented from participating in one of our programs due to extraordinary circumstances beyond your control, please contact us to discuss your situation. You may apply for a credit note up to 2 weeks before the training program commences, which may be granted at our sole discretion. Credit may only be applied to an equivalent program and must be used within 12 months."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"We reserve the right to terminate your participation in the program for disrespectful behaviour. If we believe your conduct is unacceptable, we will send you a written warning, outlining the issue and what we require from you in order to remedy the problem. If the conduct is repeated, we will terminate this agreement without refund. You will receive an email explaining our reasons and your access to the online training portal will be revoked so that you no longer have access to the content. We offer you 1 follow up call with our facilitators to discuss the matter with the intention of providing closure. This call must take place within the 2 weeks following the termination."}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you feel that there is any problem with our services, please let us know within 7 days. We are keen to understand what has gone wrong if you are unhappy so that we can address your concerns and try to find a mutually acceptable solution."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We take our obligations under Australian Consumer Law seriously and will do our best to address any issues that arise. However, even if there is a major problem, our liability is strictly limited to providing the program to you again, or if we are unable to do so within a reasonable time, paying the cost of having an equivalent program supplied to you again."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Practitioner Session Payments & Refunds"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"When you book and pay for a session with a Soma Mystica® practitioner through our platform, your payment is processed as a split payment via Stripe Connect. The total session fee is divided as follows:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-2 font-body text-base text-foreground/80 pl-4 mb-4",children:[i.jsxs("li",{children:[i.jsx("strong",{children:"80%"})," of the session fee is paid directly to your practitioner (the facilitator)."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"20%"})," of the session fee is retained by Soma Mystica® as a platform and marketplace commission."]})]}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"By completing a booking through our platform, you acknowledge and agree to this payment structure."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4 font-semibold",children:"Refunds for practitioner sessions: If you wish to request a refund for a session booked through our platform, you must contact your practitioner directly. Any refund will be issued at the sole discretion of your practitioner and in accordance with their individual refunds policy."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4 font-semibold",children:"The 20% platform commission retained by Soma Mystica® is non-refundable under any circumstances. Any refund issued by your practitioner will be limited to their portion (80%) of the session fee only."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We recommend reviewing your practitioner's cancellation and refund terms before booking a session. Soma Mystica® is not responsible for refund disputes between clients and practitioners."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Respectful Communication"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"We reserve the right to delete any comments on our websites or social media accounts which are rude, offensive or which we deem to be unacceptable. Keep it polite and play nicely, please!"})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Dispute Resolution & Jurisdiction"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:"Negotiation"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you or we have any concerns arising out of these terms or your participation in one of our programs, we agree that we shall communicate with the intention of making a genuine effort to seek a win/win solution and resolve any dispute by negotiation and discussion."}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-6",children:["Please send an email to"," ",i.jsx("a",{href:"mailto:[email protected]",className:"text-accent hover:text-foreground transition-colors underline",children:"[email protected]"})," ","to begin the process. We will reply within 48 hours (excluding weekends)."]}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:"Mediation"}
414),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If we are unable to resolve a dispute by negotiation and discussion within 14 days, we agree to proceed to mediation with the assistance of an independent accredited mediator, seeking online dispute resolution or mediation by telephone if we are not both in New South Wales, Australia."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"The mediator is to be appointed by agreement between us or, failing agreement within 21 days of the negotiation period ending, the person initiating the dispute will seek the appointment of a dispute resolution professional by the President of the Law Society of New South Wales."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-6",children:"We agree to share all the costs of mediation equally between us. We agree that neither of us will commence legal action until, in the opinion of the independent mediator, the potential for negotiation and mediation have been exhausted, except where urgent interlocutory relief such as an injunction is required."}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:"Mutual Non-Disparagement"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Everyone participating in our programs or using our services undertakes that they will not publicly or privately disparage us or anyone associated with us, and will act in good faith to refrain from any conduct or communication which might reasonably be expected to interfere with our business or personal interests. We make a reciprocal promise to you."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-6",children:"Any negative public discussion or comments made about us will be considered defamatory, negative, or otherwise damaging, and will be the subject of compensation in any mediation or litigation claim."}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:"Jurisdiction"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:"This agreement is subject to the governing law of New South Wales. Regardless of where you live in the world, you irrevocably agree that if the dispute resolution processes fail, the courts of New South Wales, and the Commonwealth of Australia, will have exclusive jurisdiction."})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-2xl text-foreground mb-4",children:"Portal to Self â Membership Space Terms"}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Portal to Self is our monthly membership portal, run by SOMA MYSTICA® Founder, Sigourney Belle & Co-Facilitators."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Upon making payment for the monthly membership portal, you agree to pay $33USD/month which is automatically debited from your account each month, with the card details we have for you on record."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"If you stop making monthly payments, your access to the course portal and recordings will cease until you start making payments again."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"You may unsubscribe at any time. If you unsubscribe, your payment will cover you until the date your next payment was due to come out."}),i.jsx("p",{className:"font-body text-base text-foreground/80 leading-relaxed mb-4",children:"Please note that not all calls will be recorded and uploaded to the portal â we suggest you come LIVE to the calls as this is where you will experience the most benefit."}),i.jsxs("p",{className:"font-body text-base text-foreground/80 leading-relaxed",children:["You can login to your course portal, where all of the details of how to attend the live calls are, here:"," ",i.jsx("a",{href:"https://www.somamystica.com/login",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-foreground transition-colors underline",children:"www.somamystica.com/login"})]})]})]})]})}),i.jsx(nt,{})]}),a_=[{code:"AU",name:"Australia"},{code:"AT",name:"Austria"},{code:"BE",name:"Belgium"},{code:"BR",name:"Brazil"},{code:"BG",name:"Bulgaria"},{code:"CA",name:"Canada"},{code:"HR",name:"Croatia"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czech Republic"},{code:"DK",name:"Denmark"},{code:"EE",name:"Estonia"},{code:"FI",name:"Finland"},{code:"FR",name:"France"},{code:"DE",name:"Germany"},{code:"GR",name:"Greece"},{code:"HK",name:"Hong Kong"},{code:"HU",name:"Hungary"},{code:"IN",name:"India"},{code:"ID",name:"Indonesia"},{code:"IE",name:"Ireland"},{code:"IL",name:"Israel"},{code:"IT",name:"Italy"},{code:"JP",name:"Japan"},{code:"LV",name:"Latvia"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"MY",name:"Malaysia"},{code:"MT",name:"Malta"},{code:"MX",name:"Mexico"},{code:"NL",name:"Netherlands"},{code:"NZ",name:"New Zealand"},{code:"NO",name:"Norway"},{code:"PH",name:"Philippines"},{code:"PL",name:"Poland"},{code:"PT",name:"Portugal"},{code:"RO",name:"Romania"},{code:"SG",name:"Singapore"},{code:"SK",name:"Slovakia"},{code:"SI",name:"Slovenia"},{code:"ZA",name:"South Africa"},{code:"KR",name:"South Korea"},{code:"ES",name:"Spain"},{code:"SE",name:"Sweden"},{code:"CH",name:"Switzerland"},{code:"TW",name:"Taiwan"},{code:"TH",name:"Thailand"},{code:"AE",name:"United Arab Emirates"},{code:"GB",name:"United Kingdom"},{code:"US",name:"United States"}],Xy=a_.map(e=>e.name),IU=()=>
414{const[e,t]=x.useState("login"),[n,r]=x.useState(""),[s,o]=x.useState(""),[a,l]=x.useState(""),[c,d]=x.useState(""),[u,h]=x.useState(""),[f,m]=x.useState(!1),y=Mn(),{user:p}=Ci(),{toast:w}=Yt();x.useEffect(()=>{p&&y("/practitioner/dashboard")},[p,y]);const b=async v=>{v.preventDefault(),m(!0);try{const{error:j}=await K.auth.signInWithPassword({email:n,password:s});if(j)throw j;y("/practitioner/dashboard")}catch(j){w({title:"Error",description:j.message,variant:"destructive"})}finally{m(!1)}},g=async v=>{var j;v.preventDefault(),m(!0);try{const{data:k,error:S}=await K.auth.signUp({email:n,password:s,options:{emailRedirectTo:window.location.origin+"/practitioner/auth"}});if(S)throw S;if(k.user){const{error:N}=await K.from("practitioners").insert({user_id:k.user.id,full_name:a,email:n,modalities:[],is_approved:!1,location_city:c||null,location_country:u||null});N&&console.error("Profile creation error:",N)}try{await K.functions.invoke("send-transactional-email",{body:{templateName:"new-practitioner-signup",recipientEmail:"[email protected]",idempotencyKey:`practitioner-signup-${(j=k.user)==null?void 0:j.id}`,templateData:{practitionerName:a,practitionerEmail:n,locationCity:c||void 0,locationCountry:u||void 0,adminUrl:"https://somamystica.com/admin/login"}}})}catch(N){console.error("Failed to send admin notification:",N)}w({title:"Registration submitted",description:"Please check your email to verify your account. Your profile will be visible once approved by an admin."}),t("login"),o(""),l(""),d(""),h("")}catch(k){w({title:"Error",description:k.message,variant:"destructive"})}finally{m(!1)}};return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6",children:i.jsxs("div",{className:"w-full max-w-md",children:[i.jsxs("a",{href:"/",className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-10",children:[i.jsx(Zn,{size:16}),"Back to home"]}),i.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground mb-2",children:e==="login"?"Practitioner Login":"Practitioner Sign Up"}),i.jsx("p",{className:"font-body text-muted-foreground mb-8",children:e==="login"?"Sign in to manage your practitioner profile.":"Create an account to join our practitioner directory. Your profile will be reviewed and approved by our team."}),e==="login"?i.jsxs("form",{onSubmit:b,className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Email"}),i.jsx("input",{type:"email",value:n,onChange:v=>r(v.target.value),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Password"}),i.jsx("input",{type:"password",value:s,onChange:v=>o(v.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsx("button",{type:"submit",disabled:f,className:"w-full font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground py-4 hover:bg-foreground
414/90 transition-colors disabled:opacity-50",children:f?"Please wait...":"Sign In"}),i.jsxs("p",{className:"font-body text-sm text-center text-muted-foreground mt-4",children:["Don't have an account?"," ",i.jsx("button",{type:"button",onClick:()=>t("signup"),className:"text-foreground underline hover:text-foreground/80 transition-colors",children:"Sign up as a practitioner"})]})]}):i.jsxs("form",{onSubmit:g,className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Full Name *"}),i.jsx("input",{type:"text",value:a,onChange:v=>l(v.target.value),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Email *"}),i.jsx("input",{type:"email",value:n,onChange:v=>r(v.target.value),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Password *"}),i.jsx("input",{type:"password",value:s,onChange:v=>o(v.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"City"}),i.jsx("input",{type:"text",value:c,onChange:v=>d(v.target.value),className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Country"}),i.jsxs("select",{value:u,onChange:v=>h(v.target.value),className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",children:[i.jsx("option",{value:"",children:"Select country"}),Xy.map(v=>i.jsx("option",{value:v,children:v},v))]})]})]}),i.jsx("button",{type:"submit",disabled:f,className:"w-full font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground py-4 hover:bg-foreground
414/90 transition-colors disabled:opacity-50",children:f?"Please wait...":"Create Account"}),i.jsxs("p",{className:"font-body text-sm text-center text-muted-foreground mt-4",children:["Already have an account?"," ",i.jsx("button",{type:"button",onClick:()=>t("login"),className:"text-foreground underline hover:text-foreground/80 transition-colors",children:"Sign in"})]})]})]})})},DU=[{value:-1,label:"Use default"},{value:0,label:"No minimum"},{value:2,label:"2 hours"},{value:4,label:"4 hours"},{value:6,label:"6 hours"},{value:12,label:"12 hours"},{value:24,label:"24 hours"},{value:48,label:"48 hours"},{value:72,label:"72 hours"},{value:96,label:"4 days"},{value:168,label:"7 days"}],LU=[{value:-1,label:"Use default"},{value:0,label:"No buffer"},{value:5,label:"5 minutes"},{value:10,label:"10 minutes"},{value:15,label:"15 minutes"},{value:20,label:"20 minutes"},{value:30,label:"30 minutes"},{value:45,label:"45 minutes"},{value:60,label:"1 hour"}],$U=({practitionerId:e})=>{const{toast:t}=Yt(),[n,r]=x.useState([]),[s,o]=x.useState(!0),[a,l]=x.useState(!1),[c,d]=x.useState(!1),[u,h]=x.useState(null),[f,m]=x.useState(null),[y,p]=x.useState({name:"",description:"",duration_minutes:60,price_cents:1e4});x.useEffect(()=>{w()},[e]);const w=async()=>{const{data:k,error:S}=await K.from("practitioner_services").select("*").eq("practitioner_id",e).order("created_at",{ascending:!0});!S&&k&&r(k),o(!1)},b=async()=>{if(!y.name.trim())return;l(!0);const{error:k}=await K.from("practitioner_services").insert({practitioner_id:e,name:y.name.trim(),description:y.description.trim()||null,duration_minutes:y.duration_minutes,price_cents:y.price_cents});k?t({title:"Error",description:k.message,variant:"destructive"}):(t({title:"Service added"}),p({name:"",description:"",duration_minutes:60,price_cents:1e4}),d(!1),w()),l(!1)},g=async(k,S)=>{await K.from("practitioner_services").update({is_active:!S}).eq("id",k),w()},v=async k=>{const{error:S}=await K.from("practitioner_services").delete().eq("id",k);S?t({title:"Error",description:S.message,variant:"destructive"}):w()},j=async(k,S,N)=>{m(k);const T=N===-1?null:N,{error:R}=await K.from("practitioner_services").update({[S]:T}).eq("id",k);R?t({title:"Error",description:R.message,variant:"destructive"}):(t({title:"Saved"}),r(P=>P.map(F=>F.id===k?{...F,[S]:T}:F))),m(null)};return s?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Loading services..."}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("h3",{className:"font-display text-lg font-semibold text-foreground",children:"Your Services"}),i.jsxs("button",{type:"button",onClick:()=>d(!c),className:"inline-flex items-center gap-1.5 font-body text-sm border border-border px-3 py-1.5 hover:bg-card transition-colors",children:[i.jsx(_s,{size:14})," Add Service"]})]}),c&&i.jsxs("div",{className:"border border-border p-5 space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Service Name *"}),i.jsx("input",{type:"text",value:y.name,onChange:k=>p(S=>({...S,name:k.target.value})),className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",placeholder:"e.g. Spinal Attunement Session"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Duration (minutes) *"}),i.jsxs("select",{value:y.duration_minutes,onChange:k=>p(S=>({...S,duration_minutes:Number(k.target.value)})),className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",children:[i.jsx("option",{value:30,children:"30 min"}),i.jsx("option",{value:45,children:"45 min"}),i.jsx("option",{value:60,children:"60 min"}),i.jsx("option",{value:75,children:"75 min"}),i.jsx("option",{value:90,children:"90 min"}),i.jsx("option",{value:120,children:"120 min"})]})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Description"}),i.jsx("textarea",{value:y.description,onChange:k=>p(S=>({...S,description:k.target.value})),rows:2,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent resize-none",placeholder:"Brief description of what this service includes..."})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Price (USD) *"}),i.jsx("input",{type:"number",min:1,step:1,value:(y.price_cents/100).toFixed(0),onChange:k=>p(S=>({...S,price_cents:Math.round(Number(k.target.value)*100)})),className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("button",{type:"button",onClick:b,disabled:a||!y.name.trim(),className:"inline-flex items-center gap-2 font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground px-6 py-3 hover:bg-foreground
414/90 transition-colors disabled:opacity-50",children:[a&&i.jsx(Cn,{size:14,className:"animate-spin"}),"Save Service"]}),i.jsx("button",{type:"button",onClick:()=>d(!1),className:"font-body text-sm text-muted-foreground hover:text-foreground transition-colors px-4 py-3",children:"Cancel"})]})]}),n.length===0&&!c?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"No services yet. Add your first service to start accepting bookings."}):i.jsx("div",{className:"space-y-3",children:n.map(k=>i.jsxs("div",{className:`border border-border ${k.is_active?"":"opacity-50"}`,children:[i.jsxs("div",{className:"p-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:k.name}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:[k.duration_minutes," min · $",(k.price_cents/100).toFixed(2),k.min_booking_notice_hours!=null&&i.jsxs("span",{children:[" · Notice: ",k.min_booking_notice_hours,"h"]}),k.session_buffer_minutes!=null&&i.jsxs("span",{children:[" · Buffer: ",k.session_buffer_minutes,"m"]})]}),k.description&&i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-1",children:k.description})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>h(u===k.id?null:k.id),className:"font-body text-xs px-2 py-1 border border-border text-muted-foreground hover:bg-card transition-colors",title:"Per-service settings",children:u===k.id?i.jsx(FR,{size:14}):i.jsx(iS,{size:14})}),i.jsx("button",{type:"button",onClick:()=>g(k.id,k.is_active),className:`font-body text-xs px-3 py-1 border transition-colors ${k.is_active?"border-green-600 text-green-600 hover:bg-green-50":"border-border text-muted-foreground hover:bg-card"}`,children:k.is_active?"Active":"Inactive"}),i.jsx("button",{type:"button",onClick:()=>v(k.id),className:"text-muted-foreground hover:text-destructive transition-colors p-1",children:i.jsx(zu,{size:14})})]})]}),u===k.id&&i.jsxs("div",{className:"border-t border-border px-4 py-3 space-y-3 bg-muted/30",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Per-Service Overrides"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:'Leave as "Use default" to inherit your practitioner-level settings.'}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Minimum Booking Notice"}),i.jsx("select",{value:k.min_booking_notice_hours??-1,onChange:S=>j(k.id,"min_booking_notice_hours",Number(S.target.value)),disabled:f===k.id,className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-xs focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50",children:DU.map(S=>i.jsx("option",{value:S.value,children:S.label},S.value))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Session Buffer Time"}),i.jsx("select",{value:k.session_buffer_minutes??-1,onChange:S=>j(k.id,"session_buffer_minutes",Number(S.target.value)),disabled:f===k.id,className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-xs focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50",children:LU.map(S=>i.jsx("option",{value:S.value,children:S.label},S.value))})]})]})]})]},k.id))})]})},iw=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],FU=["Pacific/Auckland","Pacific/Fiji","Australia/Sydney","Australia/Melbourne","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Pacific/Honolulu","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Colombo","Asia/Dubai","Asia/Riyadh","Asia/Tehran","Asia/Karachi","Asia/Dhaka","Europe/Moscow","Europe/Istanbul","Europe/Athens","Europe/Helsinki","Europe/Berlin","Europe/Paris","Europe/Rome","Europe/Madrid","Europe/Amsterdam","Europe/Zurich","Europe/Vienna","Europe/Warsaw","Europe/Prague","Europe/London","Europe/Dublin","Europe/Lisbon","Africa/Johannesburg","Africa/Cairo","Africa/Lagos","Africa/Nairobi","America/Sao_Paulo","America/Buenos_Aires","America/Bogota","America/Mexico_City","America/Ne
414w_York","America/Toronto","America/Chicago","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","UTC"],BU=[{value:0,label:"No minimum"},{value:2,label:"2 hours"},{value:4,label:"4 hours"},{value:6,label:"6 hours"},{value:12,label:"12 hours"},{value:24,label:"24 hours"},{value:48,label:"48 hours"},{value:72,label:"72 hours"},{value:96,label:"4 days"},{value:168,label:"7 days"}],UU=[{value:0,label:"No buffer"},{value:5,label:"5 minutes"},{value:10,label:"10 minutes"},{value:15,label:"15 minutes"},{value:20,label:"20 minutes"},{value:30,label:"30 minutes"},{value:45,label:"45 minutes"},{value:60,label:"1 hour"}],zU=({practitionerId:e})=>{const{toast:t}=Yt(),[n,r]=x.useState([]),[s,o]=x.useState([]),[a,l]=x.useState(!0),[c,d]=x.useState(!1),[u,h]=x.useState(()=>Intl.DateTimeFormat().resolvedOptions().timeZone),[f,m]=x.useState({day_of_week:1,start_time:"09:00",end_time:"17:00",service_id:""}),[y,p]=x.useState(0),[w,b]=x.useState(!1),[g,v]=x.useState(0),[j,k]=x.useState(!1),[S,N]=x.useState(""),[T,R]=x.useState(""),[P,F]=x.useState(""),[O,V]=x.useState(""),[A,I]=x.useState(""),[z,q]=x.useState(!1);x.useEffect(()=>{_()},[e]);const _=async()=>{const[M,X,Z]=await Promise.all([K.from("practitioner_availability").select("*").eq("practitioner_id",e).order("day_of_week",{ascending:!0}),K.from("practitioner_services").select("id, name").eq("practitioner_id",e).eq("is_active",!0).order("name"),K.from("practitioners").select("min_booking_notice_hours, session_buffer_minutes, calendly_url, calendly_api_token, acuity_url, acuity_user_id, acuity_api_key").eq("id",e).single()]);if(!M.error&&M.data&&(r(M.data),M.data.length>0&&h(M.data[0].timezone)),!X.error&&X.data&&o(X.data),Z.data){const be=Z.data;p(be.min_booking_notice_hours||0),v(be.session_buffer_minutes||0),N(be.calendly_url||""),R(be.calendly_api_token||""),F(be.acuity_url||""),V(be.acuity_user_id||""),I(be.acuity_api_key||"")}l(!1)},E=async M=>{p(M),b(!0);const{error:X}=await K.from("practitioners").update({min_booking_notice_hours:M}).eq("id",e);t(X?{title:"Error",description:X.message,variant:"destructive"}:{title:"Saved",description:`Default minimum booking notice set to ${M===0?"none":M+" hours"}.`}),b(!1)},D=async M=>{v(M),k(!0);const{error:X}=await K.from("practitioners").update({session_buffer_minutes:M}).eq("id",e);t(X?{title:"Error",description:X.message,variant:"destructive"}:{title:"Saved",description:`Default session buffer set to ${M===0?"none":M+" minutes"}.`}),k(!1)},G=async()=>{if(f.start_time>=f.end_time){t({title:"Invalid time",description:"End time must be after start time",variant:"destructive"});return}d(!0);const{error:M}=await K.from("practitioner_availability").insert({practitioner_id:e,day_of_week:f.day_of_week,start_time:f.start_time,end_time:f.end_time,timezone:u,...f.service_id?{service_id:f.service_id}:{}});M?t({title:"Error",description:M.message,variant:"destructive"}):_(),d(!1)},W=async M=>{await K.from("practitioner_availability").delete().eq("id",M),_()},se=M=>{var X;return M?((X=s.find(Z=>Z.id===M))==null?void 0:X.name)||"Unknown":null};if(a)return i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Loading availability..."});const L=iw.map((M,X)=>({day:M,dayIndex:X,slots:n.filter(Z=>Z.day_of_week===X)}));return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"flex items-center justify-between",children:i.jsx("h3",{className:"font-display text-lg font-semibold text-foreground",children:"Weekly Availability"})}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Your Timezone"}),i.jsx("select",{value:u,onChange:M=>h(M.target.value),className:"w-full md:w-auto px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",children:FU.map(M=>i.jsx("option",{value:M,children:M.replace(/_/g," ")},M))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Default Minimum Booking Notice"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mb-2",children:"Applies to all services unless overridden per-service."}),i.jsx("select",{value:y,onChange:M=>E(Number(M.target.value)),disabled:w,className:"w-full md:w-auto px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50",children:BU.map(M=>i.jsx("option",{value:M.value,children:M.label},M.value))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1",children:"Default Session Buffer Time"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mb-2",children:"Applies to all services unless overridden per-service."}),i.jsx("select",{value:g,onChange:M=>D(Number(M.target.value)),disabled:j,className:"w-full md:w-auto px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50",children:UU.map(M=>i.jsx("option",{value:M.value,children:M.label},M.value))})]}),i.jsxs("div",{className:"border border-border p-4 space-y-4",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"font-display text-base font-semibold text-foreground mb-1",children:"Exter
414nal Calendar Integration"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mb-4",children:"Connect your Calendly or Acuity account so the booking system automatically avoids double-bookings with your external calendar."})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Calendly"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Calendly Profile URL"}),i.jsx("input",{type:"url",value:S,onChange:M=>N(M.target.value),placeholder:"https://calendly.com/your-name",className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Personal Access Token"}),i.jsx("input",{type:"password",value:T,onChange:M=>R(M.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground mt-1",children:["Find this in ",i.jsx("a",{href:"https://calendly.com/integrations/api_webhooks",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline",children:"Calendly â Integrations â API & Webhooks"})]})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Acuity Scheduling"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Acuity Profile URL"}),i.jsx("input",{type:"url",value:P,onChange:M=>F(M.target.value),placeholder:"https://app.acuityscheduling.com/...",className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"User ID"}),i.jsx("input",{type:"text",value:O,onChange:M=>V(M.target.value),placeholder:"Your Acuity User ID",className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"API Key"}),i.jsx("input",{type:"password",value:A,onChange:M=>I(M.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"w-full px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground mt-1",children:["Find these in ",i.jsx("a",{href:"https://acuityscheduling.com/api",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline",children:"Acuity â Integrations â API"})]})]})]})]}),i.jsxs("button",{type:"button",onClick:async()=>{q(!0);const{error:M}=await K.from("practitioners").update({calendly_url:S||null,calendly_api_token:T||null,acuity_url:P||null,acuity_user_id:O||null,acuity_api_key:A||null}).eq("id",e);t(M?{title:"Error",description:M.message,variant:"destructive"}:{title:"Saved",description:"Calendar integration settings updated."}),q(!1)},disabled:z,className:"inline-flex items-center gap-1.5 font-body text-sm bg-foreground text-primary-foreground px-4 py-2 hover:bg-foreground
414/90 transition-colors disabled:opacity-50",children:[z?i.jsx(Cn,{size:14,className:"animate-spin"}):null,"Save Calendar Settings"]})]}),i.jsx("div",{className:"space-y-2",children:L.map(({day:M,dayIndex:X,slots:Z})=>i.jsxs("div",{className:"border border-border p-3 flex flex-col sm:flex-row sm:items-start gap-2",children:[i.jsx("span",{className:"font-body text-sm font-medium text-foreground w-24 shrink-0 pt-0.5",children:M}),i.jsx("div",{className:"flex flex-wrap gap-2 flex-1",children:Z.length===0?i.jsx("span",{className:"font-body text-xs text-muted-foreground",children:"Not available"}):Z.map(be=>{const le=se(be.service_id);return i.jsxs("span",{className:"inline-flex items-center gap-1 font-body text-xs bg-card border border-border px-2 py-1",children:[be.start_time.slice(0,5)," â ",be.end_time.slice(0,5),le&&i.jsxs("span",{className:"text-accent ml-1",children:["(",le,")"]}),i.jsx("button",{type:"button",onClick:()=>W(be.id),className:"text-muted-foreground hover:text-destructive ml-1",children:i.jsx(zu,{size:12})})]},be.id)})})]},X))}),i.jsxs("div",{className:"border border-border p-4 space-y-3",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Add Time Slot"}),i.jsxs("div",{className:"flex flex-wrap gap-3 items-end",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Day"}),i.jsx("select",{value:f.day_of_week,onChange:M=>m(X=>({...X,day_of_week:Number(M.target.value)})),className:"px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",children:iw.map((M,X)=>i.jsx("option",{value:X,children:M},X))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Start"}),i.jsx("input",{type:"time",value:f.start_time,onChange:M=>m(X=>({...X,start_time:M.target.value})),className:"px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"End"}),i.jsx("input",{type:"time",value:f.end_time,onChange:M=>m(X=>({...X,end_time:M.target.value})),className:"px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs text-muted-foreground block mb-1",children:"Service (optional)"}),i.jsxs("select",{value:f.service_id,onChange:M=>m(X=>({...X,service_id:M.target.value})),className:"px-3 py-2 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",children:[i.jsx("option",{value:"",children:"All services"}),s.map(M=>i.jsx("option",{value:M.id,children:M.name},M.id))]})]}),i.jsxs("button",{type:"button",onClick:G,disabled:c,className:"inline-flex items-center gap-1.5 font-body text-sm bg-foreground text-primary-foreground px-4 py-2 hover:bg-foreground
414/90 transition-colors disabled:opacity-50",children:[c?i.jsx(Cn,{size:14,className:"animate-spin"}):i.jsx(_s,{size:14}),"Add"]})]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:'Leave "Service" as "All services" for general availability. Assign to a specific service for service-specific hours (e.g., in-person only on certain days).'})]})]})},VU={pending:"text-yellow-600 border-yellow-600",confirmed:"text-green-600 border-green-600",cancelled:"text-destructive border-destructive",completed:"text-muted-foreground border-border"},WU=({practitionerId:e})=>{const[t,n]=x.useState([]),[r,s]=x.useState(!0);x.useEffect(()=>{o()},[e]);const o=async()=>{const{data:a,error:l}=await K.from("bookings").select("*, service:practitioner_services(name)").eq("practitioner_id",e).order("booking_date",{ascending:!1});!l&&a&&n(a),s(!1)};return r?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Loading bookings..."}):t.length===0?i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg font-semibold text-foreground mb-3",children:"Bookings"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"No bookings yet."})]}):i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg font-semibold text-foreground mb-4",children:"Bookings"}),i.jsx("div",{className:"space-y-3",children:t.map(a=>i.jsxs("div",{className:"border border-border p-4",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:a.client_name}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:a.client_email}),a.service&&i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-1",children:a.service.name})]}),i.jsx("span",{className:`font-body text-xs uppercase tracking-wider px-2 py-0.5 border ${VU[a.status]||"border-border text-muted-foreground"}`,children:a.status})]}),i.jsxs("div",{className:"flex gap-4 mt-2 font-body text-xs text-muted-foreground",children:[i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Dt,{size:12})," ",a.booking_date]}),i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Pn,{size:12})," ",a.start_time.slice(0,5)," â ",a.end_time.slice(0,5)]}),i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Ql,{size:12})," $",(a.amount_cents/100).toFixed(2)," USD"]})]})]},a.id))})]})},HU=({practitionerId:e,stripeStatus:t,locationCountry:n})=>{const[r,s]=x.useState([]),[o,a]=x.useState(!0);x.useEffect(()=>{l()},[e]);const l=async()=>{const{data:u,error:h}=await K.from("bookings").select("*, service:practitioner_services(name)").eq("practitioner_id",e).order("created_at",{ascending:!1});!h&&u&&s(u),a(!1)},c=x.useMemo(()=>{const u=r.filter(v=>v.status==="confirmed"||v.status==="completed"),h=r.filter(v=>v.status==="pending"),f=u.reduce((v,j)=>v+j.amount_cents-j.platform_fee_cents,0),m=u.reduce((v,j)=>v+j.platform_fee_cents,0),y=h.reduce((v,j)=>v+j.amount_cents-j.platform_fee_cents,0),p=new Date,w=new Date(p.getFullYear(),p.getMonth(),1).toISOString().slice(0,10),g=u.filter(v=>v.booking_date>=w).reduce((v,j)=>v+j.amount_cents-j.platform_fee_cents,0);return{totalRevenue:f,totalFees:m,pendingRevenue:y,monthRevenue:g,confirmedCount:u.length,pendingCount:h.length}},[r]),d=x.useMemo(()=>n&&a_.find(h=>h.name.toLowerCase()===n.toLowerCase())||null,[n]);return o?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Loading payments..."}):i.jsxs("div",{className:"space-y-8",children:[i.jsx("h3",{className:"font-display text-lg font-semibold text-foreground",children:"Payments & Earnings"}),i.jsxs("div",{className:"border border-border p-5",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-3",children:"Payout Status"}),!t||!t.connected?i.jsxs("div",{className:"space-y-4",children:[d?i.jsxs("div",{className:"flex items-start gap-3 border border-border/50 bg-muted/30 p-3",children:[i.jsx(ny,{size:18,className:"text-accent shrink-0 mt-0.5"}),i.jsxs("div",{children:[i.jsxs("p",{className:"font-body text-sm font-medium text-foreground",children:["Stripe account will be created as: ",d.name,"
414(",d.code,")"]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-1",children:"This country is permanently locked once you connect Stripe. If this is incorrect, update your Country in the Profile tab before proceeding."})]})]}):n?i.jsxs("div",{className:"flex items-start gap-3 border border-yellow-600/30 bg-yellow-600/5 p-3",children:[i.jsx(Ja,{size:18,className:"text-yellow-600 shrink-0 mt-0.5"}),i.jsxs("div",{children:[i.jsxs("p",{className:"font-body text-sm font-medium text-foreground",children:['Country not recognized: "',n,'"']}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-1",children:"Please update your Country in the Profile tab to a supported country from the dropdown."})]})]}):null,i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ja,{size:18,className:"text-yellow-600"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Stripe not connected. Set up payments in the Profile tab to receive payouts."})]})]}):t.payouts_enabled?i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ho,{size:18,className:"text-green-600"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:"Payouts Active"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"Earnings are automatically deposited to your connected bank account by Stripe."})]})]}):t.charges_enabled?i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Pn,{size:18,className:"text-yellow-600"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:"Charges Enabled, Payouts Pending"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"You can accept payments. Stripe is still verifying your payout details."})]})]}):i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ja,{size:18,className:"text-yellow-600"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:"Verification In Progress"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"Stripe is reviewing your account. This usually takes a few minutes."})]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[i.jsxs("div",{className:"border border-border p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Ql,{size:14,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Total Earnings"})]}),i.jsxs("p",{className:"font-display text-2xl font-semibold text-foreground",children:["$",(c.totalRevenue/100).toFixed(0)]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"USD after fees"})]}),i.jsxs("div",{className:"border border-border p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(hS,{size:14,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"This Month"})]}),i.jsxs("p",{className:"font-display text-2xl font-semibold text-foreground",children:["$",(c.monthRevenue/100).toFixed(0)]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"USD earned"})]}),i.jsxs("div",{className:"border border-border p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Pn,{size:14,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Pending"})]}),i.jsxs("p",{className:"font-display text-2xl font-semibold text-foreground",children:["$",(c.pendingRevenue/100).toFixed(0)]}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:[c.pendingCount," booking",c.pendingCount!==1?"s":""]})]}),i.jsxs("div",{className:"border border-border p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Ho,{size:14,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Completed"})]}),i.jsx("p",{className:"font-display text-2xl font-semibold text-foreground",children:c.confirmedCount}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"total sessions"})]})]}),i.jsx("div",{className:"border border-border p-4 bg-card",children:i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:[i.jsx("strong",{children:"Platform fee:"})," 20% is deducted from each transaction. Total fees paid to date:"," ",i.jsxs("span",{className:"text-foreground",children:["$",(c.totalFees/100).toFixed(2)," USD"]})]})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-4",children:"Transaction History"}),r.length===0?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"No transactions yet."}):i.jsx("div",{className:"space-y-2",children:r.map(u=>{var m;const h=u.amount_cents-u.platform_fee_cents,f=u.status==="confirmed"||u.status==="completed";return i.jsxs("div",{className:"border border-border p-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground truncate",children:u.client_name}),i.jsx("span",{className:`font-body text-[10px] uppercase tracking-wider px-1.5 py-0.5 border ${u.status==="confirmed"||u.status==="completed"?"text-green-600 border-green-600":u.status==="pending"?"text-yellow-600 border-yellow-600":"text-destructive border-destructive"}`,children:u.status})]}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground mt-0.5",children:[((m=u.service)==null?void 0:m.name)||"Session"," · ",u.booking_date]})]}),i.jsxs("div",{className:"text-right shrink-0 ml-4",children:[i.jsxs("p",{className:`font-body text-sm font-medium ${f?"text-foreground":"text-muted-foreground"}`,children:[f?"+":"","$",(h/100).toFixed(2)]}),i.jsxs("p",{className:"font-body text-[10px] text-muted-foreground",children:["$",(u.amount_cents/100).toFixed(2)," â $",(u.platform_fee_cents/100).toFixed(2)," fee"]})]})]},u.id)})})]})]})}
414,qU=["Spinal Attunement","Parasympathetic Breathwork","The Self Holding Method"],KU=({practitionerId:e,slug:t,onSlugChange:n})=>{const[r,s]=x.useState(!1),[o,a]=x.useState(!1),[l,c]=x.useState(t),[d,u]=x.useState(!1),[h,f]=x.useState(""),{toast:m}=Yt(),y=t?`https://somamystica.com/p/${t}`:`https://somamystica.com/practitioners/${e}`,p=async()=>{await navigator.clipboard.writeText(y),s(!0),setTimeout(()=>s(!1),2e3)},w=async()=>{const b=l.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!b){f("Please enter a valid slug");return}u(!0),f("");const{error:g}=await K.from("practitioners").update({slug:b}).eq("id",e);g?f(g.message.includes("unique")?"This URL is already taken":g.message):(n(b),a(!1),m({title:"Profile URL updated"})),u(!1)};return i.jsxs("div",{className:"border border-border bg-card p-5 mb-8",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(zR,{size:16,className:"text-accent"}),i.jsx("h3",{className:"font-display text-sm font-semibold text-foreground",children:"Your Profile Link"})]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mb-3",children:"Share this link with clients so they can view your profile and book sessions."}),i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx("input",{readOnly:!0,value:y,className:"flex-1 font-body text-xs bg-background border border-border px-3 py-2 text-muted-foreground truncate"}),i.jsxs("button",{onClick:p,className:"inline-flex items-center gap-1.5 font-body text-xs tracking-widest uppercase border border-border px-4 py-2 hover:bg-accent/10 transition-colors shrink-0",children:[r?i.jsx(sS,{size:14,className:"text-green-500"}):i.jsx(UR,{size:14}),r?"Copied":"Copy"]})]}),o?i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-body text-xs text-muted-foreground shrink-0",children:"somamystica.com/p/"}),i.jsx("input",{value:l,onChange:b=>c(b.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),className:"flex-1 font-body text-xs bg-background border border-border px-3 py-2 text-foreground",placeholder:"your-custom-url"})]}),h&&i.jsx("p",{className:"font-body text-xs text-destructive",children:h}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:w,disabled:d,className:"font-body text-xs tracking-widest uppercase border border-border px-4 py-2 hover:bg-accent/10 transition-colors",children:d?"Saving...":"Save"}),i.jsx("button",{onClick:()=>{a(!1),c(t),f("")},className:"font-body text-xs tracking-widest uppercase text-muted-foreground px-4 py-2 hover:text-foreground transition-colors",children:"Cancel"})]})]}):i.jsx("button",{onClick:()=>{a(!0),c(t)},className:"font-body text-xs tracking-widest uppercase text-accent hover:underline",children:"Customise URL"})]})},GU=()=>{const{user:e,loading:t,signOut:n}=Ci(),r=Mn(),{toast:s}=Yt(),[o,a]=x.useState(!1),[l,c]=x.useState(!1),[d,u]=x.useState({full_name:"",email:"",phone:"",bio:"",photo_url:"",location_city:"",location_country:"",modalities:[],pricing_info:"",session_type:"both",practitioner_role:"practitioner",slug:""}),[h,f]=x.useState(!1),m="practitioner_profile_draft",[y]=Gg(),[p,w]=x.useState(null),[b,g]=x.useState("profile"),[v,j]=x.useState(null),[k,S]=x.useState(!1);x.useEffect(()=>{!t&&!e&&r("/practitioner/auth")},[e,t,r]),x.useEffect(()=>{e&&(N(),T())},[e]),x.useEffect(()=>{!h&&e&&localStorage.setItem(m,JSON.stringify(d))},[d,h,e]),x.useEffect(()=>{y.get("stripe")==="complete"&&(T(),s({title:"Stripe setup",description:"Checking your Stripe account status..."}))},[y]);const N=async()=>{const{data:A}=await K.rpc("get_my_practitioner_profile"),I=Array.isArray(A)&&A.length>0?A[0]:null;if(I)w(I.id),u({full_name:I.full_name,email:I.email,phone:I.phone||"",bio:I.bio||"",photo_url:I.photo_url||"",location_city:I.location_city||"",location_country:I.location_country||"",modalities:I.modalities||[],pricing_info:I.pricing_info||"",session_type:I.session_type||"both",practitioner_role:I.practitioner_role||"practitioner",slug:I.slug||""}),f(!0);else{u(q=>({...q,email:e.email||""}));const z=localStorage.getItem(m);if(z)try{const q=JSON.parse(z);u(_=>({..._,...q,email:e.email||q.email||""}))}catch{}}},T=async()=>{const{data:A,error:I}=await K.functions.invoke("stripe-connect-status");!I&&A&&j(A)},R=async()=>{S(!0);const{data:A,error:I}=await K.functions.invoke("stripe-connect-onboard");I||!(A!=null&&A.url)?s({title:"Error",description:"Could not start Stripe setup",variant:"destructive"}):window.location.href=A.url,S(!1)},P=async A=>{var E;const I=(E=A.target.files)==null?void 0:E[0];if(!I||!e)return;c(!0);const z=I.name.split(".").pop(),q=`${e.id}/photo.${z}`,{error:_}=await K.storage.from("practitioner-photos").upload(q,I,{upsert:!0});if(_)s({title:"Upload failed",description:_.message,variant:"destructive"});else{const{data:D}=K.storage.from("practitioner-photos").getPublicUrl(q);u(G=>({...G,photo_url:D.publicUrl}))}c(!1)},F=A=>{u(I=>({...I,modalities:I.modalities.includes(A)?I.modalities.filter(z=>z!==A):[...I.modalities,A]}))},O=async A=>
414{if(A.preventDefault(),!e)return;if(!d.full_name.trim()||!d.email.trim()||!d.location_city.trim()||!d.location_country.trim()||!d.bio.trim()||d.modalities.length===0||!d.pricing_info.trim()){s({title:"Missing fields",description:"Please fill in all required fields.",variant:"destructive"});return}a(!0);const I={...d,user_id:e.id},{error:z}=h?await K.from("practitioners").update(I).eq("user_id",e.id):await K.from("practitioners").insert(I);z?s({title:"Error",description:z.message,variant:"destructive"}):(s({title:h?"Profile updated":"Profile submitted",description:h?"Your changes have been saved.":"Your profile has been submitted for approval."}),f(!0),localStorage.removeItem(m)),a(!1)},V=async()=>{if(!confirm("This will disconnect your current Stripe account so you can start fresh. Continue?"))return;S(!0);const{error:A}=await K.functions.invoke("stripe-connect-reset");A?s({title:"Error",description:"Could not reset Stripe account",variant:"destructive"}):(s({title:"Stripe Reset",description:"Your Stripe account has been disconnected. You can now set up a new one."}),j({connected:!1,charges_enabled:!1,payouts_enabled:!1})),S(!1)};return t?i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("p",{className:"font-body text-muted-foreground",children:"Loading..."})}):i.jsx("div",{className:"min-h-screen bg-background",children:i.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-12",children:[i.jsxs("div",{className:"flex items-center justify-between mb-10",children:[i.jsxs("a",{href:"/",className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(Zn,{size:16}),"Back to home"]}),i.jsxs("button",{onClick:()=>{n(),r("/")},className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(cS,{size:16}),"Sign out"]})]}),i.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground mb-2",children:"Your Practitioner Profile"}),i.jsx("p",{className:"font-body text-muted-foreground mb-6",children:"Complete your profile to be listed in the Soma Mystica® practitioner directory."}),h&&i.jsxs("button",{onClick:()=>r("/practitioner/sessions"),className:"w-full border border-border bg-card p-5 mb-4 flex items-center gap-3 hover:bg-muted/50 transition-colors text-left",children:[i.jsx(lS,{size:20,className:"text-accent shrink-0"}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-display text-sm font-semibold text-foreground",children:"Session Notes"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"Record and manage client session documentation"})]}),i.jsx(Zn,{size:16,className:"text-muted-foreground rotate-180"})]}),h&&p&&i.jsx(KU,{practitionerId:p,slug:d.slug,onSlugChange:A=>u(I=>({...I,slug:A}))}),h&&v!==null&&!v.charges_enabled&&i.jsxs("div",{className:"border border-yellow-600/30 bg-yellow-600/5 p-5 mb-8 flex items-start gap-3",children:[i.jsx(Ja,{size:20,className:"text-yellow-600 shrink-0 mt-0.5"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:"Stripe Connect required"}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground mt-1",children:["You must connect your Stripe account before your profile can go live in the practitioner directory. Go to the ",i.jsx("strong",{children:"Profile"})," tab and complete the Payment Setup section."]}),b!=="profile"&&i.jsxs("button",{type:"button",onClick:()=>g("profile"),className:"mt-2 inline-flex items-center gap-1.5 font-body text-xs tracking-widest uppercase text-foreground border border-border px-4 py-2 hover:bg-card transition-colors",children:[i.jsx(wo,{size:12})," Go to Payment Setup"]})]})]}),h&&i.jsx("div",{className:"flex gap-1 border-b border-border mb-8",children:[{key:"profile",label:"Profile",icon:i.jsx(VR,{size:14})},{key:"services",label:"Services",icon:i.jsx(wo,{size:14})},{key:"availability",label:"Availability",icon:i.jsx(Pn,{size:14})},{key:"bookings",label:"Bookings",icon:i.jsx(Dt,{size:14})},{key:"payments",label:"Payments",icon:i.jsx(Ql,{size:14})}].map(A=>i.jsxs("button",{type:"button",onClick:()=>g(A.key),className:`inline-flex items-center gap-1.5 font-body text-sm px-4 py-3 border-b-2 transition-colors ${b===A.key?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[A.icon," ",A.label]},A.key))}),h&&b==="services"&&p&&i.jsx("div",{className:"mb-10",children:i.jsx($U,{practitionerId:p})}),h&&b==="availability"&&p&&i.jsx("div",{className:"mb-10",children:i.jsx(zU,{practitionerId:p})}),h&&b==="bookings"&&p&&i.jsx("div",{className:"mb-10",children:i.jsx(WU,{practitionerId:p})}),h&&b==="payments"&&p&&i.jsx("div",{className:"mb-10",children:i.jsx(HU,{practitionerId:p,stripeStatus:v,locationCountry:d.location_country})}),(!h||b==="profile")&&i.jsxs("form",{onSubmit:O,className:"space-y-8",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground block mb-3",children:"Profile Photo"}),i.jsxs("div",{className:"flex items-center gap-6",children:[d.photo_url?i.jsx("img",{src:d.photo_url,alt:"Profile",className:"w-24 h-24 rounded-full object-cover"}):i.jsx("div",{className:"w-24 h-24 rounded-full bg-card border border-border flex items-center justify-center text-muted-foreground",children:i.jsx(Xm,{size:24})}),i.jsxs("label",{className:"cursor-pointer font-body text-sm border border-border px-4 py-2 hover:bg-card transition-colors",children:[l?"Uploading...":"Upload Photo",i.jsx("input",{type:"file",accept:"image/*",onChange:P,className:"hidden"})]})]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Full Name *"}),i.jsx("input",{type:"text",value:d.full_name,onChange:A=>u(I=>({...I,full_name:A.target.value})),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Email *"}),i.jsx("input",{type:"email",value:d.email,onChange:A=>u(I=>({...I,email:A.target.value})),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Phone"}),i.jsx("input",{type:"tel",value:d.phone,onChange:A=>u(I=>({...I,phone:A.target.value})),className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"City *"}),i.jsx("input",{type:"text",value:d.location_city,onChange:A=>u(I=>({...I,location_city:A.target.value})),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Country *"}),i.jsxs("select",{value:d.location_country,onChange:A=>u(I=>({...I,location_country:A.target.value})),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent",children:[i.jsx("option",{value:"",disabled:!0,children:"Select your country"}),Xy.map(A=>i.jsx("option",{value:A,children:A},A))]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-1.5",children:"Used for Stripe payouts. This is permanently locked once you connect Stripe."})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Bio *"}),i.jsx("textarea",{value:d.bio,onChange:A=>u(I=>({...I,bio:A.target.value})),rows:5,required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent resize-none",placeholder:"Tell clients about your background, approach, and what to expect..."})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground block mb-3",children:"Modalities *"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:qU.map(A=>i.jsx("button",{type:"button",onClick:()=>F(A),className:`font-body text-sm px-4 py-2 border transition-colors ${d.modalities.includes(A)?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:A},A))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground block mb-3",children:"Session Type *"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:[{value:"online",label:"Online Only"},{value:"in_person",label:"In Person Only"},{value:"both",label:"Online & In Person"}].map(A=>i.jsx("button",{type:"button",onClick:()=>u(I=>({...I,session_type:A.value})),className:`font-body text-sm px-4 py-2 border transition-colors ${d.session_type===A.value?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:A.label},A.value))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground block mb-3",children:"Your Role *"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:[{value:"practitioner",label:"Practitioner"},{value:"head_trainer",label:"Head Trainer"},{value:"lead_trainer_founder",label:"Lead Trainer & Founder"}].map(A=>i.jsx("button",{type:"button",onClick:()=>u(I=>({...I,practitioner_role:A.value})),className:`font-body text-sm px-4 py-2 border transition-colors ${d.practitioner_role===A.value?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:A.label},A.value))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Pricing Info *"}),i.jsx("textarea",{value:d.pricing_info,onChange:A=>u(I=>({...I,pricing_info:A.target.value})),rows:3,required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent resize-none",placeholder:"e.g. Initial consultation $120, Follow-up $90"})]}),h&&i.jsxs("div",{className:"border border-border p-6",children:[i.jsx("label",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground block mb-3",children:"Payment Setup"}),v===null?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Loading payment status..."}):v.charges_enabled?i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ho,{size:20,className:"text-green-600"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm text-foreground font-medium",children:"Stripe Connected"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:'You can receive payments. Clients will see a "Book & Pay" button on your profile.'})]})]}):v.connected&&v.details_submitted?i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ja,{size:20,className:"text-yellow-600"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm text-foreground font-medium",children:"Verification Pending"}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"Stripe is reviewing your account. This usually takes a few minutes."})]})]}):i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-4",children:"Connect your Str
414ipe account to receive payments from clients. A 20% platform fee applies to each transaction."}),i.jsxs("div",{className:"flex flex-wrap gap-3",children:[i.jsxs("button",{type:"button",onClick:R,disabled:k,className:"inline-flex items-center gap-2 font-body text-sm tracking-widest uppercase border border-border px-6 py-3 hover:bg-card transition-colors disabled:opacity-50",children:[k?i.jsx(Cn,{size:16,className:"animate-spin"}):i.jsx(wo,{size:16}),v.connected?"Continue Stripe Setup":"Connect Stripe Account"]}),v.connected&&i.jsxs("button",{type:"button",onClick:V,disabled:k,className:"inline-flex items-center gap-2 font-body text-sm tracking-widest uppercase border border-border px-6 py-3 text-muted-foreground hover:text-foreground hover:bg-card transition-colors disabled:opacity-50",children:[i.jsx(YR,{size:16}),"Reset & Start Over"]})]})]})]}),i.jsx("button",{type:"submit",disabled:o||d.modalities.length===0,className:"w-full font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground py-4 hover:bg-foreground
414/90 transition-colors disabled:opacity-50",children:o?"Saving...":h?"Update Profile":"Submit for Approval"})]})]})})},l_=e=>`country-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")||"unspecified"}`,YU=({countries:e,totalPractitioners:t})=>e.length===0?null:i.jsx("section",{className:"border-b border-border bg-card/60",children:i.jsx("div",{className:"mx-auto max-w-7xl px-6 py-4 lg:px-12",children:i.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[i.jsxs("p",{className:"font-body text-xs uppercase tracking-wider text-muted-foreground",children:[t," practitioner",t!==1?"s":""," across ",e.length," countr",e.length!==1?"ies":"y"]}),i.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1 scrollbar-hide md:flex-wrap",children:e.map(({country:n,count:r})=>i.jsxs("a",{href:`#${l_(n)}`,className:"shrink-0 border border-border px-3 py-2 font-body text-xs uppercase tracking-wider text-muted-foreground transition-colors hover:border-foreground hover:text-foreground",children:[n," (",r,")"]},n))})]})})}),JU=({practitioner:e})=>{var r;const t=e.practitioner_role==="head_trainer"?"Head Trainer":e.practitioner_role==="lead_trainer_founder"?"Lead Trainer & Founder":null,n=e.modalities??[];return i.jsxs(xe,{to:`/practitioners/${e.id}`,className:"group flex h-full flex-col border border-border p-5 transition-all duration-300 hover:border-foreground md:p-6",children:[i.jsxs("div",{className:"mb-4 flex items-start gap-4",children:[e.photo_url?i.jsx("img",{src:e.photo_url,alt:e.full_name||"Practitioner photo",loading:"lazy",className:"h-16 w-16 shrink-0 rounded-full object-cover"}):i.jsx("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center rounded-full border border-border bg-card font-display text-lg text-muted-foreground",children:((r=e.full_name)==null?void 0:r.charAt(0))||"P"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex flex-col items-start gap-2 sm:flex-row sm:flex-wrap sm:items-center",children:[i.jsx("h3",{className:"font-display text-lg font-semibold leading-tight text-foreground transition-colors group-hover:text-accent",children:e.full_name}),t&&i.jsx("span",{className:"inline-flex items-center self-start bg-foreground px-2 py-1 font-body text-[10px] uppercase tracking-wider text-primary-foreground",children:t})]}),(e.location_city||e.location_country)&&i.jsxs("p",{className:"mt-1 flex items-center gap-1 font-body text-sm text-muted-foreground",children:[i.jsx(er,{size:14}),[e.location_city,e.location_country].filter(Boolean).join(", ")]})]})]}),n.length>0&&i.jsx("div",{className:"mb-4 flex flex-wrap gap-1.5",children:n.slice(0,3).map(s=>i.jsx("span",{className:"border border-border bg-card px-2 py-1 font-body text-xs text-muted-foreground",children:s},s))}),i.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-1.5",children:[(e.session_type==="online"||e.session_type==="both")&&i.jsxs("span",{className:"inline-flex items-center gap-1 border border-accent/20 bg-accent/10 px-2 py-1 font-body text-xs text-accent",children:[i.jsx(Vu,{size:12})," Online"]}),(e.session_type==="in_person"||e.session_type==="both")&&i.jsxs("span",{className:"inline-flex items-center gap-1 border border-accent/20 bg-accent/10 px-2 py-1 font-body text-xs text-accent",children:[i.jsx(cn,{size:12})," In Person"]})]}),e.bio&&i.jsx("p",{className:"mb-4 line-clamp-3 font-body text-sm text-muted-foreground",children:e.bio}),i.jsxs("span",{className:"mt-auto inline-flex items-center gap-2 font-body text-xs uppercase tracking-widest text-foreground transition-colors group-hover:text-accent",children:["View Profile ",i.jsx(ue,{size:14})]})]})},QU=["All","Spinal Attunement","Parasympathetic Breathwork","The Self Holding Method"],Vc=e=>(e??"").normalize("NFKC").replace(/[\u200B-\u200D\uFEFF]/g,"").trim().toLowerCase(),XU=()=>{const[e,t]=Gg(),n=e.get("qa")==="1",[r,s]=x.useState(""),[o,a]=x.useState("All"),[l,c]=x.useState("All"),[d,u]=x.useState(!1),[h,f]=x.useState(!1),{data:m,isLoading:y}=At({queryKey:["practitioners"],queryFn:async()=>{const{data:g,error:v}=await K.from("practitioners_public").select("*").eq("stripe_onboarding_complete",!0).eq("is_approved",!0).order("full_name");if(v)throw v;return g??[]}}),p=m==null?void 0:m.filter(g=>{const v=Vc(r),j=!v||Vc(g.full_name).includes(v)||Vc(g.location_city).includes(v)||Vc(g.location_country).includes(v),k=o==="All"||(g.modalities??[]).includes(o),S=l==="All"||g.practitioner_role===l;return j&&k&&S}),w=x.useMemo(()=>
414{if(!p)return[];const g={};return p.forEach(v=>{const j=v.location_country||"Location Not Specified";g[j]||(g[j]=[]),g[j].push(v)}),Object.entries(g).sort(([v],[j])=>v==="Location Not Specified"?1:j==="Location Not Specified"?-1:v.localeCompare(j)).map(([v,j])=>({country:v,practitioners:j.sort((k,S)=>(k.full_name??"").localeCompare(S.full_name??""))}))},[p]),b=x.useMemo(()=>w.map(({country:g,practitioners:v})=>({country:g,count:v.length})),[w]);if(n){const g=new URLSearchParams(e);g.delete("qa");const v=g.toString(),j=`/practitioners${v?`?${v}`:""}${window.location.hash||""}`;return i.jsxs("div",{className:"min-h-screen bg-card",children:[i.jsxs("div",{className:"sticky top-0 z-50 flex items-center justify-between gap-4 border-b border-border bg-background px-6 py-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"font-display text-lg font-semibold text-foreground",children:"Directory QA Mode"}),i.jsx("span",{className:"hidden font-body text-xs text-muted-foreground md:inline",children:"Mobile (390Ã844) vs Desktop (1280Ã800) â same data, side-by-side."})]}),i.jsxs("button",{onClick:()=>{const k=new URLSearchParams(e);k.delete("qa"),t(k)},className:"inline-flex items-center gap-2 border border-border px-3 py-2 font-body text-xs uppercase tracking-wider text-foreground transition-colors hover:bg-foreground hover:text-primary-foreground","aria-label":"Exit QA mode",children:[i.jsx(wi,{size:14})," Exit QA"]})]}),i.jsx("div",{className:"mx-auto max-w-[1800px] px-4 py-6",children:i.jsx("div",{className:"overflow-x-auto pb-4 scrollbar-hide",children:i.jsxs("div",{className:"flex min-w-[560px] items-start gap-4 lg:gap-6",children:[i.jsxs("div",{className:"flex w-[184px] shrink-0 flex-col items-center sm:w-[248px] lg:w-auto",children:[i.jsxs("div",{className:"mb-3 inline-flex items-center gap-2 font-body text-[10px] uppercase tracking-wider text-muted-foreground sm:text-xs",children:[i.jsx(QR,{size:14})," Mobile · 390 à 844"]}),i.jsx("div",{className:"relative h-[376px] w-[184px] overflow-hidden sm:h-[504px] sm:w-[248px] lg:h-[780px] lg:w-[390px]",children:i.jsx("div",{className:"absolute left-0 top-0 origin-top-left scale-[0.472] sm:scale-[0.636] lg:scale-100",children:i.jsxs("div",{className:"relative overflow-hidden rounded-[36px] border-[10px] border-foreground bg-background shadow-2xl",children:[!d&&i.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background",children:i.jsxs("div",{className:"flex flex-col items-center gap-3 px-6 text-center",children:[i.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-border border-t-foreground"}),i.jsx("p",{className:"font-body text-xs uppercase tracking-wider text-muted-foreground",children:"Loading mobile preview"})]})}),i.jsx("iframe",{src:j,title:"Mobile preview of practitioner directory",width:390,height:780,onLoad:()=>u(!0),className:"block bg-background"})]})})}),i.jsxs("p",{className:"mt-3 max-w-[184px] text-center font-body text-xs text-muted-foreground sm:max-w-[248px] lg:max-w-[390px]",children:["Loaded ",w.length," country group",w.length!==1?"s":"","."]})]}),i.jsxs("div",{className:"flex w-[360px] shrink-0 flex-col items-center lg:w-auto",children:[i.jsxs("div",{className:"mb-3 inline-flex items-center gap-2 font-body text-[10px] uppercase tracking-wider text-muted-foreground sm:text-xs",children:[i.jsx(Jm,{size:14})," Desktop · 1280 à 800"]}),i.jsx("div",{className:"relative h-[225px] w-[360px] overflow-hidden lg:h-[640px] lg:w-[1024px] xl:h-[800px] xl:w-[1280px]",children:i.jsx("div",{className:"absolute left-0 top-0 origin-top-left scale-[0.28125] lg:scale-[0.8] xl:scale-100",children:i.jsxs("div",{className:"relative w-[1280px] overflow-hidden rounded-md border-2 border-foreground bg-background shadow-2xl",children:[!h&&i.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background",children:i.jsxs("div",{className:"flex flex-col items-center gap-3 px-6 text-center",children:[i.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-border border-t-foreground"}),i.jsx("p",{className:"font-body text-xs uppercase tracking-wider text-muted-foreground",children:"Loading desktop preview"})]})}),i.jsx("iframe",{src:j,title:"Desktop preview of practitioner directory",width:1280,height:800,onLoad:()=>f(!0),className:"block bg-background"})]})})}),i.jsx("p",{className:"mt-3 max-w-[360px] text-center font-body text-xs text-muted-foreground lg:max-w-none",children:"Both frames load the same /practitioners route â verify counts match."})]})]})})})]})}return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:"Find a Practitioner â Soma Mystica® Directory",description:"Browse certified Soma Mystica® practitioners w
414orldwide and book somatic and energetic sessions online or in person.",path:"/practitioners"}),i.jsx(Ke,{}),i.jsx("section",{className:"bg-card pt-28 pb-12 md:pt-40 md:pb-20",children:i.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-12",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 mb-8",children:[i.jsxs("a",{href:"/",className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(Zn,{size:16}),"Back to home"]}),i.jsxs("button",{onClick:()=>{const g=new URLSearchParams(e);g.set("qa","1"),t(g)},className:"inline-flex items-center gap-2 border border-border bg-background px-3 py-2 font-body text-xs uppercase tracking-wider text-foreground transition-colors hover:bg-foreground hover:text-primary-foreground","aria-label":"Open mobile vs desktop QA view",title:"Compare mobile vs desktop side-by-side",children:[i.jsx(ZR,{size:14}),i.jsx("span",{className:"hidden sm:inline",children:"QA: Mobile vs Desktop"}),i.jsx("span",{className:"sm:hidden",children:"QA View"})]})]}),i.jsx("h1",{className:"font-display text-4xl font-bold text-foreground mb-4 sm:text-5xl lg:text-6xl",children:"Find a Practitioner"}),i.jsx("p",{className:"max-w-2xl font-body text-base text-muted-foreground md:text-lg",children:"Connect with certified Soma Mystica® practitioners around the world."})]})}),i.jsx("section",{className:"border-b border-border md:sticky md:top-20 z-40 bg-background/95 backdrop-blur-sm",children:i.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-12 py-4 md:py-5",children:i.jsxs("div",{className:"flex flex-col md:flex-row gap-3 md:gap-4",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(ry,{size:18,className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx("input",{type:"text",value:r,onChange:g=>s(g.target.value.replace(/[\u200B-\u200D\uFEFF]/g,"")),placeholder:"Search by name or location...",className:"w-full pl-12 pr-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsx("div",{className:"flex gap-2 overflow-x-auto md:flex-wrap -mx-6 px-6 md:mx-0 md:px-0 pb-1 md:pb-0 scrollbar-hide",children:QU.map(g=>i.jsx("button",{onClick:()=>a(g),className:`font-body text-xs tracking-wider uppercase px-3 md:px-4 py-2.5 md:py-3 border transition-colors whitespace-nowrap shrink-0 ${o===g?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:g},g))}),i.jsx("div",{className:"flex gap-2 overflow-x-auto md:flex-wrap -mx-6 px-6 md:mx-0 md:px-0 pb-1 md:pb-0 scrollbar-hide",children:[{value:"All",label:"All Roles"},{value:"practitioner",label:"Practitioners"},{value:"head_trainer",label:"Head Trainers"}].map(g=>i.jsx("button",{onClick:()=>c(g.value),className:`font-body text-xs tracking-wider uppercase px-3 md:px-4 py-2.5 md:py-3 border transition-colors whitespace-nowrap shrink-0 ${l===g.value?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:g.label},g.value))})]})})}),i.jsx(YU,{countries:b,totalPractitioners:(p==null?void 0:p.length)??0}),i.jsx("section",{className:"py-8 md:py-16",children:i.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-12",children:y?i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3,4,5,6].map(g=>i.jsxs("div",{className:"border border-border p-6 animate-pulse",children:[i.jsx("div",{className:"w-20 h-20 rounded-full bg-muted mb-4"}),i.jsx("div",{className:"h-5 bg-muted w-2/3 mb-2"}),i.jsx("div",{className:"h-4 bg-muted w-1/2"})]},g))}):w.length>0?i.jsx("div",{className:"space-y-10 md:space-y-16",children:w.map(({country:g,practitioners:v})=>i.jsxs("div",{id:l_(g),className:"scroll-mt-36 md:scroll-mt-44",children:[i.jsxs("div",{className:"mb-5 flex flex-wrap items-center gap-3 md:mb-8",children:[i.jsx(er,{size:20,className:"text-accent"}),i.jsx("h2",{className:"font-display text-2xl md:text-3xl font-semibold text-foreground",children:g}),i.jsxs("span",{className:"font-body text-sm text-muted-foreground ml-2",children:["(",v.length," practitioner",v.length!==1?"s":"",")"]})]}),i.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6 lg:grid-cols-3",children:v.map(j=>i.jsx(JU,{practitioner:j},j.id))})]},g))}):i.jsxs("div",{className:"text-center py-20",children:[i.jsx("p",{className:"font-display text-2xl text-foreground mb-2",children:"No practitioners found"}),i.jsx("p",{className:"font-body text-muted-foreground",children:"Try adjusting your search or filter criteria."})]})})}),i.jsx(nt,{})]})};function Ve(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function sr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ea(e,t){const n=Ve(e);return isNaN(t)?sr(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function c_(e,t){const n=Ve(e);if(isNaN(t))return sr(e,NaN);if(!t)return n;const r=n.getDate(),s=sr(e,n.getTime());s.setMonth(n.getMonth()+t+1,0);const o=s.getDate();return r>=o?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}const d_=6048e5,ZU=864e5;let ez={};function ih(){return ez}function $l(e,t){var l,c,d,u;const n=ih(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,s=Ve(e),o=s.getDay(),a=(o<r?7:0)+o-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}
414function yu(e){return $l(e,{weekStartsOn:1})}function u_(e){const t=Ve(e),n=t.getFullYear(),r=sr(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=yu(r),o=sr(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const a=yu(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function fi(e){const t=Ve(e);return t.setHours(0,0,0,0),t}function ow(e){const t=Ve(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tz(e,t){const n=fi(e),r=fi(t),s=+n-ow(n),o=+r-ow(r);return Math.round((s-o)/ZU)}function nz(e){const t=u_(e),n=sr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),yu(n)}function Up(e,t){const n=fi(e),r=fi(t);return+n==+r}function rz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function sz(e){if(!rz(e)&&typeof e!="number")return!1;const t=Ve(e);return!isNaN(Number(t))}function iz(e){const t=Ve(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function oz(e,t){const n=Ve(e.start),r=Ve(e.end);let s=+n>+r;const o=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0);let l=1;const c=[];for(;+a<=o;)c.push(Ve(a)),a.setDate(a.getDate()+l),a.setHours(0,0,0,0);return s?c.reverse():c}function aw(e){const t=Ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function az(e){const t=Ve(e),n=sr(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const lz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}}
vendor: 17,209 bytes, line 414
414,cz=(e,t,n)=>{let r;const s=lz[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bf(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const dz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fz={date:bf({formats:dz,defaultWidth:"full"}),time:bf({formats:uz,defaultWidth:"full"}),dateTime:bf({formats:hz,defaultWidth:"full"})},mz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},pz=(e,t,n,r)=>mz[e];function Pa(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;s=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const gz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},yz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jz=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kz={ordinalNumber:jz,era:Pa({values:gz,defaultWidth:"wide"}),quarter:Pa({values:yz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pa({values:xz,defaultWidth:"wide"}),day:Pa({values:vz,defaultWidth:"wide"}),dayPeriod:Pa({values:bz,defaultWidth:"wide",formattingValues:wz,defaultFormattingWidth:"wide"})};function Aa(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const a=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Nz(l,h=>h.test(a)):Sz(l,h=>h.test(a));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(a.length);return{value:d,rest:u}}}function Sz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Nz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function _z(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(s.length);return{value:a,rest:l}}}const Cz=/^(\d+)(th|st|nd|rd)?/i,Tz=/\d+/i,Ez={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Pz={any:[/^b/i,/^(a|c)/i]},Az={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rz={any:[/1/i,/2/i,/3/i,/4/i]},Mz={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Oz={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Iz={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Dz={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Lz={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$z={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Fz={ordinalNumber:_z({matchPattern:Cz,parsePattern:Tz,valueCallback:e=>parseInt(e,10)}),era:Aa({matchPatterns:Ez,defaultMatchWidth:"wide",parsePatterns:Pz,defaultParseWidth:"any"}),quarter:Aa({matchPatterns:Az,defaultMatchWidth:"wide",parsePatterns:Rz,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Aa({matchPatterns:Mz,defaultMatchWidth:"wide",parsePatterns:Oz,defaultParseWidth:"any"}),day:Aa({matchPatterns:Iz,defaultMatchWidth:"wide",parsePatterns:Dz,defaultParseWidth:"any"}),dayPeriod:Aa({matchPatterns:Lz,defaultMatchWidth:"any",parsePatterns:$z,defaultParseWidth:"any"})},Bz={code:"en-US",formatDistance:cz,formatLong:fz,formatRelative:pz,localize:kz,match:Fz,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Uz(e){const t=Ve(e);return tz(t,az(t))+1}function zz(e){const t=Ve(e),n=+yu(t)-+nz(t);return Math.round(n/d_)+1}function h_(e,t){var u,h,f,m;const n=Ve(e),r=n.getFullYear(),s=ih(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(f=s.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,a=sr(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const l=$l(a,t),c=sr(e,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const d=$l(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Vz(e,t){var l,c,d,u;const n=ih(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,s=h_(e,t),o=sr(e,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),$l(o,t)}function Wz(e,t){const n=Ve(e),r=+$l(n,t)-+Vz(n,t);return Math.round(r/d_)+1}function pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Br={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pe(n+1,2)},d(e,t){return pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pe(e.getHours()%12||12,t.length)},H(e,t){return pe(e.getHours(),t.length)},m(e,t){return pe(e.getMinutes(),t.length)},s(e,t){return pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return pe(s,t.length)}},Ui={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Br.y(e,t)},Y:function(e,t,n,r){const s=h_(e,r),o=s>0?s:1-s;if(t==="YY"){const a=o%100;return pe(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):pe(o,t.length)},R:function(e,t){const n=u_(e);return pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Br.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=Wz(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):pe(s,t.length)},I:function(e,t,n){const r=zz(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Br.d(e,t)},D:function(e,t,n){const r=Uz(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return pe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return pe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return pe(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=Ui.noon:r===0?s=Ui.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=Ui.evening:r>=12?s=Ui.afternoon:r>=4?s=Ui.morning:s=Ui.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Br.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Br.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Br.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Br.s(e,t)},S:function(e,t){return Br.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return dw(r);case"XXXX":case"XX":return Hs(r);case"XXXXX":case"XXX":default:return Hs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return dw(r);case"xxxx":case"xx":return Hs(r);case"xxxxx":case"xxx":default:return Hs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+cw(r,":");case"OOOO":default:return"GMT"+Hs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+cw(r,":");case"zzzz":default:return"GMT"+Hs(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return pe(r,t.length)}};function cw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+t+pe(o,2)}function dw(e,t){return e%60===0?(e>0?"-":"+")+pe(Math.abs(e)/60,2):Hs(e,t)}function Hs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=pe(Math.trunc(r/60),2),o=pe(r%60,2);return n+s+t+o}const uw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},f_=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Hz=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return uw(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",uw(r,t)).replace("{{time}}",f_(s,t))},qz={p:f_,P:Hz},Kz=/^D+$/,Gz=/^Y+$/,Yz=["D","DD","YY","YYYY"];function Jz(e){return Kz.test(e)}function Qz(e){return Gz.test(e)}function Xz(e,t,n){const r=Zz(e,t,n);if(console.warn(r),Yz.includes(e))throw new RangeError(r)}function Zz(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const eV=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tV=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nV=/^'([^]*?)'?$/,rV=/''/g,sV=/[a-zA-Z]/;function et(e,t,n){var u,h,f,m;const r=ih(),s=r.locale??Bz,o=r.firstWeekContainsDate??((h=(u=r.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,a=r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,l=Ve(e);if(!sz(l))throw new RangeError("Invalid time value");let c=t.match(tV).map(y=>{const p=y[0];if(p==="p"||p==="P"){const w=qz[p];return w(y,s.formatLong)}return y}).join("").match(eV).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const p=y[0];if(p==="'")return{isToken:!1,value:iV(y)};if(lw[p])return{isToken:!0,value:y};
414if(p.match(sV))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:y}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const d={firstWeekContainsDate:o,weekStartsOn:a,locale:s};return c.map(y=>{if(!y.isToken)return y.value;const p=y.value;(Qz(p)||Jz(p))&&Xz(p,t,String(e));const w=lw[p[0]];return w(l,p,s.localize,d)}).join("")}function iV(e){const t=e.match(nV);return t?t[1].replace(rV,"'"):e}function oV(e){return Ve(e).getDay()}function hw(e,t){const n=Ve(e),r=Ve(t);return+n<+r}function aV(e,t){return c_(e,-t)}const wf=["Pacific/Auckland","Pacific/Fiji","Australia/Sydney","Australia/Melbourne","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Pacific/Honolulu","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Colombo","Asia/Dubai","Asia/Riyadh","Asia/Tehran","Asia/Karachi","Asia/Dhaka","Europe/Moscow","Europe/Istanbul","Europe/Athens","Europe/Helsinki","Europe/Berlin","Europe/Paris","Europe/Rome","Europe/Madrid","Europe/Amsterdam","Europe/Zurich","Europe/Vienna","Europe/Warsaw","Europe/Prague","Europe/London","Europe/Dublin","Europe/Lisbon","Africa/Johannesburg","Africa/Cairo","Africa/Lagos","Africa/Nairobi","America/Sao_Paulo","America/Buenos_Aires","America/Bogota","America/Mexico_City","America/New_York","America/Toronto","America/Chicago","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","UTC"];function lV(e,t,n,r){if(n===r)return{time:e,dayOffset:0};const s=et(t,"yyyy-MM-dd"),o=new Date(`${s}T${e}:00`),a=new Intl.DateTimeFormat("en-US",{timeZone:n,hour:"numeric",minute:"numeric",hour12:!1,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(o),l=new Intl.DateTimeFormat("en-US",{timeZone:r,hour:"numeric",minute:"numeric",hour12:!1,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(o),c=(v,j)=>{var k;return((k=v.find(S=>S.type===j))==null?void 0:k.value)||"0"},d=Number(c(a,"hour"))*60+Number(c(a,"minute")),u=Number(c(l,"hour"))*60+Number(c(l,"minute")),h=Number(c(a,"day")),f=Number(c(l,"day")),m=u-d+(f-h)*1440,[y,p]=e.split(":").map(Number),w=y*60+p+m,b=w<0?-1:w>=1440?1:0,g=(w%1440+1440)%1440;return{time:`${String(Math.floor(g/60)).padStart(2,"0")}:${String(g%60).padStart(2,"0")}`,dayOffset:b}}function cV(e,t,n,r,s,o=[],a=0,l=0,c){const d=n.getDay(),u=e.filter(p=>p.day_of_week!==d?!1:c&&p.service_id===c||p.service_id===null),h=et(n,"yyyy-MM-dd"),f=t.filter(p=>p.booking_date===h&&p.status!=="cancelled"),m=new Date;new Date(m.getTime()+a*60*60*1e3);const y=[];for(const p of u){const[w,b]=p.start_time.split(":").map(Number),[g,v]=p.end_time.split(":").map(Number),j=w*60+b,k=g*60+v;for(let S=j;S+r<=k;S+=30){const N=`${String(Math.floor(S/60)).padStart(2,"0")}:${String(S%60).padStart(2,"0")}`,T=S+r,R=`${String(Math.floor(T/60)).padStart(2,"0")}:${String(T%60).padStart(2,"0")}`;if(a>0){const O=`${h}T${N}:00`,V=new Date(O);new Date(m.toLocaleString("en-US",{timeZone:s})),new Date(V.toLocaleString("en-US",{timeZone:s})),V.getTime(),new Date(new Intl.DateTimeFormat("en-US",{timeZone:s,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(m).replace(/(\d+)\/(\d+)\/(\d+),?\s*/,"$3-$1-$2T")).getTime();const A=new Date(`${h}T${N}:00`).getTime(),I=new Intl.DateTimeFormat("sv-SE",{timeZone:s,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(m),z=new Date(I).getTime();if((A-z)/(1e3*60*60)<a)continue}const P=f.some(O=>{const V=O.start_time.slice(0,5),A=O.end_time.slice(0,5),[I,z]=V.split(":").map(Number),[q,_]=A.split(":").map(Number),E=Math.max(0,I*60+z-l),D=Math.min(1440,q*60+_+l),G=`${String(Math.floor(E/60)).padStart(2,"0")}:${String(E%60).padStart(2,"0")}`,W=`${String(Math.floor(D/60)).padStart(2,"0")}:${String(D%60).padStart(2,"0")}`;return N<W&&R>G}),F=o.some(O=>{const[V,A]=O.start.split(":").map(Number),[I,z]=O.end.split(":").map(Number),q=Math.max(0,V*60+A-l),_=Math.min(1440,I*60+z+l),E=`${String(Math.floor(q/60)).padStart(2,"0")}
414:${String(q%60).padStart(2,"0")}`,D=`${String(Math.floor(_/60)).padStart(2,"0")}:${String(_%60).padStart(2,"0")}`;return N<D&&R>E});!P&&!F&&y.push(N)}}return y}const dV=({practitionerId:e,practitionerName:t})=>{var q;const{toast:n}=Yt(),[r,s]=x.useState(null),[o,a]=x.useState(null),[l,c]=x.useState(null),[d,u]=x.useState(()=>fi(new Date)),[h,f]=x.useState(""),[m,y]=x.useState(""),[p,w]=x.useState(!1),[b,g]=x.useState(!1),[v,j]=x.useState(()=>Intl.DateTimeFormat().resolvedOptions().timeZone),{data:k}=At({queryKey:["practitioner-services",e],queryFn:async()=>{const{data:_,error:E}=await K.from("practitioner_services").select("*").eq("practitioner_id",e).eq("is_active",!0).order("price_cents",{ascending:!0});if(E)throw E;return _}}),{data:S}=At({queryKey:["practitioner-availability",e],queryFn:async()=>{const{data:_,error:E}=await K.from("practitioner_availability").select("*").eq("practitioner_id",e);if(E)throw E;return _}}),{data:N}=At({queryKey:["practitioner-settings",e],queryFn:async()=>{const{data:_,error:E}=await K.from("practitioners_public").select("min_booking_notice_hours, timezone, session_buffer_minutes").eq("id",e).single();if(E)throw E;return _}}),{data:T}=At({queryKey:["practitioner-bookings",e],queryFn:async()=>{const{data:_,error:E}=await K.rpc("get_practitioner_booking_slots",{_practitioner_id:e});if(E)throw E;return _||[]}}),R=((q=S==null?void 0:S[0])==null?void 0:q.timezone)||(N==null?void 0:N.timezone)||"UTC",P=(r==null?void 0:r.min_booking_notice_hours)??(N==null?void 0:N.min_booking_notice_hours)??0,F=(r==null?void 0:r.session_buffer_minutes)??(N==null?void 0:N.session_buffer_minutes)??0,{data:O}=At({queryKey:["external-busy-times",e,o?et(o,"yyyy-MM-dd"):null],queryFn:async()=>{if(!o)return[];const{data:_,error:E}=await K.functions.invoke("check-calendar-conflicts",{body:{practitioner_id:e,booking_date:et(o,"yyyy-MM-dd"),timezone:R,mode:"busy-times"}});return E?(console.error("Failed to fetch external busy times:",E),[]):(_==null?void 0:_.busy_periods)||[]},enabled:!!o}),V=x.useMemo(()=>Array.from({length:7},(_,E)=>Ea(d,E)),[d]),A=x.useMemo(()=>!o||!r||!S||!T?[]:cV(S,T,o,r.duration_minutes,R,O||[],P,F,r.id),[o,r,S,T,R,O,P,F]),I=x.useMemo(()=>S?r?new Set(S.filter(_=>_.service_id===null||_.service_id===r.id).map(_=>_.day_of_week)):new Set(S.filter(_=>_.service_id===null).map(_=>_.day_of_week)):new Set,[S,r]),z=async()=>{var G;if(!r||!o||!l||!h||!m)return;w(!0);const _=Number(l.split(":")[0])*60+Number(l.split(":")[1])+r.duration_minutes,E=`${String(Math.floor(_/60)).padStart(2,"0")}:${String(_%60).padStart(2,"0")}`,D=et(o,"yyyy-MM-dd");try{const{data:W,error:se}=await K.functions.invoke("check-calendar-conflicts",{body:{practitioner_id:e,booking_date:D,start_time:l,end_time:E,timezone:R}});if(se)console.error("Conflict check error:",se);else if(W!=null&&W.has_conflicts){const X=W.conflicts.filter(Z=>!Z.event.includes("not configured")).map(Z=>`${Z.source}: ${Z.event} (${Z.time})`).join(` 415`);if(X){n({title:"Time slot conflict detected",description:`This time overlaps with: 416${X}`,variant:"destructive"}),w(!1);return}}const{data:L,error:M}=await K.functions.invoke("create-checkout",{body:{practitioner_id:e,service_id:r.id,booking_date:D,start_time:l,end_time:E,timezone:R,client_name:h,client_email:m}});if(M){let X=M.message;try{if((G=M.context)!=null&&G.body){const Z=await new Response(M.context.body).json();Z!=null&&Z.error&&(X=Z.error)}}catch{}n({title:"Payment unavailable",description:X,variant:"destructive"});return}if(L!=null&&L.url){try{await fetch("https://hooks.zapier.com/hooks/catch/15713088/unsbcil/",{method:"POST",headers:{"Content-Type":"application/json"},mode:"no-cors",body:JSON.stringify({name:h,email:m,source:"booking",timestamp:new Date().toISOString()})})}catch(X){console.error("Mailing list signup error:",X)}window.open(L.url,"_blank")}else L!=null&&L.error&&n({title:"Payment unavailable",description:L.error,variant:"destructive"})}catch(W){n({title:"Error",description:W.message,variant:"destructive"})}w(!1)};return!k||k.length===0?i.jsxs("div",{className:"border border-border p-6 text-center",children:[i.jsx(Dt,{size:24,className:"mx-auto text-muted-foreground mb-3"}),i.jsx("p",{className:"font-display text-lg text-foreground mb-1",children:"Booking coming soon"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"This practitioner hasn't set up their booking calendar yet."})]}):i.jsxs("div",{className:"space-y-6",children:[i.jsx("h2",{className:"font-display text-xl font-semibold text-foreground",children:"Book a Session"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-3",children:"1. Choose a service"}),i.jsx("div",{className:"space-y-2",children:k.map(_=>i.jsx("button",{type:"button",onClick:()=>{s(_),c(null)},className:`w-full text-left p-4 border transition-colors ${(r==null?void 0:r.id)===_.id?"border-foreground bg-card":"border-border hover:border-foreground
416/50"}`,children:i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:_.name}),_.description&&i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-0.5",children:_.description})]}),i.jsxs("div",{className:"text-right shrink-0 ml-4",children:[i.jsxs("p",{className:"font-body text-sm font-medium text-foreground",children:["$",(_.price_cents/100).toFixed(0)," USD"]}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:[_.duration_minutes," min"]})]})]})},_.id))})]}),r&&i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-3",children:"2. Pick a date"}),i.jsxs("div",{className:"border border-border p-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsx("button",{type:"button",onClick:()=>u(_=>Ea(_,-7)),disabled:hw(Ea(d,-1),fi(new Date)),className:"p-1 text-muted-foreground hover:text-foreground disabled:opacity-30",children:i.jsx(ty,{size:18})}),i.jsxs("span",{className:"font-body text-sm text-foreground",children:[et(d,"MMM d")," â ",et(Ea(d,6),"MMM d, yyyy")]}),i.jsx("button",{type:"button",onClick:()=>u(_=>Ea(_,7)),className:"p-1 text-muted-foreground hover:text-foreground",children:i.jsx(Uu,{size:18})})]}),i.jsx("div",{className:"grid grid-cols-7 gap-1",children:V.map(_=>{const E=hw(_,fi(new Date)),D=I.has(_.getDay()),G=o&&Up(_,o);return i.jsxs("button",{type:"button",disabled:E||!D,onClick:()=>{a(_),c(null)},className:`flex flex-col items-center py-2 px-1 text-center transition-colors ${G?"bg-foreground text-primary-foreground":E||!D?"text-muted-foreground/40 cursor-not-allowed":"hover:bg-card text-foreground"}`,children:[i.jsx("span",{className:"font-body text-[10px] uppercase",children:et(_,"EEE")}),i.jsx("span",{className:"font-body text-sm font-medium",children:et(_,"d")})]},_.toISOString())})})]}),i.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[i.jsx(ny,{size:14,className:"text-muted-foreground shrink-0"}),i.jsx("label",{className:"font-body text-xs text-muted-foreground shrink-0",children:"Your timezone:"}),i.jsx("select",{value:v,onChange:_=>{j(_.target.value),c(null)},className:"flex-1 px-2 py-1.5 border border-border bg-card text-foreground font-body text-xs focus:outline-none focus:ring-2 focus:ring-accent",children:(wf.includes(v)?wf:[v,...wf]).map(_=>i.jsx("option",{value:_,children:_.replace(/_/g," ")},_))})]})]}),o&&r&&i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-3",children:"3. Choose a time"}),A.length===0?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"No available slots on this date."}):i.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-2",children:A.map(_=>{const E=lV(_,o,R,v),D=E.time,G=E.dayOffset===1?" (+1d)":E.dayOffset===-1?" (-1d)":"";return i.jsxs("button",{type:"button",onClick:()=>c(_),className:`font-body text-sm py-2 px-3 border transition-colors ${l===_?"bg-foreground text-primary-foreground border-foreground":"border-border hover:border-foreground
416/50"}`,children:[D,G]},_)})})]}),l&&i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-1",children:"4. Your details"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsx("input",{type:"text",value:h,onChange:_=>f(_.target.value),placeholder:"Your name *",className:"px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"}),i.jsx("input",{type:"email",value:m,onChange:_=>y(_.target.value),placeholder:"Your email *",className:"px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:b,onChange:_=>g(_.target.checked),className:"mt-1 w-4 h-4 accent-accent shrink-0"}),i.jsxs("span",{className:"font-body text-xs text-muted-foreground leading-relaxed",children:["I have agreed to the"," ",i.jsx(xe,{to:"/terms-and-conditions",target:"_blank",className:"text-accent underline hover:text-foreground",children:"Refunds Policy"})," ","and"," ",i.jsx(xe,{to:"/medical-disclaimer",target:"_blank",className:"text-accent underline hover:text-foreground",children:"Medical Disclaimer"})," ","on the website."]})]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground leading-relaxed pl-7",children:"I understand that by signing onto a session through this website, I will be automatically added to the mailing list of Soma Mystica®."}),i.jsxs("button",{type:"button",onClick:z,disabled:p||!h.trim()||!m.trim()||!b,className:"w-full inline-flex items-center justify-center gap-2 font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground py-4 hover:bg-foreground
416/90 transition-colors disabled:opacity-50",children:[p?i.jsx(Cn,{size:14,className:"animate-spin"}):i.jsx(Dt,{size:14}),"Book & Pay $",(r.price_cents/100).toFixed(0)," USD"]})]})]})},fw=()=>{const{id:e,slug:t}=_k();Yt();const{data:n,isLoading:r}=At({queryKey:["practitioner",e||t],queryFn:async()=>{const a=t?"slug":"id",l=t||e,{data:c,error:d}=await K.from("practitioners_public").select("*").eq(a,l).single();if(d)throw d;return c},enabled:!!(e||t)}),{data:s}=At({queryKey:["practitioner-reviews",e],queryFn:async()=>{const{data:a,error:l}=await K.from("practitioner_reviews_public").select("id, practitioner_id, reviewer_name, rating, comment, is_approved, created_at").eq("practitioner_id",e).eq("is_approved",!0).order("created_at",{ascending:!1});if(l)throw l;return a},enabled:!!e}),o=s!=null&&s.length?(s.reduce((a,l)=>a+l.rating,0)/s.length).toFixed(1):null;return r?i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("div",{className:"pt-32 max-w-4xl mx-auto px-6 animate-pulse",children:[i.jsx("div",{className:"h-8 w-48 bg-muted mb-8"}),i.jsx("div",{className:"h-32 w-32 rounded-full bg-muted mb-6"}),i.jsx("div",{className:"h-8 w-64 bg-muted mb-4"}),i.jsx("div",{className:"h-4 w-48 bg-muted"})]})]}):n?i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:`${n.name} â Soma Mystica® Practitioner`,description:n.bio?`${n.bio.slice(0,155)}`:`Book a somatic and energetic session with ${n.name}, a certified Soma Mystica® practitioner${[n.location_city,n.location_country].filter(Boolean).length?` in ${[n.location_city,n.location_country].filter(Boolean).join(", ")}`:""}.`,path:t?`/p/${t}`:`/practitioners/${e}`}),i.jsx(Ke,{}),i.jsx("section",{className:"pt-32 pb-16",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 lg:px-12",children:[i.jsxs(xe,{to:"/practitioners",className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-10",children:[i.jsx(Zn,{size:16}),"Back to directory"]}),i.jsxs("div",{className:"flex flex-col md:flex-row gap-8 mb-12",children:[n.photo_url?i.jsx("img",{src:n.photo_url,alt:n.full_name,className:"w-32 h-32 md:w-40 md:h-40 rounded-full object-cover"}):i.jsx("div",{className:"w-32 h-32 md:w-40 md:h-40 rounded-full bg-card border border-border flex items-center justify-center font-display text-4xl text-muted-foreground",children:n.full_name.charAt(0)}),i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground",children:n.full_name}),n.practitioner_role==="head_trainer"&&i.jsx("span",{className:"inline-flex items-center font-body text-xs tracking-wider uppercase bg-foreground text-primary-foreground px-3 py-1",children:"Head Trainer"}),n.practitioner_role==="lead_trainer_founder"&&i.jsx("span",{className:"inline-flex items-center font-body text-xs tracking-wider uppercase bg-foreground text-primary-foreground px-3 py-1",children:"Lead Trainer & Founder"})]}),(n.location_city||n.location_country)&&i.jsxs("p",{className:"font-body text-base text-muted-foreground flex items-center gap-2 mb-3",children:[i.jsx(er,{size:16}),[n.location_city,n.location_country].filter(Boolean).join(", ")]}),o&&i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(Qm,{size:16,className:"text-accent fill-accent"}),i.jsx("span",{className:"font-body text-sm text-foreground",children:o}),i.jsxs("span",{className:"font-body text-sm text-muted-foreground",children:["(",s==null?void 0:s.length," review",(s==null?void 0:s.length)!==1?"s":"",")"]})]}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:n.modalities.map(a=>i.jsx("span",{className:"font-body text-xs tracking-wider uppercase bg-card border border-border px-3 py-1.5",children:a},a))}),i.jsxs("div",{className:"flex items-center gap-2",children:[(n.session_type==="online"||n.session_type==="both")&&i.jsxs("span",{className:"inline-flex items-center gap-1.5 font-body text-xs bg-accent/10 text-accent px-3 py-1.5 border border-accent/20",children:[i.jsx(Vu,{size:14})," Online Sessions"]}),(n.session_type==="in_person"||n.session_type==="both")&&i.jsxs("span",{className:"inline-flex items-center gap-1.5 font-body text-xs bg-accent/10 text-accent px-3 py-1.5 border border-accent/20",children:[i.jsx(cn,{size:14})," In Person Sessions"]})]})]})]}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12",children:[i.jsxs("div",{className:"lg:col-span-2 space-y-10",children:[n.bio&&i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-xl font-semibold text-foreground mb-3",children:"About"}),i.jsx("p",{className:"font-body text-base text-muted-foreground leading-relaxed whitespace-pre-line",children:n.bio})]}),n.certifications&&n.certifications.length>0&&i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-xl font-semibold text-foreground mb-3",children:"Certifications"}),i.jsx("ul",{className:"space-y-2",children:n.certifications.map((a,l)=>i.jsxs("li",{className:"flex items-center gap-3 font-body text-sm text-muted-foreground",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent"}),a]},l))})]}),s&&s.length>0&&i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-xl font-semibold text-foreground mb-4",children:"Reviews"}),i.jsx("div",{className:"space-y-4",children:s.map(a=>i.jsxs("div",{className:"border border-border p-5",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx("div",{className:"flex",children:Array.from({length:5}).map((l,c)=>i.jsx(Qm,{size:14,className:c<a.rating?"text-accent fill-accent":"text-border"},c))}),i.jsx("span",{className:"font-body text-sm font-medium text-foreground",children:a.reviewer_name})]}),a.comment&&i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:a.comment})]},a.id))})]})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsx(dV,{practitionerId:n.id,practitionerName:n.full_name}),n.pricing_info&&i.jsxs("div",{className:"border border-border p-5",children:[i.jsxs("h3",{className:"font-display text-lg font-semibold text-foreground flex items-center gap-2 mb-2",children:[i.jsx(Ql,{size:16})," Pricing"]}),i.jsx("p",{className:"font-body text-sm text-muted-foreground whitespace-pre-line",children:n.pricing_info})]})]})]})]})}),i.jsx(nt,{})]}):i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsxs("div",{className:"pt-32 text-center",children:[i.jsx("p",{className:"font-display text-2xl text-foreground mb-4",children:"Practitioner not found"}),i.jsx(xe,{to:"/practitioners",className:"font-body text-accent hover:underline",children:"Back to directory"})]})]})},uV=()=>i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx(Ke,{}),i.jsx("section",{className:"pt-32 pb-16",children:i.jsxs("div",{className:"max-w-xl mx-auto px-6 text-center",children:[i.jsx(Ho,{size:64,className:"mx-auto text-accent mb-6"}),i.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Payment Successful"}),i.jsx("p",{className:"font-body text-base text-muted-foreground mb-8",children:"Thank y
416ou for your booking! The practitioner will be in touch with you shortly to confirm your session details."}),i.jsx(xe,{to:"/practitioners",className:"inline-block font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground px-8 py-4 hover:bg-foreground/90 transition-colors",children:"Back to Directory"})]})}),i.jsx(nt,{})]}),hV=()=>{const[e,t]=x.useState(""),[n,r]=x.useState(""),[s,o]=x.useState(!1),a=Mn(),{user:l}=Ci(),{toast:c}=Yt();x.useEffect(()=>{l&&K.functions.invoke("admin-check").then(({data:u})=>{u!=null&&u.is_admin&&a("/admin/dashboard")})},[l,a]);const d=async u=>{u.preventDefault(),o(!0);try{const{error:h}=await K.auth.signInWithPassword({email:e,password:n});if(h)throw h;const{data:f}=await K.functions.invoke("admin-check");f!=null&&f.is_admin?a("/admin/dashboard"):(await K.auth.signOut(),c({title:"Access denied",description:"This account does not have admin privileges.",variant:"destructive"}))}catch(h){c({title:"Error",description:h.message,variant:"destructive"})}finally{o(!1)}};return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6",children:i.jsxs("div",{className:"w-full max-w-md",children:[i.jsxs("a",{href:"/",className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors mb-10",children:[i.jsx(Zn,{size:16}),"Back to home"]}),i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx(uS,{size:24,className:"text-accent"}),i.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground",children:"Admin Login"})]}),i.jsx("p",{className:"font-body text-muted-foreground mb-8",children:"Sign in with your admin credentials."}),i.jsxs("form",{onSubmit:d,className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Email"}),i.jsx("input",{type:"email",value:e,onChange:u=>t(u.target.value),required:!0,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"font-body text-sm text-foreground block mb-1.5",children:"Password"}),i.jsx("input",{type:"password",value:n,onChange:u=>r(u.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent"})]}),i.jsx("button",{type:"submit",disabled:s,className:"w-full font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground py-4 hover:bg-foreground
416/90 transition-colors disabled:opacity-50",children:s?"Signing in...":"Sign In"})]})]})})},fV=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],mV=["Spinal Attunement","Parasympathetic Breathwork","The Self Holding Method"],pV=["Pacific/Auckland","Pacific/Fiji","Australia/Sydney","Australia/Melbourne","Australia/Brisbane","Australia/Adelaide","Australia/Perth","Pacific/Honolulu","Asia/Tokyo","Asia/Seoul","Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Kuala_Lumpur","Asia/Bangkok","Asia/Jakarta","Asia/Kolkata","Asia/Colombo","Asia/Dubai","Asia/Riyadh","Asia/Tehran","Asia/Karachi","Asia/Dhaka","Europe/Moscow","Europe/Istanbul","Europe/Athens","Europe/Helsinki","Europe/Berlin","Europe/Paris","Europe/Rome","Europe/Madrid","Europe/Amsterdam","Europe/Zurich","Europe/Vienna","Europe/Warsaw","Europe/Prague","Europe/London","Europe/Dublin","Europe/Lisbon","Africa/Johannesburg","Africa/Cairo","Africa/Lagos","Africa/Nairobi","America/Sao_Paulo","America/Buenos_Aires","America/Bogota","America/Mexico_City","America/New_York","America/Toronto","America/Chicago","America/Denver","America/Phoenix","America/Los_Angeles","America/Vancouver","America/Anchorage","UTC"],jf={full_name:"",email:"",phone:null,bio:null,photo_url:null,location_city:null,location_country:null,modalities:[],certifications:null,website:null,instagram:null,facebook:null,booking_url:null,availability:null,pricing_info:null,calendly_url:null,calendly_api_token:null,acuity_url:null,acuity_user_id:null,acuity_api_key:null,timezone:"Australia/Melbourne"},gV=()=>{const{toast:e}=Yt(),[t,n]=x.useState([]),[r,s]=x.useState(!0),[o,a]=x.useState("all"),[l,c]=x.useState(!1),[d,u]=x.useState(!1),[h,f]=x.useState(null),[m,y]=x.useState(jf),[p,w]=x.useState([]),[b,g]=x.useState([]),[v,j]=x.useState(!1),[k,S]=x.useState(!1),[N,T]=x.useState(!1),[R,P]=x.use
416State({...jf}),[F,O]=x.useState([]),[V,A]=x.useState([]);x.useEffect(()=>{I()},[]);const I=async()=>{const{data:L,error:M}=await K.functions.invoke("admin-practitioners",{body:{action:"list"}});!M&&(L!=null&&L.practitioners)&&n(L.practitioners),s(!1)},z=async L=>{var Z,be;S(!0);const{data:M,error:X}=await K.functions.invoke("admin-practitioners",{body:{action:"get_details",practitioner_id:L}});if(!X&&(M!=null&&M.practitioner)){const le=M.practitioner;y({full_name:le.full_name||"",email:le.email||"",phone:le.phone||null,bio:le.bio||null,photo_url:le.photo_url||null,location_city:le.location_city||null,location_country:le.location_country||null,modalities:le.modalities||[],certifications:le.certifications||null,website:le.website||null,instagram:le.instagram||null,facebook:le.facebook||null,booking_url:le.booking_url||null,availability:le.availability||null,pricing_info:le.pricing_info||null,calendly_url:le.calendly_url||null,calendly_api_token:le.calendly_api_token||null,acuity_url:le.acuity_url||null,acuity_user_id:le.acuity_user_id||null,acuity_api_key:le.acuity_api_key||null,timezone:le.timezone||"Australia/Melbourne",stripe_account_id:le.stripe_account_id||null,stripe_onboarding_complete:!!le.stripe_onboarding_complete}),w(((Z=M.availability)==null?void 0:Z.map(Re=>({day_of_week:Re.day_of_week,start_time:Re.start_time,end_time:Re.end_time,timezone:Re.timezone})))||[]),g(((be=M.services)==null?void 0:be.map(Re=>({id:Re.id,name:Re.name,description:Re.description,duration_minutes:Re.duration_minutes,price_cents:Re.price_cents,is_active:Re.is_active})))||[])}S(!1)},q=async(L,M)=>{const{error:X}=await K.functions.invoke("admin-practitioners",{body:{action:"update_approval",practitioner_id:L,is_approved:M}});X?e({title:"Error",description:"Failed to update",variant:"destructive"}):(e({title:M?"Approved":"Unapproved",description:"Practitioner updated."}),I())},_=async L=>{if(!confirm("Are you sure you want to delete this practitioner?"))return;const{error:M}=await K.functions.invoke("admin-practitioners",{body:{action:"delete",practitioner_id:L}});M?e({title:"Error",description:"Failed to delete",variant:"destructive"}):(e({title:"Deleted",description:"Practitioner removed."}),h===L&&f(null),I())},E=L=>{if(h===L){f(null);return}f(L),c(!1),z(L)},D=async()=>{if(!h)return;j(!0);const{stripe_account_id:L,stripe_onboarding_complete:M,...X}=m,{error:Z}=await K.functions.invoke("admin-practitioners",{body:{action:"update_details",practitioner_id:h,details:X,availability_slots:p,services:b}});Z?e({title:"Error",description:"Failed to save",variant:"destructive"}):(e({title:"Saved",description:"Practitioner details updated."}),I()),j(!1)},G=async()=>{if(!R.full_name.trim()||!R.email.trim())return;u(!0);const{data:L,error:M}=await K.functions.invoke("admin-practitioners",{body:{action:"invite",invite_email:R.email.trim(),invite_name:R.full_name.trim(),details:R}});M||L!=null&&L.error?e({title:"Error",description:(L==null?void 0:L.error)||(M==null?void 0:M.message)||"Failed to invite",variant:"destructive"}):(e({title:"Practitioner added",description:(L==null?void 0:L.message)||"Successfully invited."}),P({...jf}),O([]),A([]),c(!1),I()),u(!1)},W=async(L,M)=>{T(!0);const X=L.name.split(".").pop(),Z=`${crypto.randomUUID()}.${X}`,{error:be}=await K.storage.from("practitioner-photos").upload(Z,L);if(be){e({title:"Upload failed",description:be.message,variant:"destructive"}),T(!1);return}const{data:{publicUrl:le}}=K.storage.from("practitioner-photos").getPublicUrl(Z);M?P(Re=>({...Re,photo_url:le})):y(Re=>({...Re,photo_url:le})),T(!1)},se=t.filter(L=>o==="pending"?!L.is_approved:o==="approved"?L.is_approved:!0);return r?i.jsx("p",{className:"font-body text-muted-foreground",children:"Loading practitioners..."}):i.jsxs("div",{children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6",children:[i.jsx("div",{className:"flex gap-2",children:["all","pending","approved"].map(L=>i.jsxs("button",{onClick:()=>a(L),className:`font-body text-xs tracking-widest uppercase px-4 py-2 border transition-colors ${o===L?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:[L," (",L==="all"?t.length:t.filter(M=>L==="pending"?!M.is_approved:M.is_approved).length,")"]},L))}),i.jsxs("button",{onClick:()=>{c(!l),f(null)},className:"inline-flex items-center gap-1.5 font-body text-xs tracking-widest uppercase border border-border px-4 py-2 hover:bg-card transition-colors",children:[i.jsx(tM,{size:14})," Add Practitioner"]}
416)]}),l&&i.jsxs("div",{className:"border border-border p-6 mb-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:"Create New Practitioner"}),i.jsx("button",{onClick:()=>c(!1),className:"text-muted-foreground hover:text-foreground",children:i.jsx(wi,{size:16})})]}),i.jsx(mw,{details:R,setDetails:P,availability:F,setAvailability:O,services:V,setServices:A,onPhotoUpload:L=>W(L,!0),uploadingPhoto:N}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"This will create an account, auto-approve their profile, and send an invitation email."}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("button",{onClick:G,disabled:d||!R.email.trim()||!R.full_name.trim(),className:"inline-flex items-center gap-2 font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground px-6 py-3 hover:bg-foreground/90 transition-colors disabled:opacity-50",children:[d&&i.jsx(Cn,{size:14,className:"animate-spin"}),"Create & Invite"]}),i.jsx("button",{onClick:()=>c(!1),className:"font-body text-sm text-muted-foreground hover:text-foreground px-4 py-3",children:"Cancel"})]})]}),se.length===0?i.jsx("p",{className:"font-body text-muted-foreground",children:"No practitioners found."}):i.jsx("div",{className:"space-y-4",children:se.map(L=>i.jsxs("div",{children:[i.jsxs("div",{className:"border border-border p-5 flex flex-col md:flex-row md:items-center gap-4",children:[i.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[L.photo_url?i.jsx("img",{src:L.photo_url,alt:L.full_name,className:"w-12 h-12 rounded-full object-cover"}):i.jsx("div",{className:"w-12 h-12 rounded-full bg-card border border-border"}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground truncate",children:L.full_name}),i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:L.email}),i.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[i.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${L.is_approved?"bg-green-500":"bg-yellow-500"}`}),i.jsx("span",{className:"font-body text-xs text-muted-foreground",children:L.is_approved?"Approved":"Pending"}),i.jsxs("span",{className:`font-body text-xs ${L.stripe_onboarding_complete?"text-green-600":"text-red-500"}`,children:["⢠",L.stripe_onboarding_complete?"Stripe â":"No Stripe"]}),L.timezone&&i.jsxs("span",{className:"font-body text-xs text-muted-foreground",children:["⢠",L.timezone]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>E(L.id),className:`p-2 border transition-colors ${h===L.id?"bg-foreground text-primary-foreground border-foreground":"border-border hover:bg-card"}`,title:"Edit details",children:i.jsx(XR,{size:14})}),i.jsx("a",{href:`/practitioners/${L.id}`,target:"_blank",rel:"noopener noreferrer",className:"p-2 border border-border hover:bg-card transition-colors",title:"View profile",children:i.jsx(Zd,{size:14})}),L.is_approved?i.jsx("button",{onClick:()=>q(L.id,!1),className:"p-2 border border-border hover:bg-card transition-colors text-yellow-600",title:"Unapprove",children:i.jsx(aS,{size:14})}):i.jsx("button",{onClick:()=>q(L.id,!0),className:"p-2 border border-border hover:bg-card transition-colors text-green-600",title:"Approve",children:i.jsx(Ho,{size:14})}),i.jsx("button",{onClick:()=>_(L.id),className:"p-2 border border-border hover:bg-card transition-colors text-red-500",title:"Delete",children:i.jsx(zu,{size:14})})]})]}),h===L.id&&i.jsx("div",{className:"border border-t-0 border-border p-6 space-y-6",children:k?i.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[i.jsx(Cn,{size:16,className:"animate-spin"})," Loading details..."]}):i.jsxs(i.Fragment,{children:[i.jsx(mw,{details:m,setDetails:y,availability:p,setAvailability:w,services:b,setServices:g,onPhotoUpload:M=>W(M,!1),uploadingPhoto:N,practitionerId:L.id,stripeAccountId:m.stripe_account_id??null,stripeOnboardingComplete:!!m.stripe_onboarding_complete}),i.jsxs("div",{className:"flex gap-3 pt-2",children:[i.jsxs("button",{onClick:D,disabled:v,className:"inline-flex items-center gap-2 font-body text-sm tracking-widest uppercase bg-foreground text-primary-foreground px-6 py-3 hover:bg-foreground
416/90 transition-colors disabled:opacity-50",children:[v?i.jsx(Cn,{size:14,className:"animate-spin"}):i.jsx(dS,{size:14}),"Save Changes"]}),i.jsx("button",{onClick:()=>f(null),className:"font-body text-sm text-muted-foreground hover:text-foreground px-4 py-3",children:"Cancel"})]})]})})]},L.id))})]})},Ee="px-4 py-3 border border-border bg-card text-foreground font-body text-sm focus:outline-none focus:ring-2 focus:ring-accent w-full",Me="font-body text-xs tracking-widest uppercase text-muted-foreground mb-1.5 block",mw=({details:e,setDetails:t,availability:n,setAvailability:r,services:s,setServices:o,onPhotoUpload:a,uploadingPhoto:l,practitionerId:c,stripeAccountId:d,stripeOnboardingComplete:u})=>{const{toast:h}=Yt(),[f,m]=x.useState(!1),y=(p,w)=>{t(b=>({...b,[p]:w}))};return i.jsxs("div",{className:"space-y-8",children:[i.jsxs("div",{children:[i.jsxs("h4",{className:"font-body text-xs tracking-widest uppercase text-accent mb-4 flex items-center gap-2",children:[i.jsx(ny,{size:14})," Basic Information"]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Full Name *"}),i.jsx("input",{type:"text",value:e.full_name,onChange:p=>y("full_name",p.target.value),className:Ee})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Email *"}),i.jsx("input",{type:"email",value:e.email,onChange:p=>y("email",p.target.value),className:Ee})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Phone"}),i.jsx("input",{type:"tel",value:e.phone||"",onChange:p=>y("phone",p.target.value||null),className:Ee})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Timezone"}),i.jsx("select",{value:e.timezone||"Australia/Melbourne",onChange:p=>y("timezone",p.target.value),className:Ee,children:pV.map(p=>i.jsx("option",{value:p,children:p},p))})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"City"}),i.jsx("input",{type:"text",value:e.location_city||"",onChange:p=>y("location_city",p.target.value||null),className:Ee})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Country"}),i.jsxs("select",{value:e.location_country||"",onChange:p=>y("location_country",p.target.value||null),className:Ee,children:[i.jsx("option",{value:"",children:"Select country"}),Xy.map(p=>i.jsx("option",{value:p,children:p},p))]})]})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Profile Photo"}),i.jsxs("div",{className:"flex items-center gap-4",children:[e.photo_url?i.jsx("img",{src:e.photo_url,alt:"",className:"w-16 h-16 rounded-full object-cover"}):i.jsx("div",{className:"w-16 h-16 rounded-full bg-card border border-border flex items-center justify-center text-muted-foreground",children:i.jsx(Xm,{size:16})}),i.jsxs("label",{className:"inline-flex items-center gap-2 font-body text-xs tracking-widest uppercase border border-border px-4 py-2 hover:bg-card transition-colors cursor-pointer",children:[l?i.jsx(Cn,{size:14,className:"animate-spin"}):i.jsx(Xm,{size:14}),l?"Uploading...":"Upload Photo",i.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:p=>{var w;(w=p.target.files)!=null&&w[0]&&a(p.target.files[0])}})]}),e.photo_url&&i.jsx("button",{onClick:()=>y("photo_url",null),className:"font-body text-xs text-muted-foreground hover:text-foreground",children:"Remove"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Bio"}),i.jsx("textarea",{value:e.bio||"",onChange:p=>y("bio",p.target.value||null),rows:4,className:Ee,placeholder:"Tell clients about this practitioner..."})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Modalities"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:mV.map(p=>i.jsx("button",{type:"button",onClick:()=>{const w=e.modalities||[];y("modalities",w.includes(p)?w.filter(b=>b!==p):[...w,p])},className:`font-body text-xs px-4 py-2 border transition-colors ${(e.modalities||[]).includes(p)?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground"}`,children:p},p))})]}),i.jsxs("div",{children:[i.jsxs("h4",{className:"font-body text-xs tracking-widest uppercase text-accent mb-4 flex items-center gap-2",children:[i.jsx(Dt,{size:14})," Links & Calendar Integration"]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Website"}),i.jsx("input",{type:"url",value:e.website||"",onChange:p=>y("website",p.target.value||null),className:Ee,placeholder:"https://"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Booking URL"}),i.jsx("input",{type:"url",value:e.booking_url||"",onChange:p=>y("booking_url",p.target.value||null),className:Ee,placeholder:"https://"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Instagram"}),i.jsx("input",{type:"text",value:e.instagram||"",onChange:p=>y("instagram",p.target.value||null),className:Ee,placeholder:"@handle"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Facebook"}),i.jsx("input",{type:"text",value:e.facebook||"",onChange:p=>y("facebook",p.target.value||null),className:Ee,placeholder:"Profile URL"})]})]})]}),i.jsxs("div",{children:[i.jsxs("h4",{className:"font-body text-xs tracking-widest uppercase text-accent mb-4 flex items-center gap-2",children:[i.jsx(Dt,{size:14}
416)," External Calendar Integration"]}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mb-4",children:"Connect Calendly or Acuity to cross-check availability and prevent double-bookings."}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Calendly URL"}),i.jsx("input",{type:"url",value:e.calendly_url||"",onChange:p=>y("calendly_url",p.target.value||null),className:Ee,placeholder:"https://calendly.com/username"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Calendly API Token"}),i.jsx("input",{type:"text",value:e.calendly_api_token||"",onChange:p=>y("calendly_api_token",p.target.value||null),className:Ee,placeholder:"Personal access token"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Acuity URL"}),i.jsx("input",{type:"url",value:e.acuity_url||"",onChange:p=>y("acuity_url",p.target.value||null),className:Ee,placeholder:"https://acuityscheduling.com/..."})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Acuity User ID"}),i.jsx("input",{type:"text",value:e.acuity_user_id||"",onChange:p=>y("acuity_user_id",p.target.value||null),className:Ee,placeholder:"User ID"})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Acuity API Key"}),i.jsx("input",{type:"text",value:e.acuity_api_key||"",onChange:p=>y("acuity_api_key",p.target.value||null),className:Ee,placeholder:"API key"})]})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Pricing Info"}),i.jsx("textarea",{value:e.pricing_info||"",onChange:p=>y("pricing_info",p.target.value||null),rows:2,className:Ee,placeholder:"e.g. $120 per session, packages available"})]}),c&&i.jsxs("div",{children:[i.jsxs("h4",{className:"font-body text-xs tracking-widest uppercase text-accent mb-4 flex items-center gap-2",children:[i.jsx(wo,{size:14})," Stripe Payments"]}),i.jsxs("div",{className:"border border-border p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full ${u?"bg-green-500":d?"bg-yellow-500":"bg-red-500"}`}),i.jsx("span",{className:"font-body text-sm text-foreground",children:u?"Stripe Connected":d?"Stripe account created â onboarding incomplete":"No Stripe account connected"})]}),d&&i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:["Account ID: ",d]}),!u&&i.jsxs("button",{type:"button",onClick:async()=>{m(!0);try{const{data:p,error:w}=await K.functions.invoke("admin-practitioners",{body:{action:"stripe_onboard",practitioner_id:c}});w||p!=null&&p.error?h({title:"Error",description:(p==null?void 0:p.error)||(w==null?void 0:w.message),variant:"destructive"}):p!=null&&p.url&&(window.open(p.url,"_blank"),h({title:"Stripe Onboarding",description:"Onboarding link opened in a new tab. Share this with the practitioner or complete it on their behalf."}))}catch(p){h({title:"Error",description:p.message,variant:"destructive"})}m(!1)},disabled:f,className:"inline-flex items-center gap-2 font-body text-xs tracking-widest uppercase border border-border px-4 py-2 hover:bg-card transition-colors disabled:opacity-50",children:[f?i.jsx(Cn,{size:14,className:"animate-spin"}):i.jsx(wo,{size:14}),d?"Resume Stripe Onboarding":"Set Up Stripe Connect"]}),!u&&i.jsx("p",{className:"font-body text-xs text-muted-foreground",children:"This will generate a Stripe onboarding link. You can complete it yourself or share it with the practitioner."})]})]}),i.jsxs("div",{children:[i.jsxs("h4",{className:"font-body text-xs tracking-widest uppercase text-accent mb-4 flex items-center gap-2",children:[i.jsx(Pn,{size:14})," Weekly Availability"]}),i.jsxs("div",{className:"space-y-2",children:[n.map((p,w)=>i.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[i.jsx("select",{value:p.day_of_week,onChange:b=>{const g=[...n];g[w]={...p,day_of_week:parseInt(b.target.value)},r(g)},className:`${Ee} w-auto`,children:fV.map((b,g)=>i.jsx("option",{value:g,children:b},g))}),i.jsx("input",{type:"time",value:p.start_time,onChange:b=>{const g=[...n];g[w]={...p,start_time:b.target.value},r(g)},className:`${Ee} w-auto`}),i.jsx("span",{className:"text-muted-foreground",children:"â"}),i.jsx("input",{type:"time",value:p.end_time,onChange:b=>{const g=[...n];g[w]={...p,end_time:b.target.value},r(g)},className:`${Ee} w-auto`}),i.jsx("button",{onClick:()=>r(n.filter((b,g)=>g!==w)),className:"p-2 text-red-500 hover:text-red-600",children:i.jsx(wi,{size:14})})]},w)),i.jsxs("button",{onClick:()=>r([...n,{day_of_week:1,start_time:"09:00",end_time:"17:00",timezone:e.timezone||"Australia/Melbourne"}]),className:"inline-flex items-center gap-1.5 font-body text-xs tracking-widest uppercase border border-dashed border-border px-4 py-2 text-muted-foreground hover:text-foreground hover:border-foreground transition-colors",children:[i.jsx(_s,{size:12})," Add Time Slot"]})]})]}),i.jsxs("div",{children:[i.jsxs("h4",{className:"font-body text-xs tracking-widest uppercase text-accent mb-4 flex items-center gap-2",children:[i.jsx(Dt,{size:14})," Sessions / Services"]}),i.jsxs("div",{className:"space-y-4",children:[s.map((p,w)=>i.jsxs("div",{className:"border border-border p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"font-body text-xs text-muted-foreground",children:["Service ",w+1]}),i.jsx("button",{onClick:()=>o(s.filter((b,g)=>g!==w)),className:"text-red-500 hover:text-red-600",children:i.jsx(wi,{size:14})})]}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Name"}),i.jsx("input",{type:"text",value:p.name,onChange:b=>{const g=[...s];g[w]={...p,name:b.target.value},o(g)},className:Ee})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Duration (min)"}),i.jsx("input",{type:"number",value:p.duration_minutes,onChange:b=>{const g=[...s];g[w]={...p,duration_minutes:parseInt(b.target.value)||60},o(g)},className:Ee})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Price ($)"}),i.jsx("input",{type:"number",step:"0.01",value:(p.price_cents/100).toFixed(2),onChange:b=>{const g=[...s];g[w]={...p,price_cents:Math.round(parseFloat(b.target.value||"0")*100)},o(g)},className:Ee})]})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:Me,children:"Description"}),i.jsx("textarea",{value:p.description||"",onChange:b=>{const g=[...s];g[w]={...p,description:b.target.value||null},o(g)},rows:2,className:Ee})]})]},w)),i.jsxs("button",{onClick:()=>o([...s,{name:"",description:null,duration_minutes:60,price_cents:12e3,is_active:!0}]),className:"inline-flex items-center gap-1.5 font-body text-xs tracking-widest uppercase border border-dashed border-border px-4 py-2 text-muted-foreground hover:text-foreground hover:border-foreground transition-colors",children:[i.jsx(_s,{size:12})," Add Service"]})]})]})]})},yV=()=>{const{toast:e}=Yt(),[t,n]=x.useState([]),[r,s]=x.useState(!0),[o,a]=x.useState("all");x.useEffect(()=>{l()},[]);const l=async()=>{const{data:h,error:f}=await K.functions.invoke("admin-reviews",{body:{action:"list"}});!f&&(h!=null&&h.reviews)&&n(h.reviews),s(!1)},c=async(h,f)=>{const{error:m}=await K.functions.invoke("admin-reviews",{body:{action:"update_approval",review_id:h,is_approved:f}}
416);m?e({title:"Error",description:"Failed to update",variant:"destructive"}):(e({title:f?"Approved":"Unapproved"}),l())},d=async h=>{if(!confirm("Delete this review?"))return;const{error:f}=await K.functions.invoke("admin-reviews",{body:{action:"delete",review_id:h}});f?e({title:"Error",description:"Failed to delete",variant:"destructive"}):(e({title:"Deleted"}),l())},u=t.filter(h=>o==="pending"?!h.is_approved:o==="approved"?h.is_approved:!0);return r?i.jsx("p",{className:"font-body text-muted-foreground",children:"Loading reviews..."}):i.jsxs("div",{children:[i.jsx("div",{className:"flex gap-2 mb-6",children:["all","pending","approved"].map(h=>i.jsxs("button",{onClick:()=>a(h),className:`font-body text-xs tracking-widest uppercase px-4 py-2 border transition-colors ${o===h?"bg-foreground text-primary-foreground border-foreground":"border-border text-muted-foreground hover:border-foreground hover:text-foreground"}`,children:[h," (",h==="all"?t.length:t.filter(f=>h==="pending"?!f.is_approved:f.is_approved).length,")"]},h))}),u.length===0?i.jsx("p",{className:"font-body text-muted-foreground",children:"No reviews found."}):i.jsx("div",{className:"space-y-4",children:u.map(h=>i.jsx("div",{className:"border border-border p-5",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("p",{className:"font-body text-sm font-medium text-foreground",children:h.reviewer_name}),i.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${h.is_approved?"bg-green-500":"bg-yellow-500"}`})]}),i.jsx("div",{className:"flex items-center gap-1 mb-2",children:Array.from({length:5}).map((f,m)=>i.jsx(Qm,{size:12,className:m<h.rating?"text-yellow-500 fill-yellow-500":"text-muted-foreground"},m))}),h.comment&&i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-1",children:h.comment}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:["For: ",h.practitioner_name||h.practitioner_id," ⢠",new Date(h.created_at).toLocaleDateString()]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[h.is_approved?i.jsx("button",{onClick:()=>c(h.id,!1),className:"p-2 border border-border hover:bg-card transition-colors text-yellow-600",title:"Unapprove",children:i.jsx(aS,{size:14})}):i.jsx("button",{onClick:()=>c(h.id,!0),className:"p-2 border border-border hover:bg-card transition-colors text-green-600",title:"Approve",children:i.jsx(Ho,{size:14})}),i.jsx("button",{onClick:()=>d(h.id),className:"p-2 border border-border hover:bg-card transition-colors text-red-500",title:"Delete",children:i.jsx(zu,{size:14})})]})]})},h.id))})]})},xV=()=>{var a,l,c,d,u,h;const[e,t]=x.useState(null),[n,r]=x.useState(!0);x.useEffect(()=>{s()},[]);const s=async()=>{const{data:f,error:m}=await K.functions.invoke("admin-payments");!m&&f&&t(f),r(!1)},o=(f,m="usd")=>new Intl.NumberFormat("en-US",{style:"currency",currency:m.toUpperCase()}).format(f/100);return n?i.jsx("p",{className:"font-body text-muted-foreground",children:"Loading payments..."}):e?i.jsxs("div",{children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-8",children:[i.jsxs("div",{className:"border border-border p-5",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Ql,{size:16,className:"text-muted-foreground"}),i.jsx("span",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Available Balance"})]}),i.jsx("p",{className:"font-display text-2xl font-bold text-foreground",children:((l=(a=e.balance)==null?void 0:a.available)==null?void 0:l.map(f=>o(f.amount,f.currency)).join(", "))||"$0.00"})]}),i.jsxs("div",{className:"border border-border p-5",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(hS,{size:16,className:"text-muted-foreground"}),i.jsx("span",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Pending Balance"})]}),i.jsx("p",{className:"font-display text-2xl font-bold text-foreground",children:((d=(c=e.balance)==null?void 0:c.pending)==null?void 0:d.map(f=>o(f.amount,f.currency)).join(", "))||"$0.00"})]})]}),i.jsx("h3",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-4",children:"Recent Transactions"}),((u=e.payments)==null?void 0:u.length)===0?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"No transactions yet."}):i.jsx("div",{className:"border border-border divide-y divide-border",children:(h=e.payments)==null?void 0:h.map(f=>i.jsxs("div",{className:"p-4 flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm text-foreground font-medium",children:o(f.amount,f.currency)}),i.jsxs("p",{className:"font-body text-xs text-muted-foreground",children:["Fee: ",f.application_fee_amount?o(f.application_fee_amount,f.currency):"N/A"]})]}),i.jsxs("div",{className:"text-right",children:[i.jsx("span",{className:`inline-block font-body text-xs px-2 py-1 ${f.status==="succeeded"?"bg-green-100 text-green-700":f.status==="pending"?"bg-yellow-100 text-yellow-700":"bg-red-100 text-red-700"}`,children:f.status}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-1",children:new Date(f.created*1e3).toLocaleDateString()})]})]},f.id))})]}):i.jsx("p",{className:"font-body text-muted-foreground",children:"Could not load payment data."})},vV=()=>{const{user:e,loading:t,signOut:n}=Ci(),r=Mn(),{toast:s}=Yt(),[o,a]=x.useState(!1),[l,c]=x.useState(!0),[d,u]=x.useState("practitioners");x.useEffect(()=>{!t&&!e&&r("/admin/login")},[e,t,r]),x.useEffect(()=>{e&&h()},[e]);const h=async()=>{const{data:m,error:y}=await K.functions.invoke("admin-check");if(y||!(m!=null&&m.is_admin)){s({title:"Access denied",description:"You are not an admin.",variant:"destructive"}),r("/");return}a(!0),c(!1)};if(t||l)return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:i.jsx("p",{className:"font-body text-muted-foreground",children:"Verifying access..."})});if(!o)return null;const f=[{key:"practitioners",label:"Practitioners",icon:i.jsx(cn,{size:16})},{key:"reviews",label:"Reviews",icon:i.jsx(HR,{size:16})},{key:"payments",label:"Payments",icon:i.jsx(wo,{size:16})}];return i.jsx("div",{className:"min-h-screen bg-background",children:i.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-12",children:[i.jsxs("div",{className:"flex items-center justify-between mb-10",children:[i.jsxs("a",{href:"/",className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(Zn,{size:16}),"Back to home"]}),i.jsxs("button",{onClick:()=>{n(),r("/")},className:"inline-flex items-center gap-2 font-body text-sm text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(cS,{size:16}),"Sign out"]})]}),i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx(uS,{size:24,className:"text-accent"}),i.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold text-foreground",children:"Admin Dashboard"})]}),i.jsx("p",{className:"font-body text-muted-foreground mb-10",children:"Manage practitioners, reviews, and payments."}),i.jsx("div",{className:"flex gap-1 border-b border-border mb-8",children:f.map(m=>i.jsxs("button",{onClick:()=>u(m.key),className:`inline-flex items-center gap-2 font-body text-sm px-5 py-3 border-b-2 transition-colors ${d===m.key?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[m.icon,m.label]},m.key))}),d==="practitioners"&&i.jsx(gV,{}),d==="reviews"&&i.jsx(yV,{}),d==="payments"&&i.jsx(xV,{})]})})},bV=()=>
416{const[e,t]=x.useState("loading"),[n,r]=x.useState(!1),s=new URLSearchParams(window.location.search).get("token");x.useEffect(()=>{if(!s){t("invalid");return}(async()=>{try{const d=await fetch(`https://ellvyqymdmrobwgeawgv.supabase.co/functions/v1/handle-email-unsubscribe?token=${s}`,{headers:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVsbHZ5cXltZG1yb2J3Z2Vhd2d2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ3ODY1NTIsImV4cCI6MjA5MDM2MjU1Mn0.9v05GH0GQqZCVoju5xRr-JqGeSHKpZxqGf3IVam3Ogs"}}),u=await d.json();d.ok&&u.valid?t("valid"):u.reason==="already_unsubscribed"?t("already"):t("invalid")}catch{t("invalid")}})()},[s]);const o=async()=>{if(s){r(!0);try{const{data:a,error:l}=await K.functions.invoke("handle-email-unsubscribe",{body:{token:s}});l||a!=null&&a.error?t("error"):(a==null?void 0:a.reason)==="already_unsubscribed"?t("already"):t("success")}catch{t("error")}r(!1)}};return i.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6",children:i.jsxs("div",{className:"max-w-md w-full text-center space-y-6",children:[i.jsx("h1",{className:"font-heading text-2xl tracking-wide text-foreground",children:"Email Preferences"}),e==="loading"&&i.jsx("p",{className:"font-body text-muted-foreground",children:"Verifying..."}),e==="valid"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"font-body text-muted-foreground",children:"Would you like to unsubscribe from our emails?"}),i.jsx("button",{onClick:o,disabled:n,className:"font-body text-xs tracking-widest uppercase bg-foreground text-primary-foreground px-8 py-3 hover:bg-foreground
416/90 transition-colors disabled:opacity-50",children:n?"Processing...":"Confirm Unsubscribe"})]}),e==="success"&&i.jsx("p",{className:"font-body text-muted-foreground",children:"You have been successfully unsubscribed. You will no longer receive emails from us."}),e==="already"&&i.jsx("p",{className:"font-body text-muted-foreground",children:"You are already unsubscribed from our emails."}),e==="invalid"&&i.jsx("p",{className:"font-body text-muted-foreground",children:"This unsubscribe link is invalid or has expired."}),e==="error"&&i.jsx("p",{className:"font-body text-destructive",children:"Something went wrong. Please try again later."}),i.jsx("a",{href:"/",className:"inline-block font-body text-xs tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors mt-8",children:"â Back to Soma Mystica®"})]})})},wV=({trainers:e})=>e.length?i.jsx("section",{className:"bg-card py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-10",children:"Meet Your Trainers"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:e.map((t,n)=>i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:n*.15},className:"flex flex-col sm:flex-row gap-6 items-start",children:[t.imageUrl&&i.jsx("img",{src:t.imageUrl,alt:t.name,className:"w-24 h-24 rounded-full object-cover shrink-0",loading:"lazy"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground",children:t.name}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mt-1",children:t.role}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-3 leading-relaxed",children:t.bio})]})]},n))})]})}):null,jV=({facilitator:e})=>i.jsx("section",{className:"bg-card py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-10",children:"Your Lead Facilitator"}),i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"flex flex-col md:flex-row gap-8 items-start",children:[e.imageUrl&&i.jsx("img",{src:e.imageUrl,alt:e.name,className:"w-32 h-32 md:w-40 md:h-40 rounded-full object-cover shrink-0",loading:"lazy"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-xl md:text-2xl text-foreground",children:e.name}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mt-1",children:e.role}),i.jsx("p",{className:"font-body text-sm md:text-base text-muted-foreground mt-4 leading-relaxed",children:e.bio})]})]})]})}),pw=({facilitators:e,title:t,description:n})=>e.length?i.jsx("section",{className:"py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-3",children:t??"Guest Facilitators & Lecturers"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-10",children:n??"This training features both pre-recorded and live guest lectures from leading practitioners and educators."}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-8",children:e.map((r,s)=>i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:s*.1},className:"flex items-start gap-5",children:[r.imageUrl?i.jsx("img",{src:r.imageUrl,alt:r.name,className:"w-16 h-16 rounded-full object-cover shrink-0",loading:"lazy"}):i.jsx("div",{className:"w-16 h-16 rounded-full bg-card border border-border flex items-center justify-center font-display text-lg text-muted-foreground shrink-0",children:r.name.charAt(0)}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-base text-foreground",children:r.name}),r.role&&i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mt-0.5",children:r.role}),r.bio&&i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-2 leading-relaxed",children:r.bio})]})]},s))})]})}):null,kV=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m_=({programSlug:e})=>{const[t,n]=x.useState(new Date),[r,s]=x.useState([]),[o,a]=x.useState(null),[l,c]=x.useState(!0);x.useEffect(()=>{(async()=>{c(!0);const{data:p}=await K.from("training_events").select("*").eq("program_slug",e).gte("event_date",et(new Date,"yyyy-MM-dd")).order("event_date",{ascending:!0});s(p||[]),c(!1)})()},[e,t]);const d=oz({start:aw(t),end:iz(t)}
416),u=oV(aw(t)),h=y=>r.filter(p=>Up(new Date(p.event_date),y)),f=o?h(o):[],m=y=>h(y).length>0;return i.jsxs("section",{className:"max-w-5xl mx-auto px-6 lg:px-12 py-16 md:py-20",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-10",children:"Upcoming Training Dates"}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-8",children:[i.jsxs("div",{className:"lg:col-span-3",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("button",{onClick:()=>n(aV(t,1)),className:"p-2 hover:bg-muted rounded-md transition-colors",children:i.jsx(ty,{size:18,className:"text-foreground"})}),i.jsx("h3",{className:"font-display text-lg text-foreground",children:et(t,"MMMM yyyy")}),i.jsx("button",{onClick:()=>n(c_(t,1)),className:"p-2 hover:bg-muted rounded-md transition-colors",children:i.jsx(Uu,{size:18,className:"text-foreground"})})]}),i.jsxs("div",{className:"grid grid-cols-7 gap-1",children:[kV.map(y=>i.jsx("div",{className:"text-center font-body text-xs tracking-widest uppercase text-muted-foreground py-2",children:y},y)),Array.from({length:u}).map((y,p)=>i.jsx("div",{},`empty-${p}`)),d.map(y=>{const p=m(y),w=o&&Up(y,o);return i.jsxs("button",{onClick:()=>p&&a(y),className:` 417 relative py-3 text-center font-body text-sm rounded-md transition-all 418 ${p?"cursor-pointer hover:bg-accent/20 font-medium text-foreground":"text-muted-foreground cursor-default"} 419 ${w?"bg-accent text-accent-foreground":""} 420 `,children:[et(y,"d"),p&&i.jsx("span",{className:"absolute bottom-1 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-accent"})]},y.toISOString())})]})]}),i.jsx("div",{className:"lg:col-span-2",children:l?i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Loading eventsâ¦"}):o&&f.length>0?i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:et(o,"EEEE, MMMM d, yyyy")}),f.map(y=>i.jsxs($.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},className:"border border-border rounded-lg p-4 space-y-2",children:[i.jsx("h4",{className:"font-display text-base text-foreground",children:y.title}),(y.start_time||y.end_time)&&i.jsxs("p",{className:"font-body text-sm text-muted-foreground",children:[y.start_time&&et(new Date(`2000-01-01T${y.start_time}`),"h:mm a"),y.end_time&&` â ${et(new Date(`2000-01-01T${y.end_time}`),"h:mm a")}`]}),i.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:y.is_online?i.jsxs(i.Fragment,{children:[i.jsx(Jm,{size:14,className:"text-accent"}),i.jsx("span",{className:"font-body",children:"Online"})]}):i.jsxs(i.Fragment,{children:[i.jsx(er,{size:14,className:"text-accent"}),i.jsx("span",{className:"font-body",children:y.location||"TBA"})]})}),y.description&&i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:y.description})]},y.id))]}):i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx("p",{className:"font-body text-sm text-muted-foreground text-center",children:r.length===0?"No upcoming training dates scheduled yet. Check back soon!":"Select a highlighted date to see event details."})})})]}),!l&&r.length>0&&i.jsxs("div",{className:"mt-14",children:[i.jsx("h3",{className:"font-display text-xl md:text-2xl text-foreground mb-8",children:"All Upcoming Dates"}),i.jsx("div",{className:"space-y-0",children:r.map((y,p)=>i.jsxs($.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:p*.05},className:"flex flex-col md:flex-row md:items-center gap-3 md:gap-6 border-b border-border py-5",children:[i.jsx("div",{className:"shrink-0 md:w-28",children:i.jsx("p",{className:"font-display text-base text-foreground",children:et(new Date(y.event_date),"MMM d, yyyy")})}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h4",{className:"font-display text-base text-foreground",children:y.title}),y.description&&i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-1 leading-relaxed line-clamp-2",children:y.description})]}),i.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground shrink-0",children:y.is_online?i.jsxs(i.Fragment,{children:[i.jsx(Jm,{size:14,className:"text-accent"}),i.jsx("span",{className:"font-body",children:"Online"})]}):i.jsxs(i.Fragment,{children:[i.jsx(er,{size:14,className:"text-accent"}),i.jsx("span",{className:"font-body",children:y.location||"TBA"})]})})]},y.id))})]})]})},SV=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-80px"});return i.jsx("section",{className:"bg-card py-16 md:py-20",ref:e,children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 lg:px-12 text-center",children:[i.jsxs($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.7},className:"flex items-center justify-center gap-2 mb-4",children:[i.jsx(tr,{size:16,className:"text-accent"}),i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent",children:"Experience the Work First"})]}),i.jsxs($.h3,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.7,delay:.1},className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:["Not ready for training? Join ",i.jsx("em",{className:"italic",children:"Portal to Self"})]}),i.jsx($.p,{initial:{opacity:0,y:15},animate:t?{opacity:1,y:0}:{},transition:{duration:.7,delay:.2},className:"font-body text-base text-muted-foreground max-w-2xl mx-auto leading-relaxed mb-8",children:"Experience the transformative power of Spinal Attunement through our monthly membership â including twice-monthly live group attunements with Sigourney Belle, somatic classes, and a full replay portal. $45/month, cancel anytime."}),i.jsx($.div,{initial:{opacity:0}
420,animate:t?{opacity:1}:{},transition:{duration:.7,delay:.4},children:i.jsxs(xe,{to:"/portal-to-self",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Learn More",i.jsx(ue,{size:16})]})})]})})},Zy=({title:e,subtitle:t,tagline:n,overviewKicker:r,heroImage:s,overview:o,whatYoullLearn:a,modules:l,duration:c,format:d,certification:u,outcomes:h,trainers:f=[],leadFacilitator:m,guestFacilitators:y=[],guestFacilitatorsTitle:p,guestFacilitatorsDescription:w,preRecordedFacilitators:b=[],programSlug:g,pricing:v=[],pricingNote:j,earlyBird:k,waitlistUrl:S,externalSiteUrl:N,externalSiteLabel:T,testimonials:R=[],idealFor:P=[],closingHeadline:F,closingText:O,applyUrl:V,extraSection:A,seoTitle:I,seoDescription:z,seoPath:q})=>{const _=V??"https://portal.somamystica.com/soma-mystica-application-new-programs";return i.jsxs("div",{className:"min-h-screen bg-background",children:[I&&z&&q&&i.jsx($t,{title:I,description:z,path:q}),i.jsx(Ke,{}),i.jsxs("section",{className:"relative h-[60vh] md:h-[70vh] overflow-hidden",children:[i.jsx("img",{src:s,alt:e,className:"absolute inset-0 w-full h-full object-cover"}
420),i.jsx("div",{className:"absolute inset-0 bg-foreground/60"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center h-full text-center px-6",children:[i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"font-body text-sm tracking-widest uppercase text-primary-foreground/60 mb-4",children:t}),i.jsx($.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1},className:"font-display text-4xl md:text-6xl lg:text-7xl text-primary-foreground max-w-4xl",children:e}),n&&i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"font-body text-sm md:text-base tracking-wider text-primary-foreground/50 mt-4",children:n}),i.jsxs($.a,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.45},href:_,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground border border-primary-foreground/60 px-8 py-4 hover:bg-primary-foreground hover:text-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})]}),i.jsx("div",{className:"max-w-5xl mx-auto px-6 lg:px-12 pt-10",children:i.jsxs(xe,{to:"/#trainings",className:"inline-flex items-center gap-2 font-body text-sm tracking-widest uppercase text-muted-foreground hover:text-foreground transition-colors",children:[i.jsx(Zn,{size:14}),"All Trainings"]})}),N&&i.jsx("div",{className:"max-w-5xl mx-auto px-6 lg:px-12 pt-8",children:i.jsxs("div",{className:"border border-border bg-muted/30 px-6 py-6 md:px-8 md:py-7 flex flex-col md:flex-row md:items-center gap-4 md:gap-8",children:[i.jsx("p",{className:"font-body text-base text-foreground flex-1",children:T??`Explore the dedicated ${e} website for full curriculum details, upcoming cohorts and enrolment.`}),i.jsxs("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-6 py-3 hover:bg-foreground hover:text-primary-foreground transition-all duration-500 whitespace-nowrap",children:["Visit Site",i.jsx(Zd,{size:14})]})]})}),k&&i.jsx("div",{className:"max-w-5xl mx-auto px-6 lg:px-12 pt-8",children:i.jsxs("div",{className:"border border-accent bg-accent/10 px-6 py-5 md:px-8 md:py-6 flex items-center gap-4",children:[i.jsx(tr,{className:"text-accent shrink-0",size:24,strokeWidth:1.5}),i.jsx("p",{className:"font-body text-base md:text-lg text-foreground font-medium",children:k})]})}),i.jsxs("section",{className:"max-w-5xl mx-auto px-6 lg:px-12 py-16 md:py-20",children:[i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12",children:[i.jsxs("div",{className:"lg:col-span-2",children:[r&&i.jsx("p",{className:"font-body text-xs md:text-sm tracking-[0.2em] uppercase text-accent mb-3",children:r}),i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-6",children:"Training Program Overview"}),i.jsx("div",{className:"space-y-5",children:o.split(` 421 422`).map((E,D)=>i.jsx("p",{className:"font-body text-base md:text-lg text-muted-foreground leading-relaxed",children:E},D))})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx(Pn,{size:20,className:"text-accent mt-1 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Duration"}),i.jsx("p",{className:"font-body text-base text-foreground mt-1",children:c})]})]}),i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx(cn,{size:20,className:"text-accent mt-1 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Format"}),i.jsx("p",{className:"font-body text-base text-foreground mt-1",children:d})]})]}),i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx(DR,{size:20,className:"text-accent mt-1 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:"Certification"}),i.jsx("p",{className:"font-body text-base text-foreground mt-1",children:u})]})]})]})]}),i.jsx("div",{className:"mt-12",children:i.jsxs("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})})]}),A,P.length>0&&i.jsxs("section",{className:"max-w-5xl mx-auto px-6 lg:px-12 pb-16",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-8",children:"This Training Is For You If You Are A..."}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:P.map((E,D)=>i.jsxs($.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:D*.1},className:"flex items-start gap-4",children:[i.jsx("span",{className:"w-2 h-2 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-base text-muted-foreground",children:E})]},D))})]}),i.jsx("section",{className:"bg-card py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-10",children:"What You'll Learn"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:a.map((E,D)=>i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:D*.1},className:"flex items-start gap-4",children:[i.jsx("span",{className:"w-2 h-2 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-base text-foreground",children:E})]},D))})]})}),i.jsxs("section",{className:"max-w-5xl mx-auto px-6 lg:px-12 py-16 md:py-20",children:[i.jsxs("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-10",children:[i.jsx(LR,{size:24,className:"inline-block mr-3 text-accent -mt-1"}),"Curriculum"]}),i.jsx("div",{className:"space-y-0",children:l.map((E,D)=>i.jsxs($.div,{initial:{opacity:0,y:15},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:D*.08},className:"flex gap-6 border-b border-border py-6",children:[i.jsx("span",{className:"font-display text-3xl text-accent/30 shrink-0 w-12",children:String(D+1).padStart(2,"0")}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground",children:E.title}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-2 leading-relaxed",children:E.description})]})]},D))}),i.jsx("div",{className:"mt-12",children:i.jsxs("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})})]}),f.length>0&&i.jsx(wV,{trainers:f}),m&&i.jsx(jV,{facilitator:m}),y.length>0&&i.jsx(pw,{facilitators:y,title:p,description:w}),b.length>0&&i.jsx(pw,{facilitators:b,title:"Pre-Recorded Guest Teachers",description:"These masterclass segments are available inside the learning portal as pre-recorded content you can watch in your own time."}),g&&i.jsx(m_,{programSlug:g}),v.length>0&&i.jsx("section",{className:"bg-card py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:"Investment"}),k&&i.jsxs("div",{className:"mb-8 border border-accent bg-accent/10 px-6 py-4 md:py-5 flex items-start gap-3",children:[i.jsx(tr,{className:"text-accent shrink-0 mt-0.5",size:20,strokeWidth:1.5}),i.jsx("p",{className:"font-body text-sm md:text-base text-foreground",children:k})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:v.map((E,D)=>i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:D*.1},className:`relative border rounded-sm p-8 flex flex-col ${E.highlight?"border-accent bg-accent/5":"border-border bg-background"}`,children:[E.highlight&&i.jsx("span",{className:"absolute -top-3 left-6 bg-accent text-primary-foreground font-body text-xs tracking-widest uppercase px-3 py-1",children:"Most Popular"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-2",children:E.name}),i.jsx("p",{className:"font-display text-2xl md:text-3xl text-foreground mb-6",children:E.price}),i.jsx("div",{className:"space-y-3 flex-1",children:E.includes.map((G,W)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:G})]},W))}),E.note&&i.jsx("p",{className:"font-body text-xs text-muted-foreground
422/70 mt-4 italic",children:E.note}),i.jsxs("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"mt-6 inline-flex items-center justify-center gap-2 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-6 py-3 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:14})]})]},D))}),i.jsx($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.3},className:"mt-12 border border-accent/30 rounded-sm p-8 bg-accent/5 max-w-2xl",children:i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx(cn,{size:22,className:"text-accent shrink-0 mt-1"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mb-1",children:"Optional Add-on"}),i.jsx("h3",{className:"font-display text-lg text-foreground mb-2",children:"Practitioner Membership Space"}),i.jsx("p",{className:"font-display text-xl text-foreground mb-3",children:"$499 USD / year"}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Ongoing business and client mentorship"})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Access to our practitioner directory to market your sessions"})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:"Twice-monthly integration calls"})]})]})]})]})})]})}),S&&i.jsx("section",{className:"py-16 md:py-20",children:i.jsx("div",{className:"max-w-3xl mx-auto px-6 lg:px-12 text-center",children:i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:"Join the Waitlist"}),i.jsx("p",{className:"font-body text-base text-muted-foreground leading-relaxed mb-8 max-w-xl mx-auto",children:"We don't always have active training dates available. Join our waitlist to be the first to know when enrolment opens for the next cohort."}),i.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Join Waitlist",i.jsx(ue,{size:16})]})]})})}),R.length>0&&i.jsx("section",{className:"py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-10",children:"What Our Graduates Say"}),i.jsx("div",{className:"space-y-8",children:R.map((E,D)=>i.jsxs($.blockquote,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:D*.08},className:"border-l-2 border-accent pl-6 py-2",children:[i.jsx(KR,{size:18,className:"text-accent/40 mb-3"}),i.jsxs("p",{className:"font-body text-base text-foreground/90 leading-relaxed italic",children:['"',E.quote,'"']}),i.jsxs("footer",{className:"mt-3 font-body text-sm text-muted-foreground",children:["â ",E.name,E.location&&i.jsxs("span",{children:[", ",E.location]}),E.program&&i.jsx("span",{className:"block text-xs text-accent/60 mt-1",children:E.program})]})]},D))})]})}),i.jsx(SV,{}),i.jsx("section",{className:"bg-foreground py-16 md:py-20",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-primary-foreground mb-10",children:"Learning Outcomes"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:h.map((E,D)=>i.jsxs($.div,{initial:{opacity:0,x:-15},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:D*.1},className:"flex items-start gap-4",children:[i.jsx("span",{className:"w-2 h-2 rounded-full bg-accent mt-2 shrink-0"}),i.jsx("p",{className:"font-body text-base text-primary-foreground
422/80",children:E})]},D))}),i.jsxs("div",{className:"mt-12 flex items-center gap-6",children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-primary-foreground/40",children:"Accredited by"}),i.jsx("img",{src:Ky,alt:"IICT Accredited",className:"h-14 brightness-0 invert",loading:"lazy"}),i.jsx("img",{src:Gy,alt:"IPHM Accredited",className:"h-14 brightness-0 invert",loading:"lazy"})]}),i.jsxs("a",{href:_,target:"_blank",rel:"noopener noreferrer",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground border border-primary-foreground/40 px-8 py-4 hover:bg-primary-foreground hover:text-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})}),F&&O&&i.jsx("section",{className:"py-16 md:py-20",children:i.jsxs("div",{className:"max-w-3xl mx-auto px-6 lg:px-12 text-center",children:[i.jsx($.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"font-display text-2xl md:text-3xl text-foreground mb-6 italic",children:F}),i.jsx($.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.15},className:"font-body text-base md:text-lg text-muted-foreground leading-relaxed",children:O}),i.jsxs($.a,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.3},href:_,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})}),i.jsx(qy,{}),i.jsx(nt,{})]})},ex="/assets/trainer-sigourney-BLh5aHEl.jpg",p_="/assets/trainer-kaya-DTvuNDnT.jpg",NV=()=>i.jsx(Zy,{seoTitle:"Spinal Attunement Training â Soma Mystica®",seoDescription:"Certification training in Spinal Attunement: a somatic and energetic method working with the spine and nervous system.",seoPath:"/trainings/spinal-attunement",title:"Spinal Attunement",subtitle:"Practitioner Training Program",heroImage:s_,programSlug:"spinal-attunement",waitlistUrl:"https://portal.somamystica.com/spinal-attunement-waitlist",applyUrl:"https://www.ka-ya.org/trainings",externalSiteUrl:"https://spinalattunement.com/",externalSiteLabel:"Spinal Attunement has its own dedicated website â explore the full method, curriculum and upcoming cohorts at spinalattunement.com.",overview:"The Spinal Attunement Method is the training modality bridging Quantum Energetics and the Science of BioField Healing with Somatic Therapy and Neuroscience. By influencing the Energetic Field, we can completely shift and heal what is happening from the inside out. This training is comprised of an online pre-requisite training (one year's access) plus a 5-day live training segment. We are currently enrolling for the Level One Online Training happening LIVE in July 2026 with Sigourney Belle, and the 5-day live intensive at Temple Farmhouse, Byron Bay, March 4â8, 2027 â 12 spaces only.",earlyBird:"Byron Bay, March 4â8 â Super Early Bird: 15% off until 1 November. Early Bird: 10% off until 1 December. 12 spaces only.",duration:"Online pre-requisite + 5-day live intensive",format:"Online modules + in-person live training",certification:"IICT & IPHM globally accredited certification",trainers:[{name:"Sigourney Belle Weldon",role:"Founder & Lead Trainer",bio:"Sigourney is the founder of Soma Mystica® and the Institute of Esoteric Medicine, with a background in Physiotherapy, Neurology, and various somatic and spiritual lineages. A Medical Intuitive and Medical Astrologer specialising in Neurotheology, she spent a decade in neurological rehabilitation and trauma before embarking on a profound exploration of Eastern philosophy and esotericism, studying in India and Nepal. Her work bridges the gap between clinical neuroscience and embodied healing, training over 10,000 practitioners worldwide.",imageUrl:ex},{name:"Kaya",role:"Head Trainer",bio:"Kaya is a Spinal Attunement Head Trainer and a multidimensional intuitive, blessed with body clairsentience, claircognizance, and a profou
422nd connection to subtle realms that allows her to create gentle, soft yet deeply transformative and nurturing spaces where you remember who you truly are, with her work centered on inner empowerment to live an autonomous and creative, soul-led life.",imageUrl:p_}],whatYoullLearn:["Self Energetics â Learn how to clear and align your own energetic system so you can connect with your own bioenergetic field and another's","Five Body Theory â Work with the Physical, Emotional, Mental, Soul and Spirit Bodies that make up our integral whole human healing approach","The Science of Energetics â Understand how Energetics and Neuroscience merge and how the energetic field is an extension of the neuroendocrine system","Trauma Informed Practice & Integration â Different adjustments and styles of treatment to adapt your practice to meet each client's needs","A New Map of Healing â An Energetic map that corresponds to and overlaps onto the Neuroendocrine system, teaching you to precisely detect the root of trauma in the nervous system"],modules:[{title:"Self Energetics",description:"Learn how to work with practices to clear and align your own energetic system. This pre-requisite module ensures everyone has a basic knowledge of how to work with and clear stagnancies in their own energetic system."},{title:"Five Body Theory",description:"The Physical, Emotional, Mental, Soul and Spirit Bodies that make up our Integral whole human healing approach. This framework gives you the knowledge to work with all dimensions of the human experience."},{title:"The Science of Energetics",description:"Learn the Science of Energetics. Understand how Energetics and Neuroscience merge and meet, and how you can bridge the two using our method. When you work with The Field, you are working with the neuroendocrine system."},{title:"Spinal Attunement Techniques",description:"Precise touch and attunement protocols for facilitating spinal release, unwinding patterns, and supporting nervous system regulation. Developing sensitivity and presence â learning to listen with your hands."},{title:"Trauma Informed Practice",description:"Different adjustments and styles of treatment to ensure you are able to adapt your practice. Understanding how trauma manifests and rewires the nervous system, and how to adapt your approach to ensure you are not negatively harming your client."},{title:"A New Map of Healing",description:"Spinal Attunement merges Western and Eastern philosophy, giving you an Energetic map that corresponds to and overlaps onto the Neuroendocrine system. Learn our unique map to precisely detect the root of trauma in the nervous system."}],outcomes:["Confidently facilitate Spinal Attunement sessions with clients","Read and respond to the body's subtle energetic communication","Apply trauma-informed somatic techniques safely and effectively","Understand the spineânervous systemâenergetic field connection at a deep level","Hold safe, transformative space for profound healing experiences","Receive globally accredited practitioner certification (IICT & IPHM)"],pricing:[{name:"Pay in Full & Save",price:"$5,000 USD",includes:["1 year's access to online pre-requisite training ($1,500 USD value)","5-day live intensive training ($3,500 USD value)"],note:"5-Day Live Intensive base rate is $3,500 USD. Retreat-style events may be priced higher â contact your trainer for details."},{name:"3-Part Payment Plan",price:"3 Ã $1,835 USD",highlight:!0,includes:["1 year's access to online pre-requisite training","5-day live intensive training","10% interest on payment plan"],note:"Plan must be paid in full before the training starts."},{name:"6-Part Payment Plan",price:"6 Ã $1,000 USD",includes:["1 year's access to online pre-requisite training","5-day live intensive training","20% interest on payment plan"],note:"Plan must be paid in full before the training starts."}],pricingNote:"Practitioner membership space is available for an additional $499 USD/year, including twice-monthly integration calls.",testimonials:[{quote:"Having a framework to locate the point of tension that will unravel the whole system is so profoundly powerful. Engaging with the field of a person, lovingly, sensitively, with presence, intuition on, and to initiate connection, shifts, awakening, is such a sublime experience and gift to offer. I am deeply in love with this modality.",name:"Christina Rankh",location:"Australia",program:"Spinal Attunement Level One"},{quote:"I'm so glad that I followed my intuition about doing trainings with Soma Mystica. I was looking to continue my education around somatics and understanding trauma and their programs and course do a great job of going deep into those. If you're a hands-on learner like I am, I highly recommend attending one of their in person trainings. The immersion is deep and incredible to witness and be a part of.",name:"Adrienne",program:"Breath of Gold â Breathwork Certification"},{quote:"This was the most powerful in-person training I've experienced. Sigourney's softness and loving nature emanates to those around her. It was truly a magical four days. I would welcome the opportunity to continue this training with a second level of Spinal Attunement one day.",name:"Carrie Eckert",location:"USA",program:"Spinal Attunement Level One"},{quote:"Since a child I've been interested in Esoteric and Eastern knowledge and along my journey I came across Soma Mystica which immediately resonated with me. When I saw their programs for the first time and the founder Sigourney, I knew this is it. I felt at home. Soma Mystica gives you tools and support in the form of community for your inner journey back home and
422your professional development and growth. It gives you a fertile soil where you go into your own deep waters, grow and birth into the world your unique medicine. Since finishing the Spinal Attunement Training and becoming a practitioner, my life has been profoundly changing. Among all, I have more inner stability and groundedness in the ways I work â I set my business in a professional manner â and enriched my life from inside out. My chronic pain that I've had for the past five months is gone too. Soma Mystica's wisdom and knowledge is the medicine of the future.",name:"Kaja",program:"Spinal Attunement Level One"},{quote:"For many years I have taken certifications, undergone trainings and mentored under different teachers to widen my mind & embody the teachings. Yet there was a gap, a missing link â how to communicate what we know in the esoteric world & how to merge this with the scientific world. Sigourney Belle & Soma Mystica has bridged this gap! By being in her world for the past few years, so much has opened and solidified in my field. Not only has my own knowledge become more embodied and visibility has gone through the roof because of using these practices, but my clients and their clients are having mind boggling results! One of my clients with cancer is experiencing so much relief & the cancer is in remission. If you were waiting to hop on board, the time is now! The world needs more of us!",name:"Juliette Karaman",program:"The Scrumptious Woman Podcast"}]}),_V=1,CV="581204f7-04f4-4369-b5af-f31a65cbf496",TV="d7020298-ee16-4fdb-b15b-52fc559115b1",EV="/__l5e/assets-v1/581204f7-04f4-4369-b5af-f31a65cbf496/sigourney-belle.jpg",PV="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/581204f7-04f4-4369-b5af-f31a65cbf496/sigourney-belle.jpg",AV="sigourney-belle.jpg",RV=259894,MV="image/jpeg",OV="2026-08-31T02:08:02Z",IV={version:_V,asset_id:CV,project_id:TV,url:EV,r2_key:PV,original_filename:AV,size:RV,content_type:MV,created_at:OV},g_="/assets/trainer-damien-CEqGQOly.jpg",DV=1,LV="abd6d067-0ec9-4873-9b5f-81a7bae9972f",$V="d7020298-ee16-4fdb-b15b-52fc559115b1",FV="/__l5e/assets-v1/abd6d067-0ec9-4873-9b5f-81a7bae9972f/david-bedrick-2.jpg",BV="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/abd6d067-0ec9-4873-9b5f-81a7bae9972f/david-bedrick-2.jpg",UV="david-bedrick-2.jpg",zV=1403641,VV="image/png",WV="2026-08-31T21:44:42Z",HV={version:DV,asset_id:LV,project_id:$V,url:FV,r2_key:BV,original_filename:UV,size:zV,content_type:VV,created_at:WV},qV=1,KV="680150b4-4d63-4eab-9c1b-1251ecbcdc20",GV="d7020298-ee16-4fdb-b15b-52fc559115b1",YV="/__l5e/assets-v1/680150b4-4d63-4eab-9c1b-1251ecbcdc20/mitch-gainey.jpg",JV="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/680150b4-4d63-4eab-9c1b-1251ecbcdc20/mitch-gainey.jpg",QV="mitch-gainey.jpg",XV=62986,ZV="image/jpeg",e9="2026-08-31T02:08:44Z",t9={version:qV,asset_id:KV,project_id:GV,url:YV,r2_key:JV,original_filename:QV,size:XV,content_type:ZV,created_at:e9},n9=r_.url,r9=IV.url,s9=HV.url,i9=t9.url,o9=()=>i.jsx(Zy,{seoTitle:"Self Holding Method Training â Soma Mystica®",seoDescription:"Certification training in the Self Holding Method for practitioners working with trauma, touch and nervous-system regulation.",seoPath:"/trainings/self-holding-method",title:"The Self Holding Method",subtitle:"Globally Accredited Practitioner Training Program",tagline:"Become a Trauma Informed Somatic Guide",overviewKicker:"More than just a modality â a training for the intuition",heroImage:n9,programSlug:"self-holding-method",overview:`Some clients have tried everything. And still, the body holds on. They've done the therapy, read the books, understand their patterns intellectually â and yet something remains locked. Unresolved. Living not in the mind, but in the tissue. 423 424The Self Holding Method was created for exactly this moment. For practitioners who want to go deeper â into the body, into the root, into the places words alone cannot reach. 425 426Developed by Sigourney Belle in 2019, The Self Holding Method is an integrative somatic healing modality, globally accredited with the IICT (International Institute of Complementary Therapies), that equips practitioners with a comprehensive clinical framework to assess and treat clients at the level of the body, the nervous system, and the deeper patterns that drive chronic tension, dysregulation, and pain. 427 428This is not your average modality. It does not teach you how to work with the body in a copy-paste manner â following a fixed protocol, replicating the same steps, producing the same result. Instead, it teaches you how to deeply listen to the intelligence of the body and the field, and to work with what is alive and present in each moment, with each client. We are not trying to create a replica of you, the teacher â we are supporting the emergence of an original artist. A practitioner whose craft is alive, responsive, and uniquely their own. 429 430It is a complete methodology â one that bridges somatic and energetic therapies (including EFT) into a single coherent, practitioner-ready system, training you to become a Somatic Doula: supp
430orting clients to navigate the psychosomatic origins of their presenting complaints. Beyond technique, our practitioners are trained to use their intuition and listen to the field of intelligence â in this respect, it is more than a modality.`,duration:"6 weeks â beginning Tuesday 2 February 2027",format:"Weekly live calls 5:00â6:30 PM AEDT Melbourne (7:00 AM CET) + guest speaker sessions + 20 hours recorded learning portal",certification:"IICT globally accredited certification",extraSection:i.jsx("section",{className:"max-w-5xl mx-auto px-6 lg:px-12 pb-16 md:pb-20",children:i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-4",children:"Course Structure"}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed mb-10 max-w-3xl",children:"A six-week live training, designed to fit around clinical practice while giving you a depth of contact with the material that recorded content alone cannot offer."}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"flex gap-4",children:[i.jsx(Dt,{className:"text-accent shrink-0 mt-1",size:24,strokeWidth:1.5}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground mb-2",children:"Six Weeks · From February 2"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"The training runs for six weeks, beginning Tuesday 2 February 2027. A complete, contained immersion â not a stretched-out commitment."})]})]}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx(Pn,{className:"text-accent shrink-0 mt-1",size:24,strokeWidth:1.5}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground mb-2",children:"Weekly Live Calls"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"Every week, the core call runs 5:00â6:30 PM AEDT (Melbourne) â 7:00 AM CET, These live sessions are led by Sigourney Belle."})]})]}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx(tr,{className:"text-accent shrink-0 mt-1",size:24,strokeWidth:1.5}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground mb-2",children:"Guest Speaker Sessions"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"In addition to the core calls, you will learn directly from guest teachers Mitch Gainey and David Bedrick in dedicated specialist sessions."})]})]}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx(oS,{className:"text-accent shrink-0 mt-1",size:24,strokeWidth:1.5}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground mb-2",children:"Learning Portal · 20 Hours Recorded"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"Alongside the live training, you receive access to a learning portal with 20 hours of recorded content â yours to revisit throughout the course and beyond."})]})]})]})]})}),idealFor:["Therapist or counsellor wanting to bring somatic depth into your existing practice","Bodyworker ready to integrate emotional and trauma-informed dimensions into your sessions","Yoga teacher, breathwork facilitator, or movement practitioner seeking a clinical framework to support clients more comprehensively","Healing arts professional who senses there is more â and is ready to train at that level"],leadFacilitator:{name:"Sigourney Belle",role:"Lead Teacher & Founder of Soma Mystica®",bio:"Sigourney Belle Weldon is an Australian entrepreneur, bestselling author, and healer whose work bridges the clinical and the mystical. Born on November 10, 1989, and raised on North Island in Western Australia's Houtman Abrolhos archipelago, she graduated with distinction in physiotherapy from Curtin University in 2011 and spent a decade specialising in neurological rehabilitation and trauma. That clinical grounding became the foundation for a deeper inquiry. Sigourney's years studying Eastern philosophy and esoteric traditions in India and Nepal led her to foun
430d SOMAMYSTICA®, a global training body now home to thousands of practitioners worldwide, built on the premise that somatic psychology and mysticism illuminate the body from complementary directions. Her research interests carry this same integration into the scientific sphere: she is currently developing a research partnership with Oxford University's Flourishing Intelligence Programme and Planetary Health Lab, exploring interoceptive diagnostics and studying her Spinal Attunement modality, with particular attention to medically unexplained conditions and the diagnostic gaps surrounding illnesses like CFS, fibromyalgia, and FND. Sigourney's bestselling book, Wild Business, calls women toward intuitive, feminine-led entrepreneurship, and her writing appears regularly in Forbes, alongside features in Business Insider and The Wall Street Journal. Her forthcoming book, The MotherWild Revolution: Cultural Change through Generational Activism, turns to sacred activism through motherhood and the role of mothers in societal transformation. Across every strand of her work, Sigourney holds light and shadow, science and spirit, as a single continuous field â one she is dedicated to mapping in service of a new paradigm for healing, business, and human flourishing.",imageUrl:r9},guestFacilitatorsTitle:"Live Training Facilitators",guestFacilitatorsDescription:"Teaching alongside Sigourney Belle in the live component of the training â weekly core calls and dedicated guest speaker sessions.",guestFacilitators:[{name:"Mitch Gainey",role:"Lead Facilitator â Somatic EFT, Focusing & Embodied Presence",bio:"Mitch Gainey is a therapist, trainer and somatic educator whose work explores the intelligence that emerges when we learn to listen to the body from within. He is a Certified Focusing Teacher, Evidence-Based EFT Trainer and Mentor, and has trained across Internal Family Systems, Somatic Experiencing and transpersonal approaches to healing. At the heart of Mitch's work is the Focusing tradition of philosopher and psychotherapist Eugene Gendlin: an experiential approach that understands the body not simply as somewhere we store our past, but as a living process carrying an implicit sense of what wants to happen next. His teaching brings together somatic awareness, relational presence and experiential psychotherapy, helping practitioners develop the capacity to stay with what is not yet clear and allow new meaning, movement and possibility to emerge.",imageUrl:i9},{name:"David Bedrick",role:"Guest Facilitator â Embodied Psychology of 'Unshaming'",bio:`David Bedrick, J.D., Dipl. PW, is a counselor, educator, attorney, and writer, and the founder of the UnShaming Way â a depth-psychology approach built on one conviction: your symptoms, struggles, and survival strategies carry intelligence, not pathology. Healing, in his framework, begins not with fixing what is "wrong" but with witnessing â the quality of seeing that determines whether life's injuries become lasting trauma or transform into meaning and medicine. 431 432He is the author of five books, including The Unshaming Way (North Atlantic Books), endorsed by Gabor Maté, MD, and You Can't Judge a Body by Its Cover (forthcoming reissue, North Atlantic Books). His first book has been translated into nine languages. He trained at the Process Work Institute, where he later served on faculty, taught psychology at the university level for eight years, and founded the Institute for Shame-Based Studies, where he has trained hundreds of clinicians and taught thousands of individuals. His 10-month certification program has certified more than 150 practitioners of the UnShaming Way. His writing has appeared in Psychology Today, and his essays on trauma, shame, and witnessing reach hundreds of thousands of readers. 433 434Before psychology, he practiced law. Before law, he survived a violent home â a father who used his belt, a mother who denied it. That, he says, is his deepest credential: he knows both harms from the inside.`,imageUrl:s9}],preRecordedFacilitators:[{name:"Damien Bohler",role:"Relational Somatics & Human Design",bio:"Damien is a pragmatic visionary, synthesist and deep diver, focused on the future trajectory of humanity through relationship. His gift is the interweaving of complex subjects into forms that can be easily integrated and embodied â spanning Authentic Relating, Attachment Theory, Polarity, Sexuality, nervous system regulation, Human Design, Gene Keys, transpersonal shadow work, and more. He is the founder, director and head facilitator at Evololve Relating.",imageUrl:g_},{name:"Carly Rae",role:"Female Pelvic Anatomy & Dearmouring",bio:"Carly Rae specialises in female biology and hands-on pelvic work â a path that began through healing her own body from sexual abuse, medical injury, and a fractured connection to her womanhood. She is a guide into the depths of the female terrain, anatomy, and physiology, walking with women through the full Womb Continuum â exploring the layers of flesh, feminine intelligence, and primal bodies, merging the worlds of sacred and science. All of her work is devoted to the innate intelligence within every cell of the body and to the remembrance of our feminine nature.",imageUrl:Yy},{name:"Richmond Heath",role:"TRE & Autogenic Regulation",bio:"Richmond Heath is a pioneering somatic trauma educator, Physiotherapist, and the founder of TRE Australia. With over two decades of experience, he has been at the forefront of integrating neurogenic tremors and spontaneous movement into mainstream and alternative paradigms of healing, performance, and embodied spirituality. As the first to introduce TRE to Australia in 2010, Richmond has since expanded its reach beyond trauma recovery â positioning neurogenic movement as a powerful tool for reorganising tension, restoring regulation, and unlocking the body's innate intelligence.",imageUrl:Jy},{name:"Brittany Laidlaw",role:"Ecosomatics & Embodied Animism",bio:"Brittany Jane Laidlaw is a Somatic Ecologist, Dancer and Eco-Philosopher with over 11 years of experience leading embodied, nature-connection programs in the wild. She is a PhD Candidate in eco-somatics and her research explores ways of relating to and restoring living ecologies through the somatic body. Her work has received numerous awards including the inaugural Westpac Future Leaders Award and Prime Minister's Endeavour Award. Today, Brittany offers programs guiding people through The EARTHED Framework, an experiential map for conversing with the body, nature, and soul.",imageUrl:Qy}],whatYoullLearn:["Trauma-Informed Practice â A foundational understanding of how trauma lives in the body, and how to hold space with skill, ethics, and safety","Process-Oriented Somatic Work â Supporting clients to unfold organically, following the body's own intelligence rather than
434imposing a protocol","Kinesiology â Using the body's own feedback system to locate the root cause of tension, rather than treating symptoms alone","Meridian Release & Eastern Medicine Principles â Working with the energetic body through time-honoured Eastern frameworks","Emotional Freedom Technique (EFT) â Integrating tapping protocols to shift emotional charge held in the body's energy system","Fascial Release â Addressing the connective tissue matrix where physical and emotional holding patterns are encoded","Space Holding & Therapeutic Presence â The relational and ethical container that makes deep somatic work possible and safe"],modules:[{title:"Foundations: Anatomy & Physiology of Trauma",description:"Learn how to work somatically with stored trauma in the body, understanding the nervous system's role in holding and releasing."},{title:"Foundations: Unshaming",description:"An introduction to the embodied psychology of Unshaming with David Bedrick â deepening skills of awareness and personal development."},{title:"Foundations: Ecosomatics & EARTHED",description:"Explore somatic ecology and the EARTHED framework â connecting the body to living ecologies and nature."},{title:"Foundations: Kinesiology & Emotional Clearing",description:"Learn to locate the root of symptoms through muscle testing and emotional clearing techniques."},{title:"Foundations: Myofascial Meridians",description:"Understanding deeper movement patterns through the myofascial system."},{title:"Foundations: Vocal Alchemy",description:"Explore the connection between life's energy and human expression through voice and sound."},{title:"Practitioner: Energetic Field Philosophy",description:"A new framework integrating Energetic Field Philosophy into Somatic Therapy work with Sigourney Belle."},{title:"Practitioner: Trauma Informed Space Holding",description:"Learn the art of holding space with trauma awareness and sensitivity, guided by Sigourney Belle."},{title:"Practitioner: Parts Work Integration",description:"Integrating parts work into somatic practice for deeper therapeutic impact."},{title:"Practitioner: Muscle Testing & Root Cause",description:"Discovering the root cause of a client's medical symptoms â how to guide them to unlock these in the body."}],outcomes:["Facilitate Self Holding Method sessions with confidence","Work somatically with stored trauma in the body","Guide clients through trauma-informed somatic techniques","Apply process-oriented and kinesiology-based approaches to healing","Understand meridian release and fascial holding patterns","Hold transformative therapeutic space with ethical presence","Receive globally accredited practitioner certification"],pricing:[{name:"Pay in Full & Save",price:"$2,200 USD",includes:["12 months access to online training portal","12 core Somatics Foundation Modules with global leading experts","4 core Practitioner Modules with Sigourney Belle","2 live demonstrations & Q+A with Sigourney Belle","6 live integration pod calls","3-part Gene Keys for Business masterclass series","12 months access to training community group","Weekly learning support for 6 weeks","Globally recognised & accredited certification"],note:"Repeat clients: $499 USD. Optional $499 USD/year practitioner membership for ongoing mentorship & practitioner directory access."},{name:"3-Part Payment Plan",price:"3 Ã $800 USD",includes:["All training content & modules included","12 months portal access","Live calls & integration support","Globally accredited certification"],note:"Payments over 3 months. Repeat clients: $499 USD."},{name:"6-Part Payment Plan",price:"6 Ã $440 USD",highlight:!0,includes:["All training content & modules included","12 months portal access","Live calls & integration support","Globally accredited certification"],note:"Payments over 6 months. Repeat clients: $499 USD."}],earlyBird:"Early Bird â 10% off all pricing tiers until 1 November. Apply now to lock in the reduced rate.",pricingNote:"Optional practitioner membership available for $499 USD/year â includes twice-monthly integration calls, ongoing mentorship & access to the practitioner directory.",closingHeadline:"The body has always known what the mind is still catching up to.",closingText:"If you are ready to train in a methodology that meets clients where healing actually happens â not in concept, but in tissue, in breath, in the lived moment of the body releasing what it has long held â The Self Holding Method is your next training.",testimonials:[{quote:"Having a framework to locate the point of tension that will unravel the whole system is so profoundly powerful. Engaging with the field of a person, lovingly, sensitively, with presence, intuition on, and to initiate connection, shifts, awakening, is such a sublime experience and gift to offer. I am deeply in love with this modality.",name:"Christina Rankh",location:"Australia",program:"Spinal Attunement Level One"},{quote:"I'm so glad that I followed my intuition about doing trainings with Soma Mystica. I was looking to continue my education around somatics and understanding trauma and their programs and course do a great job of going deep into those. If you're a hands-on learner like I am, I highly recommend attending one of their in person trainings. The immersion is deep and incredible to witness and be a part of.",name:"Adrienne",program:"Breath of Gold â Breathwork Certification"},{quote:"This was the most powerful in-person training I've experienced. Sigourney's softness and loving nature emanates to those around her. It was truly a magical four days. I would welcome the opportunity to continue this training with a second level of Spinal Attunement one day.",name:"Carrie Eckert",location:"USA",program:"Spinal Attunement Level One"},{quote:"Since a child I've been interested in Esoteric and Eastern knowledge and along my journey I came across Soma Mystica which immediately resonated with me. Soma Mystica gives you tools and support in the form of community for your inner journey back home and
434your professional development and growth. Since finishing the Spinal Attunement Training and becoming a practitioner, my life has been profoundly changing.",name:"Kaja",program:"Spinal Attunement Level One"},{quote:"For many years I have taken certifications, undergone trainings and mentored under different teachers to widen my mind & embody the teachings. Yet there was a gap, a missing link â how to communicate what we know in the esoteric world & how to merge this with the scientific world. Sigourney Belle & Soma Mystica has bridged this gap!",name:"Juliette Karaman",program:"The Scrumptious Woman Podcast"}]}),y_="/assets/trainer-gem-CTGnxvfL.jpg",a9=()=>i.jsx(Zy,{seoTitle:"Parasympathetic Breathwork Training â Soma Mystica®",seoDescription:"Certification training in Parasympathetic Breathwork: regulating breath practices grounded in nervous-system science.",seoPath:"/trainings/parasympathetic-breathwork",title:"The Parasympathetic Breathwork Method",subtitle:"Practitioner Training Program",heroImage:i_,programSlug:"parasympathetic-breathwork",waitlistUrl:"https://portal.somamystica.com/parasympathetic-breathwork-waitlist",overview:"The only breathwork modality on the market that is Parasympathetic-led and suitable for clients with PTSD, CPTSD and other conditions that create limbic system impairment and hypersensitivity of the nervous system. This breathwork modality is gentle and restorative, supportive of moving layers of trauma in a way that does not create further exhaustion, collapse or retraumatisation of symptoms. Combining Ancient Eastern Philosophy with gentle nervous system regulation practises, it is breathwork designed for highly sensitive intuitives.",duration:"Pre-recorded evergreen training + live intensive",format:"Online modules + 2-day live intensive training",certification:"IPHM globally accredited certification",trainers:[{name:"Sigourney Belle Weldon",role:"Founder & Lead Trainer",bio:"Sigourney is the founder of Soma Mystica® and the Institute of Esoteric Medicine, with a background in Physiotherapy, Neurology, and various somatic and spiritual lineages. A Medical Intuitive and Medical Astrologer specialising in Neurotheology, she spent a decade in neurological rehabilitation and trauma before embarking on a profound exploration of Eastern philosophy and esotericism, studying in India and Nepal. Her work bridges the gap between clinical neuroscience and embodied healing, training over 10,000 practitioners worldwide.",imageUrl:ex},{name:"Gem Jordan",role:"Breathwork & Embodiment Facilitator",bio:"A born kinaesthetic with a classical dance background, Gem deepened into the embodiment space when she realised her old performative ways of moving weren't hitting the depths she desired â her nervous system was constantly in go mode. Now she inspires clients worldwide to connect to their embodied essence through movement, breath and somatic meditation techniques. Gem teaches yoga, somatic meditation and breathwork in Melbourne, Australia, and online.",imageUrl:y_}],whatYoullLearn:["Trauma informed practise and integration â adapting your approach to ensure you are not negatively harming clients with PTSD, CPTSD and hypersensitivity","The Science of Energetics â how Energetics and Neuroscience merge and how you can bridge the two using this method","A new emergent map of healing â an Energetic map that corresponds to and overlaps onto the Neuroendocrine system","How to work with The Field and the neuroendocrine system, as the energetic field is an extension of this body system","How to precisely detect the root of trauma in the nervous system","Breathwork for highly sensitive intuitives combining Ancient Eastern Philosophy with gentle nervous system regulation"],modules:[{title:"Trauma Informed Practise & Integration",description:"Learn different adjustments and styles of treatment to ensure you can adapt your practise to meet the type of client you are serving. Understand how trauma manifests and rewires the nervous system, and how to adapt your approach accordingly."},{title:"The Science of Energetics",description:"Understand how Energetics and Neuroscience merge and meet, and how you can bridge the two using our method. When you work with The Field, you are working with the neuroendocrine system, as the energetic field is an extension of this body system."},{title:"A New Emergent Map of Healing",description:"Parasympathetic Breathwork merges Western and E
434astern philosophy and gives you an Energetic map that corresponds to and overlaps onto the Neuroendocrine system. Learn our unique map that teaches you how to precisely detect the root of trauma in the nervous system."},{title:"Parasympathetic Nervous System Activation",description:"Learn breath patterns that are parasympathetic-led, designed to be gentle and restorative â moving layers of trauma without creating further exhaustion, collapse or retraumatisation."},{title:"Working with Hypersensitivity",description:"Specific techniques for working with clients who have PTSD, CPTSD and other conditions that create limbic system impairment and hypersensitivity of the nervous system."},{title:"Facilitation & Certification",description:"Complete case studies, intake forms, assessments and video practise submissions to become a certified practitioner. Upon passing, receive certificates from Soma Mystica® and the International Practitioners of Holistic Medicine (IPHM)."}],outcomes:["Facilitate Parasympathetic Breathwork sessions safely with trauma-informed practise","Understand the Science of Energetics at a professional level","Work with the neuroendocrine system through the energetic field","Precisely detect the root of trauma in the nervous system","Adapt your practise for clients with PTSD, CPTSD and hypersensitivity","Receive IPHM globally accredited practitioner certification"],pricing:[{name:"Pay in Full & Save",price:"$997 USD",includes:["Pre-recorded training modules","2-day live intensive training"],note:"If you wish to join our practitioner membership space, this is an extra $499 USD/year and includes twice-monthly calls to support you to integrate the work into your business."},{name:"3-Part Payment Plan",price:"3 à $366 USD",highlight:!0,includes:["Pre-recorded training modules","2-day live intensive training","10% interest on payment plan"],note:"Plan must be paid in full before the training starts."}],pricingNote:"Practitioner membership space is available for an additional $499 USD/year, including twice-monthly calls to support you to integrate the work into your business.",testimonials:[{quote:"If every single human received this work for themselves, the world would be a completely different place. All of the things that terrify people day to day, would not stand a chance, if this was what everybody leaned into. I really believe the beauty of this work is that it is so subtle and gentle and yet it is so potent and profound. I highly recommend this work.",name:"Evelyn"},{quote:"Having a framework to locate the point of tension that will unravel the whole system is so profoundly powerful. Engaging with the field of a person, lovingly, sensitively, with presence, intuition on, and to initiate connection, shifts, awakening, is such a sublime experience and gift to offer. I am deeply in love with this modality.",name:"Christina Rankh",location:"Australia",program:"Spinal Attunement Level One"},{quote:"I'm so glad that I followed my intuition about doing trainings with Soma Mystica. I was looking to continue my education around somatics and understanding trauma and their programs and course do a great job of going deep into those. If you're a hands-on learner like I am, I highly recommend attending one of their in person trainings. The immersion is deep and incredible to witness and be a part of.",name:"Adrienne",program:"Breath of Gold â Breathwork Certification"},{quote:"This was the most powerful in-person training I've experienced. Sigourney's softness and loving nature emanates to those around her. It was truly a magical four days. I would welcome the opportunity to continue this training with a second level of Spinal Attunement one day.",name:"Carrie Eckert",location:"USA",program:"Spinal Attunement Level One"},{quote:"Since a child I've been interested in Esoteric and Eastern knowledge and along my journey I came across Soma Mystica which immediately resonated with me. When I saw their programs for the first time and the founder Sigourney, I knew this is it. I felt at home. Soma Mystica gives you tools and support in the form of community for your inner journey back home and
434your professional development and growth. It gives you a fertile soil where you go into your own deep waters, grow and birth into the world your unique medicine. Since finishing the Spinal Attunement Training and becoming a practitioner, my life has been profoundly changing. Among all, I have more inner stability and groundedness in the ways I work â I set my business in a professional manner â and enriched my life from inside out. My chronic pain that I've had for the past five months is gone too. Soma Mystica's wisdom and knowledge is the medicine of the future.",name:"Kaja",program:"Spinal Attunement Level One"},{quote:"For many years I have taken certifications, undergone trainings and mentored under different teachers to widen my mind & embody the teachings. Yet there was a gap, a missing link â how to communicate what we know in the esoteric world & how to merge this with the scientific world. Sigourney Belle & Soma Mystica has bridged this gap! By being in her world for the past few years, so much has opened and solidified in my field. Not only has my own knowledge become more embodied and visibility has gone through the roof because of using these practices, but my clients and their clients are having mind boggling results! One of my clients with cancer is experiencing so much relief & the cancer is in remission. If you were waiting to hop on board, the time is now! The world needs more of us!",name:"Juliette Karaman",program:"The Scrumptious Woman Podcast"}]}),l9=[{icon:tr,title:"Group Spinal Attunements",description:"Twice-monthly live group attunement sessions with Sigourney Belle â experience the transformative power of Spinal Attunement from anywhere in the world."},{icon:qR,title:"Live Somatic Classes",description:"4 live classes per month including Parasympathetic Breathwork, Somatic Movement, and guided energy practices."},{icon:GR,title:"Full Replay Portal",description:"Unlimited access to our growing library of recorded sessions. Practice on your own schedule, revisit sessions, and deepen your understanding."},{icon:cn,title:"Global Community",description:"Connect with a worldwide community of practitioners and seekers on the same path of embodied self-discovery."}],c9=[{quote:"The group attunements have completely shifted my relationship with my body. I feel things I never knew were possible.",name:"Sarah K.",location:"London, UK"},{quote:"Having access to Sigourney's teachings every month has been the most transformative investment I've made in myself.",name:"Maya T.",location:"Byron Bay, AU"},{quote:"Portal to Self gave me the foundation to understand my own nervous system. The replays alone are worth it.",name:"Jen N.",location:"New York, USA"}],d9=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-80px"}),n=x.useRef(null),r=kt(n,{once:!0,margin:"-80px"});return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:"Portal to Self Membership â Soma Mystica®",description:"A monthly somatic membership with live classes, breathwork and nervous-system practice for $45/month.",path:"/portal-to-self"}),i.jsx(Ke,{}),i.jsxs("section",{className:"relative h-[70vh] md:h-[80vh] overflow-hidden",children:[i.jsx("img",{src:o_,alt:"Portal to Self",className:"absolute inset-0 w-full h-full object-cover"}
434),i.jsx("div",{className:"absolute inset-0 bg-foreground/55"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center h-full text-center px-6",children:[i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"font-body text-sm tracking-widest uppercase text-primary-foreground/60 mb-4",children:"Monthly Membership"}),i.jsx($.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1},className:"font-display text-4xl md:text-6xl lg:text-7xl text-primary-foreground max-w-4xl",children:"Portal to Self"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3},className:"font-body text-lg md:text-xl text-primary-foreground/70 mt-6 max-w-2xl",children:"Our somatic energy clinic membership. Experience the work of Spinal Attunement, Parasympathetic Breathwork & Somatic Movement â live, every month."}),i.jsx($.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.8,delay:.6},className:"mt-10 flex flex-col items-center",children:i.jsxs("button",{onClick:()=>{var s;return(s=document.getElementById("calendar-section"))==null?void 0:s.scrollIntoView({behavior:"smooth"})},className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground border border-primary-foreground/40 px-8 py-4 hover:bg-primary-foreground hover:text-foreground transition-all duration-500",children:["View the Schedule",i.jsx(ue,{size:16})]})})]})]}),i.jsx("section",{className:"py-20 md:py-28",ref:e,children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx($.p,{initial:{opacity:0}
434,animate:t?{opacity:1}:{},className:"font-body text-sm tracking-widest uppercase text-accent mb-4 text-center",children:"What's Included"}),i.jsx($.h2,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.7,delay:.1},className:"font-display text-2xl md:text-4xl text-foreground text-center mb-16",children:"Everything you need to begin â or deepen â your practice"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:l9.map((s,o)=>i.jsxs($.div,{initial:{opacity:0,y:20},animate:t?{opacity:1,y:0}:{},transition:{duration:.5,delay:.15*o},className:"flex gap-5",children:[i.jsx("div",{className:"shrink-0 w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center",children:i.jsx(s.icon,{size:18,className:"text-accent"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg text-foreground",children:s.title}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-2 leading-relaxed",children:s.description})]})]},s.title))})]})}),i.jsx("section",{className:"bg-card py-20 md:py-28",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mb-4 text-center",children:"Your Facilitators"}),i.jsx("h2",{className:"font-display text-2xl md:text-3xl text-foreground mb-16 text-center",children:"Guided by experienced practitioners"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12",children:[i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsx("img",{src:ex,alt:"Sigourney Belle Weldon",className:"w-40 h-40 rounded-full object-cover mb-6"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mb-2",children:"Spinal Attunement"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-4",children:"Sigourney Belle Weldon"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed mb-3",children:"Sigourney is the founder of Soma Mystica®, with a background in Physiotherapy, Neurology, and various somatic and spiritual lineages. After a decade specialising in neurological rehabilitation and trauma, she embarked on a profound exploration of Eastern philosophy and esotericism."}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"Through Portal to Self, she offers twice-monthly group Spinal Attunement sessions â making this transformative modality accessible to anyone, anywhere in the world."})]}),i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsx("img",{src:y_,alt:"Gem Jordan",className:"w-40 h-40 rounded-full object-cover object-top mb-6"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mb-2",children:"Breathwork & Yin Yoga"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-4",children:"Gem Jordan"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed mb-3",children:"A born kinaesthetic with a classical dance background, Gem deepened into the embodiment space when she realised her old performative ways of moving weren't hitting the depths she desired â she simply wasn't enjoying how she felt in her body because her nervous system was constantly in go mode."}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed mb-3",children:"Now she inspires clients worldwide to connect to their embodied essence through movement, breath and somatic meditation techniques."}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"Gem currently teaches yoga, somatic meditation and breathwork in Melbourne, Australia, and online. She's also a recent Spinal Attunement grad. Come and anchor deeply into your body with her guided Yin Yoga and Parasympathetic Breathwork sessions in Portal To Self."})]})]})]})}),i.jsx("section",{id:"pricing-section",className:"py-20 md:py-28",children:i.jsxs("div",{className:"max-w-xl mx-auto px-6 text-center",children:[i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mb-4",children:"Simple Pricing"}),i.jsx("h2",{className:"font-display text-2xl md:text-4xl text-foreground mb-10",children:"One membership, full access"}),i.jsxs("div",{className:"border border-border p-10",children:[i.jsx("p",{className:"font-display text-5xl text-foreground",children:"$45"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-2 tracking-wide uppercase",children:"USD / month · Cancel anytime"}),i.jsx("div",{className:"mt-8 space-y-3 text-left max-w-xs mx-auto",children:["2à Group Spinal Attunements with Sigourney","4à Live somatic classes per month","Unlimited replay portal access","Global community connection"].map(s=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"font-body text-sm text-accent mt-0.5 shrink-0",children:"â¦"}),i.jsx("p",{className:"font-body text-sm text-foreground",children:s})]},s))}),i.jsxs("a",{href:"https://portal.somamystica.com/offers/GbLouLXP/checkout",target:"_blank",rel:"noopener noreferrer",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground bg-foreground px-8 py-4 hover:bg-foreground
434/90 transition-all duration-500",children:["Join Portal to Self",i.jsx(ue,{size:16})]})]})]})}),i.jsx("section",{className:"bg-foreground py-20 md:py-28",ref:n,children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx($.p,{initial:{opacity:0},animate:r?{opacity:1}:{},className:"font-body text-sm tracking-widest uppercase text-accent mb-4 text-center",children:"What Members Say"}),i.jsx($.h2,{initial:{opacity:0,y:20},animate:r?{opacity:1,y:0}:{},transition:{duration:.7,delay:.1},className:"font-display text-2xl md:text-4xl text-primary-foreground text-center mb-14",children:"Experiences from the community"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:c9.map((s,o)=>i.jsxs($.div,{initial:{opacity:0,y:20},animate:r?{opacity:1,y:0}:{},transition:{duration:.5,delay:.1*o},className:"border border-primary-foreground/10 p-6",children:[i.jsx("img",{src:Cr,alt:"",className:"w-4 h-4 mb-4 invert opacity-70"}),i.jsxs("p",{className:"font-body text-sm text-primary-foreground/80 leading-relaxed italic",children:['"',s.quote,'"']}),i.jsxs("div",{className:"mt-5",children:[i.jsx("p",{className:"font-display text-sm text-primary-foreground",children:s.name}),i.jsx("p",{className:"font-body text-xs text-primary-foreground/50",children:s.location})]})]},s.name))})]})}),i.jsx("section",{className:"py-20 md:py-28",children:i.jsxs("div",{className:"max-w-5xl mx-auto px-6 lg:px-12",children:[i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mb-4 text-center",children:"4 Ã Classes Monthly"}),i.jsx("h2",{className:"font-display text-2xl md:text-4xl text-foreground text-center mb-6",children:"Your monthly class schedule"}),i.jsx("p",{className:"font-body text-base text-muted-foreground text-center mb-14 max-w-2xl mx-auto",children:"Join us â we have an international audience and cater for multiple global timezones. All times listed in AEDT (Melbourne / Sydney)."}),i.jsx("div",{className:"space-y-0",children:[{title:"Online Group Spinal Attunement with Sigourney",schedule:"2nd & 3rd Wednesday of every month",time:"8:00 AM AEDT",description:"Experience Spinal Attunement during Sigourney Belle's monthly energy clinic. Release unconscious tensions and experience freedom and liberation in your body, mind, soul and spirit.",frequency:"2Ã monthly"},{title:"Parasympathetic Pleasure Breathwork with Gem Jordan",schedule:"4th Monday of every month",time:"7:30 AM AEDT",description:"Learn and experience our bespoke, gentle, trauma-informed breathwork modality. A monthly class to unwind, relax and restore.",frequency:"1Ã monthly"},{title:"Sensual Yin Yoga with Gem Jordan",schedule:"2nd Monday of every month",time:"7:30 AM AEDT",description:"Unwind elementally with our slow, sensual yin practice tied into traditional Chinese medicine elements and meridians.",frequency:"1Ã monthly"}].map((s,o)=>i.jsx($.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:o*.08},className:"border-b border-border py-8 first:border-t",children:i.jsxs("div",{className:"flex flex-col md:flex-row md:items-start gap-4 md:gap-8",children:[i.jsxs("div",{className:"shrink-0 md:w-48",children:[i.jsx("span",{className:"inline-block font-body text-xs tracking-widest uppercase text-accent bg-accent/10 px-3 py-1 rounded-full mb-2",children:s.frequency}),i.jsx("p",{className:"font-display text-sm text-foreground",children:s.time})]}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h3",{className:"font-display text-lg text-foreground",children:s.title}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-1",children:s.schedule}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-2 leading-relaxed",children:s.description})]})]})},s.title))})]})}),i.jsx("section",{id:"calendar-section",className:"bg-card",children:i.jsx(m_,{programSlug:"portal-to-self"})}),i.jsx("section",{className:"py-20 md:py-28 text-center",children:i.jsxs("div",{className:"max-w-2xl mx-auto px-6",children:[i.jsx("h2",{className:"font-display text-2xl md:text-4xl text-foreground mb-6",children:"Begin your journey home â to yourself"}),i.jsx("p",{className:"font-body text-base text-muted-foreground mb-10",children:"Portal to Self is your doorway into the somatic practices that have transformed thous
434ands of lives worldwide. No prior experience needed."}),i.jsxs("a",{href:"https://portal.somamystica.com/offers/GbLouLXP/checkout",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-8 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Join Now â $45/month",i.jsx(ue,{size:16})]})]})}),i.jsx(qy,{}),i.jsx(nt,{})]})},gw="/assets/david-bedrick-BHrfZe1O.jpg",u9=sh.url,x_=[{title:"Commanding the Room: The Energetics of Space Holding",presenter:"Sigourney Belle Weldon",description:"A 30-minute masterclass with Sigourney Belle Weldon on the first practice of holding a room so completely that people leave changed â and letting your reputation do the rest.",categories:["Somatics","Leadership"],purchaseUrl:"https://portal.somamystica.com/offers/f4TkuRKy",imageUrl:u9,bio:"Sigourney Belle Weldon is the founder of Soma Mystica®, a multi-modality somatic and energetic certification training school. With a 20-year career spanning somatics, energetics and nervous-system medicine, her work explores monadic power â power that originates from within. She is a contributing writer for Forbes and partners in research with Oxford University and the Planetary Health Lab."},{title:"Female Pelvic Anatomy and Dearmouring",presenter:"Carly Rae",description:"A 90 minute masterclass on Female Pelvic Anatomy and Dearmouring with Carly Rae.",categories:["Somatics","Holistic Health"],purchaseUrl:"https://portal.somamystica.com/offers/GPq4mVtu/checkout",imageUrl:Yy,bio:"Carly Rae specialises in female biology and hands-on pelvic work â a path that began through healing her own body from sexual abuse, medical injury, and a fractured connection to her womanhood. She is a guide into the depths of the female terrain, anatomy, and physiology, walking with women through the full Womb Continuum â exploring the layers of flesh, feminine intelligence, and primal bodies, merging the worlds of sacred and science. All of her work is devoted to the innate intelligence within every cell of the body and to the remembrance of our feminine nature."},{title:"Tremor Release Exercises (TRE) and Autogenic Regulation",presenter:"Richmond Heath",description:"A two-part masterclass series with Australia's leading TRE practitioner. Designed for certified TRE Providers, bodyworkers, and somatic therapists who want to deepen their understanding and broaden their toolkit.",categories:["Somatics"],purchaseUrl:"https://portal.somamystica.com/offers/2MTFsYJi/checkout",imageUrl:Jy,bio:"Richmond Heath is a pioneering somatic trauma educator, Physiotherapist, and the founder of TRE Australia. With over two decades of experience, he has been at the forefront of integrating neurogenic tremors and spontaneous movement into mainstream and alternative paradigms of healing, performance, and embodied spirituality. As the first to introduce TRE to Australia in 2010, Richmond has since expanded its reach beyond trauma recovery â positioning neurogenic movement as a powerful tool for reorganising tension, restoring regulation, and unlocking the body's innate intelligence."},{title:"Earth and Body as One",presenter:"David Bedrick, JD, Dipl. PW",description:"A profound masterclass where psychotherapist, author, and founder of the School of Spiritual Psychology invites us into a radical reimagining of healing â one where the boundaries between body and Earth dissolve, and we begin to listen more deeply to the soulful intelligence of both.",categories:["Somatics","Ecosomatics"],purchaseUrl:"https://portal.somamystica.com/offers/AHgbedUd/checkout",imageUrl:gw,bio:"David Bedrick, JD, Dipl. PW, is a teacher, counselor, and attorney. He is the founder of the Santa Fe Institute for Shame-based Studies, where he offers facilitation training to deepen the skills and awareness of therapists, coaches, and healers. David writes for Psychology Today and is the author of four books, including The Unshaming Way (2024, North Atlantic Books), endorsed by Gabor Maté."},{title:"Ecosomatics and Embodied Animism",presenter:"Dr. Brittney Laidlaw, PhD",description:"Whether you're a somatic practitioner, artist, healer, or seeker, this masterclass offers a grounded and visionary portal into the heart of relational embodiment â where the body is not only of nature, but in deep conversation with it.",categories:["Ecosomatics"],purchaseUrl:"https://portal.somamystica.com/offers/JNLFz7Rv/checkout",imageUrl:Qy,bio:"Brittany Jane Laidlaw is a Somatic Ecologist, Dancer and Eco-Philosopher with over 11 years of experience leading embodied, nature-connection programs in the wild. She is a PhD Candidate in eco-somatics and her research explores ways of relating to and restoring living ecologies through the somatic body. Her work has received numerous awards including the inaugural Westpac Future Leaders Award and Prime Minister's Endeavour Award. Today, Brittany offers programs guiding people through The EARTHED Framework, an experiential map for conversing with the body, nature, and soul."},{title:"Gut and Psychology Syndrome (GAPS)",presenter:"Mariko Ella",description:"A two hour masterclass on Gut and Psychology Syndrome (GAPS) with GAPS practitioner Mariko Ella.",categories:["Holistic Health"],purchaseUrl:"https://portal.somamystica.com/offers/kcPLoc7J/checkout"},{title:"Regulation and Resilience",presenter:"Damien Bohler",description:"A two hour masterclass on Nervous System Regulation and Resilience with Psychotherapist Damien Bohler, Founder of EvolveRelating.",categories:["Somatics","Meditation & Mindfulness"],purchaseUrl:"https://portal.somamystica.com/offers/RjfJ22MU/checkout",imageUrl:g_,bio:"Damien is a pragmatic visionary, synthesist and deep diver, focused on the future trajectory of humanity through relationship. His gift is the interweaving of complex subjects into forms that can be easily integrated and embodied â spanning Authentic Relating, Attachment Theory, Polarity, Sexuality, nervous system regulation, Human Design, Gene Keys, transpersonal shadow work, and more. He is the founder, director and head facilitator at Evololve Relating."},{title:"UnShaming",presenter:"David Bedrick, JD, Dipl. PW",description:"A 3 hour masterclass on what David Bedrick calls 'UnShaming' â a process that transcends traditional notions of building resilience against shame. It involves fundamentally shifting one's internal viewpoint to re
434cognise and embrace the inherent wisdom and value within the parts of ourselves that have been shamed.",categories:["Somatics"],purchaseUrl:"https://portal.somamystica.com/offers/soa8DiXF/checkout",extraLink:{label:"Purchase the 3-part series",url:"https://portal.somamystica.com/offers/nMDNTHXd"},imageUrl:gw,bio:"David Bedrick, JD, Dipl. PW, is a teacher, counselor, and attorney. He is the founder of the Santa Fe Institute for Shame-based Studies, where he offers facilitation training to deepen the skills and awareness of therapists, coaches, and healers. David writes for Psychology Today and is the author of four books, including The Unshaming Way (2024, North Atlantic Books), endorsed by Gabor Maté."},{title:"Somatic Dance",presenter:"Matthew Nelson",description:"A 3 hour masterclass exploring Somatic Dance as a therapeutic practise and medium for psychological healing and expression. Somatic dance integrates body awareness, mindfulness, and free-form movement to promote physical, emotional, and energetic well-being.",categories:["Somatics"],purchaseUrl:"https://portal.somamystica.com/offers/Wn2UeLv6/checkout"}],h9=Array.from(new Set(x_.flatMap(e=>e.categories))).sort(),f9=()=>i.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[i.jsx($t,{title:"Masterclass Library â Soma Mystica®",description:"On-demand masterclasses with leading somatic, energetic and nervous-system teachers, curated by Soma Mystica®.",path:"/masterclass-library"}),i.jsx(Ke,{}),i.jsx("section",{className:"relative pt-32 pb-20 px-6 text-center bg-primary text-primary-foreground",children:i.jsxs($.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},className:"max-w-3xl mx-auto",children:[i.jsx("p",{className:"font-body text-sm tracking-[0.3em] uppercase mb-4 text-primary-foreground/70",children:"Soma Mystica®"}),i.jsxs("h1",{className:"font-display text-4xl md:text-6xl font-light mb-6",children:["Masterclass ",i.jsx("em",{className:"italic",children:"Library"})]}),i.jsx("p",{className:"font-body text-lg text-primary-foreground/80 max-w-xl mx-auto",children:"Deep-dive teachings from world-class practitioners in somatics, ecosomatics, holistic health, and embodied healing."})]})}),i.jsx("section",{className:"py-8 px-6 border-b border-border bg-card",children:i.jsx("div",{className:"max-w-5xl mx-auto flex flex-wrap justify-center gap-3",children:h9.map(e=>i.jsx("span",{className:"px-4 py-1.5 rounded-full text-xs font-body tracking-widest uppercase bg-secondary text-secondary-foreground",children:e},e))})}),i.jsx("section",{className:"py-16 px-6",children:i.jsx("div",{className:"max-w-6xl mx-auto grid gap-8 md:grid-cols-2 lg:grid-cols-3",children:x_.map((e,t)=>i.jsx($.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:t*.05},className:"group flex flex-col bg-card border border-border rounded-sm overflow-hidden hover:shadow-lg transition-shadow duration-300",children:i.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[i.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:e.categories.map(n=>i.jsx("span",{className:"text-[10px] font-body tracking-widest uppercase px-2 py-0.5 rounded-full bg-accent/15 text-accent-foreground",children:n},n))}),e.imageUrl&&i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("img",{src:e.imageUrl,alt:e.presenter,className:"w-14 h-14 rounded-full object-cover border border-border"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-lg font-medium text-foreground leading-snug",children:e.title}),i.jsxs("p",{className:"font-body text-sm text-accent",children:["with ",e.presenter]})]})]}),!e.imageUrl&&i.jsxs(i.Fragment,{children:[i.jsx("h3",{className:"font-display text-lg font-medium text-foreground mb-1 leading-snug",children:e.title}),i.jsxs("p",{className:"font-body text-sm text-accent mb-4",children:["with ",e.presenter]})]}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:e.description}),e.bio&&i.jsx("p",{className:"font-body text-xs text-muted-foreground
434/80 leading-relaxed mt-3 pt-3 border-t border-border",children:e.bio}),i.jsx("div",{className:"flex-1"}),i.jsxs("div",{className:"mt-6 flex flex-col gap-2",children:[i.jsxs("a",{href:e.purchaseUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 bg-primary text-primary-foreground text-sm font-body tracking-wide rounded-sm hover:opacity-90 transition-opacity",children:["Purchase Masterclass",i.jsx(Zd,{className:"w-3.5 h-3.5"})]}),e.extraLink&&i.jsxs("a",{href:e.extraLink.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 border border-border text-foreground text-sm font-body tracking-wide rounded-sm hover:bg-secondary transition-colors",children:[e.extraLink.label,i.jsx(Zd,{className:"w-3.5 h-3.5"})]})]})]})},e.title))})}),i.jsx(nt,{})]}),m9=1,p9="1a32e02a-a110-4e68-a6f6-f19e9ec59f6f",g9="d7020298-ee16-4fdb-b15b-52fc559115b1",y9="/__l5e/assets-v1/1a32e02a-a110-4e68-a6f6-f19e9ec59f6f/commanding-hero.png",x9="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/1a32e02a-a110-4e68-a6f6-f19e9ec59f6f/commanding-hero.png",v9="commanding-hero.png",b9=1687247,w9="image/png",j9="2026-08-05T06:40:58Z",k9={version:m9,asset_id:p9,project_id:g9,url:y9,r2_key:x9,original_filename:v9,size:b9,content_type:w9,created_at:j9},S9=k9.url,N9=sh.url,v_="https://portal.somamystica.com/offers/f4TkuRKy",_9=[{icon:nM,title:"The Energetics of Presence",description:"Understand how your nervous system state becomes the felt atmosphere of the room â and how to regulate it on purpose."},{icon:BR,title:"Holding Without Collapsing",description:"Learn the difference between absorbing a room and containing it, so you can stay resourced while holding deep work."},{icon:cn,title:"Group Field Dynamics",description:"How energy moves through a group, where it gets stuck, and the subtle cues that tell you when to lead and when to wait."},{icon:tr,title:"Commanding Without Force",description:"Cultivate the quiet authority that lets people settle, trust and drop in â no performance, no pushing."}],C9=["Somatic practitioners, bodyworkers and breathwork facilitators","Psychotherapists, therapists and counsellors holding one-to-one sessions","Teachers, coaches and leaders working with groups","Anyone who desires to positively impact those around them beyond words â with their unseen potency"],yw=({label:e="Enrol Now â $22 USD"})=>i.jsxs("a",{href:v_,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase bg-foreground text-background px-10 py-4 hover:bg-foreground
434/85 transition-all duration-500",children:[e,i.jsx(ue,{size:16})]}),T9=()=>{const e=x.useRef(null),t=kt(e,{once:!0,margin:"-80px"});return i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:"Commanding the Room â Masterclass with Sigourney Belle Weldon",description:"A 30-minute masterclass on the energetics of space holding for practitioners. $22, lifetime access.",path:"/commanding-the-room",noindex:!0}),i.jsx(Ke,{}),i.jsxs("section",{className:"relative h-[80vh] md:h-[88vh] overflow-hidden",children:[i.jsx("img",{src:S9,alt:"Commanding the Room â the energetics of space holding masterclass",className:"absolute inset-0 w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-foreground/60"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center h-full text-center px-6",children:[i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"font-body text-xs md:text-sm tracking-[0.25em] uppercase text-primary-foreground/60 mb-5",children:"Intro Masterclass · Pre-Recorded · 30 Minutes"}),i.jsx($.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1},className:"font-display text-4xl md:text-6xl lg:text-7xl text-primary-foreground max-w-4xl leading-tight",children:"Commanding the Room"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.25},className:"font-display text-xl md:text-3xl text-primary-foreground/80 mt-4",children:"The Energetics of Space Holding"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.4},className:"font-body text-base md:text-lg text-primary-foreground/70 mt-6 max-w-2xl",children:"Join Sigourney Belle, Founder of Soma Mystica®, for a 30-minute masterclass on the energetics and neuroscience of true power: power sourced from the earth that lets you hold transformational space without effort."}),i.jsxs($.div,{initial:{opacity:0}
434,animate:{opacity:1},transition:{duration:.8,delay:.6},className:"mt-10 flex flex-col items-center gap-4",children:[i.jsxs("a",{href:v_,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground border border-primary-foreground/40 px-10 py-4 hover:bg-primary-foreground hover:text-foreground transition-all duration-500",children:["Get Instant Access â $22 USD",i.jsx(ue,{size:16})]}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-primary-foreground/50",children:"Watch anytime · Lifetime access"})]})]})]}),i.jsx("section",{className:"bg-secondary/40 border-y border-border",children:i.jsx("div",{className:"max-w-5xl mx-auto px-6 py-10 grid grid-cols-1 sm:grid-cols-3 gap-8 text-center",children:[{icon:oS,label:"Pre-recorded",value:"Watch instantly"},{icon:Pn,label:"Duration",value:"30 minutes"},{icon:tr,label:"Investment",value:"$22 USD"}].map(n=>i.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i.jsx(n.icon,{size:22,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:n.label}),i.jsx("p",{className:"font-display text-xl text-foreground",children:n.value})]},n.label))})}),i.jsx("section",{className:"py-20 px-6",children:i.jsxs("div",{className:"max-w-4xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-6",children:"Watch the Intro"}
434),i.jsx("div",{className:"relative w-full bg-foreground/5",style:{paddingTop:"56.25%"},children:i.jsx("iframe",{src:"https://player.vimeo.com/video/1217930726?h=091a96630c&badge=0&autopause=0&player_id=0&app_id=58479&autoplay=1&muted=1",frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share",referrerPolicy:"strict-origin-when-cross-origin",title:"Commanding the Room: The Energetics of Space Holding with Sigourney Belle",className:"absolute inset-0 w-full h-full"})})]})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("img",{src:Cr,alt:"",className:"w-10 mx-auto mb-10 opacity-60"}),i.jsx("blockquote",{className:"font-display text-2xl md:text-3xl text-foreground leading-snug text-center mb-14 italic",children:"âThe best referral you will ever get is another practitioner saying, âYou need to see her. I cannot explain it, but the room changes when she works.ââ"}),i.jsxs("div",{className:"font-body text-lg text-muted-foreground leading-relaxed space-y-6 text-left",children:[i.jsx("p",{children:"That sentence is not about technique."}),i.jsx("p",{children:"Every practitioner in your field knows the same modalities you do. The reason certain names get passed around in whispers, the reason a fully booked practice runs almost entirely on word of mouth, is something quieter and much harder to fake. It is the felt experience of being in the room with someone who can actually hold it."}),i.jsx("p",{children:"You have been in sessions on both sides of that. You know the difference between a practitioner who is performing calm and one who is genuinely grounded, and so does every client on your table, even the ones who could never put it into words. They feel whether your nervous system is a safe place to fall apart. That feeling is what they remember, and it is what they tell people about."}),i.jsx("p",{children:"Here is the part no one trained you in. That grounded, magnetic presence is not a personality trait some people are born with. It is a coherent nervous system and a trained ability to command the energetic field instead of straining against it. It can be learned, and it changes everything about how your work lands."}),i.jsx("p",{children:"Commanding the Room is a 30-minute masterclass with Sigourney Belle Weldon, physiotherapist and Oxford-linked researcher, that teaches you the first practice of exactly that. Hold a room so completely that people leave changed, and let your reputation do the rest."})]}),i.jsxs("div",{className:"mt-12 text-center",children:[i.jsx(yw,{}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground/60 mt-4",children:"$22 · Lifetime access"})]})]})}),i.jsx("section",{ref:e,className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Inside the Masterclass"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"What you'll walk away with"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:_9.map((n,r)=>i.jsxs($.div,{initial:{opacity:0,y:24},animate:t?{opacity:1,y:0}:{},transition:{duration:.6,delay:r*.1},className:"bg-background border border-border p-8",children:[i.jsx(n.icon,{size:24,className:"text-muted-foreground mb-5"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:n.title}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:n.description})]},n.title))})]})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-12",children:"Who this is for"}),i.jsx("ul",{className:"space-y-5",children:C9.map(n=>i.jsxs("li",{className:"flex items-start gap-4",children:[i.jsx("span",{className:"text-muted-foreground mt-1",children:"â¦"}),i.jsx("span",{className:"font-body text-lg text-muted-foreground",children:n})]},n))})]})}),i.jsx("section",{className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 md:grid-cols-2 gap-14 items-center",children:[i.jsx("img",{src:N9,alt:"Sigourney Belle Weldon, founder of Soma Mystica®",className:"w-full h-[420px] object-cover"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4",children:"Your Facilitator"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground mb-6",children:"Sigourney Belle Weldon"}),i.jsxs("div",{className:"font-body text-muted-foreground leading-relaxed space-y-4",children:[i.jsx("p",{children:"Sigourney Belle Weldon
434is a physiotherapist, medical intuitive, theologian, and founder of Soma Mystica® â a global training body with over 10,000 practitioners worldwide. For two decades, she has worked at the frontier of somatic psychology, neuroscience, and esoteric healing, training practitioners and leaders in the science and art of working with the human energy field."}),i.jsx("p",{children:"Her work with founders and impact entrepreneurs centres on one of the least-examined dimensions of leadership: the energetics of presence. Drawing on neuroscience, somatic psychology, and lineage teachings from Tantra, Buddhism, and Eastern medicine, she teaches the principles that determine whether a room follows you â or merely tolerates you. Power, in her framework, is not a performance. It is a physiological and energetic state that can be developed, refined, and wielded with precision and integrity."}),i.jsx("p",{children:"A bestselling author, Forbes contributor, and researcher in partnership with the Planetary Health Lab and Oxford University, Sigourney brings rigorous scientific grounding to territory most leadership training never touches. Her masterclass Commanding the Room: The Energetics of Space Holding is designed for founders and leaders who are done shrinking â and ready to learn how to hold power responsibly, so the people in their care can actually feel it."})]})]})]})}),i.jsx("section",{className:"py-28 px-6 text-center",children:i.jsxs("div",{className:"max-w-2xl mx-auto",children:[i.jsx("h2",{className:"font-display text-3xl md:text-5xl text-foreground mb-6",children:"Step into the room differently"}),i.jsx("p",{className:"font-body text-lg text-muted-foreground mb-10",children:"Instant access to the full 30-minute masterclass for $22 USD."}),i.jsx(yw,{})]})}),i.jsx(nt,{})]})}
434,E9=1,P9="4f26c2d7-72b4-438e-8a43-9391fff6a545",A9="d7020298-ee16-4fdb-b15b-52fc559115b1",R9="/__l5e/assets-v1/4f26c2d7-72b4-438e-8a43-9391fff6a545/sarah-donko.jpg",M9="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/4f26c2d7-72b4-438e-8a43-9391fff6a545/sarah-donko.jpg",O9="sarah-donko.jpg",I9=109367,D9="image/jpeg",L9="2026-09-27T23:30:18Z",$9={version:E9,asset_id:P9,project_id:A9,url:R9,r2_key:M9,original_filename:O9,size:I9,content_type:D9,created_at:L9},F9=1,B9="56873db6-66bb-47d2-8b6e-4be86925283a",U9="d7020298-ee16-4fdb-b15b-52fc559115b1",z9="/__l5e/assets-v1/56873db6-66bb-47d2-8b6e-4be86925283a/ana-polanco.png",V9="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/56873db6-66bb-47d2-8b6e-4be86925283a/ana-polanco.png",W9="ana-polanco.png",H9=1608424,q9="image/png",K9="2026-09-28T05:50:03Z",G9={version:F9,asset_id:B9,project_id:U9,url:z9,r2_key:V9,original_filename:W9,size:H9,content_type:q9,created_at:K9},Y9=1,J9="6a5ee213-9372-4bcf-a0a9-b5015107b0f1",Q9="d7020298-ee16-4fdb-b15b-52fc559115b1",X9="/__l5e/assets-v1/6a5ee213-9372-4bcf-a0a9-b5015107b0f1/mentorship-hero.jpg",Z9="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/6a5ee213-9372-4bcf-a0a9-b5015107b0f1/mentorship-hero.jpg",eW="mentorship-hero.jpg",tW=105108,nW="image/jpeg",rW="2026-08-26T04:51:59Z",b_={version:Y9,asset_id:J9,project_id:Q9,url:X9,r2_key:Z9,original_filename:eW,size:tW,content_type:nW,created_at:rW},sW=1,iW="1dd81ebc-e0d5-4a15-abec-8d2075a1459d",oW="d7020298-ee16-4fdb-b15b-52fc559115b1",aW="/__l5e/assets-v1/1dd81ebc-e0d5-4a15-abec-8d2075a1459d/sigourney-belle-mentorship.jpg",lW="a/v1/d7020298-ee16-4fdb-b15b-52fc559115b1/1dd81ebc-e0d5-4a15-abec-8d2075a1459d/sigourney-belle-mentorship.jpg",cW="sigourney-belle-mentorship.jpg",dW=253259,uW="image/jpeg",hW="2026-09-25T22:04:08Z",tx={version:sW,asset_id:iW,project_id:oW,url:aW,r2_key:lW,original_filename:cW,size:dW,content_type:uW,created_at:hW},fW=$9.url,mW=G9.url,pW=b_.url,xw="https://portal.somamystica.com/soma-mystica-application-new-programs",gW=tx.url,yW=[{name:"Sigourney Belle",role:"Founder · Lead Trainer",location:"Australia",bio:"Sigourney Belle Weldon is an Australian entrepreneur, bestselling author, and healer whose work bridges the clinical and the mystical. She graduated with distinction in physiotherapy from Curtin University and spent a decade in neurological rehabilitation and trauma, a clinical grounding that became the foundation for SOMAMYSTICA® â a global training body now home to thousands of practitioners. She is developing a research partnership with Oxford University's Flourishing Intelligence Programme and Planetary Health Lab, exploring interoceptive diagnostics and her Spinal Attunement modality. Across every strand of her work, Sigourney holds light and shadow, science and spirit, as a single continuous field â and mentors practitioners toward that same integration in their own craft.",imageUrl:gW},{name:"Kaya Pogacar",role:"Head Trainer",location:"Cyprus",bio:"Kaya's work is multidimensional, initiatory and deeply transformational. She works primarily with the rose and golden ray medicines and has a profound connection to subtle realms, which enables her to create gentle, soft yet nurturing spaces. You'll deepen your skills and unique gifts while being challenged to expand beyond the known and your comfort zone.",imageUrl:p_},{name:"Sarah Donko",role:"Head Trainer",location:"Germany",bio:"Sarah is an internationally trained somatic practitioner and trauma-informed mentor, certified in NEO Emotional Releases, the Soma Mystica® Self Holding Method and the Spinal Attunement⢠Method, with a profound background in marketing and brand building. Her work begins with your soul signature: as long as you are fully aligned to it, everything else falls into place. She supports you to dive deep, fly high and always stay grounded â unravelling your unique gifts to find your very own personal signature.",imageUrl:fW},{name:"Ana Polanco",role:"Spinal Attunement Trainer & Practitioner",bio:"Ana is a Latina, bilingual Spinal Attunement Trainer & Practitioner with a background in psychotherapy. She is fascinated by the intersection of neuroscience, the body, and the energetic field. Her work explores what can emerge when we move beyond words and listen to the body. She is here to supp
434ort that process with curiosity, presence, and deep respect for each person's experience.",imageUrl:mW}],xW=[{icon:Dt,title:"Fortnightly Mentorship",description:"Six private 90-minute sessions held every two weeks, giving you consistent, spaced support across three months."},{icon:Vu,title:"Online or In Person",description:"Sessions are held online or in person â to be discussed directly with your chosen trainer once you have booked."},{icon:cn,title:"Your Choice of Trainer",description:"Select the trainer whose expertise and lineage best serve your skillset and your development edge."},{icon:tr,title:"Practitioner-Only",description:"This mentorship is reserved for certified Soma Mystica® practitioners deepening their craft and clinical mastery."}],vW=[{name:"Three-Month Mentorship",price:"$1,500 USD",period:"total",includes:["Six fortnightly 1:1 mentorship sessions","Full three months of private mentorship","Online or in person (by arrangement)"],note:"Paid in full for the complete three-month mentorship.",highlight:!0},{name:"Monthly",price:"$550 USD / month",period:"for three months",includes:["Fortnightly 1:1 mentorship sessions","Six 90-minute sessions per three-month cycle","Online or in person (by arrangement)"],note:"Three monthly payments of $550 USD ($1,650 USD total).",highlight:!1}],bW=()=>i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:"Practitioner Mentorship â Soma Mystica®",description:"Fortnightly one-to-one mentorship with a Soma Mystica® trainer to deepen your craft and clinical mastery.",path:"/mentorship",noindex:!0}),i.jsx(Ke,{}),i.jsxs("section",{className:"relative h-[70vh] md:h-[80vh] overflow-hidden",children:[i.jsx("img",{src:pW,alt:"Mentorship â movement in practice",className:"absolute inset-0 w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-foreground
434/70 via-foreground/55 to-foreground/80"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center h-full text-center px-6",children:[i.jsx($.img,{src:Cr,alt:"Soma Mystica®",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:1},className:"h-16 md:h-20 w-auto mb-8 brightness-[2] opacity-90"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"font-body text-xs md:text-sm tracking-[0.25em] uppercase text-primary-foreground/60 mb-5",children:"Practitioners Only · Private Mentorship"}),i.jsx($.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1},className:"font-display text-4xl md:text-6xl lg:text-7xl text-primary-foreground max-w-4xl leading-tight",children:"Mentorship"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.25},className:"font-display text-xl md:text-2xl text-primary-foreground/80 mt-4 max-w-2xl",children:"One-on-one mentorship with a Soma Mystica® trainer, designed to take your practice, your presence and your business to its next depth."})]})]}),i.jsx("section",{className:"bg-secondary/40 border-y border-border",children:i.jsx("div",{className:"max-w-5xl mx-auto px-6 py-10 grid grid-cols-1 sm:grid-cols-3 gap-8 text-center",children:[{icon:Pn,label:"Session Length",value:"90 minutes"},{icon:Dt,label:"Frequency",value:"Fortnightly · 6 sessions"},{icon:cn,label:"Format",value:"Online or in person"}].map(e=>i.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i.jsx(e.icon,{size:22,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:e.label}),i.jsx("p",{className:"font-display text-xl text-foreground",children:e.value})]},e.label))})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("img",{src:Cr,alt:"",className:"w-10 mx-auto mb-10 opacity-60"}),i.jsxs("div",{className:"font-body text-lg text-muted-foreground leading-relaxed space-y-6 text-left",children:[i.jsx("p",{children:"Mentorship is the space between your training and your mastery. It is where the principles you learned become lived, embodied and refined in real time â in your sessions, with your clients, inside your growing practice."}),i.jsx("p",{children:"This is a private, one-on-one container with the Soma Mystica® trainer of your choice. Across three months you will meet fortnightly for six 90-minute sessions, held online or in person by arrangement with your trainer. Each session is shaped around you: your clinical questions, your energetic development, your business edge, your next becoming as a practitioner."}),i.jsx("p",{children:"Whether you are stabilising a new skillset, navigating complex client presentations, or refining your touch and presence, mentorship gives you a seasoned pair of eyes on your work â and a steady hand at your back."})]})]})}),i.jsx("section",{className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Inside the Container"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"What mentorship includes"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:xW.map((e,t)=>i.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:t*.1},className:"bg-background border border-border p-8",children:[i.jsx(e.icon,{size:24,className:"text-muted-foreground mb-5"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:e.title}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:e.description})]},e.title))})]})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Investment"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-6",children:"Choose your mentorship rhythm"}),i.jsxs("div",{className:"border border-accent/40 bg-accent/5 px-6 py-6 max-w-3xl mx-auto mb-16 text-center",children:[i.jsx("p",{className:"font-display text-xl md:text-2xl text-foreground mb-3",children:"A rare opportunity"}),i.jsxs("p",{className:"font-body text-sm md:text-base text-muted-foreground leading-relaxed",children:["One-to-one mentorship with Sigourney normally starts at $1,500 USD ",i.jsx("em",{children:"per session"}),". For practitioners, she is offering this full three-month container â six 90-minute sessions â at a significant discount, exclusively through this page."]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-3xl mx-auto",children:vW.map((e,t)=>i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:t*.1},className:`relative border p-8 flex flex-col ${e.highlight?"border-accent bg-accent/5":"border-border bg-background"}`,children:[e.highlight&&i.jsx("span",{className:"absolute -top-3 left-6 bg-accent text-primary-foreground font-body text-xs tracking-widest uppercase px-3 py-1",children:"Three Months"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-2",children:e.name}),i.jsx("p",{className:"font-display text-3xl md:text-4xl text-foreground mb-1",children:e.price}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:e.period}),i.jsx("div",{className:"space-y-3 flex-1",children:e.includes.map((n,r)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"text-accent mt-1 shrink-0",children:"â¦"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:n})]},r))}),e.note&&i.jsx("p",{className:"font-body text-xs text-muted-foreground
434/70 mt-4 italic",children:e.note}),i.jsxs("a",{href:xw,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center justify-center gap-2 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-6 py-3 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:14})]})]},t))}),i.jsx("p",{className:"font-body text-sm text-muted-foreground/70 text-center mt-8 max-w-xl mx-auto",children:"Online or in person session format is arranged directly with your chosen trainer once your mentorship is booked."})]})}),i.jsx("section",{className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Choose Your Mentor"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"Meet your trainers"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:yW.map((e,t)=>i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:t*.15},className:"flex flex-col items-center text-center bg-background border border-border p-8",children:[e.imageUrl?i.jsx("img",{src:e.imageUrl,alt:e.name,className:"w-28 h-28 rounded-full object-cover shrink-0 mb-5",loading:"lazy"}):i.jsx("div",{className:"w-28 h-28 rounded-full bg-card border border-border flex items-center justify-center mb-5",children:i.jsx(er,{size:28,className:"text-muted-foreground/40"})}),i.jsx("h3",{className:"font-display text-xl text-foreground",children:e.name}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mt-1 mb-1",children:e.role}),e.location&&i.jsxs("p",{className:"flex items-center justify-center gap-1.5 font-body text-xs text-muted-foreground mb-3",children:[i.jsx(er,{size:12,className:"text-muted-foreground/70"}),e.location]}),e.bio?i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:e.bio}):i.jsx("p",{className:"font-body text-xs text-muted-foreground/50 italic",children:"Trainer bio coming soon."})]},t))})]})}),i.jsx("section",{className:"py-28 px-6 text-center",children:i.jsxs("div",{className:"max-w-2xl mx-auto",children:[i.jsx("h2",{className:"font-display text-3xl md:text-5xl text-foreground mb-6",children:"Begin your mentorship"}),i.jsx("p",{className:"font-body text-lg text-muted-foreground mb-10",children:"Six fortnightly sessions with the trainer of your choice. Online or in person, by arrangement."}),i.jsxs("a",{href:xw,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-10 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})}),i.jsx(nt,{})]}),wW=b_.url,jW=tx.url,kf="https://calendly.com/sigourney/pracmentorship",kW="https://portal.somamystica.com/offers/7gNvFGAS",SW=[{icon:Dt,title:"Fortnightly Mentorship",description:"Six private hour-long sessions held every two weeks, giving you consistent, spaced support across three months."},{icon:Vu,title:"Online or In Person",description:"Sessions are held online or in person â arranged directly with Sigourney once your place is booked."},{icon:cn,title:"Six Places Only",description:"This container is limited to six practitioners, opening this year. Once the places are gone, they are gone."},{icon:tr,title:"Practitioner-Only",description:"This mentorship is reserved for certified Soma Mystica® practitioners deepening their craft and their impact."}],NW=[{title:"Deeper Skillsets Inside the Work",description:"Refine your touch, your listening and your presence. Navigate complex client presentations, stabilise advanced skills, and develop the subtle precision that separates a good session from a transformative one."},{title:"Establishing & Amplifying Business Impact",description:"Bring your practice into the world with force. Clarify your positioning, build a clientele around your strengths, and amplify the reach and impact of your work â so your skillset meets the audience it deserves."}],_W=()=>(x.useEffect(()=>{const e=document.createElement("script");return e.src="https://assets.calendly.com/assets/external/widget.js",e.async=!0,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:"Mentorship with Sigourney Belle â Soma Mystica®",description:"A private three-month mentorship with Soma Mystica® founder Sigourney Belle. Six places only, beginning this year.",path:"/sigourney-mentorship",noindex:!0}),i.jsx(Ke,{}),i.jsxs("section",{className:"relative h-[70vh] md:h-[80vh] overflow-hidden",children:[i.jsx("img",{src:wW,alt:"Mentorship with Sigourney Belle â movement in practice",className:"absolute inset-0 w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-foreground
434/70 via-foreground/55 to-foreground/80"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center h-full text-center px-6",children:[i.jsx($.img,{src:Cr,alt:"Soma Mystica®",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:1},className:"h-16 md:h-20 w-auto mb-8 brightness-[2] opacity-90"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"font-body text-xs md:text-sm tracking-[0.25em] uppercase text-primary-foreground/60 mb-5",children:"Practitioners Only · 6 Places · Beginning This Year"}),i.jsx($.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1},className:"font-display text-4xl md:text-6xl lg:text-7xl text-primary-foreground max-w-4xl leading-tight",children:"Mentorship with Sigourney Belle"}),i.jsx($.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.25},className:"font-display text-xl md:text-2xl text-primary-foreground/80 mt-4 max-w-2xl",children:"A private three-month mentorship with the founder of Soma Mystica® â for practitioners ready to deepen their skillset and amplify their impact."})]})]}),i.jsx("section",{className:"bg-secondary/40 border-y border-border",children:i.jsx("div",{className:"max-w-5xl mx-auto px-6 py-10 grid grid-cols-1 sm:grid-cols-3 gap-8 text-center",children:[{icon:Pn,label:"Session Length",value:"1 hour"},{icon:Dt,label:"Frequency",value:"Fortnightly · 6 sessions"},{icon:cn,label:"Places",value:"6 only · this year"}].map(e=>i.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i.jsx(e.icon,{size:22,className:"text-muted-foreground"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground",children:e.label}),i.jsx("p",{className:"font-display text-xl text-foreground",children:e.value})]},e.label))})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("img",{src:Cr,alt:"",className:"w-10 mx-auto mb-10 opacity-60"}),i.jsxs("div",{className:"font-body text-lg text-muted-foreground leading-relaxed space-y-6 text-left",children:[i.jsx("p",{children:"This is the most direct access to Sigourney Belle inside Soma Mystica® â a private, one-on-one container held personally by the founder. It exists for practitioners who are ready for more: more depth in the work, and more impact from it."}),i.jsx("p",{children:"Across three months you will meet fortnightly for six hour-long sessions, held online or in person by arrangement. Each session is shaped entirely around you â your clinical questions, your energetic development, your edge in the work, and the practice you are building around it."}),i.jsx("p",{children:"This is not a program you attend. It is a mentorship you step into â held by someone who has walked the full arc from clinical practice to a global training body, and who mentors from both."})]})]})}),i.jsx("section",{className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Where the Work Goes"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"Two threads, one mentorship"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:NW.map((e,t)=>i.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:t*.1},className:"bg-background border border-border p-8",children:[i.jsx("h3",{className:"font-display text-xl text-foreground mb-4",children:e.title}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:e.description})]},e.title))})]})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Inside the Container"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"What mentorship includes"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10",children:SW.map((e,t)=>i.jsxs($.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:t*.1},className:"bg-background border border-border p-8",children:[i.jsx(e.icon,{size:24,className:"text-muted-foreground mb-5"}),i.jsx("h3",{className:"font-display text-xl text-foreground mb-3",children:e.title}),i.jsx("p",{className:"font-body text-muted-foreground leading-relaxed",children:e.description})]},e.title))})]})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"A Rare Opportunity"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-14",children:"Why this mentorship exists"}),i.jsxs("div",{className:"font-body text-lg text-muted-foreground leading-relaxed space-y-6 text-left",children:[i.jsx("p",{children:"Whether it be a booked-out practice, an elevated lifestyle, or simply creating a business that feels aligned and less stressful â Sigourney has 12 years of experience in the industry as an entrepreneur, and has scaled three multi-million dollar businesses within just the decade."}),i.jsx("p",{children:"She is now offering mentorship to practitioners at an extremely reduced price point â three months of sessions for the price of what she offers the public for just one session â and is opening six places to
434support you this year."}),i.jsxs("p",{children:["This is not something she always offers. But with increasing feedback that people would love to both enhance and elevate their practice with the work she has taught them ",i.jsx("em",{children:"and"})," learn how to amplify their business impact â she has responded."]})]})]})}),i.jsx("section",{className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Investment"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"One container, one investment"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 max-w-3xl mx-auto items-start",children:[i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"relative border border-accent bg-background p-8 flex flex-col",children:[i.jsx("span",{className:"absolute -top-3 left-6 bg-accent text-primary-foreground font-body text-xs tracking-widest uppercase px-3 py-1",children:"Three Months · Paid in Full"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-2 mt-2",children:"Mentorship with Sigourney Belle"}),i.jsx("p",{className:"font-display text-3xl md:text-4xl text-foreground mb-1",children:"$1,800 USD"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"total, for the full three-month mentorship"}),i.jsx("div",{className:"space-y-3 flex-1",children:["Six fortnightly 1:1 mentorship sessions with Sigourney","Full three months of private mentorship","Hour-long sessions, online or in person","Six places only â beginning this year"].map((e,t)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"text-accent mt-1 shrink-0",children:"â¦"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:e})]},t))}),i.jsxs("a",{href:kf,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center justify-center gap-2 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-6 py-3 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Book Your Place",i.jsx(ue,{size:14})]})]}),i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},className:"relative border border-border bg-background p-8 flex flex-col",children:[i.jsx("span",{className:"absolute -top-3 left-6 bg-secondary text-foreground font-body text-xs tracking-widest uppercase px-3 py-1",children:"Three Months · Payment Plan"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-muted-foreground mb-2 mt-2",children:"Mentorship with Sigourney Belle"}),i.jsx("p",{className:"font-display text-3xl md:text-4xl text-foreground mb-1",children:"3 à $600 USD"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mb-6",children:"three monthly payments, for the full three-month mentorship"}),i.jsx("div",{className:"space-y-3 flex-1",children:["Six fortnightly 1:1 mentorship sessions with Sigourney","Full three months of private mentorship","Hour-long sessions, online or in person","Six places only â beginning this year"].map((e,t)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"text-accent mt-1 shrink-0",children:"â¦"}),i.jsx("p",{className:"font-body text-sm text-muted-foreground",children:e})]},t))}),i.jsxs("a",{href:kW,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center justify-center gap-2 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-6 py-3 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Start Payment Plan",i.jsx(ue,{size:14})]})]})]})]})}),i.jsx("section",{className:"py-24 px-6",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground text-center mb-4",children:"Your Mentor"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground text-center mb-16",children:"Sigourney Belle"}),i.jsx("div",{className:"max-w-2xl mx-auto",children:i.jsxs($.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.15},className:"flex flex-col items-center text-center bg-background border border-border p-8",children:[i.jsx("img",{src:jW,alt:"Sigourney Belle",className:"w-28 h-28 rounded-full object-cover shrink-0 mb-5",loading:"lazy"}),i.jsx("h3",{className:"font-display text-xl text-foreground",children:"Sigourney Belle"}),i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent mt-1 mb-1",children:"Founder · Lead Trainer"}),i.jsxs("p",{className:"flex items-center justify-center gap-1.5 font-body text-xs text-muted-foreground mb-3",children:[i.jsx(er,{size:12,className:"text-muted-foreground
434/70"}),"Australia"]}),i.jsx("p",{className:"font-body text-sm text-muted-foreground leading-relaxed",children:"Sigourney Belle Weldon is an Australian entrepreneur, bestselling author, and healer whose work bridges the clinical and the mystical. She graduated with distinction in physiotherapy from Curtin University and spent a decade in neurological rehabilitation and trauma, a clinical grounding that became the foundation for SOMAMYSTICA® â a global training body now home to thousands of practitioners. She is developing a research partnership with Oxford University's Flourishing Intelligence Programme and Planetary Health Lab, exploring interoceptive diagnostics and her Spinal Attunement modality. Across every strand of her work, Sigourney holds light and shadow, science and spirit, as a single continuous field â and mentors practitioners toward that same integration in their own craft."})]})})]})}),i.jsx("section",{className:"py-24 px-6 bg-secondary/30",children:i.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[i.jsx("p",{className:"font-body text-xs tracking-[0.25em] uppercase text-muted-foreground mb-4",children:"Secure One of Six Places"}),i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground mb-6",children:"Book straight in"}),i.jsx("p",{className:"font-body text-lg text-muted-foreground mb-10",children:"Choose your first session time with Sigourney below â your mentorship begins from there."}),i.jsx("div",{className:"calendly-inline-widget bg-background border border-border","data-url":`${kf}?hide_gdpr_banner=1&primary_color=4a3728`,style:{minWidth:"320px",height:"700px"}}),i.jsxs("a",{href:kf,target:"_blank",rel:"noopener noreferrer",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-10 py-4 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Open Booking in a New Window",i.jsx(ue,{size:16})]})]})}),i.jsx(nt,{})]})),CW="/assets/temple-farmhouse-forest-CtI0uBE_.jpg",TW="/assets/temple-farmhouse-interior-yX_tKxbv.jpg",EW=tx.url,Wc="https://portal.somamystica.com/soma-mystica-application-new-programs",PW=[{icon:$R,label:"March 4â8, 2027",sub:"Five-day live intensive"},{icon:er,label:"Temple Farmhouse",sub:"Byron Bay, Australia"},{icon:cn,label:"12 spaces only",sub:"An intimate cohort"},{icon:tr,label:"With Sigourney Belle",sub:"Founder · Lead Trainer"}],AW=[{name:"Pay in Full & Save",price:"$5,000 USD",highlight:!1,includes:["1 year's access to online pre-requisite training ($1,500 USD value)","5-day live intensive training ($3,500 USD value)"],note:"5-Day Live Intensive base rate is $3,500 USD."},{name:"3-Part Payment Plan",price:"3 à $1,835 USD",highlight:!0,includes:["1 year's access to online pre-requisite training","5-day live intensive training","10% interest on payment plan"],note:"Plan must be paid in full before the training starts."},{name:"6-Part Payment Plan",price:"6 à $1,000 USD",highlight:!1,includes:["1 year's access to online pre-requisite training","5-day live intensive training","20% interest on payment plan"],note:"Plan must be paid in full before the training starts."}],RW=()=>i.jsxs("div",{className:"min-h-screen bg-background",children:[i.jsx($t,{title:"Spinal Attunement Byron Bay â March 4â8, 2027 | Soma Mystica®",description:"A five-day Spinal Attunement live intensive with Sigourney Belle at Temple Farmhouse, Byron Bay. 12 spaces only. Super Early Bird 15% off until 1 November.",path:"/byron-bay-training"}),i.jsx(Ke,{}),i.jsxs("section",{className:"relative pt-32 pb-20 md:pt-40 md:pb-28 overflow-hidden",children:[i.jsxs("div",{className:"absolute inset-0",children:[i.jsx("img",{src:Bp,alt:"",className:"w-full h-full object-cover opacity-25"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-background/80 to-background"})]}),i.jsxs("div",{className:"relative max-w-4xl mx-auto px-6 text-center",children:[i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mb-4",children:"Spinal Attunement⢠· Live Intensive"}),i.jsxs("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground leading-tight",children:["Byron Bay",i.jsx("br",{}),i.jsx("em",{className:"italic",children:"March 4â8, 2027"})]}),i.jsx("p",{className:"font-body text-base md:text-lg text-muted-foreground mt-6 leading-relaxed max-w-2xl mx-auto",children:"Five days immersed in the Spinal Attunement⢠Method at Temple Farmhouse, Byron Bay â guided personally by Soma Mystica® founder Sigourney Belle."}),i.jsxs("a",{href:Wc,target:"_blank",rel:"noopener noreferrer",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground bg-accent px-10 py-5 hover:bg-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})]}),i.jsx("section",{className:"border-y border-accent/30 bg-accent/10",children:i.jsx("div",{className:"max-w-4xl mx-auto px-6 py-8 text-center",children:i.jsxs("p",{className:"font-body text-sm md:text-base text-foreground leading-relaxed",children:[i.jsx("span",{className:"font-semibold text-accent uppercase tracking-wide",children:"Super Early Bird:"})," ","15% off until 1 November ·"," ",i.jsx("span",{className:"font-semibold text-accent uppercase tracking-wide",children:"Early Bird:"})," ","10% off until 1 December ·"," ",i.jsx("span",{className:"font-semibold",children:"12 spaces only."})]})})}),i.jsx("section",{className:"py-16 md:py-20",children:i.jsx("div",{className:"max-w-5xl mx-auto px-6 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8",children:PW.map(({icon:e,label:t,sub:n})=>i.jsxs("div",{className:"text-center",children:[i.jsx(e,{className:"mx-auto text-accent mb-3",size:28}),i.jsx("p",{className:"font-body text-base font-semibold text-foreground",children:t}),i.jsx("p",{className:"font-body text-sm text-muted-foreground mt-1",children:n})]},t))})}),i.jsx("section",{className:"pb-16 md:pb-24",children:i.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground leading-tight text-center",children:"Temple Farmhouse"}),i.jsx("p",{className:"font-body text-base md:text-lg text-muted-foreground text-center mt-4 max-w-2xl mx-auto leading-relaxed",children:"A private retreat property in the Byron Bay hinterland â rainforest trails, open paddocks, and quiet spaces to land between sessions."}),i.jsxs("div",{className:"mt-10 grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsx("img",{src:Bp,alt:"Aerial view of Temple Farmhouse, Byron Bay â farmhouse, pool and fire circle surrounded by forest",className:"w-full h-72 object-cover",loading:"lazy"}),i.jsx("img",{src:CW,alt:"Rainforest walking trail on the Temple Farmhouse property",className:"w-full h-72 object-cover",loading:"lazy"}),i.jsx("img",{src:TW,alt:"Interior living space at Temple Farmhouse with fireplace and leather seating",className:"w-full h-72 object-cover",loading:"lazy"})]})]})}),i.jsx("section",{className:"py-16 md:py-24 bg-secondary/30",children:i.jsxs("div",{className:"max-w-3xl mx-auto px-6",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground leading-tight text-center",children:"Five days in the field"}),i.jsxs("div",{className:"mt-8 space-y-5 font-body text-base md:text-lg text-muted-foreground leading-relaxed",children:[i.jsx("p",{children:"This is the Spinal Attunement⢠Method taught the way it was meant to be learned â live, in person, hands-on, in a small group where nothing gets lost. Over five days at Temple Farmhouse you will train directly with Sigourney Belle, founder of Soma Mystica®, alongside just eleven other practitioners."}),i.jsx("p",{children:"You'll deepen your capacity to listen to the intelligence of the body and the field, refine your hands-on skillset, and leave with the confidence to facilitate this work with your own clients."}),i.jsx("p",{children:"With only 12 spaces available, this intensive will fill. Early applicants receive the Super Early Bird rate."})]}),i.jsx("div",{className:"mt-10 text-center",children:i.jsxs("a",{href:Wc,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-foreground border border-foreground px-10 py-5 hover:bg-foreground hover:text-primary-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})})]})}),i.jsx("section",{className:"py-16 md:py-24",children:i.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground leading-tight text-center",children:"Investment"}),i.jsx("p",{className:"font-body text-sm md:text-base text-accent text-center mt-4",children:"Super Early Bird 15% off until 1 November · Early Bird 10% off until 1 December"}),i.jsx("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:AW.map(e=>i.jsxs("div",{className:`flex flex-col p-8 border ${e.highlight?"border-accent bg-accent/5":"border-border bg-card"}`,children:[i.jsx("p",{className:"font-body text-xs tracking-widest uppercase text-accent",children:e.name}),i.jsx("p",{className:"font-display text-3xl text-foreground mt-3",children:e.price}),i.jsx("ul",{className:"mt-6 space-y-3 font-body text-sm text-muted-foreground flex-1",children:e.includes.map(t=>i.jsxs("li",{className:"flex gap-2",children:[i.jsx("span",{className:"text-accent",children:"â¦"}),i.jsx("span",{children:t})]},t))}),i.jsx("p",{className:"font-body text-xs text-muted-foreground mt-6 italic",children:e.note}),i.jsxs("a",{href:Wc,target:"_blank",rel:"noopener noreferrer",className:"mt-6 inline-flex items-center justify-center gap-2 font-body text-xs tracking-widest uppercase text-primary-foreground bg-accent px-6 py-4 hover:bg-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:14})]})]},e.name))}),i.jsx("p",{className:"font-body text-sm text-muted-foreground text-center mt-8",children:"Practitioner membership space is available for an additional $499 USD/year, including twice-monthly integration calls."})]})}),i.jsx("section",{className:"py-16 md:py-24",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground leading-tight text-center mb-12",children:"Your trainer"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 items-center",children:[i.jsx("div",{className:"overflow-hidden",children:i.jsx("img",{src:EW,alt:"Sigourney Belle, founder of Soma Mystica®",className:"w-full h-[420px] object-cover",loading:"lazy"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-display text-2xl text-foreground",children:"Sigourney Belle"}),i.jsx("p",{className:"font-body text-sm tracking-widest uppercase text-accent mt-1",children:"Founder · Lead Trainer"}),i.jsxs("p",{className:"font-body text-sm text-muted-foreground mt-1 flex items-center gap-1.5",children:[i.jsx(er,{size:14,className:"text-accent"})," Australia"]}),i.jsx("p",{className:"font-body text-base text-muted-foreground mt-5 leading-relaxed",children:"Sigourney Belle is the founder of Soma Mystica® and the Spinal Attunement⢠Method. A physiotherapy graduate with distinction from Curtin University, she spent a decade working in neurological rehabilitation and trauma before devoting her work to
434somatic and energetic therapies. Soma Mystica® is a research partner of the Oxford Flourishing Intelligence Programme and Planetary Health Lab."})]})]})]})}),i.jsx("section",{className:"py-16 md:py-24 bg-secondary/30",children:i.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[i.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground leading-tight",children:"One of twelve spaces"}),i.jsx("p",{className:"font-body text-base md:text-lg text-muted-foreground mt-5 leading-relaxed",children:"March 4â8, 2027 · Temple Farmhouse, Byron Bay · Super Early Bird 15% off until 1 November."}),i.jsxs("a",{href:Wc,target:"_blank",rel:"noopener noreferrer",className:"mt-10 inline-flex items-center gap-3 font-body text-sm tracking-widest uppercase text-primary-foreground bg-accent px-10 py-5 hover:bg-foreground transition-all duration-500",children:["Apply Now",i.jsx(ue,{size:16})]})]})}),i.jsx(nt,{})]}),MW=ey("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),yr=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const a=r?z4:"button";return i.jsx(a,{className:Xe(MW({variant:t,size:n,className:e})),ref:o,...s})});yr.displayName="Button";const hs=x.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:Xe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));hs.displayName="Input";const OW=()=>{const{user:e,loading:t}=Ci(),n=Mn(),[r]=Gg(),[s,o]=x.useState(""),[a,l]=x.useState(r.get("client")),{data:c}=At({queryKey:["practitioner-self",e==null?void 0:e.id],queryFn:async()=>{const{data:m,error:y}=await K.from("practitioners").select("id").eq("user_id",e.id).single();if(y)throw y;return m},enabled:!!e}),{data:d=[]}=At({queryKey:["clients",c==null?void 0:c.id],queryFn:async()=>{const{data:m,error:y}=await K.from("clients").select("id, full_name").eq("practitioner_id",c.id).order("full_name");if(y)throw y;return m},enabled:!!c}),{data:u=[],isLoading:h}=At({queryKey:["session-notes",c==null?void 0:c.id,a],queryFn:async()=>{let m=K.from("session_notes").select("id, session_date, duration_minutes, subjective, client_id, clients(full_name)").eq("practitioner_id",c.id).order("session_date",{ascending:!1});a&&(m=m.eq("client_id",a));const{data:y,error:p}=await m;if(p)throw p;return y},enabled:!!c}),f=u.filter(m=>{var p,w;return s?(((p=m.clients)==null?void 0:p.full_name)||"").toLowerCase().includes(s.toLowerCase())||((w=m.subjective)==null?void 0:w.toLowerCase().includes(s.toLowerCase())):!0});return t?null:e?i.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[i.jsx(Ke,{}),i.jsxs("main",{className:"flex-1 container max-w-3xl mx-auto py-8 px-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("h1",{className:"font-outfit text-2xl font-semibold text-foreground",children:"Session Notes"}),i.jsxs(yr,{onClick:()=>n("/practitioner/sessions/new"),children:[i.jsx(_s,{className:"w-4 h-4 mr-2"})," New Session"]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-6",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(ry,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx(hs,{placeholder:"Search sessions...",value:s,onChange:m=>o(m.target.value),className:"pl-9"})]}),i.jsxs("select",{value:a||"",onChange:m=>l(m.target.value||null),className:"px-3 py-2 rounded-md border border-input bg-background text-sm",children:[i.jsx("option",{value:"",children:"All Clients"}),d.map(m=>i.jsx("option",{value:m.id,children:m.full_name},m.id))]})]}),h?i.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading sessions..."}):f.length===0?i.jsxs("div",{className:"text-center py-16 space-y-3",children:[i.jsx(lS,{className:"w-12 h-12 text-muted-foreground
434/40 mx-auto"}),i.jsx("p",{className:"text-muted-foreground",children:"No session notes yet"}),i.jsxs(yr,{variant:"outline",onClick:()=>n("/practitioner/sessions/new"),children:[i.jsx(_s,{className:"w-4 h-4 mr-2"})," Create Your First Session"]})]}):i.jsx("div",{className:"space-y-2",children:f.map(m=>{var y;return i.jsxs("button",{onClick:()=>n(`/practitioner/sessions/${m.id}`),className:"w-full text-left p-4 rounded-lg border border-border bg-card hover:bg-muted/50 transition-colors flex items-center gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-accent/10 flex items-center justify-center shrink-0",children:i.jsx(sy,{className:"w-5 h-5 text-accent"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-medium text-foreground truncate",children:((y=m.clients)==null?void 0:y.full_name)||"Unknown Client"}),i.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mt-0.5",children:[i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Dt,{className:"w-3 h-3"}),et(new Date(m.session_date),"d MMM yyyy, h:mm a")]}),m.duration_minutes&&i.jsxs("span",{children:[m.duration_minutes," min"]})]}),m.subjective&&i.jsx("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:m.subjective})]}),i.jsx(Uu,{className:"w-4 h-4 text-muted-foreground shrink-0"})]},m.id)})})]}),i.jsx(nt,{})]}):(n("/practitioner/auth"),null)};function IW(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var oh="Checkbox",[DW,yH]=ra(oh),[LW,nx]=DW(oh);function $W(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:o,form:a,name:l,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:h}=e,[f,m]=Jg({prop:n,defaultProp:s??!1,onChange:c,caller:oh}),[y,p]=x.useState(null),[w,b]=x.useState(null),g=x.useRef(!1),v=y?!!a||!!y.closest("form"):!0,j={checked:f,disabled:o,setChecked:m,control:y,setControl:p,name:l,form:a,value:u,hasConsumerStoppedPropagationRef:g,required:d,defaultChecked:ks(s)?!1:s,isFormControl:v,bubbleInput:w,setBubbleInput:b};return i.jsx(LW,{scope:t,...j,children:FW(h)?h(j):r})}var w_="CheckboxTrigger",j_=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:o,value:a,disabled:l,checked:c,required:d,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:y}=nx(w_,e),p=dt(s,u),w=x.useRef(c);return x.useEffect(()=>{const b=o==null?void 0:o.form;if(b){const g=()=>h(w.current);return b.addEventListener("reset",g),()=>b.removeEventListener("reset",g)}},[o,h]),i.jsx(Ae.button,{type:"button",role:"checkbox","aria-checked":ks(c)?"mixed":c,"aria-required":d,"data-state":C_(c),"data-disabled":l?"":void 0,disabled:l,value:a,...r,ref:p,onKeyDown:je(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:je(n,b=>{h(g=>ks(g)?!0:!g),y&&m&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});j_.displayName=w_;var rx=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:o,required:a,disabled:l,value:c,onCheckedChange:d,form:u,...h}=e;return i.jsx($W,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:l,required:a,onCheckedChange:d,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:f})=>i.jsxs(i.Fragment,{children:[i.jsx(j_,{...h,ref:t,__scopeCheckbox:n}),f&&i.jsx(__,{__scopeCheckbox:n})]})})});rx.displayName=oh;var k_="CheckboxIndicator",S_=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,o=nx(k_,n);return i.jsx(_i,{present:r||ks(o.checked)||o.checked===!0,children:i.jsx(Ae.span,{"data-state":C_(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});S_.displayName=k_;var N_="CheckboxBubbleInput",__=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:a,required:l,disabled:c,name:d,value:u,form:h,bubbleInput:f,setBubbleInput:m}=nx(N_,e),y=dt(n,m),p=IW(o),w=IS(r);x.useEffect(()=>{const g=f;if(!g)return;const v=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(v,"checked").set,S=!s.current;if(p!==o&&k){const N=new Event("click",{bubbles:S});g.indeterminate=ks(o),k.call(g,ks(o)?!1:o),g.dispatchEvent(N)}},[f,p,o,s]);const b=x.useRef(ks(o)?!1:o);return i.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??b.current,required:l,disabled:c,name:d,value:u,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});__.displayName=N_;function FW(e){return typeof e=="function"}function ks(e){return e==="indeterminate"}function C_(e){return ks(e)?"indeterminate":e?"checked":"unchecked"}const zp=x.forwardRef(({className:e,...t},n)=>i.jsx(rx,{ref:n,className:Xe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:i.jsx(S_,{className:Xe("flex items-center justify-center text-current"),children:i.jsx(sS,{className:"h-4 w-4"})})}));zp.displayName=rx.displayName;const xu=x.forwardRef(({className:e,...t},n)=>i.jsx("textarea",{className:Xe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
434ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));xu.displayName="Textarea";var BW="Label",T_=x.forwardRef((e,t)=>i.jsx(Ae.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));T_.displayName=BW;var E_=T_;const UW=ey("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qr=x.forwardRef(({className:e,...t},n)=>i.jsx(E_,{ref:n,className:Xe(UW(),e),...t}));Qr.displayName=E_.displayName;var Sf="focusScope.autoFocusOnMount",Nf="focusScope.autoFocusOnUnmount",vw={bubbles:!1,cancelable:!0},zW="FocusScope",P_=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[l,c]=x.useState(null),d=Xn(s),u=Xn(o),h=x.useRef(null),f=dt(t,p=>c(p)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let p=function(v){if(m.paused||!l)return;const j=v.target;l.contains(j)?h.current=j:Wr(h.current,{select:!0})},w=function(v){if(m.paused||!l)return;const j=v.relatedTarget;j!==null&&(l.contains(j)||Wr(h.current,{select:!0}))},b=function(v){if(document.activeElement===document.body)for(const k of v)k.removedNodes.length>0&&Wr(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const g=new MutationObserver(b);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),g.disconnect()}}},[r,l,m.paused]),x.useEffect(()=>{if(l){ww.add(m);const p=document.activeElement;if(!l.contains(p)){const b=new CustomEvent(Sf,vw);l.addEventListener(Sf,d),l.dispatchEvent(b),b.defaultPrevented||(VW(GW(A_(l)),{select:!0}),document.activeElement===p&&Wr(l))}return()=>{l.removeEventListener(Sf,d),setTimeout(()=>{const b=new CustomEvent(Nf,vw);l.addEventListener(Nf,u),l.dispatchEvent(b),b.defaultPrevented||Wr(p??document.body,{select:!0}),l.removeEventListener(Nf,u),ww.remove(m)},0)}}},[l,d,u,m]);const y=x.useCallback(p=>{if(!n&&!r||m.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(w&&b){const g=p.currentTarget,[v,j]=WW(g);v&&j?!p.shiftKey&&b===j?(p.preventDefault(),n&&Wr(v,{select:!0})):p.shiftKey&&b===v&&(p.preventDefault(),n&&Wr(j,{select:!0})):b===g&&p.preventDefault()}},[n,r,m.paused]);return i.jsx(Ae.div,{tabIndex:-1,...a,ref:f,onKeyDown:y})});P_.displayName=zW;function VW(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wr(r,{select:t}),document.activeElement!==n)return}function WW(e){const t=A_(e),n=bw(t,e),r=bw(t.reverse(),e);return[n,r]}function A_(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 bw(e,t){for(const n of e)if(!HW(n,{upTo:t}))return n}function HW(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 qW(e){return e instanceof HTMLInputElement&&"select"in e}function Wr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qW(e)&&t&&e.select()}}var ww=KW();function KW(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jw(e,t),e.unshift(t)},remove(t){var n;e=jw(e,t),(n=e[0])==null||n.resume()}}}function jw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function GW(e){return e.filter(t=>t.tagName!=="A")}var _f=0;function YW(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kw()),document.body.insertAdjacentElement("beforeend",e[1]??kw()),_f++,()=>{_f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_f--}},[])}function kw(){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: 4,904 bytes, lines 434-449
434style.position="fixed",e.style.pointerEvents="none",e}var jd="right-scroll-bar-position",kd="width-before-scroll-bar",JW="with-scroll-bars-hidden",QW="--removed-body-scroll-bar-size";function Cf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XW(e,t){var n=x.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 ZW=typeof window<"u"?x.useLayoutEffect:x.useEffect,Sw=new WeakMap;function e7(e,t){var n=XW(null,function(r){return e.forEach(function(s){return Cf(s,r)})});return ZW(function(){var r=Sw.get(n);if(r){var s=new Set(r),o=new Set(e),a=n.current;s.forEach(function(l){o.has(l)||Cf(l,null)}),o.forEach(function(l){s.has(l)||Cf(l,a)})}Sw.set(n,e)},[e]),n}function t7(e){return e}function n7(e,t){t===void 0&&(t=t7);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(o),a=n}var c=function(){var u=a;a=[],u.forEach(o)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(u){a.push(u),d()},filter:function(u){return a=a.filter(u),n}}}};return s}function r7(e){e===void 0&&(e={});var t=n7(null);return t.options=qn({async:!0,ssr:!1},e),t}var R_=function(e){var t=e.sideCar,n=aa(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 x.createElement(r,qn({},n))};R_.isSideCarExport=!0;function s7(e,t){return e.useMedium(t),R_}var M_=r7(),Tf=function(){},ah=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Tf,onWheelCapture:Tf,onTouchMoveCapture:Tf}),s=r[0],o=r[1],a=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,y=e.noIsolation,p=e.inert,w=e.allowPinchZoom,b=e.as,g=b===void 0?"div":b,v=e.gapMode,j=aa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,S=e7([n,t]),N=qn(qn({},j),s);return x.createElement(x.Fragment,null,u&&x.createElement(k,{sideCar:M_,removeScrollBar:d,shards:h,noRelative:m,noIsolation:y,inert:p,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:v}),a?x.cloneElement(x.Children.only(l),qn(qn({},N),{ref:S})):x.createElement(g,qn({},N,{className:c,ref:S}),l))});ah.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ah.classNames={fullWidth:kd,zeroRight:jd};var i7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function o7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i7();return t&&e.setAttribute("nonce",t),e}function a7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function l7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var c7=function(){var e=0,t=null;return{add:function(n){e==0&&(t=o7())&&(a7(t,n),l7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},d7=function(){var e=c7();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},O_=function(){var e=d7(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},u7={left:0,top:0,right:0,gap:0},Ef=function(e){return parseInt(e||"",10)||0},h7=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[Ef(n),Ef(r),Ef(s)]},f7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return u7;var t=h7(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])}},m7=O_(),No="data-scroll-locked",p7=function(e,t,n,r){var s=e.left,o=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),` 435 .`.concat(JW,` { 436 overflow: hidden `).concat(r,`; 437 padding-right: `).concat(l,"px ").concat(r,`; 438 } 439 body[`).concat(No,`] { 440 overflow: hidden `).concat(r,`; 441 overscroll-behavior: contain; 442 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 443 padding-left: `.concat(s,`px; 444 padding-top: `).concat(o,`px; 445 padding-right: `).concat(a,`px; 446 margin-left:0; 447 margin-top:0; 448 margin-right: `).concat(l,"px ").concat(r,`; 449 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
449")].filter(Boolean).join(""),` 450 } 451 452 .`).concat(jd,` { 453 right: `).concat(l,"px ").concat(r,`; 454 } 455 456 .`).concat(kd,` { 457 margin-right: `).concat(l,"px ").concat(r,`; 458 } 459 460 .`).concat(jd," .").concat(jd,` { 461 right: 0 `).concat(r,`; 462 } 463 464 .`).concat(kd," .").concat(kd,` { 465 margin-right: 0 `).concat(r,`; 466 } 467 468 body[`).concat(No,`] { 469 `).concat(QW,": ").concat(l,`px; 470 } 471`)},Nw=function(){var e=parseInt(document.body.getAttribute(No)||"0",10);return isFinite(e)?e:0},g7=function(){x.useEffect(function(){return document.body.setAttribute(No,(Nw()+1).toString()),function(){var e=Nw()-1;e<=0?document.body.removeAttribute(No):document.body.setAttribute(No,e.toString())}},[])},y7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;g7();var o=x.useMemo(function(){return f7(s)},[s]);return x.createElement(m7,{styles:p7(o,!t,s,n?"":"!important")})},Vp=!1;if(typeof window<"u")try{var Hc=Object.defineProperty({},"passive",{get:function(){return Vp=!0,!0}});window.addEventListener("test",Hc,Hc),window.removeEventListener("test",Hc,Hc)}catch{Vp=!1}var zi=Vp?{passive:!1}:!1,x7=function(e){return e.tagName==="TEXTAREA"},I_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!x7(e)&&n[t]==="visible")},v7=function(e){return I_(e,"overflowY")},b7=function(e){return I_(e,"overflowX")},_w=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=D_(e,r);if(s){var o=L_(e,r),a=o[1],l=o[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},w7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},j7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},D_=function(e,t){return e==="v"?v7(t):b7(t)},L_=function(e,t){return e==="v"?w7(t):j7(t)},k7=function(e,t){return e==="h"&&t==="rtl"?-1:1},S7=function(e,t,n,r,s){var o=k7(e,window.getComputedStyle(t).direction),a=o*r,l=n.target,c=t.contains(l),d=!1,u=a>0,h=0,f=0;do{if(!l)break;var m=L_(e,l),y=m[0],p=m[1],w=m[2],b=p-w-o*y;(y||b)&&D_(e,l)&&(h+=b,f+=y);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&(Math.abs(h)<1||!s)||!u&&(Math.abs(f)<1||!s))&&(d=!0),d},qc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cw=function(e){return[e.deltaX,e.deltaY]},Tw=function(e){return e&&"current"in e?e.current:e},N7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_7=function(e){return` 472 .block-interactivity-`.concat(e,` {pointer-events: none;} 473 .allow-interactivity-`).concat(e,` {pointer-events: all;} 474`)},C7=0,Vi=[];function T7(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),s=x.useState(C7++)[0],o=x.use
vendor: 4,794 bytes, line 474
474State(O_)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=C3([e.lockRef.current],(e.shards||[]).map(Tw),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback(function(p,w){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var b=qc(p),g=n.current,v="deltaX"in p?p.deltaX:g[0]-b[0],j="deltaY"in p?p.deltaY:g[1]-b[1],k,S=p.target,N=Math.abs(v)>Math.abs(j)?"h":"v";if("touches"in p&&N==="h"&&S.type==="range")return!1;var T=_w(N,S);if(!T)return!0;if(T?k=N:(k=N==="v"?"h":"v",T=_w(N,S)),!T)return!1;if(!r.current&&"changedTouches"in p&&(v||j)&&(r.current=k),!k)return!0;var R=r.current||k;return S7(R,w,p,R==="h"?v:j,!0)},[]),c=x.useCallback(function(p){var w=p;if(!(!Vi.length||Vi[Vi.length-1]!==o)){var b="deltaY"in w?Cw(w):qc(w),g=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&N7(k.delta,b)})[0];if(g&&g.should){w.cancelable&&w.preventDefault();return}if(!g){var v=(a.current.shards||[]).map(Tw).filter(Boolean).filter(function(k){return k.contains(w.target)}),j=v.length>0?l(w,v[0]):!a.current.noIsolation;j&&w.cancelable&&w.preventDefault()}}},[]),d=x.useCallback(function(p,w,b,g){var v={name:p,delta:w,target:b,should:g,shadowParent:E7(b)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(j){return j!==v})},1)},[]),u=x.useCallback(function(p){n.current=qc(p),r.current=void 0},[]),h=x.useCallback(function(p){d(p.type,Cw(p),p.target,l(p,e.lockRef.current))},[]),f=x.useCallback(function(p){d(p.type,qc(p),p.target,l(p,e.lockRef.current))},[]);x.useEffect(function(){return Vi.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,zi),document.addEventListener("touchmove",c,zi),document.addEventListener("touchstart",u,zi),function(){Vi=Vi.filter(function(p){return p!==o}),document.removeEventListener("wheel",c,zi),document.removeEventListener("touchmove",c,zi),document.removeEventListener("touchstart",u,zi)}},[]);var m=e.removeScrollBar,y=e.inert;return x.createElement(x.Fragment,null,y?x.createElement(o,{styles:_7(s)}):null,m?x.createElement(y7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function E7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const P7=s7(M_,T7);var $_=x.forwardRef(function(e,t){return x.createElement(ah,qn({},e,{ref:t,sideCar:P7}))});$_.classNames=ah.classNames;var A7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wi=new WeakMap,Kc=new WeakMap,Gc={},Pf=0,F_=function(e){return e&&(e.host||F_(e.parentNode))},R7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=F_(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})},M7=function(e,t,n,r){var s=R7(t,Array.isArray(e)?e:[e]);Gc[n]||(Gc[n]=new WeakMap);var o=Gc[n],a=[],l=new Set,c=new Set(s),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};s.forEach(d);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))u(f);else try{var m=f.getAttribute(r),y=m!==null&&m!=="false",p=(Wi.get(f)||0)+1,w=(o.get(f)||0)+1;Wi.set(f,p),o.set(f,w),a.push(f),p===1&&y&&Kc.set(f,!0),w===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return u(t),l.clear(),Pf++,function(){a.forEach(function(h){var f=Wi.get(h)-1,m=o.get(h)-1;Wi.set(h,f),o.set(h,m),f||(Kc.has(h)||h.removeAttribute(r),Kc.delete(h)),m||h.removeAttribute(n)}),Pf--,Pf||(Wi=new WeakMap,Wi=new WeakMap,Kc=new WeakMap,Gc={})}},O7=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=A7(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),M7(r,s,n,"aria-hidden")):function(){return null}},lh="Dialog",[B_,xH]=ra(lh),[I7,On]=B_(lh),U_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,l=x.useRef(null),c=x.useRef(null),[d,u]=Jg({prop:r,defaultProp:s??!1,onChange:o,caller:lh});return i.jsx(I7,{scope:t,triggerRef:l,contentRef:c,contentId:Yh(),titleId:Yh(),descriptionId:Yh(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(h=>!h),[u]),modal:a,children:n})};U_.displayName=lh;var z_="DialogTrigger",V_=x.forwardRef((e,t)=>
vendor: 5,524 bytes, lines 474-478
474{const{__scopeDialog:n,...r}=e,s=On(z_,n),o=dt(t,s.triggerRef);return i.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ox(s.open),...r,ref:o,onClick:je(e.onClick,s.onOpenToggle)})});V_.displayName=z_;var sx="DialogPortal",[D7,W_]=B_(sx,{forceMount:void 0}),H_=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=On(sx,t);return i.jsx(D7,{scope:t,forceMount:n,children:x.Children.map(r,a=>i.jsx(_i,{present:n||o.open,children:i.jsx(Yg,{asChild:!0,container:s,children:a})}))})};H_.displayName=sx;var vu="DialogOverlay",q_=x.forwardRef((e,t)=>{const n=W_(vu,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=On(vu,e.__scopeDialog);return o.modal?i.jsx(_i,{present:r||o.open,children:i.jsx($7,{...s,ref:t})}):null});q_.displayName=vu;var L7=Sl("DialogOverlay.RemoveScroll"),$7=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=On(vu,n);return i.jsx($_,{as:L7,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(Ae.div,{"data-state":ox(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ki="DialogContent",K_=x.forwardRef((e,t)=>{const n=W_(ki,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=On(ki,e.__scopeDialog);return i.jsx(_i,{present:r||o.open,children:o.modal?i.jsx(F7,{...s,ref:t}):i.jsx(B7,{...s,ref:t})})});K_.displayName=ki;var F7=x.forwardRef((e,t)=>{const n=On(ki,e.__scopeDialog),r=x.useRef(null),s=dt(t,n.contentRef,r);return x.useEffect(()=>{const o=r.current;if(o)return O7(o)},[]),i.jsx(G_,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:je(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&o.preventDefault()}),onFocusOutside:je(e.onFocusOutside,o=>o.preventDefault())})}),B7=x.forwardRef((e,t)=>{const n=On(ki,e.__scopeDialog),r=x.useRef(!1),s=x.useRef(!1);return i.jsx(G_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),G_=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...a}=e,l=On(ki,n),c=x.useRef(null),d=dt(t,c);return YW(),i.jsxs(i.Fragment,{children:[i.jsx(P_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:i.jsx($u,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ox(l.open),...a,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(U7,{titleId:l.titleId}),i.jsx(V7,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ix="DialogTitle",Y_=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=On(ix,n);return i.jsx(Ae.h2,{id:s.titleId,...r,ref:t})});Y_.displayName=ix;var J_="DialogDescription",Q_=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=On(J_,n);return i.jsx(Ae.p,{id:s.descriptionId,...r,ref:t})});Q_.displayName=J_;var X_="DialogClose",Z_=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=On(X_,n);return i.jsx(Ae.button,{type:"button",...r,ref:t,onClick:je(e.onClick,()=>s.onOpenChange(!1))})});Z_.displayName=X_;function ox(e){return e?"open":"closed"}var eC="DialogTitleWarning",[vH,tC]=B4(eC,{contentName:ki,titleName:ix,docsSlug:"dialog"}),U7=({titleId:e})=>{const t=tC(eC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 475 476If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 477 478For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},z7="DialogDescriptionWarning",V7=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tC(z7).contentName}}.`;return x.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},W7=U_,H7=V_,q7=H_,nC=q_,rC=K_,sC=Y_,iC=Q_,K7=Z_;const G7=W7,Y7=H7,J7=q7,oC=x.forwardRef(({className:e,...t},n)=>i.jsx(nC,{ref:n,className:Xe("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}));oC.displayName=nC.displayName;const aC=x.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(J7,{children:[i.jsx(oC,{}),i.jsxs(rC,{ref:r,className:Xe("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
478nded-lg",e),...n,children:[t,i.jsxs(K7,{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:[i.jsx(wi,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));aC.displayName=rC.displayName;const lC=({className:e,...t})=>i.jsx("div",{className:Xe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});lC.displayName="DialogHeader";const cC=x.forwardRef(({className:e,...t},n)=>i.jsx(sC,{ref:n,className:Xe("text-lg font-semibold leading-none tracking-tight",e),...t}));cC.displayName=sC.displayName;const Q7=x.forwardRef(({className:e,...t},n)=>i.jsx(iC,{ref:n,className:Xe("text-sm text-muted-foreground",e),...t}));Q7.displayName=iC.displayName;const X7=({practitionerId:e,selectedClientId:t,onSelect:n})=>{const[r,s]=x.useState(""),[o,a]=x.useState(!1),[l,c]=x.useState(""),[d,u]=x.useState(""),[h,f]=x.useState(""),m=Du(),{data:y=[]}=At({queryKey:["clients",e],queryFn:async()=>{const{data:g,error:v}=await K.from("clients").select("id, full_name, email, phone").eq("practitioner_id",e).order("full_name");if(v)throw v;return g},enabled:!!e}),p=vk({mutationFn:async()=>{const{data:g,error:v}=await K.from("clients").insert({practitioner_id:e,full_name:l,email:d||null,phone:h||null}).select("id").single();if(v)throw v;return g},onSuccess:g=>{m.invalidateQueries({queryKey:["clients",e]}),n(g.id),a(!1),c(""),u(""),f(""),Xd.success("Client added")},onError:()=>Xd.error("Failed to add client")}
478),w=y.filter(g=>g.full_name.toLowerCase().includes(r.toLowerCase())),b=y.find(g=>g.id===t);return i.jsxs("div",{className:"space-y-2",children:[i.jsx(Qr,{className:"text-sm font-semibold",children:"Client"}),i.jsxs(G7,{children:[i.jsx(Y7,{asChild:!0,children:i.jsxs(yr,{variant:"outline",className:"w-full justify-start text-left h-auto py-3",children:[i.jsx(sy,{className:"w-4 h-4 mr-2 shrink-0"}),b?i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:b.full_name}),b.email&&i.jsx("p",{className:"text-xs text-muted-foreground",children:b.email})]}):i.jsx("span",{className:"text-muted-foreground",children:"Select a client..."})]})}),i.jsxs(aC,{className:"max-h-[80vh]",children:[i.jsx(lC,{children:i.jsx(cC,{children:"Select Client"})}),i.jsxs("div",{className:"relative",children:[i.jsx(ry,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx(hs,{placeholder:"Search clients...",value:r,onChange:g=>s(g.target.value),className:"pl-9"})]}),i.jsxs("div",{className:"max-h-[300px] overflow-y-auto space-y-1",children:[w.map(g=>i.jsxs("button",{onClick:()=>n(g.id),className:`w-full text-left px-3 py-2.5 rounded-md transition-colors text-sm ${g.id===t?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:[i.jsx("p",{className:"font-medium",children:g.full_name}),g.email&&i.jsx("p",{className:"text-xs opacity-70",children:g.email})]},g.id)),w.length===0&&i.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No clients found"})]}),o?i.jsxs("div",{className:"space-y-3 border-t pt-3",children:[i.jsx(hs,{placeholder:"Full name *",value:l,onChange:g=>c(g.target.value)}),i.jsx(hs,{placeholder:"Email (optional)",value:d,onChange:g=>u(g.target.value)}),i.jsx(hs,{placeholder:"Phone (optional)",value:h,onChange:g=>f(g.target.value)}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(yr,{onClick:()=>p.mutate(),disabled:!l.trim()||p.isPending,className:"flex-1",children:p.isPending?"Adding...":"Add Client"}),i.jsx(yr,{variant:"outline",onClick:()=>a(!1),children:"Cancel"})]})]}):i.jsxs(yr,{variant:"outline",onClick:()=>a(!0),className:"w-full",children:[i.jsx(_s,{className:"w-4 h-4 mr-2"})," Add New Client"]})]})]})]})},Z7=[{key:"subjective",label:"S â Subjective",description:"Client's reported symptoms, concerns, and experience"},{key:"objective",label:"O â Objective",description:"Observable findings, measurements, and clinical observations"},{key:"assessment",label:"A â Assessment",description:"Clinical analysis and interpretation of findings"},{key:"plan",label:"P â Plan",description:"Treatment strategy and recommended actions"},{key:"implementation",label:"I â Implementation",description:"What was done during the session"},{key:"evaluation",label:"E â Evaluation",description:"Client's response to treatment and outcomes"},{key:"revision",label:"R â Revision",description:"Modifications to the plan based on evaluation"}],dC=({data:e,onChange:t,readOnly:n=!1})=>{const r=(s,o)=>{t({...e,[s]:o})};return i.jsx("div",{className:"space-y-4",children:Z7.map(({key:s,label:o,description:a})=>{var l;return i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(Qr,{className:"text-sm font-semibold tracking-wide",children:o}),i.jsx("p",{className:"text-xs text-muted-foreground",children:a}),n?i.jsx("p",{className:"text-sm whitespace-pre-wrap min-h-[40px] p-3 rounded-md bg-card border border-border",children:e[s]||i.jsx("span",{className:"text-muted-foreground italic",children:"Not recorded"})}):i.jsx(xu,{value:e[s],onChange:c=>r(s,c.target.value),placeholder:`Enter ${(l=o.split("â")[1])==null?void 0:l.trim().toLowerCase()} notes...`,className:"min-h-[80px] resize-y"})]},s)})})},eH=()=>i.jsxs("g",{fill:"none",stroke:"hsl(var(--foreground))",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.7",children:[i.jsx("ellipse",{cx:"100",cy:"30",rx:"18",ry:"22"}),i.jsx("line",{x1:"91",y1:"52",x2:"88",y2:"62"}),i.jsx("line",{x1:"109",y1:"52",x2:"112",y2:"62"}),i.jsx("path",{d:"M 88 62 C 78 60, 62 62, 50 72 C 42 78, 38 86, 36 96"}),i.jsx("path",{d:"M 36 96 C 34 112, 32 128, 30 148 C 28 168, 26 185, 25 198"}),i.jsx("path",{d:"M 25 198 C 24 210, 22 222, 20 232 C 18 240, 16 248, 16 254 C 16 262, 20 268, 28 268 C 34 268, 38 264, 38 256 C 38 248, 36 238, 35 228"}),i.jsx("path",{d:"M 35 228 C 37 218, 39 208, 41 198"}),i.jsx("path",{d:"M 41 198 C 43 185, 46 168, 48 148 C 50 128, 54 112, 60 98"}),i.jsx("path",{d:"M 60 98 C 62 92, 64 86, 66 80"}),i.jsx("path",{d:"M 112 62 C 122 60, 138 62, 150 72 C 158 78, 162 86, 164 96"}),i.jsx("path",{d:"M 164 96 C 166 112, 168 128, 170 148 C 172 168, 174 185, 175 198"}),i.jsx("path",{d:"M 175 198 C 176 210, 178 222, 180 232 C 182 240, 184 248, 184 254 C 184 262, 180 268, 172 268 C 166 268, 162 264, 162 256 C 162 248, 164 238, 165 228"}),i.jsx("path",{d:"M 165 228 C 163 218, 161 208, 159 198"}),i.jsx("path",{d:"M 159 198 C 157 185, 154 168, 152 148 C 150 128, 146 112, 140 98"}),i.jsx("path",{d:"M 140 98 C 138 92, 136 86, 134 80"}),i.jsx("path",{d:"M 66 80 C 64 90, 62 102, 62 116 C 62 134, 64 150, 66 164 C 68 174, 70 184, 72 192"}),i.jsx("path",{d:"M 134 80 C 136 90, 138 102, 138 116 C 138 134, 136 150, 134 164 C 132 174, 130 184, 128 192"}),i.jsx("path",{d:"M 76 84 C 82 90, 90 92, 100 92 C 110 92, 118 90, 124 84",strokeOpacity:"0.35",strokeWidth:"1"}),i.jsx("circle",{cx:"100",cy:"148",r:"2.5",strokeOpacity:"0.4",strokeWidth:"1"}),i.jsx("path",{d:"M 72 160 C 80 156, 90 154, 100 154 C 110 154, 120 156, 128 160",strokeOpacity:"0.2",strokeWidth:"0.8"}),i.jsx("path",{d:"M 72 192 C 74 200, 78 208, 84 214 C 88 218, 94 220, 98 222"}),i.jsx("path",{d:"M 128 192 C 126 200, 122 208, 116 214 C 112 218, 106 220, 102 222"}),i.jsx("path",{d:"M 98 222 L 100 232",strokeOpacity:"0.2",strokeWidth:"0.8"}),i.jsx("path",{d:"M 102 222 L 100 232",strokeOpacity:"0.2",strokeWidth:"0.8"}),i.jsx("path",{d:"M 84 214 C 80 230, 76 250, 74 270 C 72 290, 70 305, 68 318"}),i.jsx("path",{d:"M 98 222 C 96 238, 92 258, 90 274 C 88 290, 86 305, 84 318"}),i.jsx("path",{d:"M 68 318 C 67 324, 67 330, 68 336"}),i.jsx("path",{d:"M 84 318 C 85 324, 85 330, 84 336"}),i.jsx("path",{d:"M 68 336 C 66 352, 64 368, 62 380 C 61 386, 60 392, 60 396"}),i.jsx("path",{d:"M 84 336 C 82 352, 80 368, 78 380 C 77 386, 76 392, 76 396"}),i.jsx("path",{d:"M 60 396 C 58 400, 56 404, 54 406 C 52 408, 54 410, 60 410 L 78 410 C 82 410, 82 408, 80 406 C 78 404, 77 400, 76 396"}),i.jsx("path",{d:"M 116 214 C 120 230, 124 250, 126 270 C 128 290, 130 305, 132 318"}
478),i.jsx("path",{d:"M 102 222 C 104 238, 108 258, 110 274 C 112 290, 114 305, 116 318"}),i.jsx("path",{d:"M 132 318 C 133 324, 133 330, 132 336"}),i.jsx("path",{d:"M 116 318 C 115 324, 115 330, 116 336"}),i.jsx("path",{d:"M 132 336 C 134 352, 136 368, 138 380 C 139 386, 140 392, 140 396"}),i.jsx("path",{d:"M 116 336 C 118 352, 120 368, 122 380 C 123 386, 124 392, 124 396"}),i.jsx("path",{d:"M 140 396 C 142 400, 144 404, 146 406 C 148 408, 146 410, 140 410 L 122 410 C 118 410, 118 408, 120 406 C 122 404, 123 400, 124 396"})]}),tH=()=>i.jsxs("g",{fill:"none",stroke:"hsl(var(--foreground))",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.7",children:[i.jsx("ellipse",{cx:"100",cy:"30",rx:"18",ry:"22"}),i.jsx("line",{x1:"91",y1:"52",x2:"88",y2:"62"}),i.jsx("line",{x1:"109",y1:"52",x2:"112",y2:"62"}),i.jsx("path",{d:"M 88 62 C 78 60, 62 62, 50 72 C 42 78, 38 86, 36 96"}),i.jsx("path",{d:"M 36 96 C 34 112, 32 128, 30 148 C 28 168, 26 185, 25 198"}),i.jsx("path",{d:"M 25 198 C 24 210, 22 222, 20 232 C 18 240, 16 248, 16 254 C 16 262, 20 268, 28 268 C 34 268, 38 264, 38 256 C 38 248, 36 238, 35 228"}),i.jsx("path",{d:"M 35 228 C 37 218, 39 208, 41 198"}),i.jsx("path",{d:"M 41 198 C 43 185, 46 168, 48 148 C 50 128, 54 112, 60 98"}),i.jsx("path",{d:"M 60 98 C 62 92, 64 86, 66 80"}),i.jsx("path",{d:"M 112 62 C 122 60, 138 62, 150 72 C 158 78, 162 86, 164 96"}),i.jsx("path",{d:"M 164 96 C 166 112, 168 128, 170 148 C 172 168, 174 185, 175 198"}),i.jsx("path",{d:"M 175 198 C 176 210, 178 222, 180 232 C 182 240, 184 248, 184 254 C 184 262, 180 268, 172 268 C 166 268, 162 264, 162 256 C 162 248, 164 238, 165 228"}),i.jsx("path",{d:"M 165 228 C 163 218, 161 208, 159 198"}),i.jsx("path",{d:"M 159 198 C 157 185, 154 168, 152 148 C 150 128, 146 112, 140 98"}),i.jsx("path",{d:"M 140 98 C 138 92, 136 86, 134 80"}),i.jsx("path",{d:"M 66 80 C 64 90, 62 102, 62 116 C 62 134, 64 150, 66 164 C 68 174, 70 184, 72 192"}),i.jsx("path",{d:"M 134 80 C 136 90, 138 102, 138 116 C 138 134, 136 150, 134 164 C 132 174, 130 184, 128 192"}),i.jsx("line",{x1:"100",y1:"58",x2:"100",y2:"198",strokeDasharray:"3,5",strokeOpacity:"0.3",strokeWidth:"1"}),i.jsx("path",{d:"M 82 80 C 78 92, 78 106, 82 114 C 86 118, 92 114, 94 104 C 95 94, 94 86, 90 80",strokeOpacity:"0.3",strokeWidth:"1"}),i.jsx("path",{d:"M 118 80 C 122 92, 122 106, 118 114 C 114 118, 108 114, 106 104 C 105 94, 106 86, 110 80",strokeOpacity:"0.3",strokeWidth:"1"}),i.jsx("circle",{cx:"92",cy:"186",r:"2",strokeOpacity:"0.25",strokeWidth:"1"}),i.jsx("circle",{cx:"108",cy:"186",r:"2",strokeOpacity:"0.25",strokeWidth:"1"}),i.jsx("path",{d:"M 72 192 C 74 202, 78 210, 86 216 C 92 220, 96 222, 100 222"}),i.jsx("path",{d:"M 128 192 C 126 202, 122 210, 114 216 C 108 220, 104 222, 100 222"}),i.jsx("path",{d:"M 82 218 C 88 224, 94 226, 100 226",strokeOpacity:"0.25",strokeWidth:"1"}),i.jsx("path",{d:"M 118 218 C 112 224, 106 226, 100 226",strokeOpacity:"0.25",strokeWidth:"1"}),i.jsx("path",{d:"M 86 216 C 82 232, 78 252, 74 270 C 72 290, 70 305, 68 318"}),i.jsx("path",{d:"M 96 224 C 94 240, 92 258, 90 274 C 88 290, 86 305, 84 318"}),i.jsx("path",{d:"M 68 318 C 67 324, 67 330, 68 336"}),i.jsx("path",{d:"M 84 318 C 85 324, 85 330, 84 336"}),i.jsx("path",{d:"M 68 336 C 66 352, 64 368, 62 380 C 61 386, 60 392, 60 396"}),i.jsx("path",{d:"M 84 336 C 82 352, 80 368, 78 380 C 77 386, 76 392, 76 396"}),i.jsx("path",{d:"M 60 396 C 58 400, 56 404, 54 406 C 52 408, 54 410, 60 410 L 78 410 C 82 410, 82 408, 80 406 C 78 404, 77 400, 76 396"}),i.jsx("path",{d:"M 114 216 C 118 232, 122 252, 126 270 C 128 290, 130 305, 132 318"}),i.jsx("path",{d:"M 104 224 C 106 240, 108 258, 110 274 C 112 290, 114 305, 116 318"}),i.jsx("path",{d:"M 132 318 C 133 324, 133 330, 132 336"}),i.jsx("path",{d:"M 116 318 C 115 324, 115 330, 116 336"}),i.jsx("path",{d:"M 132 336 C 134 352, 136 368, 138 380 C 139 386, 140 392, 140 396"}),i.jsx("path",{d:"M 116 336 C 118 352, 120 368, 122 380 C 123 386, 124 392, 124 396"}),i.jsx("path",{d:"M 140 396 C 142 400, 144 404, 146 406 C 148 408, 146 410, 140 410 L 122 410 C 118 410, 118 408, 120 406 C 122 404, 123 400, 124 39
4786"})]}),uC=({markers:e,onMarkersChange:t,readOnly:n=!1})=>{const[r,s]=x.useState(null),o=f=>m=>{if(n)return;const p=m.currentTarget.getBoundingClientRect(),w=(m.clientX-p.left)/p.width*100,b=(m.clientY-p.top)/p.height*100,g={id:crypto.randomUUID(),x:w,y:b,label:"",side:f};t([...e,g]),s(g.id)},a=(f,m)=>{t(e.map(y=>y.id===f?{...y,label:m}:y))},l=f=>{t(e.filter(m=>m.id!==f)),s(null)},c=e.filter(f=>f.side==="front"),d=e.filter(f=>f.side==="back"),u=f=>f.map(m=>i.jsxs("g",{children:[i.jsx("circle",{cx:m.x/100*200,cy:m.y/100*420,r:"6",fill:"hsl(var(--accent))",fillOpacity:"0.7",stroke:"hsl(var(--accent))",strokeWidth:"1.5",className:"cursor-pointer",onClick:y=>{y.stopPropagation(),n||s(m.id)}}),m.label&&i.jsx("text",{x:m.x/100*200+10,y:m.y/100*420+4,fontSize:"8",fill:"hsl(var(--foreground))",className:"pointer-events-none select-none",children:m.label})]},m.id)),h=[...c,...d];return i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"relative bg-card rounded-lg border border-border p-4",children:[i.jsxs("div",{className:"flex gap-2 justify-center",children:[i.jsxs("div",{className:"flex-1 max-w-[220px] text-center",children:[i.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Front"}),i.jsxs("svg",{viewBox:"0 0 200 420",className:"w-full cursor-crosshair",onClick:o("front"),children:[i.jsx(eH,{}),u(c)]})]}),i.jsxs("div",{className:"flex-1 max-w-[220px] text-center",children:[i.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Back"}),i.jsxs("svg",{viewBox:"0 0 200 420",className:"w-full cursor-crosshair",onClick:o("back"),children:[i.jsx(tH,{}),u(d)]})]})]}),i.jsx("p",{className:"text-xs text-muted-foreground text-center mt-2",children:n?"Body chart annotations":"Click on either body to add a marker"})]}),!n&&h.length>0&&i.jsx("div",{className:"space-y-2",children:h.map((f,m)=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"text-xs text-muted-foreground w-4",children:[m+1,"."]}),i.jsx("span",{className:Xe("text-[10px] px-1.5 py-0.5 rounded font-medium",f.side==="front"?"bg-primary/10 text-primary":"bg-accent/10 text-accent-foreground"),children:f.side==="front"?"F":"B"}),i.jsx("input",{type:"text",value:f.label,onChange:y=>a(f.id,y.target.value),placeholder:"Describe this area...",autoFocus:r===f.id,className:"flex-1 text-sm px-2 py-1 rounded border border-input bg-background focus:outline-none focus:ring-1 focus:ring-ring"}),i.jsx("button",{type:"button",onClick:()=>l(f.id),className:"text-muted-foreground hover:text-destructive text-xs",children:"â"})]},f.id))}),n&&h.filter(f=>f.label).length>0&&i.jsx("ul",{className:"text-sm text-muted-foreground space-y-1",children:h.filter(f=>f.label).map((f,m)=>i.jsxs("li",{children:[m+1,". ",i.jsxs("span",{className:"text-xs opacity-60",children:["(",f.side,")"]})," ",f.label]},f.id))})]})},nH=()=>{const{user:e,loading:t}=Ci(),n=Mn(),r=Du(),[s,o]=x.useState(null),[a,l]=x.useState(()=>new Date().toISOString().slice(0,16)),[c,d]=x.useState(""),[u,h]=x.useState(!1),[f,m]=x.useState(""),[y,p]=x.useState(!1),[w,b]=x.useState({subjective:"",objective:"",assessment:"",plan:"",implementation:"",evaluation:"",revision:""}),[g,v]=x.useState([]),[j,k]=x.useState(""),{data:S}=At({queryKey:["practitioner-self",e==null?void 0:e.id],queryFn:async()=>{const{data:T,error:R}=await K.from("practitioners").select("id").eq("user_id",e.id).single();if(R)throw R;return T},enabled:!!e}),N=vk({mutationFn:async()=>{if(!S||!s)throw new Error("Missing data");const{error:T}=await K.from("session_notes").insert([{practitioner_id:S.id,client_id:s,session_date:a,duration_minutes:c?parseInt(c):null,subjective:w.subjective||null,objective:w.objective||null,assessment:w.assessment||null,plan:w.plan||null,implementation:w.implementation||null,evaluation:w.evaluation||null,revision:w.revision||null,body_chart:g,additional_notes:j||null,red_flags:u,red_flags_notes:f||null,consent_received:y}]);if(T)throw T},onSuccess:()=>{r.invalidateQueries({queryKey:["session-notes"]}),Xd.success("Session notes saved"),n("/practitioner/sessions")},onError:()=>Xd.error("Failed to save session")});return t?null:e?i.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[i.jsx(Ke,{}),i.jsxs("main",{className:"flex-1 container max-w-3xl mx-auto py-8 px-4",children:[i.jsxs("button",{onClick:()=>n("/practitioner/sessions"),className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[i.jsx(Zn,{className:"w-4 h-4"})," Back to Sessions"]}),i.jsx("h1",{className:"font-outfit text-2xl font-semibold text-foreground mb-6",children:"New Session Notes"}),i.jsxs("div",{className:"space-y-8",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[S&&i.jsx(X7,{practitionerId:S.id,selectedClientId:s,onSelect:o}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Qr,{className:"text-sm font-semibold",children:"Date & Time"}),i.jsx(hs,{type:"datetime-local",value:a,onChange:T=>l(T.target.value)})]})]}),i.jsxs("div",{className:"w-full max-w-[200px]",children:[i.jsx(Qr,{className:"text-sm font-semibold",children:"Duration (minutes)"}),i.jsx(hs,{type:"number",placeholder:"e.g. 60",value:c,onChange:T=>d(T.target.value)})]}),i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(zp,{id:"consent",checked:y,onCheckedChange:T=>p(T===!0)}),i.jsx(Qr,{htmlFor:"consent",className:"text-sm font-medium cursor-pointer",children:"Consent received from client"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(zp,{id:"redflags",checked:u,onCheckedChange:T=>{h(T===!0),T||m("")}}),i.jsx(Qr,{htmlFor:"redflags",className:"text-sm font-medium cursor-pointer text-destructive",children:"Red flags identified"})]}),u&&i.jsx("div",{className:"ml-6",children:i.jsx(xu,{value:f,onChange:T=>m(T.target.value),placeholder:"Describe the red flags identified...",className:"min-h-[80px] resize-y border-destructive/30 focus-visible:ring-destructive/30"})})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-outfit text-lg font-semibold text-foreground mb-3",children:"Body Chart"}),i.jsx(uC,{markers:g,onMarkersChange:v})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-outfit text-lg font-semibold text-foreground mb-3",children:"SOAPIER Notes"}),i.jsx(dC,{data:w,onChange:b})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx(Qr,{className:"text-sm font-semibold",children:"Additional Notes"}),i.jsx(xu,{value:j,onChange:T=>k(T.target.value),placeholder:"Any other notes...",className:"min-h-[80px]"})]}),i.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[i.jsxs(yr,{onClick:()=>N.mutate(),disabled:!s||N.isPending,className:"min-w-[140px]",children:[N.isPending?i.jsx(Cn,{className:"w-4 h-4 animate-spin mr-2"}):i.jsx(dS,{className:"w-4 h-4 mr-2"}),"Save Session"]}),i.jsx(yr,{variant:"outline",onClick:()=>n("/practitioner/sessions"),children:"Cancel"})]})]})]}),i.jsx(nt,{})]}):(n("/practitioner/auth"),null)},rH=()=>{var l;const{id:e}=_k(),{user:t,loading:n}=Ci(),r=Mn(),{data:s,isLoading:o}=At({queryKey:["session-detail",e],queryFn:async()=>{const{data:c,error:d}=await K.from("session_notes").select("*, clients(full_name, email, phone)").eq("id",e).single();if(d)throw d;return c},enabled:!!e&&!!t});if(n||o)return null;if(!t)return r("/practitioner/auth"),null;if(!s)return i.jsx("div",{className:"text-center py-20 text-muted-foreground",children:"Session not found"});const a=s.clients;return i.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[i.jsx(Ke,{}),i.jsxs("main",{className:"flex-1 container max-w-3xl mx-auto py-8 px-4",children:[i.jsxs("button",{onClick:()=>r("/practitioner/sessions"),className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-6 transition-colors",children:[i.jsx(Zn,{className:"w-4 h-4"})," Back to Sessions"]}),i.jsx("div",{className:"bg-card rounded-lg border border-border p-6 mb-6",children:i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-accent/10 flex items-center justify-center shrink-0",children:i.jsx(sy,{className:"w-6 h-6 text-accent"})}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h1",{className:"font-outfit text-xl font-semibold text-foreground",children:(a==null?void 0:a.full_name)||"Unknown"}),(a==null?void 0:a.email)&&i.jsx("p",{className:"text-sm text-muted-foreground",children:a.email}),i.jsxs("div",{className:"flex items-center gap-4 mt-2 text-sm text-muted-foreground",children:[i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Dt,{className:"w-4 h-4"}),et(new Date(s.session_date),"d MMMM yyyy, h:mm a")]}),s.duration_minutes&&i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Pn,{className:"w-4 h-4"}),s.duration_minutes," minutes"]})]}),i.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[i.jsxs("span",{className:`inline-flex items-center gap-1.5 text-xs px-2.5 py-1 rounded-full border ${s.consent_received?"bg-accent/10 text-accent border-accent/20":"bg-muted text-muted-foreground border-border"}`,children:[i.jsx(JR,{className:"w-3.5 h-3.5"}),s.consent_received?"Consent received":"No consent recorded"]}),s.red_flags&&i.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs px-2.5 py-1 rounded-full bg-destructive/10 text-destructive border border-destructive/20",children:[i.jsx(eM,{className:"w-3.5 h-3.5"}),"Red flags identified"]})]}),s.red_flags&&s.red_flags_notes&&i.jsxs("div",{className:"mt-2 p-3 rounded-md bg-destructive/5 border border-destructive/20",children:[i.jsx("p",{className:"text-xs font-medium text-destructive mb-1",children:"Red Flag Details:"}),i.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:s.red_flags_notes})]})]})]})}
478),(l=s.body_chart)!=null&&l.length?i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"font-outfit text-lg font-semibold text-foreground mb-3",children:"Body Chart"}),i.jsx(uC,{markers:s.body_chart,onMarkersChange:()=>{},readOnly:!0})]}):null,i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"font-outfit text-lg font-semibold text-foreground mb-3",children:"SOAPIER Notes"}),i.jsx(dC,{data:{subjective:s.subjective||"",objective:s.objective||"",assessment:s.assessment||"",plan:s.plan||"",implementation:s.implementation||"",evaluation:s.evaluation||"",revision:s.revision||""},onChange:()=>{},readOnly:!0})]}),s.additional_notes&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"font-outfit text-lg font-semibold text-foreground mb-3",children:"Additional Notes"}),i.jsx("p",{className:"text-sm whitespace-pre-wrap p-4 rounded-lg bg-card border border-border",children:s.additional_notes})]}),i.jsxs("button",{onClick:()=>r(`/practitioner/sessions?client=${s.client_id}`),className:"text-sm text-accent hover:underline",children:["View all sessions for ",a==null?void 0:a.full_name," â"]})]}),i.jsx(nt,{})]})},sH=()=>{const{pathname:e,hash:t}=Pr();return x.useEffect(()=>{t?setTimeout(()=>{const n=document.querySelector(t);n&&n.scrollIntoView({behavior:"smooth"})},100):window.scrollTo({top:0,left:0})},[e,t]),null},iH=()=>{const e=Pr();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),i.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),i.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),i.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},oH=new FP,aH=()=>i.jsx(WP,{client:oH,children:i.jsx(j6,{children:i.jsxs(S3,{children:[i.jsx($M,{}),i.jsx(O4,{}),i.jsxs(ZA,{children:[i.jsx(sH,{}),i.jsxs(HA,{children:[i.jsx(me,{path:"/",element:i.jsx(TU,{})}),i.jsx(me,{path:"/medical-disclaimer",element:i.jsx(EU,{})}),i.jsx(me,{path:"/practitioner-guide",element:i.jsx(RU,{})}),i.jsx(me,{path:"/privacy-policy",element:i.jsx(MU,{})}),i.jsx(me,{path:"/terms-and-conditions",element:i.jsx(OU,{})}),i.jsx(me,{path:"/practitioners",element:i.jsx(XU,{})}),i.jsx(me,{path:"/practitioners/:id",element:i.jsx(fw,{})}),i.jsx(me,{path:"/p/:slug",element:i.jsx(fw,{})}),i.jsx(me,{path:"/practitioner/auth",element:i.jsx(IU,{})}),i.jsx(me,{path:"/practitioner/dashboard",element:i.jsx(GU,{})}),i.jsx(me,{path:"/admin/login",element:i.jsx(hV,{})}),i.jsx(me,{path:"/admin/dashboard",element:i.jsx(vV,{})}),i.jsx(me,{path:"/payment-success",element:i.jsx(uV,{})}),i.jsx(me,{path:"/unsubscribe",element:i.jsx(bV,{})}),i.jsx(me,{path:"/trainings/spinal-attunement",element:i.jsx(NV,{})}),i.jsx(me,{path:"/trainings/self-holding-method",element:i.jsx(o9,{})}),i.jsx(me,{path:"/trainings/parasympathetic-breathwork",element:i.jsx(a9,{})}),i.jsx(me,{path:"/portal-to-self",element:i.jsx(d9,{})}),i.jsx(me,{path:"/masterclass-library",element:i.jsx(f9,{})}),i.jsx(me,{path:"/commanding-the-room",element:i.jsx(T9,{})}),i.jsx(me,{path:"/mentorship",element:i.jsx(bW,{})}),i.jsx(me,{path:"/sigourney-mentorship",element:i.jsx(_W,{})}),i.jsx(me,{path:"/byron-bay-training",element:i.jsx(RW,{})}),i.jsx(me,{path:"/self-holding-method",element:i.jsx(VA,{to:"/trainings/self-holding-method",replace:!0})}),i.jsx(me,{path:"/practitioner/sessions",element:i.jsx(OW,{})}),i.jsx(me,{path:"/practitioner/sessions/new",element:i.jsx(nH,{})}),i.jsx(me,{path:"/practitioner/sessions/:id",element:i.jsx(rH,{})}),i.jsx(me,{path:"*",element:i.jsx(iH,{})})]})]})]})})});Xj(document.getElementById("root")).render(i.jsx(ik,{children:i.jsx(aH,{})}));
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.