var af=e=>{throw TypeError(e)};var tw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yl=(e,t,n)=>t.has(e)||af("Cannot "+n);var N=(e,t,n)=>(yl(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?af("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Q=(e,t,n,r)=>(yl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),oe=(e,t,n)=>(yl(e,t,"access private method"),n);var us=(e,t,n,r)=>({set _(o){Q(e,t,o,n)},get _(){return N(e,t,r)}});var XP=tw((aR,os)=>{function nw(e,t){for(var n=0;nr[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ap={exports:{}},Fa={},Ip={exports:{}},re={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ki=Symbol.for("react.element"),rw=Symbol.for("react.portal"),ow=Symbol.for("react.fragment"),iw=Symbol.for("react.strict_mode"),sw=Symbol.for("react.profiler"),aw=Symbol.for("react.provider"),lw=Symbol.for("react.context"),cw=Symbol.for("react.forward_ref"),uw=Symbol.for("react.suspense"),dw=Symbol.for("react.memo"),fw=Symbol.for("react.lazy"),lf=Symbol.iterator;function hw(e){return e===null||typeof e!="object"?null:(e=lf&&e[lf]||e["@@iterator"],typeof e=="function"?e:null)}var Op={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lp=Object.assign,Fp={};function Vo(e,t,n){this.props=e,this.context=t,this.refs=Fp,this.updater=n||Op}Vo.prototype.isReactComponent={};Vo.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")};Vo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _p(){}_p.prototype=Vo.prototype;function Ou(e,t,n){this.props=e,this.context=t,this.refs=Fp,this.updater=n||Op}var Lu=Ou.prototype=new _p;Lu.constructor=Ou;Lp(Lu,Vo.prototype);Lu.isPureReactComponent=!0;var cf=Array.isArray,Dp=Object.prototype.hasOwnProperty,Fu={current:null},zp={key:!0,ref:!0,__self:!0,__source:!0};function $p(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Dp.call(t,r)&&!zp.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,M=A[b];if(0>>1;bo(D,E))Uo(z,D)?(A[b]=z,A[U]=E,b=U):(A[b]=D,A[I]=E,b=I);else if(Uo(z,E))A[b]=z,A[U]=E,b=U;else break e}}return O}function o(A,O){var E=A.sortIndex-O.sortIndex;return E!==0?E:A.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],h=1,f=null,m=3,d=!1,C=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(A){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=A)r(c),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(c)}}function S(A){if(g=!1,x(A),!C)if(n(l)!==null)C=!0,K(k);else{var O=n(c);O!==null&&X(S,O.startTime-A)}}function k(A,O){C=!1,g&&(g=!1,v(j),j=-1),d=!0;var E=m;try{for(x(O),f=n(l);f!==null&&(!(f.expirationTime>O)||A&&!W());){var b=f.callback;if(typeof b=="function"){f.callback=null,m=f.priorityLevel;var M=b(f.expirationTime<=O);O=e.unstable_now(),typeof M=="function"?f.callback=M:f===n(l)&&r(l),x(O)}else r(l);f=n(l)}if(f!==null)var T=!0;else{var I=n(c);I!==null&&X(S,I.startTime-O),T=!1}return T}finally{f=null,m=E,d=!1}}var P=!1,R=null,j=-1,F=5,L=-1;function W(){return!(e.unstable_now()-LA||125b?(A.sortIndex=E,t(c,A),n(l)===null&&A===n(c)&&(g?(v(j),j=-1):g=!0,X(S,E-b))):(A.sortIndex=M,t(l,A),C||d||(C=!0,K(k))),A},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(A){var O=m;return function(){var E=m;m=O;try{return A.apply(this,arguments)}finally{m=E}}}})(Hp);Wp.exports=Hp;var Ew=Wp.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var kw=p,bt=Ew;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=Object.prototype.hasOwnProperty,Nw=/^[: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]*$/,df={},ff={};function Pw(e){return lc.call(ff,e)?!0:lc.call(df,e)?!1:Nw.test(e)?ff[e]=!0:(df[e]=!0,!1)}function Rw(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 Tw(e,t,n,r){if(t===null||typeof t>"u"||Rw(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 rt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Be[e]=new rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Be[t]=new rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Be[e]=new rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Be[e]=new rt(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){Be[e]=new rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Be[e]=new rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Be[e]=new rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Be[e]=new rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Be[e]=new rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var zu=/[\-:]([a-z])/g;function $u(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(zu,$u);Be[t]=new rt(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(zu,$u);Be[t]=new rt(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(zu,$u);Be[t]=new rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Be[e]=new rt(e,1,!1,e.toLowerCase(),null,!1,!1)});Be.xlinkHref=new rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Be[e]=new rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bu(e,t,n,r){var o=Be.hasOwnProperty(t)?Be[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{bl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ai(e):""}function jw(e){switch(e.tag){case 5:return ai(e.type);case 16:return ai("Lazy");case 13:return ai("Suspense");case 19:return ai("SuspenseList");case 0:case 2:case 15:return e=Cl(e.type,!1),e;case 11:return e=Cl(e.type.render,!1),e;case 1:return e=Cl(e.type,!0),e;default:return""}}function fc(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 Zr:return"Fragment";case qr:return"Portal";case cc:return"Profiler";case Vu:return"StrictMode";case uc:return"Suspense";case dc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Kp:return(e.displayName||"Context")+".Consumer";case Qp:return(e._context.displayName||"Context")+".Provider";case Uu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wu:return t=e.displayName||null,t!==null?t:fc(e.type)||"Memo";case _n:t=e._payload,e=e._init;try{return fc(e(t))}catch{}}return null}function Mw(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 fc(t);case 8:return t===Vu?"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 ar(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Aw(e){var t=Xp(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hs(e){e._valueTracker||(e._valueTracker=Aw(e))}function qp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Xp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ra(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 hc(e,t){var n=t.checked;return Ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ar(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 Zp(e,t){t=t.checked,t!=null&&Bu(e,"checked",t,!1)}function pc(e,t){Zp(e,t);var n=ar(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")?mc(e,t.type,n):t.hasOwnProperty("defaultValue")&&mc(e,t.type,ar(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mf(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 mc(e,t,n){(t!=="number"||ra(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var li=Array.isArray;function co(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ps.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Si(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fi={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},Iw=["Webkit","ms","Moz","O"];Object.keys(fi).forEach(function(e){Iw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fi[t]=fi[e]})});function nm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fi.hasOwnProperty(e)&&fi[e]?(""+t).trim():t+"px"}function rm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=nm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Ow=Ee({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 yc(e,t){if(t){if(Ow[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function wc(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 xc=null;function Hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bc=null,uo=null,fo=null;function yf(e){if(e=qi(e)){if(typeof bc!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Ba(t),bc(e.stateNode,e.type,t))}}function om(e){uo?fo?fo.push(e):fo=[e]:uo=e}function im(){if(uo){var e=uo,t=fo;if(fo=uo=null,yf(e),t)for(e=0;e>>=0,e===0?32:31-(Hw(e)/Gw|0)|0}var ms=64,gs=4194304;function ci(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 aa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=ci(a):(i&=s,i!==0&&(r=ci(i)))}else s=n&~o,s!==0?r=ci(s):i!==0&&(r=ci(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=n}function Xw(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=pi),Pf=" ",Rf=!1;function km(e,t){switch(e){case"keyup":return Ex.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jr=!1;function Nx(e,t){switch(e){case"compositionend":return Nm(t);case"keypress":return t.which!==32?null:(Rf=!0,Pf);case"textInput":return e=t.data,e===Pf&&Rf?null:e;default:return null}}function Px(e,t){if(Jr)return e==="compositionend"||!Ju&&km(e,t)?(e=Sm(),$s=Xu=Yn=null,Jr=!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)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=Af(n)}}function jm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mm(){for(var e=window,t=ra();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ra(e.document)}return t}function ed(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 Fx(e){var t=Mm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jm(n.ownerDocument.documentElement,n)){if(r!==null&&ed(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=If(n,i);var s=If(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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=document.documentMode,eo=null,Pc=null,gi=null,Rc=!1;function Of(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rc||eo==null||eo!==ra(r)||(r=eo,"selectionStart"in r&&ed(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}),gi&&Ti(gi,r)||(gi=r,r=ua(Pc,"onSelect"),0ro||(e.current=Oc[ro],Oc[ro]=null,ro--)}function ge(e,t){ro++,Oc[ro]=e.current,e.current=t}var lr={},Qe=fr(lr),dt=fr(!1),Or=lr;function Io(e,t){var n=e.type.contextTypes;if(!n)return lr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ft(e){return e=e.childContextTypes,e!=null}function fa(){we(dt),we(Qe)}function Bf(e,t,n){if(Qe.current!==lr)throw Error(_(168));ge(Qe,t),ge(dt,n)}function $m(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(_(108,Mw(e)||"Unknown",o));return Ee({},n,r)}function ha(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lr,Or=Qe.current,ge(Qe,e),ge(dt,dt.current),!0}function Vf(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=$m(e,t,Or),r.__reactInternalMemoizedMergedChildContext=e,we(dt),we(Qe),ge(Qe,e)):we(dt),ge(dt,n)}var mn=null,Va=!1,Fl=!1;function Bm(e){mn===null?mn=[e]:mn.push(e)}function Kx(e){Va=!0,Bm(e)}function hr(){if(!Fl&&mn!==null){Fl=!0;var e=0,t=he;try{var n=mn;for(he=1;e>=s,o-=s,vn=1<<32-Ht(t)+o|n<j?(F=R,R=null):F=R.sibling;var L=m(v,R,x[j],S);if(L===null){R===null&&(R=F);break}e&&R&&L.alternate===null&&t(v,R),y=i(L,y,j),P===null?k=L:P.sibling=L,P=L,R=F}if(j===x.length)return n(v,R),be&&vr(v,j),k;if(R===null){for(;jj?(F=R,R=null):F=R.sibling;var W=m(v,R,L.value,S);if(W===null){R===null&&(R=F);break}e&&R&&W.alternate===null&&t(v,R),y=i(W,y,j),P===null?k=W:P.sibling=W,P=W,R=F}if(L.done)return n(v,R),be&&vr(v,j),k;if(R===null){for(;!L.done;j++,L=x.next())L=f(v,L.value,S),L!==null&&(y=i(L,y,j),P===null?k=L:P.sibling=L,P=L);return be&&vr(v,j),k}for(R=r(v,R);!L.done;j++,L=x.next())L=d(R,v,j,L.value,S),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?j:L.key),y=i(L,y,j),P===null?k=L:P.sibling=L,P=L);return e&&R.forEach(function($){return t(v,$)}),be&&vr(v,j),k}function w(v,y,x,S){if(typeof x=="object"&&x!==null&&x.type===Zr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case fs:e:{for(var k=x.key,P=y;P!==null;){if(P.key===k){if(k=x.type,k===Zr){if(P.tag===7){n(v,P.sibling),y=o(P,x.props.children),y.return=v,v=y;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===_n&&Hf(k)===P.type){n(v,P.sibling),y=o(P,x.props),y.ref=ti(v,P,x),y.return=v,v=y;break e}n(v,P);break}else t(v,P);P=P.sibling}x.type===Zr?(y=Ar(x.props.children,v.mode,S,x.key),y.return=v,v=y):(S=Ks(x.type,x.key,x.props,null,v.mode,S),S.ref=ti(v,y,x),S.return=v,v=S)}return s(v);case qr:e:{for(P=x.key;y!==null;){if(y.key===P)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(v,y.sibling),y=o(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Wl(x,v.mode,S),y.return=v,v=y}return s(v);case _n:return P=x._init,w(v,y,P(x._payload),S)}if(li(x))return C(v,y,x,S);if(Xo(x))return g(v,y,x,S);Ss(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,x),y.return=v,v=y):(n(v,y),y=Ul(x,v.mode,S),y.return=v,v=y),s(v)):n(v,y)}return w}var Lo=Hm(!0),Gm=Hm(!1),ga=fr(null),va=null,so=null,od=null;function id(){od=so=va=null}function sd(e){var t=ga.current;we(ga),e._currentValue=t}function _c(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 po(e,t){va=e,od=so=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ut=!0),e.firstContext=null)}function Mt(e){var t=e._currentValue;if(od!==e)if(e={context:e,memoizedValue:t,next:null},so===null){if(va===null)throw Error(_(308));so=e,va.dependencies={lanes:0,firstContext:e}}else so=so.next=e;return t}var xr=null;function ad(e){xr===null?xr=[e]:xr.push(e)}function Qm(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,ad(t)):(n.next=o.next,o.next=n),t.interleaved=n,Cn(e,r)}function Cn(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 Dn=!1;function ld(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Km(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 wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Cn(e,n)}return o=r.interleaved,o===null?(t.next=t,ad(r)):(t.next=o.next,o.next=t),r.interleaved=t,Cn(e,n)}function Vs(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,Qu(e,n)}}function Gf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ya(e,t,n,r){var o=e.updateQueue;Dn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;s=0,h=c=l=null,a=i;do{var m=a.lane,d=a.eventTime;if((r&m)===m){h!==null&&(h=h.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var C=e,g=a;switch(m=t,d=n,g.tag){case 1:if(C=g.payload,typeof C=="function"){f=C.call(d,f,m);break e}f=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=g.payload,m=typeof C=="function"?C.call(d,f,m):C,m==null)break e;f=Ee({},f,m);break e;case 2:Dn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[a]:m.push(a))}else d={eventTime:d,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=d,l=f):h=h.next=d,s|=m;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;m=a,a=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(!0);if(h===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=h,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);_r|=s,e.lanes=s,e.memoizedState=f}}function Qf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Dl.transition;Dl.transition={};try{e(!1),t()}finally{he=n,Dl.transition=r}}function dg(){return At().memoizedState}function Zx(e,t,n){var r=or(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fg(e))hg(t,n);else if(n=Qm(e,t,n,r),n!==null){var o=tt();Gt(n,e,r,o),pg(n,t,r)}}function Jx(e,t,n){var r=or(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fg(e))hg(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Qt(a,s)){var l=t.interleaved;l===null?(o.next=o,ad(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Qm(e,t,o,r),n!==null&&(o=tt(),Gt(n,e,r,o),pg(n,t,r))}}function fg(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function hg(e,t){vi=xa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qu(e,n)}}var ba={readContext:Mt,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},e1={readContext:Mt,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Yf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ws(4194308,4,sg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ws(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ws(4,2,e,t)},useMemo:function(e,t){var n=Zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zt();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=Zx.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:Kf,useDebugValue:gd,useDeferredValue:function(e){return Zt().memoizedState=e},useTransition:function(){var e=Kf(!1),t=e[0];return e=qx.bind(null,e[1]),Zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,o=Zt();if(be){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),_e===null)throw Error(_(349));Fr&30||Zm(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Yf(eg.bind(null,r,i,e),[e]),r.flags|=2048,_i(9,Jm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Zt(),t=_e.identifierPrefix;if(be){var n=yn,r=vn;n=(r&~(1<<32-Ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Li++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[nn]=t,e[Ai]=r,Eg(e,t,!1,!1),t.stateNode=e;e:{switch(s=wc(n,r),n){case"dialog":ye("cancel",e),ye("close",e),o=r;break;case"iframe":case"object":case"embed":ye("load",e),o=r;break;case"video":case"audio":for(o=0;oDo&&(t.flags|=128,r=!0,ni(i,!1),t.lanes=4194304)}else{if(!r)if(e=wa(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ni(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!be)return We(t),null}else 2*Te()-i.renderingStartTime>Do&&n!==1073741824&&(t.flags|=128,r=!0,ni(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Te(),t.sibling=null,n=Ce.current,ge(Ce,r?n&1|2:n&1),t):(We(t),null);case 22:case 23:return Cd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?gt&1073741824&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function l1(e,t){switch(nd(t),t.tag){case 1:return ft(t.type)&&fa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fo(),we(dt),we(Qe),dd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ud(t),null;case 13:if(we(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Oo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ce),null;case 4:return Fo(),null;case 10:return sd(t.type._context),null;case 22:case 23:return Cd(),null;case 24:return null;default:return null}}var ks=!1,Ge=!1,c1=typeof WeakSet=="function"?WeakSet:Set,G=null;function ao(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Gc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var sh=!1;function u1(e,t){if(Tc=la,e=Mm(),ed(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,h=0,f=e,m=null;t:for(;;){for(var d;f!==n||o!==0&&f.nodeType!==3||(a=s+o),f!==i||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(d=f.firstChild)!==null;)m=f,f=d;for(;;){if(f===e)break t;if(m===n&&++c===o&&(a=s),m===i&&++h===r&&(l=s),(d=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=d}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(jc={focusedElem:e,selectionRange:n},la=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var g=C.memoizedProps,w=C.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:$t(t.type,g),w);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(S){Ne(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return C=sh,sh=!1,C}function yi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gc(t,n,i)}o=o.next}while(o!==r)}}function Ha(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 Qc(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 Pg(e){var t=e.alternate;t!==null&&(e.alternate=null,Pg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[Ai],delete t[Ic],delete t[Gx],delete t[Qx])),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 Rg(e){return e.tag===5||e.tag===3||e.tag===4}function ah(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rg(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 Kc(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=da));else if(r!==4&&(e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function Yc(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(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}var De=null,Ut=!1;function An(e,t,n){for(n=n.child;n!==null;)Tg(e,t,n),n=n.sibling}function Tg(e,t,n){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(_a,n)}catch{}switch(n.tag){case 5:Ge||ao(n,t);case 6:var r=De,o=Ut;De=null,An(e,t,n),De=r,Ut=o,De!==null&&(Ut?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(Ut?(e=De,n=n.stateNode,e.nodeType===8?Ll(e.parentNode,n):e.nodeType===1&&Ll(e,n),Pi(e)):Ll(De,n.stateNode));break;case 4:r=De,o=Ut,De=n.stateNode.containerInfo,Ut=!0,An(e,t,n),De=r,Ut=o;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Gc(n,t,s),o=o.next}while(o!==r)}An(e,t,n);break;case 1:if(!Ge&&(ao(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}An(e,t,n);break;case 21:An(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,An(e,t,n),Ge=r):An(e,t,n);break;default:An(e,t,n)}}function lh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new c1),t.forEach(function(r){var o=w1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Dt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*f1(r/1960))-r,10e?16:e,Xn===null)var r=!1;else{if(e=Xn,Xn=null,Ea=0,ce&6)throw Error(_(331));var o=ce;for(ce|=4,G=e.current;G!==null;){var i=G,s=i.child;if(G.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lTe()-xd?Mr(e,0):wd|=n),ht(e,t)}function _g(e,t){t===0&&(e.mode&1?(t=gs,gs<<=1,!(gs&130023424)&&(gs=4194304)):t=1);var n=tt();e=Cn(e,t),e!==null&&(Yi(e,t,n),ht(e,n))}function y1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_g(e,n)}function w1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),_g(e,n)}var Dg;Dg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ut=!1,s1(e,t,n);ut=!!(e.flags&131072)}else ut=!1,be&&t.flags&1048576&&Vm(t,ma,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var o=Io(t,Qe.current);po(t,n),o=hd(null,t,r,e,o,n);var i=pd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ft(r)?(i=!0,ha(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ld(t),o.updater=Wa,t.stateNode=o,o._reactInternals=t,zc(t,r,e,n),t=Vc(null,t,r,!0,i,n)):(t.tag=0,be&&i&&td(t),et(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=b1(r),e=$t(r,e),o){case 0:t=Bc(null,t,r,e,n);break e;case 1:t=rh(null,t,r,e,n);break e;case 11:t=th(null,t,r,e,n);break e;case 14:t=nh(null,t,r,$t(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$t(r,o),Bc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$t(r,o),rh(e,t,r,o,n);case 3:e:{if(bg(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Km(e,t),ya(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=_o(Error(_(423)),t),t=oh(e,t,r,n,o);break e}else if(r!==o){o=_o(Error(_(424)),t),t=oh(e,t,r,n,o);break e}else for(yt=tr(t.stateNode.containerInfo.firstChild),wt=t,be=!0,Wt=null,n=Gm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Oo(),r===o){t=Sn(e,t,n);break e}et(e,t,r,n)}t=t.child}return t;case 5:return Ym(t),e===null&&Fc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Mc(r,o)?s=null:i!==null&&Mc(r,i)&&(t.flags|=32),xg(e,t),et(e,t,s,n),t.child;case 6:return e===null&&Fc(t),null;case 13:return Cg(e,t,n);case 4:return cd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Lo(t,null,r,n):et(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$t(r,o),th(e,t,r,o,n);case 7:return et(e,t,t.pendingProps,n),t.child;case 8:return et(e,t,t.pendingProps.children,n),t.child;case 12:return et(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ge(ga,r._currentValue),r._currentValue=s,i!==null)if(Qt(i.value,s)){if(i.children===o.children&&!dt.current){t=Sn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=wn(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),_c(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(_(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),_c(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}et(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=Mt(o),r=r(o),t.flags|=1,et(e,t,r,n),t.child;case 14:return r=t.type,o=$t(r,t.pendingProps),o=$t(r.type,o),nh(e,t,r,o,n);case 15:return yg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$t(r,o),Hs(e,t),t.tag=1,ft(r)?(e=!0,ha(t)):e=!1,po(t,n),mg(t,r,o),zc(t,r,o,n),Vc(null,t,r,!0,e,n);case 19:return Sg(e,t,n);case 22:return wg(e,t,n)}throw Error(_(156,t.tag))};function zg(e,t){return fm(e,t)}function x1(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 Tt(e,t,n,r){return new x1(e,t,n,r)}function Ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function b1(e){if(typeof e=="function")return Ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uu)return 11;if(e===Wu)return 14}return 2}function ir(e,t){var n=e.alternate;return n===null?(n=Tt(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 Ks(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Ed(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Zr:return Ar(n.children,o,i,t);case Vu:s=8,o|=8;break;case cc:return e=Tt(12,n,t,o|2),e.elementType=cc,e.lanes=i,e;case uc:return e=Tt(13,n,t,o),e.elementType=uc,e.lanes=i,e;case dc:return e=Tt(19,n,t,o),e.elementType=dc,e.lanes=i,e;case Yp:return Qa(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qp:s=10;break e;case Kp:s=9;break e;case Uu:s=11;break e;case Wu:s=14;break e;case _n:s=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Tt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ar(e,t,n,r){return e=Tt(7,e,r,t),e.lanes=n,e}function Qa(e,t,n,r){return e=Tt(22,e,r,t),e.elementType=Yp,e.lanes=n,e.stateNode={isHidden:!1},e}function Ul(e,t,n){return e=Tt(6,e,null,t),e.lanes=n,e}function Wl(e,t,n){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function C1(e,t,n,r,o){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=El(0),this.expirationTimes=El(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=El(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function kd(e,t,n,r,o,i,s,a,l){return e=new C1(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Tt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ld(i),e}function S1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ug)}catch(e){console.error(e)}}Ug(),Up.exports=Ct;var Ji=Up.exports;const Wg=Mp(Ji);var Hg,gh=Ji;Hg=gh.createRoot,gh.hydrateRoot;const R1=1,T1=1e6;let Hl=0;function j1(){return Hl=(Hl+1)%Number.MAX_SAFE_INTEGER,Hl.toString()}const Gl=new Map,vh=e=>{if(Gl.has(e))return;const t=setTimeout(()=>{Gl.delete(e),bi({type:"REMOVE_TOAST",toastId:e})},T1);Gl.set(e,t)},M1=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,R1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?vh(n):e.toasts.forEach(r=>{vh(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)}}},Ys=[];let Xs={toasts:[]};function bi(e){Xs=M1(Xs,e),Ys.forEach(t=>{t(Xs)})}function A1({...e}){const t=j1(),n=o=>bi({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>bi({type:"DISMISS_TOAST",toastId:t});return bi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function es(){const[e,t]=p.useState(Xs);return p.useEffect(()=>(Ys.push(t),()=>{const n=Ys.indexOf(t);n>-1&&Ys.splice(n,1)}),[e]),{...e,toast:A1,dismiss:n=>bi({type:"DISMISS_TOAST",toastId:n})}}function le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function yh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gg(...e){return t=>{let n=!1;const r=e.map(o=>{const i=yh(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{const{children:s,...a}=i,l=p.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=p.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Pn(e,t=[]){let n=[];function r(i,s){const a=p.createContext(s),l=n.length;n=[...n,s];const c=f=>{var v;const{scope:m,children:d,...C}=f,g=((v=m==null?void 0:m[e])==null?void 0:v[l])||a,w=p.useMemo(()=>C,Object.values(C));return u.jsx(g.Provider,{value:w,children:d})};c.displayName=i+"Provider";function h(f,m){var g;const d=((g=m==null?void 0:m[e])==null?void 0:g[l])||a,C=p.useContext(d);if(C)return C;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,h]}const o=()=>{const i=n.map(s=>p.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,O1(o,...t)]}function O1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function zi(e){const t=F1(e),n=p.forwardRef((r,o)=>{const{children:i,...s}=r,a=p.Children.toArray(i),l=a.find(D1);if(l){const c=l.props.children,h=a.map(f=>f===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:o,children:p.isValidElement(c)?p.cloneElement(c,void 0,h):null})}return u.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var L1=zi("Slot");function F1(e){const t=p.forwardRef((n,r)=>{const{children:o,...i}=n;if(p.isValidElement(o)){const s=$1(o),a=z1(i,o.props);return o.type!==p.Fragment&&(a.ref=r?Gg(r,s):s),p.cloneElement(o,a)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qg=Symbol("radix.slottable");function _1(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Qg,t}function D1(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qg}function z1(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function $1(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Kg(e){const t=e+"CollectionProvider",[n,r]=Pn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:w,children:v}=g,y=V.useRef(null),x=V.useRef(new Map).current;return u.jsx(o,{scope:w,itemMap:x,collectionRef:y,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=zi(a),c=V.forwardRef((g,w)=>{const{scope:v,children:y}=g,x=i(a,v),S=Oe(w,x.collectionRef);return u.jsx(l,{ref:S,children:y})});c.displayName=a;const h=e+"CollectionItemSlot",f="data-radix-collection-item",m=zi(h),d=V.forwardRef((g,w)=>{const{scope:v,children:y,...x}=g,S=V.useRef(null),k=Oe(w,S),P=i(h,v);return V.useEffect(()=>(P.itemMap.set(S,{ref:S,...x}),()=>void P.itemMap.delete(S))),u.jsx(m,{[f]:"",ref:k,children:y})});d.displayName=h;function C(g){const w=i(e+"CollectionConsumer",g);return V.useCallback(()=>{const y=w.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((P,R)=>x.indexOf(P.ref.current)-x.indexOf(R.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:c,ItemSlot:d},C,r]}var B1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],de=B1.reduce((e,t)=>{const n=zi(`Primitive.${t}`),r=p.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yg(e,t){e&&Ji.flushSync(()=>e.dispatchEvent(t))}function It(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function V1(e,t=globalThis==null?void 0:globalThis.document){const n=It(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var U1="DismissableLayer",eu="dismissableLayer.update",W1="dismissableLayer.pointerDownOutside",H1="dismissableLayer.focusOutside",wh,Xg=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Za=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=p.useContext(Xg),[h,f]=p.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=p.useState({}),C=Oe(t,R=>f(R)),g=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(w),y=h?g.indexOf(h):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,k=Q1(R=>{const j=R.target,F=[...c.branches].some(L=>L.contains(j));!S||F||(o==null||o(R),s==null||s(R),R.defaultPrevented||a==null||a())},m),P=K1(R=>{const j=R.target;[...c.branches].some(L=>L.contains(j))||(i==null||i(R),s==null||s(R),R.defaultPrevented||a==null||a())},m);return V1(R=>{y===c.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},m),p.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wh=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),xh(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=wh)}},[h,m,n,c]),p.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),xh())},[h,c]),p.useEffect(()=>{const R=()=>d({});return document.addEventListener(eu,R),()=>document.removeEventListener(eu,R)},[]),u.jsx(de.div,{...l,ref:C,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,P.onFocusCapture),onBlurCapture:le(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,k.onPointerDownCapture)})});Za.displayName=U1;var G1="DismissableLayerBranch",qg=p.forwardRef((e,t)=>{const n=p.useContext(Xg),r=p.useRef(null),o=Oe(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),u.jsx(de.div,{...e,ref:o})});qg.displayName=G1;function Q1(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Zg(W1,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function K1(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&Zg(H1,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xh(){const e=new CustomEvent(eu);document.dispatchEvent(e)}function Zg(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yg(o,i):o.dispatchEvent(i)}var Y1=Za,X1=qg,Ot=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},q1="Portal",Td=p.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=p.useState(!1);Ot(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Wg.createPortal(u.jsx(de.div,{...r,ref:t}),s):null});Td.displayName=q1;function Z1(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Wr=e=>{const{present:t,children:n}=e,r=J1(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Oe(r.ref,eb(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Wr.displayName="Presence";function J1(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),i=p.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Z1(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=Rs(r.current);i.current=a==="mounted"?c:"none"},[a]),Ot(()=>{const c=r.current,h=o.current;if(h!==e){const m=i.current,d=Rs(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&m!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ot(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,f=d=>{const g=Rs(r.current).includes(d.animationName);if(d.target===t&&g&&(l("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=d=>{d.target===t&&(i.current=Rs(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Rs(e){return(e==null?void 0:e.animationName)||"none"}function eb(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tb=Du[" useInsertionEffect ".trim().toString()]||Ot;function Ja({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=nb({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const h=p.useRef(e!==void 0);p.useEffect(()=>{const f=h.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"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.`),h.current=a},[a,r])}const c=p.useCallback(h=>{var f;if(a){const m=rb(h)?h(e):h;m!==e&&((f=s.current)==null||f.call(s,m))}else i(h)},[a,e,i,s]);return[l,c]}function nb({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),i=p.useRef(t);return tb(()=>{i.current=t},[t]),p.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function rb(e){return typeof e=="function"}var ob=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"}),ib="VisuallyHidden",el=p.forwardRef((e,t)=>u.jsx(de.span,{...e,ref:t,style:{...ob,...e.style}}));el.displayName=ib;var sb=el,jd="ToastProvider",[Md,ab,lb]=Kg("Toast"),[Jg,ZP]=Pn("Toast",[lb]),[cb,tl]=Jg(jd),ev=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,l]=p.useState(null),[c,h]=p.useState(0),f=p.useRef(!1),m=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${jd}\`. Expected non-empty \`string\`.`),u.jsx(Md.Provider,{scope:t,children:u.jsx(cb,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:p.useCallback(()=>h(d=>d+1),[]),onToastRemove:p.useCallback(()=>h(d=>d-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:s})})};ev.displayName=jd;var tv="ToastViewport",ub=["F8"],tu="toast.viewportPause",nu="toast.viewportResume",nv=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=ub,label:o="Notifications ({hotkey})",...i}=e,s=tl(tv,n),a=ab(n),l=p.useRef(null),c=p.useRef(null),h=p.useRef(null),f=p.useRef(null),m=Oe(t,f,s.onViewportChange),d=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=s.toastCount>0;p.useEffect(()=>{const w=v=>{var x;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),p.useEffect(()=>{const w=l.current,v=f.current;if(C&&w&&v){const y=()=>{if(!s.isClosePausedRef.current){const P=new CustomEvent(tu);v.dispatchEvent(P),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const P=new CustomEvent(nu);v.dispatchEvent(P),s.isClosePausedRef.current=!1}},S=P=>{!w.contains(P.relatedTarget)&&x()},k=()=>{w.contains(document.activeElement)||x()};return w.addEventListener("focusin",y),w.addEventListener("focusout",S),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",k),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",S),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",k),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[C,s.isClosePausedRef]);const g=p.useCallback(({tabbingDirection:w})=>{const y=a().map(x=>{const S=x.ref.current,k=[S,...Sb(S)];return w==="forwards"?k:k.reverse()});return(w==="forwards"?y.reverse():y).flat()},[a]);return p.useEffect(()=>{const w=f.current;if(w){const v=y=>{var k,P,R;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const j=document.activeElement,F=y.shiftKey;if(y.target===w&&F){(k=c.current)==null||k.focus();return}const $=g({tabbingDirection:F?"backwards":"forwards"}),H=$.findIndex(B=>B===j);Ql($.slice(H+1))?y.preventDefault():F?(P=c.current)==null||P.focus():(R=h.current)==null||R.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[a,g]),u.jsxs(X1,{ref:l,role:"region","aria-label":o.replace("{hotkey}",d),tabIndex:-1,style:{pointerEvents:C?void 0:"none"},children:[C&&u.jsx(ru,{ref:c,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Ql(w)}}),u.jsx(Md.Slot,{scope:n,children:u.jsx(de.ol,{tabIndex:-1,...i,ref:m})}),C&&u.jsx(ru,{ref:h,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Ql(w)}})]})});nv.displayName=tv;var rv="ToastFocusProxy",ru=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=tl(rv,n);return u.jsx(el,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var c;const a=s.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});ru.displayName=rv;var ts="Toast",db="toast.swipeStart",fb="toast.swipeMove",hb="toast.swipeCancel",pb="toast.swipeEnd",ov=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,l]=Ja({prop:r,defaultProp:o??!0,onChange:i,caller:ts});return u.jsx(Wr,{present:n||a,children:u.jsx(vb,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:It(e.onPause),onResume:It(e.onResume),onSwipeStart:le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(e.onSwipeMove,c=>{const{x:h,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(e.onSwipeEnd,c=>{const{x:h,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});ov.displayName=ts;var[mb,gb]=Jg(ts,{onClose(){}}),vb=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:h,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:d,...C}=e,g=tl(ts,n),[w,v]=p.useState(null),y=Oe(t,B=>v(B)),x=p.useRef(null),S=p.useRef(null),k=o||g.duration,P=p.useRef(0),R=p.useRef(k),j=p.useRef(0),{onToastAdd:F,onToastRemove:L}=g,W=It(()=>{var q;(w==null?void 0:w.contains(document.activeElement))&&((q=g.viewport)==null||q.focus()),s()}),$=p.useCallback(B=>{!B||B===1/0||(window.clearTimeout(j.current),P.current=new Date().getTime(),j.current=window.setTimeout(W,B))},[W]);p.useEffect(()=>{const B=g.viewport;if(B){const q=()=>{$(R.current),c==null||c()},K=()=>{const X=new Date().getTime()-P.current;R.current=R.current-X,window.clearTimeout(j.current),l==null||l()};return B.addEventListener(tu,K),B.addEventListener(nu,q),()=>{B.removeEventListener(tu,K),B.removeEventListener(nu,q)}}},[g.viewport,k,l,c,$]),p.useEffect(()=>{i&&!g.isClosePausedRef.current&&$(k)},[i,k,g.isClosePausedRef,$]),p.useEffect(()=>(F(),()=>L()),[F,L]);const H=p.useMemo(()=>w?dv(w):null,[w]);return g.viewport?u.jsxs(u.Fragment,{children:[H&&u.jsx(yb,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),u.jsx(mb,{scope:n,onClose:W,children:Ji.createPortal(u.jsx(Md.ItemSlot,{scope:n,children:u.jsx(Y1,{asChild:!0,onEscapeKeyDown:le(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||W(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(de.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...C,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:le(e.onKeyDown,B=>{B.key==="Escape"&&(a==null||a(B.nativeEvent),B.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:le(e.onPointerDown,B=>{B.button===0&&(x.current={x:B.clientX,y:B.clientY})}),onPointerMove:le(e.onPointerMove,B=>{if(!x.current)return;const q=B.clientX-x.current.x,K=B.clientY-x.current.y,X=!!S.current,A=["left","right"].includes(g.swipeDirection),O=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,E=A?O(0,q):0,b=A?0:O(0,K),M=B.pointerType==="touch"?10:2,T={x:E,y:b},I={originalEvent:B,delta:T};X?(S.current=T,Ts(fb,f,I,{discrete:!1})):bh(T,g.swipeDirection,M)?(S.current=T,Ts(db,h,I,{discrete:!1}),B.target.setPointerCapture(B.pointerId)):(Math.abs(q)>M||Math.abs(K)>M)&&(x.current=null)}),onPointerUp:le(e.onPointerUp,B=>{const q=S.current,K=B.target;if(K.hasPointerCapture(B.pointerId)&&K.releasePointerCapture(B.pointerId),S.current=null,x.current=null,q){const X=B.currentTarget,A={originalEvent:B,delta:q};bh(q,g.swipeDirection,g.swipeThreshold)?Ts(pb,d,A,{discrete:!0}):Ts(hb,m,A,{discrete:!0}),X.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),yb=e=>{const{__scopeToast:t,children:n,...r}=e,o=tl(ts,t),[i,s]=p.useState(!1),[a,l]=p.useState(!1);return bb(()=>s(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(Td,{asChild:!0,children:u.jsx(el,{...r,children:i&&u.jsxs(u.Fragment,{children:[o.label," ",n]})})})},wb="ToastTitle",iv=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(de.div,{...r,ref:t})});iv.displayName=wb;var xb="ToastDescription",sv=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(de.div,{...r,ref:t})});sv.displayName=xb;var av="ToastAction",lv=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?u.jsx(uv,{altText:n,asChild:!0,children:u.jsx(Ad,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${av}\`. Expected non-empty \`string\`.`),null)});lv.displayName=av;var cv="ToastClose",Ad=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=gb(cv,n);return u.jsx(uv,{asChild:!0,children:u.jsx(de.button,{type:"button",...r,ref:t,onClick:le(e.onClick,o.onClose)})})});Ad.displayName=cv;var uv=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return u.jsx(de.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function dv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Cb(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...dv(r))}}),t}function Ts(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yg(o,i):o.dispatchEvent(i)}var bh=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function bb(e=()=>{}){const t=It(e);Ot(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Cb(e){return e.nodeType===e.ELEMENT_NODE}function Sb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ql(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Eb=ev,fv=nv,hv=ov,pv=iv,mv=sv,gv=lv,vv=Ad;function yv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,Sh=wv,nl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Sh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const h=n==null?void 0:n[c],f=i==null?void 0:i[c];if(h===null)return null;const m=Ch(h)||Ch(f);return o[c][m]}),a=n&&Object.entries(n).reduce((c,h)=>{let[f,m]=h;return m===void 0||(c[f]=m),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,h)=>{let{class:f,className:m,...d}=h;return Object.entries(d).every(C=>{let[g,w]=C;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...c,f,m]:c},[]);return Sh(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Nb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pb=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>p.createElement("svg",{ref:l,...Nb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:xv("lucide",o),...a},[...s.map(([c,h])=>p.createElement(c,h)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const je=(e,t)=>{const n=p.forwardRef(({className:r,...o},i)=>p.createElement(Pb,{ref:i,iconNode:t,className:xv(`lucide-${kb(e)}`,r),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rb=je("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tb=je("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jb=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mb=je("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ab=je("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Eh=je("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ib=je("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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bv=je("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ob=je("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lb=je("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kh=je("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fb=je("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nh=je("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _b=je("Syringe",[["path",{d:"m18 2 4 4",key:"22kx64"}],["path",{d:"m17 7 3-3",key:"1w1zoj"}],["path",{d:"M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5",key:"1exhtz"}],["path",{d:"m9 11 4 4",key:"rovt3i"}],["path",{d:"m5 19-3 3",key:"59f2uf"}],["path",{d:"m14 4 6 6",key:"yqp9t2"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Db=je("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zb=je("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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cv=je("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $b=je("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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bb=je("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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vb=je("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Id=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Od="-",Ub=e=>{const t=Hb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(Od);return a[0]===""&&a.length!==1&&a.shift(),Sv(a,t)||Wb(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Sv=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Sv(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Od);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},Ph=/^\[(.+)\]$/,Wb=e=>{if(Ph.test(e)){const t=Ph.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Hb=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Qb(Object.entries(e.classGroups),n).forEach(([i,s])=>{ou(s,r,i,t)}),r},ou=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Rh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Gb(o)){ou(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{ou(s,Rh(t,i),n,r)})})},Rh=(e,t)=>{let n=e;return t.split(Od).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Gb=e=>e.isThemeGetter,Qb=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,Kb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Ev="!",Yb=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let c=0,h=0,f;for(let w=0;wh?f-h:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:C,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},Xb=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},qb=e=>({cache:Kb(e.cacheSize),parseClassName:Yb(e),...Ub(e)}),Zb=/\s+/,Jb=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(Zb);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:h,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:d}=n(c);let C=!!d,g=r(C?m.substring(0,d):m);if(!g){if(!C){a=c+(a.length>0?" "+a:a);continue}if(g=r(m),!g){a=c+(a.length>0?" "+a:a);continue}C=!1}const w=Xb(h).join(":"),v=f?w+Ev:w,y=v+g;if(i.includes(y))continue;i.push(y);const x=o(g,C);for(let S=0;S0?" "+a:a)}return a};function eC(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(h),e());return n=qb(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const h=Jb(l,n);return o(l,h),h}return function(){return i(eC.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Nv=/^\[(?:([a-z-]+):)?(.+)\]$/i,nC=/^\d+\/\d+$/,rC=new Set(["px","full","screen"]),oC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iC=/\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$/,sC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,aC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fn=e=>go(e)||rC.has(e)||nC.test(e),In=e=>Ho(e,"length",gC),go=e=>!!e&&!Number.isNaN(Number(e)),Kl=e=>Ho(e,"number",go),oi=e=>!!e&&Number.isInteger(Number(e)),cC=e=>e.endsWith("%")&&go(e.slice(0,-1)),te=e=>Nv.test(e),On=e=>oC.test(e),uC=new Set(["length","size","percentage"]),dC=e=>Ho(e,uC,Pv),fC=e=>Ho(e,"position",Pv),hC=new Set(["image","url"]),pC=e=>Ho(e,hC,yC),mC=e=>Ho(e,"",vC),ii=()=>!0,Ho=(e,t,n)=>{const r=Nv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},gC=e=>iC.test(e)&&!sC.test(e),Pv=()=>!1,vC=e=>aC.test(e),yC=e=>lC.test(e),wC=()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),o=ve("borderColor"),i=ve("borderRadius"),s=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),c=ve("grayscale"),h=ve("hueRotate"),f=ve("invert"),m=ve("gap"),d=ve("gradientColorStops"),C=ve("gradientColorStopPositions"),g=ve("inset"),w=ve("margin"),v=ve("opacity"),y=ve("padding"),x=ve("saturate"),S=ve("scale"),k=ve("sepia"),P=ve("skew"),R=ve("space"),j=ve("translate"),F=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",te,t],$=()=>[te,t],H=()=>["",fn,In],B=()=>["auto",go,te],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",te],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[go,te];return{cacheSize:500,separator:":",theme:{colors:[ii],spacing:[fn,In],blur:["none","",On,te],brightness:b(),borderColor:[e],borderRadius:["none","","full",On,te],borderSpacing:$(),borderWidth:H(),contrast:b(),grayscale:O(),hueRotate:b(),invert:O(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[cC,In],inset:W(),margin:W(),opacity:b(),padding:$(),saturate:b(),scale:b(),sepia:O(),skew:b(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[On]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:[...q(),te]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",oi,te]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",oi,te]}],"grid-cols":[{"grid-cols":[ii]}],"col-start-end":[{col:["auto",{span:["full",oi,te]},te]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[ii]}],"row-start-end":[{row:["auto",{span:[oi,te]},te]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[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":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[On]},On]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",On,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kl]}],"font-family":[{font:[ii]}],"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",te]}],"line-clamp":[{"line-clamp":["none",go,Kl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fn,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fn,In]}],"underline-offset":[{"underline-offset":["auto",fn,te]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],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",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),fC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:K()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[fn,te]}],"outline-w":[{outline:[fn,In]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[fn,In]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",On,mC]}],"shadow-color":[{shadow:[ii]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",On,te]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[oi,te]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],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",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fn,In,Kl]}],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"]}}},xC=tC(wC);function Pe(...e){return xC(wv(e))}const Je={validateFullName:e=>{const t=e.match(/[a-zA-ZÀ-ỹ]/g);return t?t.length>=3:!1},validatePhoneNumber:e=>/^\+84\s?[0-9]{9,10}$/.test(e),countAlphabeticalChars:e=>{const t=e.match(/[a-zA-ZÀ-ỹ]/g);return t?t.length:0}},bC=Eb,Rv=p.forwardRef(({className:e,...t},n)=>u.jsx(fv,{ref:n,className:Pe("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}));Rv.displayName=fv.displayName;const CC=nl("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"}}),Tv=p.forwardRef(({className:e,variant:t,...n},r)=>u.jsx(hv,{ref:r,className:Pe(CC({variant:t}),e),...n}));Tv.displayName=hv.displayName;const SC=p.forwardRef(({className:e,...t},n)=>u.jsx(gv,{ref:n,className:Pe("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}));SC.displayName=gv.displayName;const jv=p.forwardRef(({className:e,...t},n)=>u.jsx(vv,{ref:n,className:Pe("absolute right-2 top-2 rounded-md p-1 text-foreground/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:u.jsx(Id,{className:"h-4 w-4"})}));jv.displayName=vv.displayName;const Mv=p.forwardRef(({className:e,...t},n)=>u.jsx(pv,{ref:n,className:Pe("text-sm font-semibold",e),...t}));Mv.displayName=pv.displayName;const Av=p.forwardRef(({className:e,...t},n)=>u.jsx(mv,{ref:n,className:Pe("text-sm opacity-90",e),...t}));Av.displayName=mv.displayName;function EC(){const{toasts:e}=es();return u.jsxs(bC,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return u.jsxs(Tv,{...i,children:[u.jsxs("div",{className:"grid gap-1",children:[n&&u.jsx(Mv,{children:n}),r&&u.jsx(Av,{children:r})]}),o,u.jsx(jv,{})]},t)}),u.jsx(Rv,{})]})}var Th=["light","dark"],kC="(prefers-color-scheme: dark)",NC=p.createContext(void 0),PC={setTheme:e=>{},themes:[]},RC=()=>{var e;return(e=p.useContext(NC))!=null?e:PC};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:a,nonce:l})=>{let c=i==="system",h=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(C=>`'${C}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=o?Th.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(C,g=!1,w=!0)=>{let v=s?s[C]:C,y=g?C+"|| ''":`'${v}'`,x="";return o&&w&&!g&&Th.includes(C)&&(x+=`d.style.colorScheme = '${C}';`),n==="class"?g||v?x+=`c.add(${y})`:x+="null":v&&(x+=`d[s](n,${y})`),x},d=e?`!function(){${h}${m(e)}}()`:r?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${kC}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${m(s?"x[e]":"e",!0)}}${c?"":"else{"+m(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${m(s?"x[e]":"e",!0)}}else{${m(i,!1,!1)};}${f}}catch(t){}}();`;return p.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:d}})});var TC=e=>{switch(e){case"success":return AC;case"info":return OC;case"warning":return IC;case"error":return LC;default:return null}},jC=Array(12).fill(0),MC=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},jC.map((n,r)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),AC=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.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"})),IC=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.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"})),OC=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.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"})),LC=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.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"})),FC=V.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"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),_C=()=>{let[e,t]=V.useState(document.hidden);return V.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},iu=1,DC=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,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:iu++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:o}),o},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)=>this.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(),o=n!==void 0,i,s=r.then(async l=>{if(i=["resolve",l],V.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if($C(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:h})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,h=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:h})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,h=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:h})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>s.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||iu++;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}},st=new DC,zC=(e,t)=>{let n=(t==null?void 0:t.id)||iu++;return st.addToast({title:e,...t,id:n}),n},$C=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",BC=zC,VC=()=>st.toasts,UC=()=>st.getActiveToasts();Object.assign(BC,{success:st.success,info:st.info,warning:st.warning,error:st.error,custom:st.custom,message:st.message,promise:st.promise,dismiss:st.dismiss,loading:st.loading},{getHistory:VC,getToasts:UC});function WC(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))}WC(`: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;left: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}: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%);--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%)} `);function js(e){return e.label!==void 0}var HC=3,GC="32px",QC="16px",jh=4e3,KC=356,YC=14,XC=20,qC=200;function zt(...e){return e.filter(Boolean).join(" ")}function ZC(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var JC=e=>{var t,n,r,o,i,s,a,l,c,h,f;let{invert:m,toast:d,unstyled:C,interacting:g,setHeights:w,visibleToasts:v,heights:y,index:x,toasts:S,expanded:k,removeToast:P,defaultRichColors:R,closeButton:j,style:F,cancelButtonStyle:L,actionButtonStyle:W,className:$="",descriptionClassName:H="",duration:B,position:q,gap:K,loadingIcon:X,expandByDefault:A,classNames:O,icons:E,closeButtonAriaLabel:b="Close toast",pauseWhenPageIsHidden:M}=e,[T,I]=V.useState(null),[D,U]=V.useState(null),[z,Y]=V.useState(!1),[ee,se]=V.useState(!1),[ae,fe]=V.useState(!1),[me,ne]=V.useState(!1),[Le,Ve]=V.useState(!1),[Ke,Ye]=V.useState(0),[ot,mt]=V.useState(0),pr=V.useRef(d.duration||B||jh),ss=V.useRef(null),dn=V.useRef(null),as=x===0,ml=x+1<=v,Xe=d.type,Rn=d.dismissible!==!1,gl=d.className||"",ls=d.descriptionClassName||"",mr=V.useMemo(()=>y.findIndex(J=>J.toastId===d.id)||0,[y,d.id]),Ko=V.useMemo(()=>{var J;return(J=d.closeButton)!=null?J:j},[d.closeButton,j]),cs=V.useMemo(()=>d.duration||B||jh,[d.duration,B]),Yo=V.useRef(0),Hr=V.useRef(0),rf=V.useRef(0),Gr=V.useRef(null),[q0,Z0]=q.split("-"),of=V.useMemo(()=>y.reduce((J,pe,xe)=>xe>=mr?J:J+pe.height,0),[y,mr]),sf=_C(),J0=d.invert||m,vl=Xe==="loading";Hr.current=V.useMemo(()=>mr*K+of,[mr,of]),V.useEffect(()=>{pr.current=cs},[cs]),V.useEffect(()=>{Y(!0)},[]),V.useEffect(()=>{let J=dn.current;if(J){let pe=J.getBoundingClientRect().height;return mt(pe),w(xe=>[{toastId:d.id,height:pe,position:d.position},...xe]),()=>w(xe=>xe.filter(Lt=>Lt.toastId!==d.id))}},[w,d.id]),V.useLayoutEffect(()=>{if(!z)return;let J=dn.current,pe=J.style.height;J.style.height="auto";let xe=J.getBoundingClientRect().height;J.style.height=pe,mt(xe),w(Lt=>Lt.find(Ft=>Ft.toastId===d.id)?Lt.map(Ft=>Ft.toastId===d.id?{...Ft,height:xe}:Ft):[{toastId:d.id,height:xe,position:d.position},...Lt])},[z,d.title,d.description,w,d.id]);let Tn=V.useCallback(()=>{se(!0),Ye(Hr.current),w(J=>J.filter(pe=>pe.toastId!==d.id)),setTimeout(()=>{P(d)},qC)},[d,P,w,Hr]);V.useEffect(()=>{if(d.promise&&Xe==="loading"||d.duration===1/0||d.type==="loading")return;let J;return k||g||M&&sf?(()=>{if(rf.current{var pe;(pe=d.onAutoClose)==null||pe.call(d,d),Tn()},pr.current)),()=>clearTimeout(J)},[k,g,d,Xe,M,sf,Tn]),V.useEffect(()=>{d.delete&&Tn()},[Tn,d.delete]);function ew(){var J,pe,xe;return E!=null&&E.loading?V.createElement("div",{className:zt(O==null?void 0:O.loader,(J=d==null?void 0:d.classNames)==null?void 0:J.loader,"sonner-loader"),"data-visible":Xe==="loading"},E.loading):X?V.createElement("div",{className:zt(O==null?void 0:O.loader,(pe=d==null?void 0:d.classNames)==null?void 0:pe.loader,"sonner-loader"),"data-visible":Xe==="loading"},X):V.createElement(MC,{className:zt(O==null?void 0:O.loader,(xe=d==null?void 0:d.classNames)==null?void 0:xe.loader),visible:Xe==="loading"})}return V.createElement("li",{tabIndex:0,ref:dn,className:zt($,gl,O==null?void 0:O.toast,(t=d==null?void 0:d.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[Xe],(n=d==null?void 0:d.classNames)==null?void 0:n[Xe]),"data-sonner-toast":"","data-rich-colors":(r=d.richColors)!=null?r:R,"data-styled":!(d.jsx||d.unstyled||C),"data-mounted":z,"data-promise":!!d.promise,"data-swiped":Le,"data-removed":ee,"data-visible":ml,"data-y-position":q0,"data-x-position":Z0,"data-index":x,"data-front":as,"data-swiping":ae,"data-dismissible":Rn,"data-type":Xe,"data-invert":J0,"data-swipe-out":me,"data-swipe-direction":D,"data-expanded":!!(k||A&&z),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${ee?Ke:Hr.current}px`,"--initial-height":A?"auto":`${ot}px`,...F,...d.style},onDragEnd:()=>{fe(!1),I(null),Gr.current=null},onPointerDown:J=>{vl||!Rn||(ss.current=new Date,Ye(Hr.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(fe(!0),Gr.current={x:J.clientX,y:J.clientY}))},onPointerUp:()=>{var J,pe,xe,Lt;if(me||!Rn)return;Gr.current=null;let Ft=Number(((J=dn.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jn=Number(((pe=dn.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gr=new Date().getTime()-((xe=ss.current)==null?void 0:xe.getTime()),_t=T==="x"?Ft:jn,Mn=Math.abs(_t)/gr;if(Math.abs(_t)>=XC||Mn>.11){Ye(Hr.current),(Lt=d.onDismiss)==null||Lt.call(d,d),U(T==="x"?Ft>0?"right":"left":jn>0?"down":"up"),Tn(),ne(!0),Ve(!1);return}fe(!1),I(null)},onPointerMove:J=>{var pe,xe,Lt,Ft;if(!Gr.current||!Rn||((pe=window.getSelection())==null?void 0:pe.toString().length)>0)return;let jn=J.clientY-Gr.current.y,gr=J.clientX-Gr.current.x,_t=(xe=e.swipeDirections)!=null?xe:ZC(q);!T&&(Math.abs(gr)>1||Math.abs(jn)>1)&&I(Math.abs(gr)>Math.abs(jn)?"x":"y");let Mn={x:0,y:0};T==="y"?(_t.includes("top")||_t.includes("bottom"))&&(_t.includes("top")&&jn<0||_t.includes("bottom")&&jn>0)&&(Mn.y=jn):T==="x"&&(_t.includes("left")||_t.includes("right"))&&(_t.includes("left")&&gr<0||_t.includes("right")&&gr>0)&&(Mn.x=gr),(Math.abs(Mn.x)>0||Math.abs(Mn.y)>0)&&Ve(!0),(Lt=dn.current)==null||Lt.style.setProperty("--swipe-amount-x",`${Mn.x}px`),(Ft=dn.current)==null||Ft.style.setProperty("--swipe-amount-y",`${Mn.y}px`)}},Ko&&!d.jsx?V.createElement("button",{"aria-label":b,"data-disabled":vl,"data-close-button":!0,onClick:vl||!Rn?()=>{}:()=>{var J;Tn(),(J=d.onDismiss)==null||J.call(d,d)},className:zt(O==null?void 0:O.closeButton,(o=d==null?void 0:d.classNames)==null?void 0:o.closeButton)},(i=E==null?void 0:E.close)!=null?i:FC):null,d.jsx||p.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:V.createElement(V.Fragment,null,Xe||d.icon||d.promise?V.createElement("div",{"data-icon":"",className:zt(O==null?void 0:O.icon,(s=d==null?void 0:d.classNames)==null?void 0:s.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||ew():null,d.type!=="loading"?d.icon||(E==null?void 0:E[Xe])||TC(Xe):null):null,V.createElement("div",{"data-content":"",className:zt(O==null?void 0:O.content,(a=d==null?void 0:d.classNames)==null?void 0:a.content)},V.createElement("div",{"data-title":"",className:zt(O==null?void 0:O.title,(l=d==null?void 0:d.classNames)==null?void 0:l.title)},typeof d.title=="function"?d.title():d.title),d.description?V.createElement("div",{"data-description":"",className:zt(H,ls,O==null?void 0:O.description,(c=d==null?void 0:d.classNames)==null?void 0:c.description)},typeof d.description=="function"?d.description():d.description):null),p.isValidElement(d.cancel)?d.cancel:d.cancel&&js(d.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||L,onClick:J=>{var pe,xe;js(d.cancel)&&Rn&&((xe=(pe=d.cancel).onClick)==null||xe.call(pe,J),Tn())},className:zt(O==null?void 0:O.cancelButton,(h=d==null?void 0:d.classNames)==null?void 0:h.cancelButton)},d.cancel.label):null,p.isValidElement(d.action)?d.action:d.action&&js(d.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||W,onClick:J=>{var pe,xe;js(d.action)&&((xe=(pe=d.action).onClick)==null||xe.call(pe,J),!J.defaultPrevented&&Tn())},className:zt(O==null?void 0:O.actionButton,(f=d==null?void 0:d.classNames)==null?void 0:f.actionButton)},d.action.label):null))};function Mh(){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 eS(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",a=i?QC:GC;function l(c){["top","right","bottom","left"].forEach(h=>{n[`${s}-${h}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var tS=p.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:a,offset:l,mobileOffset:c,theme:h="light",richColors:f,duration:m,style:d,visibleToasts:C=HC,toastOptions:g,dir:w=Mh(),gap:v=YC,loadingIcon:y,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[P,R]=V.useState([]),j=V.useMemo(()=>Array.from(new Set([r].concat(P.filter(M=>M.position).map(M=>M.position)))),[P,r]),[F,L]=V.useState([]),[W,$]=V.useState(!1),[H,B]=V.useState(!1),[q,K]=V.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=V.useRef(null),A=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=V.useRef(null),E=V.useRef(!1),b=V.useCallback(M=>{R(T=>{var I;return(I=T.find(D=>D.id===M.id))!=null&&I.delete||st.dismiss(M.id),T.filter(({id:D})=>D!==M.id)})},[]);return V.useEffect(()=>st.subscribe(M=>{if(M.dismiss){R(T=>T.map(I=>I.id===M.id?{...I,delete:!0}:I));return}setTimeout(()=>{Wg.flushSync(()=>{R(T=>{let I=T.findIndex(D=>D.id===M.id);return I!==-1?[...T.slice(0,I),{...T[I],...M},...T.slice(I+1)]:[M,...T]})})})}),[]),V.useEffect(()=>{if(h!=="system"){K(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:T})=>{K(T?"dark":"light")})}catch{M.addListener(({matches:I})=>{try{K(I?"dark":"light")}catch(D){console.error(D)}})}},[h]),V.useEffect(()=>{P.length<=1&&$(!1)},[P]),V.useEffect(()=>{let M=T=>{var I,D;o.every(U=>T[U]||T.code===U)&&($(!0),(I=X.current)==null||I.focus()),T.code==="Escape"&&(document.activeElement===X.current||(D=X.current)!=null&&D.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[o]),V.useEffect(()=>{if(X.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,E.current=!1)}},[X.current]),V.createElement("section",{ref:t,"aria-label":`${S} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((M,T)=>{var I;let[D,U]=M.split("-");return P.length?V.createElement("ol",{key:M,dir:w==="auto"?Mh():w,tabIndex:-1,ref:X,className:a,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":D,"data-lifted":W&&P.length>1&&!i,"data-x-position":U,style:{"--front-toast-height":`${((I=F[0])==null?void 0:I.height)||0}px`,"--width":`${KC}px`,"--gap":`${v}px`,...d,...eS(l,c)},onBlur:z=>{E.current&&!z.currentTarget.contains(z.relatedTarget)&&(E.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||E.current||(E.current=!0,O.current=z.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{H||$(!1)},onDragEnd:()=>$(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},P.filter(z=>!z.position&&T===0||z.position===M).map((z,Y)=>{var ee,se;return V.createElement(JC,{key:z.id,icons:x,index:Y,toast:z,defaultRichColors:f,duration:(ee=g==null?void 0:g.duration)!=null?ee:m,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:C,closeButton:(se=g==null?void 0:g.closeButton)!=null?se:s,interacting:H,position:M,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:b,toasts:P.filter(ae=>ae.position==z.position),heights:F.filter(ae=>ae.position==z.position),setHeights:L,expandByDefault:i,gap:v,loadingIcon:y,expanded:W,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const nS=({...e})=>{const{theme:t="system"}=RC();return u.jsx(tS,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var rS=Du[" useId ".trim().toString()]||(()=>{}),oS=0;function qs(e){const[t,n]=p.useState(rS());return Ot(()=>{n(r=>r??String(oS++))},[e]),t?`radix-${t}`:""}const iS=["top","right","bottom","left"],cr=Math.min,vt=Math.max,Pa=Math.round,Ms=Math.floor,ln=e=>({x:e,y:e}),sS={left:"right",right:"left",bottom:"top",top:"bottom"},aS={start:"end",end:"start"};function su(e,t,n){return vt(e,cr(t,n))}function En(e,t){return typeof e=="function"?e(t):e}function kn(e){return e.split("-")[0]}function Go(e){return e.split("-")[1]}function Ld(e){return e==="x"?"y":"x"}function Fd(e){return e==="y"?"height":"width"}const lS=new Set(["top","bottom"]);function on(e){return lS.has(kn(e))?"y":"x"}function _d(e){return Ld(on(e))}function cS(e,t,n){n===void 0&&(n=!1);const r=Go(e),o=_d(e),i=Fd(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ra(s)),[s,Ra(s)]}function uS(e){const t=Ra(e);return[au(e),t,au(t)]}function au(e){return e.replace(/start|end/g,t=>aS[t])}const Ah=["left","right"],Ih=["right","left"],dS=["top","bottom"],fS=["bottom","top"];function hS(e,t,n){switch(e){case"top":case"bottom":return n?t?Ih:Ah:t?Ah:Ih;case"left":case"right":return t?dS:fS;default:return[]}}function pS(e,t,n,r){const o=Go(e);let i=hS(kn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(au)))),i}function Ra(e){return e.replace(/left|right|bottom|top/g,t=>sS[t])}function mS(e){return{top:0,right:0,bottom:0,left:0,...e}}function Iv(e){return typeof e!="number"?mS(e):{top:e,right:e,bottom:e,left:e}}function Ta(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Oh(e,t,n){let{reference:r,floating:o}=e;const i=on(t),s=_d(t),a=Fd(s),l=kn(t),c=i==="y",h=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:h,y:r.y-o.height};break;case"bottom":d={x:h,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Go(t)){case"start":d[s]-=m*(n&&c?-1:1);break;case"end":d[s]+=m*(n&&c?-1:1);break}return d}const gS=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:f}=Oh(c,r,l),m=r,d={},C=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:h=0}=En(e,t)||{};if(c==null)return{};const f=Iv(h),m={x:n,y:r},d=_d(o),C=Fd(d),g=await s.getDimensions(c),w=d==="y",v=w?"top":"left",y=w?"bottom":"right",x=w?"clientHeight":"clientWidth",S=i.reference[C]+i.reference[d]-m[d]-i.floating[C],k=m[d]-i.reference[d],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let R=P?P[x]:0;(!R||!await(s.isElement==null?void 0:s.isElement(P)))&&(R=a.floating[x]||i.floating[C]);const j=S/2-k/2,F=R/2-g[C]/2-1,L=cr(f[v],F),W=cr(f[y],F),$=L,H=R-g[C]-W,B=R/2-g[C]/2+j,q=su($,B,H),K=!l.arrow&&Go(o)!=null&&B!==q&&i.reference[C]/2-(B<$?L:W)-g[C]/2<0,X=K?B<$?B-$:B-H:0;return{[d]:m[d]+X,data:{[d]:q,centerOffset:B-q-X,...K&&{alignmentOffset:X}},reset:K}}}),yS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:g=!0,...w}=En(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=kn(o),y=on(a),x=kn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=m||(x||!g?[Ra(a)]:uS(a)),P=C!=="none";!m&&P&&k.push(...pS(a,g,C,S));const R=[a,...k],j=await $i(t,w),F=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&F.push(j[v]),f){const B=cS(o,s,S);F.push(j[B[0]],j[B[1]])}if(L=[...L,{placement:o,overflows:F}],!F.every(B=>B<=0)){var W,$;const B=(((W=i.flip)==null?void 0:W.index)||0)+1,q=R[B];if(q&&(!(f==="alignment"?y!==on(q):!1)||L.every(A=>A.overflows[0]>0&&on(A.placement)===y)))return{data:{index:B,overflows:L},reset:{placement:q}};let K=($=L.filter(X=>X.overflows[0]<=0).sort((X,A)=>X.overflows[1]-A.overflows[1])[0])==null?void 0:$.placement;if(!K)switch(d){case"bestFit":{var H;const X=(H=L.filter(A=>{if(P){const O=on(A.placement);return O===y||O==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(O=>O>0).reduce((O,E)=>O+E,0)]).sort((A,O)=>A[1]-O[1])[0])==null?void 0:H[0];X&&(K=X);break}case"initialPlacement":K=a;break}if(o!==K)return{reset:{placement:K}}}return{}}}};function Lh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fh(e){return iS.some(t=>e[t]>=0)}const wS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=En(e,t);switch(r){case"referenceHidden":{const i=await $i(t,{...o,elementContext:"reference"}),s=Lh(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Fh(s)}}}case"escaped":{const i=await $i(t,{...o,altBoundary:!0}),s=Lh(i,n.floating);return{data:{escapedOffsets:s,escaped:Fh(s)}}}default:return{}}}}},Ov=new Set(["left","top"]);async function xS(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=kn(n),a=Go(n),l=on(n)==="y",c=Ov.has(s)?-1:1,h=i&&l?-1:1,f=En(t,e);let{mainAxis:m,crossAxis:d,alignmentAxis:C}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof C=="number"&&(d=a==="end"?C*-1:C),l?{x:d*h,y:m*c}:{x:m*c,y:d*h}}const bS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await xS(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},CS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:w=>{let{x:v,y}=w;return{x:v,y}}},...l}=En(e,t),c={x:n,y:r},h=await $i(t,l),f=on(kn(o)),m=Ld(f);let d=c[m],C=c[f];if(i){const w=m==="y"?"top":"left",v=m==="y"?"bottom":"right",y=d+h[w],x=d-h[v];d=su(y,d,x)}if(s){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=C+h[w],x=C-h[v];C=su(y,C,x)}const g=a.fn({...t,[m]:d,[f]:C});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:i,[f]:s}}}}}},SS=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=En(e,t),h={x:n,y:r},f=on(o),m=Ld(f);let d=h[m],C=h[f];const g=En(a,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=m==="y"?"height":"width",S=i.reference[m]-i.floating[x]+w.mainAxis,k=i.reference[m]+i.reference[x]-w.mainAxis;dk&&(d=k)}if(c){var v,y;const x=m==="y"?"width":"height",S=Ov.has(kn(o)),k=i.reference[f]-i.floating[x]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:w.crossAxis),P=i.reference[f]+i.reference[x]+(S?0:((y=s.offset)==null?void 0:y[f])||0)-(S?w.crossAxis:0);CP&&(C=P)}return{[m]:d,[f]:C}}}},ES=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=En(e,t),h=await $i(t,c),f=kn(o),m=Go(o),d=on(o)==="y",{width:C,height:g}=i.floating;let w,v;f==="top"||f==="bottom"?(w=f,v=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,w=m==="end"?"top":"bottom");const y=g-h.top-h.bottom,x=C-h.left-h.right,S=cr(g-h[w],y),k=cr(C-h[v],x),P=!t.middlewareData.shift;let R=S,j=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=y),P&&!m){const L=vt(h.left,0),W=vt(h.right,0),$=vt(h.top,0),H=vt(h.bottom,0);d?j=C-2*(L!==0||W!==0?L+W:vt(h.left,h.right)):R=g-2*($!==0||H!==0?$+H:vt(h.top,h.bottom))}await l({...t,availableWidth:j,availableHeight:R});const F=await s.getDimensions(a.floating);return C!==F.width||g!==F.height?{reset:{rects:!0}}:{}}}};function rl(){return typeof window<"u"}function Qo(e){return Lv(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function un(e){var t;return(t=(Lv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lv(e){return rl()?e instanceof Node||e instanceof xt(e).Node:!1}function Kt(e){return rl()?e instanceof Element||e instanceof xt(e).Element:!1}function cn(e){return rl()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function _h(e){return!rl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const kS=new Set(["inline","contents"]);function ns(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!kS.has(o)}const NS=new Set(["table","td","th"]);function PS(e){return NS.has(Qo(e))}const RS=[":popover-open",":modal"];function ol(e){return RS.some(t=>{try{return e.matches(t)}catch{return!1}})}const TS=["transform","translate","scale","rotate","perspective"],jS=["transform","translate","scale","rotate","perspective","filter"],MS=["paint","layout","strict","content"];function Dd(e){const t=zd(),n=Kt(e)?Yt(e):e;return TS.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)||jS.some(r=>(n.willChange||"").includes(r))||MS.some(r=>(n.contain||"").includes(r))}function AS(e){let t=ur(e);for(;cn(t)&&!zo(t);){if(Dd(t))return t;if(ol(t))return null;t=ur(t)}return null}function zd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const IS=new Set(["html","body","#document"]);function zo(e){return IS.has(Qo(e))}function Yt(e){return xt(e).getComputedStyle(e)}function il(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ur(e){if(Qo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_h(e)&&e.host||un(e);return _h(t)?t.host:t}function Fv(e){const t=ur(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&ns(t)?t:Fv(t)}function Bi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Fv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=xt(o);if(i){const a=lu(s);return t.concat(s,s.visualViewport||[],ns(o)?o:[],a&&n?Bi(a):[])}return t.concat(o,Bi(o,[],n))}function lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _v(e){const t=Yt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Pa(n)!==i||Pa(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function $d(e){return Kt(e)?e:e.contextElement}function vo(e){const t=$d(e);if(!cn(t))return ln(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_v(t);let s=(i?Pa(n.width):n.width)/r,a=(i?Pa(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const OS=ln(0);function Dv(e){const t=xt(e);return!zd()||!t.visualViewport?OS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xt(e)?!1:t}function zr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=$d(e);let s=ln(1);t&&(r?Kt(r)&&(s=vo(r)):s=vo(e));const a=LS(i,n,r)?Dv(i):ln(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,h=o.width/s.x,f=o.height/s.y;if(i){const m=xt(i),d=r&&Kt(r)?xt(r):r;let C=m,g=lu(C);for(;g&&r&&d!==C;){const w=vo(g),v=g.getBoundingClientRect(),y=Yt(g),x=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*w.x,S=v.top+(g.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,c*=w.y,h*=w.x,f*=w.y,l+=x,c+=S,C=xt(g),g=lu(C)}}return Ta({width:h,height:f,x:l,y:c})}function Bd(e,t){const n=il(e).scrollLeft;return t?t.left+n:zr(un(e)).left+n}function zv(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Bd(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function FS(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=un(r),a=t?ol(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ln(1);const h=ln(0),f=cn(r);if((f||!f&&!i)&&((Qo(r)!=="body"||ns(s))&&(l=il(r)),cn(r))){const d=zr(r);c=vo(r),h.x=d.x+r.clientLeft,h.y=d.y+r.clientTop}const m=s&&!f&&!i?zv(s,l,!0):ln(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+h.x+m.x,y:n.y*c.y-l.scrollTop*c.y+h.y+m.y}}function _S(e){return Array.from(e.getClientRects())}function DS(e){const t=un(e),n=il(e),r=e.ownerDocument.body,o=vt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Bd(e);const a=-n.scrollTop;return Yt(r).direction==="rtl"&&(s+=vt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function zS(e,t){const n=xt(e),r=un(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=zd();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}const $S=new Set(["absolute","fixed"]);function BS(e,t){const n=zr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?vo(e):ln(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Dh(e,t,n){let r;if(t==="viewport")r=zS(e,n);else if(t==="document")r=DS(un(e));else if(Kt(t))r=BS(t,n);else{const o=Dv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ta(r)}function $v(e,t){const n=ur(e);return n===t||!Kt(n)||zo(n)?!1:Yt(n).position==="fixed"||$v(n,t)}function VS(e,t){const n=t.get(e);if(n)return n;let r=Bi(e,[],!1).filter(a=>Kt(a)&&Qo(a)!=="body"),o=null;const i=Yt(e).position==="fixed";let s=i?ur(e):e;for(;Kt(s)&&!zo(s);){const a=Yt(s),l=Dd(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&$S.has(o.position)||ns(s)&&!l&&$v(e,s))?r=r.filter(h=>h!==s):o=a,s=ur(s)}return t.set(e,r),r}function US(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?ol(t)?[]:VS(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,h)=>{const f=Dh(t,h,o);return c.top=vt(f.top,c.top),c.right=cr(f.right,c.right),c.bottom=cr(f.bottom,c.bottom),c.left=vt(f.left,c.left),c},Dh(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function WS(e){const{width:t,height:n}=_v(e);return{width:t,height:n}}function HS(e,t,n){const r=cn(t),o=un(t),i=n==="fixed",s=zr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ln(0);function c(){l.x=Bd(o)}if(r||!r&&!i)if((Qo(t)!=="body"||ns(o))&&(a=il(t)),r){const d=zr(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const h=o&&!r&&!i?zv(o,a):ln(0),f=s.left+a.scrollLeft-l.x-h.x,m=s.top+a.scrollTop-l.y-h.y;return{x:f,y:m,width:s.width,height:s.height}}function Yl(e){return Yt(e).position==="static"}function zh(e,t){if(!cn(e)||Yt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return un(e)===n&&(n=n.ownerDocument.body),n}function Bv(e,t){const n=xt(e);if(ol(e))return n;if(!cn(e)){let o=ur(e);for(;o&&!zo(o);){if(Kt(o)&&!Yl(o))return o;o=ur(o)}return n}let r=zh(e,t);for(;r&&PS(r)&&Yl(r);)r=zh(r,t);return r&&zo(r)&&Yl(r)&&!Dd(r)?n:r||AS(e)||n}const GS=async function(e){const t=this.getOffsetParent||Bv,n=this.getDimensions,r=await n(e.floating);return{reference:HS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function QS(e){return Yt(e).direction==="rtl"}const KS={convertOffsetParentRelativeRectToViewportRelativeRect:FS,getDocumentElement:un,getClippingRect:US,getOffsetParent:Bv,getElementRects:GS,getClientRects:_S,getDimensions:WS,getScale:vo,isElement:Kt,isRTL:QS};function Vv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YS(e,t){let n=null,r;const o=un(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:h,top:f,width:m,height:d}=c;if(a||t(),!m||!d)return;const C=Ms(f),g=Ms(o.clientWidth-(h+m)),w=Ms(o.clientHeight-(f+d)),v=Ms(h),x={rootMargin:-C+"px "+-g+"px "+-w+"px "+-v+"px",threshold:vt(0,cr(1,l))||1};let S=!0;function k(P){const R=P[0].intersectionRatio;if(R!==l){if(!S)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Vv(c,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(e)}return s(!0),i}function XS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=$d(e),h=o||i?[...c?Bi(c):[],...Bi(t)]:[];h.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const f=c&&a?YS(c,n):null;let m=-1,d=null;s&&(d=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let C,g=l?zr(e):null;l&&w();function w(){const v=zr(e);g&&!Vv(g,v)&&n(),g=v,C=requestAnimationFrame(w)}return n(),()=>{var v;h.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,l&&cancelAnimationFrame(C)}}const qS=bS,ZS=CS,JS=yS,eE=ES,tE=wS,$h=vS,nE=SS,rE=(e,t,n)=>{const r=new Map,o={platform:KS,...n},i={...o.platform,_c:r};return gS(e,t,{...o,platform:i})};var oE=typeof document<"u",iE=function(){},Zs=oE?p.useLayoutEffect:iE;function ja(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,o;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(!ja(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ja(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bh(e,t){const n=Uv(e);return Math.round(t*n)/n}function Xl(e){const t=p.useRef(e);return Zs(()=>{t.current=e}),t}function sE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[h,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,d]=p.useState(r);ja(m,r)||d(r);const[C,g]=p.useState(null),[w,v]=p.useState(null),y=p.useCallback(A=>{A!==P.current&&(P.current=A,g(A))},[]),x=p.useCallback(A=>{A!==R.current&&(R.current=A,v(A))},[]),S=i||C,k=s||w,P=p.useRef(null),R=p.useRef(null),j=p.useRef(h),F=l!=null,L=Xl(l),W=Xl(o),$=Xl(c),H=p.useCallback(()=>{if(!P.current||!R.current)return;const A={placement:t,strategy:n,middleware:m};W.current&&(A.platform=W.current),rE(P.current,R.current,A).then(O=>{const E={...O,isPositioned:$.current!==!1};B.current&&!ja(j.current,E)&&(j.current=E,Ji.flushSync(()=>{f(E)}))})},[m,t,n,W,$]);Zs(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[c]);const B=p.useRef(!1);Zs(()=>(B.current=!0,()=>{B.current=!1}),[]),Zs(()=>{if(S&&(P.current=S),k&&(R.current=k),S&&k){if(L.current)return L.current(S,k,H);H()}},[S,k,H,L,F]);const q=p.useMemo(()=>({reference:P,floating:R,setReference:y,setFloating:x}),[y,x]),K=p.useMemo(()=>({reference:S,floating:k}),[S,k]),X=p.useMemo(()=>{const A={position:n,left:0,top:0};if(!K.floating)return A;const O=Bh(K.floating,h.x),E=Bh(K.floating,h.y);return a?{...A,transform:"translate("+O+"px, "+E+"px)",...Uv(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:E}},[n,a,K.floating,h.x,h.y]);return p.useMemo(()=>({...h,update:H,refs:q,elements:K,floatingStyles:X}),[h,H,q,K,X])}const aE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?$h({element:r.current,padding:o}).fn(n):{}:r?$h({element:r,padding:o}).fn(n):{}}}},lE=(e,t)=>({...qS(e),options:[e,t]}),cE=(e,t)=>({...ZS(e),options:[e,t]}),uE=(e,t)=>({...nE(e),options:[e,t]}),dE=(e,t)=>({...JS(e),options:[e,t]}),fE=(e,t)=>({...eE(e),options:[e,t]}),hE=(e,t)=>({...tE(e),options:[e,t]}),pE=(e,t)=>({...aE(e),options:[e,t]});var mE="Arrow",Wv=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return u.jsx(de.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wv.displayName=mE;var gE=Wv;function Hv(e){const[t,n]=p.useState(void 0);return Ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Gv="Popper",[Qv,Kv]=Pn(Gv),[JP,Yv]=Qv(Gv),Xv="PopperAnchor",qv=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Yv(Xv,n),s=p.useRef(null),a=Oe(t,s);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:u.jsx(de.div,{...o,ref:a})});qv.displayName=Xv;var Vd="PopperContent",[vE,yE]=Qv(Vd),Zv=p.forwardRef((e,t)=>{var z,Y,ee,se,ae,fe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:d="optimized",onPlaced:C,...g}=e,w=Yv(Vd,n),[v,y]=p.useState(null),x=Oe(t,me=>y(me)),[S,k]=p.useState(null),P=Hv(S),R=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,F=r+(i!=="center"?"-"+i:""),L=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},W=Array.isArray(c)?c:[c],$=W.length>0,H={padding:L,boundary:W.filter(xE),altBoundary:$},{refs:B,floatingStyles:q,placement:K,isPositioned:X,middlewareData:A}=sE({strategy:"fixed",placement:F,whileElementsMounted:(...me)=>XS(...me,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[lE({mainAxis:o+j,alignmentAxis:s}),l&&cE({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?uE():void 0,...H}),l&&dE({...H}),fE({...H,apply:({elements:me,rects:ne,availableWidth:Le,availableHeight:Ve})=>{const{width:Ke,height:Ye}=ne.reference,ot=me.floating.style;ot.setProperty("--radix-popper-available-width",`${Le}px`),ot.setProperty("--radix-popper-available-height",`${Ve}px`),ot.setProperty("--radix-popper-anchor-width",`${Ke}px`),ot.setProperty("--radix-popper-anchor-height",`${Ye}px`)}}),S&&pE({element:S,padding:a}),bE({arrowWidth:R,arrowHeight:j}),m&&hE({strategy:"referenceHidden",...H})]}),[O,E]=ty(K),b=It(C);Ot(()=>{X&&(b==null||b())},[X,b]);const M=(z=A.arrow)==null?void 0:z.x,T=(Y=A.arrow)==null?void 0:Y.y,I=((ee=A.arrow)==null?void 0:ee.centerOffset)!==0,[D,U]=p.useState();return Ot(()=>{v&&U(window.getComputedStyle(v).zIndex)},[v]),u.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:X?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(se=A.transformOrigin)==null?void 0:se.x,(ae=A.transformOrigin)==null?void 0:ae.y].join(" "),...((fe=A.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(vE,{scope:n,placedSide:O,onArrowChange:k,arrowX:M,arrowY:T,shouldHideArrow:I,children:u.jsx(de.div,{"data-side":O,"data-align":E,...g,ref:x,style:{...g.style,animation:X?void 0:"none"}})})})});Zv.displayName=Vd;var Jv="PopperArrow",wE={top:"bottom",right:"left",bottom:"top",left:"right"},ey=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=yE(Jv,r),s=wE[i.placedSide];return u.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:u.jsx(gE,{...o,ref:n,style:{...o.style,display:"block"}})})});ey.displayName=Jv;function xE(e){return e!==null}var bE=e=>({name:"transformOrigin",options:e,fn(t){var w,v,y;const{placement:n,rects:r,middlewareData:o}=t,s=((w=o.arrow)==null?void 0:w.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,h]=ty(n),f={start:"0%",center:"50%",end:"100%"}[h],m=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,d=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let C="",g="";return c==="bottom"?(C=s?f:`${m}px`,g=`${-l}px`):c==="top"?(C=s?f:`${m}px`,g=`${r.floating.height+l}px`):c==="right"?(C=`${-l}px`,g=s?f:`${d}px`):c==="left"&&(C=`${r.floating.width+l}px`,g=s?f:`${d}px`),{data:{x:C,y:g}}}});function ty(e){const[t,n="center"]=e.split("-");return[t,n]}var CE=qv,SE=Zv,EE=ey,[sl,eR]=Pn("Tooltip",[Kv]),Ud=Kv(),ny="TooltipProvider",kE=700,Vh="tooltip.open",[NE,ry]=sl(ny),oy=e=>{const{__scopeTooltip:t,delayDuration:n=kE,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=p.useRef(!0),a=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(NE,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:p.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};oy.displayName=ny;var iy="Tooltip",[tR,al]=sl(iy),cu="TooltipTrigger",PE=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=al(cu,n),i=ry(cu,n),s=Ud(n),a=p.useRef(null),l=Oe(t,a,o.onTriggerChange),c=p.useRef(!1),h=p.useRef(!1),f=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(CE,{asChild:!0,...s,children:u.jsx(de.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:le(e.onPointerMove,m=>{m.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:le(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:le(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:le(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:le(e.onBlur,o.onClose),onClick:le(e.onClick,o.onClose)})})});PE.displayName=cu;var RE="TooltipPortal",[nR,TE]=sl(RE,{forceMount:void 0}),$o="TooltipContent",sy=p.forwardRef((e,t)=>{const n=TE($o,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=al($o,e.__scopeTooltip);return u.jsx(Wr,{present:r||s.open,children:s.disableHoverableContent?u.jsx(ay,{side:o,...i,ref:t}):u.jsx(jE,{side:o,...i,ref:t})})}),jE=p.forwardRef((e,t)=>{const n=al($o,e.__scopeTooltip),r=ry($o,e.__scopeTooltip),o=p.useRef(null),i=Oe(t,o),[s,a]=p.useState(null),{trigger:l,onClose:c}=n,h=o.current,{onPointerInTransitChange:f}=r,m=p.useCallback(()=>{a(null),f(!1)},[f]),d=p.useCallback((C,g)=>{const w=C.currentTarget,v={x:C.clientX,y:C.clientY},y=LE(v,w.getBoundingClientRect()),x=FE(v,y),S=_E(g.getBoundingClientRect()),k=zE([...x,...S]);a(k),f(!0)},[f]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(l&&h){const C=w=>d(w,h),g=w=>d(w,l);return l.addEventListener("pointerleave",C),h.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",C),h.removeEventListener("pointerleave",g)}}},[l,h,d,m]),p.useEffect(()=>{if(s){const C=g=>{const w=g.target,v={x:g.clientX,y:g.clientY},y=(l==null?void 0:l.contains(w))||(h==null?void 0:h.contains(w)),x=!DE(v,s);y?m():x&&(m(),c())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[l,h,s,c,m]),u.jsx(ay,{...e,ref:i})}),[ME,AE]=sl(iy,{isInside:!1}),IE=_1("TooltipContent"),ay=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=al($o,n),c=Ud(n),{onClose:h}=l;return p.useEffect(()=>(document.addEventListener(Vh,h),()=>document.removeEventListener(Vh,h)),[h]),p.useEffect(()=>{if(l.trigger){const f=m=>{const d=m.target;d!=null&&d.contains(l.trigger)&&h()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,h]),u.jsx(Za,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:h,children:u.jsxs(SE,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(IE,{children:r}),u.jsx(ME,{scope:n,isInside:!0,children:u.jsx(sb,{id:l.contentId,role:"tooltip",children:o||r})})]})})});sy.displayName=$o;var ly="TooltipArrow",OE=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ud(n);return AE(ly,n).isInside?null:u.jsx(EE,{...o,...r,ref:t})});OE.displayName=ly;function LE(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function FE(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 _E(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function DE(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=m>r&&n<(f-c)*(r-h)/(m-h)+c&&(o=!o)}return o}function zE(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),$E(t)}function $E(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}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 BE=oy,cy=sy;const VE=BE,UE=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(cy,{ref:r,sideOffset:t,className:Pe("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}));UE.displayName=cy.displayName;var rs=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(){}},$r=typeof window>"u"||"Deno"in globalThis;function at(){}function WE(e,t){return typeof e=="function"?e(t):e}function uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function uy(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sr(e,t){return typeof e=="function"?e(t):e}function Nt(e,t){return typeof e=="function"?e(t):e}function Uh(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==Wd(s,t.options))return!1}else if(!Ui(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function Wh(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Vi(t.options.mutationKey)!==Vi(i))return!1}else if(!Ui(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Wd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Vi)(e)}function Vi(e){return JSON.stringify(e,(t,n)=>fu(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Ui(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ui(e[n],t[n])):!1}function dy(e,t){if(e===t)return e;const n=Hh(e)&&Hh(t);if(n||fu(e)&&fu(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let h=0;h{setTimeout(t,e)})}function hu(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dy(e,t):t}function GE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Hd=Symbol();function fy(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function KE(e,t){return typeof e=="function"?e(...t):!!e}var Cr,Bn,xo,Cp,YE=(Cp=class extends rs{constructor(){super();Z(this,Cr);Z(this,Bn);Z(this,xo);Q(this,xo,t=>{if(!$r&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,Bn)||this.setEventListener(N(this,xo))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Bn))==null||t.call(this),Q(this,Bn,void 0))}setEventListener(t){var n;Q(this,xo,t),(n=N(this,Bn))==null||n.call(this),Q(this,Bn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){N(this,Cr)!==t&&(Q(this,Cr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof N(this,Cr)=="boolean"?N(this,Cr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cr=new WeakMap,Bn=new WeakMap,xo=new WeakMap,Cp),Gd=new YE,bo,Vn,Co,Sp,XE=(Sp=class extends rs{constructor(){super();Z(this,bo,!0);Z(this,Vn);Z(this,Co);Q(this,Co,t=>{if(!$r&&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(){N(this,Vn)||this.setEventListener(N(this,Co))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Vn))==null||t.call(this),Q(this,Vn,void 0))}setEventListener(t){var n;Q(this,Co,t),(n=N(this,Vn))==null||n.call(this),Q(this,Vn,t(this.setOnline.bind(this)))}setOnline(t){N(this,bo)!==t&&(Q(this,bo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return N(this,bo)}},bo=new WeakMap,Vn=new WeakMap,Co=new WeakMap,Sp),Ma=new XE;function pu(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function qE(e){return Math.min(1e3*2**e,3e4)}function hy(e){return(e??"online")==="online"?Ma.isOnline():!0}var py=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ql(e){return e instanceof py}function my(e){let t=!1,n=0,r=!1,o;const i=pu(),s=g=>{var w;r||(m(new py(g)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Gd.isFocused()&&(e.networkMode==="always"||Ma.isOnline())&&e.canRun(),h=()=>hy(e.networkMode)&&e.canRun(),f=g=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,g),o==null||o(),i.resolve(g))},m=g=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,g),o==null||o(),i.reject(g))},d=()=>new Promise(g=>{var w;o=v=>{(r||c())&&g(v)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),C=()=>{if(r)return;let g;const w=n===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(f).catch(v=>{var P;if(r)return;const y=e.retry??($r?0:3),x=e.retryDelay??qE,S=typeof x=="function"?x(n,v):x,k=y===!0||typeof y=="number"&&nc()?void 0:d()).then(()=>{t?m(v):C()})})};return{promise:i,cancel:s,continue:()=>(o==null||o(),i),cancelRetry:a,continueRetry:l,canStart:h,start:()=>(h()?C():d().then(C),i)}}var ZE=e=>setTimeout(e,0);function JE(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=ZE;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var ze=JE(),Sr,Ep,gy=(Ep=class{constructor(){Z(this,Sr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uu(this.gcTime)&&Q(this,Sr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($r?1/0:5*60*1e3))}clearGcTimeout(){N(this,Sr)&&(clearTimeout(N(this,Sr)),Q(this,Sr,void 0))}},Sr=new WeakMap,Ep),So,Er,kt,kr,He,Wi,Nr,Bt,hn,kp,ek=(kp=class extends gy{constructor(t){super();Z(this,Bt);Z(this,So);Z(this,Er);Z(this,kt);Z(this,kr);Z(this,He);Z(this,Wi);Z(this,Nr);Q(this,Nr,!1),Q(this,Wi,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,kr,t.client),Q(this,kt,N(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,So,tk(this.options)),this.state=t.state??N(this,So),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,He))==null?void 0:t.promise}setOptions(t){this.options={...N(this,Wi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,kt).remove(this)}setData(t,n){const r=hu(this.state.data,t,this.options);return oe(this,Bt,hn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){oe(this,Bt,hn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=N(this,He))==null?void 0:r.promise;return(o=N(this,He))==null||o.cancel(t),n?n.then(at).catch(at):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,So))}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sr(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:!uy(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,He))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,He))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,kt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(N(this,He)&&(N(this,Nr)?N(this,He).cancel({revert:!0}):N(this,He).cancelRetry()),this.scheduleGc()),N(this,kt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||oe(this,Bt,hn).call(this,{type:"invalidate"})}fetch(t,n){var c,h,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,He))return N(this,He).continueRetry(),N(this,He).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(d=>d.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(Q(this,Nr,!0),r.signal)})},i=()=>{const m=fy(this.options,n),C=(()=>{const g={client:N(this,kr),queryKey:this.queryKey,meta:this.meta};return o(g),g})();return Q(this,Nr,!1),this.options.persister?this.options.persister(m,C,this):m(C)},a=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,kr),state:this.state,fetchFn:i};return o(m),m})();(c=this.options.behavior)==null||c.onFetch(a,this),Q(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=a.fetchOptions)==null?void 0:h.meta))&&oe(this,Bt,hn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=m=>{var d,C,g,w;ql(m)&&m.silent||oe(this,Bt,hn).call(this,{type:"error",error:m}),ql(m)||((C=(d=N(this,kt).config).onError)==null||C.call(d,m,this),(w=(g=N(this,kt).config).onSettled)==null||w.call(g,this.state.data,m,this)),this.scheduleGc()};return Q(this,He,my({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var d,C,g,w;if(m===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(v){l(v);return}(C=(d=N(this,kt).config).onSuccess)==null||C.call(d,m,this),(w=(g=N(this,kt).config).onSettled)==null||w.call(g,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,d)=>{oe(this,Bt,hn).call(this,{type:"failed",failureCount:m,error:d})},onPause:()=>{oe(this,Bt,hn).call(this,{type:"pause"})},onContinue:()=>{oe(this,Bt,hn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),N(this,He).start()}},So=new WeakMap,Er=new WeakMap,kt=new WeakMap,kr=new WeakMap,He=new WeakMap,Wi=new WeakMap,Nr=new WeakMap,Bt=new WeakSet,hn=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,...vy(r.data,this.options),fetchMeta:t.meta??null};case"success":return Q(this,Er,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 o=t.error;return ql(o)&&o.revert&&N(this,Er)?{...N(this,Er),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),N(this,kt).notify({query:this,type:"updated",action:t})})},kp);function vy(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tk(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 Jt,Np,nk=(Np=class extends rs{constructor(t={}){super();Z(this,Jt);this.config=t,Q(this,Jt,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Wd(o,n);let s=this.get(i);return s||(s=new ek({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){N(this,Jt).has(t.queryHash)||(N(this,Jt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=N(this,Jt).get(t.queryHash);n&&(t.destroy(),n===t&&N(this,Jt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,Jt).get(t)}getAll(){return[...N(this,Jt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Uh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Uh(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jt=new WeakMap,Np),en,qe,Pr,tn,Ln,Pp,rk=(Pp=class extends gy{constructor(t){super();Z(this,tn);Z(this,en);Z(this,qe);Z(this,Pr);this.mutationId=t.mutationId,Q(this,qe,t.mutationCache),Q(this,en,[]),this.state=t.state||ok(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,en).includes(t)||(N(this,en).push(t),this.clearGcTimeout(),N(this,qe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,en,N(this,en).filter(n=>n!==t)),this.scheduleGc(),N(this,qe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,en).length||(this.state.status==="pending"?this.scheduleGc():N(this,qe).remove(this))}continue(){var t;return((t=N(this,Pr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,a,l,c,h,f,m,d,C,g,w,v,y,x,S,k,P,R,j;const n=()=>{oe(this,tn,Ln).call(this,{type:"continue"})};Q(this,Pr,my({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(F,L)=>{oe(this,tn,Ln).call(this,{type:"failed",failureCount:F,error:L})},onPause:()=>{oe(this,tn,Ln).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,qe).canRun(this)}));const r=this.state.status==="pending",o=!N(this,Pr).canStart();try{if(r)n();else{oe(this,tn,Ln).call(this,{type:"pending",variables:t,isPaused:o}),await((s=(i=N(this,qe).config).onMutate)==null?void 0:s.call(i,t,this));const L=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));L!==this.state.context&&oe(this,tn,Ln).call(this,{type:"pending",context:L,variables:t,isPaused:o})}const F=await N(this,Pr).start();return await((h=(c=N(this,qe).config).onSuccess)==null?void 0:h.call(c,F,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,F,t,this.state.context)),await((C=(d=N(this,qe).config).onSettled)==null?void 0:C.call(d,F,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,F,null,t,this.state.context)),oe(this,tn,Ln).call(this,{type:"success",data:F}),F}catch(F){try{throw await((y=(v=N(this,qe).config).onError)==null?void 0:y.call(v,F,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,F,t,this.state.context)),await((P=(k=N(this,qe).config).onSettled)==null?void 0:P.call(k,void 0,F,this.state.variables,this.state.context,this)),await((j=(R=this.options).onSettled)==null?void 0:j.call(R,void 0,F,t,this.state.context)),F}finally{oe(this,tn,Ln).call(this,{type:"error",error:F})}}finally{N(this,qe).runNext(this)}}},en=new WeakMap,qe=new WeakMap,Pr=new WeakMap,tn=new WeakSet,Ln=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),ze.batch(()=>{N(this,en).forEach(r=>{r.onMutationUpdate(t)}),N(this,qe).notify({mutation:this,type:"updated",action:t})})},Pp);function ok(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gn,Vt,Hi,Rp,ik=(Rp=class extends rs{constructor(t={}){super();Z(this,gn);Z(this,Vt);Z(this,Hi);this.config=t,Q(this,gn,new Set),Q(this,Vt,new Map),Q(this,Hi,0)}build(t,n,r){const o=new rk({mutationCache:this,mutationId:++us(this,Hi)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){N(this,gn).add(t);const n=As(t);if(typeof n=="string"){const r=N(this,Vt).get(n);r?r.push(t):N(this,Vt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,gn).delete(t)){const n=As(t);if(typeof n=="string"){const r=N(this,Vt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&N(this,Vt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=As(t);if(typeof n=="string"){const r=N(this,Vt).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=As(t);if(typeof n=="string"){const o=(r=N(this,Vt).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ze.batch(()=>{N(this,gn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,gn).clear(),N(this,Vt).clear()})}getAll(){return Array.from(N(this,gn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wh(n,r))}findAll(t={}){return this.getAll().filter(n=>Wh(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(at))))}},gn=new WeakMap,Vt=new WeakMap,Hi=new WeakMap,Rp);function As(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Qh(e){return{onFetch:(t,n)=>{var h,f,m,d,C;const r=t.options,o=(m=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,i=((d=t.state.data)==null?void 0:d.pages)||[],s=((C=t.state.data)==null?void 0:C.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const w=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=fy(t.options,t.fetchOptions),y=async(x,S,k)=>{if(g)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const R=(()=>{const W={client:t.client,queryKey:t.queryKey,pageParam:S,direction:k?"backward":"forward",meta:t.options.meta};return w(W),W})(),j=await v(R),{maxPages:F}=t.options,L=k?QE:GE;return{pages:L(x.pages,j,F),pageParams:L(x.pageParams,S,F)}};if(o&&i.length){const x=o==="backward",S=x?sk:Kh,k={pages:i,pageParams:s},P=S(r,k);a=await y(k,P,x)}else{const x=e??i.length;do{const S=l===0?s[0]??r.initialPageParam:Kh(r,a);if(l>0&&S==null)break;a=await y(a,S),l++}while(l{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Kh(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 sk(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 ke,Un,Wn,Eo,ko,Hn,No,Po,Tp,ak=(Tp=class{constructor(e={}){Z(this,ke);Z(this,Un);Z(this,Wn);Z(this,Eo);Z(this,ko);Z(this,Hn);Z(this,No);Z(this,Po);Q(this,ke,e.queryCache||new nk),Q(this,Un,e.mutationCache||new ik),Q(this,Wn,e.defaultOptions||{}),Q(this,Eo,new Map),Q(this,ko,new Map),Q(this,Hn,0)}mount(){us(this,Hn)._++,N(this,Hn)===1&&(Q(this,No,Gd.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ke).onFocus())})),Q(this,Po,Ma.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ke).onOnline())})))}unmount(){var e,t;us(this,Hn)._--,N(this,Hn)===0&&((e=N(this,No))==null||e.call(this),Q(this,No,void 0),(t=N(this,Po))==null||t.call(this),Q(this,Po,void 0))}isFetching(e){return N(this,ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Un).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=N(this,ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return N(this,ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=N(this,ke).get(r.queryHash),i=o==null?void 0:o.state.data,s=WE(t,i);if(s!==void 0)return N(this,ke).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>N(this,ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=N(this,ke);ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=N(this,ke);return ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ze.batch(()=>N(this,ke).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(at).catch(at)}invalidateQueries(e,t={}){return ze.batch(()=>(N(this,ke).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=ze.batch(()=>N(this,ke).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(at)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(at)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=N(this,ke).build(this,t);return n.isStaleByTime(sr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(at).catch(at)}fetchInfiniteQuery(e){return e.behavior=Qh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(at).catch(at)}ensureInfiniteQueryData(e){return e.behavior=Qh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ma.isOnline()?N(this,Un).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ke)}getMutationCache(){return N(this,Un)}getDefaultOptions(){return N(this,Wn)}setDefaultOptions(e){Q(this,Wn,e)}setQueryDefaults(e,t){N(this,Eo).set(Vi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,Eo).values()],n={};return t.forEach(r=>{Ui(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){N(this,ko).set(Vi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,ko).values()],n={};return t.forEach(r=>{Ui(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,Wn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wd(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===Hd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Wn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ke).clear(),N(this,Un).clear()}},ke=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Eo=new WeakMap,ko=new WeakMap,Hn=new WeakMap,No=new WeakMap,Po=new WeakMap,Tp),it,ie,Gi,Ze,Rr,Ro,Gn,Qn,Qi,To,jo,Tr,jr,Kn,Mo,ue,di,mu,gu,vu,yu,wu,xu,bu,yy,jp,lk=(jp=class extends rs{constructor(t,n){super();Z(this,ue);Z(this,it);Z(this,ie);Z(this,Gi);Z(this,Ze);Z(this,Rr);Z(this,Ro);Z(this,Gn);Z(this,Qn);Z(this,Qi);Z(this,To);Z(this,jo);Z(this,Tr);Z(this,jr);Z(this,Kn);Z(this,Mo,new Set);this.options=n,Q(this,it,t),Q(this,Qn,null),Q(this,Gn,pu()),this.options.experimental_prefetchInRender||N(this,Gn).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&&(N(this,ie).addObserver(this),Yh(N(this,ie),this.options)?oe(this,ue,di).call(this):this.updateResult(),oe(this,ue,yu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cu(N(this,ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cu(N(this,ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,oe(this,ue,wu).call(this),oe(this,ue,xu).call(this),N(this,ie).removeObserver(this)}setOptions(t){const n=this.options,r=N(this,ie);if(this.options=N(this,it).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,N(this,ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");oe(this,ue,bu).call(this),N(this,ie).setOptions(this.options),n._defaulted&&!du(this.options,n)&&N(this,it).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,ie),observer:this});const o=this.hasListeners();o&&Xh(N(this,ie),r,this.options,n)&&oe(this,ue,di).call(this),this.updateResult(),o&&(N(this,ie)!==r||Nt(this.options.enabled,N(this,ie))!==Nt(n.enabled,N(this,ie))||sr(this.options.staleTime,N(this,ie))!==sr(n.staleTime,N(this,ie)))&&oe(this,ue,mu).call(this);const i=oe(this,ue,gu).call(this);o&&(N(this,ie)!==r||Nt(this.options.enabled,N(this,ie))!==Nt(n.enabled,N(this,ie))||i!==N(this,Kn))&&oe(this,ue,vu).call(this,i)}getOptimisticResult(t){const n=N(this,it).getQueryCache().build(N(this,it),t),r=this.createResult(n,t);return uk(this,r)&&(Q(this,Ze,r),Q(this,Ro,this.options),Q(this,Rr,N(this,ie).state)),r}getCurrentResult(){return N(this,Ze)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){N(this,Mo).add(t)}getCurrentQuery(){return N(this,ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=N(this,it).defaultQueryOptions(t),r=N(this,it).getQueryCache().build(N(this,it),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return oe(this,ue,di).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Ze)))}createResult(t,n){var F;const r=N(this,ie),o=this.options,i=N(this,Ze),s=N(this,Rr),a=N(this,Ro),c=t!==r?t.state:N(this,Gi),{state:h}=t;let f={...h},m=!1,d;if(n._optimisticResults){const L=this.hasListeners(),W=!L&&Yh(t,n),$=L&&Xh(t,r,n,o);(W||$)&&(f={...f,...vy(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:C,errorUpdatedAt:g,status:w}=f;d=f.data;let v=!1;if(n.placeholderData!==void 0&&d===void 0&&w==="pending"){let L;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=i.data,v=!0):L=typeof n.placeholderData=="function"?n.placeholderData((F=N(this,jo))==null?void 0:F.state.data,N(this,jo)):n.placeholderData,L!==void 0&&(w="success",d=hu(i==null?void 0:i.data,L,n),m=!0)}if(n.select&&d!==void 0&&!v)if(i&&d===(s==null?void 0:s.data)&&n.select===N(this,Qi))d=N(this,To);else try{Q(this,Qi,n.select),d=n.select(d),d=hu(i==null?void 0:i.data,d,n),Q(this,To,d),Q(this,Qn,null)}catch(L){Q(this,Qn,L)}N(this,Qn)&&(C=N(this,Qn),d=N(this,To),g=Date.now(),w="error");const y=f.fetchStatus==="fetching",x=w==="pending",S=w==="error",k=x&&y,P=d!==void 0,j={status:w,fetchStatus:f.fetchStatus,isPending:x,isSuccess:w==="success",isError:S,isInitialLoading:k,isLoading:k,data:d,dataUpdatedAt:f.dataUpdatedAt,error:C,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:S&&!P,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:S&&P,isStale:Qd(t,n),refetch:this.refetch,promise:N(this,Gn),isEnabled:Nt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=H=>{j.status==="error"?H.reject(j.error):j.data!==void 0&&H.resolve(j.data)},W=()=>{const H=Q(this,Gn,j.promise=pu());L(H)},$=N(this,Gn);switch($.status){case"pending":t.queryHash===r.queryHash&&L($);break;case"fulfilled":(j.status==="error"||j.data!==$.value)&&W();break;case"rejected":(j.status!=="error"||j.error!==$.reason)&&W();break}}return j}updateResult(){const t=N(this,Ze),n=this.createResult(N(this,ie),this.options);if(Q(this,Rr,N(this,ie).state),Q(this,Ro,this.options),N(this,Rr).data!==void 0&&Q(this,jo,N(this,ie)),du(n,t))return;Q(this,Ze,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!N(this,Mo).size)return!0;const s=new Set(i??N(this,Mo));return this.options.throwOnError&&s.add("error"),Object.keys(N(this,Ze)).some(a=>{const l=a;return N(this,Ze)[l]!==t[l]&&s.has(l)})};oe(this,ue,yy).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&oe(this,ue,yu).call(this)}},it=new WeakMap,ie=new WeakMap,Gi=new WeakMap,Ze=new WeakMap,Rr=new WeakMap,Ro=new WeakMap,Gn=new WeakMap,Qn=new WeakMap,Qi=new WeakMap,To=new WeakMap,jo=new WeakMap,Tr=new WeakMap,jr=new WeakMap,Kn=new WeakMap,Mo=new WeakMap,ue=new WeakSet,di=function(t){oe(this,ue,bu).call(this);let n=N(this,ie).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(at)),n},mu=function(){oe(this,ue,wu).call(this);const t=sr(this.options.staleTime,N(this,ie));if($r||N(this,Ze).isStale||!uu(t))return;const r=uy(N(this,Ze).dataUpdatedAt,t)+1;Q(this,Tr,setTimeout(()=>{N(this,Ze).isStale||this.updateResult()},r))},gu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,ie)):this.options.refetchInterval)??!1},vu=function(t){oe(this,ue,xu).call(this),Q(this,Kn,t),!($r||Nt(this.options.enabled,N(this,ie))===!1||!uu(N(this,Kn))||N(this,Kn)===0)&&Q(this,jr,setInterval(()=>{(this.options.refetchIntervalInBackground||Gd.isFocused())&&oe(this,ue,di).call(this)},N(this,Kn)))},yu=function(){oe(this,ue,mu).call(this),oe(this,ue,vu).call(this,oe(this,ue,gu).call(this))},wu=function(){N(this,Tr)&&(clearTimeout(N(this,Tr)),Q(this,Tr,void 0))},xu=function(){N(this,jr)&&(clearInterval(N(this,jr)),Q(this,jr,void 0))},bu=function(){const t=N(this,it).getQueryCache().build(N(this,it),this.options);if(t===N(this,ie))return;const n=N(this,ie);Q(this,ie,t),Q(this,Gi,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},yy=function(t){ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(N(this,Ze))}),N(this,it).getQueryCache().notify({query:N(this,ie),type:"observerResultsUpdated"})})},jp);function ck(e,t){return Nt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Yh(e,t){return ck(e,t)||e.state.data!==void 0&&Cu(e,t,t.refetchOnMount)}function Cu(e,t,n){if(Nt(t.enabled,e)!==!1&&sr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qd(e,t)}return!1}function Xh(e,t,n,r){return(e!==t||Nt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qd(e,n)}function Qd(e,t){return Nt(t.enabled,e)!==!1&&e.isStaleByTime(sr(t.staleTime,e))}function uk(e,t){return!du(e.getCurrentResult(),t)}var wy=p.createContext(void 0),dk=e=>{const t=p.useContext(wy);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},fk=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(wy.Provider,{value:e,children:t})),xy=p.createContext(!1),hk=()=>p.useContext(xy);xy.Provider;function pk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var mk=p.createContext(pk()),gk=()=>p.useContext(mk),vk=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},yk=e=>{p.useEffect(()=>{e.clearReset()},[e])},wk=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||KE(n,[e.error,r])),xk=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))}},bk=(e,t)=>e.isLoading&&e.isFetching&&!t,Ck=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,qh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Sk(e,t,n){var f,m,d,C,g;const r=hk(),o=gk(),i=dk(),s=i.defaultQueryOptions(e);(m=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,s),s._optimisticResults=r?"isRestoring":"optimistic",xk(s),vk(s,o),yk(o);const a=!i.getQueryCache().get(s.queryHash),[l]=p.useState(()=>new t(i,s)),c=l.getOptimisticResult(s),h=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(w=>{const v=h?l.subscribe(ze.batchCalls(w)):at;return l.updateResult(),v},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(s)},[s,l]),Ck(s,c))throw qh(s,l,o);if(wk({result:c,errorResetBoundary:o,throwOnError:s.throwOnError,query:i.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;if((C=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||C.call(d,s,c),s.experimental_prefetchInRender&&!$r&&bk(c,r)){const w=a?qh(s,l,o):(g=i.getQueryCache().get(s.queryHash))==null?void 0:g.promise;w==null||w.catch(at).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?c:l.trackResult(c)}function Ek(e,t){return Sk(e,lk)}/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Aa(){return Aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function by(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Nk(){return Math.random().toString(36).substr(2,8)}function Jh(e,t){return{usr:e.state,key:e.key,idx:t}}function Su(e,t,n,r){return n===void 0&&(n=null),Aa({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ll(t):t,{state:n,key:t&&t.key||r||Nk()})}function Cy(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 ll(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 Pk(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=qn.Pop,l=null,c=h();c==null&&(c=0,s.replaceState(Aa({},s.state,{idx:c}),""));function h(){return(s.state||{idx:null}).idx}function f(){a=qn.Pop;let w=h(),v=w==null?null:w-c;c=w,l&&l({action:a,location:g.location,delta:v})}function m(w,v){a=qn.Push;let y=Su(g.location,w,v);c=h()+1;let x=Jh(y,c),S=g.createHref(y);try{s.pushState(x,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(S)}i&&l&&l({action:a,location:g.location,delta:1})}function d(w,v){a=qn.Replace;let y=Su(g.location,w,v);c=h();let x=Jh(y,c),S=g.createHref(y);s.replaceState(x,"",S),i&&l&&l({action:a,location:g.location,delta:0})}function C(w){let v=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof w=="string"?w:Cy(w);return y=y.replace(/ $/,"%20"),pt(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let g={get action(){return a},get location(){return e(o,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Zh,f),l=w,()=>{o.removeEventListener(Zh,f),l=null}},createHref(w){return t(o,w)},createURL:C,encodeLocation(w){let v=C(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:m,replace:d,go(w){return s.go(w)}};return g}var ep;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ep||(ep={}));function Rk(e,t,n){return n===void 0&&(n="/"),Tk(e,t,n,!1)}function Tk(e,t,n,r){let o=typeof t=="string"?ll(t):t,i=ky(o.pathname||"/",n);if(i==null)return null;let s=Sy(e);jk(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(pt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=yo([r,l.relativePath]),h=n.concat(l);i.children&&i.children.length>0&&(pt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Sy(i.children,t,h,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:_k(c,i.index),routesMeta:h})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of Ey(i.path))o(i,s,l)}),t}function Ey(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Ey(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function jk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Dk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Mk=/^:[\w-]+$/,Ak=3,Ik=2,Ok=1,Lk=10,Fk=-2,tp=e=>e==="*";function _k(e,t){let n=e.split("/"),r=n.length;return n.some(tp)&&(r+=Fk),t&&(r+=Ik),n.filter(o=>!tp(o)).reduce((o,i)=>o+(Mk.test(i)?Ak:i===""?Ok:Lk),r)}function Dk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function zk(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let a=0;a{let{paramName:m,isOptional:d}=h;if(m==="*"){let g=a[f]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const C=a[f];return d&&!C?c[m]=void 0:c[m]=(C||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function $k(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),by(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Bk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return by(!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 ky(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const yo=e=>e.join("/").replace(/\/\/+/g,"/"),Vk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function Uk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ny=["post","put","patch","delete"];new Set(Ny);const Wk=["get",...Ny];new Set(Wk);/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ia(){return Ia=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},w,{params:Object.assign({},a,w.params),pathname:yo([l,o.encodeLocation?o.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:yo([l,o.encodeLocation?o.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&g?p.createElement(cl.Provider,{value:{location:Ia({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:qn.Pop}},g):g}function Yk(){let e=r2(),t=Uk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,null)}const Xk=p.createElement(Yk,null);class qk extends p.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?p.createElement(ul.Provider,{value:this.props.routeContext},p.createElement(Ry.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zk(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(Hk);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(ul.Provider,{value:t},r)}function Jk(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let h=s.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);h>=0||pt(!1),s=s.slice(0,Math.min(s.length,h+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((h,f,m)=>{let d,C=!1,g=null,w=null;n&&(d=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||Xk,l&&(c<0&&m===0?(C=!0,w=null):c===m&&(C=!0,w=f.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,m+1)),y=()=>{let x;return d?x=g:C?x=w:f.route.Component?x=p.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=h,p.createElement(Zk,{match:f,routeContext:{outlet:h,matches:v,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?p.createElement(qk,{location:n.location,revalidation:n.revalidation,component:g,error:d,children:y(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):y()},null)}var Eu=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}(Eu||{});function e2(e){let t=p.useContext(Gk);return t||pt(!1),t}function t2(e){let t=p.useContext(ul);return t||pt(!1),t}function n2(e){let t=t2(),n=t.matches[t.matches.length-1];return n.route.id||pt(!1),n.route.id}function r2(){var e;let t=p.useContext(Ry),n=e2(Eu.UseRouteError),r=n2(Eu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function o2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ku(e){pt(!1)}function i2(e){let{basename:t="/",children:n=null,location:r,navigationType:o=qn.Pop,navigator:i,static:s=!1,future:a}=e;Kd()&&pt(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:i,static:s,future:Ia({v7_relativeSplatPath:!1},a)}),[l,a,i,s]);typeof r=="string"&&(r=ll(r));let{pathname:h="/",search:f="",hash:m="",state:d=null,key:C="default"}=r,g=p.useMemo(()=>{let w=ky(h,l);return w==null?null:{location:{pathname:w,search:f,hash:m,state:d,key:C},navigationType:o}},[l,h,f,m,d,C,o]);return g==null?null:p.createElement(Py.Provider,{value:c},p.createElement(cl.Provider,{children:n,value:g}))}function s2(e){let{children:t,location:n}=e;return Qk(Nu(t),n)}new Promise(()=>{});function Nu(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,o)=>{if(!p.isValidElement(r))return;let i=[...t,o];if(r.type===p.Fragment){n.push.apply(n,Nu(r.props.children,i));return}r.type!==ku&&pt(!1),!r.props.index||!r.props.children||pt(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Nu(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const a2="6";try{window.__reactRouterVersion=a2}catch{}const l2="startTransition",rp=Du[l2];function c2(e){let{basename:t,children:n,future:r,window:o}=e,i=p.useRef();i.current==null&&(i.current=kk({window:o,v5Compat:!0}));let s=i.current,[a,l]=p.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},h=p.useCallback(f=>{c&&rp?rp(()=>l(f)):l(f)},[l,c]);return p.useLayoutEffect(()=>s.listen(h),[s,h]),p.useEffect(()=>o2(r),[r]),p.createElement(i2,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var op;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(op||(op={}));var ip;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ip||(ip={}));const u2={common:{loading:"Loading...",copied:"Copied!",referAndWinIphone:"Refer and Win iPhone 17"},form:{fullNamePlaceholder:"Full name",phoneNumberPlaceholder:"Phone number *",preferredWallet:"Preferred Wallet",zalopay:"ZaloPay",momo:"MoMo"},validation:{invalidPhoneNumber:"Invalid phone number",invalidPhoneNumberDescription:"Please enter a valid Vietnamese phone number (+84 9xx xxx xxx)",nameMinLength:"Name must be at least 3 characters"},hero:{title:"Care and Win — iPhone 17",benefits:{invite:"Invite your loved ones to book trusted health services",discount:"They get special discounts using your referral code",cashback:"You earn up to ₫5,000,000 cashback",prize:"Plus a chance to win an iPhone 17"},ctaButton:"Get Referral Code"},referralForm:{title:"Get Started",description:"Enter your details to generate your unique referral code, which will be embedded in the sharing buttons below. Share with loved ones — get guaranteed cashback when they book, plus a chance to win an iPhone 17.",step1Title:"Your Details",step1Description:"We will use this information to credit cash back to the wallet of your choice.",step2Title:"Choose Service to Refer",loadingMessage:"Please wait for your referral code...",referralCodeErrorGeneric:"Referral code cannot be generated at the moment. Please try again later.",referralCodePrefix:"Your referral code is",referralCodeSuffix:". This code will be embedded in the sharing links below. Get going to win.",shareWithFriend:"Share with a friend",friendGets:"Friend gets {discount}",finalPrice:"Final price: {price}",winPerReferral:"Win {amount} per referral",for:"For {persona}",messengerAlt:"Messenger",serviceShareMessage:"Use code {code} to get {discount} off {serviceName} on HelloBacsi."},toast:{referralCodeError:"Unable to generate referral code",generateReferralCodeTitle:"Generating Referral Code",generateReferralCodeDescription:"Please wait while we generate your unique referral code...",referralLinkReady:"Referral Link Ready",referralLinkReadyDescription:"Your referral link has been generated and is ready to share.",openingMessenger:"Opening Messenger...",shareReferralLink:"Sharing your referral link..."},contestRules:{title:"Contest Rules",rules:["Earn cashback for every referral whose friend books a service.","Maximum cashback: ₫3,000,000 per participant.","Top referrer each month wins an iPhone 17.","Cashback is credited directly to your linked ZaloPay or MoMo wallet / bank account.","Cashback will be processed within 10 days after your friend or family member completes their booking using your referral link.","Terms and conditions apply."],ctaButton:"Start Referring & Win"},shareModal:{title:"Your Referral Link is Ready! 🎉",description:"Share this with your friends to help them book {serviceName}",referralCodeLabel:"Your referral code:",messageLabel:"Your message (editable):",copyLink:"Copy Link",shareVia:"Share via:",messenger:"Messenger",whatsapp:"WhatsApp",zalo:"Zalo",estimatedEarnings:"Estimated earnings: You'll earn cashback when your friend books this service!",shareAgain:"Share again",done:"Done"},mobileDrawer:{},howItWorks:{title:"How It Works",steps:{generateCode:{title:"Generate Code",description:"Fill in your personal details to generate a referral code."},selectService:{title:"Select Service",description:"Pick a health service perfect for a friend or a family member."},getCashback:{title:"Get Cashback",description:"When they book, you earn guaranteed cashback + enter to win iPhone 17."}}},winnersBlock:{peopleHaveWon:"{count} people have won",viewAllWinners:"View Leaderboard",winnersAlt:"Winners"},leaderboard:{title:"Leaderboard",subtitle:"Top 10 Referrers this month",wonIphone:"Won iPhone 17!",earned:"Earned {amount}",referrals:"{count} referrals",referMore:"Refer more to climb the board",winNextMonth:"and win next month's iPhone!"},emotionalBlock:{title:"A caring way to earn.",description:"Each referral helps someone you know take a step toward better health — whether it's a screening, a weight-loss plan, or an HPV vaccine. You're not just sharing a link; you're sharing peace of mind.",imageAlt:"Caring for family health together"},servicesCategories:{vaccines:"Vaccines",healthTests:"Health Tests",eggFreezing:"Egg Freezing"},servicesGrid:{},services:{friendDiscount:"10% off",vaxPreschool36:{name:"Vaccination package for preschool children (3 to 6 years old)",description:"Vaccination package for preschool children (3 to 6 years old)",persona:"Preschool children",clinic:"Phòng khám Nhi đồng 315"},vaxAdults50Plus:{name:"Full vaccination package for adults (50 years and older)",description:"Full vaccination package for adults (50 years and older)",persona:"Adults 50+",clinic:"Phòng khám Đa khoa Quốc tế IVY Health"},shinglesVaccineService:{name:"Shingles Vaccine",description:"Shingles Vaccine",persona:"Adults",clinic:"Phòng khám Nhi đồng 315 và Tiêm chủng"},vaxPackageA212Months:{name:"Vaccine package A for children from 2 months to 12 months",description:"Vaccine package A for children from 2 months to 12 months",persona:"Children 2-12 months",clinic:"Phòng khám Nhi đồng 315"},vaxPackageB224Months:{name:"Vaccine package B for children from 2 months to 24 months",description:"Vaccine package B for children from 2 months to 24 months",persona:"Children 2-24 months",clinic:"Phòng khám Nhi đồng 315"}},serviceCard:{availableAt:"Available at {clinic}",forPersona:"For {persona}",friendGets:"Your friend gets {discount}",finalPrice:"Final price: {price}",winPerReferral:"Win {amount} per referral",shareCta:"Share with your friend"}},d2={common:{loading:"Đang tải...",copied:"Đã sao chép!",referAndWinIphone:"Chia sẻ dịch vụ – Cơ hội trúng iPhone 17"},form:{fullNamePlaceholder:"Họ và tên",phoneNumberPlaceholder:"Số điện thoại *",preferredWallet:"Ví điện tử nhận hoàn tiền",zalopay:"ZaloPay",momo:"MoMo"},validation:{invalidPhoneNumber:"Số điện thoại không hợp lệ",invalidPhoneNumberDescription:"Vui lòng nhập số điện thoại Việt Nam hợp lệ (+84 9xx xxx xxx)",nameMinLength:"Tên phải có ít nhất 3 ký tự"},hero:{title:"Chia sẻ dịch vụ – Cơ hội trúng iPhone 17",benefits:{invite:"Mời bạn bè đặt dịch vụ chăm sóc sức khỏe đáng tin cậy",discount:"Họ được giảm giá đặc biệt khi dùng mã giới thiệu của bạn",cashback:"Bạn nhận hoàn tiền lên đến 5.000.000₫",prize:"Và có cơ hội trúng iPhone 17"},ctaButton:"Lấy mã giới thiệu"},referralForm:{title:"Bắt đầu",description:"Nhập thông tin của bạn để tạo mã giới thiệu riêng, mã này sẽ được gắn sẵn vào các nút chia sẻ bên dưới. Gửi cho người thân link chia sẻ bên dưới, bạn được hoàn tiền đảm bảo khi họ đặt dịch vụ, và có thêm cơ hội trúng iPhone 17",step1Title:"Thông tin của bạn",step1Description:"Chúng tôi dùng thông tin này để hoàn tiền vào ví mà bạn chọn.",step2Title:"Chọn dịch vụ để giới thiệu",loadingMessage:"Vui lòng đợi mã giới thiệu của bạn...",referralCodeErrorGeneric:"Không thể tạo mã giới thiệu vào lúc này. Vui lòng thử lại sau.",referralCodePrefix:"Mã giới thiệu của bạn là",referralCodeSuffix:". Mã này sẽ được nhúng vào các link chia sẻ bên dưới. Hãy bắt đầu để thắng.",shareWithFriend:"Chia sẻ với bạn bè",friendGets:"Bạn bè được giảm {discount}",finalPrice:"Giá cuối: {price}",winPerReferral:"Nhận {amount} cho mỗi lần bạn bè mua dịch vụ qua link chia sẻ",for:"Dành cho {persona}",messengerAlt:"Messenger",serviceShareMessage:"Bạn sẽ được giảm {discount} khi mua {serviceName} trên HelloBacsi qua link này nhé."},toast:{referralCodeError:"Không thể tạo mã giới thiệu",generateReferralCodeTitle:"Đang tạo mã giới thiệu",generateReferralCodeDescription:"Vui lòng đợi trong khi chúng tôi tạo mã giới thiệu riêng cho bạn...",referralLinkReady:"Link giới thiệu đã sẵn sàng",referralLinkReadyDescription:"Link giới thiệu của bạn đã được tạo và sẵn sàng để chia sẻ.",openingMessenger:"Đang mở Messenger...",shareReferralLink:"Đang chia sẻ link giới thiệu của bạn..."},contestRules:{title:"Thể lệ chương trình",rules:["Nhận hoàn tiền cho mỗi lượt giới thiệu khi bạn bè đặt dịch vụ.","Tổng số tiền hoàn tối đa: 3.000.000₫ mỗi người tham gia.","Người giới thiệu nhiều nhất mỗi tháng sẽ nhận một chiếc iPhone 17.","Tiền hoàn sẽ được chuyển trực tiếp vào ví ZaloPay hoặc MoMo của bạn.","Tiền hoàn sẽ được xử lý trong vòng 10 ngày sau khi bạn bè hoặc người thân hoàn tất đặt dịch vụ bằng link giới thiệu của bạn.","Các điều khoản của Hello BacSi sẽ được áp dụng"],ctaButton:"Bắt đầu giới thiệu & Nhận hoàn tiền"},shareModal:{title:"Link giới thiệu của bạn đã sẵn sàng! 🎉",description:"Chia sẻ với bạn bè để giúp họ đặt {serviceName}",referralCodeLabel:"Mã giới thiệu của bạn:",messageLabel:"Tin nhắn của bạn (có thể chỉnh sửa):",copyLink:"Sao chép liên kết",shareVia:"Chia sẻ qua:",messenger:"Messenger",whatsapp:"WhatsApp",zalo:"Zalo",estimatedEarnings:"Ước tính thu nhập: Bạn sẽ kiếm được hoàn tiền khi bạn bè đặt dịch vụ này!",shareAgain:"Chia sẻ lại",done:"Xong"},mobileDrawer:{},howItWorks:{title:"Cách tham gia",steps:{generateCode:{title:"Tạo mã",description:"Điền thông tin cá nhân để tạo mã giới thiệu."},selectService:{title:"Chọn dịch vụ",description:"Chọn dịch vụ sức khỏe phù hợp cho bạn bè."},getCashback:{title:"Nhận hoàn tiền",description:"Khi họ đặt dịch vụ, bạn chắc chắn được hoàn tiền và có cơ hội trúng iPhone 17."}}},winnersBlock:{peopleHaveWon:"{count} người đã thắng",viewAllWinners:"Xem Bảng xếp hạng",winnersAlt:"Người thắng"},leaderboard:{title:"Bảng xếp hạng",subtitle:"Top 10 người giới thiệu tháng này",wonIphone:"Đã trúng iPhone 17!",earned:"Kiếm được {amount}",referrals:"{count} lần giới thiệu",referMore:"Giới thiệu thêm để leo bảng xếp hạng",winNextMonth:"và trúng iPhone tháng tới!"},emotionalBlock:{title:"Chia sẻ dịch vụ tốt, chăm sóc sức khoẻ cùng nhau, nhận thêm ưu đãi",description:"Mỗi lượt giới thiệu giúp người quen của bạn tiến thêm một bước tới sức khỏe tốt hơn. Bạn không chỉ chia sẻ một đường link; bạn đang chia sẻ cả cảm giác yên tâm.",imageAlt:"Cùng nhau chăm sóc sức khỏe"},servicesCategories:{vaccines:"Tiêm chủng",healthTests:"Xét nghiệm sức khỏe",eggFreezing:"Đông lạnh trứng"},servicesGrid:{},services:{friendDiscount:"Giảm 10%",vaxPreschool36:{name:"Gói vắc xin cho trẻ tiền học đường (từ 3 đến 6 tuổi)",description:"Gói vắc xin này bảo vệ bé trong những năm đầu đời, giai đoạn dễ mắc bệnh. Từ 6 tháng, bé được phòng cúm để bớt ốm; 9 tháng thêm chắn viêm não Nhật Bản, sởi - quai bị - rubella và viêm màng não mô cầu; 12 tháng củng cố với mũi nhắc, phòng thủy đậu và viêm gan A; 24 tháng hoàn thiện với vắc xin tả, thương hàn, đầu tư cho sức khỏe con.",persona:"Trẻ từ 3 đến 6 tuổi",clinic:"Phòng khám Nhi đồng 315"},vaxAdults50Plus:{name:"Gói vắc xin đầy đủ cho người lớn (từ 50 tuổi trở lên)",description:"Gói vắc xin này giúp bảo vệ người lớn khỏi nhiều bệnh truyền nhiễm nguy hiểm, từ cúm, phế cầu, viêm não Nhật Bản, viêm màng não mô cầu, thương hàn, sởi - quai bị - rubella, thủy đậu, tả đến HPV và viêm gan A+B. Mỗi mũi tiêm như thêm một “lớp áo giáp”, giúp bạn yên tâm làm việc và chăm sóc gia đình, bớt nỗi về biến chứng và chi phí điều trị về sau.",persona:"Người lớn 50+",clinic:"Phòng khám Đa khoa Quốc tế IVY Health"},shinglesVaccineService:{name:"Vắc xin phòng bệnh Zona thần kinh (Giời Leo)",description:"Zona gây đau thần kinh dữ dội có thể kéo dài hàng tháng hoặc hàng năm, được mô tả như cảm giác bỏng, đâm hoặc giật điện. 1 trong 3 người sẽ phát triển zona trong đời. Hãy giới thiệu cho cha mẹ, ông bà, hoặc người thân trên 50 tuổi để bảo vệ họ khỏi nỗi đau có thể ngăn ngừa này với hiệu quả bảo vệ hơn 90%.",persona:"Người lớn 18+",clinic:"Phòng khám Nhi đồng 315"},vaxPackageA212Months:{name:"Gói vắc xin cho trẻ em từ 2 tháng đến 12 tháng",description:"Gói vắc xin này giúp ba mẹ yên tâm trong giai đoạn đầu đời, lúc bé bệnh. Từ 2 tháng, bé được bảo vệ trước phế cầu và các bệnh trong mũi 6 trong 1, giảm nguy cơ viêm phổi, viêm màng não, nhập viện. Các mũi Rota, cúm, viêm não Nhật Bản, não mô cầu, sởi - quai bị - rubella, thủy đậu, viêm gan A lần lượt hoàn thiện “lá chắn” sức khỏe để bé khỏe mạnh.",persona:"Trẻ từ 2 đến 12 tháng",clinic:"Phòng khám Nhi đồng 315"},vaxPackageB224Months:{name:"Gói vaccine cho trẻ từ 2 tháng đến 12 tháng",description:"Gói vắc xin combo này là lộ trình bảo vệ cho bé từ 2 đến 24 tháng, giai đoạn ba mẹ lo nhất. Từ mũi 6 trong 1, Rota, não mô cầu B ở 2 tháng, đến cúm 6 tháng, viêm não Nhật Bản và não mô cầu ACYW 9 tháng, sởi - quai bị - rubella 12 tháng và thương hàn 24 tháng. Mỗi mũi tiêm giúp ba mẹ bớt lo, yên tâm về sức khỏe con.",persona:"Trẻ từ 2 đến 24 tháng",clinic:"Phòng khám Nhi đồng 315"}},serviceCard:{availableAt:"Có tại {clinic}",forPersona:"Dành cho {persona}",friendGets:"Người bạn giới thiệu được {discount}",finalPrice:"Giá cuối: {price}",winPerReferral:"Nhận {amount} mỗi lượt giới thiệu",shareCta:"Chia sẻ với bạn bè"}},Oa={en:u2,vi:d2},jy="vi";let dl=jy;const Pu=e=>{console.log("Global translation state: Setting language to",e),dl=e,typeof window<"u"&&window.dispatchEvent(new CustomEvent("languageChange",{detail:e}))},Re=(e,t)=>{const n=e.split(".");let r=Oa[dl];for(const o of n)if(r&&typeof r=="object"&&o in r)r=r[o];else{r=Oa.en;for(const i of n)if(r&&typeof r=="object"&&i in r)r=r[i];else return console.warn(`Translation key "${e}" not found`),e;break}return typeof r!="string"?(console.warn(`Translation key "${e}" does not resolve to a string`),e):t?r.replace(/\{(\w+)\}/g,(o,i)=>t[i]||o):r},f2=e=>{const t=e.split(".");let n=Oa[dl];for(const r of t)if(n&&typeof n=="object"&&r in n)n=n[r];else{n=Oa.en;for(const o of t)if(n&&typeof n=="object"&&o in n)n=n[o];else return console.warn(`Translation key "${e}" not found`),[];break}return Array.isArray(n)?n:(console.warn(`Translation key "${e}" does not resolve to an array`),[])},Et=()=>{const[,e]=p.useState({});return p.useEffect(()=>{const t=()=>{e({})};if(typeof window<"u")return window.addEventListener("languageChange",t),()=>window.removeEventListener("languageChange",t)},[]),{t:Re,tArray:f2,currentLanguage:dl,setLanguage:Pu}},My=p.createContext(void 0),h2=({children:e})=>{const[t,n]=p.useState(jy),r=o=>{console.log("LanguageContext: Setting language to",o),n(o),Pu(o)};return p.useEffect(()=>{Pu(t)},[t]),u.jsx(My.Provider,{value:{currentLanguage:t,setLanguage:r},children:e})},p2=()=>{const e=p.useContext(My);if(e===void 0)throw new Error("useLanguageContext must be used within a LanguageProvider");return e},m2=nl("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"}}),ct=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?L1:"button";return u.jsx(s,{className:Pe(m2({variant:t,size:n,className:e})),ref:i,...o})});ct.displayName="Button";const g2=()=>{const{currentLanguage:e,setLanguage:t}=p2(),[n,r]=p.useState(()=>typeof window<"u"&&window.showLangButton===!0);p.useEffect(()=>{const i=setInterval(()=>{const s=typeof window<"u"&&window.showLangButton===!0;r(s)},500);return()=>clearInterval(i)},[]),console.log("LanguageSwitcher rendering, currentLanguage:",e);const o=()=>{const i=e==="en"?"vi":"en";console.log("Switching language from",e,"to",i),t(i)};return n?u.jsx(u.Fragment,{children:u.jsx(ct,{variant:"outline",size:"sm",onClick:o,className:"fixed top-20 left-4 z-[9999] bg-blue-500 text-white border-2 border-blue-600 shadow-xl hover:bg-blue-600 px-3 py-2",style:{minWidth:"120px",minHeight:"40px"},children:e==="en"?"🇻🇳 VI":"🇺🇸 EN"})}):null},Js="G-WT6VXXQWE1",v2=()=>{if(typeof window<"u"&&Js!=="G-XXXXXXXXXX"){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)};const e=document.createElement("script");e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${Js}`,document.head.appendChild(e),window.gtag("js",new Date),window.gtag("config",Js,{page_title:document.title,page_location:window.location.href,send_page_view:!0})}},Ir=(e,t,n,r)=>{typeof window<"u"&&window.gtag&&Js!=="G-XXXXXXXXXX"&&window.gtag("event",e,{event_category:t,event_label:n,value:r})},y2="/chuong-trinh-gioi-thieu/assets/logo-new-2f67xndU.png",sp="https://hellobacsi.com",w2=()=>u.jsx("header",{className:"sticky top-0 z-50 bg-primary backdrop-blur supports-[backdrop-filter]:bg-primary/95",style:{borderRadius:0},children:u.jsx("div",{className:"container mx-auto px-2",children:u.jsxs("div",{className:"flex h-[54px] items-center justify-between",children:[u.jsx("a",{href:sp,className:"flex items-center justify-center mt-0.5 px-2",children:u.jsx("img",{src:y2,alt:"hellobacsi",className:"h-6 object-contain"})}),u.jsx(ct,{variant:"ghost",size:"icon",className:"rounded-full text-primary-foreground hover:bg-primary-foreground/10",onClick:()=>window.location.href=sp,children:u.jsx(Bb,{className:"h-5 w-5"})})]})})}),x2="/chuong-trinh-gioi-thieu/assets/hero-referral-caring-desktop-right-v3-CDgBtQ1x.jpg",b2="/chuong-trinh-gioi-thieu/assets/hero-referral-caring-mobile-B7ElFcbV.jpg",C2=()=>{const{t:e}=Et(),t=()=>{const n=`${window.location.origin}${window.location.pathname}#referral-form`;Ir("Get Referral code","Referral Program",n);const r=document.getElementById("referral-form");r&&r.scrollIntoView({behavior:"smooth",block:"start"})};return u.jsxs("section",{className:"relative overflow-hidden min-h-[590px] md:min-h-[68vh]",children:[u.jsxs("div",{className:"absolute inset-0",children:[u.jsxs("picture",{children:[u.jsx("source",{media:"(min-width: 768px)",srcSet:x2}),u.jsx("img",{src:b2,alt:"Vietnamese winners celebrating with iPhone 17 in various colors",className:"w-full h-full object-cover object-[center_30%] md:object-[80%_30%]"})]}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 via-black/20 via-40% to-transparent md:bg-gradient-to-r md:from-black/70 md:via-black/50 md:via-60% md:to-transparent"}),u.jsx("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}})]}),u.jsx("div",{className:"container relative z-10 mx-auto px-6 md:px-8 h-full min-h-[590px] md:min-h-[68vh] flex flex-col justify-end pb-4 md:pb-8",children:u.jsxs("div",{className:"max-w-3xl",children:[u.jsx("h1",{className:"mb-3 md:mb-6 text-[1.61rem] md:text-3xl lg:text-4xl xl:text-5xl leading-tight text-primary-foreground drop-shadow-2xl font-extrabold",children:e("hero.title")}),u.jsxs("ul",{className:"mt-3 mb-6 md:mb-8 space-y-2.5 max-w-2xl",children:[u.jsxs("li",{className:"flex items-start gap-3 text-primary-foreground/95 drop-shadow-lg",children:[u.jsx($b,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),u.jsx("span",{className:"text-sm md:text-base font-normal",children:e("hero.benefits.invite")})]}),u.jsxs("li",{className:"flex items-start gap-3 text-primary-foreground/95 drop-shadow-lg",children:[u.jsx(Db,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),u.jsx("span",{className:"text-sm md:text-base font-normal",children:e("hero.benefits.discount")})]}),u.jsxs("li",{className:"flex items-start gap-3 text-primary-foreground/95 drop-shadow-lg",children:[u.jsx(Vb,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),u.jsx("span",{className:"md:text-base font-normal text-sm",children:e("hero.benefits.cashback")})]}),u.jsxs("li",{className:"flex items-start gap-3 text-primary-foreground/95 drop-shadow-lg",children:[u.jsx(Cv,{className:"h-4 w-4 mt-0.5 flex-shrink-0"}),u.jsx("span",{className:"text-sm md:text-base font-normal",children:e("hero.benefits.prize")})]})]}),u.jsxs(ct,{size:"lg",onClick:t,className:"group bg-accent text-accent-foreground shadow-xl transition-all hover:bg-accent/90 hover:shadow-2xl hover:scale-105 text-base py-6","data-event-category":"Referral Program","data-event-action":"Get Referral code","data-event-label":`${window.location.origin}${window.location.pathname}#referral-form`,children:[e("hero.ctaButton"),u.jsx(Tb,{className:"ml-2 h-5 w-5 transition-transform group-hover:translate-x-1"})]}),u.jsxs("div",{className:"mt-8 pb-2 flex justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-primary-foreground/90",children:[u.jsx(_b,{className:"h-4 w-4"}),u.jsx("span",{className:"text-xs md:text-sm font-medium",children:e("servicesCategories.vaccines")})]}),u.jsxs("div",{className:"flex items-center gap-1.5 text-primary-foreground/90",children:[u.jsx(Rb,{className:"h-4 w-4"}),u.jsx("span",{className:"text-xs md:text-sm font-medium",children:e("servicesCategories.healthTests")})]}),u.jsxs("div",{className:"flex items-center gap-1.5 text-primary-foreground/90",children:[u.jsx(Ob,{className:"h-4 w-4"}),u.jsx("span",{className:"text-xs md:text-sm font-medium",children:e("servicesCategories.eggFreezing")})]})]})]})})]})},S2="/chuong-trinh-gioi-thieu/assets/step-1-select-CpBwNCKS.png",E2="/chuong-trinh-gioi-thieu/assets/step-2-share-BdMGnaTq.png",k2="/chuong-trinh-gioi-thieu/assets/step-3-reward-CGk09XmE.png",N2=()=>{const{t:e}=Et(),t=[{number:"1",title:e("howItWorks.steps.generateCode.title"),description:e("howItWorks.steps.generateCode.description"),image:E2},{number:"2",title:e("howItWorks.steps.selectService.title"),description:e("howItWorks.steps.selectService.description"),image:S2},{number:"3",title:e("howItWorks.steps.getCashback.title"),description:e("howItWorks.steps.getCashback.description"),image:k2}];return u.jsx("section",{id:"how-it-works",className:"pt-8 md:pt-10 pb-6 md:pb-8 bg-background",children:u.jsxs("div",{className:"container mx-auto px-4",children:[u.jsx("div",{className:"mb-6 text-center",children:u.jsx("h2",{className:"mb-2 text-2xl md:text-3xl font-bold text-foreground",children:e("howItWorks.title")})}),u.jsx("div",{className:"relative overflow-x-auto scrollbar-hide -mx-4 px-4 md:overflow-visible md:mx-0 md:px-0",children:u.jsx("div",{className:"flex gap-3 pb-4 md:grid md:grid-cols-3 md:gap-8",children:t.map(n=>u.jsx("div",{className:"bg-card rounded-xl px-2 py-4 shadow-md hover:shadow-lg transition-shadow flex-shrink-0 md:flex-shrink md:w-auto w-[calc(35vw)] min-w-[160px]",children:u.jsxs("div",{className:"flex flex-col items-center text-center",children:[u.jsxs("div",{className:"relative mb-3",children:[u.jsx("div",{className:"absolute -top-2 -left-2 flex h-7 w-7 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground shadow-lg z-10",children:n.number}),u.jsx("div",{className:"overflow-hidden rounded-lg",children:u.jsx("img",{src:n.image,alt:n.title,className:"h-20 w-20 object-cover"})})]}),u.jsx("h3",{className:"mb-2 text-base font-bold text-card-foreground leading-tight",children:n.title}),u.jsx("p",{className:"text-muted-foreground leading-snug text-sm",children:n.description})]})},n.number))})})]})})},P2=nl("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function R2({className:e,variant:t,...n}){return u.jsx("div",{className:Pe(P2({variant:t}),e),...n})}var Ay={exports:{}},Iy={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Bo=p;function T2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var j2=typeof Object.is=="function"?Object.is:T2,M2=Bo.useState,A2=Bo.useEffect,I2=Bo.useLayoutEffect,O2=Bo.useDebugValue;function L2(e,t){var n=t(),r=M2({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return I2(function(){o.value=n,o.getSnapshot=t,Zl(o)&&i({inst:o})},[e,n,t]),A2(function(){return Zl(o)&&i({inst:o}),e(function(){Zl(o)&&i({inst:o})})},[e]),O2(n),n}function Zl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!j2(e,n)}catch{return!0}}function F2(e,t){return t()}var _2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?F2:L2;Iy.useSyncExternalStore=Bo.useSyncExternalStore!==void 0?Bo.useSyncExternalStore:_2;Ay.exports=Iy;var D2=Ay.exports;function z2(){return D2.useSyncExternalStore($2,()=>!0,()=>!1)}function $2(){return()=>{}}var Yd="Avatar",[B2,rR]=Pn(Yd),[V2,Oy]=B2(Yd),Ly=p.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=p.useState("idle");return u.jsx(V2,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:u.jsx(de.span,{...r,ref:t})})});Ly.displayName=Yd;var Fy="AvatarImage",_y=p.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,s=Oy(Fy,n),a=U2(r,i),l=It(c=>{o(c),s.onImageLoadingStatusChange(c)});return Ot(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?u.jsx(de.img,{...i,ref:t,src:r}):null});_y.displayName=Fy;var Dy="AvatarFallback",zy=p.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=Oy(Dy,n),[s,a]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&i.imageLoadingStatus!=="loaded"?u.jsx(de.span,{...o,ref:t}):null});zy.displayName=Dy;function ap(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function U2(e,{referrerPolicy:t,crossOrigin:n}){const r=z2(),o=p.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[s,a]=p.useState(()=>ap(i,e));return Ot(()=>{a(ap(i,e))},[i,e]),Ot(()=>{const l=f=>()=>{a(f)};if(!i)return;const c=l("loaded"),h=l("error");return i.addEventListener("load",c),i.addEventListener("error",h),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",c),i.removeEventListener("error",h)}},[i,n,t]),s}var $y=Ly,By=_y,Vy=zy;const Uy=p.forwardRef(({className:e,...t},n)=>u.jsx($y,{ref:n,className:Pe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Uy.displayName=$y.displayName;const Wy=p.forwardRef(({className:e,...t},n)=>u.jsx(By,{ref:n,className:Pe("aspect-square h-full w-full",e),...t}));Wy.displayName=By.displayName;const Hy=p.forwardRef(({className:e,...t},n)=>u.jsx(Vy,{ref:n,className:Pe("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Hy.displayName=Vy.displayName;const W2="/chuong-trinh-gioi-thieu/assets/iphone-prize-ucoAnILr.png",H2="/chuong-trinh-gioi-thieu/assets/profile-thao-BOfoMolh.jpg",G2="/chuong-trinh-gioi-thieu/assets/profile-minh-D0iiqorC.jpg",Q2=[{name:"Thao N.",earnings:"₫3,000,000",referrals:12,wonIphone:!0,avatar:H2},{name:"Minh P.",earnings:"₫2,800,000",referrals:11,wonIphone:!0,avatar:G2},{name:"Linh T.",earnings:"₫2,400,000",referrals:9,wonIphone:!1},{name:"Huy V.",earnings:"₫2,100,000",referrals:8,wonIphone:!1},{name:"An N.",earnings:"₫1,800,000",referrals:7,wonIphone:!1},{name:"Mai L.",earnings:"₫1,500,000",referrals:6,wonIphone:!1},{name:"Tuan H.",earnings:"₫1,200,000",referrals:5,wonIphone:!1},{name:"Lan P.",earnings:"₫900,000",referrals:4,wonIphone:!1},{name:"Duc N.",earnings:"₫600,000",referrals:3,wonIphone:!1},{name:"Nga T.",earnings:"₫300,000",referrals:2,wonIphone:!1}],lp=e=>e.split(" ").map(t=>t[0]).join("").toUpperCase(),cp=["bg-blue-500 text-white","bg-purple-500 text-white","bg-pink-500 text-white","bg-green-500 text-white","bg-orange-500 text-white","bg-teal-500 text-white","bg-indigo-500 text-white","bg-red-500 text-white"],up=()=>{const{t:e}=Et();return u.jsxs("div",{className:"rounded-2xl bg-card px-4 md:px-6 pt-1 lg:pt-0 pb-4 md:pb-6 shadow-[var(--shadow-card)] lg:sticky lg:top-24 w-full",children:[u.jsxs("div",{className:"mb-5 md:mb-7 flex flex-row items-center justify-start gap-3 ml-10 md:ml-16 mt-4 lg:mt-6",children:[u.jsx("div",{className:"flex h-10 w-10 md:h-12 md:w-12 items-center justify-center rounded-xl bg-accent/10",children:u.jsx(Cv,{className:"h-5 w-5 md:h-6 md:w-6 text-accent"})}),u.jsxs("div",{className:"text-center",children:[u.jsx("h3",{className:"md:text-xl font-bold text-card-foreground text-xl",children:e("leaderboard.title")}),u.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:e("leaderboard.subtitle")})]})]}),u.jsx("div",{className:"space-y-2 md:space-y-3",children:Q2.map((t,n)=>u.jsxs("div",{className:`flex items-center gap-2 md:gap-3 rounded-xl px-2 md:px-3 py-3 md:py-4 transition-colors ${n===0?"bg-gradient-to-r from-accent/20 to-accent/5":"bg-muted/50 hover:bg-muted"}`,children:[u.jsx("div",{className:`flex h-6 w-6 md:h-7 md:w-7 flex-shrink-0 items-center justify-center rounded-md text-xs md:text-sm font-medium ${n===0?"bg-accent text-accent-foreground":n===1?"bg-muted-foreground/20 text-foreground":"bg-muted text-muted-foreground"}`,children:n+1}),n<2?u.jsxs(Uy,{className:"h-8 w-8 md:h-10 md:w-10 flex-shrink-0",children:[u.jsx(Wy,{src:t.avatar,alt:t.name}),u.jsx(Hy,{children:lp(t.name)})]}):u.jsx("div",{className:`flex h-8 w-8 md:h-10 md:w-10 flex-shrink-0 items-center justify-center rounded-full text-xs md:text-sm font-semibold ${cp[n%cp.length]}`,children:lp(t.name)}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-1 md:gap-2",children:[u.jsx("p",{className:"truncate text-sm md:text-base font-semibold text-card-foreground",children:t.name}),t.wonIphone&&u.jsxs(R2,{variant:"secondary",className:"gap-1 text-xs ml-auto",children:[u.jsx("img",{src:W2,alt:"Winner",className:"h-3 w-3"}),e("leaderboard.wonIphone")]})]}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-1.5",children:[u.jsx("span",{children:e("leaderboard.earned",{amount:t.earnings})}),u.jsx("span",{children:e("leaderboard.referrals",{count:t.referrals.toString()})})]})]}),n===0]},t.name))}),u.jsxs("div",{className:"mt-4 md:mt-6 rounded-xl bg-primary/10 p-3 md:p-4",children:[u.jsxs("div",{className:"mb-1 md:mb-2 flex items-center gap-2 text-primary",children:[u.jsx(zb,{className:"h-4 w-4 md:h-5 md:w-5"}),u.jsx("p",{className:"text-sm md:text-base font-semibold",children:e("leaderboard.referMore")})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e("leaderboard.winNextMonth")})]})]})},K2="/chuong-trinh-gioi-thieu/assets/emotional-care-ByDjqeta.jpg",Y2=()=>{const{t:e}=Et();return u.jsx("section",{className:"mt-8 md:mt-12 lg:mt-16 py-6 md:py-16 lg:py-24",children:u.jsx("div",{className:"container mx-auto px-6 md:px-8",children:u.jsxs("div",{className:"grid items-center gap-6 md:gap-12 lg:grid-cols-2",children:[u.jsxs("div",{className:"order-2 lg:order-1",children:[u.jsx("h2",{className:"mb-3 md:mb-4 text-2xl md:text-3xl lg:text-4xl font-bold text-foreground",children:e("emotionalBlock.title")}),u.jsx("p",{className:"text-base md:text-lg leading-relaxed text-muted-foreground",children:e("emotionalBlock.description")})]}),u.jsx("div",{className:"order-1 lg:order-2",children:u.jsx("div",{className:"overflow-hidden rounded-2xl md:rounded-3xl shadow-2xl max-w-full",children:u.jsx("img",{src:K2,alt:e("emotionalBlock.imageAlt"),className:"h-48 md:h-full w-full object-cover"})})})]})})})},X2=()=>{const{t:e,tArray:t}=Et(),n=()=>{const r=`${window.location.origin}${window.location.pathname}#referral-form`;Ir("Get Referral code","Referral Program",r);const o=document.getElementById("referral-form");o&&o.scrollIntoView({behavior:"smooth",block:"start"})};return u.jsx("section",{className:"bg-primary-light py-6 md:py-16",children:u.jsx("div",{className:"container mx-auto px-6 md:px-8",children:u.jsxs("div",{className:"mx-auto max-w-3xl text-center",children:[u.jsx("h2",{className:"mb-4 md:mb-8 text-2xl md:text-3xl lg:text-4xl font-bold text-foreground",children:e("contestRules.title")}),u.jsx("div",{className:"mb-4 md:mb-8 grid gap-2 md:gap-4 text-left sm:grid-cols-2",children:t("contestRules.rules").map((r,o)=>u.jsxs("div",{className:"flex gap-2 md:gap-3",children:[u.jsx(Mb,{className:"h-5 w-5 md:h-6 md:w-6 flex-shrink-0 text-success"}),u.jsx("p",{className:"text-sm md:text-base text-muted-foreground",children:r})]},o))}),u.jsx(ct,{size:"lg",onClick:n,className:"bg-primary hover:bg-primary/90","data-event-category":"Referral Program","data-event-action":"Get Referral code","data-event-label":`${window.location.origin}${window.location.pathname}#referral-form`,children:e("contestRules.ctaButton")})]})})})},si="https://hellobacsi.com",dp=()=>[{id:"vax-preschool-3-6",name:Re("services.vaxPreschool36.name"),description:Re("services.vaxPreschool36.description"),clinic:Re("services.vaxPreschool36.clinic"),price:"₫12,776,000",friendDiscount:"₫225,000",friendPrice:"₫12,776,000",persona:Re("services.vaxPreschool36.persona"),cashback:"₫75,000",url:`${si}/care/dich-vu/tiem-chung/goi-vac-xin-5-tre-em-tien-hoc-duong-tu-3-den-6-tuoi-12470/payment`,image:"https://cdn-healthcare.hellohealthgroup.com/hospitals/vn/1pvwQmB_eX0rMV7Uc0vRqltG7ipJoznV5.png?w=2048&q=75",productType:"Vaccination",hospitalId:"2595"},{id:"vax-adults-50-plus",name:Re("services.vaxAdults50Plus.name"),description:Re("services.vaxAdults50Plus.description"),clinic:Re("services.vaxAdults50Plus.clinic"),price:"₫17,539,000",friendDiscount:"₫225,000",friendPrice:"₫17,539,000",persona:Re("services.vaxAdults50Plus.persona"),cashback:"₫75,000",url:`${si}/care/dich-vu/tiem-chung/goi-vac-xin-6-nguoi-lon-day-du-lua-chon-b-tu-50-tuoi-tro-len-12539/payment`,image:"https://cdn-healthcare.hellohealthgroup.com/hospitals/vn/1atNuB7Xmiw4oUt03k0eto5ZRKNCrJd7L.png?w=2048&q=75",productType:"Vaccination",hospitalId:"2653"},{id:"shingles-vaccine",name:Re("services.shinglesVaccineService.name"),description:Re("services.shinglesVaccineService.description"),clinic:Re("services.shinglesVaccineService.clinic"),price:"₫3,885,000",friendDiscount:"₫225,000",friendPrice:"₫3,885,000",persona:Re("services.shinglesVaccineService.persona"),cashback:"₫75,000",url:`${si}/care/dich-vu/tiem-chung/vac-xin-phong-zona-than-kinh-shingrix-gsk-bi-11262/payment`,image:"https://cdn-healthcare.hellohealthgroup.com/hospitals/vn/1oX_RkNPy3a5c6Nzsy4-ots0io6FHJE7N.png?w=2048&q=75",productType:"Vaccination",hospitalId:"2595"},{id:"vax-package-a-2-12-months",name:Re("services.vaxPackageA212Months.name"),description:Re("services.vaxPackageA212Months.description"),clinic:Re("services.vaxPackageA212Months.clinic"),price:"₫15,262,000",friendDiscount:"₫225,000",friendPrice:"₫15,262,000",persona:Re("services.vaxPackageA212Months.persona"),cashback:"₫75,000",url:`${si}/care/dich-vu/tiem-chung/goi-vac-xin-1-tre-em-tu-2-thang-den-12-thang-lua-chon-1a-12700/payment`,image:"https://cdn-healthcare.hellohealthgroup.com/hospitals/vn/1yLZmlMHoSH4EWvg8sfhBMBBTbEqifgBu.png?w=2048&q=75",productType:"Vaccination",hospitalId:"2595"},{id:"vax-package-b-2-24-months",name:Re("services.vaxPackageB224Months.name"),description:Re("services.vaxPackageB224Months.description"),clinic:Re("services.vaxPackageB224Months.clinic"),price:"₫28,022,000",friendDiscount:"₫225,000",friendPrice:"₫28,022,000",persona:Re("services.vaxPackageB224Months.persona"),cashback:"₫75,000",url:`${si}/care/dich-vu/tiem-chung/goi-vac-xin-3-tre-em-tu-2-den-24-thang-lua-chon-3b-12266/payment`,image:"https://cdn-healthcare.hellohealthgroup.com/hospitals/vn/1pvwQmB_eX0rMV7Uc0vRqltG7ipJoznV5.png?w=2048&q=75",productType:"Vaccination",hospitalId:"2595"}],q2="https://sparkle-rewards-be.hellohealthgroup.com";async function Z2(){try{const e=await fetch(`${q2}/services`);if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const t=await e.json();if(t.success&&Array.isArray(t.data)&&t.data.length>0)return t.data;throw new Error("No services returned from API")}catch(e){throw console.warn("⚠️ Failed to fetch services from API, using fallback:",e),e}}function Gy(){const{data:e,isLoading:t,error:n}=Ek({queryKey:["services"],queryFn:async()=>{try{return await Z2()}catch{return console.log("📦 Using fallback services from services.ts"),dp()}},staleTime:3e5,gcTime:6e5,retry:1});return{services:e||dp(),isLoading:t,error:n}}var Jl="focusScope.autoFocusOnMount",ec="focusScope.autoFocusOnUnmount",fp={bubbles:!1,cancelable:!0},J2="FocusScope",Qy=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=p.useState(null),c=It(o),h=It(i),f=p.useRef(null),m=Oe(t,g=>l(g)),d=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(x){if(d.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:Fn(f.current,{select:!0})},w=function(x){if(d.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||Fn(f.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const k of x)k.removedNodes.length>0&&Fn(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const y=new MutationObserver(v);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),y.disconnect()}}},[r,a,d.paused]),p.useEffect(()=>{if(a){pp.add(d);const g=document.activeElement;if(!a.contains(g)){const v=new CustomEvent(Jl,fp);a.addEventListener(Jl,c),a.dispatchEvent(v),v.defaultPrevented||(eN(iN(Ky(a)),{select:!0}),document.activeElement===g&&Fn(a))}return()=>{a.removeEventListener(Jl,c),setTimeout(()=>{const v=new CustomEvent(ec,fp);a.addEventListener(ec,h),a.dispatchEvent(v),v.defaultPrevented||Fn(g??document.body,{select:!0}),a.removeEventListener(ec,h),pp.remove(d)},0)}}},[a,c,h,d]);const C=p.useCallback(g=>{if(!n&&!r||d.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const y=g.currentTarget,[x,S]=tN(y);x&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&Fn(x,{select:!0})):g.shiftKey&&v===x&&(g.preventDefault(),n&&Fn(S,{select:!0})):v===y&&g.preventDefault()}},[n,r,d.paused]);return u.jsx(de.div,{tabIndex:-1,...s,ref:m,onKeyDown:C})});Qy.displayName=J2;function eN(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fn(r,{select:t}),document.activeElement!==n)return}function tN(e){const t=Ky(e),n=hp(t,e),r=hp(t.reverse(),e);return[n,r]}function Ky(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hp(e,t){for(const n of e)if(!nN(n,{upTo:t}))return n}function nN(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 rN(e){return e instanceof HTMLInputElement&&"select"in e}function Fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rN(e)&&t&&e.select()}}var pp=oN();function oN(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=mp(e,t),e.unshift(t)},remove(t){var n;e=mp(e,t),(n=e[0])==null||n.resume()}}}function mp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iN(e){return e.filter(t=>t.tagName!=="A")}var tc=0;function sN(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gp()),document.body.insertAdjacentElement("beforeend",e[1]??gp()),tc++,()=>{tc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tc--}},[])}function gp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var rn=function(){return rn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return SN;var t=EN(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])}},NN=Zy(),wo="data-scroll-locked",PN=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(lN,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } body[`).concat(wo,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(o,`px; padding-top: `).concat(i,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(ea,` { right: `).concat(a,"px ").concat(r,`; } .`).concat(ta,` { margin-right: `).concat(a,"px ").concat(r,`; } .`).concat(ea," .").concat(ea,` { right: 0 `).concat(r,`; } .`).concat(ta," .").concat(ta,` { margin-right: 0 `).concat(r,`; } body[`).concat(wo,`] { `).concat(cN,": ").concat(a,`px; } `)},yp=function(){var e=parseInt(document.body.getAttribute(wo)||"0",10);return isFinite(e)?e:0},RN=function(){p.useEffect(function(){return document.body.setAttribute(wo,(yp()+1).toString()),function(){var e=yp()-1;e<=0?document.body.removeAttribute(wo):document.body.setAttribute(wo,e.toString())}},[])},TN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;RN();var i=p.useMemo(function(){return kN(o)},[o]);return p.createElement(NN,{styles:PN(i,!t,o,n?"":"!important")})},Ru=!1;if(typeof window<"u")try{var Is=Object.defineProperty({},"passive",{get:function(){return Ru=!0,!0}});window.addEventListener("test",Is,Is),window.removeEventListener("test",Is,Is)}catch{Ru=!1}var Kr=Ru?{passive:!1}:!1,jN=function(e){return e.tagName==="TEXTAREA"},Jy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jN(e)&&n[t]==="visible")},MN=function(e){return Jy(e,"overflowY")},AN=function(e){return Jy(e,"overflowX")},wp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=e0(e,r);if(o){var i=t0(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},IN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ON=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},e0=function(e,t){return e==="v"?MN(t):AN(t)},t0=function(e,t){return e==="v"?IN(t):ON(t)},LN=function(e,t){return e==="h"&&t==="rtl"?-1:1},FN=function(e,t,n,r,o){var i=LN(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,h=s>0,f=0,m=0;do{if(!a)break;var d=t0(e,a),C=d[0],g=d[1],w=d[2],v=g-w-i*C;(C||v)&&e0(e,a)&&(f+=v,m+=C);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(h&&(Math.abs(f)<1||!o)||!h&&(Math.abs(m)<1||!o))&&(c=!0),c},Os=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xp=function(e){return[e.deltaX,e.deltaY]},bp=function(e){return e&&"current"in e?e.current:e},_N=function(e,t){return e[0]===t[0]&&e[1]===t[1]},DN=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},zN=0,Yr=[];function $N(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(zN++)[0],i=p.useState(Zy)[0],s=p.useRef(e);p.useEffect(function(){s.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=aN([e.lockRef.current],(e.shards||[]).map(bp),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var v=Os(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-v[0],S="deltaY"in g?g.deltaY:y[1]-v[1],k,P=g.target,R=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&R==="h"&&P.type==="range")return!1;var j=wp(R,P);if(!j)return!0;if(j?k=R:(k=R==="v"?"h":"v",j=wp(R,P)),!j)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=k),!k)return!0;var F=r.current||k;return FN(F,w,g,F==="h"?x:S,!0)},[]),l=p.useCallback(function(g){var w=g;if(!(!Yr.length||Yr[Yr.length-1]!==i)){var v="deltaY"in w?xp(w):Os(w),y=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&_N(k.delta,v)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(bp).filter(Boolean).filter(function(k){return k.contains(w.target)}),S=x.length>0?a(w,x[0]):!s.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),c=p.useCallback(function(g,w,v,y){var x={name:g,delta:w,target:v,should:y,shadowParent:BN(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),h=p.useCallback(function(g){n.current=Os(g),r.current=void 0},[]),f=p.useCallback(function(g){c(g.type,xp(g),g.target,a(g,e.lockRef.current))},[]),m=p.useCallback(function(g){c(g.type,Os(g),g.target,a(g,e.lockRef.current))},[]);p.useEffect(function(){return Yr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Kr),document.addEventListener("touchmove",l,Kr),document.addEventListener("touchstart",h,Kr),function(){Yr=Yr.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Kr),document.removeEventListener("touchmove",l,Kr),document.removeEventListener("touchstart",h,Kr)}},[]);var d=e.removeScrollBar,C=e.inert;return p.createElement(p.Fragment,null,C?p.createElement(i,{styles:DN(o)}):null,d?p.createElement(TN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function BN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const VN=gN(qy,$N);var n0=p.forwardRef(function(e,t){return p.createElement(fl,rn({},e,{ref:t,sideCar:VN}))});n0.classNames=fl.classNames;var UN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xr=new WeakMap,Ls=new WeakMap,Fs={},ic=0,r0=function(e){return e&&(e.host||r0(e.parentNode))},WN=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=r0(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})},HN=function(e,t,n,r){var o=WN(t,Array.isArray(e)?e:[e]);Fs[n]||(Fs[n]=new WeakMap);var i=Fs[n],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var h=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))h(m);else try{var d=m.getAttribute(r),C=d!==null&&d!=="false",g=(Xr.get(m)||0)+1,w=(i.get(m)||0)+1;Xr.set(m,g),i.set(m,w),s.push(m),g===1&&C&&Ls.set(m,!0),w===1&&m.setAttribute(n,"true"),C||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return h(t),a.clear(),ic++,function(){s.forEach(function(f){var m=Xr.get(f)-1,d=i.get(f)-1;Xr.set(f,m),i.set(f,d),m||(Ls.has(f)||f.removeAttribute(r),Ls.delete(f)),d||f.removeAttribute(n)}),ic--,ic||(Xr=new WeakMap,Xr=new WeakMap,Ls=new WeakMap,Fs={})}},GN=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=UN(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),HN(r,o,n,"aria-hidden")):function(){return null}},hl="Dialog",[o0,oR]=Pn(hl),[QN,Xt]=o0(hl),i0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=p.useRef(null),l=p.useRef(null),[c,h]=Ja({prop:r,defaultProp:o??!1,onChange:i,caller:hl});return u.jsx(QN,{scope:t,triggerRef:a,contentRef:l,contentId:qs(),titleId:qs(),descriptionId:qs(),open:c,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(f=>!f),[h]),modal:s,children:n})};i0.displayName=hl;var s0="DialogTrigger",KN=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xt(s0,n),i=Oe(t,o.triggerRef);return u.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zd(o.open),...r,ref:i,onClick:le(e.onClick,o.onOpenToggle)})});KN.displayName=s0;var Xd="DialogPortal",[YN,a0]=o0(Xd,{forceMount:void 0}),l0=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Xt(Xd,t);return u.jsx(YN,{scope:t,forceMount:n,children:p.Children.map(r,s=>u.jsx(Wr,{present:n||i.open,children:u.jsx(Td,{asChild:!0,container:o,children:s})}))})};l0.displayName=Xd;var La="DialogOverlay",c0=p.forwardRef((e,t)=>{const n=a0(La,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Xt(La,e.__scopeDialog);return i.modal?u.jsx(Wr,{present:r||i.open,children:u.jsx(qN,{...o,ref:t})}):null});c0.displayName=La;var XN=zi("DialogOverlay.RemoveScroll"),qN=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xt(La,n);return u.jsx(n0,{as:XN,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(de.div,{"data-state":Zd(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Br="DialogContent",u0=p.forwardRef((e,t)=>{const n=a0(Br,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Xt(Br,e.__scopeDialog);return u.jsx(Wr,{present:r||i.open,children:i.modal?u.jsx(ZN,{...o,ref:t}):u.jsx(JN,{...o,ref:t})})});u0.displayName=Br;var ZN=p.forwardRef((e,t)=>{const n=Xt(Br,e.__scopeDialog),r=p.useRef(null),o=Oe(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return GN(i)},[]),u.jsx(d0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:le(e.onFocusOutside,i=>i.preventDefault())})}),JN=p.forwardRef((e,t)=>{const n=Xt(Br,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return u.jsx(d0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),d0=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Xt(Br,n),l=p.useRef(null),c=Oe(t,l);return sN(),u.jsxs(u.Fragment,{children:[u.jsx(Qy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:u.jsx(Za,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Zd(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(eP,{titleId:a.titleId}),u.jsx(nP,{contentRef:l,descriptionId:a.descriptionId})]})]})}),qd="DialogTitle",f0=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xt(qd,n);return u.jsx(de.h2,{id:o.titleId,...r,ref:t})});f0.displayName=qd;var h0="DialogDescription",p0=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xt(h0,n);return u.jsx(de.p,{id:o.descriptionId,...r,ref:t})});p0.displayName=h0;var m0="DialogClose",g0=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Xt(m0,n);return u.jsx(de.button,{type:"button",...r,ref:t,onClick:le(e.onClick,()=>o.onOpenChange(!1))})});g0.displayName=m0;function Zd(e){return e?"open":"closed"}var v0="DialogTitleWarning",[iR,y0]=I1(v0,{contentName:Br,titleName:qd,docsSlug:"dialog"}),eP=({titleId:e})=>{const t=y0(v0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},tP="DialogDescriptionWarning",nP=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${y0(tP).contentName}}.`;return p.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},rP=i0,oP=l0,w0=c0,x0=u0,b0=f0,C0=p0,iP=g0;const S0=rP,sP=oP,E0=p.forwardRef(({className:e,...t},n)=>u.jsx(w0,{ref:n,className:Pe("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}));E0.displayName=w0.displayName;const Jd=p.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(sP,{children:[u.jsx(E0,{}),u.jsxs(x0,{ref:r,className:Pe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,u.jsxs(iP,{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:[u.jsx(Id,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Jd.displayName=x0.displayName;const ef=({className:e,...t})=>u.jsx("div",{className:Pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ef.displayName="DialogHeader";const tf=p.forwardRef(({className:e,...t},n)=>u.jsx(b0,{ref:n,className:Pe("text-lg font-semibold leading-none tracking-tight",e),...t}));tf.displayName=b0.displayName;const k0=p.forwardRef(({className:e,...t},n)=>u.jsx(C0,{ref:n,className:Pe("text-sm text-muted-foreground",e),...t}));k0.displayName=C0.displayName;const N0=p.forwardRef(({className:e,...t},n)=>u.jsx("textarea",{className:Pe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));N0.displayName="Textarea";var os={};(function e(t,n,r,o){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),s=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;try{var E=new OffscreenCanvas(1,1),b=E.getContext("2d");b.fillRect(0,0,1,1);var M=E.transferToImageBitmap();b.createPattern(M,"no-repeat")}catch{return!1}return!0}();function l(){}function c(E){var b=n.exports.Promise,M=b!==void 0?b:t.Promise;return typeof M=="function"?new M(E):(E(l,l),null)}var h=function(E,b){return{transform:function(M){if(E)return M;if(b.has(M))return b.get(M);var T=new OffscreenCanvas(M.width,M.height),I=T.getContext("2d");return I.drawImage(M,0,0),b.set(M,T),T},clear:function(){b.clear()}}}(a,new Map),f=function(){var E=Math.floor(16.666666666666668),b,M,T={},I=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(b=function(D){var U=Math.random();return T[U]=requestAnimationFrame(function z(Y){I===Y||I+E-1{const{toast:s}=es(),{t:a}=Et(),[l,c]=p.useState(o),[h,f]=p.useState(!1),m=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s({title:"Link copied!",description:"Referral link copied to clipboard"}),setTimeout(()=>f(!1),2e3)}catch{s({title:"Failed to copy",description:"Please try again",variant:"destructive"})}},d=g=>{const w=encodeURIComponent(l);let v="";switch(g){case"zalo":v=`https://zalo.me/share?text=${w}`;break;case"messenger":v=`fb-messenger://share?link=${encodeURIComponent(r)}&text=${w}`;break;case"whatsapp":v=`https://wa.me/?text=${w}`;break}window.open(v,"_blank"),aP({particleCount:100,spread:70,origin:{y:.6}}),s({title:"Thanks for sharing!",description:"We've sent the invite. You'll earn cashback when they book."})},C=g=>{g||t()};return u.jsx(S0,{open:e,onOpenChange:C,children:u.jsxs(Jd,{className:"max-w-md",children:[u.jsxs(ef,{children:[u.jsx(tf,{className:"text-2xl",children:a("shareModal.title")}),u.jsx(k0,{children:a("shareModal.description",{serviceName:i})})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("p",{className:"mb-2 text-sm font-medium",children:a("shareModal.referralCodeLabel")}),u.jsx("div",{className:"rounded-lg bg-primary/10 p-4 text-center",children:u.jsx("p",{className:"text-2xl font-bold text-primary",children:n})})]}),u.jsxs("div",{children:[u.jsx("p",{className:"mb-2 text-sm font-medium",children:a("shareModal.messageLabel")}),u.jsx(N0,{value:l,onChange:g=>c(g.target.value),rows:4,className:"resize-none"})]}),u.jsx("div",{className:"flex gap-2",children:u.jsx(ct,{variant:"outline",size:"lg",className:"flex-1",onClick:m,children:h?u.jsxs(u.Fragment,{children:[u.jsx(jb,{className:"mr-2 h-4 w-4"}),a("common.copied")]}):u.jsxs(u.Fragment,{children:[u.jsx(Ib,{className:"mr-2 h-4 w-4"}),a("shareModal.copyLink")]})})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-sm font-medium",children:a("shareModal.shareVia")}),u.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[u.jsxs(ct,{variant:"outline",onClick:()=>d("zalo"),className:"flex-col gap-1 h-auto py-3",children:[u.jsx(kh,{className:"h-5 w-5"}),u.jsx("span",{className:"text-xs",children:a("shareModal.zalo")})]}),u.jsxs(ct,{variant:"outline",onClick:()=>d("messenger"),className:"flex-col gap-1 h-auto py-3",children:[u.jsx(kh,{className:"h-5 w-5"}),u.jsx("span",{className:"text-xs",children:a("shareModal.messenger")})]}),u.jsxs(ct,{variant:"outline",onClick:()=>d("whatsapp"),className:"flex-col gap-1 h-auto py-3",children:[u.jsx(Fb,{className:"h-5 w-5"}),u.jsx("span",{className:"text-xs",children:a("shareModal.whatsapp")})]})]})]}),u.jsx("div",{className:"rounded-lg bg-accent/10 p-4",children:u.jsx("p",{className:"text-sm text-muted-foreground",children:a("shareModal.estimatedEarnings")})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(ct,{variant:"outline",onClick:()=>d("zalo"),className:"flex-1",children:a("shareModal.shareAgain")}),u.jsx(ct,{onClick:t,className:"flex-1",children:a("shareModal.done")})]})]})]})})},Tu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAYAAAAcaxDBAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAY6SURBVHgB7Z0/bBxFFMa/Q26gSkQLyrlBVDh0hIKclYIGQ9KEhginAfFHMhGiIZZiSw4NQglSBAqNbaUijQNOgwTyQQF0sakQzW0ELbLTJOVkvpvdZL03uzuzM7vZ292fNFp793y++fa9N2/ezu4BHR0dLaKHJ4gQ4ojcDGTryzYnG38/Hh7ua/7kQLYgtt2TbZet1+sdoAZUKmhMwJOynYZetKLshu0H2YZ1EbgUpJAD2XZk2xfVsSXbaTQFWqNslyoWUcdItiXZ+phGRH2ETDIS6nP1MS0IZQl1EzLJSLZFlISXQUmos74ONeBMC4Fs83LwCuCRp+CIFHNJbu5gusQkfdlorZ+gDggVK9dFM7giVErnTCGXF8rFt/A4CW8CzGHPuIYAa0FDMXfgNymvCwEc46qVoA0XMyKAg6jGgrZEzIgABUU1EjQM2BSzSTEzD8bUeduagGnadAntEpOwv1dgSa6gQuWZ9cjVqmdRWOapmS4fxk0m7V5ytCmFLv+yaTzNs1BOJ9ssJmH/101fnCqoUAWEATrIQBgWVFJdXr7BCO1IkUyh68/mjfpaCw3PRh8dcej6uQOU1kI760wl10onLLSzzkxopYtZL9C5/BI6sngr6+AhQaV1cnbQ+BnRtV+AFz8HXv8KuPs/bOGIP0g7mLTQRVQIO3NwH5XB/0cRP7upfv7tH+C9DRQh9fL0oUGpysGIHbnxh/p5+Q3g4gJKhVZ5+bb+BD64DlsCOTDN6g48EjScZo5QAWvbqnNxjj0L/PSp2vqElsiTR2vUMfc88OcyijCrm47GXX6ACmAHk2JG+xnXLm/7CwM/ygLcK2vpYpLvP0BRtG4fFzRz9PJFXsxau50vQh48IYyTb3+bfXKWF5w8Yk63M+7yrCqVOsIzjrGjppw7oWKrTaejgSZv9OZ7/v0FXNDG0bigAiUSjbC2aQo7flEOWudezX4dLZGhhCfNBIrpGq+loBMzzbHLh/lnqTA2Fsj51KCymW11tEqGCVMxPz7lZ/ATmnVSUQwttebJ9ChKkVzegxZ+4/fD+3mibCw/snhPTBjiTLjtoyTGo/o2vBBZ6/YesCC7cu1n4K//rN5iLOaRZ+CLCUOcSTvgi6KunsX2rmq2vHMiPxZbMqFbqS7vw9V9QVdf9j8bSxXUO+NR15Or+4Cu7nsWpqM0QZnC+Hb1opTg6qmUIigHCtMUpmxKcvVUIkEDeOTsN6gNJbt6kNzh3ULXLEd1pjBfnlUltO8W/Xb+tRdKd/WJa0vjqVM4U7oDR6KKkSnscFLEKG/1kR34mF7mwMVkw/iOyEK93HXGGYspLHro6p/8nSK7WqtjJcmUiWw4XhzZh0M+qisa62Anb34IvPRc/mvv3VflPNsBzkMlyYQDaZ1HkzvjgnL95wAFMHV1FiWKTP32/lW1TdPYXIGrE95POp/cGR+U9lCQvKJxdHmDg0+ReTQvU1Akk+tOFbk60eoVF3SIAtAds6rrtEpes+EA5Aov5mVZn+dKUh5D3c64yzN+7sMSurrOFWmJ198F3iyp0srYmpzaVuTqEUd1S3KSl5Gt4+jT70/u06VDZRClWPceAB+d8uMFhmjjJ0kKytVlVuvK45ZCq6TL0c0bznkp6IbuQFJQuj2vzVulT6xN0lpYhPBYvK0zs2lLxCcuMklRecth6lKTDmxIMc+nHdTN5b9GRxabWQcnBA3npkN06Bgm5+5J0qpNq+jQkauLVtDOSrVs5FknyboLpI+KVuNNCbMmN3+lFpjDP+5cX7Fqeidd7t3IVSwiqzmpi2t1mFwCOQNPBegphP2et/mDXEFDU7+AdnLB9iEERhfpwnlr2+Lpatp83Rsynq6IdrCCqhDNF3UFVSOaK+oKHCn87DvRvKoUB6CrcMRl5cgmmsE4NfIhJnERNMD0M4R6nsgQnnARdJqTfX52urj3x13OoH2wgL5S1kOv2yToBiyKHEVxEXQaXJ6fkRZ5tVfRY9gLp02EiRvqB4W7Jdumz8HGlKpcPrKUW7KTu0I9EYElwZPhto/iBFDLCn+F+saFIZ4grhaatwTSyOWEWg9wHIe/uuKY5qV3w/dko4hBr0nfqCDSp6A7IuO5HB0ZhKKOhHp+/VYnZEdHR4t4CNOT8toygsxJAAAAAElFTkSuQmCC",ju=p.forwardRef(({className:e,type:t,...n},r)=>u.jsx("input",{type:t,className:Pe("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}));ju.displayName="Input";var cP="Label",P0=p.forwardRef((e,t)=>u.jsx(de.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));P0.displayName=cP;var R0=P0;const uP=nl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),na=p.forwardRef(({className:e,...t},n)=>u.jsx(R0,{ref:n,className:Pe(uP(),e),...t}));na.displayName=R0.displayName;var dP=p.createContext(void 0);function T0(e){const t=p.useContext(dP);return e||t||"ltr"}var sc="rovingFocusGroup.onEntryFocus",fP={bubbles:!1,cancelable:!0},is="RovingFocusGroup",[Mu,j0,hP]=Kg(is),[pP,M0]=Pn(is,[hP]),[mP,gP]=pP(is),A0=p.forwardRef((e,t)=>u.jsx(Mu.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Mu.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(vP,{...e,ref:t})})}));A0.displayName=is;var vP=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:h=!1,...f}=e,m=p.useRef(null),d=Oe(t,m),C=T0(i),[g,w]=Ja({prop:s,defaultProp:a??null,onChange:l,caller:is}),[v,y]=p.useState(!1),x=It(c),S=j0(n),k=p.useRef(!1),[P,R]=p.useState(0);return p.useEffect(()=>{const j=m.current;if(j)return j.addEventListener(sc,x),()=>j.removeEventListener(sc,x)},[x]),u.jsx(mP,{scope:n,orientation:r,dir:C,loop:o,currentTabStopId:g,onItemFocus:p.useCallback(j=>w(j),[w]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>R(j=>j+1),[]),onFocusableItemRemove:p.useCallback(()=>R(j=>j-1),[]),children:u.jsx(de.div,{tabIndex:v||P===0?-1:0,"data-orientation":r,...f,ref:d,style:{outline:"none",...e.style},onMouseDown:le(e.onMouseDown,()=>{k.current=!0}),onFocus:le(e.onFocus,j=>{const F=!k.current;if(j.target===j.currentTarget&&F&&!v){const L=new CustomEvent(sc,fP);if(j.currentTarget.dispatchEvent(L),!L.defaultPrevented){const W=S().filter(K=>K.focusable),$=W.find(K=>K.active),H=W.find(K=>K.id===g),q=[$,H,...W].filter(Boolean).map(K=>K.ref.current);L0(q,h)}}k.current=!1}),onBlur:le(e.onBlur,()=>y(!1))})})}),I0="RovingFocusGroupItem",O0=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=qs(),c=i||l,h=gP(I0,n),f=h.currentTabStopId===c,m=j0(n),{onFocusableItemAdd:d,onFocusableItemRemove:C,currentTabStopId:g}=h;return p.useEffect(()=>{if(r)return d(),()=>C()},[r,d,C]),u.jsx(Mu.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:u.jsx(de.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...a,ref:t,onMouseDown:le(e.onMouseDown,w=>{r?h.onItemFocus(c):w.preventDefault()}),onFocus:le(e.onFocus,()=>h.onItemFocus(c)),onKeyDown:le(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){h.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const v=xP(w,h.orientation,h.dir);if(v!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let x=m().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const S=x.indexOf(w.currentTarget);x=h.loop?bP(x,S+1):x.slice(S+1)}setTimeout(()=>L0(x))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});O0.displayName=I0;var yP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xP(e,t,n){const r=wP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yP[r]}function L0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var CP=A0,SP=O0;function EP(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nf="Radio",[kP,F0]=Pn(nf),[NP,PP]=kP(nf),_0=p.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:c,...h}=e,[f,m]=p.useState(null),d=Oe(t,w=>m(w)),C=p.useRef(!1),g=f?c||!!f.closest("form"):!0;return u.jsxs(NP,{scope:n,checked:o,disabled:s,children:[u.jsx(de.button,{type:"button",role:"radio","aria-checked":o,"data-state":B0(o),"data-disabled":s?"":void 0,disabled:s,value:a,...h,ref:d,onClick:le(e.onClick,w=>{o||l==null||l(),g&&(C.current=w.isPropagationStopped(),C.current||w.stopPropagation())})}),g&&u.jsx($0,{control:f,bubbles:!C.current,name:r,value:a,checked:o,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});_0.displayName=nf;var D0="RadioIndicator",z0=p.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=PP(D0,n);return u.jsx(Wr,{present:r||i.checked,children:u.jsx(de.span,{"data-state":B0(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});z0.displayName=D0;var RP="RadioBubbleInput",$0=p.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=p.useRef(null),a=Oe(s,i),l=EP(n),c=Hv(t);return p.useEffect(()=>{const h=s.current;if(!h)return;const f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&d){const C=new Event("click",{bubbles:r});d.call(h,n),h.dispatchEvent(C)}},[l,n,r]),u.jsx(de.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$0.displayName=RP;function B0(e){return e?"checked":"unchecked"}var TP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],pl="RadioGroup",[jP,sR]=Pn(pl,[M0,F0]),V0=M0(),U0=F0(),[MP,AP]=jP(pl),W0=p.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:c,loop:h=!0,onValueChange:f,...m}=e,d=V0(n),C=T0(c),[g,w]=Ja({prop:i,defaultProp:o??null,onChange:f,caller:pl});return u.jsx(MP,{scope:n,name:r,required:s,disabled:a,value:g,onValueChange:w,children:u.jsx(CP,{asChild:!0,...d,orientation:l,dir:C,loop:h,children:u.jsx(de.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:C,...m,ref:t})})})});W0.displayName=pl;var H0="RadioGroupItem",G0=p.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=AP(H0,n),s=i.disabled||r,a=V0(n),l=U0(n),c=p.useRef(null),h=Oe(t,c),f=i.value===o.value,m=p.useRef(!1);return p.useEffect(()=>{const d=g=>{TP.includes(g.key)&&(m.current=!0)},C=()=>m.current=!1;return document.addEventListener("keydown",d),document.addEventListener("keyup",C),()=>{document.removeEventListener("keydown",d),document.removeEventListener("keyup",C)}},[]),u.jsx(SP,{asChild:!0,...a,focusable:!s,active:f,children:u.jsx(_0,{disabled:s,required:i.required,checked:f,...l,...o,name:i.name,ref:h,onCheck:()=>i.onValueChange(o.value),onKeyDown:le(d=>{d.key==="Enter"&&d.preventDefault()}),onFocus:le(o.onFocus,()=>{var d;m.current&&((d=c.current)==null||d.click())})})})});G0.displayName=H0;var IP="RadioGroupIndicator",Q0=p.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=U0(n);return u.jsx(z0,{...o,...r,ref:t})});Q0.displayName=IP;var K0=W0,Y0=G0,OP=Q0;const X0=p.forwardRef(({className:e,...t},n)=>u.jsx(K0,{className:Pe("grid gap-2",e),...t,ref:n}));X0.displayName=K0.displayName;const Au=p.forwardRef(({className:e,...t},n)=>u.jsx(Y0,{ref:n,className:Pe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(OP,{className:"flex items-center justify-center",children:u.jsx(Ab,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Au.displayName=Y0.displayName;const LP=({isLoadingCode:e,showReferralCode:t,referralCode:n,referralCodeErrorMessage:r})=>{const{t:o}=Et();return e?u.jsx("div",{className:"mt-4 p-3 bg-primary/10 rounded-lg border border-primary/20",children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Lb,{className:"h-4 w-4 animate-spin text-primary"}),u.jsx("p",{className:"text-sm text-foreground",children:o("referralForm.loadingMessage")})]})}):t&&!e?u.jsx("div",{className:`mt-4 p-3 rounded-lg border ${n?"bg-primary/10 border-primary/20":"bg-destructive/10 border-destructive/20"}`,children:n?u.jsxs("p",{className:"text-sm text-foreground",children:[o("referralForm.referralCodePrefix")," ",u.jsx("span",{className:"font-bold text-primary",children:n}),o("referralForm.referralCodeSuffix")]}):u.jsx("p",{className:"text-sm text-destructive",children:r||o("referralForm.referralCodeErrorGeneric")})}):null},Iu=({formData:e,onFormDataChange:t,isLoadingCode:n=!1,showReferralCode:r=!1,referralCode:o=null,referralCodeErrorMessage:i,isFormFilled:s=!1,onFormSubmission:a,idPrefix:l="",className:c="",enableAutoSubmission:h=!1})=>{const{t:f}=Et(),m=p.useRef(null),d=p.useRef(null),[C,g]=p.useState(!1),[w,v]=p.useState(!1),y=p.useRef(!1),x=p.useRef(!1),S=p.useRef(0),k=p.useRef(typeof window<"u"?window.innerHeight:0),P=p.useRef(!1);p.useEffect(()=>{if(typeof window>"u")return;const b=()=>{var I;const M=((I=window.visualViewport)==null?void 0:I.height)||window.innerHeight,T=k.current;if(T>0&&M>T+100&&P.current){const D=Date.now()-S.current,U=R();y.current&&U&&D>=300&&!n&&a&&(j(),a()),P.current=!1}k.current=M};return window.visualViewport&&window.visualViewport.addEventListener("resize",b),window.addEventListener("resize",b),()=>{window.visualViewport&&window.visualViewport.removeEventListener("resize",b),window.removeEventListener("resize",b)}},[e,n,a]);const R=()=>{const b=Je.validateFullName(e.fullName),M=Je.validatePhoneNumber(e.phoneNumber);return b&&M},j=()=>{var b,M;(b=m.current)==null||b.blur(),(M=d.current)==null||M.blur()},F=b=>{R()&&!n&&a&&(j(),a(b))},L=b=>{b.key==="Enter"&&(b.preventDefault(),F())},W=(b=!1)=>{if(e.fullName.length>0){const D=Je.validateFullName(e.fullName);v(!D)}else v(!1);if(e.phoneNumber.length>4){const D=Je.validatePhoneNumber(e.phoneNumber);g(!D)}else g(!1);const M=Date.now()-S.current,T=R();let I=!1;b&&P.current?I=y.current&&T&&M>=300:I=y.current&&x.current&&T&&M>=300,I&&F(),x.current=T,P.current=!1},$=b=>{const M=R();if(x.current=M,S.current=Date.now(),t({...e,fullName:b}),y.current=!0,b.length>0){const I=Je.validateFullName(b);v(!I)}else v(!1);const T=Je.validateFullName(b)&&Je.validatePhoneNumber(e.phoneNumber);!M&&T&&(x.current=!1)},H=b=>{const M=R();if(x.current=M,S.current=Date.now(),b.startsWith("+84")?b.startsWith("+84")&&!b.startsWith("+84 ")&&(b="+84 "+b.substring(3).replace(/^\s+/,"")):b="+84 "+b.replace(/^\+?84\s*/,""),b.length<4&&(b="+84 "),t({...e,phoneNumber:b}),y.current=!0,b.length>4){const I=Je.validatePhoneNumber(b);g(!I)}else g(!1);const T=Je.validateFullName(e.fullName)&&Je.validatePhoneNumber(b);!M&&T&&(x.current=!1)},B=b=>{const M=b.currentTarget,T=M.selectionStart||0,I=M.selectionEnd||0,D=T!==I;if(!(b.key==="a"&&(b.ctrlKey||b.metaKey))){if(D){b.key==="Enter"&&(b.preventDefault(),F());return}if((b.key==="Backspace"||b.key==="Delete")&&T<=4){b.preventDefault(),setTimeout(()=>{M.setSelectionRange(4,4)},0);return}b.key==="Enter"&&(b.preventDefault(),F())}},q=b=>{var T;const M=b.currentTarget;P.current=!0,typeof window<"u"&&(k.current=((T=window.visualViewport)==null?void 0:T.height)||window.innerHeight),setTimeout(()=>{(M.selectionStart||0)<4&&M.setSelectionRange(4,4)},0)},K=b=>{Ir("Your Information","Referral Program",b==="zalopay"?"Zalopay":"Momo"),t({...e,wallet:b}),y.current=!0,F(b)},X=l?`${l}-fullName`:"fullName",A=l?`${l}-phoneNumber`:"phoneNumber",O=l?`${l}-zalopay`:"zalopay",E=l?`${l}-momo`:"momo";return u.jsxs("div",{className:`space-y-4 md:space-y-6 ${c}`,children:[u.jsxs("div",{children:[u.jsx(ju,{ref:m,id:X,placeholder:f("form.fullNamePlaceholder"),value:e.fullName,onChange:b=>$(b.target.value),onKeyDown:b=>L(b),onBlur:()=>W(!1),required:!0,className:w?"border-yellow-500 focus-visible:border-yellow-500":""}),w&&u.jsx("div",{className:"mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:u.jsx("p",{className:"text-sm text-yellow-800",children:f("validation.nameMinLength")})})]}),u.jsxs("div",{children:[u.jsx(ju,{ref:d,id:A,type:"tel",placeholder:f("form.phoneNumberPlaceholder"),value:e.phoneNumber,onChange:b=>H(b.target.value),onKeyDown:B,onFocus:q,onBlur:()=>W(!0),required:!0,className:`border-accent/50 ring-accent focus-visible:border-accent focus-visible:ring-accent ${C?"border-yellow-500 focus-visible:border-yellow-500":""}`}),C&&u.jsx("div",{className:"mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:u.jsx("p",{className:"text-sm text-yellow-800",children:f("validation.invalidPhoneNumber")})})]}),u.jsxs("div",{className:"w-full",children:[u.jsx(na,{className:"mb-3 block",children:f("form.preferredWallet")}),u.jsxs(X0,{value:e.wallet,onValueChange:K,disabled:n,className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx(Au,{value:"zalopay",id:O,className:"peer sr-only",disabled:n}),u.jsx(na,{htmlFor:O,className:`flex items-center justify-center rounded-lg border-2 border-muted bg-background p-3 peer-data-[state=checked]:border-accent peer-data-[state=checked]:bg-accent/10 ${n?"cursor-not-allowed opacity-50":"cursor-pointer hover:bg-accent/5"}`,"data-event-category":"Referral Program","data-event-action":"Your Information","data-event-label":"Zalopay",children:u.jsx("div",{className:"text-center",children:u.jsx("p",{className:"font-semibold",children:f("form.zalopay")})})})]}),u.jsxs("div",{children:[u.jsx(Au,{value:"momo",id:E,className:"peer sr-only",disabled:n}),u.jsx(na,{htmlFor:E,className:`flex items-center justify-center rounded-lg border-2 border-muted bg-background p-3 peer-data-[state=checked]:border-accent peer-data-[state=checked]:bg-accent/10 ${n?"cursor-not-allowed opacity-50":"cursor-pointer hover:bg-accent/5"}`,"data-event-category":"Referral Program","data-event-action":"Your Information","data-event-label":"Momo",children:u.jsx("div",{className:"text-center",children:u.jsx("p",{className:"font-semibold",children:f("form.momo")})})})]})]})]}),u.jsx(LP,{isLoadingCode:n,showReferralCode:r,referralCode:o,referralCodeErrorMessage:i})]})},FP=({isOpen:e,onClose:t,service:n,onShare:r,formData:o,onFormDataChange:i,sharedReferralCode:s,sharedIsLoadingCode:a,sharedShowReferralCode:l,sharedApiError:c,onSharedFormSubmission:h})=>{const{toast:f}=es(),{t:m}=Et(),[d,C]=p.useState(!1),[g,w]=p.useState(window.innerHeight),[v,y]=p.useState(window.innerHeight),[x,S]=p.useState(!1),[k,P]=p.useState(!1),R=p.useRef(null);p.useEffect(()=>{var q;if(!e)return;const H=((q=window.visualViewport)==null?void 0:q.height)||window.innerHeight;y(H),w(H);const B=()=>{var X;const K=((X=window.visualViewport)==null?void 0:X.height)||window.innerHeight;w(K)};return window.visualViewport&&window.visualViewport.addEventListener("resize",B),window.addEventListener("resize",B),B(),()=>{window.visualViewport&&window.visualViewport.removeEventListener("resize",B),window.removeEventListener("resize",B)}},[e]),p.useEffect(()=>{if(e)S(!0),C(!1),P(!1),setTimeout(()=>{P(!0)},10);else{C(!1),P(!1);const H=setTimeout(()=>S(!1),500);return()=>clearTimeout(H)}},[e]),p.useEffect(()=>{if(e){const H=window.scrollY;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.top=`-${H}px`,document.body.dataset.scrollY=H.toString()}else{const H=document.body.dataset.scrollY;document.body.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.top="",H&&(window.scrollTo(0,parseInt(H)),delete document.body.dataset.scrollY)}return()=>{if(e){const H=document.body.dataset.scrollY;document.body.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.top="",H&&window.scrollTo(0,parseInt(H))}}},[e]);const j=Je.countAlphabeticalChars(o.fullName)>=3&&Je.validatePhoneNumber(o.phoneNumber),F=async()=>{if(!Je.validatePhoneNumber(o.phoneNumber)){f({title:m("validation.invalidPhoneNumber"),description:m("validation.invalidPhoneNumberDescription"),variant:"destructive"});return}if(!n)return;if(Ir("Popup","Referral Program",s?"Messenger CTA":"Messenger CTA - No code"),!s&&!a){await h();return}if(!a){if(!s){f({title:m("toast.referralCodeError"),description:m("referralForm.referralCodeErrorGeneric"),variant:"destructive"});return}r(n.id)}};if(!n)return null;const W=v-g>300&&g{const n=window.matchMedia(`(max-width: ${ac-1}px)`),r=()=>{t(window.innerWidthn.removeEventListener("change",r)},[]),!!e}function DP(e,t,n){if(typeof window>"u")return;const r="2759888574045636",o=t,i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),s=`fb-messenger://share/?text=${encodeURIComponent(`${n}`)}&link=${encodeURIComponent(e)}`,a=`https://www.facebook.com/dialog/send?app_id=${encodeURIComponent(r)}&link=${encodeURIComponent(e)}&redirect_uri=${encodeURIComponent(o)}`;if(i){const l=window.open(s,"_blank");if(!l){window.open(a,"_blank");return}setTimeout(()=>{try{l.location.href=a}catch{}},700);return}window.open(a,"_blank")}const zP=()=>{es();const{t:e}=Et(),{services:t}=Gy(),[n,r]=p.useState({fullName:"",phoneNumber:"+84 ",wallet:"zalopay"}),[o,i]=p.useState(""),[s,a]=p.useState(!1),[l,c]=p.useState(!1),[h,f]=p.useState(null),[m,d]=p.useState(!1),C=Je.validatePhoneNumber,g=Je.countAlphabeticalChars(n.fullName)>=3&&C(n.phoneNumber),w=()=>{if(typeof window>"u")return!1;try{const k=window.localStorage.getItem("referrals");if(!k)return!1;const P=JSON.parse(k);return Array.isArray(P)&&P.length>0}catch(k){return console.warn("Unable to read referrals from localStorage",k),!1}};p.useEffect(()=>{d(w())},[]);const v=k=>{if(!(typeof window>"u"))try{window.localStorage.setItem("referrals",JSON.stringify(k)),d(!0)}catch(P){console.warn("Unable to persist referrals to localStorage",P)}},y=()=>{const k=new Map;return t.forEach(P=>{const R=`${P.hospitalId}-${P.productType}`;k.has(R)||k.set(R,{hospitalId:P.hospitalId,productType:P.productType})}),Array.from(k.values())},x=async k=>{var P;a(!0),f(null),c(!1),i("");try{const R=n.phoneNumber.replace(/\s/g,""),j={zalopay:"ZaloPay",momo:"MoMo"},F=k||n.wallet,W=await fetch("https://sparkle-rewards-be.hellohealthgroup.com/referral-code",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({fullName:n.fullName.trim(),phone:R,eWallet:j[F],referrals:y()})});if(!W.ok){const H=await W.text();throw console.error("❌ HTTP Error:",W.status,H),new Error(`HTTP ${W.status}: ${H}`)}const $=await W.json();if($.success){const H=$.data.codeGroup;return i(H),c(!0),(P=$.data)!=null&&P.referrals&&v($.data.referrals),H}else throw new Error($.error||"Failed to generate referral code")}catch(R){return console.error("❌ API Error:",R),f(e("referralForm.referralCodeErrorGeneric")),c(!0),null}finally{a(!1)}};return{formData:n,setFormData:r,referralCode:o,isLoadingCode:s,showReferralCode:l,apiError:h,hasStoredReferrals:m,isFormFilled:g,validatePhone:C,handleFormSubmission:async k=>{g&&!s&&await x(k)},callReferralAPI:x}},$P="https://hellobacsi.com",BP=({preselectedService:e})=>{var M;const{formData:t,setFormData:n,referralCode:r,isLoadingCode:o,showReferralCode:i,apiError:s,hasStoredReferrals:a,isFormFilled:l,validatePhone:c,handleFormSubmission:h,callReferralAPI:f}=zP(),{toast:m}=es(),{t:d}=Et(),{services:C}=Gy(),g=_P(),[w,v]=p.useState({serviceId:e||"",message:""}),[y,x]=p.useState(!1),[S,k]=p.useState(""),[P,R]=p.useState(!1),[j,F]=p.useState(!1),[L,W]=p.useState(null),$=s||d("referralForm.referralCodeErrorGeneric"),H=i&&a,B=(T,I)=>{if(typeof window>"u")return null;try{const D=window.localStorage.getItem("referrals");if(!D)return null;const U=JSON.parse(D);if(!Array.isArray(U))return null;const z=U.find(Y=>Y.hospitalId===T&&Y.productType===I);return((z==null?void 0:z.code)||(z==null?void 0:z.codeGroup))??null}catch(D){return console.warn("Unable to read referral code from localStorage",D),null}},q=()=>{m({title:d("toast.generateReferralCodeTitle"),description:d("toast.generateReferralCodeDescription")});const T=document.getElementById("referral-form");T&&T.scrollIntoView({behavior:"smooth",block:"start"})},K=(T,I,D)=>{var Y;const U=T.target;if(!(U.closest("[data-share-button]")||U.closest("button")||U.getAttribute("role")==="button")){if(typeof D=="number"){const ee=D+1;let se;l?se=(Y=I.url)!=null&&Y.endsWith("/payment")?I.url.slice(0,-8):I.url||"#":se="Service Click - No Code",Ir(`Service Click ${ee}`,"Referral Program",se)}if(!l)W(I),g?R(!0):F(!0);else if(I.url){const ee=I.url.endsWith("/payment")?I.url.slice(0,-8):I.url;window.open(ee,"_blank")}else{v({...w,serviceId:I.id});const ee=document.querySelector("#referral-form form");ee&&ee.scrollIntoView({behavior:"smooth",block:"nearest"})}}},X=(T,I)=>{const D=B(T.hospitalId,T.productType);if(!D)return q(),!1;if(!T.url)return m({title:d("toast.referralCodeError"),description:d("referralForm.referralCodeErrorGeneric"),variant:"destructive"}),!1;try{const U=new URL(T.url);U.searchParams.set("referral_code",D),U.searchParams.set("referral_code_group",I);const z=d("referralForm.serviceShareMessage",{discount:T.friendDiscount,serviceName:T.name});return DP(U.toString(),$P,z),!0}catch(U){return console.warn("Unable to open referral link",U),m({title:d("toast.referralCodeError"),description:d("referralForm.referralCodeErrorGeneric"),variant:"destructive"}),!1}},A=(T,I,D)=>{if(T.stopPropagation(),T.preventDefault(),typeof D=="number"){const U=D+1,z=!H||!l?"Messenger CTA - No code":"Messenger CTA";Ir(`CTA Click ${U}`,"Referral Program",z)}if(!H||!l){W(I),g?R(!0):F(!0);return}X(I,r)},O=async(T,I)=>{v(Y=>({...Y,serviceId:T}));let D=r;if(!D&&!o&&(D=await f(),!D)){m({title:d("toast.referralCodeError"),description:d("referralForm.referralCodeErrorGeneric"),variant:"destructive"});return}if(!D||o){D||m({title:d("toast.referralCodeError"),description:d("referralForm.referralCodeErrorGeneric"),variant:"destructive"});return}const U=C.find(Y=>Y.id===T);if(!U){m({title:d("toast.referralCodeError"),description:d("referralForm.referralCodeErrorGeneric"),variant:"destructive"});return}X(U,D)&&(m({title:d("toast.openingMessenger"),description:d("toast.shareReferralLink")}),I==null||I())},E=async T=>{await O(T,()=>{R(!1)})},b=async()=>{if(!c(t.phoneNumber)){m({title:d("validation.invalidPhoneNumber"),description:d("validation.invalidPhoneNumberDescription"),variant:"destructive"});return}L&&((r||l)&&Ir("Popup","Referral Program","Messenger CTA"),await O(L.id,()=>{F(!1)}))};return u.jsxs(u.Fragment,{children:[u.jsx("section",{id:"referral-form",className:"scroll-mt-20 pt-6 md:pt-8 lg:pt-10 pb-2 md:pb-4 lg:pb-6",children:u.jsxs("div",{className:"container mx-auto px-4",children:[u.jsxs("div",{className:"mt-4 mb-8 md:mb-12 text-left",children:[u.jsx("h2",{className:"mb-3 md:mb-4 text-2xl md:text-3xl lg:text-4xl font-bold text-foreground text-center",children:d("referralForm.title")}),u.jsx("p",{className:"text-base md:text-lg text-slate-800 font-normal",children:d("referralForm.description")})]}),u.jsxs("div",{className:"mb-6 md:mb-8",children:[u.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[u.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary/20 text-primary font-semibold text-sm",children:"1"}),u.jsx("h3",{className:"text-xl md:text-2xl font-bold text-foreground",children:d("referralForm.step1Title")})]}),u.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:d("referralForm.step1Description")}),u.jsx("div",{className:"rounded-2xl bg-card p-4 md:p-8 shadow-[var(--shadow-card)]",children:u.jsx("div",{className:"w-full md:w-[70%]",children:u.jsx(Iu,{formData:t,onFormDataChange:n,isLoadingCode:o,showReferralCode:i,referralCode:r,referralCodeErrorMessage:$,isFormFilled:l,onFormSubmission:h,enableAutoSubmission:!0})})})]}),u.jsxs("div",{id:"services-section",className:"mb-8 md:mb-12 mt-4 md:mt-6",children:[u.jsxs("div",{className:"mb-8 flex items-center gap-3",children:[u.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary/20 text-primary font-semibold text-sm",children:"2"}),u.jsx("h3",{className:"text-xl md:text-2xl font-bold text-foreground",children:d("referralForm.step2Title")})]}),u.jsx("div",{className:"grid gap-6 md:gap-6 sm:grid-cols-2 lg:grid-cols-3",children:C.map((T,I)=>{var D;return u.jsxs("div",{onClick:U=>K(U,T,I),className:"group relative overflow-hidden rounded-2xl bg-card border border-border shadow-[var(--shadow-card)] transition-all hover:shadow-[var(--shadow-card-hover)] cursor-pointer","data-event-category":"Referral Program","data-event-action":`Service Click ${I+1}`,"data-event-label":(D=T.url)!=null&&D.endsWith("/payment")?T.url.slice(0,-8):T.url||"#",children:[u.jsxs("div",{className:"relative h-32 md:h-40 overflow-hidden",children:[u.jsx("img",{src:T.image,alt:T.name,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"}),u.jsx("div",{className:"absolute inset-0 p-3 md:p-4 flex flex-col justify-end",children:u.jsxs("div",{className:"flex items-end justify-between gap-2",children:[u.jsx("div",{className:"w-fit text-xs bg-black/50 text-white border-black/30 backdrop-blur-sm px-2 py-1 rounded",children:d("referralForm.for",{persona:T.persona.replace("Recommended for ","")})}),u.jsx("div",{className:"w-fit text-xs bg-black/50 text-white border-black/30 backdrop-blur-sm px-2 py-1 rounded",children:T.clinic})]})})]}),u.jsxs("div",{className:"p-3 pb-4 md:p-4 md:pb-5",children:[u.jsx("h4",{className:"mb-1 md:mb-2 text-base md:text-lg font-bold text-card-foreground line-clamp-2",children:T.name}),u.jsx("p",{className:"mb-3 md:text-sm text-muted-foreground line-clamp-3 text-sm",children:T.description}),T.friendDiscount&&T.friendPrice&&u.jsxs("div",{className:"mb-3 p-2 bg-accent/10 rounded-lg border border-accent/20",children:[u.jsx("p",{className:"text-xs font-semibold text-accent mb-1",children:d("referralForm.friendGets",{discount:T.friendDiscount})}),u.jsxs("p",{className:"text-xs font-bold text-foreground",children:[d("referralForm.finalPrice",{price:T.friendPrice})," ",u.jsx("span",{className:"ml-2 text-[10px] font-normal text-muted-foreground line-through",children:T.price})]})]}),u.jsx("p",{className:"mb-3 text-sm text-primary font-semibold",children:d("referralForm.winPerReferral",{amount:T.cashback})}),u.jsxs("div",{"data-share-button":!0,className:"w-full bg-[#0866FF] text-white py-3 rounded-md text-center text-sm font-medium group-hover:bg-[#0654CC] transition-colors flex items-center justify-center gap-2 cursor-pointer",onClick:U=>A(U,T,I),onMouseDown:U=>U.stopPropagation(),onMouseUp:U=>U.stopPropagation(),"data-event-category":"Referral Program","data-event-action":`CTA Click ${I+1}`,"data-event-label":"Messenger CTA",children:[u.jsx("img",{src:Tu,alt:d("referralForm.messengerAlt"),className:"w-5 h-5"}),d("referralForm.shareWithFriend")]})]})]},T.id)})})]})]})}),u.jsx(lP,{isOpen:y,onClose:()=>x(!1),referralCode:r,referralLink:S,message:w.message,serviceName:((M=C.find(T=>T.id===w.serviceId))==null?void 0:M.name)||""}),u.jsx(FP,{isOpen:P,onClose:()=>R(!1),service:L,onShare:E,formData:t,onFormDataChange:n,sharedReferralCode:r,sharedIsLoadingCode:o,sharedShowReferralCode:i,sharedApiError:s,onSharedFormSubmission:h}),u.jsx(S0,{open:j,onOpenChange:T=>{F(T)},children:u.jsxs(Jd,{className:"sm:max-w-[500px]",children:[u.jsx(ef,{children:u.jsx(tf,{className:"text-xl font-bold",children:L==null?void 0:L.name})}),u.jsx("p",{className:"text-sm text-muted-foreground",children:d("referralForm.step1Description")}),u.jsxs("div",{className:"pt-4",children:[u.jsx(Iu,{formData:t,onFormDataChange:n,isLoadingCode:o,showReferralCode:i,referralCode:r,referralCodeErrorMessage:$,isFormFilled:l,onFormSubmission:h,idPrefix:"dialog",enableAutoSubmission:!0}),u.jsxs(ct,{onClick:b,disabled:!l||o,className:"w-full mt-4 bg-[#0866FF] text-white hover:bg-[#0654CC] flex items-center justify-center gap-2","data-event-category":"Referral Program","data-event-action":"Popup","data-event-label":"Messenger CTA",children:[u.jsx("img",{src:Tu,alt:d("referralForm.messengerAlt"),className:"w-5 h-5"}),d(o?"referralForm.loadingMessage":"referralForm.shareWithFriend")]})]})]})})]})},VP=()=>{const[e,t]=p.useState(!1);p.useEffect(()=>{const o=(()=>{var a;const s=document.querySelectorAll("h3");for(const l of s)if((a=l.textContent)!=null&&a.includes("Leaderboard"))return l.closest('div[class*="rounded-2xl"]');return null})();if(!o)return;const i=new IntersectionObserver(s=>{s.forEach(a=>{t(a.isIntersecting)})},{threshold:.1,rootMargin:"0px"});return i.observe(o),()=>{o&&i.unobserve(o)}},[]);const n=()=>{const r=document.getElementById("referral-form");r&&r.scrollIntoView({behavior:"smooth",block:"start"})};return e?u.jsx("div",{className:"fixed bottom-4 left-4 right-4 z-50 md:hidden",children:u.jsxs(ct,{onClick:n,size:"lg",className:"w-full bg-accent text-accent-foreground shadow-2xl hover:bg-accent/90",children:[u.jsx(bv,{className:"mr-2 h-5 w-5"}),"Refer Now & Win iPhone 16"]})}):null},UP="/chuong-trinh-gioi-thieu/assets/winners-illustration-Cs9PF7wy.png",WP=()=>{const{t:e}=Et(),t=34,n=()=>{const r=document.getElementById("leaderboard-section");r&&r.scrollIntoView({behavior:"smooth",block:"start"})};return u.jsx("section",{className:"w-full bg-cyan-900 py-4 md:py-5",children:u.jsx("div",{className:"container mx-auto px-6 md:px-8",children:u.jsx("button",{onClick:n,className:"w-full group cursor-pointer transition-all hover:opacity-90 active:scale-[0.99]",children:u.jsxs("div",{className:"relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",children:[u.jsx(Eh,{className:"absolute top-1 right-8 w-10 h-10 text-white rotate-12"}),u.jsx(Eh,{className:"absolute bottom-2 left-12 w-8 h-8 text-white -rotate-12"}),u.jsx(Nh,{className:"absolute top-2 left-8 w-9 h-9 text-white rotate-6"}),u.jsx(Nh,{className:"absolute bottom-1 right-16 w-7 h-7 text-white -rotate-6"})]}),u.jsx("div",{className:"relative flex flex-col items-start text-left gap-1",children:u.jsxs("div",{className:"flex items-center gap-3 md:gap-4",children:[u.jsx("div",{className:"flex h-10 w-10 md:h-12 md:w-12 items-center justify-center rounded-xl overflow-hidden",children:u.jsx("img",{src:UP,alt:e("winnersBlock.winnersAlt"),className:"w-full h-full object-contain"})}),u.jsxs("div",{className:"text-left",children:[u.jsx("div",{className:"flex items-baseline gap-2",children:u.jsx("span",{className:"text-base md:text-lg font-semibold text-white/90",children:e("winnersBlock.peopleHaveWon",{count:t.toString()})})}),u.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-white/70 group-hover:text-white/90 transition-colors",children:[u.jsx("span",{children:e("winnersBlock.viewAllWinners")}),u.jsx("svg",{className:"w-3.5 h-3.5 group-hover:translate-x-0.5 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})]})})]})})})})},HP=()=>{const{t:e}=Et(),[t,n]=p.useState(!1);p.useEffect(()=>{const o=document.getElementById("services-section");if(!o)return;const i=()=>{const a=o.getBoundingClientRect().top<=window.innerHeight;n(a)};return i(),window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}},[]);const r=()=>{const o=document.getElementById("referral-form");o&&o.scrollIntoView({behavior:"smooth",block:"start"})};return t?u.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-40",children:u.jsxs(ct,{onClick:r,size:"lg",className:"w-full bg-accent text-accent-foreground hover:bg-accent/90 shadow-2xl font-bold text-base md:text-lg h-12 md:h-14 rounded-none",children:[u.jsx(bv,{className:"mr-2 h-5 w-5 md:h-6 md:w-6"}),e("common.referAndWinIphone")]})}):null},GP=()=>u.jsxs("div",{className:"min-h-screen bg-background",children:[u.jsx(w2,{}),u.jsxs("main",{children:[u.jsx(C2,{}),u.jsx(WP,{}),u.jsx(N2,{}),u.jsxs("div",{className:"container mx-auto px-4 -mt-8 md:-mt-12",children:[u.jsxs("div",{className:"grid gap-4 md:gap-8 lg:grid-cols-[1fr_420px]",children:[u.jsx("div",{children:u.jsx(BP,{preselectedService:""})}),u.jsx("aside",{id:"leaderboard-section",className:"hidden lg:block",children:u.jsx(up,{})})]}),u.jsx("div",{id:"leaderboard-section",className:"mt-4 md:mt-8 lg:hidden",children:u.jsx(up,{})})]}),u.jsx("div",{className:"mt-8 md:mt-12",children:u.jsx(X2,{})}),u.jsx(Y2,{})]}),u.jsx(VP,{}),u.jsx(HP,{}),u.jsx("footer",{className:"border-t border-border bg-muted/30 py-6 md:py-12",children:u.jsx("div",{className:"container mx-auto px-4 text-center",children:u.jsx("p",{className:"text-sm text-muted-foreground",children:"© 2024 hellobacsi. All rights reserved."})})})]}),QP=()=>{const e=Ty();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),u.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),u.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},KP=new ak,YP=()=>(p.useEffect(()=>{v2()},[]),u.jsx(fk,{client:KP,children:u.jsx(VE,{children:u.jsxs(h2,{children:[u.jsx(EC,{}),u.jsx(nS,{}),u.jsx(g2,{}),u.jsx(c2,{basename:"/chuong-trinh-gioi-thieu/",children:u.jsxs(s2,{children:[u.jsx(ku,{path:"/",element:u.jsx(GP,{})}),u.jsx(ku,{path:"*",element:u.jsx(QP,{})})]})})]})})}));Hg(document.getElementById("root")).render(u.jsx(YP,{}))});export default XP();