var u3=Object.defineProperty;var c3=(e,t,n)=>t in e?u3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>(c3(e,typeof t!="symbol"?t+"":t,n),n),cp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var R=(e,t,n)=>(cp(e,t,"read from private field"),n?n.call(e):t.get(e)),ee=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Q=(e,t,n,r)=>(cp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var hc=(e,t,n,r)=>({set _(s){Q(e,t,s,n)},get _(){return R(e,t,r)}}),ue=(e,t,n)=>(cp(e,t,"access private method"),n);function f3(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Tf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function RY(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var GS={exports:{}},zd={},YS={exports:{}},he={};/** * @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 Mu=Symbol.for("react.element"),d3=Symbol.for("react.portal"),h3=Symbol.for("react.fragment"),p3=Symbol.for("react.strict_mode"),m3=Symbol.for("react.profiler"),g3=Symbol.for("react.provider"),y3=Symbol.for("react.context"),v3=Symbol.for("react.forward_ref"),x3=Symbol.for("react.suspense"),b3=Symbol.for("react.memo"),w3=Symbol.for("react.lazy"),ux=Symbol.iterator;function _3(e){return e===null||typeof e!="object"?null:(e=ux&&e[ux]||e["@@iterator"],typeof e=="function"?e:null)}var QS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},XS=Object.assign,JS={};function ja(e,t,n){this.props=e,this.context=t,this.refs=JS,this.updater=n||QS}ja.prototype.isReactComponent={};ja.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")};ja.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZS(){}ZS.prototype=ja.prototype;function uv(e,t,n){this.props=e,this.context=t,this.refs=JS,this.updater=n||QS}var cv=uv.prototype=new ZS;cv.constructor=uv;XS(cv,ja.prototype);cv.isPureReactComponent=!0;var cx=Array.isArray,e2=Object.prototype.hasOwnProperty,fv={current:null},t2={key:!0,ref:!0,__self:!0,__source:!0};function n2(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)e2.call(t,r)&&!t2.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,te=I[Y];if(0>>1;Ys(et,H))pes(Oe,et)?(I[Y]=Oe,I[pe]=H,Y=pe):(I[Y]=et,I[ve]=H,Y=ve);else if(pes(Oe,H))I[Y]=Oe,I[pe]=H,Y=pe;else break e}}return q}function s(I,q){var H=I.sortIndex-q.sortIndex;return H!==0?H:I.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,d=null,h=3,p=!1,g=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=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(I){for(var q=n(c);q!==null;){if(q.callback===null)r(c);else if(q.startTime<=I)r(c),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(c)}}function _(I){if(b=!1,x(I),!g)if(n(l)!==null)g=!0,$(S);else{var q=n(c);q!==null&&L(_,q.startTime-I)}}function S(I,q){g=!1,b&&(b=!1,v(N),N=-1),p=!0;var H=h;try{for(x(q),d=n(l);d!==null&&(!(d.expirationTime>q)||I&&!B());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,h=d.priorityLevel;var te=Y(d.expirationTime<=q);q=e.unstable_now(),typeof te=="function"?d.callback=te:d===n(l)&&r(l),x(q)}else r(l);d=n(l)}if(d!==null)var ce=!0;else{var ve=n(c);ve!==null&&L(_,ve.startTime-q),ce=!1}return ce}finally{d=null,h=H,p=!1}}var j=!1,k=null,N=-1,D=5,F=-1;function B(){return!(e.unstable_now()-FI||125Y?(I.sortIndex=H,t(c,I),n(l)===null&&I===n(c)&&(b?(v(N),N=-1):b=!0,L(_,H-Y))):(I.sortIndex=te,t(l,I),g||p||(g=!0,$(S))),I},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(I){var q=h;return function(){var H=h;h=q;try{return I.apply(this,arguments)}finally{h=H}}}})(o2);i2.exports=o2;var $3=i2.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 a2=y,cn=$3;function W(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"),$m=Object.prototype.hasOwnProperty,I3=/^[: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]*$/,dx={},hx={};function L3(e){return $m.call(hx,e)?!0:$m.call(dx,e)?!1:I3.test(e)?hx[e]=!0:(dx[e]=!0,!1)}function D3(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 M3(e,t,n,r){if(t===null||typeof t>"u"||D3(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 Ut(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var _t={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_t[e]=new Ut(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_t[t]=new Ut(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_t[e]=new Ut(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_t[e]=new Ut(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){_t[e]=new Ut(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_t[e]=new Ut(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_t[e]=new Ut(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_t[e]=new Ut(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_t[e]=new Ut(e,5,!1,e.toLowerCase(),null,!1,!1)});var hv=/[\-:]([a-z])/g;function pv(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(hv,pv);_t[t]=new Ut(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(hv,pv);_t[t]=new Ut(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(hv,pv);_t[t]=new Ut(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_t[e]=new Ut(e,1,!1,e.toLowerCase(),null,!1,!1)});_t.xlinkHref=new Ut("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_t[e]=new Ut(e,1,!1,e.toLowerCase(),null,!0,!0)});function mv(e,t,n,r){var s=_t.hasOwnProperty(t)?_t[t]:null;(s!==null?s.type!==0:r||!(2a||s[o]!==i[a]){var l=` `+s[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{hp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?dl(e):""}function F3(e){switch(e.tag){case 5:return dl(e.type);case 16:return dl("Lazy");case 13:return dl("Suspense");case 19:return dl("SuspenseList");case 0:case 2:case 15:return e=pp(e.type,!1),e;case 11:return e=pp(e.type.render,!1),e;case 1:return e=pp(e.type,!0),e;default:return""}}function Mm(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 no:return"Fragment";case to:return"Portal";case Im:return"Profiler";case gv:return"StrictMode";case Lm:return"Suspense";case Dm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c2:return(e.displayName||"Context")+".Consumer";case u2:return(e._context.displayName||"Context")+".Provider";case yv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vv:return t=e.displayName||null,t!==null?t:Mm(e.type)||"Memo";case os:t=e._payload,e=e._init;try{return Mm(e(t))}catch{}}return null}function U3(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 Mm(t);case 8:return t===gv?"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 Ds(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function z3(e){var t=d2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gc(e){e._valueTracker||(e._valueTracker=z3(e))}function h2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=d2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pf(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 Fm(e,t){var n=t.checked;return Ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function mx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ds(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 p2(e,t){t=t.checked,t!=null&&mv(e,"checked",t,!1)}function Um(e,t){p2(e,t);var n=Ds(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")?zm(e,t.type,n):t.hasOwnProperty("defaultValue")&&zm(e,t.type,Ds(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gx(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 zm(e,t,n){(t!=="number"||Pf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hl=Array.isArray;function vo(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=yc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _l={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},V3=["Webkit","ms","Moz","O"];Object.keys(_l).forEach(function(e){V3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_l[t]=_l[e]})});function v2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_l.hasOwnProperty(e)&&_l[e]?(""+t).trim():t+"px"}function x2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=v2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var B3=Ue({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 Hm(e,t){if(t){if(B3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function qm(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 Wm=null;function xv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Km=null,xo=null,bo=null;function xx(e){if(e=zu(e)){if(typeof Km!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Wd(t),Km(e.stateNode,e.type,t))}}function b2(e){xo?bo?bo.push(e):bo=[e]:xo=e}function w2(){if(xo){var e=xo,t=bo;if(bo=xo=null,xx(e),t)for(e=0;e>>=0,e===0?32:31-(eR(e)/tR|0)|0}var vc=64,xc=4194304;function pl(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 Af(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=pl(a):(i&=o,i!==0&&(r=pl(i)))}else o=n&~s,o!==0?r=pl(o):i!==0&&(r=pl(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Hn(t),e[t]=n}function iR(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=El),Tx=String.fromCharCode(32),Px=!1;function z2(e,t){switch(e){case"keyup":return AR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ro=!1;function IR(e,t){switch(e){case"compositionend":return V2(t);case"keypress":return t.which!==32?null:(Px=!0,Tx);case"textInput":return e=t.data,e===Tx&&Px?null:e;default:return null}}function LR(e,t){if(ro)return e==="compositionend"||!kv&&z2(e,t)?(e=F2(),nf=Ev=xs=null,ro=!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=Ax(n)}}function W2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function K2(){for(var e=window,t=Pf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pf(e.document)}return t}function Tv(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 qR(e){var t=K2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&W2(n.ownerDocument.documentElement,n)){if(r!==null&&Tv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=$x(n,i);var o=$x(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,so=null,Zm=null,jl=null,eg=!1;function Ix(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eg||so==null||so!==Pf(r)||(r=so,"selectionStart"in r&&Tv(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}),jl&&Hl(jl,r)||(jl=r,r=Lf(Zm,"onSelect"),0ao||(e.current=og[ao],og[ao]=null,ao--)}function Te(e,t){ao++,og[ao]=e.current,e.current=t}var Ms={},At=Gs(Ms),Kt=Gs(!1),Ei=Ms;function Ko(e,t){var n=e.type.contextTypes;if(!n)return Ms;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Gt(e){return e=e.childContextTypes,e!=null}function Mf(){Ne(Kt),Ne(At)}function Vx(e,t,n){if(At.current!==Ms)throw Error(W(168));Te(At,t),Te(Kt,n)}function nE(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(W(108,U3(e)||"Unknown",s));return Ue({},n,r)}function Ff(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ms,Ei=At.current,Te(At,e),Te(Kt,Kt.current),!0}function Bx(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=nE(e,t,Ei),r.__reactInternalMemoizedMergedChildContext=e,Ne(Kt),Ne(At),Te(At,e)):Ne(Kt),Te(Kt,n)}var Or=null,Kd=!1,Tp=!1;function rE(e){Or===null?Or=[e]:Or.push(e)}function rN(e){Kd=!0,rE(e)}function Ys(){if(!Tp&&Or!==null){Tp=!0;var e=0,t=_e;try{var n=Or;for(_e=1;e>=o,s-=o,Lr=1<<32-Hn(t)+s|n<N?(D=k,k=null):D=k.sibling;var F=h(v,k,x[N],_);if(F===null){k===null&&(k=D);break}e&&k&&F.alternate===null&&t(v,k),m=i(F,m,N),j===null?S=F:j.sibling=F,j=F,k=D}if(N===x.length)return n(v,k),$e&&ei(v,N),S;if(k===null){for(;NN?(D=k,k=null):D=k.sibling;var B=h(v,k,F.value,_);if(B===null){k===null&&(k=D);break}e&&k&&B.alternate===null&&t(v,k),m=i(B,m,N),j===null?S=B:j.sibling=B,j=B,k=D}if(F.done)return n(v,k),$e&&ei(v,N),S;if(k===null){for(;!F.done;N++,F=x.next())F=d(v,F.value,_),F!==null&&(m=i(F,m,N),j===null?S=F:j.sibling=F,j=F);return $e&&ei(v,N),S}for(k=r(v,k);!F.done;N++,F=x.next())F=p(k,v,N,F.value,_),F!==null&&(e&&F.alternate!==null&&k.delete(F.key===null?N:F.key),m=i(F,m,N),j===null?S=F:j.sibling=F,j=F);return e&&k.forEach(function(T){return t(v,T)}),$e&&ei(v,N),S}function w(v,m,x,_){if(typeof x=="object"&&x!==null&&x.type===no&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case mc:e:{for(var S=x.key,j=m;j!==null;){if(j.key===S){if(S=x.type,S===no){if(j.tag===7){n(v,j.sibling),m=s(j,x.props.children),m.return=v,v=m;break e}}else if(j.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===os&&Qx(S)===j.type){n(v,j.sibling),m=s(j,x.props),m.ref=rl(v,j,x),m.return=v,v=m;break e}n(v,j);break}else t(v,j);j=j.sibling}x.type===no?(m=bi(x.props.children,v.mode,_,x.key),m.return=v,v=m):(_=ff(x.type,x.key,x.props,null,v.mode,_),_.ref=rl(v,m,x),_.return=v,v=_)}return o(v);case to:e:{for(j=x.key;m!==null;){if(m.key===j)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){n(v,m.sibling),m=s(m,x.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=Lp(x,v.mode,_),m.return=v,v=m}return o(v);case os:return j=x._init,w(v,m,j(x._payload),_)}if(hl(x))return g(v,m,x,_);if(Ja(x))return b(v,m,x,_);jc(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(n(v,m.sibling),m=s(m,x),m.return=v,v=m):(n(v,m),m=Ip(x,v.mode,_),m.return=v,v=m),o(v)):n(v,m)}return w}var Yo=fE(!0),dE=fE(!1),Vu={},mr=Gs(Vu),Gl=Gs(Vu),Yl=Gs(Vu);function ii(e){if(e===Vu)throw Error(W(174));return e}function Dv(e,t){switch(Te(Yl,t),Te(Gl,e),Te(mr,Vu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bm(t,e)}Ne(mr),Te(mr,t)}function Qo(){Ne(mr),Ne(Gl),Ne(Yl)}function hE(e){ii(Yl.current);var t=ii(mr.current),n=Bm(t,e.type);t!==n&&(Te(Gl,e),Te(mr,n))}function Mv(e){Gl.current===e&&(Ne(mr),Ne(Gl))}var De=Gs(0);function qf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pp=[];function Fv(){for(var e=0;en?n:4,e(!0);var r=Rp.transition;Rp.transition={};try{e(!1),t()}finally{_e=n,Rp.transition=r}}function PE(){return $n().memoizedState}function aN(e,t,n){var r=Rs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},RE(e))NE(t,n);else if(n=aE(e,t,n,r),n!==null){var s=Mt();qn(n,e,r,s),OE(n,t,r)}}function lN(e,t,n){var r=Rs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(RE(e))NE(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Kn(a,o)){var l=t.interleaved;l===null?(s.next=s,Iv(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=aE(e,t,s,r),n!==null&&(s=Mt(),qn(n,e,r,s),OE(n,t,r))}}function RE(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function NE(e,t){kl=Wf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function OE(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wv(e,n)}}var Kf={readContext:An,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},uN={readContext:An,useCallback:function(e,t){return nr().memoizedState=[e,t===void 0?null:t],e},useContext:An,useEffect:Jx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,af(4194308,4,EE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return af(4194308,4,e,t)},useInsertionEffect:function(e,t){return af(4,2,e,t)},useMemo:function(e,t){var n=nr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nr();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=aN.bind(null,Me,e),[r.memoizedState,e]},useRef:function(e){var t=nr();return e={current:e},t.memoizedState=e},useState:Xx,useDebugValue:Hv,useDeferredValue:function(e){return nr().memoizedState=e},useTransition:function(){var e=Xx(!1),t=e[0];return e=oN.bind(null,e[1]),nr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Me,s=nr();if($e){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),mt===null)throw Error(W(349));ji&30||gE(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Jx(vE.bind(null,r,i,e),[e]),r.flags|=2048,Jl(9,yE.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nr(),t=mt.identifierPrefix;if($e){var n=Dr,r=Lr;n=(r&~(1<<32-Hn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ql++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ur]=t,e[Kl]=r,zE(e,t,!1,!1),t.stateNode=e;e:{switch(o=qm(n,r),n){case"dialog":Pe("cancel",e),Pe("close",e),s=r;break;case"iframe":case"object":case"embed":Pe("load",e),s=r;break;case"video":case"audio":for(s=0;sJo&&(t.flags|=128,r=!0,sl(i,!1),t.lanes=4194304)}else{if(!r)if(e=qf(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$e)return Ct(t),null}else 2*Qe()-i.renderingStartTime>Jo&&n!==1073741824&&(t.flags|=128,r=!0,sl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Qe(),t.sibling=null,n=De.current,Te(De,r?n&1|2:n&1),t):(Ct(t),null);case 22:case 23:return Qv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?en&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function yN(e,t){switch(Rv(t),t.tag){case 1:return Gt(t.type)&&Mf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qo(),Ne(Kt),Ne(At),Fv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mv(t),null;case 13:if(Ne(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(De),null;case 4:return Qo(),null;case 10:return $v(t.type._context),null;case 22:case 23:return Qv(),null;case 24:return null;default:return null}}var Tc=!1,Pt=!1,vN=typeof WeakSet=="function"?WeakSet:Set,Z=null;function fo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Be(e,t,r)}else n.current=null}function vg(e,t,n){try{n()}catch(r){Be(e,t,r)}}var ab=!1;function xN(e,t){if(tg=$f,e=K2(),Tv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++f===r&&(l=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ng={focusedElem:e,selectionRange:n},$f=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var b=g.memoizedProps,w=g.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?b:Un(t.type,b),w);v.__reactInternalSnapshotBeforeUpdate=m}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(W(163))}}catch(_){Be(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return g=ab,ab=!1,g}function Tl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&vg(t,n,i)}s=s.next}while(s!==r)}}function Qd(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 xg(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 HE(e){var t=e.alternate;t!==null&&(e.alternate=null,HE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[Kl],delete t[ig],delete t[tN],delete t[nN])),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 qE(e){return e.tag===5||e.tag===3||e.tag===4}function lb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qE(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 bg(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=Df));else if(r!==4&&(e=e.child,e!==null))for(bg(e,t,n),e=e.sibling;e!==null;)bg(e,t,n),e=e.sibling}function wg(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(wg(e,t,n),e=e.sibling;e!==null;)wg(e,t,n),e=e.sibling}var vt=null,Vn=!1;function ts(e,t,n){for(n=n.child;n!==null;)WE(e,t,n),n=n.sibling}function WE(e,t,n){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(Vd,n)}catch{}switch(n.tag){case 5:Pt||fo(n,t);case 6:var r=vt,s=Vn;vt=null,ts(e,t,n),vt=r,Vn=s,vt!==null&&(Vn?(e=vt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):vt.removeChild(n.stateNode));break;case 18:vt!==null&&(Vn?(e=vt,n=n.stateNode,e.nodeType===8?kp(e.parentNode,n):e.nodeType===1&&kp(e,n),Vl(e)):kp(vt,n.stateNode));break;case 4:r=vt,s=Vn,vt=n.stateNode.containerInfo,Vn=!0,ts(e,t,n),vt=r,Vn=s;break;case 0:case 11:case 14:case 15:if(!Pt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&vg(n,t,o),s=s.next}while(s!==r)}ts(e,t,n);break;case 1:if(!Pt&&(fo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Be(n,t,a)}ts(e,t,n);break;case 21:ts(e,t,n);break;case 22:n.mode&1?(Pt=(r=Pt)||n.memoizedState!==null,ts(e,t,n),Pt=r):ts(e,t,n);break;default:ts(e,t,n)}}function ub(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vN),t.forEach(function(r){var s=TN.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wN(r/1960))-r,10e?16:e,bs===null)var r=!1;else{if(e=bs,bs=null,Qf=0,ye&6)throw Error(W(331));var s=ye;for(ye|=4,Z=e.current;Z!==null;){var i=Z,o=i.child;if(Z.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lQe()-Gv?xi(e,0):Kv|=n),Yt(e,t)}function eC(e,t){t===0&&(e.mode&1?(t=xc,xc<<=1,!(xc&130023424)&&(xc=4194304)):t=1);var n=Mt();e=Hr(e,t),e!==null&&(Fu(e,t,n),Yt(e,n))}function kN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eC(e,n)}function TN(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),eC(e,n)}var tC;tC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kt.current)Wt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Wt=!1,mN(e,t,n);Wt=!!(e.flags&131072)}else Wt=!1,$e&&t.flags&1048576&&sE(t,zf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lf(e,t),e=t.pendingProps;var s=Ko(t,At.current);_o(t,n),s=zv(null,t,r,e,s,n);var i=Vv();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gt(r)?(i=!0,Ff(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Lv(t),s.updater=Gd,t.stateNode=s,s._reactInternals=t,fg(t,r,e,n),t=pg(null,t,r,!0,i,n)):(t.tag=0,$e&&i&&Pv(t),Lt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lf(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=RN(r),e=Un(r,e),s){case 0:t=hg(null,t,r,e,n);break e;case 1:t=sb(null,t,r,e,n);break e;case 11:t=nb(null,t,r,e,n);break e;case 14:t=rb(null,t,r,Un(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Un(r,s),hg(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Un(r,s),sb(e,t,r,s,n);case 3:e:{if(ME(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,s=i.element,lE(e,t),Hf(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Xo(Error(W(423)),t),t=ib(e,t,r,n,s);break e}else if(r!==s){s=Xo(Error(W(424)),t),t=ib(e,t,r,n,s);break e}else for(on=ks(t.stateNode.containerInfo.firstChild),ln=t,$e=!0,Bn=null,n=dE(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Go(),r===s){t=qr(e,t,n);break e}Lt(e,t,r,n)}t=t.child}return t;case 5:return hE(t),e===null&&lg(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,rg(r,s)?o=null:i!==null&&rg(r,i)&&(t.flags|=32),DE(e,t),Lt(e,t,o,n),t.child;case 6:return e===null&&lg(t),null;case 13:return FE(e,t,n);case 4:return Dv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yo(t,null,r,n):Lt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Un(r,s),nb(e,t,r,s,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,Te(Vf,r._currentValue),r._currentValue=o,i!==null)if(Kn(i.value,o)){if(i.children===s.children&&!Kt.current){t=qr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Ur(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ug(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(W(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ug(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Lt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,_o(t,n),s=An(s),r=r(s),t.flags|=1,Lt(e,t,r,n),t.child;case 14:return r=t.type,s=Un(r,t.pendingProps),s=Un(r.type,s),rb(e,t,r,s,n);case 15:return IE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Un(r,s),lf(e,t),t.tag=1,Gt(r)?(e=!0,Ff(t)):e=!1,_o(t,n),cE(t,r,s),fg(t,r,s,n),pg(null,t,r,!0,e,n);case 19:return UE(e,t,n);case 22:return LE(e,t,n)}throw Error(W(156,t.tag))};function nC(e,t){return T2(e,t)}function PN(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 kn(e,t,n,r){return new PN(e,t,n,r)}function Jv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RN(e){if(typeof e=="function")return Jv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yv)return 11;if(e===vv)return 14}return 2}function Ns(e,t){var n=e.alternate;return n===null?(n=kn(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 ff(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Jv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case no:return bi(n.children,s,i,t);case gv:o=8,s|=8;break;case Im:return e=kn(12,n,t,s|2),e.elementType=Im,e.lanes=i,e;case Lm:return e=kn(13,n,t,s),e.elementType=Lm,e.lanes=i,e;case Dm:return e=kn(19,n,t,s),e.elementType=Dm,e.lanes=i,e;case f2:return Jd(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case u2:o=10;break e;case c2:o=9;break e;case yv:o=11;break e;case vv:o=14;break e;case os:o=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=kn(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function bi(e,t,n,r){return e=kn(7,e,r,t),e.lanes=n,e}function Jd(e,t,n,r){return e=kn(22,e,r,t),e.elementType=f2,e.lanes=n,e.stateNode={isHidden:!1},e}function Ip(e,t,n){return e=kn(6,e,null,t),e.lanes=n,e}function Lp(e,t,n){return t=kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function NN(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gp(0),this.expirationTimes=gp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gp(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Zv(e,t,n,r,s,i,o,a,l){return e=new NN(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=kn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lv(i),e}function ON(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oC)}catch(e){console.error(e)}}oC(),s2.exports=hn;var Pa=s2.exports;const NY=Qn(Pa);var aC,lC,yb=Pa;lC=yb.createRoot,aC=yb.hydrateRoot;var Ra=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(){}},Zo=typeof window>"u"||"Deno"in window;function wn(){}function DN(e,t){return typeof e=="function"?e(t):e}function jg(e){return typeof e=="number"&&e>=0&&e!==1/0}function uC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vb(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==r0(o,t.options))return!1}else if(!tu(t.queryKey,o))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||typeof s<"u"&&s!==t.state.fetchStatus||i&&!i(t))}function xb(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(eu(t.options.mutationKey)!==eu(i))return!1}else if(!tu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function r0(e,t){return((t==null?void 0:t.queryKeyHashFn)||eu)(e)}function eu(e){return JSON.stringify(e,(t,n)=>kg(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function tu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!tu(e[n],t[n])):!1}function cC(e,t){if(e===t)return e;const n=bb(e)&&bb(t);if(n||kg(e)&&kg(t)){const r=n?e.length:Object.keys(e).length,s=n?t:Object.keys(t),i=s.length,o=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!wb(n)||!n.hasOwnProperty("isPrototypeOf"))}function wb(e){return Object.prototype.toString.call(e)==="[object Object]"}function fC(e){return new Promise(t=>{setTimeout(t,e)})}function _b(e){fC(0).then(e)}function Tg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cC(e,t):t}function dC(e){return e}function MN(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function FN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ci,fs,Ro,MS,UN=(MS=class extends Ra{constructor(){super();ee(this,ci,void 0);ee(this,fs,void 0);ee(this,Ro,void 0);Q(this,Ro,t=>{if(!Zo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,fs)||this.setEventListener(R(this,Ro))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,fs))==null||t.call(this),Q(this,fs,void 0))}setEventListener(t){var n;Q(this,Ro,t),(n=R(this,fs))==null||n.call(this),Q(this,fs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,ci)!==t&&(Q(this,ci,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof R(this,ci)=="boolean"?R(this,ci):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ci=new WeakMap,fs=new WeakMap,Ro=new WeakMap,MS),ed=new UN,No,ds,Oo,FS,zN=(FS=class extends Ra{constructor(){super();ee(this,No,!0);ee(this,ds,void 0);ee(this,Oo,void 0);Q(this,Oo,t=>{if(!Zo&&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(){R(this,ds)||this.setEventListener(R(this,Oo))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ds))==null||t.call(this),Q(this,ds,void 0))}setEventListener(t){var n;Q(this,Oo,t),(n=R(this,ds))==null||n.call(this),Q(this,ds,t(this.setOnline.bind(this)))}setOnline(t){R(this,No)!==t&&(Q(this,No,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,No)}},No=new WeakMap,ds=new WeakMap,Oo=new WeakMap,FS),td=new zN;function VN(e){return Math.min(1e3*2**e,3e4)}function rh(e){return(e??"online")==="online"?td.isOnline():!0}var hC=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Dp(e){return e instanceof hC}function pC(e){let t=!1,n=0,r=!1,s,i,o;const a=new Promise((w,v)=>{i=w,o=v}),l=w=>{var v;r||(p(new hC(w)),(v=e.abort)==null||v.call(e))},c=()=>{t=!0},f=()=>{t=!1},d=()=>!ed.isFocused()||e.networkMode!=="always"&&!td.isOnline(),h=w=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,w),s==null||s(),i(w))},p=w=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,w),s==null||s(),o(w))},g=()=>new Promise(w=>{var v;s=m=>{const x=r||!d();return x&&w(m),x},(v=e.onPause)==null||v.call(e)}).then(()=>{var w;s=void 0,r||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(r)return;let w;try{w=e.fn()}catch(v){w=Promise.reject(v)}Promise.resolve(w).then(h).catch(v=>{var j;if(r)return;const m=e.retry??(Zo?0:3),x=e.retryDelay??VN,_=typeof x=="function"?x(n,v):x,S=m===!0||typeof m=="number"&&n{if(d())return g()}).then(()=>{t?p(v):b()})})};return rh(e.networkMode)?b():g().then(b),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}function BN(){let e=[],t=0,n=f=>{f()},r=f=>{f()};const s=f=>{let d;t++;try{d=f()}finally{t--,t||a()}return d},i=f=>{t?e.push(f):_b(()=>{n(f)})},o=f=>(...d)=>{i(()=>{f(...d)})},a=()=>{const f=e;e=[],f.length&&_b(()=>{r(()=>{f.forEach(d=>{n(d)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f}}}var it=BN(),fi,US,mC=(US=class{constructor(){ee(this,fi,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jg(this.gcTime)&&Q(this,fi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zo?1/0:5*60*1e3))}clearGcTimeout(){R(this,fi)&&(clearTimeout(R(this,fi)),Q(this,fi,void 0))}},fi=new WeakMap,US),Ao,$o,yn,hs,vn,ct,ju,di,Io,df,zn,Tr,zS,HN=(zS=class extends mC{constructor(t){super();ee(this,Io);ee(this,zn);ee(this,Ao,void 0);ee(this,$o,void 0);ee(this,yn,void 0);ee(this,hs,void 0);ee(this,vn,void 0);ee(this,ct,void 0);ee(this,ju,void 0);ee(this,di,void 0);Q(this,di,!1),Q(this,ju,t.defaultOptions),ue(this,Io,df).call(this,t.options),Q(this,ct,[]),Q(this,yn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,Ao,t.state||qN(this.options)),this.state=R(this,Ao),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!R(this,ct).length&&this.state.fetchStatus==="idle"&&R(this,yn).remove(this)}setData(t,n){const r=Tg(this.state.data,t,this.options);return ue(this,zn,Tr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ue(this,zn,Tr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r;const n=R(this,hs);return(r=R(this,vn))==null||r.cancel(t),n?n.then(wn).catch(wn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Ao))}isActive(){return R(this,ct).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||R(this,ct).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!uC(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=R(this,ct).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,vn))==null||n.continue()}onOnline(){var n;const t=R(this,ct).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,vn))==null||n.continue()}addObserver(t){R(this,ct).includes(t)||(R(this,ct).push(t),this.clearGcTimeout(),R(this,yn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){R(this,ct).includes(t)&&(Q(this,ct,R(this,ct).filter(n=>n!==t)),R(this,ct).length||(R(this,vn)&&(R(this,di)?R(this,vn).cancel({revert:!0}):R(this,vn).cancelRetry()),this.scheduleGc()),R(this,yn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return R(this,ct).length}invalidate(){this.state.isInvalidated||ue(this,zn,Tr).call(this,{type:"invalidate"})}fetch(t,n){var c,f,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,hs))return(c=R(this,vn))==null||c.continueRetry(),R(this,hs)}if(t&&ue(this,Io,df).call(this,t),!this.options.queryFn){const p=R(this,ct).find(g=>g.options.queryFn);p&&ue(this,Io,df).call(this,p.options)}const r=new AbortController,s={queryKey:this.queryKey,meta:this.meta},i=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Q(this,di,!0),r.signal)})};i(s);const o=()=>this.options.queryFn?(Q(this,di,!1),this.options.persister?this.options.persister(this.options.queryFn,s,this):this.options.queryFn(s)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(a),(f=this.options.behavior)==null||f.onFetch(a,this),Q(this,$o,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&ue(this,zn,Tr).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var g,b,w,v;Dp(p)&&p.silent||ue(this,zn,Tr).call(this,{type:"error",error:p}),Dp(p)||((b=(g=R(this,yn).config).onError)==null||b.call(g,p,this),(v=(w=R(this,yn).config).onSettled)==null||v.call(w,this.state.data,p,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Q(this,vn,pC({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var g,b,w,v;if(typeof p>"u"){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(p),(b=(g=R(this,yn).config).onSuccess)==null||b.call(g,p,this),(v=(w=R(this,yn).config).onSettled)==null||v.call(w,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(p,g)=>{ue(this,zn,Tr).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{ue(this,zn,Tr).call(this,{type:"pause"})},onContinue:()=>{ue(this,zn,Tr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),Q(this,hs,R(this,vn).promise),R(this,hs)}},Ao=new WeakMap,$o=new WeakMap,yn=new WeakMap,hs=new WeakMap,vn=new WeakMap,ct=new WeakMap,ju=new WeakMap,di=new WeakMap,Io=new WeakSet,df=function(t){this.options={...R(this,ju),...t},this.updateGcTime(this.options.gcTime)},zn=new WeakSet,Tr=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,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:rh(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Dp(s)&&s.revert&&R(this,$o)?{...R(this,$o),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),it.batch(()=>{R(this,ct).forEach(r=>{r.onQueryUpdate()}),R(this,yn).notify({query:this,type:"updated",action:t})})},zS);function qN(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",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 sr,VS,WN=(VS=class extends Ra{constructor(t={}){super();ee(this,sr,void 0);this.config=t,Q(this,sr,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??r0(s,n);let o=this.get(i);return o||(o=new HN({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){R(this,sr).has(t.queryHash)||(R(this,sr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,sr).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,sr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,sr).get(t)}getAll(){return[...R(this,sr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>vb(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>vb(t,r)):n}notify(t){it.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){it.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},sr=new WeakMap,VS),ir,ku,Zt,Lo,or,ss,BS,KN=(BS=class extends mC{constructor(t){super();ee(this,or);ee(this,ir,void 0);ee(this,ku,void 0);ee(this,Zt,void 0);ee(this,Lo,void 0);this.mutationId=t.mutationId,Q(this,ku,t.defaultOptions),Q(this,Zt,t.mutationCache),Q(this,ir,[]),this.state=t.state||gC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...R(this,ku),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,ir).includes(t)||(R(this,ir).push(t),this.clearGcTimeout(),R(this,Zt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,ir,R(this,ir).filter(n=>n!==t)),this.scheduleGc(),R(this,Zt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,ir).length||(this.state.status==="pending"?this.scheduleGc():R(this,Zt).remove(this))}continue(){var t;return((t=R(this,Lo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,c,f,d,h,p,g,b,w,v,m,x,_,S,j,k;const n=()=>(Q(this,Lo,pC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,D)=>{ue(this,or,ss).call(this,{type:"failed",failureCount:N,error:D})},onPause:()=>{ue(this,or,ss).call(this,{type:"pause"})},onContinue:()=>{ue(this,or,ss).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),R(this,Lo).promise),r=this.state.status==="pending";try{if(!r){ue(this,or,ss).call(this,{type:"pending",variables:t}),await((i=(s=R(this,Zt).config).onMutate)==null?void 0:i.call(s,t,this));const D=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));D!==this.state.context&&ue(this,or,ss).call(this,{type:"pending",context:D,variables:t})}const N=await n();return await((c=(l=R(this,Zt).config).onSuccess)==null?void 0:c.call(l,N,t,this.state.context,this)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,N,t,this.state.context)),await((p=(h=R(this,Zt).config).onSettled)==null?void 0:p.call(h,N,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,N,null,t,this.state.context)),ue(this,or,ss).call(this,{type:"success",data:N}),N}catch(N){try{throw await((v=(w=R(this,Zt).config).onError)==null?void 0:v.call(w,N,t,this.state.context,this)),await((x=(m=this.options).onError)==null?void 0:x.call(m,N,t,this.state.context)),await((S=(_=R(this,Zt).config).onSettled)==null?void 0:S.call(_,void 0,N,this.state.variables,this.state.context,this)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,void 0,N,t,this.state.context)),N}finally{ue(this,or,ss).call(this,{type:"error",error:N})}}}},ir=new WeakMap,ku=new WeakMap,Zt=new WeakMap,Lo=new WeakMap,or=new WeakSet,ss=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:!rh(this.options.networkMode),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),it.batch(()=>{R(this,ir).forEach(r=>{r.onMutationUpdate(t)}),R(this,Zt).notify({mutation:this,type:"updated",action:t})})},BS);function gC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xn,Tu,hi,HS,GN=(HS=class extends Ra{constructor(t={}){super();ee(this,xn,void 0);ee(this,Tu,void 0);ee(this,hi,void 0);this.config=t,Q(this,xn,[]),Q(this,Tu,0)}build(t,n,r){const s=new KN({mutationCache:this,mutationId:++hc(this,Tu)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){R(this,xn).push(t),this.notify({type:"added",mutation:t})}remove(t){Q(this,xn,R(this,xn).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){it.batch(()=>{R(this,xn).forEach(t=>{this.remove(t)})})}getAll(){return R(this,xn)}find(t){const n={exact:!0,...t};return R(this,xn).find(r=>xb(n,r))}findAll(t={}){return R(this,xn).filter(n=>xb(t,n))}notify(t){it.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return Q(this,hi,(R(this,hi)??Promise.resolve()).then(()=>{const t=R(this,xn).filter(n=>n.state.isPaused);return it.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(wn)),Promise.resolve()))}).then(()=>{Q(this,hi,void 0)})),R(this,hi)}},xn=new WeakMap,Tu=new WeakMap,hi=new WeakMap,HS);function YN(e){return{onFetch:(t,n)=>{const r=async()=>{var g,b,w,v,m;const s=t.options,i=(w=(b=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:b.fetchMore)==null?void 0:w.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[],l={pages:[],pageParams:[]};let c=!1;const f=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},d=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),h=async(x,_,S)=>{if(c)return Promise.reject();if(_==null&&x.pages.length)return Promise.resolve(x);const j={queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};f(j);const k=await d(j),{maxPages:N}=t.options,D=S?FN:MN;return{pages:D(x.pages,k,N),pageParams:D(x.pageParams,_,N)}};let p;if(i&&o.length){const x=i==="backward",_=x?yC:Pg,S={pages:o,pageParams:a},j=_(s,S);p=await h(S,j,x)}else{p=await h(l,a[0]??s.initialPageParam);const x=e??o.length;for(let _=1;_{var s,i;return(i=(s=t.options).persister)==null?void 0:i.call(s,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function Pg(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function yC(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}function OY(e,t){return t?Pg(e,t)!=null:!1}function AY(e,t){return!t||!e.getPreviousPageParam?!1:yC(e,t)!=null}var nt,ps,ms,Do,Mo,gs,Fo,Uo,qS,QN=(qS=class{constructor(e={}){ee(this,nt,void 0);ee(this,ps,void 0);ee(this,ms,void 0);ee(this,Do,void 0);ee(this,Mo,void 0);ee(this,gs,void 0);ee(this,Fo,void 0);ee(this,Uo,void 0);Q(this,nt,e.queryCache||new WN),Q(this,ps,e.mutationCache||new GN),Q(this,ms,e.defaultOptions||{}),Q(this,Do,new Map),Q(this,Mo,new Map),Q(this,gs,0)}mount(){hc(this,gs)._++,R(this,gs)===1&&(Q(this,Fo,ed.subscribe(()=>{ed.isFocused()&&(this.resumePausedMutations(),R(this,nt).onFocus())})),Q(this,Uo,td.subscribe(()=>{td.isOnline()&&(this.resumePausedMutations(),R(this,nt).onOnline())})))}unmount(){var e,t;hc(this,gs)._--,R(this,gs)===0&&((e=R(this,Fo))==null||e.call(this),Q(this,Fo,void 0),(t=R(this,Uo))==null||t.call(this),Q(this,Uo,void 0))}isFetching(e){return R(this,nt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,ps).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=R(this,nt).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t!==void 0?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=R(this,nt).find({queryKey:e}),s=r==null?void 0:r.state.data,i=DN(t,s);if(typeof i>"u")return;const o=this.defaultQueryOptions({queryKey:e});return R(this,nt).build(this,o).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return it.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var t;return(t=R(this,nt).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=R(this,nt);it.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,nt),r={type:"active",...e};return it.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=it.batch(()=>R(this,nt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(wn).catch(wn)}invalidateQueries(e={},t={}){return it.batch(()=>{if(R(this,nt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=it.batch(()=>R(this,nt).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(wn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(wn)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const n=R(this,nt).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wn).catch(wn)}fetchInfiniteQuery(e){return e.behavior=YN(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wn).catch(wn)}resumePausedMutations(){return R(this,ps).resumePausedMutations()}getQueryCache(){return R(this,nt)}getMutationCache(){return R(this,ps)}getDefaultOptions(){return R(this,ms)}setDefaultOptions(e){Q(this,ms,e)}setQueryDefaults(e,t){R(this,Do).set(eu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Do).values()];let n={};return t.forEach(r=>{tu(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){R(this,Mo).set(eu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Mo).values()];let n={};return t.forEach(r=>{tu(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...R(this,ms).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=r0(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,ms).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,nt).clear(),R(this,ps).clear()}},nt=new WeakMap,ps=new WeakMap,ms=new WeakMap,Do=new WeakMap,Mo=new WeakMap,gs=new WeakMap,Fo=new WeakMap,Uo=new WeakMap,qS),Vt,ke,zo,jt,pi,Vo,ar,Pu,Bo,Ho,mi,gi,ys,yi,vi,gl,Ru,Rg,Nu,Ng,Ou,Og,Au,Ag,$u,$g,Iu,Ig,Lu,Lg,Ud,vC,WS,XN=(WS=class extends Ra{constructor(t,n){super();ee(this,vi);ee(this,Ru);ee(this,Nu);ee(this,Ou);ee(this,Au);ee(this,$u);ee(this,Iu);ee(this,Lu);ee(this,Ud);ee(this,Vt,void 0);ee(this,ke,void 0);ee(this,zo,void 0);ee(this,jt,void 0);ee(this,pi,void 0);ee(this,Vo,void 0);ee(this,ar,void 0);ee(this,Pu,void 0);ee(this,Bo,void 0);ee(this,Ho,void 0);ee(this,mi,void 0);ee(this,gi,void 0);ee(this,ys,void 0);ee(this,yi,void 0);Q(this,ke,void 0),Q(this,zo,void 0),Q(this,jt,void 0),Q(this,yi,new Set),Q(this,Vt,t),this.options=n,Q(this,ar,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,ke).addObserver(this),Sb(R(this,ke),this.options)&&ue(this,vi,gl).call(this),ue(this,Au,Ag).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dg(R(this,ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dg(R(this,ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ue(this,$u,$g).call(this),ue(this,Iu,Ig).call(this),R(this,ke).removeObserver(this)}setOptions(t,n){const r=this.options,s=R(this,ke);if(this.options=R(this,Vt).defaultQueryOptions(t),Zf(r,this.options)||R(this,Vt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,ke),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),ue(this,Lu,Lg).call(this);const i=this.hasListeners();i&&Eb(R(this,ke),s,this.options,r)&&ue(this,vi,gl).call(this),this.updateResult(n),i&&(R(this,ke)!==s||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&ue(this,Ru,Rg).call(this);const o=ue(this,Nu,Ng).call(this);i&&(R(this,ke)!==s||this.options.enabled!==r.enabled||o!==R(this,ys))&&ue(this,Ou,Og).call(this,o)}getOptimisticResult(t){const n=R(this,Vt).getQueryCache().build(R(this,Vt),t),r=this.createResult(n,t);return ZN(this,r)&&(Q(this,jt,r),Q(this,Vo,this.options),Q(this,pi,R(this,ke).state)),r}getCurrentResult(){return R(this,jt)}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(R(this,yi).add(r),t[r])})}),n}getCurrentQuery(){return R(this,ke)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,Vt).defaultQueryOptions(t),r=R(this,Vt).getQueryCache().build(R(this,Vt),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ue(this,vi,gl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,jt)))}createResult(t,n){var j;const r=R(this,ke),s=this.options,i=R(this,jt),o=R(this,pi),a=R(this,Vo),c=t!==r?t.state:R(this,zo),{state:f}=t;let{error:d,errorUpdatedAt:h,fetchStatus:p,status:g}=f,b=!1,w;if(n._optimisticResults){const k=this.hasListeners(),N=!k&&Sb(t,n),D=k&&Eb(t,r,n,s);(N||D)&&(p=rh(t.options.networkMode)?"fetching":"paused",f.dataUpdatedAt||(g="pending")),n._optimisticResults==="isRestoring"&&(p="idle")}if(n.select&&typeof f.data<"u")if(i&&f.data===(o==null?void 0:o.data)&&n.select===R(this,Pu))w=R(this,Bo);else try{Q(this,Pu,n.select),w=n.select(f.data),w=Tg(i==null?void 0:i.data,w,n),Q(this,Bo,w),Q(this,ar,null)}catch(k){Q(this,ar,k)}else w=f.data;if(typeof n.placeholderData<"u"&&typeof w>"u"&&g==="pending"){let k;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))k=i.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData((j=R(this,Ho))==null?void 0:j.state.data,R(this,Ho)):n.placeholderData,n.select&&typeof k<"u")try{k=n.select(k),Q(this,ar,null)}catch(N){Q(this,ar,N)}typeof k<"u"&&(g="success",w=Tg(i==null?void 0:i.data,k,n),b=!0)}R(this,ar)&&(d=R(this,ar),w=R(this,Bo),h=Date.now(),g="error");const v=p==="fetching",m=g==="pending",x=g==="error",_=m&&v;return{status:g,fetchStatus:p,isPending:m,isSuccess:g==="success",isError:x,isInitialLoading:_,isLoading:_,data:w,dataUpdatedAt:f.dataUpdatedAt,error:d,errorUpdatedAt:h,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:v,isRefetching:v&&!m,isLoadingError:x&&f.dataUpdatedAt===0,isPaused:p==="paused",isPlaceholderData:b,isRefetchError:x&&f.dataUpdatedAt!==0,isStale:s0(t,n),refetch:this.refetch}}updateResult(t){const n=R(this,jt),r=this.createResult(R(this,ke),this.options);if(Q(this,pi,R(this,ke).state),Q(this,Vo,this.options),Zf(r,n))return;R(this,pi).data!==void 0&&Q(this,Ho,R(this,ke)),Q(this,jt,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!R(this,yi).size)return!0;const l=new Set(a??R(this,yi));return this.options.throwOnError&&l.add("error"),Object.keys(R(this,jt)).some(c=>{const f=c;return R(this,jt)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),ue(this,Ud,vC).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ue(this,Au,Ag).call(this)}},Vt=new WeakMap,ke=new WeakMap,zo=new WeakMap,jt=new WeakMap,pi=new WeakMap,Vo=new WeakMap,ar=new WeakMap,Pu=new WeakMap,Bo=new WeakMap,Ho=new WeakMap,mi=new WeakMap,gi=new WeakMap,ys=new WeakMap,yi=new WeakMap,vi=new WeakSet,gl=function(t){ue(this,Lu,Lg).call(this);let n=R(this,ke).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(wn)),n},Ru=new WeakSet,Rg=function(){if(ue(this,$u,$g).call(this),Zo||R(this,jt).isStale||!jg(this.options.staleTime))return;const n=uC(R(this,jt).dataUpdatedAt,this.options.staleTime)+1;Q(this,mi,setTimeout(()=>{R(this,jt).isStale||this.updateResult()},n))},Nu=new WeakSet,Ng=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,ke)):this.options.refetchInterval)??!1},Ou=new WeakSet,Og=function(t){ue(this,Iu,Ig).call(this),Q(this,ys,t),!(Zo||this.options.enabled===!1||!jg(R(this,ys))||R(this,ys)===0)&&Q(this,gi,setInterval(()=>{(this.options.refetchIntervalInBackground||ed.isFocused())&&ue(this,vi,gl).call(this)},R(this,ys)))},Au=new WeakSet,Ag=function(){ue(this,Ru,Rg).call(this),ue(this,Ou,Og).call(this,ue(this,Nu,Ng).call(this))},$u=new WeakSet,$g=function(){R(this,mi)&&(clearTimeout(R(this,mi)),Q(this,mi,void 0))},Iu=new WeakSet,Ig=function(){R(this,gi)&&(clearInterval(R(this,gi)),Q(this,gi,void 0))},Lu=new WeakSet,Lg=function(){const t=R(this,Vt).getQueryCache().build(R(this,Vt),this.options);if(t===R(this,ke))return;const n=R(this,ke);Q(this,ke,t),Q(this,zo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Ud=new WeakSet,vC=function(t){it.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,jt))}),R(this,Vt).getQueryCache().notify({query:R(this,ke),type:"observerResultsUpdated"})})},WS);function JN(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Sb(e,t){return JN(e,t)||e.state.dataUpdatedAt>0&&Dg(e,t,t.refetchOnMount)}function Dg(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&s0(e,t)}return!1}function Eb(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&s0(e,n)}function s0(e,t){return e.isStaleByTime(t.staleTime)}function ZN(e,t){return!Zf(e.getCurrentResult(),t)}var vs,$t,bn,$r,qo,hf,Du,Mg,KS,eO=(KS=class extends Ra{constructor(n,r){super();ee(this,qo);ee(this,Du);ee(this,vs,void 0);ee(this,$t,void 0);ee(this,bn,void 0);ee(this,$r,void 0);Q(this,$t,void 0),Q(this,vs,n),this.setOptions(r),this.bindMethods(),ue(this,qo,hf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=R(this,vs).defaultMutationOptions(n),Zf(r,this.options)||R(this,vs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,bn),observer:this}),(s=R(this,bn))==null||s.setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=R(this,bn))==null||n.removeObserver(this)}onMutationUpdate(n){ue(this,qo,hf).call(this),ue(this,Du,Mg).call(this,n)}getCurrentResult(){return R(this,$t)}reset(){Q(this,bn,void 0),ue(this,qo,hf).call(this),ue(this,Du,Mg).call(this)}mutate(n,r){var s;return Q(this,$r,r),(s=R(this,bn))==null||s.removeObserver(this),Q(this,bn,R(this,vs).getMutationCache().build(R(this,vs),this.options)),R(this,bn).addObserver(this),R(this,bn).execute(n)}},vs=new WeakMap,$t=new WeakMap,bn=new WeakMap,$r=new WeakMap,qo=new WeakSet,hf=function(){var r;const n=((r=R(this,bn))==null?void 0:r.state)??gC();Q(this,$t,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Du=new WeakSet,Mg=function(n){it.batch(()=>{var r,s,i,o,a,l,c,f;R(this,$r)&&this.hasListeners()&&((n==null?void 0:n.type)==="success"?((s=(r=R(this,$r)).onSuccess)==null||s.call(r,n.data,R(this,$t).variables,R(this,$t).context),(o=(i=R(this,$r)).onSettled)==null||o.call(i,n.data,null,R(this,$t).variables,R(this,$t).context)):(n==null?void 0:n.type)==="error"&&((l=(a=R(this,$r)).onError)==null||l.call(a,n.error,R(this,$t).variables,R(this,$t).context),(f=(c=R(this,$r)).onSettled)==null||f.call(c,void 0,n.error,R(this,$t).variables,R(this,$t).context))),this.listeners.forEach(d=>{d(R(this,$t))})})},KS),xC=y.createContext(void 0),bC=e=>{const t=y.useContext(xC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tO=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.createElement(xC.Provider,{value:e},t)),wC=y.createContext(!1),nO=()=>y.useContext(wC);wC.Provider;function rO(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sO=y.createContext(rO()),iO=()=>y.useContext(sO);function _C(e,t){return typeof e=="function"?e(...t):!!e}var oO=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},aO=e=>{y.useEffect(()=>{e.clearReset()},[e])},lO=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&_C(n,[e.error,r]),uO=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},cO=(e,t)=>e.isLoading&&e.isFetching&&!t,fO=(e,t,n)=>(e==null?void 0:e.suspense)&&cO(t,n),dO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function hO(e,t,n){const r=bC(n),s=nO(),i=iO(),o=r.defaultQueryOptions(e);o._optimisticResults=s?"isRestoring":"optimistic",uO(o),oO(o,i),aO(i);const[a]=y.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(c=>{const f=s?()=>{}:a.subscribe(it.batchCalls(c));return a.updateResult(),f},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),y.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),fO(o,l,s))throw dO(o,a,i);if(lO({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function Xn(e,t){return hO(e,XN,t)}function we(e,t){const n=bC(t),[r]=y.useState(()=>new eO(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const s=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(it.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=y.useCallback((o,a)=>{r.mutate(o,a).catch(pO)},[r]);if(s.error&&_C(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function pO(){}const SC=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),sh=y.createContext({}),i0=y.createContext(null),ih=typeof document<"u",o0=ih?y.useLayoutEffect:y.useEffect,a0=y.createContext({strict:!1});function mO(e,t,n,r){const{visualElement:s}=y.useContext(sh),i=y.useContext(a0),o=y.useContext(i0),a=y.useContext(SC).reducedMotion,l=y.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:s,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;y.useInsertionEffect(()=>{c&&c.update(n,o)});const f=y.useRef(!!window.HandoffAppearAnimations);return o0(()=>{c&&(c.render(),f.current&&c.animationState&&c.animationState.animateChanges())}),y.useEffect(()=>{c&&(c.updateFeatures(),!f.current&&c.animationState&&c.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,f.current=!1)}),c}function EC(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gO(e,t,n){return y.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):EC(n)&&(n.current=r))},[t])}function nu(e){return typeof e=="string"||Array.isArray(e)}function oh(e){return typeof e=="object"&&typeof e.start=="function"}const l0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],u0=["initial",...l0];function ah(e){return oh(e.animate)||u0.some(t=>nu(e[t]))}function CC(e){return!!(ah(e)||e.variants)}function yO(e,t){if(ah(e)){const{initial:n,animate:r}=e;return{initial:n===!1||nu(n)?n:void 0,animate:nu(r)?r:void 0}}return e.inherit!==!1?t:{}}function vO(e){const{initial:t,animate:n}=yO(e,y.useContext(sh));return y.useMemo(()=>({initial:t,animate:n}),[Cb(t),Cb(n)])}function Cb(e){return Array.isArray(e)?e.join(" "):e}const jb={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ru={};for(const e in jb)ru[e]={isEnabled:t=>jb[e].some(n=>!!t[n])};function Fg(e){for(const t in e)ru[t]={...ru[t],...e[t]}}const jC=y.createContext({}),xO=y.createContext({}),bO=Symbol.for("motionComponentSymbol");function wO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&Fg(e);function i(a,l){let c;const f={...y.useContext(SC),...a,layoutId:_O(a)},{isStatic:d}=f,h=vO(a),p=r(a,d);if(!d&&ih){h.visualElement=mO(s,p,f,t);const g=y.useContext(xO),b=y.useContext(a0).strict;h.visualElement&&(c=h.visualElement.loadFeatures(f,b,e,g))}return y.createElement(sh.Provider,{value:h},c&&h.visualElement?y.createElement(c,{visualElement:h.visualElement,...f}):null,n(s,a,gO(p,h.visualElement,l),p,d,h.visualElement))}const o=y.forwardRef(i);return o[bO]=s,o}function _O({layoutId:e}){const t=y.useContext(jC).id;return t&&e!==void 0?t+"-"+e:e}function SO(e){function t(r,s={}){return wO(e(r,s))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,s)=>(n.has(s)||n.set(s,t(s)),n.get(s))})}const EO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function c0(e){return typeof e!="string"||e.includes("-")?!1:!!(EO.indexOf(e)>-1||/[A-Z]/.test(e))}const CO={},Bu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fi=new Set(Bu);function kC(e,{layout:t,layoutId:n}){return Fi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!CO[e]||e==="opacity")}const fn=e=>!!(e&&e.getVelocity),jO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kO=Bu.length;function TO(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,s){let i="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),PC=TC("--"),Ug=TC("var(--"),PO=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,RO=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ea=(e,t,n)=>Math.min(Math.max(n,e),t),Ui={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Nl={...Ui,transform:e=>ea(0,1,e)},Nc={...Ui,default:1},Ol=e=>Math.round(e*1e5)/1e5,lh=/(-)?([\d]*\.?[\d])+/g,RC=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,NO=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Hu(e){return typeof e=="string"}const qu=e=>({test:t=>Hu(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),is=qu("deg"),Eo=qu("%"),ae=qu("px"),OO=qu("vh"),AO=qu("vw"),kb={...Eo,parse:e=>Eo.parse(e)/100,transform:e=>Eo.transform(e*100)},Tb={...Ui,transform:Math.round},NC={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:is,rotateX:is,rotateY:is,rotateZ:is,scale:Nc,scaleX:Nc,scaleY:Nc,scaleZ:Nc,skew:is,skewX:is,skewY:is,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Nl,originX:kb,originY:kb,originZ:ae,zIndex:Tb,fillOpacity:Nl,strokeOpacity:Nl,numOctaves:Tb};function f0(e,t,n,r){const{style:s,vars:i,transform:o,transformOrigin:a}=e;let l=!1,c=!1,f=!0;for(const d in t){const h=t[d];if(PC(d)){i[d]=h;continue}const p=NC[d],g=RO(h,p);if(Fi.has(d)){if(l=!0,o[d]=g,!f)continue;h!==(p.default||0)&&(f=!1)}else d.startsWith("origin")?(c=!0,a[d]=g):s[d]=g}if(t.transform||(l||r?s.transform=TO(e.transform,n,f,r):s.transform&&(s.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:p=0}=a;s.transformOrigin=`${d} ${h} ${p}`}}const d0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function OC(e,t,n){for(const r in t)!fn(t[r])&&!kC(r,n)&&(e[r]=t[r])}function $O({transformTemplate:e},t,n){return y.useMemo(()=>{const r=d0();return f0(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function IO(e,t,n){const r=e.style||{},s={};return OC(s,r,e),Object.assign(s,$O(e,t,n)),e.transformValues?e.transformValues(s):s}function LO(e,t,n){const r={},s=IO(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=s,r}const DO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function nd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||DO.has(e)}let AC=e=>!nd(e);function MO(e){e&&(AC=t=>t.startsWith("on")?!nd(t):e(t))}try{MO(require("@emotion/is-prop-valid").default)}catch{}function FO(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(AC(s)||n===!0&&nd(s)||!t&&!nd(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Pb(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function UO(e,t,n){const r=Pb(t,e.x,e.width),s=Pb(n,e.y,e.height);return`${r} ${s}`}const zO={offset:"stroke-dashoffset",array:"stroke-dasharray"},VO={offset:"strokeDashoffset",array:"strokeDasharray"};function BO(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?zO:VO;e[i.offset]=ae.transform(-r);const o=ae.transform(t),a=ae.transform(n);e[i.array]=`${o} ${a}`}function h0(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,d,h){if(f0(e,c,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g,dimensions:b}=e;p.transform&&(b&&(g.transform=p.transform),delete p.transform),b&&(s!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=UO(b,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&BO(p,o,a,l,!1)}const $C=()=>({...d0(),attrs:{}}),p0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function HO(e,t,n,r){const s=y.useMemo(()=>{const i=$C();return h0(i,t,{enableHardwareAcceleration:!1},p0(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};OC(i,e.style,e),s.style={...i,...s.style}}return s}function qO(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(c0(n)?HO:LO)(r,i,o,n),f={...FO(r,typeof n=="string",e),...l,ref:s},{children:d}=r,h=y.useMemo(()=>fn(d)?d.get():d,[d]);return y.createElement(n,{...f,children:h})}}const m0=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function IC(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const LC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function DC(e,t,n,r){IC(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(LC.has(s)?s:m0(s),t.attrs[s])}function g0(e,t){const{style:n}=e,r={};for(const s in n)(fn(n[s])||t.style&&fn(t.style[s])||kC(s,e))&&(r[s]=n[s]);return r}function MC(e,t){const n=g0(e,t);for(const r in e)if(fn(e[r])||fn(t[r])){const s=Bu.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[s]=e[r]}return n}function y0(e,t,n,r={},s={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,s)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,s)),t}function FC(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const rd=e=>Array.isArray(e),WO=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),KO=e=>rd(e)?e[e.length-1]||0:e;function GO(e){const t=fn(e)?e.get():e;return WO(t)?t.toValue():t}function YO({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,s,i){const o={latestValues:QO(r,s,i,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const UC=e=>(t,n)=>{const r=y.useContext(sh),s=y.useContext(i0),i=()=>YO(e,t,r,s);return n?i():FC(i)};function QO(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=GO(i[h]);let{initial:o,animate:a}=e;const l=ah(e),c=CC(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const d=f?a:o;return d&&typeof d!="boolean"&&!oh(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const g=y0(e,p);if(!g)return;const{transitionEnd:b,transition:w,...v}=g;for(const m in v){let x=v[m];if(Array.isArray(x)){const _=f?x.length-1:0;x=x[_]}x!==null&&(s[m]=x)}for(const m in b)s[m]=b[m]}),s}const Rt=e=>e;class Rb{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function XO(e){let t=new Rb,n=new Rb,r=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const d=f&&s,h=d?t:n;return c&&o.add(l),h.add(l)&&d&&s&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let c=0;c(d[h]=XO(()=>n=!0),d),{}),o=d=>i[d].process(s),a=()=>{const d=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(d-s.timestamp,JO),1),s.timestamp=d,s.isProcessing=!0,Oc.forEach(o),s.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,s.isProcessing||e(a)};return{schedule:Oc.reduce((d,h)=>{const p=i[h];return d[h]=(g,b=!1,w=!1)=>(n||l(),p.schedule(g,b,w)),d},{}),cancel:d=>Oc.forEach(h=>i[h].cancel(d)),state:s,steps:i}}const{schedule:Ot,cancel:sd,state:su,steps:IY}=ZO(typeof requestAnimationFrame<"u"?requestAnimationFrame:Rt,!0),eA={useVisualState:UC({scrapeMotionValuesFromProps:MC,createRenderState:$C,onMount:(e,t,{renderState:n,latestValues:r})=>{Ot.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ot.render(()=>{h0(n,r,{enableHardwareAcceleration:!1},p0(t.tagName),e.transformTemplate),DC(t,n)})}})},tA={useVisualState:UC({scrapeMotionValuesFromProps:g0,createRenderState:d0})};function nA(e,{forwardMotionProps:t=!1},n,r){return{...c0(e)?eA:tA,preloadedFeatures:n,useRender:qO(t),createVisualElement:r,Component:e}}function oi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const rA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function zC(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const sA=e=>t=>rA(t)&&e(t,zC(t));function pf(e,t,n,r){return oi(e,t,sA(n),r)}const iA=(e,t)=>n=>t(e(n)),wi=(...e)=>e.reduce(iA);function VC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Nb=VC("dragHorizontal"),Ob=VC("dragVertical");function oA(e){let t=!1;if(e==="y")t=Ob();else if(e==="x")t=Nb();else{const n=Nb(),r=Ob();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function BC(){const e=oA(!0);return e?(e(),!1):!0}class Na{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ab(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),s=(i,o)=>{if(i.type==="touch"||BC())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Ot.update(()=>a[r](i,o))};return pf(e.current,n,s,{passive:!e.getProps()[r]})}class aA extends Na{mount(){this.unmount=wi(Ab(this.node,!0),Ab(this.node,!1))}unmount(){}}class lA extends Na{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wi(oi(this.node.current,"focus",()=>this.onFocus()),oi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const HC=(e,t)=>t?e===t?!0:HC(e,t.parentElement):!1;function Mp(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,zC(n))}class uA extends Na{constructor(){super(...arguments),this.removeStartListeners=Rt,this.removeEndListeners=Rt,this.removeAccessibleListeners=Rt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=pf(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:f}=this.node.getProps();Ot.update(()=>{HC(this.node.current,a.target)?c&&c(a,l):f&&f(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=pf(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=wi(i,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Mp("up",(l,c)=>{const{onTap:f}=this.node.getProps();f&&Ot.update(()=>f(l,c))})};this.removeEndListeners(),this.removeEndListeners=oi(this.node.current,"keyup",o),Mp("down",(a,l)=>{this.startPress(a,l)})},n=oi(this.node.current,"keydown",t),r=()=>{this.isPressing&&Mp("cancel",(i,o)=>this.cancelPress(i,o))},s=oi(this.node.current,"blur",r);this.removeAccessibleListeners=wi(n,s)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Ot.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!BC()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ot.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=pf(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=oi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=wi(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const zg=new WeakMap,Fp=new WeakMap,cA=e=>{const t=zg.get(e.target);t&&t(e)},fA=e=>{e.forEach(cA)};function dA({root:e,...t}){const n=e||document;Fp.has(n)||Fp.set(n,{});const r=Fp.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(fA,{root:e,...t})),r[s]}function hA(e,t,n){const r=dA(t);return zg.set(e,n),r.observe(e),()=>{zg.delete(e),r.unobserve(e)}}const pA={some:0,all:1};class mA extends Na{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:pA[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=c?f:d;h&&h(l)};return hA(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gA(t,n))&&this.startObserver()}unmount(){}}function gA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const yA={inView:{Feature:mA},tap:{Feature:uA},focus:{Feature:lA},hover:{Feature:aA}};function qC(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function xA(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function uh(e,t,n){const r=e.getProps();return y0(r,t,n!==void 0?n:r.custom,vA(e),xA(e))}const bA="framerAppearId",wA="data-"+m0(bA);let _A=Rt,v0=Rt;const _i=e=>e*1e3,Os=e=>e/1e3,SA={current:!1},WC=e=>Array.isArray(e)&&typeof e[0]=="number";function KC(e){return!!(!e||typeof e=="string"&&GC[e]||WC(e)||Array.isArray(e)&&e.every(KC))}const yl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,GC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yl([0,.65,.55,1]),circOut:yl([.55,0,1,.45]),backIn:yl([.31,.01,.66,-.59]),backOut:yl([.33,1.53,.69,.99])};function YC(e){if(e)return WC(e)?yl(e):Array.isArray(e)?e.map(YC):GC[e]}function EA(e,t,n,{delay:r=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=YC(a);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function CA(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const QC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jA=1e-7,kA=12;function TA(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=QC(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>jA&&++aTA(i,0,1,e,n);return i=>i===0||i===1?i:QC(s(i),t,r)}const PA=Wu(.42,0,1,1),RA=Wu(0,0,.58,1),XC=Wu(.42,0,.58,1),NA=e=>Array.isArray(e)&&typeof e[0]!="number",JC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZC=e=>t=>1-e(1-t),ej=e=>1-Math.sin(Math.acos(e)),tj=ZC(ej),OA=JC(tj),nj=Wu(.33,1.53,.69,.99),x0=ZC(nj),AA=JC(x0),$A=e=>(e*=2)<1?.5*x0(e):.5*(2-Math.pow(2,-10*(e-1))),IA={linear:Rt,easeIn:PA,easeInOut:XC,easeOut:RA,circIn:ej,circInOut:OA,circOut:tj,backIn:x0,backInOut:AA,backOut:nj,anticipate:$A},$b=e=>{if(Array.isArray(e)){v0(e.length===4);const[t,n,r,s]=e;return Wu(t,n,r,s)}else if(typeof e=="string")return IA[e];return e},b0=(e,t)=>n=>!!(Hu(n)&&NO.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),rj=(e,t,n)=>r=>{if(!Hu(r))return r;const[s,i,o,a]=r.match(lh);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},LA=e=>ea(0,255,e),Up={...Ui,transform:e=>Math.round(LA(e))},ai={test:b0("rgb","red"),parse:rj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Up.transform(e)+", "+Up.transform(t)+", "+Up.transform(n)+", "+Ol(Nl.transform(r))+")"};function DA(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Vg={test:b0("#"),parse:DA,transform:ai.transform},po={test:b0("hsl","hue"),parse:rj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Eo.transform(Ol(t))+", "+Eo.transform(Ol(n))+", "+Ol(Nl.transform(r))+")"},It={test:e=>ai.test(e)||Vg.test(e)||po.test(e),parse:e=>ai.test(e)?ai.parse(e):po.test(e)?po.parse(e):Vg.parse(e),transform:e=>Hu(e)?e:e.hasOwnProperty("red")?ai.transform(e):po.transform(e)},ch=(e,t,n)=>-n*e+n*t+e;function zp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=zp(l,a,e+1/3),i=zp(l,a,e),o=zp(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}const Vp=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},FA=[Vg,ai,po],UA=e=>FA.find(t=>t.test(e));function Ib(e){const t=UA(e);let n=t.parse(e);return t===po&&(n=MA(n)),n}const sj=(e,t)=>{const n=Ib(e),r=Ib(t),s={...n};return i=>(s.red=Vp(n.red,r.red,i),s.green=Vp(n.green,r.green,i),s.blue=Vp(n.blue,r.blue,i),s.alpha=ch(n.alpha,r.alpha,i),ai.transform(s))};function zA(e){var t,n;return isNaN(e)&&Hu(e)&&(((t=e.match(lh))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(RC))===null||n===void 0?void 0:n.length)||0)>0}const ij={regex:PO,countKey:"Vars",token:"${v}",parse:Rt},oj={regex:RC,countKey:"Colors",token:"${c}",parse:It.parse},aj={regex:lh,countKey:"Numbers",token:"${n}",parse:Ui.parse};function Bp(e,{regex:t,countKey:n,token:r,parse:s}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(s)))}function id(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Bp(n,ij),Bp(n,oj),Bp(n,aj),n}function lj(e){return id(e).values}function uj(e){const{values:t,numColors:n,numVars:r,tokenised:s}=id(e),i=t.length;return o=>{let a=s;for(let l=0;ltypeof e=="number"?0:e;function BA(e){const t=lj(e);return uj(e)(t.map(VA))}const Oa={test:zA,parse:lj,createTransformer:uj,getAnimatableNone:BA},cj=(e,t)=>n=>`${n>0?t:e}`;function fj(e,t){return typeof e=="number"?n=>ch(e,t,n):It.test(e)?sj(e,t):e.startsWith("var(")?cj(e,t):hj(e,t)}const dj=(e,t)=>{const n=[...e],r=n.length,s=e.map((i,o)=>fj(i,t[o]));return i=>{for(let o=0;o{const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=fj(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}},hj=(e,t)=>{const n=Oa.createTransformer(t),r=id(e),s=id(t);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?wi(dj(r.values,s.values),n):cj(e,t)},pj=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Lb=(e,t)=>n=>ch(e,t,n);function qA(e){return typeof e=="number"?Lb:typeof e=="string"?It.test(e)?sj:hj:Array.isArray(e)?dj:typeof e=="object"?HA:Lb}function WA(e,t,n){const r=[],s=n||qA(e[0]),i=e.length-1;for(let o=0;ot[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=WA(t,r,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(ea(e[0],e[i-1],c)):l}function KA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=pj(0,t,r);e.push(ch(n,1,s))}}function GA(e){const t=[0];return KA(t,e.length-1),t}function YA(e,t){return e.map(n=>n*t)}function QA(e,t){return e.map(()=>t||XC).splice(0,e.length-1)}function od({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=NA(r)?r.map($b):$b(r),i={done:!1,value:t[0]},o=YA(n&&n.length===t.length?n:GA(t),e),a=mj(o,t,{ease:Array.isArray(s)?s:QA(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function gj(e,t){return t?e*(1e3/t):0}const XA=5;function yj(e,t,n){const r=Math.max(t-XA,0);return gj(n-e(r),t-r)}const Hp=.001,JA=.01,Db=10,ZA=.05,e5=1;function t5({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let s,i;_A(e<=_i(Db));let o=1-t;o=ea(ZA,e5,o),e=ea(JA,Db,Os(e)),o<1?(s=c=>{const f=c*o,d=f*e,h=f-n,p=Bg(c,o),g=Math.exp(-d);return Hp-h/p*g},i=c=>{const d=c*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-d),b=Bg(Math.pow(c,2),o);return(-s(c)+Hp>0?-1:1)*((h-p)*g)/b}):(s=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-Hp+f*d},i=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const a=5/e,l=r5(s,i,a);if(e=_i(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const n5=12;function r5(e,t,n){let r=n;for(let s=1;se[n]!==void 0)}function o5(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Mb(e,i5)&&Mb(e,s5)){const n=t5(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function vj({keyframes:e,restDelta:t,restSpeed:n,...r}){const s=e[0],i=e[e.length-1],o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:d,isResolvedFromDuration:h}=o5(r),p=f?-Os(f):0,g=l/(2*Math.sqrt(a*c)),b=i-s,w=Os(Math.sqrt(a/c)),v=Math.abs(b)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let m;if(g<1){const x=Bg(w,g);m=_=>{const S=Math.exp(-g*w*_);return i-S*((p+g*w*b)/x*Math.sin(x*_)+b*Math.cos(x*_))}}else if(g===1)m=x=>i-Math.exp(-w*x)*(b+(p+w*b)*x);else{const x=w*Math.sqrt(g*g-1);m=_=>{const S=Math.exp(-g*w*_),j=Math.min(x*_,300);return i-S*((p+g*w*b)*Math.sinh(j)+x*b*Math.cosh(j))/x}}return{calculatedDuration:h&&d||null,next:x=>{const _=m(x);if(h)o.done=x>=d;else{let S=p;x!==0&&(g<1?S=yj(m,x,_):S=0);const j=Math.abs(S)<=n,k=Math.abs(i-_)<=t;o.done=j&&k}return o.value=o.done?i:_,o}}}function Fb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=N=>a!==void 0&&Nl,g=N=>a===void 0?l:l===void 0||Math.abs(a-N)-b*Math.exp(-N/r),x=N=>v+m(N),_=N=>{const D=m(N),F=x(N);h.done=Math.abs(D)<=c,h.value=h.done?v:F};let S,j;const k=N=>{p(h.value)&&(S=N,j=vj({keyframes:[h.value,g(h.value)],velocity:yj(x,N,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:f}))};return k(0),{calculatedDuration:null,next:N=>{let D=!1;return!j&&S===void 0&&(D=!0,_(N),k(N)),S!==void 0&&N>S?j.next(N-S):(!D&&_(N),h)}}}const a5=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ot.update(t,!0),stop:()=>sd(t),now:()=>su.isProcessing?su.timestamp:performance.now()}},Ub=2e4;function zb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Ub?1/0:t}const l5={decay:Fb,inertia:Fb,tween:od,keyframes:od,spring:vj};function ad({autoplay:e=!0,delay:t=0,driver:n=a5,keyframes:r,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:f,onUpdate:d,...h}){let p=1,g=!1,b,w;const v=()=>{w=new Promise(Y=>{b=Y})};v();let m;const x=l5[s]||od;let _;x!==od&&typeof r[0]!="number"&&(_=mj([0,100],r,{clamp:!1}),r=[0,100]);const S=x({...h,keyframes:r});let j;a==="mirror"&&(j=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let k="idle",N=null,D=null,F=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=zb(S));const{calculatedDuration:B}=S;let T=1/0,E=1/0;B!==null&&(T=B+o,E=T*(i+1)-o);let C=0;const A=Y=>{if(D===null)return;p>0&&(D=Math.min(D,Y)),p<0&&(D=Math.min(Y-E/p,D)),N!==null?C=N:C=Math.round(Y-D)*p;const te=C-t*(p>=0?1:-1),ce=p>=0?te<0:te>E;C=Math.max(te,0),k==="finished"&&N===null&&(C=E);let ve=C,et=S;if(i){const St=C/T;let Le=Math.floor(St),lt=St%1;!lt&&St>=1&&(lt=1),lt===1&&Le--,Le=Math.min(Le,i+1);const Er=!!(Le%2);Er&&(a==="reverse"?(lt=1-lt,o&&(lt-=o/T)):a==="mirror"&&(et=j));let gn=ea(0,1,lt);C>E&&(gn=a==="reverse"&&Er?1:0),ve=gn*T}const pe=ce?{done:!1,value:r[0]}:et.next(ve);_&&(pe.value=_(pe.value));let{done:Oe}=pe;!ce&&B!==null&&(Oe=p>=0?C>=E:C<=0);const de=N===null&&(k==="finished"||k==="running"&&Oe);return d&&d(pe.value),de&&I(),pe},$=()=>{m&&m.stop(),m=void 0},L=()=>{k="idle",$(),b(),v(),D=F=null},I=()=>{k="finished",f&&f(),$(),b()},q=()=>{if(g)return;m||(m=n(A));const Y=m.now();l&&l(),N!==null?D=Y-N:(!D||k==="finished")&&(D=Y),k==="finished"&&v(),F=D,N=null,k="running",m.start()};e&&q();const H={then(Y,te){return w.then(Y,te)},get time(){return Os(C)},set time(Y){Y=_i(Y),C=Y,N!==null||!m||p===0?N=Y:D=m.now()-Y/p},get duration(){const Y=S.calculatedDuration===null?zb(S):S.calculatedDuration;return Os(Y)},get speed(){return p},set speed(Y){Y===p||!m||(p=Y,H.time=Os(C))},get state(){return k},play:q,pause:()=>{k="paused",N=C},stop:()=>{g=!0,k!=="idle"&&(k="idle",c&&c(),L())},cancel:()=>{F!==null&&A(F),L()},complete:()=>{k="finished"},sample:Y=>(D=0,A(Y))};return H}function u5(e){let t;return()=>(t===void 0&&(t=e()),t)}const c5=u5(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),f5=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Ac=10,d5=2e4,h5=(e,t)=>t.type==="spring"||e==="backgroundColor"||!KC(t.ease);function p5(e,t,{onUpdate:n,onComplete:r,...s}){if(!(c5()&&f5.has(t)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let o=!1,a,l;const c=()=>{l=new Promise(m=>{a=m})};c();let{keyframes:f,duration:d=300,ease:h,times:p}=s;if(h5(t,s)){const m=ad({...s,repeat:0,delay:0});let x={done:!1,value:f[0]};const _=[];let S=0;for(;!x.done&&Sg.cancel(),w=()=>{Ot.update(b),a(),c()};return g.onfinish=()=>{e.set(CA(f,s)),r&&r(),w()},{then(m,x){return l.then(m,x)},attachTimeline(m){return g.timeline=m,g.onfinish=null,Rt},get time(){return Os(g.currentTime||0)},set time(m){g.currentTime=_i(m)},get speed(){return g.playbackRate},set speed(m){g.playbackRate=m},get duration(){return Os(d)},play:()=>{o||(g.play(),sd(b))},pause:()=>g.pause(),stop:()=>{if(o=!0,g.playState==="idle")return;const{currentTime:m}=g;if(m){const x=ad({...s,autoplay:!1});e.setWithVelocity(x.sample(m-Ac).value,x.sample(m).value,Ac)}w()},complete:()=>g.finish(),cancel:w}}function m5({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const s=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Rt,pause:Rt,stop:Rt,then:i=>(i(),Promise.resolve()),cancel:Rt,complete:Rt});return t?ad({keyframes:[0,1],duration:0,delay:t,onComplete:s}):s()}const g5={type:"spring",stiffness:500,damping:25,restSpeed:10},y5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),v5={type:"keyframes",duration:.8},x5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},b5=(e,{keyframes:t})=>t.length>2?v5:Fi.has(e)?e.startsWith("scale")?y5(t[1]):g5:x5,Hg=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Oa.test(t)||t==="0")&&!t.startsWith("url(")),w5=new Set(["brightness","contrast","saturate","opacity"]);function _5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(lh)||[];if(!r)return e;const s=n.replace(r,"");let i=w5.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const S5=/([a-z-]*)\(.*?\)/g,qg={...Oa,getAnimatableNone:e=>{const t=e.match(S5);return t?t.map(_5).join(" "):e}},E5={...NC,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:qg,WebkitFilter:qg},w0=e=>E5[e];function xj(e,t){let n=w0(e);return n!==qg&&(n=Oa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const bj=e=>/^0[^.\s]+$/.test(e);function C5(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||bj(e)}function j5(e,t,n,r){const s=Hg(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const o=r.from!==void 0?r.from:e.get();let a;const l=[];for(let c=0;cs=>{const i=T5(r,e)||{},o=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-_i(o);const l=j5(t,e,n,i),c=l[0],f=l[l.length-1],d=Hg(e,c),h=Hg(e,f);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:g=>{t.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(k5(i)||(p={...p,...b5(e,p)}),p.duration&&(p.duration=_i(p.duration)),p.repeatDelay&&(p.repeatDelay=_i(p.repeatDelay)),!d||!h||SA.current||i.type===!1)return m5(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const g=p5(t,e,p);if(g)return g}return ad(p)};function ld(e){return!!(fn(e)&&e.add)}const wj=e=>/^\-?\d*\.?\d+$/.test(e);function R5(e,t){e.indexOf(t)===-1&&e.push(t)}function N5(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _j{constructor(){this.subscriptions=[]}add(t){return R5(this.subscriptions,t),()=>N5(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class A5{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,s=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:o}=su;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Ot.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Ot.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=O5(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new _j);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?gj(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function iu(e,t){return new A5(e,t)}const Sj=e=>t=>t.test(e),$5={test:e=>e==="auto",parse:e=>e},Ej=[Ui,ae,Eo,is,AO,OO,$5],ol=e=>Ej.find(Sj(e)),I5=[...Ej,It,Oa],L5=e=>I5.find(Sj(e));function D5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,iu(n))}function M5(e,t){const n=uh(e,t);let{transitionEnd:r={},transition:s={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const o in i){const a=KO(i[o]);D5(e,o,a)}}function F5(e,t,n){var r,s;const i=Object.keys(t).filter(a=>!e.hasValue(a)),o=i.length;if(o)for(let a=0;al.remove(d))),c.push(b)}return o&&Promise.all(c).then(()=>{o&&M5(e,o)}),c}function Wg(e,t,n={}){const r=uh(e,t,n.custom);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Cj(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=s;return B5(e,t,c+l,f,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,o]:[o,i];return l().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function B5(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(H5).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(Wg(c,t,{...i,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function H5(e,t){return e.sortNodePosition(t)}function q5(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Wg(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Wg(e,t,n);else{const s=typeof t=="function"?uh(e,t,n.custom):t;r=Promise.all(Cj(e,s,n))}return r.then(()=>e.notify("AnimationComplete",t))}const W5=[...l0].reverse(),K5=l0.length;function G5(e){return t=>Promise.all(t.map(({animation:n,options:r})=>q5(e,n,r)))}function Y5(e){let t=G5(e);const n=X5();let r=!0;const s=(l,c)=>{const f=uh(e,c);if(f){const{transition:d,transitionEnd:h,...p}=f;l={...l,...p,...h}}return l};function i(l){t=l(e)}function o(l,c){const f=e.getProps(),d=e.getVariantContext(!0)||{},h=[],p=new Set;let g={},b=1/0;for(let v=0;vb&&S;const F=Array.isArray(_)?_:[_];let B=F.reduce(s,{});j===!1&&(B={});const{prevResolvedValues:T={}}=x,E={...T,...B},C=A=>{D=!0,p.delete(A),x.needsAnimating[A]=!0};for(const A in E){const $=B[A],L=T[A];g.hasOwnProperty(A)||($!==L?rd($)&&rd(L)?!qC($,L)||N?C(A):x.protectedKeys[A]=!0:$!==void 0?C(A):p.add(A):$!==void 0&&p.has(A)?C(A):x.protectedKeys[A]=!0)}x.prevProp=_,x.prevResolvedValues=B,x.isActive&&(g={...g,...B}),r&&e.blockInitialAnimation&&(D=!1),D&&!k&&h.push(...F.map(A=>({animation:A,options:{type:m,...l}})))}if(p.size){const v={};p.forEach(m=>{const x=e.getBaseTarget(m);x!==void 0&&(v[m]=x)}),h.push({animation:v})}let w=!!h.length;return r&&f.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(h):Promise.resolve()}function a(l,c,f){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,c)}),n[l].isActive=c;const h=o(f,l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n}}function Q5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qC(t,e):!1}function Js(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function X5(){return{animate:Js(!0),whileInView:Js(),whileHover:Js(),whileTap:Js(),whileDrag:Js(),whileFocus:Js(),exit:Js()}}class J5 extends Na{constructor(t){super(t),t.animationState||(t.animationState=Y5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),oh(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Z5=0;class e$ extends Na{constructor(){super(...arguments),this.id=Z5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const t$={animation:{Feature:J5},exit:{Feature:e$}},Vb=()=>({min:0,max:0}),jj=()=>({x:Vb(),y:Vb()});function n$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function r$(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function s$(e,t){return n$(r$(e.getBoundingClientRect(),t))}const i$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function o$(e){const t=i$.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Kg(e,t,n=1){const[r,s]=o$(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return wj(o)?parseFloat(o):o}else return Ug(s)?Kg(s,t,n+1):s}function a$(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(s=>{const i=s.get();if(!Ug(i))return;const o=Kg(i,r);o&&s.set(o)});for(const s in t){const i=t[s];if(!Ug(i))continue;const o=Kg(i,r);o&&(t[s]=o,n||(n={}),n[s]===void 0&&(n[s]=i))}return{target:t,transitionEnd:n}}const l$=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),kj=e=>l$.has(e),u$=e=>Object.keys(e).some(kj),Bb=e=>e===Ui||e===ae,Hb=(e,t)=>parseFloat(e.split(", ")[t]),qb=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/);if(s)return Hb(s[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?Hb(i[1],e):0}},c$=new Set(["x","y","z"]),f$=Bu.filter(e=>!c$.has(e));function d$(e){const t=[];return f$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const ta={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:qb(4,13),y:qb(5,14)};ta.translateX=ta.x;ta.translateY=ta.y;const h$=(e,t,n)=>{const r=t.measureViewportBox(),s=t.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{a[c]=ta[c](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const f=t.getValue(c);f&&f.jump(a[c]),e[c]=ta[c](l,i)}),e},p$=(e,t,n={},r={})=>{t={...t},r={...r};const s=Object.keys(t).filter(kj);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let f=n[l],d=ol(f);const h=t[l];let p;if(rd(h)){const g=h.length,b=h[0]===null?1:0;f=h[b],d=ol(f);for(let w=b;w=0?window.pageYOffset:null,c=h$(t,e,a);return i.length&&i.forEach(([f,d])=>{e.getValue(f).set(d)}),e.render(),ih&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function m$(e,t,n,r){return u$(t)?p$(e,t,n,r):{target:t,transitionEnd:r}}const g$=(e,t,n,r)=>{const s=a$(e,t,r);return t=s.target,r=s.transitionEnd,m$(e,t,n,r)},Gg={current:null},Tj={current:!1};function y$(){if(Tj.current=!0,!!ih)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gg.current=e.matches;e.addListener(t),t()}else Gg.current=!1}function v$(e,t,n){const{willChange:r}=t;for(const s in t){const i=t[s],o=n[s];if(fn(i))e.addValue(s,i),ld(r)&&r.add(s);else if(fn(o))e.addValue(s,iu(i,{owner:e})),ld(r)&&r.remove(s);else if(o!==i)if(e.hasValue(s)){const a=e.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(s);e.addValue(s,iu(a!==void 0?a:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Wb=new WeakMap,Pj=Object.keys(ru),x$=Pj.length,Kb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],b$=u0.length;class w${constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Ot.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=ah(n),this.isVariantNode=CC(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{});for(const d in f){const h=f[d];a[d]!==void 0&&fn(h)&&(h.set(a[d],!1),ld(c)&&c.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Wb.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Tj.current||y$(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gg.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Wb.delete(this.current),this.projection&&this.projection.unmount(),sd(this.notifyUpdate),sd(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Fi.has(t),s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Ot.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,s,i){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:i,layoutScroll:h,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):jj()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=iu(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,s=typeof r=="string"||typeof r=="object"?(n=y0(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!fn(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _j),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Rj extends w${sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:s},i){let o=z5(r,t||{},this);if(s&&(n&&(n=s(n)),r&&(r=s(r)),o&&(o=s(o))),i){F5(this,r,o);const a=g$(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function _$(e){return window.getComputedStyle(e)}class S$ extends Rj{readValueFromInstance(t,n){if(Fi.has(n)){const r=w0(n);return r&&r.default||0}else{const r=_$(t),s=(PC(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return s$(t,n)}build(t,n,r,s){f0(t,n,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,n){return g0(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,s){IC(t,n,r,s)}}class E$ extends Rj{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fi.has(n)){const r=w0(n);return r&&r.default||0}return n=LC.has(n)?n:m0(n),t.getAttribute(n)}measureInstanceViewportBox(){return jj()}scrapeMotionValuesFromProps(t,n){return MC(t,n)}build(t,n,r,s){h0(t,n,r,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,r,s){DC(t,n,r,s)}mount(t){this.isSVGTag=p0(t.tagName),super.mount(t)}}const C$=(e,t)=>c0(e)?new E$(t,{enableHardwareAcceleration:!1}):new S$(t,{enableHardwareAcceleration:!0}),Qr=SO(nA);function Nj(){const e=y.useRef(!1);return o0(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function j$(){const e=Nj(),[t,n]=y.useState(0),r=y.useCallback(()=>{e.current&&n(t+1)},[t]);return[y.useCallback(()=>Ot.postRender(r),[r]),t]}class k$ extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function T$({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0});return y.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:l}=s.current;if(t||!r.current||!i||!o)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${i}px !important; height: ${o}px !important; top: ${a}px !important; left: ${l}px !important; } `),()=>{document.head.removeChild(c)}},[t]),y.createElement(k$,{isPresent:t,childRef:r,sizeRef:s},y.cloneElement(e,{ref:r}))}const qp=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=FC(P$),l=y.useId(),c=y.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:f=>{a.set(f,!0);for(const d of a.values())if(!d)return;r&&r()},register:f=>(a.set(f,!1),()=>a.delete(f))}),i?void 0:[n]);return y.useMemo(()=>{a.forEach((f,d)=>a.set(d,!1))},[n]),y.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=y.createElement(T$,{isPresent:n},e)),y.createElement(i0.Provider,{value:c},e)};function P$(){return new Map}function R$(e){return y.useEffect(()=>()=>e(),[])}const Ji=e=>e.key||"";function N$(e,t){e.forEach(n=>{const r=Ji(n);t.set(r,n)})}function O$(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const Aa=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const a=y.useContext(jC).forceRender||j$()[0],l=Nj(),c=O$(e);let f=c;const d=y.useRef(new Map).current,h=y.useRef(f),p=y.useRef(new Map).current,g=y.useRef(!0);if(o0(()=>{g.current=!1,N$(c,p),h.current=f}),R$(()=>{g.current=!0,p.clear(),d.clear()}),g.current)return y.createElement(y.Fragment,null,f.map(m=>y.createElement(qp,{key:Ji(m),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:o},m)));f=[...f];const b=h.current.map(Ji),w=c.map(Ji),v=b.length;for(let m=0;m{if(w.indexOf(x)!==-1)return;const _=p.get(x);if(!_)return;const S=b.indexOf(x);let j=m;if(!j){const k=()=>{p.delete(x),d.delete(x);const N=h.current.findIndex(D=>D.key===x);if(h.current.splice(N,1),!d.size){if(h.current=c,l.current===!1)return;a(),r&&r()}};j=y.createElement(qp,{key:Ji(_),isPresent:!1,onExitComplete:k,custom:t,presenceAffectsLayout:i,mode:o},_),d.set(x,j)}f.splice(S,0,j)}),f=f.map(m=>{const x=m.key;return d.has(x)?m:y.createElement(qp,{key:Ji(m),isPresent:!0,presenceAffectsLayout:i,mode:o},m)}),y.createElement(y.Fragment,null,d.size?f:f.map(m=>y.cloneElement(m)))};function A$({children:e,features:t,strict:n=!1}){const[,r]=y.useState(!Wp(t)),s=y.useRef(void 0);if(!Wp(t)){const{renderer:i,...o}=t;s.current=i,Fg(o)}return y.useEffect(()=>{Wp(t)&&t().then(({renderer:i,...o})=>{Fg(o),s.current=i,r(!0)})},[]),y.createElement(a0.Provider,{value:{renderer:s.current,strict:n}},e)}function Wp(e){return typeof e=="function"}const $$={renderer:C$,...t$,...yA};function Oj(e,t){return function(){return e.apply(t,arguments)}}const{toString:I$}=Object.prototype,{getPrototypeOf:_0}=Object,fh=(e=>t=>{const n=I$.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),br=e=>(e=e.toLowerCase(),t=>fh(t)===e),dh=e=>t=>typeof t===e,{isArray:$a}=Array,ou=dh("undefined");function L$(e){return e!==null&&!ou(e)&&e.constructor!==null&&!ou(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Aj=br("ArrayBuffer");function D$(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Aj(e.buffer),t}const M$=dh("string"),Nn=dh("function"),$j=dh("number"),hh=e=>e!==null&&typeof e=="object",F$=e=>e===!0||e===!1,mf=e=>{if(fh(e)!=="object")return!1;const t=_0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},U$=br("Date"),z$=br("File"),V$=br("Blob"),B$=br("FileList"),H$=e=>hh(e)&&Nn(e.pipe),q$=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Nn(e.append)&&((t=fh(e))==="formdata"||t==="object"&&Nn(e.toString)&&e.toString()==="[object FormData]"))},W$=br("URLSearchParams"),K$=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ku(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),$a(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Lj=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Dj=e=>!ou(e)&&e!==Lj;function Yg(){const{caseless:e}=Dj(this)&&this||{},t={},n=(r,s)=>{const i=e&&Ij(t,s)||s;mf(t[i])&&mf(r)?t[i]=Yg(t[i],r):mf(r)?t[i]=Yg({},r):$a(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r(Ku(t,(s,i)=>{n&&Nn(s)?e[i]=Oj(s,n):e[i]=s},{allOwnKeys:r}),e),Y$=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Q$=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},X$=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&_0(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},J$=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Z$=e=>{if(!e)return null;if($a(e))return e;let t=e.length;if(!$j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},eI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_0(Uint8Array)),tI=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},nI=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},rI=br("HTMLFormElement"),sI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Gb=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),iI=br("RegExp"),Mj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ku(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},oI=e=>{Mj(e,(t,n)=>{if(Nn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Nn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},aI=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return $a(e)?r(e):r(String(e).split(t)),n},lI=()=>{},uI=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Kp="abcdefghijklmnopqrstuvwxyz",Yb="0123456789",Fj={DIGIT:Yb,ALPHA:Kp,ALPHA_DIGIT:Kp+Kp.toUpperCase()+Yb},cI=(e=16,t=Fj.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function fI(e){return!!(e&&Nn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const dI=e=>{const t=new Array(10),n=(r,s)=>{if(hh(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=$a(r)?[]:{};return Ku(r,(o,a)=>{const l=n(o,s+1);!ou(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},hI=br("AsyncFunction"),pI=e=>e&&(hh(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch),z={isArray:$a,isArrayBuffer:Aj,isBuffer:L$,isFormData:q$,isArrayBufferView:D$,isString:M$,isNumber:$j,isBoolean:F$,isObject:hh,isPlainObject:mf,isUndefined:ou,isDate:U$,isFile:z$,isBlob:V$,isRegExp:iI,isFunction:Nn,isStream:H$,isURLSearchParams:W$,isTypedArray:eI,isFileList:B$,forEach:Ku,merge:Yg,extend:G$,trim:K$,stripBOM:Y$,inherits:Q$,toFlatObject:X$,kindOf:fh,kindOfTest:br,endsWith:J$,toArray:Z$,forEachEntry:tI,matchAll:nI,isHTMLForm:rI,hasOwnProperty:Gb,hasOwnProp:Gb,reduceDescriptors:Mj,freezeMethods:oI,toObjectSet:aI,toCamelCase:sI,noop:lI,toFiniteNumber:uI,findKey:Ij,global:Lj,isContextDefined:Dj,ALPHABET:Fj,generateString:cI,isSpecCompliantForm:fI,toJSONObject:dI,isAsyncFn:hI,isThenable:pI};function me(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}z.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Uj=me.prototype,zj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zj[e]={value:e}});Object.defineProperties(me,zj);Object.defineProperty(Uj,"isAxiosError",{value:!0});me.from=(e,t,n,r,s,i)=>{const o=Object.create(Uj);return z.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),me.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const mI=null;function Qg(e){return z.isPlainObject(e)||z.isArray(e)}function Vj(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function Qb(e,t,n){return e?e.concat(t).map(function(s,i){return s=Vj(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function gI(e){return z.isArray(e)&&!e.some(Qg)}const yI=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function ph(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!z.isUndefined(w[b])});const r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(s))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(z.isDate(g))return g.toISOString();if(!l&&z.isBlob(g))throw new me("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(g)||z.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,b,w){let v=g;if(g&&!w&&typeof g=="object"){if(z.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(z.isArray(g)&&gI(g)||(z.isFileList(g)||z.endsWith(b,"[]"))&&(v=z.toArray(g)))return b=Vj(b),v.forEach(function(x,_){!(z.isUndefined(x)||x===null)&&t.append(o===!0?Qb([b],_,i):o===null?b:b+"[]",c(x))}),!1}return Qg(g)?!0:(t.append(Qb(w,b,i),c(g)),!1)}const d=[],h=Object.assign(yI,{defaultVisitor:f,convertValue:c,isVisitable:Qg});function p(g,b){if(!z.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+b.join("."));d.push(g),z.forEach(g,function(v,m){(!(z.isUndefined(v)||v===null)&&s.call(t,v,z.isString(m)?m.trim():m,b,h))===!0&&p(v,b?b.concat(m):[m])}),d.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Xb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function S0(e,t){this._pairs=[],e&&ph(e,this,t)}const Bj=S0.prototype;Bj.append=function(t,n){this._pairs.push([t,n])};Bj.toString=function(t){const n=t?function(r){return t.call(this,r,Xb)}:Xb;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function vI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hj(e,t,n){if(!t)return e;const r=n&&n.encode||vI,s=n&&n.serialize;let i;if(s?i=s(t,n):i=z.isURLSearchParams(t)?t.toString():new S0(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class xI{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Jb=xI,qj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bI=typeof URLSearchParams<"u"?URLSearchParams:S0,wI=typeof FormData<"u"?FormData:null,_I=typeof Blob<"u"?Blob:null,SI=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),EI=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),dr={isBrowser:!0,classes:{URLSearchParams:bI,FormData:wI,Blob:_I},isStandardBrowserEnv:SI,isStandardBrowserWebWorkerEnv:EI,protocols:["http","https","file","blob","url","data"]};function CI(e,t){return ph(e,new dr.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return dr.isNode&&z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function jI(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kI(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&z.isArray(s)?s.length:o,l?(z.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!z.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&z.isArray(s[o])&&(s[o]=kI(s[o])),!a)}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,(r,s)=>{t(jI(r),s,n,0)}),n}return null}function TI(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const E0={transitional:qj,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=z.isObject(t);if(i&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return s&&s?JSON.stringify(Wj(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return CI(t,this.formSerializer).toString();if((a=z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ph(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),TI(t)):t}],transformResponse:[function(t){const n=this.transitional||E0.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&z.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?me.from(a,me.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dr.classes.FormData,Blob:dr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{E0.headers[e]={}});const C0=E0,PI=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),RI=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&PI[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Zb=Symbol("internals");function al(e){return e&&String(e).trim().toLowerCase()}function gf(e){return e===!1||e==null?e:z.isArray(e)?e.map(gf):String(e)}function NI(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const OI=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gp(e,t,n,r,s){if(z.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!z.isString(t)){if(z.isString(r))return t.indexOf(r)!==-1;if(z.isRegExp(r))return r.test(t)}}function AI(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function $I(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class mh{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,c){const f=al(l);if(!f)throw new Error("header name must be a non-empty string");const d=z.findKey(s,f);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||l]=gf(a))}const o=(a,l)=>z.forEach(a,(c,f)=>i(c,f,l));return z.isPlainObject(t)||t instanceof this.constructor?o(t,n):z.isString(t)&&(t=t.trim())&&!OI(t)?o(RI(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=al(t),t){const r=z.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return NI(s);if(z.isFunction(n))return n.call(this,s,r);if(z.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=al(t),t){const r=z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gp(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=al(o),o){const a=z.findKey(r,o);a&&(!n||Gp(r,r[a],a,n))&&(delete r[a],s=!0)}}return z.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Gp(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return z.forEach(this,(s,i)=>{const o=z.findKey(r,i);if(o){n[o]=gf(s),delete n[i];return}const a=t?AI(i):String(i).trim();a!==i&&delete n[i],n[a]=gf(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return z.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Zb]=this[Zb]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=al(o);r[a]||($I(s,o),r[a]=!0)}return z.isArray(t)?t.forEach(i):i(t),this}}mh.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(mh.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});z.freezeMethods(mh);const zr=mh;function Yp(e,t){const n=this||C0,r=t||n,s=zr.from(r.headers);let i=r.data;return z.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Kj(e){return!!(e&&e.__CANCEL__)}function Gu(e,t,n){me.call(this,e??"canceled",me.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(Gu,me,{__CANCEL__:!0});function II(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new me("Request failed with status code "+n.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const LI=dr.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,a){const l=[];l.push(n+"="+encodeURIComponent(r)),z.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),z.isString(i)&&l.push("path="+i),z.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function DI(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function MI(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Gj(e,t){return e&&!DI(t)?MI(e,t):t}const FI=dr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const a=z.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function UI(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zI(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),f=r[i];o||(o=c),n[s]=l,r[s]=c;let d=i,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-n,l=r(a),c=i<=o;n=i;const f={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-i)/l:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}const VI=typeof XMLHttpRequest<"u",BI=VI&&function(e){return new Promise(function(n,r){let s=e.data;const i=zr.from(e.headers).normalize(),o=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}let c;z.isFormData(s)&&(dr.isStandardBrowserEnv||dr.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?z.isString(c=i.getContentType())&&i.setContentType(c.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let f=new XMLHttpRequest;if(e.auth){const g=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(g+":"+b))}const d=Gj(e.baseURL,e.url);f.open(e.method.toUpperCase(),Hj(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function h(){if(!f)return;const g=zr.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),w={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:g,config:e,request:f};II(function(m){n(m),l()},function(m){r(m),l()},w),f=null}if("onloadend"in f?f.onloadend=h:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(h)},f.onabort=function(){f&&(r(new me("Request aborted",me.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new me("Network Error",me.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||qj;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),r(new me(b,w.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,f)),f=null},dr.isStandardBrowserEnv){const g=FI(d)&&e.xsrfCookieName&&LI.read(e.xsrfCookieName);g&&i.set(e.xsrfHeaderName,g)}s===void 0&&i.setContentType(null),"setRequestHeader"in f&&z.forEach(i.toJSON(),function(b,w){f.setRequestHeader(w,b)}),z.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",ew(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",ew(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=g=>{f&&(r(!g||g.type?new Gu(null,e,f):g),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const p=UI(d);if(p&&dr.protocols.indexOf(p)===-1){r(new me("Unsupported protocol "+p+":",me.ERR_BAD_REQUEST,e));return}f.send(s||null)})},Xg={http:mI,xhr:BI};z.forEach(Xg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tw=e=>`- ${e}`,HI=e=>z.isFunction(e)||e===null||e===!1,Yj={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : `+i.map(tw).join(` `):" "+tw(i[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Xg};function Qp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gu(null,e)}function nw(e){return Qp(e),e.headers=zr.from(e.headers),e.data=Yp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yj.getAdapter(e.adapter||C0.adapter)(e).then(function(r){return Qp(e),r.data=Yp.call(e,e.transformResponse,r),r.headers=zr.from(r.headers),r},function(r){return Kj(r)||(Qp(e),r&&r.response&&(r.response.data=Yp.call(e,e.transformResponse,r.response),r.response.headers=zr.from(r.response.headers))),Promise.reject(r)})}const rw=e=>e instanceof zr?e.toJSON():e;function na(e,t){t=t||{};const n={};function r(c,f,d){return z.isPlainObject(c)&&z.isPlainObject(f)?z.merge.call({caseless:d},c,f):z.isPlainObject(f)?z.merge({},f):z.isArray(f)?f.slice():f}function s(c,f,d){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function i(c,f){if(!z.isUndefined(f))return r(void 0,f)}function o(c,f){if(z.isUndefined(f)){if(!z.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in t)return r(c,f);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,f)=>s(rw(c),rw(f),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(f){const d=l[f]||s,h=d(e[f],t[f],f);z.isUndefined(h)&&d!==a||(n[f]=h)}),n}const Qj="1.6.0",j0={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{j0[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const sw={};j0.transitional=function(t,n,r){function s(i,o){return"[Axios v"+Qj+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new me(s(o," has been removed"+(n?" in "+n:"")),me.ERR_DEPRECATED);return n&&!sw[o]&&(sw[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};function qI(e,t,n){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new me("option "+i+" must be "+l,me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}}const Jg={assertOptions:qI,validators:j0},ns=Jg.validators;class ud{constructor(t){this.defaults=t,this.interceptors={request:new Jb,response:new Jb}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=na(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Jg.assertOptions(r,{silentJSONParsing:ns.transitional(ns.boolean),forcedJSONParsing:ns.transitional(ns.boolean),clarifyTimeoutError:ns.transitional(ns.boolean)},!1),s!=null&&(z.isFunction(s)?n.paramsSerializer={serialize:s}:Jg.assertOptions(s,{encode:ns.function,serialize:ns.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&z.merge(i.common,i[n.method]);i&&z.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=zr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(l=l&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let f,d=0,h;if(!l){const g=[nw.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),h=g.length,f=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Gu(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new k0(function(s){t=s}),cancel:t}}}const WI=k0;function KI(e){return function(n){return e.apply(null,n)}}function GI(e){return z.isObject(e)&&e.isAxiosError===!0}const Zg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zg).forEach(([e,t])=>{Zg[t]=e});const YI=Zg;function Xj(e){const t=new yf(e),n=Oj(yf.prototype.request,t);return z.extend(n,yf.prototype,t,{allOwnKeys:!0}),z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Xj(na(e,s))},n}const Ze=Xj(C0);Ze.Axios=yf;Ze.CanceledError=Gu;Ze.CancelToken=WI;Ze.isCancel=Kj;Ze.VERSION=Qj;Ze.toFormData=ph;Ze.AxiosError=me;Ze.Cancel=Ze.CanceledError;Ze.all=function(t){return Promise.all(t)};Ze.spread=KI;Ze.isAxiosError=GI;Ze.mergeConfig=na;Ze.AxiosHeaders=zr;Ze.formToJSON=e=>Wj(z.isHTMLForm(e)?new FormData(e):e);Ze.getAdapter=Yj.getAdapter;Ze.HttpStatusCode=YI;Ze.default=Ze;const wr=Ze;let Jj=0;function Zj(){return Jj}function iw(e){Jj=e}function Ia(e){return e?/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(e):!1}function Co(e,t){var n;return wr.isAxiosError(e)&&((n=e.response)==null?void 0:n.status)==t}const qe=new QN({defaultOptions:{queries:{staleTime:3e4,retry:(e,t)=>!Co(t,401)&&!Co(t,403)&&!Co(t,404)&&e<2}}}),re=wr.create();re.defaults.withCredentials=!0;re.defaults.responseType="json";re.defaults.headers={common:{Accept:"application/json"}};re.interceptors.request.use(e=>{var r,s,i,o,a,l,c,f;!((r=e.url)!=null&&r.startsWith("auth"))&&!((s=e.url)!=null&&s.startsWith("secure"))&&!((i=e.url)!=null&&i.startsWith("log-viewer"))&&!Ia(e==null?void 0:e.url)&&(e.url=`api/v1/${e.url}`);const t=(o=e.method)==null?void 0:o.toUpperCase();t==="GET"&&Array.isArray((a=e.params)==null?void 0:a.with)&&(e.params.with=e.params.with.join(",")),t==="GET"&&Array.isArray((l=e.params)==null?void 0:l.load)&&(e.params.load=e.params.load.join(",")),t==="GET"&&Array.isArray((c=e.params)==null?void 0:c.loadCount)&&(e.params.loadCount=e.params.loadCount.join(","));const n=Zj();if(n){const d=(f=e.method)==null?void 0:f.toLowerCase();["get","post","put"].includes(d)&&(e.params={...e.params,workspaceId:n})}return(t==="PUT"||t==="DELETE"||t==="PATCH")&&(e.headers={...e.headers,"X-HTTP-Method-Override":t},e.method="POST",e.params={...e.params,_method:t}),e});const Xr=G.createContext(null);function le(e,t){return{...t,message:e}}const QI=""+new URL("general_top-26f8c7f2.jpg",import.meta.url).href,XI=""+new URL("title_top-10fd7c9b.jpg",import.meta.url).href,JI=""+new URL("person_top-57e57d80.jpg",import.meta.url).href,ZI=""+new URL("general_bottom-e27cf306.jpg",import.meta.url).href,eL=""+new URL("watch_top-6272eec3.jpg",import.meta.url).href;var ek={exports:{}};(function(e,t){(function(n,r,s){e.exports=s(),e.exports.default=s()})("slugify",Tf,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function s(i,o){if(typeof i!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var a=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,c=o.trim===void 0?!0:o.trim,f=i.normalize().split("").reduce(function(d,h){var p=a[h];return p===void 0&&(p=n[h]),p===void 0&&(p=h),p===l&&(p=" "),d+p.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(f=f.replace(/[^A-Za-z0-9\s]/g,"")),c&&(f=f.trim()),f=f.replace(/\s+/g,l),o.lower&&(f=f.toLowerCase()),f}return s.extend=function(i){Object.assign(n,i)},s})})(ek);var tL=ek.exports;const nL=Qn(tL);function rL(e,t="-",n=!1){if(!e)return e;let r=nL(e,{lower:!0,replacement:t,strict:n,remove:/[*+~.()'"!:@?\|/\\#]/g});return r||(r=e.replace(/\s+/g,"-").toLowerCase()),r}function sL(e){return`/user/${e.id}/${rL(e.display_name)}`}const iL={homepage:{options:[{label:le("Landing page"),value:"landingPage"}]},auth:{redirectUri:"/",adminRedirectUri:"/admin",getUserProfileLink:sL},admin:{channelsDocsLink:"https://support.vebto.com/hc/articles/35/38/220/channels",ads:[{image:QI,slot:"ads.general_top",description:le("Appears at the top of most pages. Best size <= 150px height or responsive.")},{image:ZI,slot:"ads.general_bottom",description:le("Appears at the bottom of most pages. Best size <= 150px height or responsive.")},{image:XI,slot:"ads.title_top",description:le("Appears in title page only (after plot summary). Best size <= 850px width or responsive.")},{image:JI,slot:"ads.person_top",description:le("Appears in person page only (after biography). Best size <= 850px width or responsive.")},{image:eL,slot:"ads.watch_top",description:le("Appears in watch page only (below video player). Best size is as wide as possible or responsive.")}]}};var oL=function(t){return aL(t)&&!lL(t)};function aL(e){return!!e&&typeof e=="object"}function lL(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||fL(e)}var uL=typeof Symbol=="function"&&Symbol.for,cL=uL?Symbol.for("react.element"):60103;function fL(e){return e.$$typeof===cL}function dL(e){return Array.isArray(e)?[]:{}}function au(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ra(dL(e),e,t):e}function hL(e,t,n){return e.concat(t).map(function(r){return au(r,n)})}function pL(e,t){if(!t.customMerge)return ra;var n=t.customMerge(e);return typeof n=="function"?n:ra}function mL(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function ow(e){return Object.keys(e).concat(mL(e))}function tk(e,t){try{return t in e}catch{return!1}}function gL(e,t){return tk(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function yL(e,t,n){var r={};return n.isMergeableObject(e)&&ow(e).forEach(function(s){r[s]=au(e[s],n)}),ow(t).forEach(function(s){gL(e,s)||(tk(e,s)&&n.isMergeableObject(t[s])?r[s]=pL(s,n)(e[s],t[s],n):r[s]=au(t[s],n))}),r}function ra(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||hL,n.isMergeableObject=n.isMergeableObject||oL,n.cloneUnlessOtherwiseSpecified=au;var r=Array.isArray(t),s=Array.isArray(e),i=r===s;return i?r?n.arrayMerge(e,t,n):yL(e,t,n):au(t,n)}ra.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,s){return ra(r,s,n)},{})};var vL=ra,xL=vL;const bL=Qn(xL);function nk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const{attr:n,size:r,title:s,className:i,color:o,style:a,children:l,viewBox:c,width:f,height:d,...h}=e;return u.jsxs("svg",{"aria-hidden":!s,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:c||"0 0 24 24",...n,...h,className:V("svg-icon",i,_L(r)),style:{color:o,...a},ref:t,height:d||"1em",width:f||"1em",children:[s&&u.jsx("title",{children:s}),l]})});function _L(e){switch(e){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-md";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return e}}function oe(e,t="",n){const r=(s,i)=>u.jsx(wL,{"data-testid":`${t}Icon`,ref:i,viewBox:n,...s,size:s.size||"md",children:e});return G.memo(G.forwardRef(r))}function gh(e,t=""){const n=rk(e);return oe(n,t)}function rk(e){return(e==null?void 0:e.map)&&e.map((t,n)=>G.createElement(t.tag,{key:n,...t.attr},rk(t.child)))}function SL(e){const t={},n={tag:e.tagName,attr:t};return Array.from(e.attributes).forEach(r=>{t[r.name]=r.value}),e.children.length&&(n.child=Array.from(e.children).map(r=>SL(r))),n}const EL=oe(u.jsx("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H2v-.99C2.2 16.29 5.3 15 8 15s5.8 1.29 6 2v1zM12.51 4.05C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"}),"GroupAddOutlined"),CL=oe(u.jsx("path",{d:"M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5zM4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25H4.34zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12zm0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7zm7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44zM15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35z"}),"PeopleOutlined"),jL=oe(u.jsx("path",{d:"M20.13 5.41 18.72 4l-9.19 9.19-4.25-4.24-1.41 1.41 5.66 5.66zM5 18h14v2H5z"}),"FileDownloadDoneOutlined"),Yu=["bootstrapData"];function In(){return qe.getQueryData(Yu)}function kL(){qe.invalidateQueries({queryKey:Yu})}function sk(e){qe.setQueryData(Yu,typeof e=="string"?T0(e):e)}function TL(e){sk({...In(),...e})}const ik=typeof window<"u"&&window.bootstrapData?T0(window.bootstrapData):void 0;qe.setQueryData(Yu,ik);function PL(){return Xn({queryKey:Yu,queryFn:()=>RL(),staleTime:1/0,placeholderData:dC,initialData:ik})}const RL=async()=>re.get("bootstrap-data").then(e=>T0(e.data.data));function T0(e){return typeof e=="string"?JSON.parse(e):e}function ok(e){if(Ia(e))return e;const t=In().settings.asset_url||In().settings.base_url;return e=e.replace(/^\/+/g,""),e.startsWith("assets/")?`${t}/build/${e}`:`${t}/${e}`}const P0=y.memo(({src:e,className:t,height:n="h-full"})=>{const{data:r}=NL(e);return u.jsx("div",{className:V("svg-image-container inline-block bg-no-repeat",n,t),dangerouslySetInnerHTML:r})});function NL(e){return Xn({queryKey:["svgImage",ok(e)],queryFn:()=>OL(e),refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,staleTime:1/0,enabled:!!e})}function OL(e){return wr.get(e,{responseType:"text"}).then(t=>({__html:t.data}))}const R0=y.memo(({src:e,className:t,...n})=>{let r=null;if(e?typeof e=="object"?r="icon":e.endsWith(".svg")&&!Ia(e)?r="svg":r="image":r=null,r==="svg")return u.jsx(P0,{...n,className:t,src:e,height:!1});if(r==="image")return u.jsx("img",{...n,className:t,src:e,alt:""});if(r==="icon"){const s=e;return u.jsx(s,{...n,className:t})}return null});function N0(e,{padding:t,equalWidth:n,variant:r}={}){switch(e){case"2xs":return r==="link"?"text-xs":`text-xs h-24 ${n?"w-24":t||"px-10"}`;case"xs":return r==="link"?"text-xs":`text-xs h-30 ${n?"w-30":t||"px-14"}`;case"sm":return r==="link"?"text-sm":`text-sm h-36 ${n?"w-36":t||"px-18"}`;case"md":return r==="link"?"text-base":`text-base h-42 ${n?"w-42":t||"px-22"}`;case"lg":return r==="link"?"text-lg":`text-base h-50 ${n?"w-50":t||"px-26"}`;case"xl":return r==="link"?"text-xl":`text-lg h-60 ${n?"w-60":t||"px-32"}`;default:return e||""}}function AL(e){const{variant:t,shadow:n,whitespace:r="whitespace-nowrap",display:s="inline-flex"}=e,i={...e,border:e.border||"border"};let o=[];return t==="outline"?o=$L(i):t==="text"?o=IL(i):t==="flat"||t==="raised"?o=DL(i):t==="link"&&(o=LL(i)),[...o,n||t==="raised"&&"shadow-md",r,s,t&&"align-middle flex-shrink-0 items-center transition-button duration-200","select-none appearance-none no-underline outline-none disabled:pointer-events-none disabled:cursor-default"]}function $L({color:e,border:t}){const n="disabled:text-disabled disabled:bg-transparent disabled:border-disabled-bg";switch(e){case"primary":return[`text-primary bg-transparent ${t} border-primary/50`,"hover:bg-primary/hover hover:border-primary",n];case"danger":return[`text-danger bg-transparent ${t} border-danger/50`,"hover:bg-danger/4 hover:border-danger",n];case"positive":return[`text-positive bg-transparent ${t} border-positive/50`,"hover:bg-positive/4 hover:border-positive",n];case"paper":return[`text bg-paper ${t}`,"hover:bg-hover",n];case"white":return["text-white bg-transparent border border-white","hover:bg-white/20","disabled:text-white/70 disabled:border-white/70 disabled:bg-transparent"];default:return[`bg-transparent ${t}`,"hover:bg-hover",n]}}function IL({color:e}){const t="disabled:text-disabled disabled:bg-transparent";switch(e){case"primary":return["text-primary bg-transparent border-transparent","hover:bg-primary/4",t];case"danger":return["text-danger bg-transparent border-transparent","hover:bg-danger/4",t];case"positive":return["text-positive bg-transparent border-transparent","hover:bg-positive/4",t];case"white":return["text-white bg-transparent border-transparent","hover:bg-white/20","disabled:text-white/70 disabled:bg-transparent"];default:return["bg-transparent border-transparent","hover:bg-hover",t]}}function LL({color:e}){switch(e){case"primary":return["text-primary","hover:underline","disabled:text-disabled"];case"danger":return["text-danger","hover:underline","disabled:text-disabled"];default:return["text-main","hover:underline","disabled:text-disabled"]}}function DL({color:e,border:t}){const n="disabled:text-disabled disabled:bg-disabled disabled:border-transparent disabled:shadow-none";switch(e){case"primary":return[`text-on-primary bg-primary ${t} border-primary`,"hover:bg-primary-dark hover:border-primary-dark",n];case"danger":return[`text-white bg-danger ${t} border-danger`,"hover:bg-danger/90 hover:border-danger/90",n];case"chip":return[`text-main bg-chip ${t} border-chip`,"hover:bg-chip/90 hover:border-chip/90",n];case"paper":return[`text-main bg-paper ${t} border-paper`,"hover:bg-paper/90 hover:border-paper/90",n];case"white":return[`text-black bg-white ${t} border-white`,"hover:bg-white",n];default:return[`bg ${t} border-background`,"hover:bg-hover",n]}}function En(e){return e&&(t=>{t.currentTarget.contains(t.target)&&e(t)})}const yh=y.forwardRef((e,t)=>{const{children:n,color:r=null,variant:s,radius:i,shadow:o,whitespace:a,justify:l="justify-center",className:c,href:f,form:d,border:h,elementType:p,to:g,relative:b,replace:w,end:v,display:m,type:x="button",onClick:_,onPointerDown:S,onPointerUp:j,onKeyDown:k,...N}=e,D=p||(f?"a":"button"),F=D==="a";return u.jsx(D,{ref:t,form:F?void 0:d,href:f,to:g,relative:b,type:F?void 0:x,replace:w,end:v,onPointerDown:En(S),onPointerUp:En(j),onClick:En(_),onKeyDown:En(k),className:V("focus-visible:ring",AL({variant:s,color:r,border:h,whitespace:a,display:m}),i,l,c),...N,children:n})}),se=G.forwardRef(({children:e,startIcon:t,endIcon:n,size:r="sm",sizeClassName:s,className:i,equalWidth:o=!1,radius:a="rounded-button",variant:l="text",disabled:c,elementType:f,to:d,href:h,download:p,...g},b)=>{const w=V("font-semibold",s||N0(r,{equalWidth:o,variant:l}),i);return u.jsxs(yh,{className:w,ref:b,radius:a,variant:l,disabled:c,to:c?void 0:d,href:c?void 0:h,download:c?void 0:p,elementType:c?void 0:f,...g,children:[t&&u.jsx(aw,{position:"start",icon:t,size:r}),e,n&&u.jsx(aw,{position:"end",icon:n,size:r})]})});function aw({icon:e,position:t,size:n}){const r=V("m-auto",{"-ml-4 mr-8":t==="start","-mr-4 ml-8":t==="end"},e.props.className);return G.cloneElement(e,{className:r,size:n})}function ML(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function O0(e,t,n){ML(e,t),t.set(e,n)}function Xp(e,t){return e-t*Math.floor(e/t)}const ak=1721426;function $c(e,t,n,r){t=A0(e,t);let s=t-1,i=-2;return n<=2?i=0:vf(t)&&(i=-1),ak-1+365*s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400)+Math.floor((367*n-362)/12+i+r)}function vf(e){return e%4===0&&(e%100!==0||e%400===0)}function A0(e,t){return e==="BC"?1-t:t}function FL(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const UL={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class sa{fromJulianDay(t){let n=t,r=n-ak,s=Math.floor(r/146097),i=Xp(r,146097),o=Math.floor(i/36524),a=Xp(i,36524),l=Math.floor(a/1461),c=Xp(a,1461),f=Math.floor(c/365),d=s*400+o*100+l*4+f+(o!==4&&f!==4?1:0),[h,p]=FL(d),g=n-$c(h,p,1,1),b=2;n<$c(h,p,3,1)?b=0:vf(p)&&(b=1);let w=Math.floor(((g+b)*12+373)/367),v=n-$c(h,p,w,1)+1;return new lu(h,p,w,v)}toJulianDay(t){return $c(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return UL[vf(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return vf(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const zL={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function VL(e,t){return t=Tn(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function LY(e,t){return t=Tn(t,e.calendar),e=cd(e),t=cd(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function DY(e,t){return VL(e,HL(t))}function lk(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-YL(t))%7;return r<0&&(r+=7),r}function BL(e){return Mr(Date.now(),e)}function HL(e){return JL(BL(e))}function uk(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function qL(e,t){return lw(e)-lw(t)}function lw(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Jp=null;function Qu(){return Jp==null&&(Jp=new Intl.DateTimeFormat().resolvedOptions().timeZone),Jp}function cd(e){return e.subtract({days:e.day-1})}function WL(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function MY(e){return cd(e.subtract({months:e.month-1}))}function FY(e){return WL(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function UY(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function zY(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function KL(e,t){let n=lk(e,t);return e.subtract({days:n})}function VY(e,t){return KL(e,t).add({days:6})}const uw=new Map;function GL(e){if(Intl.Locale){let n=uw.get(e);return n||(n=new Intl.Locale(e).maximize().region,uw.set(e,n)),n}let t=e.split("-")[1];return t==="u"?null:t}function YL(e){let t=GL(e);return zL[t]||0}function BY(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((lk(cd(e),t)+n)/7)}function HY(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function qY(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ia(e){e=Tn(e,new sa);let t=A0(e.era,e.year);return ck(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ck(e,t,n,r,s,i,o){let a=new Date;return a.setUTCHours(r,s,i,o),a.setUTCFullYear(e,t-1,n),a.getTime()}function ey(e,t){if(t==="UTC")return 0;if(e>0&&t===Qu())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:s,hour:i,minute:o,second:a}=fk(e,t);return ck(n,r,s,i,o,a,0)-Math.floor(e/1e3)*1e3}const cw=new Map;function fk(e,t){let n=cw.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),cw.set(t,n));let r=n.formatToParts(new Date(e)),s={};for(let i of r)i.type!=="literal"&&(s[i.type]=i.value);return{year:s.era==="BC"||s.era==="B"?-s.year+1:+s.year,month:+s.month,day:+s.day,hour:s.hour==="24"?0:+s.hour,minute:+s.minute,second:+s.second}}const fw=864e5;function QL(e,t,n,r){return(n===r?[n]:[n,r]).filter(i=>XL(e,t,i))}function XL(e,t,n){let r=fk(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function Ir(e,t,n="compatible"){let r=oa(e);if(t==="UTC")return ia(r);if(t===Qu()&&n==="compatible"){r=Tn(r,new sa);let l=new Date,c=A0(r.era,r.year);return l.setFullYear(c,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let s=ia(r),i=ey(s-fw,t),o=ey(s+fw,t),a=QL(r,t,s-i,s-o);if(a.length===1)return a[0];if(a.length>1)switch(n){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-i,s-o);case"compatible":case"later":return Math.max(s-i,s-o);case"reject":throw new RangeError("No such absolute time found")}}function dk(e,t,n="compatible"){return new Date(Ir(e,t,n))}function Mr(e,t){let n=ey(e,t),r=new Date(e+n),s=r.getUTCFullYear(),i=r.getUTCMonth()+1,o=r.getUTCDate(),a=r.getUTCHours(),l=r.getUTCMinutes(),c=r.getUTCSeconds(),f=r.getUTCMilliseconds();return new aa(s,i,o,t,n,a,l,c,f)}function JL(e){return new lu(e.calendar,e.era,e.year,e.month,e.day)}function oa(e,t){let n=0,r=0,s=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:s,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:s,millisecond:i}=t),new uu(e.calendar,e.era,e.year,e.month,e.day,n,r,s,i)}function Tn(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Pi(r),r}function ZL(e,t,n){if(e instanceof aa)return e.timeZone===t?e:hk(e,t);let r=Ir(e,t,n);return Mr(r,t)}function eD(e){let t=ia(e)-e.offset;return new Date(t)}function hk(e,t){let n=ia(e)-e.offset;return Tn(Mr(n,t),e.calendar)}const ll=36e5;function vh(e,t){let n=e.copy(),r="hour"in n?sD(n,t):0;ty(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,ny(n),pk(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,tD(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let s=n.calendar.getYearsInEra(n);if(n.year>s){var i,o;let l=(o=(i=n.calendar).isInverseEra)===null||o===void 0?void 0:o.call(i,n);n.year=s,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function ty(e,t){var n,r;!((r=(n=e.calendar).isInverseEra)===null||r===void 0)&&r.call(n,e)&&(t=-t),e.year+=t}function ny(e){for(;e.month<1;)ty(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,ty(e,1)}function tD(e){for(;e.day<1;)e.month--,ny(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ny(e)}function pk(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Pi(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),pk(e)}function mk(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function gk(e,t){return vh(e,mk(t))}function $0(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Pi(n),n}function fd(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),rD(n),n}function nD(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Ic(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Ic(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Ic(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Ic(e.hour,24),t}function rD(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Ic(e,t){let n=e%t;return n<0&&(n+=t),n}function sD(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,nD(e)}function I0(e,t,n,r){let s=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),l=a.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=Fr(l,n,0,a.length-1,r==null?void 0:r.round),s.era=a[l],Pi(s);break}case"year":var i,o;!((o=(i=s.calendar).isInverseEra)===null||o===void 0)&&o.call(i,s)&&(n=-n),s.year=Fr(e.year,n,-1/0,9999,r==null?void 0:r.round),s.year===-1/0&&(s.year=1),s.calendar.balanceYearMonth&&s.calendar.balanceYearMonth(s,e);break;case"month":s.month=Fr(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":s.day=Fr(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(s),Pi(s),s}function yk(e,t,n,r){let s=e.copy();switch(t){case"hour":{let i=e.hour,o=0,a=23;if((r==null?void 0:r.hourCycle)===12){let l=i>=12;o=l?12:0,a=l?23:11}s.hour=Fr(i,n,o,a,r==null?void 0:r.round);break}case"minute":s.minute=Fr(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":s.second=Fr(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":s.millisecond=Fr(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return s}function Fr(e,t,n,r,s=!1){if(s){e+=Math.sign(t),e0?e=Math.ceil(e/i)*i:e=Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function vk(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let s=vh(oa(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Ir(s,e.timeZone)}else n=ia(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=Mr(n,e.timeZone);return Tn(r,e.calendar)}function iD(e,t){return vk(e,mk(t))}function oD(e,t,n,r){switch(t){case"hour":{let s=0,i=23;if((r==null?void 0:r.hourCycle)===12){let g=e.hour>=12;s=g?12:0,i=g?23:11}let o=oa(e),a=Tn(fd(o,{hour:s}),new sa),l=[Ir(a,e.timeZone,"earlier"),Ir(a,e.timeZone,"later")].filter(g=>Mr(g,e.timeZone).day===a.day)[0],c=Tn(fd(o,{hour:i}),new sa),f=[Ir(c,e.timeZone,"earlier"),Ir(c,e.timeZone,"later")].filter(g=>Mr(g,e.timeZone).day===c.day).pop(),d=ia(e)-e.offset,h=Math.floor(d/ll),p=d%ll;return d=Fr(h,n,Math.floor(l/ll),Math.floor(f/ll),r==null?void 0:r.round)*ll+p,Tn(Mr(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return yk(e,t,n,r);case"era":case"year":case"month":case"day":{let s=I0(oa(e),t,n,r),i=Ir(s,e.timeZone);return Tn(Mr(i,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function aD(e,t,n){let r=oa(e),s=fd($0(r,t),t);if(s.compare(r)===0)return e;let i=Ir(s,e.timeZone,n);return Tn(Mr(i,e.timeZone),e.calendar)}const lD=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,uD=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function WY(e){let t=e.match(lD);if(!t)throw new Error("Invalid ISO 8601 date time string: "+e);let n=new uu(kt(t[1],1,9999),kt(t[2],1,12),1,t[4]?kt(t[4],0,23):0,t[5]?kt(t[5],0,59):0,t[6]?kt(t[6],0,59):0,t[7]?kt(t[7],0,1/0)*1e3:0);return n.day=kt(t[3],0,n.calendar.getDaysInMonth(n)),n}function cD(e,t){let n=e.match(uD);if(!n)throw new Error("Invalid ISO 8601 date time string: "+e);let r=new aa(kt(n[1],1,9999),kt(n[2],1,12),1,t,0,n[4]?kt(n[4],0,23):0,n[5]?kt(n[5],0,59):0,n[6]?kt(n[6],0,59):0,n[7]?kt(n[7],0,1/0)*1e3:0);r.day=kt(n[3],0,r.calendar.getDaysInMonth(r));var s;return n[8]&&(r.offset=kt(n[8],-23,23)*36e5+kt((s=n[9])!==null&&s!==void 0?s:"0",0,59)*6e4),hk(r,t)}function xk(e){return cD(e,Qu())}function kt(e,t,n){let r=Number(e);if(rn)throw new RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function fD(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function bk(e){let t=Tn(e,new sa);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function wk(e){return`${bk(e)}T${fD(e)}`}function dD(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function hD(e){return`${wk(e)}${dD(e.offset)}[${e.timeZone}]`}function L0(e){let t=typeof e[0]=="object"?e.shift():new sa,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let r=e.shift(),s=e.shift(),i=e.shift();return[t,n,r,s,i]}var pD=new WeakMap;class lu{copy(){return this.era?new lu(this.calendar,this.era,this.year,this.month,this.day):new lu(this.calendar,this.year,this.month,this.day)}add(t){return vh(this,t)}subtract(t){return gk(this,t)}set(t){return $0(this,t)}cycle(t,n,r){return I0(this,t,n,r)}toDate(t){return dk(this,t)}toString(){return bk(this)}compare(t){return uk(this,t)}constructor(...t){O0(this,pD,{writable:!0,value:void 0});let[n,r,s,i,o]=L0(t);this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,Pi(this)}}var mD=new WeakMap;class uu{copy(){return this.era?new uu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new uu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return vh(this,t)}subtract(t){return gk(this,t)}set(t){return $0(fd(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return I0(this,t,n,r);default:return yk(this,t,n,r)}}toDate(t,n){return dk(this,t,n)}toString(){return wk(this)}compare(t){let n=uk(this,t);return n===0?qL(this,oa(t)):n}constructor(...t){O0(this,mD,{writable:!0,value:void 0});let[n,r,s,i,o]=L0(t);this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Pi(this)}}var gD=new WeakMap;class aa{copy(){return this.era?new aa(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new aa(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return vk(this,t)}subtract(t){return iD(this,t)}set(t,n){return aD(this,t,n)}cycle(t,n,r){return oD(this,t,n,r)}toDate(){return eD(this)}toString(){return hD(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-ZL(t,this.timeZone).toDate().getTime()}constructor(...t){O0(this,gD,{writable:!0,value:void 0});let[n,r,s,i,o]=L0(t),a=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,this.timeZone=a,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Pi(this)}}let Zp=new Map;class yD{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n= start date");let r=this.formatter.formatToParts(t),s=this.formatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return bD()&&(this.resolvedHourCycle||(this.resolvedHourCycle=wD(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=_k(t,n),this.options=n}}const vD={true:{ja:"h11"},false:{}};function _k(e,t={}){if(typeof t.hour12=="boolean"&&xD()){t={...t};let s=vD[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=s??i,delete t.hour12}let n=e+(t?Object.entries(t).sort((s,i)=>s[0]i.type==="hour").value,10),s=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(r===0&&s===23)return"h23";if(r===24&&s===23)return"h24";if(r===0&&s===11)return"h11";if(r===12&&s===11)return"h12";throw new Error("Unexpected hour cycle result")}function Ri(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),s=n.length;if(r.length!==s)return!1;for(let i=0;i!r||r==="auto"?Qu():r,[r])}var Ek={exports:{}};(function(e){(function(){var t=Object.assign;typeof t!="function"&&(t=function(){var s=arguments,i=arguments[0];if(i==null)throw new TypeError("Cannot convert undefined or null to object");i=Object(i);for(var o=1;o=0&&(o=0)}function r(s,i){i||(i={});var o=i.vargs||n(s),a=Object.create(null),l=[],c=[],f,d=new WeakMap,h=function(x,_,S){return setTimeout(function(){if(S){_.splice(x,1),S.splice(x,1);return}_ instanceof WeakMap?_.delete(x):delete _[x]},i.maxAge)},p=i.maxAge>0&&i.maxAge<1/0?h:0,g=i.equals?i.equals:function(x,_){return x===_},b=i.maxArgs,w=i.serializer,v,m;return s.length===1&&!i.equals&&!o?(v=(function(x){var _=typeof x;if(!w&&(_==="object"&&x||_==="function")){var S;return d.get(x)||(!p||p(x,d),d.set(x,S=s.call(this,x)),S)}var j=_==="number"||_==="boolean"||x==null?x:_==="string"?JSON.stringify(x):w(x);return a[j]||(!p||p(j,a),a[j]=s.call(this,x))}).bind(this),m=1):v=(function(){var x=arguments.length;if(!x&&f!=null)return c[f];var _=b||x,S;for(S=l.length-1;S>=0;S--)if(!(!b&&l[S].length!==_)){for(var j=_-1;j>=0&&g(l[S][j],arguments[j]);j--)if(j===0)return c[S]}return S=l.length-(S+1),!x&&f==null&&(f=S),!p||p(S,c,l),c[S]=s.apply(this,l[S]=arguments)}).bind(this),v.clear=function(){d=new WeakMap,a=Object.create(null),l=[],c=[],f=void 0},v.keys=function(){return m?null:l.slice()},v.values=function(){return m?null:c.slice()},v.keyValues=function(){return m?{primitives:t({},a),objects:d}:null},v}e.exports=r,typeof window<"u"&&(window.nanomemoize=r)}).call(Tf)})(Ek);var _D=Ek.exports;const Xu=Qn(_D);function Ck(e,{message:t,values:n}){const r=t.match(/\[(.+?)]/),s=n==null?void 0:n.count;if(r&&r[1]&&!Number.isNaN(s)){const[i,o]=r,a=o.split("|");if(!a.length)return t;const c=SD(e).select(s);let f=a.find(h=>h.startsWith(c));f||(f=a[0]);const d=f.substring(f.indexOf(" ")+1);return t.replace(i,d)}return t}const SD=Xu(e=>new Intl.PluralRules(e));function dw(e,t){return e==null?!1:Object.hasOwn!==void 0?Object.hasOwn(e,t):Object.hasOwnProperty(t)}const P=y.memo(e=>{const{message:t,values:n}=e,{lines:r,localeCode:s}=zi();let i;if(dw(r,t)?i=r==null?void 0:r[t]:dw(r,t==null?void 0:t.toLowerCase())?i=r==null?void 0:r[t.toLowerCase()]:i=t,!n||!i)return u.jsx(y.Fragment,{children:i});i=Ck(s,{message:i,values:n});const o=[],a=[];if(Object.entries(n).forEach(([l,c])=>{typeof c=="function"?a.push(l):y.isValidElement(c)?o.push(l):c!=null&&(i=i==null?void 0:i.replace(`:${l}`,`${c}`))}),a.length||o.length){const l=[];if(a.length){const h=a.join("");l.push(`(<[${h}]>.+?<\\/[${h}]>)`)}if(o.length){const h=o.join("|");l.push(`(:(?:${h}))`)}const c=new RegExp(l.join("|"),"gm"),d=i.split(c).filter(Boolean).map((h,p)=>{if(h.startsWith("<")&&h.endsWith(">")){const g=h.match(/<([a-z]+)>(.+?)<\/([a-z]+)>/);if(g){const[,b,w]=g,v=n==null?void 0:n[b];if(typeof v=="function"){const m=v(w);return y.cloneElement(m,{key:p})}}}if(h.startsWith(":")){const g=h.replace(":",""),b=n==null?void 0:n[g];if(y.isValidElement(b))return y.cloneElement(b,{key:p})}return h});return u.jsx(y.Fragment,{children:d})}return u.jsx(y.Fragment,{children:i})},ED);function ED(e,t){const{values:n,...r}=e,{values:s,...i}=t;return Ri(s,n)&&Ri(r,i)}const hw=[{amount:60,name:"seconds"},{amount:60,name:"minutes"},{amount:24,name:"hours"},{amount:7,name:"days"},{amount:4.34524,name:"weeks"},{amount:12,name:"months"},{amount:Number.POSITIVE_INFINITY,name:"years"}],jk=y.memo(({date:e,style:t})=>{const{localeCode:n}=zi(),r=Sk(),s=y.useMemo(()=>new Intl.RelativeTimeFormat(n,{numeric:"auto",style:t}),[n,t]);if(!e)return null;try{typeof e=="string"?e=xk(e).toDate():"toDate"in e&&(e=e.toDate(r))}catch{return null}let i=(e.getTime()-Date.now())/1e3;for(let o=0;o<=hw.length;o++){const a=hw[o];if(Math.abs(i)kD(e)})}function kD(e){return re.get(kk,{params:e}).then(t=>t.data)}Gn.key=[kk];const pw=e=>{let t;const n=new Set,r=(l,c)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const d=t;t=c??typeof f!="object"?f:Object.assign({},t,f),n.forEach(h=>h(t,d))}},s=()=>t,a={setState:r,getState:s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,s,a),a},TD=e=>e?pw(e):pw;var Tk={exports:{}},Pk={},Rk={exports:{}},Nk={};/** * @license React * use-sync-external-store-shim.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 la=y;function PD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var RD=typeof Object.is=="function"?Object.is:PD,ND=la.useState,OD=la.useEffect,AD=la.useLayoutEffect,$D=la.useDebugValue;function ID(e,t){var n=t(),r=ND({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return AD(function(){s.value=n,s.getSnapshot=t,nm(s)&&i({inst:s})},[e,n,t]),OD(function(){return nm(s)&&i({inst:s}),e(function(){nm(s)&&i({inst:s})})},[e]),$D(n),n}function nm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!RD(e,n)}catch{return!0}}function LD(e,t){return t()}var DD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?LD:ID;Nk.useSyncExternalStore=la.useSyncExternalStore!==void 0?la.useSyncExternalStore:DD;Rk.exports=Nk;var MD=Rk.exports;/** * @license React * use-sync-external-store-shim/with-selector.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 xh=y,FD=MD;function UD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zD=typeof Object.is=="function"?Object.is:UD,VD=FD.useSyncExternalStore,BD=xh.useRef,HD=xh.useEffect,qD=xh.useMemo,WD=xh.useDebugValue;Pk.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=BD(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=qD(function(){function l(p){if(!c){if(c=!0,f=p,p=r(p),s!==void 0&&o.hasValue){var g=o.value;if(s(g,p))return d=g}return d=p}if(g=d,zD(f,p))return g;var b=r(p);return s!==void 0&&s(g,b)?g:(f=p,d=b)}var c=!1,f,d,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,s]);var a=VD(e,i[0],i[1]);return HD(function(){o.hasValue=!0,o.value=a},[a]),WD(a),a};Tk.exports=Pk;var KD=Tk.exports;const GD=Qn(KD),{useSyncExternalStoreWithSelector:YD}=GD;function Ok(e,t=e.getState,n){const r=YD(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return y.useDebugValue(r),r}const mw=e=>{const t=typeof e=="function"?TD(e):e,n=(r,s)=>Ok(t,r,s);return Object.assign(n,t),n},M0=e=>e?mw(e):mw;var Ak=Symbol.for("immer-nothing"),gw=Symbol.for("immer-draftable"),xe=Symbol.for("immer-state");function Cn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ua=Object.getPrototypeOf;function ca(e){return!!e&&!!e[xe]}function Wr(e){var t;return e?$k(e)||Array.isArray(e)||!!e[gw]||!!((t=e.constructor)!=null&&t[gw])||wh(e)||_h(e):!1}var QD=Object.prototype.constructor.toString();function $k(e){if(!e||typeof e!="object")return!1;const t=ua(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===QD}function fa(e,t){bh(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function bh(e){const t=e[xe];return t?t.type_:Array.isArray(e)?1:wh(e)?2:_h(e)?3:0}function ry(e,t){return bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ik(e,t,n){const r=bh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function XD(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function wh(e){return e instanceof Map}function _h(e){return e instanceof Set}function ft(e){return e.copy_||e.base_}function sy(e,t){if(wh(e))return new Map(e);if(_h(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&$k(e))return ua(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[xe];let r=Reflect.ownKeys(n);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=JD),Object.freeze(e),t&&fa(e,(n,r)=>F0(r,!0))),e}function JD(){Cn(2)}function Sh(e){return Object.isFrozen(e)}var iy={};function Ni(e){const t=iy[e];return t||Cn(0,e),t}function ZD(e,t){iy[e]||(iy[e]=t)}var cu;function dd(){return cu}function e6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yw(e,t){t&&(Ni("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oy(e){ay(e),e.drafts_.forEach(t6),e.drafts_=null}function ay(e){e===cu&&(cu=e.parent_)}function vw(e){return cu=e6(cu,e)}function t6(e){const t=e[xe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[xe].modified_&&(oy(t),Cn(4)),Wr(e)&&(e=hd(t,e),t.parent_||pd(t,e)),t.patches_&&Ni("Patches").generateReplacementPatches_(n[xe].base_,e,t.patches_,t.inversePatches_)):e=hd(t,n,[]),oy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ak?e:void 0}function hd(e,t,n){if(Sh(t))return t;const r=t[xe];if(!r)return fa(t,(s,i)=>bw(e,r,t,s,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return pd(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let i=s,o=!1;r.type_===3&&(i=new Set(s),s.clear(),o=!0),fa(i,(a,l)=>bw(e,r,s,a,l,n,o)),pd(e,s,!1),n&&e.patches_&&Ni("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function bw(e,t,n,r,s,i,o){if(ca(s)){const a=i&&t&&t.type_!==3&&!ry(t.assigned_,r)?i.concat(r):void 0,l=hd(e,s,a);if(Ik(n,r,l),ca(l))e.canAutoFreeze_=!1;else return}else o&&n.add(s);if(Wr(s)&&!Sh(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;hd(e,s),(!t||!t.scope_.parent_)&&pd(e,s)}}function pd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&F0(t,n)}function n6(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:dd(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,i=U0;n&&(s=[r],i=fu);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,a}var U0={get(e,t){if(t===xe)return e;const n=ft(e);if(!ry(n,t))return r6(e,n,t);const r=n[t];return e.finalized_||!Wr(r)?r:r===rm(e.base_,t)?(sm(e),e.copy_[t]=du(r,e)):r},has(e,t){return t in ft(e)},ownKeys(e){return Reflect.ownKeys(ft(e))},set(e,t,n){const r=Lk(ft(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=rm(ft(e),t),i=s==null?void 0:s[xe];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(XD(n,s)&&(n!==void 0||ry(e.base_,t)))return!0;sm(e),Ar(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return rm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sm(e),Ar(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ft(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Cn(11)},getPrototypeOf(e){return ua(e.base_)},setPrototypeOf(){Cn(12)}},fu={};fa(U0,(e,t)=>{fu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});fu.deleteProperty=function(e,t){return fu.set.call(this,e,t,void 0)};fu.set=function(e,t,n){return U0.set.call(this,e[0],t,n,e[0])};function rm(e,t){const n=e[xe];return(n?ft(n):e)[t]}function r6(e,t,n){var s;const r=Lk(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Lk(e,t){if(!(t in e))return;let n=ua(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ua(n)}}function Ar(e){e.modified_||(e.modified_=!0,e.parent_&&Ar(e.parent_))}function sm(e){e.copy_||(e.copy_=sy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var s6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(l=i,...c){return o.produce(l,f=>n.call(this,f,...c))}}typeof n!="function"&&Cn(6),r!==void 0&&typeof r!="function"&&Cn(7);let s;if(Wr(t)){const i=vw(this),o=du(t,void 0);let a=!0;try{s=n(o),a=!1}finally{a?oy(i):ay(i)}return yw(i,r),xw(s,i)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Ak&&(s=void 0),this.autoFreeze_&&F0(s,!0),r){const i=[],o=[];Ni("Patches").generateReplacementPatches_(t,s,i,o),r(i,o)}return s}else Cn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let r,s;return[this.produce(t,n,(o,a)=>{r=o,s=a}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Wr(e)||Cn(8),ca(e)&&(e=i6(e));const t=vw(this),n=du(e,void 0);return n[xe].isManual_=!0,ay(t),n}finishDraft(e,t){const n=e&&e[xe];(!n||!n.isManual_)&&Cn(9);const{scope_:r}=n;return yw(r,t),xw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Ni("Patches").applyPatches_;return ca(e)?r(e,t):this.produce(e,s=>r(s,t))}};function du(e,t){const n=wh(e)?Ni("MapSet").proxyMap_(e,t):_h(e)?Ni("MapSet").proxySet_(e,t):n6(e,t);return(t?t.scope_:dd()).drafts_.push(n),n}function i6(e){return ca(e)||Cn(10,e),Dk(e)}function Dk(e){if(!Wr(e)||Sh(e))return e;const t=e[xe];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=sy(e,t.scope_.immer_.useStrictShallowCopy_)}else n=sy(e,!0);return fa(n,(r,s)=>{Ik(n,r,Dk(s))}),t&&(t.finalized_=!1),n}function o6(){class e extends Map{constructor(l,c){super(),this[xe]={type_:2,parent_:c,scope_:c?c.scope_:dd(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return ft(this[xe]).size}has(l){return ft(this[xe]).has(l)}set(l,c){const f=this[xe];return o(f),(!ft(f).has(l)||ft(f).get(l)!==c)&&(n(f),Ar(f),f.assigned_.set(l,!0),f.copy_.set(l,c),f.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[xe];return o(c),n(c),Ar(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[xe];o(l),ft(l).size&&(n(l),Ar(l),l.assigned_=new Map,fa(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const f=this[xe];ft(f).forEach((d,h,p)=>{l.call(c,this.get(h),h,this)})}get(l){const c=this[xe];o(c);const f=ft(c).get(l);if(c.finalized_||!Wr(f)||f!==c.base_.get(l))return f;const d=du(f,c);return n(c),c.copy_.set(l,d),d}keys(){return ft(this[xe]).keys()}values(){const l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const c=l.next();return c.done?c:{done:!1,value:this.get(c.value)}}}}entries(){const l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const c=l.next();if(c.done)return c;const f=this.get(c.value);return{done:!1,value:[c.value,f]}}}}[Symbol.iterator](){return this.entries()}}function t(a,l){return new e(a,l)}function n(a){a.copy_||(a.assigned_=new Map,a.copy_=new Map(a.base_))}class r extends Set{constructor(l,c){super(),this[xe]={type_:3,parent_:c,scope_:c?c.scope_:dd(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return ft(this[xe]).size}has(l){const c=this[xe];return o(c),c.copy_?!!(c.copy_.has(l)||c.drafts_.has(l)&&c.copy_.has(c.drafts_.get(l))):c.base_.has(l)}add(l){const c=this[xe];return o(c),this.has(l)||(i(c),Ar(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[xe];return o(c),i(c),Ar(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[xe];o(l),ft(l).size&&(i(l),Ar(l),l.copy_.clear())}values(){const l=this[xe];return o(l),i(l),l.copy_.values()}entries(){const l=this[xe];return o(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const f=this.values();let d=f.next();for(;!d.done;)l.call(c,d.value,d.value,this),d=f.next()}}function s(a,l){return new r(a,l)}function i(a){a.copy_||(a.copy_=new Set,a.base_.forEach(l=>{if(Wr(l)){const c=du(l,a);a.drafts_.set(l,c),a.copy_.add(c)}else a.copy_.add(l)}))}function o(a){a.revoked_&&Cn(3,JSON.stringify(ft(a)))}ZD("MapSet",{proxyMap_:t,proxySet_:s})}var dn=new s6,z0=dn.produce;dn.produceWithPatches.bind(dn);dn.setAutoFreeze.bind(dn);dn.setUseStrictShallowCopy.bind(dn);dn.applyPatches.bind(dn);dn.createDraft.bind(dn);dn.finishDraft.bind(dn);const a6=e=>(t,n,r)=>(r.setState=(s,i,...o)=>{const a=typeof s=="function"?z0(s):s;return t(a,i,...o)},e(r.setState,n,r)),V0=a6;let Mk=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");class l6{constructor(t,n){Se(this,"timerId");Se(this,"createdAt",0);this.callback=t,this.remaining=n,this.resume()}pause(){clearTimeout(this.timerId),this.remaining-=Date.now()-this.createdAt}resume(){this.createdAt=Date.now(),this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(this.callback,this.remaining)}clear(){clearTimeout(this.timerId)}}const u6=1;function c6(e){switch(e){case"danger":return 8e3;case"loading":return 0;default:return 3e3}}const Fk=M0()(V0((e,t)=>({toasts:[],add:(n,r)=>{const s=t().toasts.length+1-u6;s>0&&e(f=>{f.toasts.splice(0,s)});const i=(r==null?void 0:r.id)||Mk(6),o=(r==null?void 0:r.type)||"positive",a=(r==null?void 0:r.duration)??c6(o),l={timer:a>0?new l6(()=>t().remove(i),a):null,message:n,...r,id:i,type:o,position:(r==null?void 0:r.position)||"bottom-center",duration:a,disableExitAnimation:r==null?void 0:r.disableExitAnimation,disableEnterAnimation:r==null?void 0:r.disableEnterAnimation},c=t().toasts.findIndex(f=>f.id===l.id);c>-1?e(f=>{f.toasts[c]=l}):e(f=>{f.toasts.push(l)})},remove:n=>{const r=t().toasts.filter(s=>{var i;return n===s.id?((i=s.timer)==null||i.clear(),!1):!0});e(s=>{s.toasts=r})}})));function da(){return Fk.getState()}function be(e,t){da().add(e,t)}be.danger=(e,t)=>{da().add(e,{...t,type:"danger"})};be.positive=(e,t)=>{da().add(e,{...t,type:"positive"})};be.loading=(e,t)=>{da().add(e,{...t,type:"loading"})};function As(e,t){var n;if(wr.isAxiosError(e)&&e.response){const r=e.response.data;if(t!=null){const s=(n=r.errors)==null?void 0:n[t];return Array.isArray(s)?s[0]:s}return r==null?void 0:r.message}}const B0=M0()(V0((e,t)=>({dialog:null,data:void 0,resolveClosePromise:null,openDialog:(n,r)=>new Promise(s=>{e(i=>{i.dialog=n,i.data=r,i.resolveClosePromise=s})}),closeActiveDialog:n=>{var r,s;(s=(r=t()).resolveClosePromise)==null||s.call(r,n),e(i=>{i.dialog=null,i.data=void 0,i.resolveClosePromise=null})}}))),Uk=B0.getState().openDialog,f6=e=>{B0.getState().closeActiveDialog(e)};function ha(e,t,n){let[r,s]=y.useState(e||t),i=y.useRef(e!==void 0),o=e!==void 0;y.useEffect(()=>{let c=i.current;c!==o&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o},[o]);let a=o?e:r,l=y.useCallback((c,...f)=>{let d=(h,...p)=>{n&&(Object.is(a,h)||n(h,...p)),o||(a=h)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s((p,...g)=>{let b=c(o?a:p,...g);return d(b,...f),o?p:b})):(o||s(c),d(c,...f))},[o,a,n]);return[a,l]}function KY(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function GY(e,t,n,r){t=Number(t),n=Number(n);let s=(e-(isNaN(t)?0:t))%r,i=Math.abs(s)*2>=r?e+Math.sign(s)*(r-Math.abs(s)):e-s;isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(n/r)*r):in&&(i=t+Math.floor((n-t)/r)*r);let o=r.toString(),a=o.indexOf("."),l=a>=0?o.length-a:0;if(l>0){let c=Math.pow(10,l);i=Math.round(i*c)/c}return i}function YY(e,t,n=10){const r=Math.pow(n,t);return Math.round(e*r)/r}const md={prefix:String(Math.round(Math.random()*1e10)),current:0},zk=G.createContext(md),d6=G.createContext(!1);let h6=!!(typeof window<"u"&&window.document&&window.document.createElement),im=new WeakMap;function p6(e=!1){let t=y.useContext(zk),n=y.useRef(null);if(n.current===null&&!e){var r,s;let i=(r=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||r===void 0||(s=r.ReactCurrentOwner)===null||s===void 0?void 0:s.current;if(i){let o=im.get(i);o==null?im.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==o.state&&(t.current=o.id,im.delete(i))}n.current=++t.current}return n.current}function m6(e){let t=y.useContext(zk);t===md&&!h6&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=p6(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function g6(e){let t=G.useId(),[n]=y.useState(H0()),r=n?"react-aria":`react-aria${md.prefix}`;return e||`${r}-${t}`}G.useId;function y6(){return!1}function v6(){return!0}function x6(e){return()=>{}}function H0(){return typeof G.useSyncExternalStore=="function"?G.useSyncExternalStore(x6,y6,v6):y.useContext(d6)}function Vk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{};function gd(e){const t=y.useRef(null);return On(()=>{t.current=e},[e]),y.useCallback((...n)=>{const r=t.current;return r(...n)},[])}function QY(e){let[t,n]=y.useState(e),r=y.useRef(null),s=gd(()=>{let o=r.current.next();if(o.done){r.current=null;return}t===o.value?s():n(o.value)});On(()=>{r.current&&s()});let i=gd(o=>{r.current=o(t),s()});return[t,i]}let ww=new Map;function w6(e,t){if(e===t)return e;let n=ww.get(e);if(n)return n(t),t;let r=ww.get(t);return r?(r(e),e):t}function _6(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function Jr(...e){let t={...e[0]};for(let n=1;n=65&&s.charCodeAt(2)<=90?t[s]=_6(i,o):(s==="className"||s==="UNSAFE_className")&&typeof i=="string"&&typeof o=="string"?t[s]=b6(i,o):s==="id"&&i&&o?t.id=w6(i,o):t[s]=o!==void 0?o:i}}return t}function _w(e){if(S6())e.focus({preventScroll:!0});else{let t=E6(e);e.focus(),C6(t)}}let Lc=null;function S6(){if(Lc==null){Lc=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return Lc=!0,!0}})}catch{}}return Lc}function E6(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function k6(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function T6(){return k6(/^Mac/i)}function P6(){return j6(/Android/i)}let Zi=new Map,ly=new Set;function Sw(){if(typeof window>"u")return;let e=n=>{let r=Zi.get(n.target);r||(r=new Set,Zi.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=Zi.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Zi.delete(n.target)),Zi.size===0)){for(let s of ly)s();ly.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Sw():document.addEventListener("DOMContentLoaded",Sw));function R6(e){requestAnimationFrame(()=>{Zi.size===0?e():ly.add(e)})}function XY(){let e=y.useRef(new Map),t=y.useCallback((s,i,o,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(o),o(...c)}:o;e.current.set(o,{type:i,eventTarget:s,fn:l,options:a}),s.addEventListener(i,o,a)},[]),n=y.useCallback((s,i,o,a)=>{var l;let c=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;s.removeEventListener(i,c,a),e.current.delete(o)},[]),r=y.useCallback(()=>{e.current.forEach((s,i)=>{n(s.eventTarget,s.type,i,s.options)})},[n]);return y.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function La(e){const t=y.useRef();return y.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function N6(){return typeof window.ResizeObserver<"u"}function JY(e){const{ref:t,onResize:n}=e;y.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(N6()){const s=new window.ResizeObserver(i=>{i.length&&n()});return s.observe(r),()=>{r&&s.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function ZY(e){for(Ew(e)&&(e=e.parentElement);e&&!Ew(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Ew(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}let lr=typeof document<"u"&&window.visualViewport;function O6(){let e=H0(),[t,n]=y.useState(()=>e?{width:0,height:0}:Cw());return y.useEffect(()=>{let r=()=>{n(s=>{let i=Cw();return i.width===s.width&&i.height===s.height?s:i})};return lr?lr.addEventListener("resize",r):window.addEventListener("resize",r),()=>{lr?lr.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Cw(){return{width:(lr==null?void 0:lr.width)||window.innerWidth,height:(lr==null?void 0:lr.height)||window.innerHeight}}function A6(e){return e.mozInputSource===0&&e.isTrusted?!0:P6()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}const Eh=G.createContext(null);function Ju(){return y.useContext(Eh)}function Dn(){const{lines:e,localeCode:t}=zi();return{trans:y.useCallback(r=>$6({...r,lines:e,localeCode:t}),[e,t])}}const $6=Xu(e=>{let{lines:t,message:n,values:r,localeCode:s}=e;return n==null?"":(n=(t==null?void 0:t[n])||(t==null?void 0:t[n.toLowerCase()])||n,r&&(n=Ck(s,e),Object.entries(r).forEach(([i,o])=>{n=n.replace(`:${i}`,`${o}`)})),n)},{equals:Ri,callTimeout:0});function I6({onDismiss:e}){const{trans:t}=Dn(),n=()=>{e&&e()};return u.jsx("button",{className:"sr-only","aria-label":t(le("Dismiss")),tabIndex:-1,onClick:n})}function Da(e){const{type:t="modal",dialogProps:n,...r}=y.useContext(Eh),{children:s,className:i,size:o="md",background:a,radius:l="rounded",maxWidth:c="max-w-dialog",...f}=e;let d=null;(t==="popover"||t==="tray")&&(d=u.jsx(I6,{onDismiss:r.close}));const h=o==="fullscreenTakeover"||t==="tray",p=V("mx-auto pointer-events-auto outline-none flex flex-col overflow-hidden",a||"bg",t!=="tray"&&L6(o),t==="tray"&&"rounded-t border-b-bg",o!=="fullscreenTakeover"&&"shadow-2xl border max-h-dialog",!h&&`${l} ${c}`,i);return u.jsxs("div",{...Jr({role:"dialog",tabIndex:-1},n,f),style:{...e.style,"--be-dialog-padding":"24px"},"aria-modal":!0,className:p,children:[y.Children.toArray(s).map(g=>y.isValidElement(g)?y.cloneElement(g,{size:g.props.size??o}):g),d]})}function L6(e){switch(e){case"2xs":return"w-256";case"xs":return"w-320";case"sm":return"w-384";case"md":return"w-440";case"lg":return"w-620";case"xl":return"w-780";case"2xl":return"w-850";case"fullscreen":return"w-1280";case"fullscreenTakeover":return"w-full h-full";default:return e}}const Yn=y.forwardRef(({children:e,size:t="md",iconSize:n=t&&t.length<=3?t:"md",variant:r="text",radius:s="rounded-button",className:i,padding:o,equalWidth:a=!0,badge:l,...c},f)=>{const d=V(N0(t,{padding:o,equalWidth:a,variant:r}),i,l&&"relative");return u.jsxs(yh,{...c,ref:f,radius:s,variant:r,className:d,children:[y.cloneElement(e,{size:n}),l]})}),Bk=oe(u.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined");function Ma(e){const{children:t,className:n,color:r,onDismiss:s,leftAdornment:i,rightAdornment:o,hideDismissButton:a=!1,size:l,showDivider:c,justify:f="justify-between",titleFontWeight:d="font-semibold",titleTextSize:h=l==="xs"?"text-xs":"text-sm",closeButtonSize:p=l==="xs"?"xs":"sm",actions:g}=e,{labelId:b,isDismissable:w,close:v}=y.useContext(Eh);return u.jsxs("div",{className:V(n,"flex flex-shrink-0 items-center gap-10",d,c&&"border-b",D6(e),r||"text-main",f),children:[i,u.jsx("h3",{id:b,className:V(h,"mr-auto leading-5 opacity-90"),children:t}),o,g,w&&!a&&u.jsx(Yn,{"aria-label":"Dismiss",onClick:()=>{s?s():v()},size:p,className:V("-mr-8 text-muted",o&&"sr-only"),children:u.jsx(Bk,{})})]})}function D6({size:e,padding:t}){if(t)return t;switch(e){case"2xs":case"xs":return"px-14 py-4";case"sm":return"px-18 py-4";default:return"px-24 py-6"}}const Fa=y.forwardRef((e,t)=>{const{children:n,className:r,padding:s,size:i,...o}=e;return u.jsx("div",{...o,ref:t,className:V(r,M6(e),"overflow-y-auto overflow-x-hidden overscroll-contain text-sm flex-auto"),children:n})});function M6({size:e,padding:t}){if(t)return t;switch(e){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}const F6=G.createContext(null);F6.displayName="PressResponderContext";let Zu=null,U6=new Set,jw=!1,Oi=!1,uy=!1;function q0(e,t){for(let n of U6)n(e,t)}function z6(e){return!(e.metaKey||!T6()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function kw(e){Oi=!0,z6(e)&&(Zu="keyboard",q0("keyboard",e))}function Gi(e){Zu="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Oi=!0,q0("pointer",e))}function V6(e){A6(e)&&(Oi=!0,Zu="virtual")}function B6(e){e.target===window||e.target===document||(!Oi&&!uy&&(Zu="virtual",q0("virtual",e)),Oi=!1,uy=!1)}function H6(){Oi=!1,uy=!0}function Tw(){if(typeof window>"u"||jw)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Oi=!0,e.apply(this,arguments)},document.addEventListener("keydown",kw,!0),document.addEventListener("keyup",kw,!0),document.addEventListener("click",V6,!0),window.addEventListener("focus",B6,!0),window.addEventListener("blur",H6,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Gi,!0),document.addEventListener("pointermove",Gi,!0),document.addEventListener("pointerup",Gi,!0)):(document.addEventListener("mousedown",Gi,!0),document.addEventListener("mousemove",Gi,!0),document.addEventListener("mouseup",Gi,!0)),jw=!0}typeof document<"u"&&(document.readyState!=="loading"?Tw():document.addEventListener("DOMContentLoaded",Tw));function q6(){return Zu}function eQ(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:s}=e,i=y.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=gd(l=>{n&&Dc(l,t)&&(s&&s(l),i.current.isPointerDown=!0)}),a=gd(l=>{n&&n(l)});y.useEffect(()=>{let l=i.current;if(!r)if(typeof PointerEvent<"u"){let c=f=>{l.isPointerDown&&Dc(f,t)&&a(f),l.isPointerDown=!1};return document.addEventListener("pointerdown",o,!0),document.addEventListener("pointerup",c,!0),()=>{document.removeEventListener("pointerdown",o,!0),document.removeEventListener("pointerup",c,!0)}}else{let c=d=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&Dc(d,t)&&a(d),l.isPointerDown=!1},f=d=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&Dc(d,t)&&a(d),l.isPointerDown=!1};return document.addEventListener("mousedown",o,!0),document.addEventListener("mouseup",c,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",f,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("mouseup",c,!0),document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",f,!0)}}},[t,r,o,a])}function Dc(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function W6(e){if(q6()==="virtual"){let t=document.activeElement;R6(()=>{document.activeElement===t&&document.contains(e)&&_w(e)})}else _w(e)}function K6(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:i,visibility:o}=s(e);r=i!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function G6(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Hk(e,t){return e.nodeName!=="#comment"&&K6(e)&&G6(e,t)&&(!e.parentElement||Hk(e.parentElement,e))}const cy=G.createContext(null);let Ae=null;function Ch(e){let{children:t,contain:n,restoreFocus:r,autoFocus:s}=e,i=y.useRef(),o=y.useRef(),a=y.useRef([]),{parentNode:l}=y.useContext(cy)||{},c=y.useMemo(()=>new dy({scopeRef:a}),[a]);On(()=>{let h=l||Ye.root;if(Ye.getTreeNode(h.scopeRef)&&Ae&&!yd(Ae,h.scopeRef)){let p=Ye.getTreeNode(Ae);p&&(h=p)}h.addChild(c),Ye.addNode(c)},[c,l]),On(()=>{let h=Ye.getTreeNode(a);h.contain=n},[n]),On(()=>{let h=i.current.nextSibling,p=[];for(;h&&h!==o.current;)p.push(h),h=h.nextSibling;a.current=p},[t]),e8(a,r,n),J6(a,n),n8(a,r,n),Z6(a,s),y.useEffect(()=>{if(a){let h=document.activeElement,p=null;if(Nt(h,a.current)){for(let g of Ye.traverse())Nt(h,g.scopeRef.current)&&(p=g);p===Ye.getTreeNode(a)&&(Ae=p.scopeRef)}return()=>{let g=Ye.getTreeNode(a).parent.scopeRef;(a===Ae||yd(a,Ae))&&(!g||Ye.getTreeNode(g))&&(Ae=g),Ye.removeTreeNode(a)}}},[a]);let f=y.useMemo(()=>Y6(a),[]),d=y.useMemo(()=>({focusManager:f,parentNode:c}),[c,f]);return G.createElement(cy.Provider,{value:d},G.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,G.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function qk(){var e;return(e=y.useContext(cy))===null||e===void 0?void 0:e.focusManager}function Y6(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:s,wrap:i,accept:o}=t,a=r||document.activeElement,l=n[0].previousElementSibling,c=Pn(li(n),{tabbable:s,accept:o},n);c.currentNode=Nt(a,n)?a:l;let f=c.nextNode();return!f&&i&&(c.currentNode=l,f=c.nextNode()),f&&qt(f,!0),f},focusPrevious(t={}){let n=e.current,{from:r,tabbable:s,wrap:i,accept:o}=t,a=r||document.activeElement,l=n[n.length-1].nextElementSibling,c=Pn(li(n),{tabbable:s,accept:o},n);c.currentNode=Nt(a,n)?a:l;let f=c.previousNode();return!f&&i&&(c.currentNode=l,f=c.previousNode()),f&&qt(f,!0),f},focusFirst(t={}){let n=e.current,{tabbable:r,accept:s}=t,i=Pn(li(n),{tabbable:r,accept:s},n);i.currentNode=n[0].previousElementSibling;let o=i.nextNode();return o&&qt(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:s}=t,i=Pn(li(n),{tabbable:r,accept:s},n);i.currentNode=n[n.length-1].nextElementSibling;let o=i.previousNode();return o&&qt(o,!0),o}}}const W0=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Q6=W0.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";W0.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const X6=W0.join(':not([hidden]):not([tabindex="-1"]),');function li(e){return e[0].parentElement}function vl(e){let t=Ye.getTreeNode(Ae);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function J6(e,t){let n=y.useRef(),r=y.useRef(null);On(()=>{let s=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=null);return}let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!vl(e))return;let c=document.activeElement,f=e.current;if(!Nt(c,f))return;let d=Pn(li(f),{tabbable:!0},f);d.currentNode=c;let h=l.shiftKey?d.previousNode():d.nextNode();h||(d.currentNode=l.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,h=l.shiftKey?d.previousNode():d.nextNode()),l.preventDefault(),h&&qt(h,!0)},o=l=>{(!Ae||yd(Ae,e))&&Nt(l.target,e.current)?(Ae=e,n.current=l.target):vl(e)&&!fy(l.target,e)?n.current?n.current.focus():Ae&&vd(Ae.current):vl(e)&&(n.current=l.target)},a=l=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{vl(e)&&!fy(document.activeElement,e)&&(Ae=e,document.body.contains(l.target)?(n.current=l.target,n.current.focus()):Ae&&vd(Ae.current))})};return document.addEventListener("keydown",i,!1),document.addEventListener("focusin",o,!1),s.forEach(l=>l.addEventListener("focusin",o,!1)),s.forEach(l=>l.addEventListener("focusout",a,!1)),()=>{document.removeEventListener("keydown",i,!1),document.removeEventListener("focusin",o,!1),s.forEach(l=>l.removeEventListener("focusin",o,!1)),s.forEach(l=>l.removeEventListener("focusout",a,!1))}},[e,t]),On(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Wk(e){return fy(e)}function Nt(e,t){return t.some(n=>n.contains(e))}function fy(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ye.traverse(Ye.getTreeNode(t)))if(Nt(e,n.current))return!0;return!1}function yd(e,t){var n;let r=(n=Ye.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function qt(e,t=!1){if(e!=null&&!t)try{W6(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function vd(e,t=!0){let n=e[0].previousElementSibling,r=Pn(li(e),{tabbable:t},e);r.currentNode=n;let s=r.nextNode();t&&!s&&(r=Pn(li(e),{tabbable:!1},e),r.currentNode=n,s=r.nextNode()),qt(s)}function Z6(e,t){const n=G.useRef(t);y.useEffect(()=>{n.current&&(Ae=e,Nt(document.activeElement,Ae.current)||vd(e.current)),n.current=!1},[e])}function e8(e,t,n){On(()=>{if(t||n)return;let r=e.current,s=i=>{let o=i.target;Nt(o,e.current)?Ae=e:Wk(o)||(Ae=null)};return document.addEventListener("focusin",s,!1),r.forEach(i=>i.addEventListener("focusin",s,!1)),()=>{document.removeEventListener("focusin",s,!1),r.forEach(i=>i.removeEventListener("focusin",s,!1))}},[e,t,n])}function t8(e){let t=Ye.getTreeNode(Ae);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function n8(e,t,n){const r=y.useRef(typeof document<"u"?document.activeElement:null);On(()=>{let s=e.current;if(!t||n)return;let i=()=>{(!Ae||yd(Ae,e))&&Nt(document.activeElement,e.current)&&(Ae=e)};return document.addEventListener("focusin",i,!1),s.forEach(o=>o.addEventListener("focusin",i,!1)),()=>{document.removeEventListener("focusin",i,!1),s.forEach(o=>o.removeEventListener("focusin",i,!1))}},[e,n]),On(()=>{if(!t)return;let s=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!vl(e))return;let o=document.activeElement;if(!Nt(o,e.current))return;let a=Ye.getTreeNode(e).nodeToRestore,l=Pn(document.body,{tabbable:!0});l.currentNode=o;let c=i.shiftKey?l.previousNode():l.nextNode();if((!document.body.contains(a)||a===document.body)&&(a=null,Ye.getTreeNode(e).nodeToRestore=null),(!c||!Nt(c,e.current))&&a){l.currentNode=a;do c=i.shiftKey?l.previousNode():l.nextNode();while(Nt(c,e.current));i.preventDefault(),i.stopPropagation(),c?qt(c,!0):Wk(a)?qt(a,!0):o.blur()}};return n||document.addEventListener("keydown",s,!0),()=>{n||document.removeEventListener("keydown",s,!0)}},[e,t,n]),On(()=>{if(t)return Ye.getTreeNode(e).nodeToRestore=r.current,()=>{let s=Ye.getTreeNode(e).nodeToRestore;if(t&&s&&(Nt(document.activeElement,e.current)||document.activeElement===document.body&&t8(e))){let i=Ye.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let o=i.getTreeNode(e);for(;o;){if(o.nodeToRestore&&document.body.contains(o.nodeToRestore)){qt(o.nodeToRestore);return}o=o.parent}for(o=i.getTreeNode(e);o;){if(o.scopeRef&&Ye.getTreeNode(o.scopeRef)){vd(o.scopeRef.current,!0);return}o=o.parent}}})}}},[e,t])}function Pn(e,t,n){let r=t!=null&&t.tabbable?X6:Q6,s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var o;return!(t==null||(o=t.from)===null||o===void 0)&&o.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Hk(i)&&(!n||Nt(i,n))&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(s.currentNode=t.from),s}function tQ(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return;let{from:s,tabbable:i=t.tabbable,wrap:o=t.wrap,accept:a=t.accept}=n,l=s||document.activeElement,c=Pn(r,{tabbable:i,accept:a});r.contains(l)&&(c.currentNode=l);let f=c.nextNode();return!f&&o&&(c.currentNode=r,f=c.nextNode()),f&&qt(f,!0),f},focusPrevious(n=t){let r=e.current;if(!r)return;let{from:s,tabbable:i=t.tabbable,wrap:o=t.wrap,accept:a=t.accept}=n,l=s||document.activeElement,c=Pn(r,{tabbable:i,accept:a});if(r.contains(l))c.currentNode=l;else{let d=om(c);return d&&qt(d,!0),d}let f=c.previousNode();return!f&&o&&(c.currentNode=r,f=om(c)),f&&qt(f,!0),f},focusFirst(n=t){let r=e.current;if(!r)return;let{tabbable:s=t.tabbable,accept:i=t.accept}=n,a=Pn(r,{tabbable:s,accept:i}).nextNode();return a&&qt(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return;let{tabbable:s=t.tabbable,accept:i=t.accept}=n,o=Pn(r,{tabbable:s,accept:i}),a=om(o);return a&&qt(a,!0),a}}}function om(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class K0{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let s=this.fastMap.get(n??null),i=new dy({scopeRef:t});s.addChild(i),i.parent=s,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t),r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef.current&&Nt(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let s=n.children;r.removeChild(n),s.size>0&&s.forEach(i=>r.addChild(i)),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){let t=new K0;for(let n of this.traverse())t.addTreeNode(n.scopeRef,n.parent.scopeRef,n.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new dy({scopeRef:null}),this.fastMap.set(null,this.root)}}class dy{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ye=new K0;const r8=oe(u.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})),s8=oe(u.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"WarningOutlined"),Kk={initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{type:"tween",duration:.125}},Fs=Math.min,nn=Math.max,xd=Math.round,Mc=Math.floor,Us=e=>({x:e,y:e}),i8={left:"right",right:"left",bottom:"top",top:"bottom"},o8={start:"end",end:"start"};function hy(e,t,n){return nn(e,Fs(t,n))}function Ua(e,t){return typeof e=="function"?e(t):e}function zs(e){return e.split("-")[0]}function za(e){return e.split("-")[1]}function Gk(e){return e==="x"?"y":"x"}function G0(e){return e==="y"?"height":"width"}function ec(e){return["top","bottom"].includes(zs(e))?"y":"x"}function Y0(e){return Gk(ec(e))}function a8(e,t,n){n===void 0&&(n=!1);const r=za(e),s=Y0(e),i=G0(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=bd(o)),[o,bd(o)]}function l8(e){const t=bd(e);return[py(e),t,py(t)]}function py(e){return e.replace(/start|end/g,t=>o8[t])}function u8(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function c8(e,t,n,r){const s=za(e);let i=u8(zs(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(py)))),i}function bd(e){return e.replace(/left|right|bottom|top/g,t=>i8[t])}function f8(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yk(e){return typeof e!="number"?f8(e):{top:e,right:e,bottom:e,left:e}}function wd(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Pw(e,t,n){let{reference:r,floating:s}=e;const i=ec(t),o=Y0(t),a=G0(o),l=zs(t),c=i==="y",f=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:f,y:r.y-s.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-s.width,y:d};break;default:p={x:r.x,y:r.y}}switch(za(t)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const d8=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:d}=Pw(c,r,l),h=r,p={},g=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:f=0}=Ua(e,t)||{};if(c==null)return{};const d=Yk(f),h={x:n,y:r},p=Y0(s),g=G0(p),b=await o.getDimensions(c),w=p==="y",v=w?"top":"left",m=w?"bottom":"right",x=w?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[p]-h[p]-i.floating[g],S=h[p]-i.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let k=j?j[x]:0;(!k||!await(o.isElement==null?void 0:o.isElement(j)))&&(k=a.floating[x]||i.floating[g]);const N=_/2-S/2,D=k/2-b[g]/2-1,F=Fs(d[v],D),B=Fs(d[m],D),T=F,E=k-b[g]-B,C=k/2-b[g]/2+N,A=hy(T,C,E),$=!l.arrow&&za(s)!=null&&C!=A&&i.reference[g]/2-(CT<=0)){var D,F;const T=(((D=i.flip)==null?void 0:D.index)||0)+1,E=S[T];if(E)return{data:{index:T,overflows:N},reset:{placement:E}};let C=(F=N.filter(A=>A.overflows[0]<=0).sort((A,$)=>A.overflows[1]-$.overflows[1])[0])==null?void 0:F.placement;if(!C)switch(p){case"bestFit":{var B;const A=(B=N.map($=>[$.placement,$.overflows.filter(L=>L>0).reduce((L,I)=>L+I,0)]).sort(($,L)=>$[1]-L[1])[0])==null?void 0:B[0];A&&(C=A);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};async function p8(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=zs(n),a=za(n),l=ec(n)==="y",c=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,d=Ua(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*f,y:h*c}:{x:h*c,y:p*f}}const m8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,s=await p8(t,e);return{x:n+s.x,y:r+s.y,data:s}}}},g8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:v,y:m}=w;return{x:v,y:m}}},...l}=Ua(e,t),c={x:n,y:r},f=await Q0(t,l),d=ec(zs(s)),h=Gk(d);let p=c[h],g=c[d];if(i){const w=h==="y"?"top":"left",v=h==="y"?"bottom":"right",m=p+f[w],x=p-f[v];p=hy(m,p,x)}if(o){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",m=g+f[w],x=g-f[v];g=hy(m,g,x)}const b=a.fn({...t,[h]:p,[d]:g});return{...b,data:{x:b.x-n,y:b.y-r}}}}},y8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:i}=t,{apply:o=()=>{},...a}=Ua(e,t),l=await Q0(t,a),c=zs(n),f=za(n),d=ec(n)==="y",{width:h,height:p}=r.floating;let g,b;c==="top"||c==="bottom"?(g=c,b=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=c,g=f==="end"?"top":"bottom");const w=p-l[g],v=h-l[b],m=!t.middlewareData.shift;let x=w,_=v;if(d){const j=h-l.left-l.right;_=f||m?Fs(v,j):j}else{const j=p-l.top-l.bottom;x=f||m?Fs(w,j):j}if(m&&!f){const j=nn(l.left,0),k=nn(l.right,0),N=nn(l.top,0),D=nn(l.bottom,0);d?_=h-2*(j!==0||k!==0?j+k:nn(l.left,l.right)):x=p-2*(N!==0||D!==0?N+D:nn(l.top,l.bottom))}await o({...t,availableWidth:_,availableHeight:x});const S=await s.getDimensions(i.floating);return h!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function Vs(e){return Qk(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(Qk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qk(e){return e instanceof Node||e instanceof un(e).Node}function Kr(e){return e instanceof Element||e instanceof un(e).Element}function yr(e){return e instanceof HTMLElement||e instanceof un(e).HTMLElement}function Nw(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}function tc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ln(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function v8(e){return["table","td","th"].includes(Vs(e))}function X0(e){const t=J0(),n=Ln(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function x8(e){let t=pa(e);for(;yr(t)&&!jh(t);){if(X0(t))return t;t=pa(t)}return null}function J0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jh(e){return["html","body","#document"].includes(Vs(e))}function Ln(e){return un(e).getComputedStyle(e)}function kh(e){return Kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function pa(e){if(Vs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nw(e)&&e.host||Zr(e);return Nw(t)?t.host:t}function Xk(e){const t=pa(e);return jh(t)?e.ownerDocument?e.ownerDocument.body:e.body:yr(t)&&tc(t)?t:Xk(t)}function hu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Xk(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=un(s);return i?t.concat(o,o.visualViewport||[],tc(s)?s:[],o.frameElement&&n?hu(o.frameElement):[]):t.concat(s,hu(s,[],n))}function Jk(e){const t=Ln(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=yr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=xd(n)!==i||xd(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Z0(e){return Kr(e)?e:e.contextElement}function jo(e){const t=Z0(e);if(!yr(t))return Us(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=Jk(t);let o=(i?xd(n.width):n.width)/r,a=(i?xd(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const b8=Us(0);function Zk(e){const t=un(e);return!J0()||!t.visualViewport?b8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==un(e)?!1:t}function Ai(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Z0(e);let o=Us(1);t&&(r?Kr(r)&&(o=jo(r)):o=jo(e));const a=w8(i,n,r)?Zk(i):Us(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,d=s.height/o.y;if(i){const h=un(i),p=r&&Kr(r)?un(r):r;let g=h.frameElement;for(;g&&r&&p!==h;){const b=jo(g),w=g.getBoundingClientRect(),v=Ln(g),m=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,x=w.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,f*=b.x,d*=b.y,l+=m,c+=x,g=un(g).frameElement}}return wd({width:f,height:d,x:l,y:c})}function _8(e){let{rect:t,offsetParent:n,strategy:r}=e;const s=yr(n),i=Zr(n);if(n===i)return t;let o={scrollLeft:0,scrollTop:0},a=Us(1);const l=Us(0);if((s||!s&&r!=="fixed")&&((Vs(n)!=="body"||tc(i))&&(o=kh(n)),yr(n))){const c=Ai(n);a=jo(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-o.scrollLeft*a.x+l.x,y:t.y*a.y-o.scrollTop*a.y+l.y}}function S8(e){return Array.from(e.getClientRects())}function e4(e){return Ai(Zr(e)).left+kh(e).scrollLeft}function E8(e){const t=Zr(e),n=kh(e),r=e.ownerDocument.body,s=nn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+e4(e);const a=-n.scrollTop;return Ln(r).direction==="rtl"&&(o+=nn(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function C8(e,t){const n=un(e),r=Zr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=J0();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function j8(e,t){const n=Ai(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=yr(e)?jo(e):Us(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Ow(e,t,n){let r;if(t==="viewport")r=C8(e,n);else if(t==="document")r=E8(Zr(e));else if(Kr(t))r=j8(t,n);else{const s=Zk(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return wd(r)}function t4(e,t){const n=pa(e);return n===t||!Kr(n)||jh(n)?!1:Ln(n).position==="fixed"||t4(n,t)}function k8(e,t){const n=t.get(e);if(n)return n;let r=hu(e,[],!1).filter(a=>Kr(a)&&Vs(a)!=="body"),s=null;const i=Ln(e).position==="fixed";let o=i?pa(e):e;for(;Kr(o)&&!jh(o);){const a=Ln(o),l=X0(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||tc(o)&&!l&&t4(e,o))?r=r.filter(f=>f!==o):s=a,o=pa(o)}return t.set(e,r),r}function T8(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?k8(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,f)=>{const d=Ow(t,f,s);return c.top=nn(d.top,c.top),c.right=Fs(d.right,c.right),c.bottom=Fs(d.bottom,c.bottom),c.left=nn(d.left,c.left),c},Ow(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function P8(e){return Jk(e)}function R8(e,t,n){const r=yr(t),s=Zr(t),i=n==="fixed",o=Ai(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Us(0);if(r||!r&&!i)if((Vs(t)!=="body"||tc(s))&&(a=kh(t)),r){const c=Ai(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else s&&(l.x=e4(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Aw(e,t){return!yr(e)||Ln(e).position==="fixed"?null:t?t(e):e.offsetParent}function n4(e,t){const n=un(e);if(!yr(e))return n;let r=Aw(e,t);for(;r&&v8(r)&&Ln(r).position==="static";)r=Aw(r,t);return r&&(Vs(r)==="html"||Vs(r)==="body"&&Ln(r).position==="static"&&!X0(r))?n:r||x8(e)||n}const N8=async function(e){let{reference:t,floating:n,strategy:r}=e;const s=this.getOffsetParent||n4,i=this.getDimensions;return{reference:R8(t,await s(n),r),floating:{x:0,y:0,...await i(n)}}};function O8(e){return Ln(e).direction==="rtl"}const A8={convertOffsetParentRelativeRectToViewportRelativeRect:_8,getDocumentElement:Zr,getClippingRect:T8,getOffsetParent:n4,getElementRects:N8,getClientRects:S8,getDimensions:P8,getScale:jo,isElement:Kr,isRTL:O8};function $8(e,t){let n=null,r;const s=Zr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=Mc(f),g=Mc(s.clientWidth-(c+d)),b=Mc(s.clientHeight-(f+h)),w=Mc(c),m={rootMargin:-p+"px "+-g+"px "+-b+"px "+-w+"px",threshold:nn(0,Fs(1,l))||1};let x=!0;function _(S){const j=S[0].intersectionRatio;if(j!==l){if(!x)return o();j?o(!1,j):r=setTimeout(()=>{o(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,m)}n.observe(e)}return o(!0),i}function I8(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Z0(e),f=s||i?[...c?hu(c):[],...hu(t)]:[];f.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?$8(c,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(v=>{let[m]=v;m&&m.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g,b=l?Ai(e):null;l&&w();function w(){const v=Ai(e);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&n(),b=v,g=requestAnimationFrame(w)}return n(),()=>{f.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const L8=(e,t,n)=>{const r=new Map,s={platform:A8,...n},i={...s.platform,_c:r};return d8(e,t,{...s,platform:i})},D8=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Rw({element:r.current,padding:s}).fn(n):{}:r?Rw({element:r,padding:s}).fn(n):{}}}};var xf=typeof document<"u"?y.useLayoutEffect:y.useEffect;function _d(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!_d(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!_d(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function r4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $w(e,t){const n=r4(e);return Math.round(t*n)/n}function Iw(e){const t=y.useRef(e);return xf(()=>{t.current=e}),t}function M8(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[f,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);_d(h,r)||p(r);const[g,b]=y.useState(null),[w,v]=y.useState(null),m=y.useCallback($=>{$!=j.current&&(j.current=$,b($))},[b]),x=y.useCallback($=>{$!==k.current&&(k.current=$,v($))},[v]),_=i||g,S=o||w,j=y.useRef(null),k=y.useRef(null),N=y.useRef(f),D=Iw(l),F=Iw(s),B=y.useCallback(()=>{if(!j.current||!k.current)return;const $={placement:t,strategy:n,middleware:h};F.current&&($.platform=F.current),L8(j.current,k.current,$).then(L=>{const I={...L,isPositioned:!0};T.current&&!_d(N.current,I)&&(N.current=I,Pa.flushSync(()=>{d(I)}))})},[h,t,n,F]);xf(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d($=>({...$,isPositioned:!1})))},[c]);const T=y.useRef(!1);xf(()=>(T.current=!0,()=>{T.current=!1}),[]),xf(()=>{if(_&&(j.current=_),S&&(k.current=S),_&&S){if(D.current)return D.current(_,S,B);B()}},[_,S,B,D]);const E=y.useMemo(()=>({reference:j,floating:k,setReference:m,setFloating:x}),[m,x]),C=y.useMemo(()=>({reference:_,floating:S}),[_,S]),A=y.useMemo(()=>{const $={position:n,left:0,top:0};if(!C.floating)return $;const L=$w(C.floating,f.x),I=$w(C.floating,f.y);return a?{...$,transform:"translate("+L+"px, "+I+"px)",...r4(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:I}},[n,a,C.floating,f.x,f.y]);return y.useMemo(()=>({...f,update:B,refs:E,elements:C,floatingStyles:A}),[f,B,E,C,A])}function F8(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function e1({floatingWidth:e,ref:t,disablePositioning:n=!1,placement:r="bottom",offset:s=2,showArrow:i=!1,maxHeight:o,shiftCrossAxis:a=!0,fallbackPlacements:l}){const c=y.useRef(null),f={placement:r,strategy:"fixed"};n||(f.whileElementsMounted=I8,f.middleware=[m8(s),g8({padding:16,crossAxis:a,mainAxis:!0}),h8({padding:16,fallbackPlacements:l}),y8({apply({rects:v,availableHeight:m,availableWidth:x,elements:_}){e==="matchTrigger"&&o!=null?Object.assign(_.floating.style,{width:`${v.reference.width}px`,maxWidth:`${x}`,maxHeight:`${Math.min(m,o)}px`}):o!=null&&Object.assign(_.floating.style,{maxHeight:`${Math.min(m,o)}px`})},padding:16})],i&&f.middleware.push(D8({element:c})));const d=M8(f),h=y.useMemo(()=>F8([t,d.refs.setReference]),[d.refs.setReference,t]),{x:p,y:g}=d.middlewareData.arrow||{},b={top:"bottom",right:"left",bottom:"top",left:"right"}[d.placement.split("-")[0]],w={left:p,top:g,right:"",bottom:"",[b]:"-4px"};return{...d,reference:h,arrowRef:c,arrowStyle:w}}let Bs=typeof document<"u"?document.getElementById("root")??document.body:void 0,$s=typeof document<"u"?document.documentElement:void 0;const Lw=500,cr={};let ul=!1,Cr=null,Zs=null;const Dw=e=>{var t;for(const n in cr)n!==e&&((t=cr[n])==null||t.call(cr,!0),delete cr[n])},U8=y.forwardRef(({children:e,label:t,placement:n="top",offset:r=10,variant:s="neutral",delay:i=1500,isDisabled:o,usePortal:a=!0,...l},c)=>{const{x:f,y:d,reference:h,strategy:p,arrowRef:g,arrowStyle:b,refs:w}=e1({placement:n,offset:r,ref:c,showArrow:!0}),[v,m]=y.useState(!1),x=y.useId(),_=y.useRef(),S=()=>{clearTimeout(_.current),_.current=void 0,Dw(x),cr[x]=j,ul=!0,m(!0),Cr&&(clearTimeout(Cr),Cr=null),Zs&&(clearTimeout(Zs),Zs=null)},j=y.useCallback(F=>{F?(clearTimeout(_.current),_.current=void 0,m(!1)):_.current||(_.current=setTimeout(()=>{_.current=void 0,m(!1)},Lw)),Cr&&(clearTimeout(Cr),Cr=null),ul&&(Zs&&clearTimeout(Zs),Zs=setTimeout(()=>{delete cr[x],Zs=null,ul=!1},Lw))},[x]),k=()=>{Dw(x),cr[x]=j,!v&&!Cr&&!ul?Cr=setTimeout(()=>{Cr=null,ul=!0,S()},i):v||S()},N=F=>{!F&&i>0&&!_.current?k():S()};y.useEffect(()=>()=>{clearTimeout(_.current),cr[x]&&delete cr[x]},[x]),y.useEffect(()=>{const F=B=>{B.key==="Escape"&&j(!0)};if(v)return document.addEventListener("keydown",F,!0),()=>{document.removeEventListener("keydown",F,!0)}},[v,j]);const D=u.jsx(Aa,{children:v&&u.jsxs(Qr.div,{...Kk,ref:w.setFloating,id:x,role:"tooltip",onPointerEnter:()=>{N(!0)},onPointerLeave:()=>{j()},className:V("z-tooltip my-4 max-w-240 break-words rounded px-8 py-4 text-xs text-white shadow",s==="positive"&&"bg-positive",s==="danger"&&"bg-danger",s==="neutral"&&"bg-toast"),style:{position:p,top:d??"",left:f??""},children:[u.jsx("div",{ref:g,className:"absolute h-8 w-8 rotate-45 bg-inherit",style:b}),t]})});return u.jsxs(y.Fragment,{children:[y.cloneElement(e,Jr({"aria-describedby":v?x:void 0,ref:h,onPointerEnter:F=>{F.pointerType==="mouse"&&N()},onFocus:F=>{F.target.matches(":focus-visible")&&N(!0)},onPointerLeave:F=>{F.pointerType==="mouse"&&j()},onPointerDown:()=>{j(!0)},onBlur:()=>{j()},"aria-label":typeof t=="string"?t:t.props.message},l)),a?Bs&&Pa.createPortal(D,Bs):D]})});function s4(e){const{onRemove:t,disabled:n,invalid:r,errorMessage:s,children:i,className:o,selectable:a=!1,radius:l="rounded-full",elementType:c="div",to:f,onClick:d}=e,h=y.useRef(null),p=y.useRef(null),g=qk(),b=_=>{switch(_.key){case"ArrowRight":case"ArrowDown":g==null||g.focusNext({tabbable:!0});break;case"ArrowLeft":case"ArrowUp":g==null||g.focusPrevious({tabbable:!0});break;case"Backspace":case"Delete":h.current===document.activeElement&&(t==null||t());break}},w=_=>{_.stopPropagation(),d?d(_):h.current.focus()},v=z8(e);let m=r||s!=null?u.jsx(s8,{className:"text-danger",size:"sm"}):e.adornment&&y.cloneElement(e.adornment,{size:v.adornment.size,circle:!0,className:V(e.adornment.props,v.adornment.margin)});s&&m&&(m=u.jsx(U8,{label:s,variant:"danger",children:m}));const x=c;return u.jsxs(x,{tabIndex:a?0:void 0,ref:h,to:f,onKeyDown:a?b:void 0,onClick:a?w:void 0,className:V("relative flex flex-shrink-0 items-center justify-center gap-10 overflow-hidden whitespace-nowrap outline-none","min-w-0 max-w-full after:pointer-events-none after:absolute after:inset-0",d&&"cursor-pointer",l,V8(e),v.chip,!n&&a&&"hover:after:bg-black/5 focus:after:bg-black/10",o),children:[m,u.jsx("div",{className:"flex-auto overflow-hidden overflow-ellipsis",children:i}),t&&u.jsx(yh,{ref:p,className:V("text-black/30 dark:text-white/50",v.closeButton),onClick:_=>{_.stopPropagation(),t()},tabIndex:-1,children:u.jsx(r8,{className:"block",width:"100%",height:"100%"})})]})}function z8({size:e,onRemove:t}){switch(e){case"xs":return{adornment:{size:"xs",margin:"-ml-3"},chip:V("pl-8 h-20 text-xs font-medium w-max",!t&&"pr-8"),closeButton:"mr-4 w-14 h-14"};case"sm":return{adornment:{size:"xs",margin:"-ml-3"},chip:V("pl-8 h-26 text-xs",!t&&"pr-8"),closeButton:"mr-4 w-18 h-18"};case"lg":return{adornment:{size:"md",margin:"-ml-12"},chip:V("pl-18 h-38 text-base",!t&&"pr-18"),closeButton:"mr-6 w-24 h-24"};default:return{adornment:{size:"sm",margin:"-ml-6"},chip:V("pl-12 h-32 text-sm",!t&&"pr-12"),closeButton:"mr-6 w-22 h-22"}}}function V8({color:e}){switch(e){case"primary":return"bg-primary text-on-primary";case"positive":return"bg-positive-lighter text-positive-darker";case"danger":return"bg-danger-lighter text-danger-darker";default:return"bg-chip text-main"}}const t1=oe(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"ErrorOutlined"),B8="modulepreload",H8=function(e,t){return new URL(e,t).href},Mw={},Va=function(t,n,r){if(!n||n.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=H8(i,r),i in Mw)return;Mw[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===i&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":B8,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})};function q8(e,t="dark"){e.querySelectorAll("pre code").forEach(n=>{i4(n,t)})}async function i4(e,t="dark"){const{hljs:n}=await Va(()=>import("./highlight-f2aaad45.js"),["./highlight-f2aaad45.js","./c-ea92d14f.js","./highlight-b5e2c008.css"],import.meta.url);e.dataset.highlighted||(e.classList.add(t==="dark"?"hljs-dark":"hljs-light"),n.highlightElement(e))}const n1=oe(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),W8=oe(u.jsx("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"}),"UnfoldMoreOutlined"),K8=oe(u.jsx("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"}),"UnfoldLessOutlined");function G8({trace:e,onSelectedIndexChange:t,selectedIndex:n,totalVendorGroups:r}){const[s,i]=y.useState([]),o=s.length===r;return u.jsxs("div",{className:"max-w-440 border-r text-sm",children:[u.jsx("div",{className:"border-b px-30 py-16",children:u.jsx(se,{variant:"outline",size:"2xs",startIcon:o?u.jsx(K8,{}):u.jsx(W8,{}),onClick:()=>{i(o?[]:e.map((a,l)=>"vendorGroup"in a?l:-1).filter(a=>a!==-1))},children:o?u.jsx(P,{message:"Collapse vendor frames"}):u.jsx(P,{message:"Expand vendor frames"})})}),e.map((a,l)=>"vendorGroup"in a?s.includes(l)?u.jsx(y.Fragment,{children:a.items.map((c,f)=>u.jsx(Fw,{frame:c,onClick:()=>t(c.flatIndex),isSelected:n===c.flatIndex},`vendor-${f}`))},l):u.jsxs("div",{className:"flex cursor-pointer items-center gap-4 border-b px-30 py-16 hover:bg-hover",onClick:()=>i(c=>[...c,l]),children:[u.jsx(P,{message:":count vendor [one frame|other frames]",values:{count:a.items.length}}),u.jsx(n1,{className:"text-muted"})]},l):u.jsx(Fw,{frame:a,onClick:()=>t(a.flatIndex),isSelected:n===a.flatIndex},l))]})}function Fw({frame:e,onClick:t,isSelected:n}){return u.jsxs("div",{onClick:t,className:V("cursor-pointer border-b px-30 py-16",n?"bg-danger text-on-primary":"hover:bg-danger/10"),children:[u.jsx(o4,{frame:e}),u.jsx("div",{className:"font-semibold",children:e.method})]})}function o4({frame:e}){return u.jsxs("div",{className:"inline-flex flex-wrap items-baseline",children:[e.path.map((t,n)=>e.path.length-1===n?u.jsx("div",{className:"font-semibold",children:t},n):u.jsxs("div",{children:[t,"/"]},n)),u.jsxs("div",{children:[":",e.lineNumber]})]})}function Y8({error:e}){const[t,n]=y.useState(()=>{for(const s of e.trace)if(!("vendorGroup"in s))return s.flatIndex;return 0}),r=y.useMemo(()=>{for(const s of e.trace)if("vendorGroup"in s){for(const i of s.items)if(i.flatIndex===t)return i}else if(s.flatIndex===t)return s},[e,t]);return u.jsxs(Da,{size:"fullscreen",children:[u.jsx(Ma,{showDivider:!0,leftAdornment:u.jsx(t1,{}),color:"text-danger",actions:u.jsx(J8,{}),children:u.jsx(P,{message:"An error occured"})}),u.jsxs(Fa,{padding:"p-0 stack",children:[u.jsxs("div",{className:"sticky top-0 z-10 border-b bg p-24",children:[u.jsx(s4,{className:"w-max",radius:"rounded-panel",children:e.exception}),u.jsx("div",{className:"mt-16 line-clamp-2 text-lg font-semibold leading-snug",children:e.message})]}),u.jsxs("div",{className:"flex items-stretch gap-10",children:[u.jsx(G8,{trace:e.trace,onSelectedIndexChange:n,selectedIndex:t,totalVendorGroups:e.totalVendorGroups}),r&&u.jsx(Q8,{frame:r})]})]})]})}function Q8({frame:e}){const t=y.useRef(null),n=Object.keys(e.codeSnippet).map(Number),r=n.indexOf(e.lineNumber),s=Object.values(e.codeSnippet);return u.jsxs("div",{className:"sticky top-120 flex-auto",children:[u.jsx("div",{className:"px-30 py-16 text-right text-muted",children:u.jsx(o4,{frame:e})}),u.jsxs("div",{className:"flex",children:[u.jsx("div",{className:"mr-8 select-none text-right",children:n.map((i,o)=>u.jsx("div",{className:V("px-8 font-mono leading-loose text-muted",o==r&&"bg-danger/30"),children:i},o))}),u.jsx("div",{className:"compact-scrollbar flex-grow overflow-x-auto",children:u.jsx("pre",{children:u.jsx("code",{className:"language-php",ref:t,children:s.map((i,o)=>u.jsx(X8,{isHighlighted:r===o,line:i},`${e.path}.${o}`))})})})]})]})}const X8=y.memo(({line:e,isHighlighted:t})=>{const n=y.useRef(null);return y.useEffect(()=>{const r=n.current;return i4(r,"light"),()=>{delete r.dataset.highlighted}},[]),u.jsx("span",{className:V("block leading-loose",t&&"bg-danger/20"),children:u.jsx("span",{className:"language-php",ref:n,children:e+` `})})});function J8(){return u.jsx(se,{variant:"outline",className:"text-main",elementType:"a",download:!0,href:"api/v1/logs/error/download-latest",size:"2xs",children:u.jsx(P,{message:"Download log"})})}const Z8=le("There was an issue. Please try again.");function gt(e,t=Z8,n,r){var s,i,o,a;wr.isAxiosError(e)&&((i=(s=e.response)==null?void 0:s.data)!=null&&i.ignitionTrace)?Uk(Y8,{error:e.response.data}):be.danger(As(e,n)||t,{action:(a=(o=e.response)==null?void 0:o.data)==null?void 0:a.action,...r})}function r1(){const{data:e,mergeBootstrapData:t}=zt();return we({mutationFn:n=>eM(n),onSuccess:n=>{qe.invalidateQueries({queryKey:Gn.key}),n.unreadCount===0&&t({user:{...e.user,unread_notifications_count:0}})},onError:n=>gt(n)})}function eM(e){return re.post("notifications/mark-as-read",e).then(t=>t.data)}/** * @remix-run/router v1.10.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 pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function s1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nM(){return Math.random().toString(36).substr(2,8)}function zw(e,t){return{usr:e.state,key:e.key,idx:t}}function my(e,t,n,r){return n===void 0&&(n=null),pu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ba(t):t,{state:n,key:t&&t.key||r||nM()})}function ma(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 Ba(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 rM(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=ws.Pop,l=null,c=f();c==null&&(c=0,o.replaceState(pu({},o.state,{idx:c}),""));function f(){return(o.state||{idx:null}).idx}function d(){a=ws.Pop;let w=f(),v=w==null?null:w-c;c=w,l&&l({action:a,location:b.location,delta:v})}function h(w,v){a=ws.Push;let m=my(b.location,w,v);n&&n(m,w),c=f()+1;let x=zw(m,c),_=b.createHref(m);try{o.pushState(x,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:b.location,delta:1})}function p(w,v){a=ws.Replace;let m=my(b.location,w,v);n&&n(m,w),c=f();let x=zw(m,c),_=b.createHref(m);o.replaceState(x,"",_),i&&l&&l({action:a,location:b.location,delta:0})}function g(w){let v=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof w=="string"?w:ma(w);return Fe(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let b={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Uw,d),l=w,()=>{s.removeEventListener(Uw,d),l=null}},createHref(w){return t(s,w)},createURL:g,encodeLocation(w){let v=g(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(w){return o.go(w)}};return b}var Vw;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Vw||(Vw={}));function sM(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Ba(t):t,s=mu(r.pathname||"/",n);if(s==null)return null;let i=a4(e);iM(i);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Fe(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=Is([r,l.relativePath]),f=n.concat(l);i.children&&i.children.length>0&&(Fe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),a4(i.children,t,f,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:dM(c,i.index),routesMeta:f})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of l4(i.path))s(i,o,l)}),t}function l4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=l4(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function iM(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hM(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const oM=/^:\w+$/,aM=3,lM=2,uM=1,cM=10,fM=-2,Bw=e=>e==="*";function dM(e,t){let n=e.split("/"),r=n.length;return n.some(Bw)&&(r+=fM),t&&(r+=lM),n.filter(s=>!Bw(s)).reduce((s,i)=>s+(oM.test(i)?aM:i===""?uM:cM),r)}function hM(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function pM(e,t){let{routesMeta:n}=e,r={},s="/",i=[];for(let o=0;o{if(f==="*"){let h=a[d]||"";o=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}return c[f]=yM(a[d]||"",f),c},{}),pathname:i,pathnameBase:o,pattern:e}}function mM(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),s1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function gM(e){try{return decodeURI(e)}catch(t){return s1(!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 yM(e,t){try{return decodeURIComponent(e)}catch(n){return s1(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function mu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function u4(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ba(e):e;return{pathname:n?n.startsWith("/")?n:vM(n,t):t,search:bM(r),hash:wM(s)}}function vM(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function am(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function i1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function o1(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ba(e):(s=pu({},e),Fe(!s.pathname||!s.pathname.includes("?"),am("?","pathname","search",s)),Fe(!s.pathname||!s.pathname.includes("#"),am("#","pathname","hash",s)),Fe(!s.search||!s.search.includes("#"),am("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(r||o==null)a=n;else{let d=t.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=u4(s,a),c=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Is=e=>e.join("/").replace(/\/\/+/g,"/"),xM=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _M(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const c4=["post","put","patch","delete"];new Set(c4);const SM=["get",...c4];new Set(SM);/** * React Router v6.17.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 Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),o=y.useRef(!1);return h4(()=>{o.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){n.go(l);return}let f=o1(l,JSON.parse(i),s,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Is([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,i,s,e])}const p4=y.createContext(null);function nQ(){return y.useContext(p4)}function jM(e){let t=y.useContext(_r).outlet;return t&&y.createElement(p4.Provider,{value:e},t)}function a1(){let{matches:e}=y.useContext(_r),t=e[e.length-1];return t?t.params:{}}function Rh(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=y.useContext(_r),{pathname:s}=Jn(),i=JSON.stringify(i1(r).map(o=>o.pathnameBase));return y.useMemo(()=>o1(e,JSON.parse(i),s,n==="path"),[e,i,s,n])}function kM(e,t){return TM(e,t)}function TM(e,t,n){Ha()||Fe(!1);let{navigator:r}=y.useContext(Vi),{matches:s}=y.useContext(_r),i=s[s.length-1],o=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=Jn(),c;if(t){var f;let b=typeof t=="string"?Ba(t):t;a==="/"||(f=b.pathname)!=null&&f.startsWith(a)||Fe(!1),c=b}else c=l;let d=c.pathname||"/",h=a==="/"?d:d.slice(a.length)||"/",p=sM(e,{pathname:h}),g=AM(p&&p.map(b=>Object.assign({},b,{params:Object.assign({},o,b.params),pathname:Is([a,r.encodeLocation?r.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?a:Is([a,r.encodeLocation?r.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n);return t&&g?y.createElement(Ph.Provider,{value:{location:Sd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ws.Pop}},g):g}function PM(){let e=DM(),t=_M(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,i)}const RM=y.createElement(PM,null);class NM extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||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?y.createElement(_r.Provider,{value:this.props.routeContext},y.createElement(d4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function OM(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(Th);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(_r.Provider,{value:t},r)}function AM(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let i=e,o=(r=n)==null?void 0:r.errors;if(o!=null){let a=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));a>=0||Fe(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,c)=>{let f=l.route.id?o==null?void 0:o[l.route.id]:null,d=null;n&&(d=l.route.errorElement||RM);let h=t.concat(i.slice(0,c+1)),p=()=>{let g;return f?g=d:l.route.Component?g=y.createElement(l.route.Component,null):l.route.element?g=l.route.element:g=a,y.createElement(OM,{match:l,routeContext:{outlet:a,matches:h,isDataRoute:n!=null},children:g})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?y.createElement(NM,{location:n.location,revalidation:n.revalidation,component:d,error:f,children:p(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):p()},null)}var m4=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(m4||{}),Ed=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}(Ed||{});function $M(e){let t=y.useContext(Th);return t||Fe(!1),t}function IM(e){let t=y.useContext(f4);return t||Fe(!1),t}function LM(e){let t=y.useContext(_r);return t||Fe(!1),t}function g4(e){let t=LM(),n=t.matches[t.matches.length-1];return n.route.id||Fe(!1),n.route.id}function DM(){var e;let t=y.useContext(d4),n=IM(Ed.UseRouteError),r=g4(Ed.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function MM(){let{router:e}=$M(m4.UseNavigateStable),t=g4(Ed.UseNavigateStable),n=y.useRef(!1);return h4(()=>{n.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Sd({fromRouteId:t},i)))},[e,t])}function Hs(e){let{to:t,replace:n,state:r,relative:s}=e;Ha()||Fe(!1);let{matches:i}=y.useContext(_r),{pathname:o}=Jn(),a=nc(),l=o1(t,i1(i).map(f=>f.pathnameBase),o,s==="path"),c=JSON.stringify(l);return y.useEffect(()=>a(JSON.parse(c),{replace:n,state:r,relative:s}),[a,c,s,n,r]),null}function y4(e){return jM(e.context)}function He(e){Fe(!1)}function FM(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ws.Pop,navigator:i,static:o=!1}=e;Ha()&&Fe(!1);let a=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:a,navigator:i,static:o}),[a,i,o]);typeof r=="string"&&(r=Ba(r));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default"}=r,g=y.useMemo(()=>{let b=mu(c,a);return b==null?null:{location:{pathname:b,search:f,hash:d,state:h,key:p},navigationType:s}},[a,c,f,d,h,p,s]);return g==null?null:y.createElement(Vi.Provider,{value:l},y.createElement(Ph.Provider,{children:n,value:g}))}function Hw(e){let{children:t,location:n}=e;return kM(yy(t),n)}new Promise(()=>{});function yy(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,s)=>{if(!y.isValidElement(r))return;let i=[...t,s];if(r.type===y.Fragment){n.push.apply(n,yy(r.props.children,i));return}r.type!==He&&Fe(!1),!r.props.index||!r.props.children||Fe(!1);let o={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&&(o.children=yy(r.props.children,i)),n.push(o)}),n}/** * React Router DOM v6.17.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 Cd(){return Cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function UM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zM(e,t){return e.button===0&&(!t||t==="_self")&&!UM(e)}function vy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function VM(e,t){let n=vy(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const BM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],HM=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],qM=y.createContext({isTransitioning:!1}),WM="startTransition",qw=k3[WM];function KM(e){let{basename:t,children:n,future:r,window:s}=e,i=y.useRef();i.current==null&&(i.current=tM({window:s,v5Compat:!0}));let o=i.current,[a,l]=y.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},f=y.useCallback(d=>{c&&qw?qw(()=>l(d)):l(d)},[l,c]);return y.useLayoutEffect(()=>o.listen(f),[o,f]),y.createElement(FM,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o})}const GM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",YM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xe=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:f,unstable_viewTransition:d}=t,h=v4(t,BM),{basename:p}=y.useContext(Vi),g,b=!1;if(typeof c=="string"&&YM.test(c)&&(g=c,GM))try{let x=new URL(window.location.href),_=c.startsWith("//")?new URL(x.protocol+c):new URL(c),S=mu(_.pathname,p);_.origin===x.origin&&S!=null?c=S+_.search+_.hash:b=!0}catch{}let w=EM(c,{relative:s}),v=JM(c,{replace:o,state:a,target:l,preventScrollReset:f,relative:s,unstable_viewTransition:d});function m(x){r&&r(x),x.defaultPrevented||v(x)}return y.createElement("a",Cd({},h,{href:g||w,onClick:b||i?r:m,ref:n,target:l}))}),QM=y.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,unstable_viewTransition:c,children:f}=t,d=v4(t,HM),h=Rh(l,{relative:d.relative}),p=Jn(),g=y.useContext(f4),{navigator:b}=y.useContext(Vi),w=g!=null&&ZM(h)&&c===!0,v=b.encodeLocation?b.encodeLocation(h).pathname:h.pathname,m=p.pathname,x=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;s||(m=m.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase());let _=m===v||!o&&m.startsWith(v)&&m.charAt(v.length)==="/",S=x!=null&&(x===v||!o&&x.startsWith(v)&&x.charAt(v.length)==="/"),j={isActive:_,isPending:S,isTransitioning:w},k=_?r:void 0,N;typeof i=="function"?N=i(j):N=[i,_?"active":null,S?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let D=typeof a=="function"?a(j):a;return y.createElement(Xe,Cd({},d,{"aria-current":k,className:N,ref:n,style:D,to:l,unstable_viewTransition:c}),typeof f=="function"?f(j):f)});var xy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xy||(xy={}));var Ww;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ww||(Ww={}));function XM(e){let t=y.useContext(Th);return t||Fe(!1),t}function JM(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=nc(),c=Jn(),f=Rh(e,{relative:o});return y.useCallback(d=>{if(zM(d,n)){d.preventDefault();let h=r!==void 0?r:ma(c)===ma(f);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,unstable_viewTransition:a})}},[c,l,f,r,s,n,e,i,o,a])}function l1(e){let t=y.useRef(vy(e)),n=y.useRef(!1),r=Jn(),s=y.useMemo(()=>VM(r.search,n.current?null:t.current),[r.search]),i=nc(),o=y.useCallback((a,l)=>{const c=vy(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}function ZM(e,t){t===void 0&&(t={});let n=y.useContext(qM);n==null&&Fe(!1);let{basename:r}=XM(xy.useViewTransitionState),s=Rh(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=mu(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=mu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gy(s.pathname,o)!=null||gy(s.pathname,i)!=null}function Mn(){const e=nc(),t=Jn();return y.useCallback((n,r)=>{const s=ma(t)===ma(u4(n,t.pathname));e(n,{...r,replace:(r==null?void 0:r.replace)!==!1&&s})},[e,t])}function fe(){const{data:{settings:e}}=zt();return e}const eF={"group-add":EL,people:CL,"export-csv":jL};function x4({notifications:e,className:t}){const{notifications:n}=y.useContext(Xr);return u.jsx("div",{className:t,children:e.map((r,s)=>{var a;const i=e.length-1===s,o=((a=n==null?void 0:n.renderMap)==null?void 0:a[r.type])||b4;return u.jsx(o,{notification:r,isLast:i},r.id)})})}function b4({notification:e,onActionButtonClick:t,lineIconRenderer:n,isLast:r}){const s=r1(),i=Mn(),o=e.data.mainAction,a=!e.data.image&&!e.read_at;return u.jsxs("div",{onClick:()=>{var l;!s.isPending&&!e.read_at&&s.mutate({ids:[e.id]}),o!=null&&o.action&&(Ia(o.action)?(l=window.open(o.action,"_blank"))==null||l.focus():i(o.action))},className:V("flex items-start gap-14 px-32 py-20 bg-alt relative",!r&&"border-b",(o==null?void 0:o.action)&&"cursor-pointer",e.read_at?"hover:bg-hover":"bg-paper hover:bg-primary/10"),title:o!=null&&o.label?o.label:void 0,children:[a&&u.jsx("div",{className:"absolute left-16 top-26 w-8 h-8 shadow rounded-full bg-primary flex-shrink-0"}),e.data.image&&u.jsx(R0,{className:"w-24 h-24 flex-shrink-0 text-muted",src:eF[e.data.image]||e.data.image}),u.jsxs("div",{className:"min-w-0",children:[e.data.lines.map((l,c)=>u.jsx(CD,{iconRenderer:n,notification:e,line:l,index:c},c)),u.jsx(tF,{onActionClick:t,notification:e})]})]})}function tF({notification:e,onActionClick:t}){const{base_url:n}=fe();return e.data.buttonActions?u.jsx("div",{className:"mt-12 flex items-center gap-12",children:e.data.buttonActions.map((r,s)=>u.jsx(se,{size:"xs",variant:s===0?"flat":"outline",color:s===0?"primary":null,elementType:t?void 0:Xe,to:t?void 0:r.action.replace(n,""),onClick:i=>{t==null||t(i,r)},children:r.label},s))}):null}const nF={fetchUserWorkspaces:["user-workspaces"],workspaceWithMembers:e=>["workspace-with-members",e]},rF={name:"Default",default:!0,id:0,members_count:1},by=new Set,sF=(e,t)=>{const n={name:e,callback:t};return by.add(n),()=>{by.delete(n)}};function iF(e){return Object.keys(e).reduce((t,n)=>{const r=n;return r==="days"||e[r]===!1?t:e[r]===!0?`${t}; ${r}`:`${t}; ${r}=${e[r]}`},"")}const oF=(e,t,n)=>{const r={days:7,path:"/",...n},s=new Date(Date.now()+r.days*864e5).toUTCString();document.cookie=e+"="+encodeURIComponent(t)+"; expires="+s+iF(r),by.forEach(i=>{i.name===e&&i.callback(t)})};function aF(e,t=""){return document.cookie&&document.cookie.split("; ").reduce((n,r)=>{const s=r.split("=");return s[0]===e?decodeURIComponent(s[1]):n},"")||t}function u1(e,t){const[n,r]=y.useState(()=>aF(e,t));y.useEffect(()=>sF(e,i=>{r(i)}),[e]);const s=y.useCallback((i,o)=>{r(i),oF(e,i,o)},[e]);return[n,s]}const w4=G.createContext({workspaceId:null,setWorkspaceId:()=>{}});function lF(){return y.useContext(w4)}function uF({children:e}){const[t,n]=u1("activeWorkspaceId",`${rF.id}`);y.useEffect(()=>(iw(parseInt(t)),()=>{iw(0)}),[t]);const r=y.useMemo(()=>({workspaceId:parseInt(t),setWorkspaceId:s=>{n(`${s}`)}}),[t,n]);return u.jsx(w4.Provider,{value:r,children:e})}function cF(){const{setWorkspaceId:e}=lF()||{};return we({mutationFn:t=>fF(t),onSuccess:t=>{be(le("Joined workspace")),e(t.workspace.id),qe.invalidateQueries({queryKey:nF.fetchUserWorkspaces}),qe.invalidateQueries({queryKey:Gn.key})},onError:t=>{wr.isAxiosError(t)&&t.response&&t.response.status===404?(qe.invalidateQueries({queryKey:Gn.key}),be.danger(le("This invite is no longer valid"))):gt(t)}})}function fF({inviteId:e}){return re.get(`workspace/join/${e}`).then(t=>t.data)}function dF({inviteId:e}){return re.delete(`workspace/invite/${e}`).then(t=>t.data)}function hF(){return we({mutationFn:e=>dF(e),onSuccess:()=>{qe.invalidateQueries({queryKey:Gn.key}),be(le("Declined workspace invitation"))},onError:e=>{wr.isAxiosError(e)&&e.response&&e.response.status===404?(qe.invalidateQueries({queryKey:Gn.key}),be.danger(le("This invite is no longer valid"))):gt(e)}})}function pF(e){const{notification:t}=e,n=cF(),r=hF(),s=Ju();return u.jsx(b4,{...e,onActionButtonClick:(i,{action:o})=>{const a=t.data;o==="join"&&n.mutate({inviteId:a.inviteId}),o==="decline"&&r.mutate({inviteId:a.inviteId}),s==null||s.close()}})}const mF="Common\\Workspaces\\Notifications\\WorkspaceInvitation",gF={auth:{redirectUri:"/",adminRedirectUri:"/admin"},tags:{types:[{name:"custom"}]},customPages:{types:[{type:"default",label:le("Default")}]},notifications:{renderMap:{[mF]:pF}},admin:{ads:[]},demo:{loginPageDefaults:"singleAccount"},homepage:{options:[{label:le("Login page"),value:"loginPage"},{label:le("Registration page"),value:"registerPage"}]}};function wy(e,t){$s==null||$s.style.setProperty(e,t)}function yF(e){$s==null||$s.style.removeProperty(e)}function _4(e){Object.entries(e.values).forEach(([t,n])=>{wy(t,n)}),e.is_dark?$s.classList.add("dark"):$s.classList.remove("dark")}const S4=y.createContext(null);function Nh(){return y.useContext(S4)}const vF="be-active-theme";function xF({children:e}){const{themes:t}=fe(),n=t==null?void 0:t.user_change,{data:r}=zt(),s=y.useMemo(()=>r.themes.all||[],[r.themes.all]),i=r.themes.selectedThemeId||void 0,[o,a]=u1(vF,`${i}`);let l=n?s.find(f=>f.id==o):s.find(f=>f.id==(t==null?void 0:t.default_id));l||(l=s[0]);const c=y.useMemo(()=>({allThemes:s,selectedTheme:l,selectTheme:f=>{if(!n)return;const d=bF(s,f);d&&(a(`${d.id}`),_4(d))}}),[s,l,a,n]);return u.jsx(S4.Provider,{value:c,children:e})}function bF(e,t){return e.find(n=>t==="light"?n.default_light===!0:t==="dark"?n.default_dark===!0:n.id===t)}function wF({children:e}){const{data:t}=PL(),n=y.useMemo(()=>({data:t,setBootstrapData:sk,mergeBootstrapData:TL,invalidateBootstrapData:kL}),[t]);return u.jsx(D0.Provider,{value:n,children:e})}const _F=bL(gF,iL);function SF({children:e}){return u.jsx(y.StrictMode,{children:u.jsx(tO,{client:qe,children:u.jsx(A$,{features:$$,children:u.jsx(Xr.Provider,{value:_F,children:u.jsx(wF,{children:u.jsx(xF,{children:e})})})})})})}const E4=Object.prototype.toString;function C4(e){switch(E4.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Gr(e,Error)}}function qa(e,t){return E4.call(e)===`[object ${t}]`}function c1(e){return qa(e,"ErrorEvent")}function Kw(e){return qa(e,"DOMError")}function EF(e){return qa(e,"DOMException")}function qs(e){return qa(e,"String")}function j4(e){return e===null||typeof e!="object"&&typeof e!="function"}function ga(e){return qa(e,"Object")}function Oh(e){return typeof Event<"u"&&Gr(e,Event)}function CF(e){return typeof Element<"u"&&Gr(e,Element)}function jF(e){return qa(e,"RegExp")}function f1(e){return!!(e&&e.then&&typeof e.then=="function")}function kF(e){return ga(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function k4(e){return typeof e=="number"&&e!==e}function Gr(e,t){try{return e instanceof t}catch{return!1}}function T4(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ko(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Gw(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rTF(e,r,n))}function PF(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!Gr(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=RF(_y(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function _y(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(Gr(r[s],Error)){Yw(o,a);const c=e(t,r[s]),f=l.length;Qw(c,s,f,a),l=_y(e,t,n,r[s],s,[c,...l],c,f)}return Array.isArray(r.errors)&&r.errors.forEach((c,f)=>{if(Gr(c,Error)){Yw(o,a);const d=e(t,c),h=l.length;Qw(d,`errors[${f}]`,h,a),l=_y(e,t,n,c,s,[d,...l],d,h)}}),l}function Yw(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function Qw(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function RF(e,t){return e.map(n=>(n.value&&(n.value=ko(n.value,t)),n))}function Fc(e){return e&&e.Math==Math?e:void 0}const pt=typeof globalThis=="object"&&Fc(globalThis)||typeof window=="object"&&Fc(window)||typeof self=="object"&&Fc(self)||typeof global=="object"&&Fc(global)||function(){return this}()||{};function sc(){return pt}function P4(e,t,n){const r=n||pt,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const bf=sc(),NF=80;function ya(e,t={}){if(!e)return"";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let c;const f=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||NF;for(;n&&i++1&&o+s.length*l+c.length>=d));)s.push(c),o+=c.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function OF(e,t){const n=e,r=[];let s,i,o,a,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(c&&c.length)c.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&qs(s))for(i=s.split(/\s+/),l=0;l{const i=jd[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function LF(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return R4.forEach(n=>{t[n]=()=>{}}),t}const rQ=LF(),DF=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ah(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function MF(e){const t=DF.exec(e);if(!t){console.error(`Invalid Sentry Dsn: ${e}`);return}const[n,r,s="",i,o="",a]=t.slice(1);let l="",c=a;const f=c.split("/");if(f.length>1&&(l=f.slice(0,-1).join("/"),c=f.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return N4({host:i,pass:s,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function N4(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function FF(e){return!0}function UF(e){const t=typeof e=="string"?MF(e):N4(e);if(!(!t||!FF()))return t}class fr extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function bt(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&O4(s,r),e[t]=s}function $h(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{}}function O4(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,$h(e,"__sentry_original__",t)}catch{}}function d1(e){return e.__sentry_original__}function zF(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function A4(e){if(C4(e))return{message:e.message,name:e.name,stack:e.stack,...Jw(e)};if(Oh(e)){const t={type:e.type,target:Xw(e.target),currentTarget:Xw(e.currentTarget),...Jw(e)};return typeof CustomEvent<"u"&&Gr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Xw(e){try{return CF(e)?ya(e):Object.prototype.toString.call(e)}catch{return""}}function Jw(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function VF(e,t=40){const n=Object.keys(A4(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return ko(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:ko(s,t)}return""}function Ls(e){return Sy(e,new Map)}function Sy(e,t){if(ga(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=Sy(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(Sy(s,t))}),r}return e}const $4=50,Zw=/\(error: (.*)\)/,e_=/captureMessage|captureException/;function I4(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],i=n.split(` `);for(let o=r;o1024)continue;const l=Zw.test(a)?a.replace(Zw,"$1"):a;if(!l.match(/\S*Error: /)){for(const c of t){const f=c(l);if(f){s.push(f);break}}if(s.length>=$4)break}}return HF(s)}}function BF(e){return Array.isArray(e)?I4(...e):e}function HF(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),e_.test(t[t.length-1].function||"")&&(t.pop(),e_.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,$4).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const lm="";function $i(e){try{return!e||typeof e!="function"?lm:e.name||lm}catch{return lm}}const Ey=sc();function L4(){if(!("fetch"in Ey))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Cy(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qF(){if(!L4())return!1;if(Cy(Ey.fetch))return!0;let e=!1;const t=Ey.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Cy(n.contentWindow.fetch)),t.head.removeChild(n)}catch{}return e}const Uc=sc();function WF(){const e=Uc.chrome,t=e&&e.app&&e.app.runtime,n="history"in Uc&&!!Uc.history.pushState&&!!Uc.history.replaceState;return!t&&n}const ht=sc(),mo="__sentry_xhr_v2__",Al={},t_={};function KF(e){if(!t_[e])switch(t_[e]=!0,e){case"console":GF();break;case"dom":n7();break;case"xhr":XF();break;case"fetch":YF();break;case"history":JF();break;case"error":r7();break;case"unhandledrejection":s7();break;default:return}}function sn(e,t){Al[e]=Al[e]||[],Al[e].push(t),KF(e)}function Wn(e,t){if(!(!e||!Al[e]))for(const n of Al[e]||[])try{n(t)}catch{}}function GF(){"console"in pt&&R4.forEach(function(e){e in pt.console&&bt(pt.console,e,function(t){return jd[e]=t,function(...n){Wn("console",{args:n,level:e});const r=jd[e];r&&r.apply(pt.console,n)}})})}function YF(){qF()&&bt(pt,"fetch",function(e){return function(...t){const{method:n,url:r}=QF(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Wn("fetch",{...s}),e.apply(pt,t).then(i=>(Wn("fetch",{...s,endTimestamp:Date.now(),response:i}),i),i=>{throw Wn("fetch",{...s,endTimestamp:Date.now(),error:i}),i})}})}function jy(e,t){return!!e&&typeof e=="object"&&!!e[t]}function n_(e){return typeof e=="string"?e:e?jy(e,"url")?e.url:e.toString?e.toString():"":""}function QF(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:n_(n),method:jy(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:n_(t),method:jy(t,"method")?String(t.method).toUpperCase():"GET"}}function XF(){if(!ht.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;bt(e,"open",function(t){return function(...n){const r=Date.now(),s=n[1],i=this[mo]={method:qs(n[0])?n[0].toUpperCase():n[0],url:n[1],request_headers:{}};qs(s)&&i.method==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[mo];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}Wn("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:r,xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?bt(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),bt(this,"setRequestHeader",function(a){return function(...l){const[c,f]=l,d=this[mo];return d&&(d.request_headers[c.toLowerCase()]=f),a.apply(this,l)}}),t.apply(this,n)}}),bt(e,"send",function(t){return function(...n){const r=this[mo];return r&&n[0]!==void 0&&(r.body=n[0]),Wn("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}})}let zc;function JF(){if(!WF())return;const e=ht.onpopstate;ht.onpopstate=function(...n){const r=ht.location.href,s=zc;if(zc=r,Wn("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=zc,o=String(s);zc=o,Wn("history",{from:i,to:o})}return n.apply(this,r)}}bt(ht.history,"pushState",t),bt(ht.history,"replaceState",t)}const ZF=1e3;let r_,Vc;function e7(e,t){if(e.type!==t.type)return!1;try{if(e.target!==t.target)return!1}catch{}return!0}function t7(e){if(e.type!=="keypress")return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function s_(e,t=!1){return n=>{if(!n||n._sentryCaptured||t7(n))return;$h(n,"_sentryCaptured",!0);const r=n.type==="keypress"?"input":n.type;(Vc===void 0||!e7(Vc,n))&&(e({event:n,name:r,global:t}),Vc=n),clearTimeout(r_),r_=ht.setTimeout(()=>{Vc=void 0},ZF)}}function n7(){if(!ht.document)return;const e=Wn.bind(null,"dom"),t=s_(e,!0);ht.document.addEventListener("click",t,!1),ht.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=ht[n]&&ht[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(bt(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},f=c[i]=c[i]||{refCount:0};if(!f.handler){const d=s_(e);f.handler=d,s.call(this,i,d,a)}f.refCount++}catch{}return s.call(this,i,o,a)}}),bt(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__||{},f=c[i];f&&(f.refCount--,f.refCount<=0&&(s.call(this,i,f.handler,a),f.handler=void 0,delete c[i]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}let Bc=null;function r7(){Bc=ht.onerror,ht.onerror=function(e,t,n,r,s){return Wn("error",{column:r,error:s,line:n,msg:e,url:t}),Bc&&!Bc.__SENTRY_LOADER__?Bc.apply(this,arguments):!1},ht.onerror.__SENTRY_INSTRUMENTED__=!0}let Hc=null;function s7(){Hc=ht.onunhandledrejection,ht.onunhandledrejection=function(e){return Wn("unhandledrejection",e),Hc&&!Hc.__SENTRY_LOADER__?Hc.apply(this,arguments):!0},ht.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function i7(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function o7(){return"npm"}function a7(){return!i7()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function l7(e,t){return e.require(t)}function u7(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;iMath.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function D4(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function c7(e){const{message:t,event_id:n}=e;if(t)return t;const r=D4(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function ky(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function gu(e,t){const n=D4(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s&&s.data,...t.data};n.mechanism.data=i}}function i_(e){if(e&&e.__sentry_captured__)return!0;try{$h(e,"__sentry_captured__",!0)}catch{}return!1}function M4(e){return Array.isArray(e)?e:[e]}function ls(e,t=100,n=1/0){try{return Ty("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function F4(e,t=3,n=100*1024){const r=ls(e,t);return p7(r)>n?F4(e,t-1,n):r}function Ty(e,t,n=1/0,r=1/0,s=u7()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!k4(t))return t;const a=f7(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const p=c.toJSON();return Ty("",p,l-1,r,s)}catch{}const f=Array.isArray(t)?[]:{};let d=0;const h=A4(t);for(const p in h){if(!Object.prototype.hasOwnProperty.call(h,p))continue;if(d>=r){f[p]="[MaxProperties ~]";break}const g=h[p];f[p]=Ty(p,g,l-1,r,s),d++}return o(t),f}function f7(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(T4(t))return"[VueViewModel]";if(kF(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${$i(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=d7(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function d7(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function h7(e){return~-encodeURI(e).split(/%..|./).length}function p7(e){return h7(JSON.stringify(e))}var Rr;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Rr||(Rr={}));function Ii(e){return new rn(t=>{t(e)})}function h1(e){return new rn((t,n)=>{n(e)})}class rn{constructor(t){rn.prototype.__init.call(this),rn.prototype.__init2.call(this),rn.prototype.__init3.call(this),rn.prototype.__init4.call(this),this._state=Rr.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new rn((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new rn((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(Rr.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Rr.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Rr.PENDING){if(f1(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Rr.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Rr.RESOLVED&&n[1](this._value),this._state===Rr.REJECTED&&n[2](this._value),n[0]=!0)})}}}function m7(e){const t=[];function n(){return e===void 0||t.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new rn((a,l)=>{let c=t.length;if(!c)return a(!0);const f=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Ii(d).then(()=>{--c||(clearTimeout(f),a(!0))},l)})})}return{$:t,add:s,drain:i}}function um(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const g7=["fatal","error","warning","log","info","debug"];function y7(e){return e==="warn"?"warning":g7.includes(e)?e:"log"}const U4=sc(),Py={nowSeconds:()=>Date.now()/1e3};function v7(){const{performance:e}=U4;if(!e||!e.now)return;const t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}function x7(){try{return l7(module,"perf_hooks").performance}catch{return}}const cm=a7()?x7():v7(),o_=cm===void 0?Py:{nowSeconds:()=>(cm.timeOrigin+cm.now())/1e3},Ih=Py.nowSeconds.bind(Py),Li=o_.nowSeconds.bind(o_),vr=(()=>{const{performance:e}=U4;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s{const i=a_(s);return{...r,...i}},{});else{if(!e)return;t=a_(e)}const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(b7)){const o=s.slice(z4.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Ny(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${z4}${r}`]=s),n),{});return S7(t)}function a_(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function S7(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>w7?t:o},"")}const E7=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function C7(e){if(!e)return;const t=e.match(E7);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function j7(e,t){const n=C7(e),r=_7(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{},a={traceId:s||Qt(),spanId:Qt().substring(16),sampled:o};return i&&(a.parentSpanId=i),r&&(a.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:a}}function p1(e=Qt(),t=Qt().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ic(e,t=[]){return[e,t]}function k7(e,t){const[n,r]=e;return[n,[...r,t]]}function l_(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Oy(e,t){return(t||new TextEncoder).encode(e)}function T7(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[Oy(s,t),o]:s.push(typeof o=="string"?Oy(o,t):o)}for(const o of r){const[a,l]=o;if(i(` ${JSON.stringify(a)} `),typeof l=="string"||l instanceof Uint8Array)i(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(ls(l))}i(c)}}return typeof s=="string"?s:P7(s)}function P7(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function R7(e,t){const n=typeof e.data=="string"?Oy(e.data,t):e.data;return[Ls({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const N7={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",statsd:"unknown"};function u_(e){return N7[e]}function V4(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function O7(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ah(r)},...s&&{trace:Ls({...s})}}}function A7(e,t,n){const r=[{type:"client_report"},{timestamp:n||Ih(),discarded_events:e}];return ic(t?{dsn:t}:{},[r])}const $7=60*1e3;function I7(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?$7:r-t}function L7(e,t){return e[t]||e.all||0}function D7(e,t,n=Date.now()){return L7(e,t)>n}function M7(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,c]=a.split(":",2),f=parseInt(l,10),d=(isNaN(f)?60:f)*1e3;if(!c)s.all=r+d;else for(const h of c.split(";"))s[h]=r+d}else o?s.all=r+I7(o,r):t===429&&(s.all=r+60*1e3);return s}const m1="production";function g1(){return P4("globalEventProcessors",()=>[])}function F7(e){g1().push(e)}function kd(e,t,n,r=0){return new rn((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);f1(a)?a.then(l=>kd(e,l,n,r+1).then(s)).then(null,i):kd(e,a,n,r+1).then(s).then(null,i)}})}function U7(e){const t=Li(),n={sid:Qt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>V7(n)};return e&&va(n,e),n}function va(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Li(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Qt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function z7(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),va(e,n)}function V7(e){return Ls({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const B7=100;class Si{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=c_()}static clone(t){const n=new Si;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments],n._sdkProcessingMetadata={...t._sdkProcessingMetadata},n._propagationContext={...t._propagationContext}),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&va(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof Si?n:this}return t instanceof Si?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):ga(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=c_(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:B7;if(r<=0)return this;const s={timestamp:Ih(),...t},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={},r){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const o=this._span.transaction;if(o){t.sdkProcessingMetadata={dynamicSamplingContext:o.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const a=o.name;a&&(t.tags={transaction:a,...t.tags})}}this._applyFingerprint(t);const s=this._getBreadcrumbs(),i=[...t.breadcrumbs||[],...s];return t.breadcrumbs=i.length>0?i:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},kd([...r||[],...g1(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?M4(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function c_(){return{traceId:Qt(),spanId:Qt().substring(16)}}const B4=4,H7=100;class H4{constructor(t,n=new Si,r=B4){this._version=r,this._stack=[{scope:n}],t&&this.bindClient(t)}isOlderThan(t){return this._version{i.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},o)}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:Qt(),i=new Error(t);return this._withClient((o,a)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},a)}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Qt();return t.type||(this._lastEventId=r),this._withClient((s,i)=>{s.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=H7}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const l={timestamp:Ih(),...t},c=i?IF(()=>i(l,n)):l;c!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,o))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=f_(this);try{t(this)}finally{f_(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&z7(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=m1}=r&&r.getOptions()||{},{userAgent:o}=pt.navigator||{},a=U7({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...t}),l=n.getSession&&n.getSession();return l&&l.status==="ok"&&va(l,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){const{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){const s=oc().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n)}}function oc(){return pt.__SENTRY__=pt.__SENTRY__||{extensions:{},hub:void 0},pt}function f_(e){const t=oc(),n=Ay(t);return q4(t,e),n}function We(){const e=oc();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return q7(e)}function q7(e=oc()){return(!W7(e)||Ay(e).isOlderThan(B4))&&q4(e,new H4),Ay(e)}function W7(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Ay(e){return P4("hub",()=>new H4,e)}function q4(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function ac(e){return(e||We()).getScope().getTransaction()}let d_=!1;function K7(){d_||(d_=!0,sn("error",$y),sn("unhandledrejection",$y))}function $y(){const e=ac();if(e){const t="internal_error";e.setStatus(t)}}$y.tag="sentry_tracingErrorCallback";class W4{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class y1{constructor(t={}){this.traceId=t.traceId||Qt(),this.spanId=t.spanId||Qt().substring(16),this.startTimestamp=t.startTimestamp||Li(),this.tags=t.tags||{},this.data=t.data||{},this.instrumenter=t.instrumenter||"sentry",this.origin=t.origin||"manual",t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.name&&(this.description=t.name),t.status&&(this.status=t.status),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}get name(){return this.description||""}set name(t){this.setName(t)}startChild(t){const n=new y1({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);const n=G7(t);return n!=="unknown_error"&&this.setStatus(n),this}setName(t){this.description=t}isSuccess(){return this.status==="ok"}finish(t){this.endTimestamp=typeof t=="number"?t:Li()}toTraceparent(){return p1(this.traceId,this.spanId,this.sampled)}toContext(){return Ls({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return Ls({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Ls({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}}function G7(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function Lh(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=Ls({environment:r.environment||m1,release:r.release,user_segment:i,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",o),o}class K4 extends y1{constructor(t,n){super(t),delete this.description,this._measurements={},this._contexts={},this._hub=n||We(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const r=this.metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}setName(t,n="custom"){this._name=t,this.metadata.source=n}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new W4(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){const n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){const t=super.toContext();return Ls({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||We(),n=t.getClient();if(!n)return{};const r=t.getScope(),s=Lh(this.traceId,n,r),i=this.metadata.sampleRate;i!==void 0&&(s.sample_rate=`${i}`);const o=this.metadata.source;return o&&o!=="url"&&(s.transaction=this.name),this.sampled!==void 0&&(s.sampled=String(this.sampled)),s}setHub(t){this._hub=t}_finishTransaction(t){if(this.endTimestamp!==void 0)return;this.name||(this.name=""),super.finish(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this.sampled!==!0){n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(a=>a!==this&&a.endTimestamp):[];this._trimEnd&&r.length>0&&(this.endTimestamp=r.reduce((a,l)=>a.endTimestamp&&l.endTimestamp?a.endTimestamp>l.endTimestamp?a:l:a).endTimestamp);const s=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:r,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...s,dynamicSamplingContext:this.getDynamicSamplingContext()},...s.source&&{transaction_info:{source:s.source}}};return Object.keys(this._measurements).length>0&&(i.measurements=this._measurements),i}}const wf={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Y7="finishReason",Yi=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Q7 extends W4{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){t.spanId!==this.transactionSpanId&&(t.finish=n=>{t.endTimestamp=typeof n=="number"?n:Li(),this._popActivity(t.spanId)},t.endTimestamp===void 0&&this._pushActivity(t.spanId)),super.add(t)}}class X7 extends K4{constructor(t,n,r=wf.idleTimeout,s=wf.finalTimeout,i=wf.heartbeatInterval,o=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Yi[4],o&&n.configureScope(a=>a.setSpan(this)),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Yi[3],this.finish())},this._finalTimeout)}finish(t=Li()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(Y7,this._finishReason),this.spanRecorder){for(const n of this._beforeFinishCallbacks)n(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(n=>{if(n.spanId===this.spanId)return!0;n.endTimestamp||(n.endTimestamp=t,n.setStatus("cancelled"));const r=n.startTimestamp{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Q7(n,r,this.spanId,t),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Yi[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Yi[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),this.activities[t]=!0}_popActivity(t){if(this.activities[t]&&delete this.activities[t],Object.keys(this.activities).length===0){const n=Li();this._idleTimeoutCanceledPermanently?(this._finishReason=Yi[5],this.finish(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(this.setStatus("deadline_exceeded"),this._finishReason=Yi[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function v1(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=We().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function G4(e,t,n){if(!v1(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),!J7(r)||!r?(e.sampled=!1,e):(e.sampled=Math.random()1)}function Z7(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function e9(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(e.sampled=!1);let o=new K4(e,this);return o=G4(o,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),o.sampled&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function h_(e,t,n,r,s,i,o){const a=e.getClient(),l=a&&a.getOptions()||{};let c=new X7(t,e,n,r,o,s);return c=G4(c,l,{parentSampled:t.parentSampled,transactionContext:t,...i}),c.sampled&&c.initSpanRecorder(l._experiments&&l._experiments.maxSpans),a&&a.emit&&a.emit("startTransaction",c),c}function t9(){const e=oc();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=e9),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=Z7),K7())}function n9(e,t){return We().captureException(e,{captureContext:t})}function r9(e){We().withScope(e)}const s9="7";function i9(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function o9(e){return`${i9(e)}${e.projectId}/envelope/`}function a9(e,t){return zF({sentry_key:e.publicKey,sentry_version:s9,...t&&{sentry_client:`${t.name}/${t.version}`}})}function l9(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${o9(e)}?${a9(e,r)}`}function u9(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function c9(e,t,n,r){const s=V4(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Ah(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ic(i,[o])}function f9(e,t,n,r){const s=V4(n),i=e.type&&e.type!=="replay_event"?e.type:"event";u9(e,n&&n.sdk);const o=O7(e,s,r,t);return delete e.sdkProcessingMetadata,ic(o,[[{type:i},e]])}const p_=[];function d9(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function h9(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=M4(n(t)):r=t;const s=d9(r),i=m9(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function p9(e,t){const n={};return t.forEach(r=>{r&&Y4(e,r,n)}),n}function Y4(e,t,n){if(n[t.name]=t,p_.indexOf(t.name)===-1&&(t.setupOnce(F7,We),p_.push(t.name)),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}}function m9(e,t){for(let n=0;nh.name);y9(a,e),b9(a,l),t.type===void 0&&v9(a,e.stackParser);let c=r;n.captureContext&&(c=Si.clone(c).update(n.captureContext));let f=Ii(a);const d=s&&s.getEventProcessors?s.getEventProcessors():[];if(c){if(c.getAttachments){const h=[...n.attachments||[],...c.getAttachments()];h.length&&(n.attachments=h)}f=c.applyToEvent(a,n,d)}else f=kd([...d,...g1()],a,n);return f.then(h=>(h&&x9(h),typeof i=="number"&&i>0?w9(h,i,o):h))}function y9(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:m1),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=ko(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=ko(o.value,i));const a=e.request;a&&a.url&&(a.url=ko(a.url,i))}const m_=new WeakMap;function v9(e,t){const n=pt._sentryDebugIds;if(!n)return;let r;const s=m_.get(t);s?r=s:(r=new Map,m_.set(t,r));const i=Object.keys(n).reduce((o,a)=>{let l;const c=r.get(a);c?l=c:(l=t(a),r.set(a,l));for(let f=l.length-1;f>=0;f--){const d=l[f];if(d.filename){o[d.filename]=n[a];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function x9(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function b9(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function w9(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:ls(s.data,t,n)}}))},...e.user&&{user:ls(e.user,t,n)},...e.contexts&&{contexts:ls(e.contexts,t,n)},...e.extra&&{extra:ls(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ls(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>(s.data&&(s.data=ls(s.data,t,n)),s))),r}class _9{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn&&(this._dsn=UF(t.dsn)),this._dsn){const n=l9(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(i_(t))return;let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id;const o=j4(t)?this.eventFromMessage(String(t),n,r):this.eventFromException(t,r);return this._process(o.then(a=>this._captureEvent(a,r,s)).then(a=>{i=a})),i}captureEvent(t,n,r){if(n&&n.originalException&&i_(n.originalException))return;let s=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(i=>{s=i})),s}captureSession(t){typeof t.release!="string"||(this.sendSession(t),va(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s)):Ii(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=p9(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return null}}addIntegration(t){Y4(this,t,this._integrations)}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=f9(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=k7(r,R7(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=c9(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=`${t}:${n}`;this._outcomes[s]=this._outcomes[s]+1||1}}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const l of i){const c=l.mechanism;if(c&&c.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(va(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new rn(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r){const s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),g9(s,t,n,r,this).then(o=>{if(o===null)return o;const{propagationContext:a}=o.sdkProcessingMetadata||{};if(!(o.contexts&&o.contexts.trace)&&a){const{traceId:c,spanId:f,parentSpanId:d,dsc:h}=a;o.contexts={trace:{trace_id:c,span_id:f,parent_span_id:d},...o.contexts};const p=h||Lh(c,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:p,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=X4(t),a=Q4(t),l=t.type||"error",c=`before send for type \`${l}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),h1(new fr(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=l==="replay_event"?"replay":l;return this._prepareEvent(t,n,r).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",f,t),new fr("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return d;const p=E9(s,d,n);return S9(p,c)}).then(d=>{if(d===null)throw this.recordDroppedEvent("before_send",f,t),new fr(`${c} returned \`null\`, will not send event.`,"log");const h=r&&r.getSession();!o&&h&&this._updateSessionFromEvent(h,d);const p=d.transaction_info;if(o&&p&&d.transaction!==t.transaction){const g="custom";d.transaction_info={...p,source:g}}return this.sendEvent(d,n),d}).then(null,d=>{throw d instanceof fr?d:(this.captureException(d,{data:{__sentry__:!0},originalException:d}),new fr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${d}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,n=>{})}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function S9(e,t){const n=`${t} must return \`null\` or a valid event.`;if(f1(e))return e.then(r=>{if(!ga(r)&&r!==null)throw new fr(n);return r},r=>{throw new fr(`${t} rejected with ${r}`)});if(!ga(e)&&e!==null)throw new fr(n);return e}function E9(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;return Q4(t)&&r?r(t,n):X4(t)&&s?s(t,n):t}function Q4(e){return e.type===void 0}function X4(e){return e.type==="transaction"}function C9(e,t){t.debug===!0&&console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");const n=We();n.getScope().update(t.initialScope);const s=new e(t);n.bindClient(s)}const j9=30;function J4(e,t,n=m7(e.bufferSize||j9)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(l_(o,(d,h)=>{const p=u_(h);if(D7(r,p)){const g=g_(d,h);e.recordDroppedEvent("ratelimit_backoff",p,g)}else a.push(d)}),a.length===0)return Ii();const l=ic(o[0],a),c=d=>{l_(l,(h,p)=>{const g=g_(h,p);e.recordDroppedEvent(d,u_(p),g)})},f=()=>t({body:T7(l,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300),r=M7(r,d),d),d=>{throw c("network_error"),d});return n.add(f).then(d=>d,d=>{if(d instanceof fr)return c("queue_overflow"),Ii();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function g_(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}const Td="7.76.0";let y_;class Dh{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=Dh.id}setupOnce(){y_=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=d1(this)||this;return y_.apply(n,t)}}catch{}}}Dh.__initStatic();const k9=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],T9=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/];class Mh{static __initStatic(){this.id="InboundFilters"}constructor(t={}){this.name=Mh.id,this._options=t}setupOnce(t,n){}processEvent(t,n,r){const s=r.getOptions(),i=P9(this._options,s);return R9(t,i)?null:t}}Mh.__initStatic();function P9(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:k9],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:T9],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function R9(e,t){return!!(t.ignoreInternal&&L9(e)||N9(e,t.ignoreErrors)||O9(e,t.ignoreTransactions)||A9(e,t.denyUrls)||!$9(e,t.allowUrls))}function N9(e,t){return e.type||!t||!t.length?!1:I9(e).some(n=>rc(n,t))}function O9(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?rc(n,t):!1}function A9(e,t){if(!t||!t.length)return!1;const n=Z4(e);return n?rc(n,t):!1}function $9(e,t){if(!t||!t.length)return!0;const n=Z4(e);return n?rc(n,t):!0}function I9(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function L9(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function D9(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Z4(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?D9(t):null}catch{return null}}const Ce=pt;let Iy=0;function eT(){return Iy>0}function M9(){Iy++,setTimeout(()=>{Iy--})}function xa(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(d1(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=s.map(o=>xa(o,t));return e.apply(this,i)}catch(i){throw M9(),r9(o=>{o.addEventProcessor(a=>(t.mechanism&&(ky(a,void 0,void 0),gu(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),n9(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}O4(r,e),$h(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function tT(e,t){const n=x1(e,t),r={type:t&&t.name,value:V9(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function F9(e,t,n,r){const i=We().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:Oh(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:q9(t,{isUnhandledRejection:r})}]},extra:{__serialized__:F4(t,o)}};if(n){const l=x1(e,n);l.length&&(a.exception.values[0].stacktrace={frames:l})}return a}function fm(e,t){return{exception:{values:[tT(e,t)]}}}function x1(e,t){const n=t.stacktrace||t.stack||"",r=z9(t);try{return e(n,r)}catch{}return[]}const U9=/Minified React error #\d+;/i;function z9(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(U9.test(e.message))return 1}return 0}function V9(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function B9(e,t,n,r){const s=n&&n.syntheticException||void 0,i=b1(e,t,s,r);return gu(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ii(i)}function H9(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Ly(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Ii(o)}function b1(e,t,n,r,s){let i;if(c1(t)&&t.error)return fm(e,t.error);if(Kw(t)||EF(t)){const o=t;if("stack"in t)i=fm(e,t);else{const a=o.name||(Kw(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=Ly(e,l,n,r),ky(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return C4(t)?fm(e,t):ga(t)||Oh(t)?(i=F9(e,t,n,s),gu(i,{synthetic:!0}),i):(i=Ly(e,t,n,r),ky(i,`${t}`,void 0),gu(i,{synthetic:!0}),i)}function Ly(e,t,n,r){const s={message:t};if(r&&n){const i=x1(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}return s}function q9(e,{isUnhandledRejection:t}){const n=VF(e),r=t?"promise rejection":"exception";return c1(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Oh(e)?`Event \`${W9(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function W9(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function K9(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ah(r)}},i=G9(e);return ic(s,[i])}function G9(e){return[{type:"user_report"},e]}class Y9 extends _9{constructor(t){const n=Ce.SENTRY_SDK_SOURCE||o7();t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${n}:@sentry/browser`,version:Td}],version:Td},super(t),t.sendClientReports&&Ce.document&&Ce.document.addEventListener("visibilitychange",()=>{Ce.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return B9(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return H9(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return;const n=K9(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0||!this._dsn)return;const n=A7(t,this._options.tunnel&&Ah(this._dsn));this._sendEnvelope(n)}}let xl;function Q9(){if(xl)return xl;if(Cy(Ce.fetch))return xl=Ce.fetch.bind(Ce);const e=Ce.document;let t=Ce.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch{}return xl=t.bind(Ce)}function X9(){xl=void 0}function J9(e,t=Q9()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return X9(),n-=o,r--,h1(l)}}return J4(e,s)}const Z9=4;function eU(e){function t(n){return new rn((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===Z9&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return J4(e,t)}const Fh="?",tU=30,nU=40,rU=50;function w1(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const sU=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,iU=/\((\S*)(?::(\d+))(?::(\d+))\)/,oU=e=>{const t=sU.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=iU.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=nT(t[1]||Fh,t[2]);return w1(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},aU=[tU,oU],lU=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,uU=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,cU=e=>{const t=lU.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=uU.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Fh;return[s,r]=nT(s,r),w1(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},fU=[rU,cU],dU=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,hU=e=>{const t=dU.exec(e);return t?w1(t[2],t[1]||Fh,+t[3],t[4]?+t[4]:void 0):void 0},pU=[nU,hU],mU=[aU,fU,pU],gU=I4(...mU),nT=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Fh,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};class Wa{static __initStatic(){this.id="GlobalHandlers"}constructor(t){this.name=Wa.id,this._options={onerror:!0,onunhandledrejection:!0,...t},this._installFunc={onerror:yU,onunhandledrejection:vU}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const n in t){const r=this._installFunc[n];r&&t[n]&&(r(),this._installFunc[n]=void 0)}}}Wa.__initStatic();function yU(){sn("error",e=>{const[t,n,r]=iT();if(!t.getIntegration(Wa))return;const{msg:s,url:i,line:o,column:a,error:l}=e;if(eT()||l&&l.__sentry_own_request__)return;const c=l===void 0&&qs(s)?bU(s,i,o,a):rT(b1(n,l||s,void 0,r,!1),i,o,a);c.level="error",sT(t,l,c,"onerror")})}function vU(){sn("unhandledrejection",e=>{const[t,n,r]=iT();if(!t.getIntegration(Wa))return;let s=e;try{"reason"in e?s=e.reason:"detail"in e&&"reason"in e.detail&&(s=e.detail.reason)}catch{}if(eT()||s&&s.__sentry_own_request__)return!0;const i=j4(s)?xU(s):b1(n,s,void 0,r,!0);i.level="error",sT(t,s,i,"onunhandledrejection")})}function xU(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function bU(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=c1(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),rT({exception:{values:[{type:o,value:i}]}},t,n,r)}function rT(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,d=qs(t)&&t.length>0?t:AF();return l.length===0&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:f}),e}function sT(e,t,n,r){gu(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function iT(){const e=We(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}const wU=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Uh{static __initStatic(){this.id="TryCatch"}constructor(t){this.name=Uh.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&bt(Ce,"setTimeout",v_),this._options.setInterval&&bt(Ce,"setInterval",v_),this._options.requestAnimationFrame&&bt(Ce,"requestAnimationFrame",_U),this._options.XMLHttpRequest&&"XMLHttpRequest"in Ce&&bt(XMLHttpRequest.prototype,"send",SU);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:wU).forEach(EU)}}Uh.__initStatic();function v_(e){return function(...t){const n=t[0];return t[0]=xa(n,{mechanism:{data:{function:$i(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function _U(e){return function(t){return e.apply(this,[xa(t,{mechanism:{data:{function:"requestAnimationFrame",handler:$i(e)},handled:!1,type:"instrument"}})])}}function SU(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&bt(n,s,function(i){const o={mechanism:{data:{function:s,handler:$i(i)},handled:!1,type:"instrument"}},a=d1(i);return a&&(o.mechanism.data.handler=$i(a)),xa(i,o)})}),e.apply(this,t)}}function EU(e){const t=Ce,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(bt(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=xa(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:$i(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,xa(i,{mechanism:{data:{function:"addEventListener",handler:$i(i),target:e},handled:!1,type:"instrument"}}),o])}}),bt(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const l=a&&a.__sentry_wrapped__;l&&r.call(this,s,l,o)}catch{}return r.call(this,s,a,o)}}))}const x_=1024;class zh{static __initStatic(){this.id="Breadcrumbs"}constructor(t){this.name=zh.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){if(this.options.console&&sn("console",kU),this.options.dom&&sn("dom",jU(this.options.dom)),this.options.xhr&&sn("xhr",TU),this.options.fetch&&sn("fetch",PU),this.options.history&&sn("history",RU),this.options.sentry){const t=We().getClient();t&&t.on&&t.on("beforeSendEvent",CU)}}}zh.__initStatic();function CU(e){We().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:c7(e)},{event:e})}function jU(e){function t(n){let r,s=typeof e=="object"?e.serializeAttribute:void 0,i=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;i&&i>x_&&(i=x_),typeof s=="string"&&(s=[s]);try{const o=n.event;r=NU(o)?ya(o.target,{keyAttrs:s,maxStringLength:i}):ya(o,{keyAttrs:s,maxStringLength:i})}catch{r=""}r.length!==0&&We().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function kU(e){const t={category:"console",data:{arguments:e.args,logger:"console"},level:y7(e.level),message:Gw(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Gw(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;We().addBreadcrumb(t,{input:e.args,level:e.level})}function TU(e){const{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[mo];if(!t||!n||!r)return;const{method:s,url:i,status_code:o,body:a}=r,l={method:s,url:i,status_code:o},c={xhr:e.xhr,input:a,startTimestamp:t,endTimestamp:n};We().addBreadcrumb({category:"xhr",data:l,type:"http"},c)}function PU(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){const r=e.fetchData,s={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};We().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},s)}else{const r={...e.fetchData,status_code:e.response&&e.response.status},s={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};We().addBreadcrumb({category:"fetch",data:r,type:"http"},s)}}function RU(e){let t=e.from,n=e.to;const r=um(Ce.location.href);let s=um(t);const i=um(n);s.path||(s=r),r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===s.protocol&&r.host===s.host&&(t=s.relative),We().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}function NU(e){return!!e&&!!e.target}const OU="cause",AU=5;class Vh{static __initStatic(){this.id="LinkedErrors"}constructor(t={}){this.name=Vh.id,this._key=t.key||OU,this._limit=t.limit||AU}setupOnce(){}preprocessEvent(t,n,r){const s=r.getOptions();PF(tT,s.stackParser,s.maxValueLength,this._key,this._limit,t,n)}}Vh.__initStatic();class Bh{static __initStatic(){this.id="HttpContext"}constructor(){this.name=Bh.id}setupOnce(){}preprocessEvent(t){if(!Ce.navigator&&!Ce.location&&!Ce.document)return;const n=t.request&&t.request.url||Ce.location&&Ce.location.href,{referrer:r}=Ce.document||{},{userAgent:s}=Ce.navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...s&&{"User-Agent":s}},o={...t.request,...n&&{url:n},headers:i};t.request=o}}Bh.__initStatic();class Hh{static __initStatic(){this.id="Dedupe"}constructor(){this.name=Hh.id}setupOnce(t,n){}processEvent(t){if(t.type)return t;try{if($U(t,this._previousEvent))return null}catch{}return this._previousEvent=t}}Hh.__initStatic();function $U(e,t){return t?!!(IU(e,t)||LU(e,t)):!1}function IU(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!aT(e,t)||!oT(e,t))}function LU(e,t){const n=b_(t),r=b_(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!aT(e,t)||!oT(e,t))}function oT(e,t){let n=w_(e),r=w_(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s"u")return;const e=We();e.captureSession&&(__(e),sn("history",({from:t,to:n})=>{t===void 0||t===n||__(We())}))}const je=pt;function UU(){je&&je.document&&je.document.addEventListener("visibilitychange",()=>{const e=ac();if(je.document.hidden&&e){const t="cancelled";e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}})}const _1=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}},zU=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,VU=()=>{const e=je.performance.timing,t=je.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},lT=()=>je.__WEB_VITALS_POLYFILL__?je.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||VU()):je.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],uT=()=>{const e=lT();return e&&e.activationStart||0},S1=(e,t)=>{const n=lT();let r="navigate";return n&&(je.document.prerendering||uT()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:zU(),navigationType:r}},qh=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Wh=(e,t)=>{const n=r=>{(r.type==="pagehide"||je.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},BU=e=>{const t=S1("CLS",0);let n,r=0,s=[];const i=a=>{a.forEach(l=>{if(!l.hadRecentInput){const c=s[0],f=s[s.length-1];r&&s.length!==0&&l.startTime-f.startTime<1e3&&l.startTime-c.startTime<5e3?(r+=l.value,s.push(l)):(r=l.value,s=[l]),r>t.value&&(t.value=r,t.entries=s,n&&n())}})},o=qh("layout-shift",i);if(o){n=_1(e,t);const a=()=>{i(o.takeRecords()),n(!0)};return Wh(a),a}};let _f=-1;const HU=()=>je.document.visibilityState==="hidden"&&!je.document.prerendering?0:1/0,qU=()=>{Wh(({timeStamp:e})=>{_f=e},!0)},E1=()=>(_f<0&&(_f=HU(),qU()),{get firstHiddenTime(){return _f}}),WU=e=>{const t=E1(),n=S1("FID");let r;const s=a=>{a.startTime{a.forEach(s)},o=qh("first-input",i);r=_1(e,n),o&&Wh(()=>{i(o.takeRecords()),o.disconnect()},!0)},S_={},KU=e=>{const t=E1(),n=S1("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const l=Math.max(a.startTime-uT(),0);l{S_[n.id]||(s(i.takeRecords()),i.disconnect(),S_[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{addEventListener(a,o,{once:!0,capture:!0})}),Wh(o,!0),o}},$l={},Pd={};let cT,fT,dT;function GU(e){return j1("cls",e,XU,cT)}function YU(e){return j1("lcp",e,ZU,dT)}function QU(e){return j1("fid",e,JU,fT)}function C1(e,t){return hT(e,t),Pd[e]||(ez(e),Pd[e]=!0),pT(e,t)}function Kh(e,t){const n=$l[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch{}}function XU(){BU(e=>{Kh("cls",{metric:e}),cT=e})}function JU(){WU(e=>{Kh("fid",{metric:e}),fT=e})}function ZU(){KU(e=>{Kh("lcp",{metric:e}),dT=e})}function j1(e,t,n,r){return hT(e,t),Pd[e]||(n(),Pd[e]=!0),r&&t({metric:r}),pT(e,t)}function ez(e){const t={};e==="event"&&(t.durationThreshold=0),qh(e,n=>{Kh(e,{entries:n})},t)}function hT(e,t){$l[e]=$l[e]||[],$l[e].push(t)}function pT(e,t){return()=>{const n=$l[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}function dm(e){return typeof e=="number"&&isFinite(e)}function ba(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function st(e){return e/1e3}function mT(){return je&&je.addEventListener&&je.performance}let E_=0,Ve={},rr,Il;function tz(){const e=mT();if(e&&vr){e.mark&&je.performance.mark("sentry-tracing-init");const t=oz(),n=sz(),r=iz();return()=>{t(),n(),r()}}return()=>{}}function nz(){C1("longtask",({entries:e})=>{for(const t of e){const n=ac();if(!n)return;const r=st(vr+t.startTime),s=st(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function rz(){C1("event",({entries:e})=>{for(const t of e){const n=ac();if(!n)return;if(t.name==="click"){const r=st(vr+t.startTime),s=st(t.duration);n.startChild({description:ya(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}}})}function sz(){return GU(({metric:e})=>{const t=e.entries.pop();t&&(Ve.cls={value:e.value,unit:""},Il=t)})}function iz(){return YU(({metric:e})=>{const t=e.entries.pop();t&&(Ve.lcp={value:e.value,unit:"millisecond"},rr=t)})}function oz(){return QU(({metric:e})=>{const t=e.entries.pop();if(!t)return;const n=st(vr),r=st(t.startTime);Ve.fid={value:e.value,unit:"millisecond"},Ve["mark.fid"]={value:n+r,unit:"second"}})}function az(e){const t=mT();if(!t||!je.performance.getEntries||!vr)return;const n=st(vr),r=t.getEntries();let s,i;if(r.slice(E_).forEach(o=>{const a=st(o.startTime),l=st(o.duration);if(!(e.op==="navigation"&&n+a{if(!Ve[a]||n>=e.startTimestamp)return;const l=Ve[a].value,c=n+st(l),f=Math.abs((c-e.startTimestamp)*1e3);Ve[a].value=f});const o=Ve["mark.fid"];o&&Ve.fid&&(ba(e,{description:"first input delay",endTimestamp:o.value+st(Ve.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:o.value}),delete Ve["mark.fid"]),"fcp"in Ve||delete Ve.cls,Object.keys(Ve).forEach(a=>{e.setMeasurement(a,Ve[a].value,Ve[a].unit)}),hz(e)}rr=void 0,Il=void 0,Ve={}}function lz(e,t,n,r,s){const i=s+n,o=i+r;return ba(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function uz(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{qc(e,t,r,n)}),qc(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),qc(e,t,"fetch",n,"cache","domainLookupStart"),qc(e,t,"domainLookup",n,"DNS"),cz(e,t,n)}function qc(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||ba(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+st(a),endTimestamp:r+st(o)})}function cz(e,t,n){ba(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+st(t.requestStart),endTimestamp:n+st(t.responseEnd)}),ba(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+st(t.responseStart),endTimestamp:n+st(t.responseEnd)})}function fz(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o={};"transferSize"in t&&(o["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(o["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(o["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus);const a=i+r,l=a+s;ba(e,{description:n,endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:a,data:o})}function dz(e){const t=je.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),dm(n.rtt)&&(Ve["connection.rtt"]={value:n.rtt,unit:"millisecond"})),dm(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),dm(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function hz(e){rr&&(rr.element&&e.setTag("lcp.element",ya(rr.element)),rr.id&&e.setTag("lcp.id",rr.id),rr.url&&e.setTag("lcp.url",rr.url.trim().slice(0,200)),e.setTag("lcp.size",rr.size)),Il&&Il.sources&&Il.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,ya(t.node)))}const Dy=["localhost",/^\/(?!\/)/],My={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Dy,tracePropagationTargets:Dy};function pz(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:My.traceFetch,traceXHR:My.traceXHR,...e},a=typeof i=="function"?i:f=>!0,l=f=>vz(f,r||s),c={};t&&sn("fetch",f=>{const d=xz(f,a,l,c);o&&d&&C_(d)}),n&&sn("xhr",f=>{const d=wz(f,a,l,c);o&&d&&C_(d)})}function mz(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function C_(e){const t=e.data.url;if(!t)return;const n=C1("resource",({entries:r})=>{r.forEach(s=>{mz(s)&&s.name.endsWith(t)&&(yz(s).forEach(o=>e.setData(...o)),setTimeout(n))})})}function gz(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function tr(e=0){return((vr||performance.timeOrigin)+e)/1e3}function yz(e){const{name:t,version:n}=gz(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),vr?[...r,["http.request.redirect_start",tr(e.redirectStart)],["http.request.fetch_start",tr(e.fetchStart)],["http.request.domain_lookup_start",tr(e.domainLookupStart)],["http.request.domain_lookup_end",tr(e.domainLookupEnd)],["http.request.connect_start",tr(e.connectStart)],["http.request.secure_connection_start",tr(e.secureConnectionStart)],["http.request.connection_end",tr(e.connectEnd)],["http.request.request_start",tr(e.requestStart)],["http.request.response_start",tr(e.responseStart)],["http.request.response_end",tr(e.responseEnd)]]:r}function vz(e,t){return rc(e,t||Dy)}function xz(e,t,n,r){if(!v1()||!e.fetchData)return;const s=t(e.fetchData.url);if(e.endTimestamp&&s){const h=e.fetchData.__span;if(!h)return;const p=r[h];if(p){if(e.response){p.setHttpStatus(e.response.status);const g=e.response&&e.response.headers&&e.response.headers.get("content-length"),b=parseInt(g);b>0&&p.setData("http.response_content_length",b)}else e.error&&p.setStatus("internal_error");p.finish(),delete r[h]}return}const i=We(),o=i.getScope(),a=i.getClient(),l=o.getSpan(),{method:c,url:f}=e.fetchData,d=s&&l?l.startChild({data:{url:f,type:"fetch","http.method":c},description:`${c} ${f}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(d&&(e.fetchData.__span=d.spanId,r[d.spanId]=d),n(e.fetchData.url)&&a){const h=e.args[0];e.args[1]=e.args[1]||{};const p=e.args[1];p.headers=bz(h,a,o,p,d)}return d}function bz(e,t,n,r,s){const i=s||n.getSpan(),o=i&&i.transaction,{traceId:a,sampled:l,dsc:c}=n.getPropagationContext(),f=i?i.toTraceparent():p1(a,void 0,l),d=o?o.getDynamicSamplingContext():c||Lh(a,t,n),h=Ny(d),p=typeof Request<"u"&&Gr(e,Request)?e.headers:r.headers;if(p)if(typeof Headers<"u"&&Gr(p,Headers)){const g=new Headers(p);return g.append("sentry-trace",f),h&&g.append(Ry,h),g}else if(Array.isArray(p)){const g=[...p,["sentry-trace",f]];return h&&g.push([Ry,h]),g}else{const g="baggage"in p?p.baggage:void 0,b=[];return Array.isArray(g)?b.push(...g):g&&b.push(g),h&&b.push(h),{...p,"sentry-trace":f,baggage:b.length>0?b.join(","):void 0}}else return{"sentry-trace":f,baggage:h}}function wz(e,t,n,r){const s=e.xhr,i=s&&s[mo];if(!v1()||s&&s.__sentry_own_request__||!s||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const d=s.__sentry_xhr_span_id__;if(!d)return;const h=r[d];h&&(h.setHttpStatus(i.status_code),h.finish(),delete r[d]);return}const a=We(),l=a.getScope(),c=l.getSpan(),f=o&&c?c.startChild({data:{...i.data,type:"xhr","http.method":i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(f&&(s.__sentry_xhr_span_id__=f.spanId,r[s.__sentry_xhr_span_id__]=f),s.setRequestHeader&&n(i.url))if(f){const d=f&&f.transaction,h=d&&d.getDynamicSamplingContext(),p=Ny(h);j_(s,f.toTraceparent(),p)}else{const d=a.getClient(),{traceId:h,sampled:p,dsc:g}=l.getPropagationContext(),b=p1(h,void 0,p),w=g||(d?Lh(h,d,l):void 0),v=Ny(w);j_(s,b,v)}return f}function j_(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Ry,n)}catch{}}function _z(e,t=!0,n=!0){if(!je||!je.location)return;let r=je.location.href,s;t&&(s=e({name:je.location.pathname,startTimestamp:vr?vr/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&sn("history",({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&s.finish(),s=e({name:je.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const Sz="BrowserTracing",Ez={...wf,markBackgroundTransactions:!0,routingInstrumentation:_z,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...My};class Cz{constructor(t){this.name=Sz,this._hasSetTracePropagationTargets=!1,t9(),this.options={...Ez,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=tz(),this.options.enableLongTask&&nz(),this.options._experiments.enableInteractions&&rz()}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:l,markBackgroundTransactions:c,traceFetch:f,traceXHR:d,shouldCreateSpanForRequest:h,enableHTTPTimings:p,_experiments:g}=this.options,w=i&&i.tracePropagationTargets||this.options.tracePropagationTargets;o(v=>{const m=this._createRouteTransaction(v);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(m,v,n),m},l,a),c&&UU(),g.enableInteractions&&this._registerInteractionListener(),pz({traceFetch:f,traceXHR:d,tracePropagationTargets:w,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub)return;const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload",l=a?k_("sentry-trace"):"",c=a?k_("baggage"):"",{traceparentData:f,dynamicSamplingContext:d,propagationContext:h}=j7(l,c),p={...t,...f,metadata:{...t.metadata,dynamicSamplingContext:f&&!d?{}:d},trimEnd:!0},g=typeof r=="function"?r(p):p,b=g===void 0?{...p,sampled:!1}:g;b.metadata=b.name!==p.name?{...b.metadata,source:"custom"}:b.metadata,this._latestRouteName=b.name,this._latestRouteSource=b.metadata&&b.metadata.source,b.sampled;const{location:w}=je,v=h_(n,b,s,i,!0,{location:w},o),m=n.getScope();return a&&f?m.setPropagationContext(h):m.setPropagationContext({traceId:v.traceId,spanId:v.spanId,parentSpanId:v.parentSpanId,sampled:v.sampled}),v.registerBeforeFinishCallback(x=>{this._collectWebVitals(),az(x)}),v}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=ac();if(a&&a.op&&["navigation","pageload"].includes(a.op)||(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)||!this._latestRouteName)return;const l=this._getCurrentHub(),{location:c}=je,f={name:this._latestRouteName,op:o,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};t=h_(l,f,r,s,!0,{location:c},i)};["click"].forEach(r=>{addEventListener(r,n,{once:!1,capture:!0})})}}function k_(e){const t=$F(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function jz(e){const t={_metadata:{},...e};t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Td}],version:Td},MU(t)}const kz=["Failed to fetch dynamically imported module","Failed to execute 'removeChild' on 'Node'","Failed to execute 'insertBefore' on 'Node'","ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications","Importing a module script failed.","chrome-extension://"];function k1(){var e;return{isAppearanceEditorActive:(e=window.frameElement||void 0)==null?void 0:e.src.includes("appearanceEditor=true")}}function sQ(e,t=null){const[n,r]=y.useState(()=>T1(e,t)),s=i=>{const o=i instanceof Function?i(n):i;r(o),P1(e,o)};return y.useEffect(()=>{const i=o=>{var a;((a=o.detail)==null?void 0:a.key)===e&&r(o.detail.newValue)};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[e]),[n,s]}function T1(e,t=null){if(typeof window>"u")return t;try{const n=window.localStorage.getItem(e);return n!=null?JSON.parse(n):t}catch{return t}}function P1(e,t){try{typeof window<"u"&&(window.localStorage.setItem(e,JSON.stringify(t)),window.dispatchEvent(new CustomEvent("storage",{detail:{key:e,newValue:t}})))}catch{}}function hm(e){try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}}function yt(){var f;const{data:{user:e,guest_role:t}}=zt(),{auth:{redirectUri:n="/"}}=y.useContext(Xr),r=y.useCallback(d=>{const h=(e==null?void 0:e.permissions)||(t==null?void 0:t.permissions);if(h)return h.find(p=>p.name===d)},[e==null?void 0:e.permissions,t==null?void 0:t.permissions]),s=y.useCallback((d,h)=>{const p=r(d);let g=null;if(p){const b=p.restrictions.find(w=>w.name===h);g=b?b.value:void 0}return g},[r]),i=y.useCallback(d=>{const h=(e==null?void 0:e.permissions)||(t==null?void 0:t.permissions);return(h==null?void 0:h.find(g=>g.name==="admin"))!=null||r(d)!=null},[e==null?void 0:e.permissions,t==null?void 0:t.permissions,r]),o=y.useCallback((d,h,p)=>{const g=!i(d),b=s(d,h),w=b!=null&&p>=b;return{overQuota:b!=null&&p>=b,noPermission:g,overQuotaOrNoPermission:w||g}},[s,i]),a=((f=e==null?void 0:e.subscriptions)==null?void 0:f.find(d=>d.valid))!=null,l=y.useCallback(()=>{const d=T1("be.onboarding.selected");return d?`/checkout/${d.productId}/${d.priceId}`:n},[n]),c=y.useCallback(d=>{var h;return((h=e==null?void 0:e.roles)==null?void 0:h.find(p=>p.id===d))!=null},[e]);return{user:e,hasPermission:i,getPermission:r,getRestrictionValue:s,checkOverQuotaOrNoPermission:o,isLoggedIn:!!e,isSubscribed:a,hasRole:c,getRedirectUri:l}}function T_({value:e}){return e?typeof e=="string"?u.jsx(y.Fragment,{children:e}):u.jsx(P,{...e}):null}const gT=oe(u.jsx("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),Tz=oe(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");function yT(e,t,n){return Math.min(Math.max(e,t),n)}let pm=new Map,Fy=!1;try{Fy=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Rd=!1;try{Rd=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const vT={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Pz{format(t){let n="";if(!Fy&&this.options.signDisplay!=null?n=Nz(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Rd){var r;let{unit:s,unitDisplay:i="short",locale:o}=this.resolvedOptions(),a=(r=vT[s])===null||r===void 0?void 0:r[i];n+=a[o]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Fy&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Rd&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=Rz(t,n),this.options=n}}function Rz(e,t={}){let{numberingSystem:n}=t;if(n&&e.indexOf("-u-nu-")===-1&&(e=`${e}-u-nu-${n}`),t.style==="unit"&&!Rd){var r;let{unit:o,unitDisplay:a="short"}=t;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=vT[o])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${o} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let s=e+(t?Object.entries(t).sort((o,a)=>o[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let s=e.format(-n),i=e.format(n),o=s.replace(i,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),s.replace(i,"!!!").replace(o,"+").replace("!!!",i)}else return e.format(n)}}const Oz=new RegExp("^.*\\(.*\\).*$"),Az=["latn","arab","hanidec"];class iQ{parse(t){return mm(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return mm(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return mm(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const P_=new Map;function mm(e,t,n){let r=R_(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let s of Az)if(s!==r.options.numberingSystem){let i=R_(e+(e.includes("-u-")?"-nu-":"-u-nu-")+s,t);if(i.isValidPartialNumber(n))return i}}return r}function R_(e,t){let n=e+(t?Object.entries(t).sort((s,i)=>s[0]0&&(t=t.slice(this.symbols.plusSign.length)),t.startsWith(this.symbols.group)?!1:(t=Wc(t,this.symbols.group,"").replace(this.symbols.numeral,"").replace(this.symbols.decimal,""),t.length===0)}constructor(t,n={}){this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=Lz(this.formatter,this.options,n)}}const N_=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Iz=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Lz(e,t,n){var r,s,i,o;let a=e.formatToParts(-10000.111),l=e.formatToParts(10000.111),c=Iz.map(k=>e.formatToParts(k));var f;let d=(f=(r=a.find(k=>k.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&f!==void 0?f:"-",h=(s=l.find(k=>k.type==="plusSign"))===null||s===void 0?void 0:s.value;!h&&((n==null?void 0:n.signDisplay)==="exceptZero"||(n==null?void 0:n.signDisplay)==="always")&&(h="+");let p=(i=a.find(k=>k.type==="decimal"))===null||i===void 0?void 0:i.value,g=(o=a.find(k=>k.type==="group"))===null||o===void 0?void 0:o.value,b=a.filter(k=>!N_.has(k.type)).map(k=>O_(k.value)),w=c.flatMap(k=>k.filter(N=>!N_.has(N.type)).map(N=>O_(N.value))),v=[...new Set([...b,...w])].sort((k,N)=>N.length-k.length),m=v.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${v.join("|")}|[\\p{White_Space}]`,"gu"),x=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(x.map((k,N)=>[k,N])),S=new RegExp(`[${x.join("")}]`,"g");return{minusSign:d,plusSign:h,decimal:p,group:g,literals:m,numeral:S,index:k=>String(_.get(k))}}function Wc(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function O_(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function R1(e={}){const{localeCode:t}=zi();return y.useMemo(()=>new Pz(t,e),[t,e])}const Qs=G.forwardRef((e,t)=>{let{value:n=0,minValue:r=0,maxValue:s=100,size:i="md",isIndeterminate:o=!1,className:a,position:l="relative",trackColor:c,fillColor:f="border-primary",...d}=e;n=yT(n,r,s);const h=Dz(i),p=(n-r)/(s-r),g=R1({style:"percent"});let b="";!o&&!b&&(b=g.format(p));const w={},v={};if(!o){const m=(n-r)/(s-r)*100;let x;m>0&&m<=50?(x=-180+m/50*180,w.transform=`rotate(${x}deg)`,v.transform="rotate(-180deg)"):m>50&&(x=-180+(m-50)/50*180,w.transform="rotate(0deg)",v.transform=`rotate(${x}deg)`)}return u.jsxs("div",{...d,"aria-valuenow":o?void 0:n,"aria-valuemin":r,"aria-valuemax":s,"aria-valuetext":o?void 0:b,role:"progressbar",ref:t,className:V("progress-circle",l,h,o&&"indeterminate",a),children:[u.jsx("div",{className:V(h,c,"rounded-full border-4")}),u.jsxs("div",{className:V("fills absolute left-0 top-0 h-full w-full",o&&"progress-circle-fills-animate"),children:[u.jsx(A_,{circleSize:h,subMaskStyle:w,isIndeterminate:o,className:"rotate-180",fillColor:f,subMaskClassName:V(o&&"progress-circle-fill-submask-1-animate")}),u.jsx(A_,{circleSize:h,subMaskStyle:v,isIndeterminate:o,fillColor:f,subMaskClassName:V(o&&"progress-circle-fill-submask-2-animate")})]})]})});function A_({subMaskStyle:e,subMaskClassName:t,className:n,circleSize:r,isIndeterminate:s,fillColor:i}){return u.jsx("div",{className:V("absolute h-full w-1/2 origin-[100%] overflow-hidden",n),children:u.jsx("div",{className:V("h-full w-full origin-[100%] rotate-180 overflow-hidden",!s&&"transition-transform duration-100",t),style:e,children:u.jsx("div",{className:V(r,i,"rounded-full border-4")})})})}function Dz(e){switch(e){case"xs":return"w-20 h-20";case"sm":return"w-24 h-24";case"md":return"w-32 h-32";case"lg":return"w-42 h-42";default:return e}}const Mz={opacity:0,y:50,scale:.3},Fz={opacity:1,y:0,scale:1},Uz={opacity:0,scale:.5};function $_(){const e=Fk(t=>t.toasts);return u.jsx("div",{className:"relative pointer-events-none",children:u.jsx(Aa,{initial:!1,children:e.map(t=>u.jsx("div",{className:V("fixed mx-auto p-20 z-toast",t.position==="bottom-center"?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:u.jsxs(Qr.div,{initial:t.disableEnterAnimation?void 0:Mz,animate:t.disableEnterAnimation?void 0:Fz,exit:t.disableExitAnimation?void 0:Uz,className:V("flex items-center gap-10 min-w-288 max-w-500 shadow-lg w-min rounded-lg pl-16 pr-6 py-6 text-sm pointer-events-auto max-h-100 bg-paper text-main bg-paper border mx-auto min-h-50"),onPointerEnter:()=>{var n;return(n=t.timer)==null?void 0:n.pause()},onPointerLeave:()=>{var n;return(n=t.timer)==null?void 0:n.resume()},role:"alert","aria-live":t.type==="danger"?"assertive":"polite",children:[t.type==="danger"&&u.jsx(gT,{className:"text-danger flex-shrink-0",size:"md"}),t.type==="loading"&&u.jsx(Qs,{size:"sm",className:"flex-shrink-0",isIndeterminate:!0}),t.type==="positive"&&u.jsx(Tz,{className:"text-positive flex-shrink-0",size:"md"}),u.jsx("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto","data-testid":"toast-message",children:u.jsx(T_,{value:t.message})}),t.action&&u.jsx(se,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var n;return(n=t.timer)==null?void 0:n.pause()},onBlur:()=>{var n;return(n=t.timer)==null?void 0:n.resume()},onClick:()=>da().remove(t.id),elementType:Xe,to:t.action.action,children:u.jsx(T_,{value:t.action.label})}),t.type!=="loading"&&u.jsx(Yn,{onFocus:()=>{var n;return(n=t.timer)==null?void 0:n.pause()},onBlur:()=>{var n;return(n=t.timer)==null?void 0:n.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{da().remove(t.id)},size:"sm",children:u.jsx(Bk,{})})]})},t.id))})})}const zz=(e,t)=>{const n=["users",`${e}`];return t&&n.push(t),n};function xT(e,t){return Xn({queryKey:zz(e,t),queryFn:()=>Vz(e,t)})}function Vz(e,t){return re.get(`users/${e}`,{params:t}).then(n=>n.data)}function Bz(){return we({mutationFn:e=>Hz(e),onSuccess:()=>{be(le("Email sent"))},onError:e=>gt(e)})}function Hz(e){return re.post("resend-email-verification",e).then(t=>t.data)}function Gh(){const{selectedTheme:e}=Nh();return e.is_dark??!1}const bT="Can't logout while in appearance editor.";function N1(){const e=Mn(),{isAppearanceEditorActive:t}=k1(),{setBootstrapData:n}=zt();return we({mutationFn:()=>t?Wz():qz(),onSuccess:r=>{n(r.bootstrapData),qe.clear(),e("/login"),qe.clear(),n(r.bootstrapData)},onError:r=>gt(r,t?le(bT):void 0)})}function qz(){return re.post("auth/logout").then(e=>e.data)}function Wz(){return Promise.reject(bT)}var lc=e=>e.type==="checkbox",go=e=>e instanceof Date,Dt=e=>e==null;const wT=e=>typeof e=="object";var at=e=>!Dt(e)&&!Array.isArray(e)&&wT(e)&&!go(e),_T=e=>at(e)&&e.target?lc(e.target)?e.target.checked:e.target.value:e,Kz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ST=(e,t)=>e.has(Kz(t)),Gz=e=>{const t=e.constructor&&e.constructor.prototype;return at(t)&&t.hasOwnProperty("isPrototypeOf")},O1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Tt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(O1&&(e instanceof Blob||e instanceof FileList))&&(n||at(e)))if(t=n?[]:{},!n&&!Gz(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Tt(e[r]));else return e;return t}var Ka=e=>Array.isArray(e)?e.filter(Boolean):[],Re=e=>e===void 0,X=(e,t,n)=>{if(!t||!at(e))return n;const r=Ka(t.split(/[,[\].]+?/)).reduce((s,i)=>Dt(s)?s:s[i],e);return Re(r)||r===e?Re(e[t])?n:e[t]:r},_s=e=>typeof e=="boolean";const Nd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},jn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},jr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ET=G.createContext(null),Yh=()=>G.useContext(ET),Yz=e=>{const{children:t,...n}=e;return G.createElement(ET.Provider,{value:n},t)};var CT=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==jn.all&&(t._proxyFormState[o]=!r||jn.all),n&&(n[o]=!0),e[o]}});return s},tn=e=>at(e)&&!Object.keys(e).length,jT=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return tn(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||jn.all))},an=e=>Array.isArray(e)?e:[e],kT=(e,t,n)=>!e||!t||e===t||an(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Qh(e){const t=G.useRef(e);t.current=e,G.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Qz(e){const t=Yh(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=G.useState(n._formState),l=G.useRef(!0),c=G.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=G.useRef(s);return f.current=s,Qh({disabled:r,next:d=>l.current&&kT(f.current,d.name,i)&&jT(d,c.current,n._updateFormState)&&a({...n._formState,...d}),subject:n._subjects.state}),G.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),CT(o,n,c.current,!1)}var hr=e=>typeof e=="string",TT=(e,t,n,r,s)=>hr(e)?(r&&t.watch.add(e),X(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),X(n,i))):(r&&(t.watchAll=!0),n);function Xz(e){const t=Yh(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=G.useRef(r);a.current=r,Qh({disabled:i,subject:n._subjects.values,next:f=>{kT(a.current,f.name,o)&&c(Tt(TT(a.current,n._names,f.values||n._formValues,!1,s)))}});const[l,c]=G.useState(n._getWatch(r,s));return G.useEffect(()=>n._removeUnmounted()),l}var A1=e=>/^\w*$/.test(e),PT=e=>Ka(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ee(e,t,n){let r=-1;const s=A1(t)?[t]:PT(t),i=s.length,o=i-1;for(;++r{const f=s._options.shouldUnregister||i,d=(h,p)=>{const g=X(s._fields,h);g&&(g._f.mount=p)};if(d(n,!0),f){const h=Tt(X(s._options.defaultValues,n));Ee(s._defaultValues,n,h),Re(X(s._formValues,n))&&Ee(s._formValues,n,h)}return()=>{(o?f&&!s._state.action:f)?s.unregister(n):d(n,!1)}},[n,s,o,i]),G.useEffect(()=>{X(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n})},[r,n,s]),{field:{name:n,value:a,..._s(r)?{disabled:r}:{},onChange:G.useCallback(f=>c.current.onChange({target:{value:_T(f),name:n},type:Nd.CHANGE}),[n]),onBlur:G.useCallback(()=>c.current.onBlur({target:{value:X(s._formValues,n),name:n},type:Nd.BLUR}),[n,s]),ref:f=>{const d=X(s._fields,n);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!X(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!X(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!X(l.touchedFields,n)},error:{enumerable:!0,get:()=>X(l.errors,n)}})}}var Jz=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{};const Od=(e,t,n)=>{for(const r of n||Object.keys(e)){const s=X(e,r);if(s){const{_f:i,...o}=s;if(i&&t(i.name)){if(i.ref.focus){i.ref.focus();break}else if(i.refs&&i.refs[0].focus){i.refs[0].focus();break}}else at(o)&&Od(o,t)}}};var rs=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},gm=(e,t,n={})=>n.shouldFocus||Re(n.shouldFocus)?n.focusName||`${e}.${Re(n.focusIndex)?t:n.focusIndex}.`:"",Uy=e=>({isOnSubmit:!e||e===jn.onSubmit,isOnBlur:e===jn.onBlur,isOnChange:e===jn.onChange,isOnAll:e===jn.all,isOnTouch:e===jn.onTouched}),zy=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),RT=(e,t,n)=>{const r=Ka(X(e,n));return Ee(r,"root",t[n]),Ee(e,n,r),e},$1=e=>e.type==="file",Ss=e=>typeof e=="function",Ad=e=>{if(!O1)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Sf=e=>hr(e),I1=e=>e.type==="radio",$d=e=>e instanceof RegExp;const I_={value:!1,isValid:!1},L_={value:!0,isValid:!0};var NT=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Re(e[0].attributes.value)?Re(e[0].value)||e[0].value===""?L_:{value:e[0].value,isValid:!0}:L_:I_}return I_};const D_={isValid:!1,value:null};var OT=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,D_):D_;function M_(e,t,n="validate"){if(Sf(e)||Array.isArray(e)&&e.every(Sf)||_s(e)&&!e)return{type:n,message:Sf(e)?e:"",ref:t}}var Qi=e=>at(e)&&!$d(e)?e:{value:e,message:""},Vy=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:c,min:f,max:d,pattern:h,validate:p,name:g,valueAsNumber:b,mount:w,disabled:v}=e._f,m=X(t,g);if(!w||v)return{};const x=o?o[0]:i,_=T=>{r&&x.reportValidity&&(x.setCustomValidity(_s(T)?"":T||""),x.reportValidity())},S={},j=I1(i),k=lc(i),N=j||k,D=(b||$1(i))&&Re(i.value)&&Re(m)||Ad(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,F=Jz.bind(null,g,n,S),B=(T,E,C,A=jr.maxLength,$=jr.minLength)=>{const L=T?E:C;S[g]={type:T?A:$,message:L,ref:i,...F(T?A:$,L)}};if(s?!Array.isArray(m)||!m.length:a&&(!N&&(D||Dt(m))||_s(m)&&!m||k&&!NT(o).isValid||j&&!OT(o).isValid)){const{value:T,message:E}=Sf(a)?{value:!!a,message:a}:Qi(a);if(T&&(S[g]={type:jr.required,message:E,ref:x,...F(jr.required,E)},!n))return _(E),S}if(!D&&(!Dt(f)||!Dt(d))){let T,E;const C=Qi(d),A=Qi(f);if(!Dt(m)&&!isNaN(m)){const $=i.valueAsNumber||m&&+m;Dt(C.value)||(T=$>C.value),Dt(A.value)||(E=$new Date(new Date().toDateString()+" "+H),I=i.type=="time",q=i.type=="week";hr(C.value)&&m&&(T=I?L(m)>L(C.value):q?m>C.value:$>new Date(C.value)),hr(A.value)&&m&&(E=I?L(m)+T.value,A=!Dt(E.value)&&m.length<+E.value;if((C||A)&&(B(C,T.message,E.message),!n))return _(S[g].message),S}if(h&&!D&&hr(m)){const{value:T,message:E}=Qi(h);if($d(T)&&!m.match(T)&&(S[g]={type:jr.pattern,message:E,ref:i,...F(jr.pattern,E)},!n))return _(E),S}if(p){if(Ss(p)){const T=await p(m,t),E=M_(T,x);if(E&&(S[g]={...E,...F(jr.validate,E.message)},!n))return _(E.message),S}else if(at(p)){let T={};for(const E in p){if(!tn(T)&&!n)break;const C=M_(await p[E](m,t),x,E);C&&(T={...C,...F(E,C.message)},_(C.message),n&&(S[g]=T))}if(!tn(T)&&(S[g]={ref:x,...T},!n))return S}}return _(!0),S};function ym(e,t){return[...e,...an(t)]}var vm=e=>Array.isArray(e)?e.map(()=>{}):void 0;function xm(e,t,n){return[...e.slice(0,t),...an(n),...e.slice(t)]}var bm=(e,t,n)=>Array.isArray(e)?(Re(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function wm(e,t){return[...an(t),...an(e)]}function Zz(e,t){let n=0;const r=[...e];for(const s of t)r.splice(s-n,1),n++;return Ka(r).length?r:[]}var _m=(e,t)=>Re(t)?[]:Zz(e,an(t).sort((n,r)=>n-r)),Sm=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]};function eV(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function oQ(e){const t=Yh(),{control:n=t.control,name:r,keyName:s="id",shouldUnregister:i}=e,[o,a]=G.useState(n._getFieldArray(r)),l=G.useRef(n._getFieldArray(r).map(rs)),c=G.useRef(o),f=G.useRef(r),d=G.useRef(!1);f.current=r,c.current=o,n._names.array.add(r),e.rules&&n.register(r,e.rules),Qh({next:({values:S,name:j})=>{if(j===f.current||!j){const k=X(S,f.current);Array.isArray(k)&&(a(k),l.current=k.map(rs))}},subject:n._subjects.array});const h=G.useCallback(S=>{d.current=!0,n._updateFieldArray(r,S)},[n,r]),p=(S,j)=>{const k=an(Tt(S)),N=ym(n._getFieldArray(r),k);n._names.focus=gm(r,N.length-1,j),l.current=ym(l.current,k.map(rs)),h(N),a(N),n._updateFieldArray(r,N,ym,{argA:vm(S)})},g=(S,j)=>{const k=an(Tt(S)),N=wm(n._getFieldArray(r),k);n._names.focus=gm(r,0,j),l.current=wm(l.current,k.map(rs)),h(N),a(N),n._updateFieldArray(r,N,wm,{argA:vm(S)})},b=S=>{const j=_m(n._getFieldArray(r),S);l.current=_m(l.current,S),h(j),a(j),n._updateFieldArray(r,j,_m,{argA:S})},w=(S,j,k)=>{const N=an(Tt(j)),D=xm(n._getFieldArray(r),S,N);n._names.focus=gm(r,S,k),l.current=xm(l.current,S,N.map(rs)),h(D),a(D),n._updateFieldArray(r,D,xm,{argA:S,argB:vm(j)})},v=(S,j)=>{const k=n._getFieldArray(r);Sm(k,S,j),Sm(l.current,S,j),h(k),a(k),n._updateFieldArray(r,k,Sm,{argA:S,argB:j},!1)},m=(S,j)=>{const k=n._getFieldArray(r);bm(k,S,j),bm(l.current,S,j),h(k),a(k),n._updateFieldArray(r,k,bm,{argA:S,argB:j},!1)},x=(S,j)=>{const k=Tt(j),N=F_(n._getFieldArray(r),S,k);l.current=[...N].map((D,F)=>!D||F===S?rs():l.current[F]),h(N),a([...N]),n._updateFieldArray(r,N,F_,{argA:S,argB:k},!0,!1)},_=S=>{const j=an(Tt(S));l.current=j.map(rs),h([...j]),a([...j]),n._updateFieldArray(r,[...j],k=>k,{},!0,!1)};return G.useEffect(()=>{if(n._state.action=!1,zy(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Uy(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const j=X(S.errors,r),k=X(n._formState.errors,r);(k?!j&&k.type||j&&(k.type!==j.type||k.message!==j.message):j&&j.type)&&(j?Ee(n._formState.errors,r,j):ut(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=X(n._fields,r);S&&S._f&&Vy(S,n._formValues,n._options.criteriaMode===jn.all,n._options.shouldUseNativeValidation,!0).then(j=>!tn(j)&&n._subjects.state.next({errors:RT(n._formState.errors,j,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Od(n._fields,S=>!!S&&S.startsWith(n._names.focus||"")),n._names.focus="",n._updateValid(),d.current=!1},[o,r,n]),G.useEffect(()=>(!X(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,s,i]),{swap:G.useCallback(v,[h,r,n]),move:G.useCallback(m,[h,r,n]),prepend:G.useCallback(g,[h,r,n]),append:G.useCallback(p,[h,r,n]),remove:G.useCallback(b,[h,r,n]),insert:G.useCallback(w,[h,r,n]),update:G.useCallback(x,[h,r,n]),replace:G.useCallback(_,[h,r,n]),fields:G.useMemo(()=>o.map((S,j)=>({...S,[s]:l.current[j]||rs()})),[o,s])}}function Em(){let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}}var Id=e=>Dt(e)||!wT(e);function ui(e,t){if(Id(e)||Id(t))return e===t;if(go(e)&&go(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(go(i)&&go(o)||at(i)&&at(o)||Array.isArray(i)&&Array.isArray(o)?!ui(i,o):i!==o)return!1}}return!0}var AT=e=>e.type==="select-multiple",nV=e=>I1(e)||lc(e),Cm=e=>Ad(e)&&e.isConnected,$T=e=>{for(const t in e)if(Ss(e[t]))return!0;return!1};function Ld(e,t={}){const n=Array.isArray(e);if(at(e)||n)for(const r in e)Array.isArray(e[r])||at(e[r])&&!$T(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Ld(e[r],t[r])):Dt(e[r])||(t[r]=!0);return t}function IT(e,t,n){const r=Array.isArray(e);if(at(e)||r)for(const s in e)Array.isArray(e[s])||at(e[s])&&!$T(e[s])?Re(t)||Id(n[s])?n[s]=Array.isArray(e[s])?Ld(e[s],[]):{...Ld(e[s])}:IT(e[s],Dt(t)?{}:t[s],n[s]):n[s]=!ui(e[s],t[s]);return n}var jm=(e,t)=>IT(e,t,Ld(t)),LT=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Re(e)?e:t?e===""?NaN:e&&+e:n&&hr(e)?new Date(e):r?r(e):e;function km(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return $1(t)?t.files:I1(t)?OT(e.refs).value:AT(t)?[...t.selectedOptions].map(({value:n})=>n):lc(t)?NT(e.refs).value:LT(Re(t.value)?e.ref.value:t.value,e)}var rV=(e,t,n,r)=>{const s={};for(const i of e){const o=X(t,i);o&&Ee(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},cl=e=>Re(e)?e:$d(e)?e.source:at(e)?$d(e.value)?e.value.source:e.value:e,sV=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function U_(e,t,n){const r=X(e,n);if(r||A1(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=X(t,i),a=X(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var iV=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,oV=(e,t)=>!Ka(X(e,t)).length&&ut(e,t);const aV={mode:jn.onSubmit,reValidateMode:jn.onChange,shouldFocusError:!0};function lV(e={},t){let n={...aV,...e},r={submitCount:0,isDirty:!1,isLoading:Ss(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},s={},i=at(n.defaultValues)||at(n.values)?Tt(n.defaultValues||n.values)||{}:{},o=n.shouldUnregister?{}:Tt(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,f=0;const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:Em(),array:Em(),state:Em()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,g=Uy(n.mode),b=Uy(n.reValidateMode),w=n.criteriaMode===jn.all,v=O=>M=>{clearTimeout(f),f=setTimeout(O,M)},m=async O=>{if(d.isValid||O){const M=n.resolver?tn((await D()).errors):await B(s,!0);M!==r.isValid&&h.state.next({isValid:M})}},x=O=>d.isValidating&&h.state.next({isValidating:O}),_=(O,M=[],U,ne,J=!0,K=!0)=>{if(ne&&U){if(a.action=!0,K&&Array.isArray(X(s,O))){const ie=U(X(s,O),ne.argA,ne.argB);J&&Ee(s,O,ie)}if(K&&Array.isArray(X(r.errors,O))){const ie=U(X(r.errors,O),ne.argA,ne.argB);J&&Ee(r.errors,O,ie),oV(r.errors,O)}if(d.touchedFields&&K&&Array.isArray(X(r.touchedFields,O))){const ie=U(X(r.touchedFields,O),ne.argA,ne.argB);J&&Ee(r.touchedFields,O,ie)}d.dirtyFields&&(r.dirtyFields=jm(i,o)),h.state.next({name:O,isDirty:E(O,M),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ee(o,O,M)},S=(O,M)=>{Ee(r.errors,O,M),h.state.next({errors:r.errors})},j=(O,M,U,ne)=>{const J=X(s,O);if(J){const K=X(o,O,Re(U)?X(i,O):U);Re(K)||ne&&ne.defaultChecked||M?Ee(o,O,M?K:km(J._f)):$(O,K),a.mount&&m()}},k=(O,M,U,ne,J)=>{let K=!1,ie=!1;const ze={name:O};if(!U||ne){d.isDirty&&(ie=r.isDirty,r.isDirty=ze.isDirty=E(),K=ie!==ze.isDirty);const Ge=ui(X(i,O),M);ie=X(r.dirtyFields,O),Ge?ut(r.dirtyFields,O):Ee(r.dirtyFields,O,!0),ze.dirtyFields=r.dirtyFields,K=K||d.dirtyFields&&ie!==!Ge}if(U){const Ge=X(r.touchedFields,O);Ge||(Ee(r.touchedFields,O,U),ze.touchedFields=r.touchedFields,K=K||d.touchedFields&&Ge!==U)}return K&&J&&h.state.next(ze),K?ze:{}},N=(O,M,U,ne)=>{const J=X(r.errors,O),K=d.isValid&&_s(M)&&r.isValid!==M;if(e.delayError&&U?(c=v(()=>S(O,U)),c(e.delayError)):(clearTimeout(f),c=null,U?Ee(r.errors,O,U):ut(r.errors,O)),(U?!ui(J,U):J)||!tn(ne)||K){const ie={...ne,...K&&_s(M)?{isValid:M}:{},errors:r.errors,name:O};r={...r,...ie},h.state.next(ie)}x(!1)},D=async O=>n.resolver(o,n.context,rV(O||l.mount,s,n.criteriaMode,n.shouldUseNativeValidation)),F=async O=>{const{errors:M}=await D(O);if(O)for(const U of O){const ne=X(M,U);ne?Ee(r.errors,U,ne):ut(r.errors,U)}else r.errors=M;return M},B=async(O,M,U={valid:!0})=>{for(const ne in O){const J=O[ne];if(J){const{_f:K,...ie}=J;if(K){const ze=l.array.has(K.name),Ge=await Vy(J,o,w,n.shouldUseNativeValidation&&!M,ze);if(Ge[K.name]&&(U.valid=!1,M))break;!M&&(X(Ge,K.name)?ze?RT(r.errors,Ge,K.name):Ee(r.errors,K.name,Ge[K.name]):ut(r.errors,K.name))}ie&&await B(ie,M,U)}}return U.valid},T=()=>{for(const O of l.unMount){const M=X(s,O);M&&(M._f.refs?M._f.refs.every(U=>!Cm(U)):!Cm(M._f.ref))&&pe(O)}l.unMount=new Set},E=(O,M)=>(O&&M&&Ee(o,O,M),!ui(Y(),i)),C=(O,M,U)=>TT(O,l,{...a.mount?o:Re(M)?i:hr(O)?{[O]:M}:M},U,M),A=O=>Ka(X(a.mount?o:i,O,e.shouldUnregister?X(i,O,[]):[])),$=(O,M,U={})=>{const ne=X(s,O);let J=M;if(ne){const K=ne._f;K&&(!K.disabled&&Ee(o,O,LT(M,K)),J=Ad(K.ref)&&Dt(M)?"":M,AT(K.ref)?[...K.ref.options].forEach(ie=>ie.selected=J.includes(ie.value)):K.refs?lc(K.ref)?K.refs.length>1?K.refs.forEach(ie=>(!ie.defaultChecked||!ie.disabled)&&(ie.checked=Array.isArray(J)?!!J.find(ze=>ze===ie.value):J===ie.value)):K.refs[0]&&(K.refs[0].checked=!!J):K.refs.forEach(ie=>ie.checked=ie.value===J):$1(K.ref)?K.ref.value="":(K.ref.value=J,K.ref.type||h.values.next({name:O,values:{...o}})))}(U.shouldDirty||U.shouldTouch)&&k(O,J,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&H(O)},L=(O,M,U)=>{for(const ne in M){const J=M[ne],K=`${O}.${ne}`,ie=X(s,K);(l.array.has(O)||!Id(J)||ie&&!ie._f)&&!go(J)?L(K,J,U):$(K,J,U)}},I=(O,M,U={})=>{const ne=X(s,O),J=l.array.has(O),K=Tt(M);Ee(o,O,K),J?(h.array.next({name:O,values:{...o}}),(d.isDirty||d.dirtyFields)&&U.shouldDirty&&h.state.next({name:O,dirtyFields:jm(i,o),isDirty:E(O,K)})):ne&&!ne._f&&!Dt(K)?L(O,K,U):$(O,K,U),zy(O,l)&&h.state.next({...r}),h.values.next({name:O,values:{...o}}),!a.mount&&t()},q=async O=>{const M=O.target;let U=M.name,ne=!0;const J=X(s,U),K=()=>M.type?km(J._f):_T(O);if(J){let ie,ze;const Ge=K(),Wi=O.type===Nd.BLUR||O.type===Nd.FOCUS_OUT,o3=!sV(J._f)&&!n.resolver&&!X(r.errors,U)&&!J._f.deps||iV(Wi,X(r.touchedFields,U),r.isSubmitted,b,g),lp=zy(U,l,Wi);Ee(o,U,Ge),Wi?(J._f.onBlur&&J._f.onBlur(O),c&&c(0)):J._f.onChange&&J._f.onChange(O);const up=k(U,Ge,Wi,!1),a3=!tn(up)||lp;if(!Wi&&h.values.next({name:U,type:O.type,values:{...o}}),o3)return d.isValid&&m(),a3&&h.state.next({name:U,...lp?{}:up});if(!Wi&&lp&&h.state.next({...r}),x(!0),n.resolver){const{errors:ax}=await D([U]),l3=U_(r.errors,s,U),lx=U_(ax,s,l3.name||U);ie=lx.error,U=lx.name,ze=tn(ax)}else ie=(await Vy(J,o,w,n.shouldUseNativeValidation))[U],ne=Number.isNaN(Ge)||Ge===X(o,U,Ge),ne&&(ie?ze=!1:d.isValid&&(ze=await B(s,!0)));ne&&(J._f.deps&&H(J._f.deps),N(U,ze,ie,up))}},H=async(O,M={})=>{let U,ne;const J=an(O);if(x(!0),n.resolver){const K=await F(Re(O)?O:J);U=tn(K),ne=O?!J.some(ie=>X(K,ie)):U}else O?(ne=(await Promise.all(J.map(async K=>{const ie=X(s,K);return await B(ie&&ie._f?{[K]:ie}:ie)}))).every(Boolean),!(!ne&&!r.isValid)&&m()):ne=U=await B(s);return h.state.next({...!hr(O)||d.isValid&&U!==r.isValid?{}:{name:O},...n.resolver||!O?{isValid:U}:{},errors:r.errors,isValidating:!1}),M.shouldFocus&&!ne&&Od(s,K=>K&&X(r.errors,K),O?J:l.mount),ne},Y=O=>{const M={...i,...a.mount?o:{}};return Re(O)?M:hr(O)?X(M,O):O.map(U=>X(M,U))},te=(O,M)=>({invalid:!!X((M||r).errors,O),isDirty:!!X((M||r).dirtyFields,O),isTouched:!!X((M||r).touchedFields,O),error:X((M||r).errors,O)}),ce=O=>{O&&an(O).forEach(M=>ut(r.errors,M)),h.state.next({errors:O?r.errors:{}})},ve=(O,M,U)=>{const ne=(X(s,O,{_f:{}})._f||{}).ref;Ee(r.errors,O,{...M,ref:ne}),h.state.next({name:O,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&ne&&ne.focus&&ne.focus()},et=(O,M)=>Ss(O)?h.values.subscribe({next:U=>O(C(void 0,M),U)}):C(O,M,!0),pe=(O,M={})=>{for(const U of O?an(O):l.mount)l.mount.delete(U),l.array.delete(U),M.keepValue||(ut(s,U),ut(o,U)),!M.keepError&&ut(r.errors,U),!M.keepDirty&&ut(r.dirtyFields,U),!M.keepTouched&&ut(r.touchedFields,U),!n.shouldUnregister&&!M.keepDefaultValue&&ut(i,U);h.values.next({values:{...o}}),h.state.next({...r,...M.keepDirty?{isDirty:E()}:{}}),!M.keepIsValid&&m()},Oe=({disabled:O,name:M,field:U,fields:ne})=>{if(_s(O)){const J=O?void 0:X(o,M,km(U?U._f:X(ne,M)._f));Ee(o,M,J),k(M,J,!1,!1,!0)}},de=(O,M={})=>{let U=X(s,O);const ne=_s(M.disabled);return Ee(s,O,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:O}},name:O,mount:!0,...M}}),l.mount.add(O),U?Oe({field:U,disabled:M.disabled,name:O}):j(O,!0,M.value),{...ne?{disabled:M.disabled}:{},...n.progressive?{required:!!M.required,min:cl(M.min),max:cl(M.max),minLength:cl(M.minLength),maxLength:cl(M.maxLength),pattern:cl(M.pattern)}:{},name:O,onChange:q,onBlur:q,ref:J=>{if(J){de(O,M),U=X(s,O);const K=Re(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,ie=nV(K),ze=U._f.refs||[];if(ie?ze.find(Ge=>Ge===K):K===U._f.ref)return;Ee(s,O,{_f:{...U._f,...ie?{refs:[...ze.filter(Cm),K,...Array.isArray(X(i,O))?[{}]:[]],ref:{type:K.type,name:O}}:{ref:K}}}),j(O,!1,void 0,K)}else U=X(s,O,{}),U._f&&(U._f.mount=!1),(n.shouldUnregister||M.shouldUnregister)&&!(ST(l.array,O)&&a.action)&&l.unMount.add(O)}}},St=()=>n.shouldFocusError&&Od(s,O=>O&&X(r.errors,O),l.mount),Le=(O,M)=>async U=>{U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let ne=Tt(o);if(h.state.next({isSubmitting:!0}),n.resolver){const{errors:J,values:K}=await D();r.errors=J,ne=K}else await B(s);ut(r.errors,"root"),tn(r.errors)?(h.state.next({errors:{}}),await O(ne,U)):(M&&await M({...r.errors},U),St(),setTimeout(St)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tn(r.errors),submitCount:r.submitCount+1,errors:r.errors})},lt=(O,M={})=>{X(s,O)&&(Re(M.defaultValue)?I(O,X(i,O)):(I(O,M.defaultValue),Ee(i,O,M.defaultValue)),M.keepTouched||ut(r.touchedFields,O),M.keepDirty||(ut(r.dirtyFields,O),r.isDirty=M.defaultValue?E(O,X(i,O)):E()),M.keepError||(ut(r.errors,O),d.isValid&&m()),h.state.next({...r}))},Er=(O,M={})=>{const U=O?Tt(O):i,ne=Tt(U),J=O&&!tn(O)?ne:i;if(M.keepDefaultValues||(i=U),!M.keepValues){if(M.keepDirtyValues||p)for(const K of l.mount)X(r.dirtyFields,K)?Ee(J,K,X(o,K)):I(K,X(J,K));else{if(O1&&Re(O))for(const K of l.mount){const ie=X(s,K);if(ie&&ie._f){const ze=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Ad(ze)){const Ge=ze.closest("form");if(Ge){Ge.reset();break}}}}s={}}o=e.shouldUnregister?M.keepDefaultValues?Tt(i):{}:Tt(J),h.array.next({values:{...J}}),h.values.next({values:{...J}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!d.isValid||!!M.keepIsValid,a.watch=!!e.shouldUnregister,h.state.next({submitCount:M.keepSubmitCount?r.submitCount:0,isDirty:M.keepDirty?r.isDirty:!!(M.keepDefaultValues&&!ui(O,i)),isSubmitted:M.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:M.keepDirtyValues?r.dirtyFields:M.keepDefaultValues&&O?jm(i,O):{},touchedFields:M.keepTouched?r.touchedFields:{},errors:M.keepErrors?r.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},gn=(O,M)=>Er(Ss(O)?O(o):O,M);return{control:{register:de,unregister:pe,getFieldState:te,handleSubmit:Le,setError:ve,_executeSchema:D,_getWatch:C,_getDirty:E,_updateValid:m,_removeUnmounted:T,_updateFieldArray:_,_updateDisabledField:Oe,_getFieldArray:A,_reset:Er,_resetDefaultValues:()=>Ss(n.defaultValues)&&n.defaultValues().then(O=>{gn(O,n.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:O=>{r={...r,...O}},_subjects:h,_proxyFormState:d,get _fields(){return s},get _formValues(){return o},get _state(){return a},set _state(O){a=O},get _defaultValues(){return i},get _names(){return l},set _names(O){l=O},get _formState(){return r},set _formState(O){r=O},get _options(){return n},set _options(O){n={...n,...O}}},trigger:H,register:de,handleSubmit:Le,watch:et,setValue:I,getValues:Y,reset:gn,resetField:lt,clearErrors:ce,unregister:pe,setError:ve,setFocus:(O,M={})=>{const U=X(s,O),ne=U&&U._f;if(ne){const J=ne.refs?ne.refs[0]:ne.ref;J.focus&&(J.focus(),M.shouldSelect&&J.select())}},getFieldState:te}}function Xt(e={}){const t=G.useRef(),n=G.useRef(),[r,s]=G.useState({isDirty:!1,isValidating:!1,isLoading:Ss(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Ss(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...lV(e,()=>s(o=>({...o}))),formState:r});const i=t.current.control;return i._options=e,Qh({subject:i._subjects.state,next:o=>{jT(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),G.useEffect(()=>{e.values&&!ui(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values):i._resetDefaultValues()},[e.values,i]),G.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=CT(r,i),t.current}function Jt({children:e,onBeforeSubmit:t,onSubmit:n,form:r,className:s,id:i,onBlur:o}){return u.jsx(Yz,{...r,children:u.jsx("form",{id:i,onBlur:o,className:s,onSubmit:a=>{a.stopPropagation(),t==null||t(),r.handleSubmit(n)(a)},children:e})})}function Ya(e={}){const{size:t="md",startAppend:n,endAppend:r,className:s,labelPosition:i,labelDisplay:o="block",inputClassName:a,inputWrapperClassName:l,unstyled:c,invalid:f,disabled:d,background:h="bg-transparent",flexibleHeight:p,inputShadow:g="shadow-sm",descriptionPosition:b="bottom",inputRing:w,inputFontSize:v,labelSuffix:m}={...e};if(c)return{label:"",input:a||"",wrapper:s||"",inputWrapper:l||"",adornment:"",append:{size:"",radius:""},size:{font:"",height:""},description:"",error:""};const x=dV({size:e.size,flexibleHeight:p});v&&(x.font=v);const _=n||r,j=w||`focus:ring ${f?"focus:ring-danger/focus focus:border-danger/60":"focus:ring-primary/focus focus:border-primary/60"}`,k=fV(e);return{label:V(o,"first-letter:capitalize text-left whitespace-nowrap",d&&"text-disabled",x.font,m?"":i==="side"?"mr-16":"mb-4"),input:V("block text-left relative w-full appearance-none transition-shadow text",h,k.input,uV(e),!d&&`${j} focus:outline-none ${g}`,d&&"text-disabled cursor-not-allowed",a,x.font,x.height,cV(e)),adornment:hV(t),append:{size:N0(t),radius:k.append},wrapper:V(s,x.font,{"flex items-center":i==="side"}),inputWrapper:V("isolate relative",l,_&&"flex items-stretch"),size:x,description:`text-muted ${b==="bottom"?"pt-10":"pb-10"} text-xs`,error:"text-danger pt-10 text-xs"}}function uV({startAppend:e,endAppend:t,inputBorder:n,invalid:r}){if(n)return n;const s=e||t,i=r?"border-danger":"border-divider";return s?e?`${i} border-y border-r`:`${i} border-y border-l`:`${i} border`}function cV({startAdornment:e,endAdornment:t,inputRadius:n}){return n==="rounded-full"?V(e?"pl-54":"pl-28",t?"pr-54":"pr-28"):V(e?"pl-46":"pl-12",t?"pr-46":"pr-12")}function fV(e){const{startAppend:t,endAppend:n,inputRadius:r}=e,s=t||n;return r==="rounded-full"?{input:V(!s&&"rounded-full",t&&"rounded-r-full rounded-l-none",n&&"rounded-l-full rounded-r-none"),append:t?"rounded-l-full":"rounded-r-full"}:r==="rounded-none"?{input:"",append:""}:r?{input:r,append:r}:{input:V(!s&&"rounded-input",t&&"rounded-r-input rounded-l-none",n&&"rounded-l-input rounded-r-none"),append:t?"rounded-l-input":"rounded-r-input"}}function dV({size:e,flexibleHeight:t}){switch(e){case"2xs":return{font:"text-xs",height:t?"min-h-24":"h-24"};case"xs":return{font:"text-xs",height:t?"min-h-30":"h-30"};case"sm":return{font:"text-sm",height:t?"min-h-36":"h-36"};case"lg":return{font:"text-md md:text-lg",height:t?"min-h-50":"h-50"};case"xl":return{font:"text-xl",height:t?"min-h-60":"h-60"};default:return{font:"text-sm",height:t?"min-h-42":"h-42"}}}function hV(e){switch(e){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-sm";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return""}}function z_({children:e,direction:t,className:n,position:r=t==="start"?"left-0":"right-0"}){return e?u.jsx("div",{className:V("pointer-events-none absolute top-0 z-10 flex h-full min-w-42 items-center justify-center text-muted",r,n),children:e}):null}function DT(e,t){const n=(t==null?void 0:t.copy)??!0,r=n?{...e}:e;return Object.keys(r).forEach(s=>{const i=s;t!=null&&t.arrays&&Array.isArray(r[i])&&r[i].length===0?delete r[i]:t!=null&&t.deep&&r[i]&&typeof r[i]=="object"?(r[i]=DT(r[i],t),Object.keys(r[i]).length===0&&delete r[i]):(r[i]==null||r[i]==="")&&delete r[i]}),n?r:e}const L1=G.forwardRef((e,t)=>{const{children:n,description:r,errorMessage:s,descriptionProps:i={},errorMessageProps:o={},startAdornment:a,endAdornment:l,adornmentPosition:c,startAppend:f,endAppend:d,fieldClassNames:h,disabled:p,wrapperProps:g}=e;return u.jsxs("div",{className:h.wrapper,ref:t,...g,children:[u.jsx(pV,{...e}),u.jsxs("div",{className:h.inputWrapper,children:[u.jsx(z_,{direction:"start",className:h.adornment,position:c,children:a}),f&&u.jsx(V_,{style:h.append,disabled:p,children:f}),n,d&&u.jsx(V_,{style:h.append,disabled:p,children:d}),u.jsx(z_,{direction:"end",className:h.adornment,position:c,children:l})]}),r&&!s&&u.jsx("div",{className:h.description,...i,children:r}),s&&u.jsx("div",{className:h.error,...o,children:s})]})});function pV({labelElementType:e,fieldClassNames:t,labelProps:n,label:r,labelSuffix:s,labelSuffixPosition:i="spaced",required:o}){if(!r)return null;const a=e||"label",l=u.jsxs(a,{className:t.label,...n,children:[r,o&&u.jsx("span",{className:"text-danger",children:" *"})]});return s?u.jsxs("div",{className:V("mb-4 flex w-full gap-4",i==="spaced"?"items-end":"items-center"),children:[l,u.jsx("div",{className:V("text-xs text-muted",i==="spaced"?"ml-auto":""),children:s})]}):l}function V_({children:e,style:t,disabled:n}){return G.cloneElement(e,{...e.props,disabled:e.props.disabled||n,...DT(t)})}function Xh({autoFocus:e,autoSelectText:t},n){const r=y.useRef(e);y.useEffect(()=>{r.current&&n.current&&requestAnimationFrame(()=>{var s,i;(s=n.current)==null||s.focus(),t&&((i=n.current)==null?void 0:i.nodeName.toLowerCase())==="input"&&n.current.select()}),r.current=!1},[n,t])}function MT(e){const{focusRef:t,labelElementType:n="label",label:r,labelSuffix:s,labelSuffixPosition:i,autoFocus:o,autoSelectText:a,labelPosition:l,descriptionPosition:c,size:f,errorMessage:d,description:h,flexibleHeight:p,startAdornment:g,endAdornment:b,startAppend:w,adornmentPosition:v,endAppend:m,className:x,inputClassName:_,inputWrapperClassName:S,unstyled:j,background:k,invalid:N,disabled:D,id:F,inputRadius:B,inputBorder:T,inputShadow:E,inputRing:C,inputFontSize:A,...$}=e;Xh(e,t);const L=y.useId(),I=F||L,q=`${I}-label`,H=`${I}-description`,Y=`${I}-error`,te={id:q,htmlFor:n==="label"?I:void 0},ce={id:H},ve={id:Y},pe={"aria-label":!e.label&&!e["aria-label"]&&e.placeholder?e.placeholder:e["aria-label"],"aria-invalid":N||void 0,id:I,disabled:D,...$},Oe=[];r&&Oe.push(te.id),pe["aria-labelledby"]&&Oe.push(pe["aria-labelledby"]),pe["aria-labelledby"]=Oe.length?Oe.join(" "):void 0;const de=[];return h&&de.push(ce.id),d&&de.push(ve.id),pe["aria-describedby"]&&de.push(pe["aria-describedby"]),pe["aria-describedby"]=de.length?de.join(" "):void 0,{fieldProps:{errorMessageProps:ve,descriptionProps:ce,labelProps:te,disabled:D,label:r,labelSuffix:s,labelSuffixPosition:i,autoFocus:o,autoSelectText:a,labelPosition:l,descriptionPosition:c,size:f,errorMessage:d,description:h,flexibleHeight:p,startAdornment:g,endAdornment:b,startAppend:w,adornmentPosition:v,endAppend:m,className:x,inputClassName:_,inputWrapperClassName:S,unstyled:j,background:k,invalid:N},inputProps:pe}}const uc=y.forwardRef(({inputElementType:e="input",flexibleHeight:t,inputRef:n,inputTestId:r,...s},i)=>{const o=La(n),{fieldProps:a,inputProps:l}=MT({...s,focusRef:o}),c=e==="textarea",f=c?"textarea":"input",d=Ya({...s,flexibleHeight:t||e==="textarea"});return e==="textarea"&&!s.unstyled&&(d.input=`${d.input} py-12`),u.jsx(L1,{ref:i,fieldClassNames:d,...a,children:u.jsx(f,{"data-testid":r,ref:o,...l,rows:c?l.rows||4:void 0,className:d.input})})}),Ie=G.forwardRef(({name:e,...t},n)=>{const{field:{onChange:r,onBlur:s,value:i="",ref:o},fieldState:{invalid:a,error:l}}=Ga({name:e}),c={onChange:r,onBlur:s,value:i??"",invalid:a,errorMessage:l==null?void 0:l.message,inputRef:o,name:e};return u.jsx(uc,{ref:n,...Jr(c,t)})}),mV=oe(u.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeftOutlined");function mn(e,t){if(t&&wr.isAxiosError(e)&&e.response){const n=e.response.data;n.errors?Object.entries(n.errors||{}).forEach(([r,s],i)=>{typeof s=="string"?t.setError(r,{message:s},{shouldFocus:i===0}):s.forEach((o,a)=>{t.setError(r,{message:o},{shouldFocus:i===0&&a===0})})}):gt(e)}}function gV(e){return we({mutationFn:t=>yV(t),onSuccess:()=>{window.location.reload()},onError:t=>mn(t,e)})}function yV(e){return re.post("validate-email-verification-otp",e).then(t=>t.data)}function vV(){const{trans:e}=Dn(),{data:t}=xT("me"),n=Bz(),{branding:{logo_light:r,logo_dark:s}}=fe(),o=Gh()?r:s,a=N1(),l=Xt(),c=gV(l);return u.jsx("div",{className:"flex min-h-screen w-screen bg-alt p-24",children:u.jsxs("div",{className:"mx-auto mt-40 max-w-440",children:[u.jsx(se,{variant:"outline",onClick:()=>a.mutate(),startIcon:u.jsx(mV,{}),size:"xs",className:"mb-54 mr-auto",children:u.jsx(P,{message:"Logout"})}),o&&u.jsx("img",{src:o,alt:"Site logo",className:"mx-auto mb-44 block h-42 w-auto"}),u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"mb-24 text-3xl",children:u.jsx(P,{message:"Verify your email"})}),u.jsx("h2",{className:"text-lg",children:u.jsx(P,{message:"Enter the verification code we sent to :email",values:{email:xV(t==null?void 0:t.user.email)}})}),u.jsxs(Jt,{form:l,onSubmit:f=>c.mutate(f),className:"my-16",children:[u.jsx(Ie,{name:"code",label:u.jsx(P,{message:"Code"}),placeholder:e(le("Enter your verification code")),autoFocus:!0,autoComplete:"one-time-code",autoCorrect:"off",autoCapitalize:"off",maxLength:6,inputMode:"numeric",required:!0}),u.jsx(se,{type:"submit",variant:"flat",color:"primary",size:"md",className:"mt-24 w-full",disabled:c.isPending,children:u.jsx(P,{message:"Next"})})]}),u.jsx("div",{className:"mb-24 text-sm",children:u.jsx(P,{message:"If you don't see the email in your inbox, check your spam folder and promotions tab. If you still don't see it, request a resend.",values:{a:f=>u.jsx(se,{variant:"link",color:"primary",disabled:n.isPending||!(t!=null&&t.user.email),onClick:()=>{n.mutate({email:t.user.email})},children:f})}})})]})]})})}function xV(e){if(!e)return"*******************";const[t,n]=e.split("@");return`${t.slice(0,2)}****@${n}`}class bV{constructor(){Se(this,"loadedAssets",{})}loadAsset(t,n={type:"js"}){var i;const r=(i=this.loadedAssets[t])==null?void 0:i.state;return r==="loaded"&&!n.force?new Promise(o=>o()):!r||this.loadedAssets[t].doc!==n.document||n.force&&r==="loaded"?(this.loadedAssets[t]={state:new Promise(o=>{const a=Ia(t)?t:`assets/${t}`,l=Tm(t,n.id),c={url:a,id:l,resolve:o,parentEl:n.parentEl,document:n.document};n.type==="css"?this.loadStyleAsset(c):this.loadScriptAsset(c)}),doc:n.document},this.loadedAssets[t].state):this.loadedAssets[t].state}isLoadingOrLoaded(t){return this.loadedAssets[t]!=null}loadStyleAsset(t){var o;const n=t.document||document,r=t.parentEl||n.head,s=n.createElement("link"),i=Tm(t.url,t.id);s.rel="stylesheet",s.id=i,s.href=t.url;try{r.querySelector(`#${i}`)&&((o=r.querySelector(`#${i}`))==null||o.remove())}catch{}s.onload=()=>{this.loadedAssets[t.url].state="loaded",t.resolve()},r.appendChild(s)}loadScriptAsset(t){var o;const n=t.document||document,r=t.parentEl||n.body,s=n.createElement("script"),i=Tm(t.url,t.id);s.async=!0,s.id=i,s.src=t.url;try{r.querySelector(`#${i}`)&&((o=r.querySelector(`#${i}`))==null||o.remove())}catch{}s.onload=()=>{this.loadedAssets[t.url].state="loaded",t.resolve()},(r||r).appendChild(s)}}function Tm(e,t){return t||btoa(e.split("/").pop())}const FT=new bV;function wV(e){return`be-fonts-${e}`}function _V(e,t){const n=t.document||document,r=[],s=[];let i=[];if(e.forEach(o=>{"google"in o&&o.google?r.push(o):"src"in o&&s.push(o)}),r!=null&&r.length){const o=t.weights||[400],a=e.map(c=>`${c.family}:${o.join(",")}`).join("|"),l=FT.loadAsset(`https://fonts.googleapis.com/css?family=${a}&display=swap`,{type:"css",id:wV(t.id),force:t.forceAssetLoad,document:n});i.push(l)}if(s!=null&&s.length){const o=s.map(async a=>{const l=Array.from(n.fonts.values()).find(f=>f.family===a.family);if(l)return l.loaded;const c=new FontFace(a.family,`url(${t!=null&&t.prefixSrc?t.prefixSrc(a.src):a.src})`,a.descriptors);return n.fonts.add(c),c.load()});i=i.concat(o)}return Promise.all(i)}function SV(){const e=nc(),{mergeBootstrapData:t,data:n}=zt(),r=y.useCallback(s=>{switch(s.type){case"navigate":return e(s.to);case"setValues":return t({themes:{...n.themes,all:s.values.appearance.themes.all},settings:{...n.settings,...s.values.settings}});case"setThemeFont":s.value?(wy("--be-font-family",s.value.family),_V([s.value],{id:"be-primary-font",forceAssetLoad:!0})):yF("--be-font-family");return;case"setThemeValue":return wy(s.name,s.value);case"setActiveTheme":const i=n.themes.all.find(o=>o.id===s.themeId);i&&_4(i);return;case"setCustomCode":return jV(s.mode,s.value)}},[n,t,e]);return y.useEffect(()=>{const s=i=>{EV(i)&&CV(i)&&r(i.data)};return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},[e,r]),null}function EV(e){var t;return((t=e.data)==null?void 0:t.source)==="be-appearance-editor"}function CV(e){return new URL(e.origin).hostname===window.location.hostname}function jV(e,t){const n=e==="html"?document.body:document.head,r=e==="html"?"div":"style";let s=n.querySelector("#be-custom-code");t?(s||(s=document.createElement(r),s.id="be-custom-code",n.appendChild(s)),s.innerHTML=t):s&&s.remove()}function Bi(e,t){var n,r;if(typeof t=="function")r=t(e),r!==void 0&&(e=r);else if(Array.isArray(t))for(n=0;n=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t),r=n.filter(RV);if(r.length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var B_=Object.prototype.hasOwnProperty;function ge(e,t,n,r){if(!(this instanceof ge))return new ge(e,t,n,r);typeof t>"u"&&(t=!1),typeof n>"u"&&(n=!0),typeof r>"u"&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var wa=new ge(".",!1,!0,!0);function Zn(e){return function(){return wa[e].apply(wa,arguments)}}ge.prototype._fill=function(e,t,n,r){var s=e.shift();if(e.length>0){if(t[s]=t[s]||(this.useArray&&TV(e[0])?[]:{}),!bl(t[s]))if(this.override)t[s]={};else{if(!(bl(n)&&Cf(n)))throw new Error("Trying to redefine `"+s+"` which is a "+typeof t[s]);return}this._fill(e,t[s],n,r)}else{if(!this.override&&bl(t[s])&&!Cf(t[s])){if(!(bl(n)&&Cf(n)))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}t[s]=Bi(n,r)}};ge.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(r){var s=t===void 0?null:t[r],i=Jh(r,n.separator).join(n.separator);i.indexOf(n.separator)!==-1?(n._fill(i.split(n.separator),e,e[r],s),delete e[r]):e[r]=Bi(e[r],s)}),e};ge.prototype.str=function(e,t,n,r){var s=Jh(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(s.split(this.separator),n,t,r):n[e]=Bi(t,r),n};ge.prototype.pick=function(e,t,n,r){var s,i,o,a,l;for(i=Jh(e,this.separator),s=0;s"u")return n;for(o=Jh(e,this.separator),s=0;s{var i;if(!e)return null;const s=typeof e=="string"?(i=t.menus)==null?void 0:i.find(o=>{var a;return(a=o.positions)==null?void 0:a.includes(e)}):e;return s&&(s.items=s.items.filter(o=>{const a=(o.roles||[]).every(f=>n==null?void 0:n.roles.find(d=>d.id===f)),l=(o.permissions||[]).every(f=>r(f)),c=!o.settings||Object.entries(o.settings).every(([f,d])=>OV.pick(f,t)==d);return o.action&&a&&l&&c})),s},[r,t,e,n])}function Dd({className:e,iconClassName:t,itemClassName:n,gap:r="gap-30",menu:s,orientation:i="horizontal",children:o,matchDescendants:a,onlyShowIcons:l,iconSize:c,unstyled:f=!1}){const d=D1(s);return d?u.jsx("div",{className:V("flex",r,i==="vertical"?"flex-col items-start":"items-center",e),"data-menu-id":d.id,children:d.items.map(h=>o?o(h):u.jsx(M1,{unstyled:f,onlyShowIcon:l,matchDescendants:a,iconClassName:t,iconSize:c,className:p=>typeof n=="function"?n({...p,item:h}):n,item:h},h.id))}):null}const M1=y.forwardRef(({item:e,className:t,matchDescendants:n,unstyled:r,onlyShowIcon:s,iconClassName:i,iconSize:o="sm",...a},l)=>{const c=u.jsx(P,{message:e.label}),f=e.icon&&gh(e.icon),d=u.jsxs(y.Fragment,{children:[f&&u.jsx(f,{size:o,className:i}),(!f||!s)&&c]}),h=!r&&"whitespace-nowrap flex items-center justify-start gap-10",p=!r&&"outline-none focus-visible:ring-2";return e.type==="link"?u.jsx("a",{className:V(h,t==null?void 0:t({isActive:!1}),p),href:e.action,target:e.target,"data-menu-item-id":e.id,ref:l,...a,children:d}):u.jsx(QM,{end:typeof n=="function"?n(e.action):n,className:g=>V(h,t==null?void 0:t(g),p),to:e.action,target:e.target,"data-menu-item-id":e.id,ref:l,...a,children:d})});function AV(){const{cookie_notice:{position:e,enable:t}}=fe(),[,n]=u1("cookie_notice"),[r,s]=y.useState(()=>!In().show_cookie_notice);return!t||r?null:u.jsxs("div",{className:V("fixed z-50 flex w-full justify-center gap-14 bg-toast p-14 text-sm text-white shadow max-md:flex-col md:items-center md:gap-30",e=="top"?"top-0":"bottom-0"),children:[u.jsx(P,{message:`We use cookies to optimize site functionality and provide you with the best possible experience.`}),u.jsx($V,{}),u.jsx(se,{variant:"flat",color:"primary",size:"xs",className:"max-w-100",onClick:()=>{n("true",{days:30,path:"/"}),s(!0)},children:u.jsx(P,{message:"OK"})})]})}function $V(){const{cookie_notice:{button:e}}=fe();return e!=null&&e.label?u.jsx(M1,{className:()=>"text-primary-light hover:underline",item:e}):null}const IV=""+new URL("404-1-176145e9.png",import.meta.url).href,LV=""+new URL("404-2-14c4a897.png",import.meta.url).href;function F1(){return u.jsxs("div",{className:"lg:px-96 lg:py-96 md:py-80 md:px-176 px-16 py-96 items-center flex justify-center flex-col-reverse lg:flex-row md:gap-112 gap-64",children:[u.jsx("div",{className:"xl:pt-96 w-full xl:w-1/2 relative pb-48 lg:pb-0",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute",children:u.jsxs("div",{className:"relative z-10",children:[u.jsx("h1",{className:"my-8 text-main font-bold text-2xl",children:u.jsx(P,{message:"Looks like you've found the doorway to the great nothing"})}),u.jsx("p",{className:"my-16 text-main",children:u.jsx(P,{message:`Sorry about that! Please visit our homepage to get where you need to go.`})}),u.jsx(se,{className:"my-8",elementType:Xe,size:"lg",to:"/",variant:"flat",color:"primary",children:u.jsx(P,{message:"Take me there!"})})]})}),u.jsx("div",{className:"dark:opacity-5",children:u.jsx("img",{src:LV,alt:""})})]})}),u.jsx("div",{className:"dark:opacity-80",children:u.jsx("img",{src:IV,alt:""})})]})}function yu({children:e,permission:t,requireLogin:n=!0}){const{isLoggedIn:r,hasPermission:s,isSubscribed:i}=yt(),{billing:o}=fe();return n&&!r||t&&!s(t)?r?o.enable&&!i?u.jsx(Hs,{to:"/pricing",replace:!0}):u.jsx(F1,{}):u.jsx(Hs,{to:"/login",replace:!0}):e||u.jsx(y4,{})}function To({className:e,screen:t}){return u.jsx("div",{className:V("flex items-center justify-center flex-auto",t?"h-screen w-screen":"h-full w-full",e),children:u.jsx(Qs,{isIndeterminate:!0,"aria-label":"Loading page..."})})}function ni({children:e}){const{isLoggedIn:t,getRedirectUri:n}=yt(),{isAppearanceEditorActive:r}=k1(),s=n(),{auth:i}=y.useContext(Xr),{pathname:o}=Jn();if(t&&!r){if(s!==o)return u.jsx(Hs,{to:s,replace:!0});if(i.secondaryRedirectUri)return u.jsx(Hs,{to:i.secondaryRedirectUri,replace:!0})}return e||u.jsx(y4,{})}const Ws="text-link hover:underline hover:text-primary-dark focus-visible:ring focus-visible:ring-2 focus-visible:ring-offset-2 outline-none rounded transition-colors";function aQ({children:e,className:t,target:n="_blank",...r}){return u.jsx("a",{className:Ws,target:n,...r,children:e})}function DV(e){const t=Mn(),{getRedirectUri:n}=yt(),{setBootstrapData:r}=zt();return we({mutationFn:MV,onSuccess:s=>{r(s.bootstrapData),s.status==="needs_email_verification"?t("/"):t(n(),{replace:!0})},onError:s=>mn(s,e)})}function MV(e){return re.post("auth/register",e).then(t=>t.data)}function FV(e){const t=Mn(),{getRedirectUri:n}=yt(),{setBootstrapData:r}=zt();return we({mutationFn:UV,onSuccess:s=>{r(s.bootstrapData),t(n(),{replace:!0})},onError:s=>mn(s,e)})}function UV(e){return re.post("secure/auth/social/connect",e).then(t=>t.data)}function Zh(e){const{children:t,startAction:n,className:r,dividerTop:s,padding:i,size:o}=e;return u.jsxs("div",{className:V(r,s&&"border-t",zV(e),"flex items-center gap-10 flex-shrink-0"),children:[u.jsx("div",{children:n}),u.jsx("div",{className:"ml-auto flex items-center gap-10",children:t})]})}function zV({padding:e,size:t}){if(e)return e;switch(t){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}function VV(){return we({mutationFn:BV,onError:e=>gt(e)})}function BV(e){return re.post(`secure/auth/social/${e.service}/disconnect`,e).then(t=>t.data)}function UT(){const{trans:e}=Dn(),{setBootstrapData:t}=zt(),n=VV(),[r,s]=y.useState(!1),i=y.useCallback(o=>{const{status:a,callbackData:l}=o;if(a)switch(a.toUpperCase()){case"SUCCESS":return l!=null&&l.bootstrapData&&t(l.bootstrapData),o;case"REQUEST_PASSWORD":return s(!0),o;case"ERROR":const c=(l==null?void 0:l.errorMessage)||e({message:"An error occurred. Please try again later"});return be.danger(c),o;default:return o}},[e,t]);return{requestingPassword:r,setIsRequestingPassword:s,loginWithSocial:async o=>{const a=await W_(`secure/auth/social/${o}/login`);return i(a)},connectSocial:async o=>{const a=o.includes("/")?o:`secure/auth/social/${o}/connect`,l=await W_(a);return i(l)},disconnectSocial:n}}const H_=550,q_=650;let Pm;function W_(e){const t=window.screen.width/2-q_/2,n=window.screen.height/2-H_/2;return new Promise(r=>{Pm=window.open(e,"Authenticate Account",`menubar=0, location=0, toolbar=0, titlebar=0, status=0, scrollbars=1, width=${q_}, height=${H_}, left=${t}, top=${n}`);const s=o=>{const a=In().settings.base_url;o.data.type==="social-auth"&&a.indexOf(o.origin)>-1&&(r(o.data),window.removeEventListener("message",s))};window.addEventListener("message",s);const i=setInterval(()=>{(!Pm||Pm.closed)&&(clearInterval(i),r({}),window.removeEventListener("message",s))},1e3)})}const zT=oe(u.jsxs("g",{children:[u.jsx("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),u.jsx("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),u.jsx("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),u.jsx("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),u.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]})),VT=oe(u.jsx("path",{d:"M48 24C48 10.7452 37.2548 0 24 0C10.7452 0 0 10.7452 0 24C0 35.9789 8.77641 45.908 20.25 47.7084V30.9375H14.1562V24H20.25V18.7125C20.25 12.6975 23.8331 9.375 29.3152 9.375C31.9402 9.375 34.6875 9.84375 34.6875 9.84375V15.75H31.6613C28.68 15.75 27.75 17.6002 27.75 19.5V24H34.4062L33.3422 30.9375H27.75V47.7084C39.2236 45.908 48 35.9789 48 24Z"}),"FacebookIcon","0 0 48 48"),BT=oe(u.jsx("path",{d:"M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z"}),"TwitterIcon");function HV(e,{noSSR:t}={noSSR:!0}){const n=typeof window<"u"&&typeof window.matchMedia=="function",[r,s]=y.useState(t?()=>n?window.matchMedia(e).matches:!1:null);return y.useEffect(()=>{if(!n)return;const i=window.matchMedia(e),o=()=>{s(i.matches)};return i.addEventListener("change",o),t||o(),()=>{i.removeEventListener("change",o)}},[n,e,t]),typeof window>"u"?null:r}function U1(e){return HV("(max-width: 768px)",e)}function z1(){const{width:e,height:t}=O6();return{"--be-viewport-height":`${t}px`,"--be-viewport-width":`${e}px`}}const Ll=y.forwardRef(({children:e,style:t,autoFocus:n=!1,restoreFocus:r=!0,isDismissable:s,isContextMenu:i,isOpen:o,onClose:a,triggerRef:l,arrowRef:c,arrowStyle:f,onPointerLeave:d,onPointerEnter:h},p)=>{const g=z1(),b=La(p),{domProps:w}=qV({isDismissable:s,isOpen:o,onClose:a,triggerRef:l,isContextMenu:i},b);return u.jsx(Qr.div,{className:"isolate z-popover",role:"presentation",ref:b,style:{...g,...t,position:"fixed"},...Kk,...Jr(w,{onPointerLeave:d,onPointerEnter:h}),children:u.jsx(Ch,{restoreFocus:r,autoFocus:n,contain:!1,children:e})})}),fl=[];function qV({onClose:e,isDismissable:t=!0,triggerRef:n,isContextMenu:r=!1},s){const i=y.useRef({isPointerDown:!1,isContextMenu:r,onClose:e}),o=i.current;o.isContextMenu=r,o.onClose=e;const a=y.useCallback(g=>{const b=g.target;if(b){const w=b.ownerDocument;if(!w||!w.documentElement.contains(b))return!1}return s.current&&!s.current.contains(b)},[s]),l=y.useCallback(()=>fl[fl.length-1]===s,[s]),c=y.useCallback(()=>{l()&&o.onClose()},[l,o]),f=y.useCallback(g=>{var b,w;return n.current&&"contains"in n.current?(w=(b=n.current).contains)==null?void 0:w.call(b,g):!1},[n]),d=y.useCallback(g=>{f(g.target)||l()&&(g.stopPropagation(),g.preventDefault())},[f,l]),h=y.useCallback(g=>{f(g.target)||(l()&&(g.stopPropagation(),g.preventDefault()),(!o.isContextMenu||g.button!==2)&&c())},[f,c,o,l]);return y.useEffect(()=>{fl.push(s);const g=m=>{a(m)&&(d(m),i.current.isPointerDown=!0)},b=m=>{i.current.isPointerDown&&a(m)&&(i.current.isPointerDown=!1,h(m))},w=m=>{m.preventDefault(),a(m)&&c()},v=m=>{if(!n.current)return;const x=m.target;let _;n.current instanceof Node?_=n.current:"contextElement"in n.current&&(_=n.current.contextElement),(!(x instanceof Node)||!_||x.contains(_))&&o.onClose()};return document.addEventListener("pointerdown",g,!0),document.addEventListener("pointerup",b,!0),document.addEventListener("contextmenu",w,!0),document.addEventListener("scroll",v,!0),()=>{const m=fl.indexOf(s);m>=0&&fl.splice(m,1),document.removeEventListener("pointerdown",g,!0),document.removeEventListener("pointerup",b,!0),document.removeEventListener("contextmenu",w,!0),document.removeEventListener("scroll",v,!0)}},[s,a,o,h,d,n,f,c]),{domProps:{onKeyDown:g=>{g.key==="Escape"&&(g.stopPropagation(),g.preventDefault(),c())}}}}const ep={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}};function HT({position:e="absolute",className:t,isTransparent:n=!1,disableInitialTransition:r,...s}){return u.jsx(Qr.div,{...s,className:V(t,!n&&"bg-background/80","inset-0 z-10 h-full w-full",e,"backdrop-blur-sm"),"aria-hidden":!0,initial:r?void 0:{opacity:0},animate:{opacity:1},exit:{opacity:0},...ep,transition:{duration:.15}})}const qT=y.forwardRef(({children:e,autoFocus:t=!1,restoreFocus:n=!0,isDismissable:r,isOpen:s,onClose:i},o)=>{const a=z1(),l=La(o);return u.jsxs("div",{className:"isolate z-tray fixed inset-0",style:a,children:[u.jsx(HT,{onClick:()=>{r&&i()}},"tray-underlay"),u.jsx(Qr.div,{ref:l,className:"absolute bottom-0 left-0 right-0 w-full z-20 rounded-t overflow-hidden max-w-375 max-h-tray mx-auto pb-safe-area",role:"presentation",initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},transition:{type:"tween",duration:.2},children:u.jsx(Ch,{restoreFocus:n,autoFocus:t,contain:!0,children:e})})]})}),WV=y.forwardRef(({children:e,autoFocus:t=!1,restoreFocus:n=!0,isDismissable:r=!0,isOpen:s=!1,placement:i="center",onClose:o},a)=>{const l=z1(),c=La(a);return u.jsxs("div",{className:"fixed inset-0 isolate z-modal",style:l,onKeyDown:f=>{f.key==="Escape"&&(f.stopPropagation(),f.preventDefault(),o())},children:[u.jsx(HT,{onClick:()=>{r&&o()}},"modal-underlay"),u.jsx(Qr.div,{ref:c,className:V("pointer-events-none absolute inset-0 z-20 flex h-full w-full",i==="center"&&"items-center justify-center",i==="top"&&"items-start justify-center pt-40"),role:"presentation",initial:{opacity:0,scale:i==="top"?1:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1},transition:{duration:.1},children:u.jsx(Ch,{restoreFocus:n,autoFocus:t,contain:!0,children:e})})]})});function WT({children:e,label:t,index:n}){const r=y.useId();return u.jsxs("div",{role:"group",className:V(n!==0&&"border-t my-4"),"aria-labelledby":t?`be-select-${r}`:void 0,children:[t&&u.jsx("div",{className:"block uppercase text-muted text-xs px-16 py-10",role:"presentation",id:`be-select-${r}`,"aria-hidden":"true",children:t}),e]})}const KV=Xu(({maxItems:e,children:t,items:n,inputValue:r})=>{let s=YV({children:t,items:n}),i=GV({collection:s,inputValue:r});return e&&(s=new Map([...s.entries()].slice(0,e)),i=new Map([...i.entries()].slice(0,e))),{collection:s,filteredCollection:i}}),GV=Xu(({collection:e,inputValue:t})=>{let n=new Map;const r=t?`${t}`.toLowerCase().trim():"";if(!r)n=e;else{let s=0;e.forEach((i,o)=>{(i.item?JSON.stringify(i.item):i.textLabel).toLowerCase().trim().includes(r)&&n.set(o,{...i,index:s++})})}return n}),YV=Xu(({children:e,items:t})=>{let n;t&&typeof e=="function"?n=t.map(o=>e(o)):n=e;const r=new Map;let s=0;const i=(o,a,l,c)=>{const f=s++,d=a?t==null?void 0:t[l].items[c]:t==null?void 0:t[f];r.set(o.props.value,{index:f,element:o,textLabel:QV(o),item:d,section:a,isDisabled:o.props.isDisabled,value:o.props.value})};return y.Children.forEach(n,(o,a)=>{y.isValidElement(o)&&(o.type===WT?y.Children.forEach(o.props.children,(l,c)=>{i(l,o,a,c)}):i(o))}),r});function QV(e){var n;const t=e.props.children;return e.props.textLabel?e.props.textLabel:(n=t==null?void 0:t.props)!=null&&n.message?t.props.message:`${t}`||""}function V1(e,t){const{children:n,items:r,role:s="listbox",virtualFocus:i,loopFocus:o=!1,autoFocusFirstItem:a=!0,onItemSelected:l,clearInputOnItemSelection:c,blurReferenceOnItemSelection:f,floatingWidth:d="matchTrigger",floatingMinWidth:h,floatingMaxHeight:p,offset:g,placement:b,showCheckmark:w,showEmptyMessage:v,maxItems:m,isAsync:x,allowCustomValue:_,clearSelectionOnInputClear:S}=e,j=e.selectionMode||"none",N=`${y.useId()}-listbox`,[D,F]=ha(e.inputValue,e.defaultInputValue||"",e.onInputValueChange),[B,T]=y.useState("all"),E=KV({children:n,items:r,inputValue:x?void 0:D,maxItems:m}),C=B==="all"?E.collection:E.filteredCollection,A=y.useRef([]),$=y.useMemo(()=>[...C.values()].map(Ke=>Ke.isDisabled?null:Ke.textLabel),[C]),{selectedValues:L,selectValues:I}=JV(e),[q,H]=ha(e.isOpen,e.defaultIsOpen,e.onOpenChange),[Y,te]=y.useState(null),ce=e1({floatingWidth:d,ref:t,placement:b,offset:g,maxHeight:p??420,shiftCrossAxis:!i}),{refs:ve,strategy:et,x:pe,y:Oe}=ce,de=j==="none"?void 0:C.get(L[0]),St=j==="none"||de==null?void 0:de.index,Le=Ke=>{if(j!=="none"){const tt=[...C.values()][Ke];tt&&I(tt.value)}},lt=y.useCallback((Ke,tt)=>{var U,ne;const ap=[...C.values()],O=!ap.find(J=>!J.isDisabled),M=C.size-1;if(tt==null||!C.size||tt>M||tt<0||O){te(null);return}tt=XV(ap,tt,o,Ke),te(tt),i?(U=A.current[tt])==null||U.scrollIntoView({block:"nearest"}):(ne=A.current[tt])==null||ne.focus()},[C,i,o]),Er=y.useCallback(Ke=>{F(Ke.target.value),T(Ke.target.value.trim()?"filtered":"all"),Ke.target.value?H(!0):S&&I(""),a&&Y==null?lt("increment",0):te(null)},[F,H,T,I,S,lt,a,Y]);return{handleItemSelection:Ke=>{const tt=ve.reference.current;j!=="none"?I(Ke):tt&&"focus"in tt&&tt.focus(),i&&(F(c?"":`${Ke}`),f&&tt&&"blur"in tt&&tt.blur()),T("all"),H(!1),l==null||l(Ke),te(null)},onInputChange:Er,loopFocus:o,floatingWidth:d,floatingMinWidth:h,floatingMaxHeight:p,showCheckmark:w,collection:C,collections:E,virtualFocus:i,focusItem:lt,showEmptyMessage:v&&!!D,allowCustomValue:_,refs:ve,reference:ce.reference,floating:ve.setFloating,positionStyle:{position:et,top:Oe??"",left:pe??""},listContent:$,listItemsRef:A,listboxId:N,role:s,state:{activeIndex:Y,setActiveIndex:te,selectedIndex:St,setSelectedIndex:Le,selectionMode:j,selectedValues:L,selectValues:I,inputValue:D,setInputValue:F,isOpen:q,setIsOpen:H,setActiveCollection:T}}}function XV(e,t,n,r){var i;const s=e.length-1;for(;(i=e[t])!=null&&i.isDisabled;)if(r==="increment"){if(t++,t>=s)if(n)t=0;else return t-1}else if(t--,t<0)if(n)t=s;else return t+1;return t}function JV(e){const{selectionMode:t,allowEmptySelection:n}=e,r=t==="single"||t==="multiple",[s,i]=ha(r?e.selectedValue:void 0,r?e.defaultSelectedValue:void 0,r?e.onSelectionChange:void 0),o=y.useMemo(()=>typeof s>"u"?[]:Array.isArray(s)?s:[s],[s]),a=y.useCallback(l=>{const c=Array.isArray(l)?l:[l];t==="single"?i(c[0]):c.forEach(f=>{const d=o.indexOf(f);d===-1?(o.push(f),i([...o])):(o.length>1||n)&&(o.splice(d,1),i([...o]))})},[n,o,t,i]);return{selectedValues:o,selectValues:a}}const KT=y.createContext(null);function B1(){return y.useContext(KT)}const ZV=768;function eB(){return H0()||typeof window>"u"?In().is_mobile_device:window.screen.width<=ZV}function H1({listbox:e,children:t,isLoading:n,mobileOverlay:r=qT,searchField:s,onClose:i,prepend:o,className:a,...l}){const c=eB(),{floatingWidth:f,floatingMinWidth:d="min-w-180",collection:h,showEmptyMessage:p,state:{isOpen:g,setIsOpen:b},positionStyle:w,floating:v,refs:m}=e,x=!o&&c?r:Ll,_=V("text-base sm:text-sm outline-none bg max-h-inherit flex flex-col",!o&&"shadow-xl border py-4",a,x===Ll&&"rounded-panel",x===Ll&&f==="auto"?`max-w-288 ${d}`:""),S=y.useMemo(()=>{let N=0;const D=[];return[...h.values()].reduce((F,B)=>{if(!B.section)F.push(y.cloneElement(B.element,{key:B.element.key||B.element.props.value}));else if(!D.includes(B.section)){const T=y.cloneElement(B.section,{key:B.section.key||N,index:N});F.push(T),D.push(B.section),N++}return F},[])},[h]),j=S.length>0||p&&!n,k=j?u.jsxs("div",{className:_,role:"presentation",children:[s,u.jsx(tB,{isLoading:n,...l,children:S})]}):null;return u.jsxs(KT.Provider,{value:e,children:[t,o?k:Bs&&Pa.createPortal(u.jsx(Aa,{children:g&&j&&u.jsx(x,{triggerRef:m.reference,restoreFocus:!0,isOpen:g,onClose:()=>{i==null||i(),b(!1)},isDismissable:!0,style:w,ref:v,children:k})}),Bs)]})}function tB({className:e,children:t,isLoading:n,...r}){const{role:s,listboxId:i,virtualFocus:o,focusItem:a,state:{activeIndex:l,setActiveIndex:c,selectedIndex:f}}=B1(),d=y.useRef(!0),h=y.useRef(null);return y.useEffect(()=>()=>c(null),[c]),y.useEffect(()=>{if(d.current){const p=l??f;p==null&&!o?requestAnimationFrame(()=>{var g;(g=h.current)==null||g.focus({preventScroll:!0})}):p!=null&&requestAnimationFrame(()=>{a("increment",p)})}d.current=!1},[l,f,a,o]),u.jsx("div",{tabIndex:o?void 0:-1,role:s,id:i,className:"flex-auto overflow-y-auto overscroll-contain outline-none",ref:h,...r,children:t.length?t:u.jsx(nB,{})})}function nB(){return u.jsx("div",{className:"px-8 py-4 text-sm italic text-muted",children:u.jsx(P,{message:"There are no items matching your query"})})}const GT=oe(u.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckOutlined"),YT=G.forwardRef((e,t)=>{let{startIcon:n,capitalizeFirst:r,children:s,description:i,endIcon:o,endSection:a,isDisabled:l,isActive:c,isSelected:f,showCheckmark:d,elementType:h="div",radius:p,padding:g,...b}=e;!n&&d&&(n=u.jsx(GT,{size:"sm",className:V("text-primary",!f&&"invisible")}));const w=V("icon-sm rounded overflow-hidden flex-shrink-0",!l&&"text-muted"),v=V(!l&&"text-muted"),m=h;return u.jsxs(m,{...b,"aria-disabled":l,className:rB(e),ref:t,children:[n&&u.jsx("div",{className:w,children:n}),u.jsxs("div",{className:V("min-w-auto mr-auto w-full overflow-hidden overflow-ellipsis",r&&"first-letter:capitalize"),children:[s,i&&u.jsx("div",{className:V("mt-4 whitespace-normal text-xs",l?"text-disabled":"text-muted"),children:i})]}),(o||a)&&u.jsx("div",{className:o?w:v,children:o||a})]})});function rB({className:e,isSelected:t,isActive:n,isDisabled:r,showCheckmark:s,endIcon:i,endSection:o,radius:a,padding:l}){let c="";r?c="text-disabled pointer-events-none":t?n?c="bg-primary/focus":c="bg-primary/selected hover:bg-primary/focus":n?c="hover:bg-fg-base/15 bg-focus":c="hover:bg-hover";let f;return l?f=l:s?i||o?f="pl-8 pr-8 py-8":f="pl-8 pr-24 py-8":f="px-20 py-8",V("w-full select-none outline-none cursor-pointer","text-sm truncate flex items-center gap-10",!r&&"text-main",f,c,e,a)}function Bt({children:e,value:t,startIcon:n,endIcon:r,endSection:s,description:i,capitalizeFirst:o,textLabel:a,isDisabled:l,onSelected:c,onClick:f,...d}){var F;const{collection:h,showCheckmark:p,virtualFocus:g,listboxId:b,role:w,listItemsRef:v,handleItemSelection:m,state:{selectedValues:x,activeIndex:_,setActiveIndex:S}}=B1(),j=x.includes(t),k=(F=h.get(t))==null?void 0:F.index,N=_===k;if(k==null)return null;const D=N&&!l?-1:0;return u.jsx(YT,{...d,onFocus:()=>{g||S(k)},onPointerEnter:B=>{S(k),g||B.currentTarget.focus()},onPointerDown:B=>{g&&B.preventDefault()},onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),m(t),c==null||c())},onClick:B=>{m(t),c==null||c(),f==null||f(B)},ref:B=>v.current[k]=B,id:`${b}-${k}`,role:w==="menu"?"menuitem":"option",tabIndex:g?void 0:D,"aria-selected":N&&j,showCheckmark:p,isDisabled:l,isActive:N,isSelected:j,startIcon:n,description:i,endIcon:r,endSection:s,capitalizeFirst:o,"data-value":t,children:e})}function q1({state:{isOpen:e,setIsOpen:t,selectedIndex:n,activeIndex:r,setInputValue:s},loopFocus:i,collection:o,focusItem:a,handleItemSelection:l,allowCustomValue:c}){const f=p=>{if(!(e||!p.currentTarget.contains(p.target))){if(p.key==="ArrowDown")return p.preventDefault(),t(!0),a("increment",n??0),!0;if(p.key==="ArrowUp")return p.preventDefault(),t(!0),a("decrement",n??o.size-1),!0;if(p.key==="Enter"||p.key==="Space")return p.preventDefault(),t(!0),a("increment",n??0),!0}},d=p=>{const g=Math.max(0,o.size-1);if(!(!e||!p.currentTarget.contains(p.target)))switch(p.key){case"ArrowDown":return p.preventDefault(),r==null?a("increment",0):r>=g?i&&a("increment",0):a("increment",r+1),!0;case"ArrowUp":return p.preventDefault(),r==null?a("decrement",g):r<=0?i&&a("decrement",g):a("decrement",r-1),!0;case"Home":return p.preventDefault(),a("increment",0),!0;case"End":return p.preventDefault(),a("decrement",g),!0;case"Tab":return t(!1),!0}};return{handleTriggerKeyDown:f,handleListboxKeyboardNavigation:d,handleListboxSearchFieldKeydown:p=>{var b,w;if(p.key==="Enter"&&r!=null&&o.size){p.preventDefault();const[v,m]=[...o.entries()][r];v&&(l(v),(w=(b=m.element.props).onSelected)==null||w.call(b));return}p.key==="Escape"&&e&&(t(!1),c||s("")),f(p)||d(p)}}}const Rm=new Map;function sB(e){const{localeCode:t}=zi(),n=t+(e?Object.entries(e).sort((s,i)=>s[0]{let o=i??0;for(;o!=null;){const a=s[o],l=a==null?void 0:a.slice(0,t.search.length);if(l&&e.compare(l,t.search)===0)return o;if(o{const a=iB(s.key);if(!a||s.ctrlKey||s.metaKey)return null;a===" "&&t.search.trim().length>0&&(s.preventDefault(),s.stopPropagation()),t.search+=a;let l=n(i,o);return l==null&&(l=n(i,0)),clearTimeout(t.timeout),t.timeout=setTimeout(()=>{t.search=""},500),l??null}}}function iB(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}const XT=oe(u.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchOutlined"),tp=y.forwardRef((e,t)=>{const{searchPlaceholder:n,showSearchField:r,children:[s,i],floatingWidth:o="auto",isLoading:a}=e,l=y.useId(),c=U1(),f=V1({...e,clearInputOnItemSelection:!0,showEmptyMessage:r,floatingWidth:c?"auto":o,virtualFocus:r,role:r?"listbox":"menu",loopFocus:!r,children:i.props.children},t),{state:{isOpen:d,setIsOpen:h,activeIndex:p,inputValue:g,setInputValue:b},listboxId:w,focusItem:v,listContent:m,reference:x,onInputChange:_}=f,{handleTriggerKeyDown:S,handleListboxKeyboardNavigation:j,handleListboxSearchFieldKeydown:k}=q1(f),{findMatchingItem:N}=QT(),D=F=>{if(!d)return;const B=N(F,m,p);B!=null&&v("increment",B)};return u.jsx(H1,{onClick:F=>F.stopPropagation(),listbox:f,onKeyDownCapture:r?void 0:D,onKeyDown:j,onClose:r?()=>b(""):void 0,"aria-labelledby":l,isLoading:a,searchField:r?u.jsx(uc,{size:"sm",placeholder:n,startAdornment:u.jsx(XT,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":d?"true":"false","aria-haspopup":"listbox","aria-controls":d?w:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:g,onChange:_,onKeyDown:F=>{k(F)}}):null,children:y.cloneElement(s,{id:l,"aria-expanded":d?"true":"false","aria-haspopup":"menu","aria-controls":d?w:void 0,ref:x,onKeyDown:S,onClick:En(F=>{var B,T;(T=(B=s.props)==null?void 0:B.onClick)==null||T.call(B,F),h(!d)})})})});function np({children:e}){return e}function oB({x:e,y:t},n){return{getBoundingClientRect(){return{x:e,y:t,width:0,height:0,top:t,right:e,bottom:t,left:e}},contextElement:n}}function aB(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qa(e){let{children:t,type:n,disableInitialTransition:r,isDismissable:s=!0,moveFocusToDialog:i=!0,returnFocusToTrigger:o=!0,triggerOnHover:a=!1,triggerOnContextMenu:l=!1,usePortal:c=!0,mobileType:f,alwaysReturnCurrentValueOnClose:d}=e;const h=y.useRef(null),p=l&&!e.triggerRef?h:e.triggerRef,g=y.useRef(e.value),[b,w]=ha(e.isOpen,e.defaultIsOpen,e.onOpenChange),[v,m]=ha(e.value,e.defaultValue,e.onValueChange);U1()&&n==="popover"&&(n=f||"modal");const _=y.useRef(null),{x:S,y:j,reference:k,strategy:N,refs:D}=e1({...e,disablePositioning:n==="modal"}),F=n==="popover"?{position:N,top:j??"",left:S??""}:{},B=y.useId(),T=`${B}-label`,E=`${B}-description`,C=`${B}-form`,A=aB(e.onClose),$=y.useCallback(de=>{typeof de>"u"&&d&&(de=v);const St=typeof de<"u"?de:g.current;A==null||A(St,{initialValue:g.current,valueChanged:St!==g.current}),w(!1)},[A,w,v,d]),L=y.useCallback(()=>{w(!0),g.current=e.value},[e.value,w]);On(()=>{p!=null&&p.current&&D.reference.current!==p.current&&k(p.current)},[k,p==null?void 0:p.current,D]);const I=y.useMemo(()=>({"aria-labelledby":T,"aria-describedby":E}),[T,E]);let q;n==="modal"?q=WV:n==="tray"?q=qT:q=Ll;const H=y.useMemo(()=>({dialogProps:I,type:n,labelId:T,descriptionId:E,isDismissable:s,close:$,value:v,initialValue:g.current,setValue:m,formId:C}),[$,E,I,C,T,n,s,v,m]);a=a&&n==="popover";const Y={onPointerEnter:En(de=>{L()}),onPointerLeave:En(de=>{_.current=setTimeout(()=>{$()},150)})},te={onPointerEnter:En(de=>{_.current&&clearTimeout(_.current)}),onPointerLeave:En(de=>{$()})},ce={onContextMenu:En(de=>{de.preventDefault(),h.current=oB({x:de.clientX,y:de.clientY},de.currentTarget),L()})},ve={onClick:En(de=>{de.stopPropagation(),b?$():L()})},{dialogTrigger:et,dialog:pe}=lB(t,H),Oe=u.jsx(Aa,{initial:!r,children:b&&u.jsx(Eh.Provider,{value:H,children:u.jsx(q,{...a?te:{},ref:D.setFloating,triggerRef:D.reference,style:F,restoreFocus:o,autoFocus:i,isOpen:b,onClose:$,isDismissable:s,isContextMenu:l,placement:e.placement,children:pe})})});return u.jsxs(y.Fragment,{children:[et&&y.cloneElement(et,Jr({...!p&&!l?{ref:k}:{},...l?{}:ve,...a?Y:{},...l?ce:{}},{...et.props})),c?Bs&&Pa.createPortal(Oe,Bs):Oe]})}function lB(e,t){const n=Array.isArray(e)?e:y.Children.toArray(e);let r=n.length===2?n[1]:n[0];return r=typeof r=="function"?r(t):r,n.length===2?{dialogTrigger:n[0],dialog:r}:{dialog:r}}const JT=oe(u.jsx("path",{d:"M 23.898438 47 C 13.65625 47 5.003906 38.355469 5.003906 28.125 L 5.003906 28 C 4.929688 23.074219 6.558594 19.714844 7.261719 18.5 C 8.621094 16.152344 10.296875 14.410156 10.8125 14.136719 C 11.566406 13.734375 12.121094 14.332031 12.363281 14.585938 C 12.832031 15.085938 12.597656 15.695313 12.507813 15.925781 C 11.613281 18.265625 10.929688 20.28125 11.003906 23.097656 C 11.097656 26.90625 12.488281 28.699219 13.085938 29.292969 C 13.460938 29.671875 13.769531 29.847656 14.015625 29.933594 C 14.054688 28.671875 14.203125 26.148438 14.773438 23.304688 C 15.113281 21.589844 16.28125 17.085938 19.6875 12.296875 C 23.714844 6.632813 28.449219 4.273438 29.214844 4.042969 C 30.570313 3.636719 33.535156 3.128906 35.957031 3.019531 C 38.53125 2.910156 39.160156 3.574219 39.921875 5.035156 L 40.046875 5.277344 C 41.820313 8.613281 45.03125 18.832031 43.65625 29.132813 C 42.011719 39.992188 34.257813 47 23.898438 47 Z M 14.648438 30 C 14.640625 30 14.632813 30 14.628906 30 L 14.652344 30 C 14.648438 30 14.648438 30 14.648438 30 Z "})),uB=le("Continue with google"),cB=le("Continue with facebook"),fB=le("Continue with twitter"),dB=le("Continue with envato");function ZT({dividerMessage:e}){var c,f,d,h,p,g,b,w;const{social:t}=fe(),n=Mn(),{getRedirectUri:r}=yt(),{loginWithSocial:s,requestingPassword:i,setIsRequestingPassword:o}=UT();if(!((c=t==null?void 0:t.google)!=null&&c.enable)&&!((f=t==null?void 0:t.facebook)!=null&&f.enable)&&!((d=t==null?void 0:t.twitter)!=null&&d.enable)&&!((h=t==null?void 0:t.envato)!=null&&h.enable))return null;const l=async v=>{const m=await s(v);((m==null?void 0:m.status)==="SUCCESS"||(m==null?void 0:m.status)==="ALREADY_LOGGED_IN")&&n(r(),{replace:!0})};return u.jsxs(y.Fragment,{children:[u.jsx("div",{className:"relative my-20 text-center before:absolute before:left-0 before:top-1/2 before:h-1 before:w-full before:-translate-y-1/2 before:bg-divider",children:u.jsx("span",{className:"relative z-10 bg-paper px-10 text-sm text-muted",children:e})}),u.jsxs("div",{className:V("flex items-center justify-center gap-14",!t.compact_buttons&&"flex-col"),children:[(p=t==null?void 0:t.google)!=null&&p.enable?u.jsx(Kc,{label:uB,icon:u.jsx(zT,{viewBox:"0 0 48 48"}),onClick:()=>l("google")}):null,(g=t==null?void 0:t.facebook)!=null&&g.enable?u.jsx(Kc,{label:cB,icon:u.jsx(VT,{className:"text-facebook"}),onClick:()=>l("facebook")}):null,(b=t==null?void 0:t.twitter)!=null&&b.enable?u.jsx(Kc,{label:fB,icon:u.jsx(BT,{className:"text-twitter"}),onClick:()=>l("twitter")}):null,(w=t==null?void 0:t.envato)!=null&&w.enable?u.jsx(Kc,{label:dB,icon:u.jsx(JT,{viewBox:"0 0 50 50",className:"text-envato"}),onClick:()=>l("envato")}):null]}),u.jsx(Qa,{type:"modal",isOpen:i,onOpenChange:o,children:u.jsx(hB,{})})]})}function hB(){const e=Xt(),{formId:t}=Ju(),n=FV(e);return u.jsxs(Da,{children:[u.jsx(Ma,{children:u.jsx(P,{message:"Password required"})}),u.jsxs(Fa,{children:[u.jsx("div",{className:"mb-30 text-sm text-muted",children:u.jsx(P,{message:"An account with this email address already exists. If you want to connect the two accounts, enter existing account password."})}),u.jsx(Jt,{form:e,id:t,onSubmit:r=>{n.mutate(r)},children:u.jsx(Ie,{autoFocus:!0,name:"password",type:"password",required:!0,label:u.jsx(P,{message:"Password"})})})]}),u.jsxs(Zh,{children:[u.jsx(se,{variant:"text",children:u.jsx(P,{message:"Cancel"})}),u.jsx(se,{type:"submit",form:t,variant:"flat",color:"primary",disabled:n.isPending,children:u.jsx(P,{message:"Connect"})})]})]})}function Kc({onClick:e,label:t,icon:n}){const{trans:r}=Dn(),{social:{compact_buttons:s}}=fe();return s?u.jsx(Yn,{variant:"outline","aria-label":r(t),onClick:e,children:n}):u.jsx(se,{variant:"outline",startIcon:n,onClick:e,className:"min-h-42 w-full",children:u.jsx("span",{className:"min-w-160 text-start",children:u.jsx(P,{...t})})})}function pB(){const{branding:e}=fe();return u.jsxs("div",{className:"pt-42 pb-32 flex items-center gap-30 text-sm text-muted mt-auto",children:[u.jsxs(Xe,{className:"hover:text-fg-base transition-colors",to:"/",children:["© ",e.site_name]}),u.jsx(Dd,{menu:"auth-page-footer",orientation:"horizontal",itemClassName:"hover:text-fg-base transition-colors"})]})}const mB=""+new URL("auth-bg-8529ec0e.svg",import.meta.url).href;function cc({heading:e,children:t,message:n}){const{branding:r}=fe(),s=Gh(),{trans:i}=Dn();return u.jsxs("main",{className:"flex h-screen flex-col items-center overflow-y-auto bg-alt px-14 pt-70 dark:bg-none md:px-10vw",style:{backgroundImage:s?void 0:`url("${mB}")`},children:[u.jsx(Xe,{to:"/",className:"mb-40 block flex-shrink-0","aria-label":i({message:"Go to homepage"}),children:u.jsx("img",{src:s?r.logo_light:r==null?void 0:r.logo_dark,className:"m-auto block h-42 w-auto",alt:""})}),u.jsxs("div",{className:"mx-auto w-full max-w-440 rounded-lg bg px-40 pb-32 pt-40 shadow md:shadow-xl",children:[e&&u.jsx("h1",{className:"mb-20 text-xl",children:e}),t]}),n&&u.jsx("div",{className:"mt-36 text-sm",children:n}),u.jsx(pB,{})]})}const gB=oe(u.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlankOutlined"),yB=oe(u.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),K_=oe(u.jsx("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z"}),"CheckBox"),W1=y.forwardRef((e,t)=>{const{size:n="md",children:r,className:s,icon:i,checkedIcon:o,disabled:a,isIndeterminate:l,errorMessage:c,invalid:f,orientation:d="horizontal",onChange:h,autoFocus:p,required:g,value:b,name:w,inputTestId:v}=e,m=Ya({...e,label:r}),x=i||gB,_=o||(l?K_:yB),S=La(t);Xh({autoFocus:p},S),y.useEffect(()=>{S.current&&(S.current.indeterminate=l||!1)});const[j,k]=ha(e.checked,e.defaultChecked||!1),N=y.useCallback(T=>{h==null||h(T),k(T.target.checked)},[h,k]),D=V("select-none",s,f&&"text-danger",!f&&a&&"text-disabled");let F,B=f?"text-danger":null;return l?(F=K_,B=B||"text-primary"):j?(F=_,B=B||"text-primary"):(F=x,B=B||"text-muted"),u.jsxs("div",{children:[u.jsx("label",{className:D,children:u.jsxs("div",{className:V("relative flex items-center",d==="vertical"&&"flex-col flex-col-reverse"),children:[u.jsx("input",{className:"absolute left-0 top-0 h-24 w-24 appearance-none overflow-hidden rounded outline-none ring-inset transition-shadow focus-visible:ring",type:"checkbox","aria-checked":l?"mixed":j,"aria-invalid":f||void 0,onChange:N,ref:S,required:g,disabled:a,value:b,name:w,"data-testid":v}),u.jsx(F,{size:n,className:V("pointer-events-none",a?"text-disabled":B)}),r&&u.jsx("div",{className:V("first-letter:capitalize",m.size.font,d==="vertical"?"mb-6":"ml-6"),children:r})]})}),c&&u.jsx("div",{className:m.error,children:c})]})});function eP(e){const{field:{onChange:t,onBlur:n,value:r=!1,ref:s},fieldState:{invalid:i,error:o}}=Ga({name:e.name}),a={onChange:t,onBlur:n,checked:r,invalid:i,errorMessage:o==null?void 0:o.message,name:e.name};return u.jsx(W1,{ref:s,...Jr(a,e)})}function tP(e){const{recaptcha:{site_key:t,enable:n}={}}=fe(),r=t&&(n==null?void 0:n[e]),[s,i]=y.useState(!1);return y.useEffect(()=>{r&&nP(t)},[r,t]),{verify:y.useCallback(async()=>{if(!r)return!0;i(!0);const a=await vB(t,e);return a||be.danger(le("Could not verify you are human.")),i(!1),a},[r,t,e]),isVerifying:s}}async function vB(e,t){return await nP(e),new Promise(n=>{var r;(r=window.grecaptcha)==null||r.ready(async()=>{var o;const s=await((o=window.grecaptcha)==null?void 0:o.execute(e,{action:t})),i=re.post("recaptcha/verify",{token:s}).then(a=>a.data.success).catch(()=>!1);n(i??!1)})})}function nP(e){return FT.loadAsset(`https://www.google.com/recaptcha/api.js?render=${e}`,{id:"recaptcha-js"})}const xB=window.requestAnimationFrame,bB=window.cancelAnimationFrame,rP="data-be-helmet";let Gc;const K1=y.memo(({children:e,tags:t})=>{const{trans:n}=Dn();return!t&&e&&(t=wB(e,n)),SB(t),null},Ri);function wB(e,t){return y.Children.map(e,n=>{switch(n.type){case"title":return{nodeName:"title",_text:sP(n.props.children,t)};case"meta":return{...n.props,nodeName:"meta"}}})}function sP(e,t){return e==null?"":typeof e=="string"?e:Array.isArray(e)?e.map(n=>sP(n,t)).join(""):"message"in e?t(e):t(e.props)}function _B(){document.head.querySelectorAll('meta:not([data-keep]), script[type="application/ld+json"]:not([data-keep]), title, link[rel="canonical"]').forEach(e=>{document.head.removeChild(e)})}function SB(e){Gc&&bB(Gc),Gc=xB(()=>{if(_B(),typeof e=="string"){const t=document.createElement("template");t.innerHTML=e,t.content.childNodes.forEach(n=>{n instanceof HTMLElement&&(n.setAttribute(rP,"true"),document.head.prepend(n))})}else e==null||e.forEach(t=>{EB(t)});Gc=null})}function EB(e){if(e.nodeName==="title"){typeof e._text<"u"&&document.title!==e._text&&(document.title=e._text);return}const t=document.createElement(e.nodeName);for(const n in e){const r=n;if(r!=="nodeName")if(r==="_text")t.textContent=typeof e._text=="string"?e._text:JSON.stringify(e._text);else{const s=e[r]==null?"":e[r];t.setAttribute(r,s)}}t.setAttribute(rP,"true"),document.head.prepend(t)}function es({children:e}){const{branding:{site_name:t}}=fe();return u.jsx(K1,{children:e?u.jsxs("title",{children:[e," - ",t]}):void 0})}function By(){const{branding:e,registration:{disable:t},social:n}=fe(),{auth:r}=y.useContext(Xr),{verify:s,isVerifying:i}=tP("register"),{pathname:o}=Jn(),[a]=l1(),l=o.includes("workspace"),c=a.get("redirectFrom")==="pricing",f=a.get("email")||void 0,d=Xt({defaultValues:{email:f}}),h=DV(d);if(t)return u.jsx(Hs,{to:"/login",replace:!0});let p=u.jsx(P,{message:"Create a new account"});l?p=u.jsx(P,{values:{siteName:e==null?void 0:e.site_name},message:"To join your team on :siteName, create an account"}):c&&(p=u.jsx(P,{message:"First, let's create your account"}));const g=u.jsx(P,{values:{a:b=>u.jsx(Xe,{className:Ws,to:"/login",children:b})},message:"Already have an account? Sign in."});return u.jsxs(cc,{heading:p,message:g,children:[u.jsx(es,{children:u.jsx(P,{message:"Register"})}),u.jsxs(Jt,{form:d,onSubmit:async b=>{await s()&&h.mutate(b)},children:[u.jsx(Ie,{className:"mb-32",name:"email",type:"email",disabled:!!f,label:u.jsx(P,{message:"Email"}),required:!0}),u.jsx(Ie,{className:"mb-32",name:"password",type:"password",label:u.jsx(P,{message:"Password"}),required:!0}),u.jsx(Ie,{className:"mb-32",name:"password_confirmation",type:"password",label:u.jsx(P,{message:"Confirm password"}),required:!0}),r!=null&&r.registerFields?u.jsx(r.registerFields,{}):null,u.jsx(CB,{}),u.jsx(se,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:h.isPending||i,children:u.jsx(P,{message:"Create account"})}),u.jsx(ZT,{dividerMessage:n.compact_buttons?u.jsx(P,{message:"Or sign up with"}):u.jsx(P,{message:"OR"})})]})]})}function CB(){const{registration:{policies:e}}=fe();return e?u.jsx("div",{className:"mb-32",children:e.map(t=>u.jsx(eP,{name:t.id,className:"mb-4 block",required:!0,children:u.jsx(P,{message:"I accept the :name",values:{name:u.jsx(M1,{unstyled:!0,className:()=>Ws,item:t})}})},t.id))}):null}const iP=e=>`custom-pages/${e}`;function jB(e){const t=a1();return e||(e=t.pageId),Xn({queryKey:[iP(e)],queryFn:()=>kB(e),initialData:()=>{var r;const n=(r=In().loaders)==null?void 0:r.customPage;if(n!=null&&n.page&&(n.page.id==e||n.page.slug==e))return n}})}function kB(e){return re.get(iP(e)).then(t=>t.data)}const oP=oe(u.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"}),"NotificationsOutlined");function aP({children:e,className:t,withBorder:n=!0,top:r="top-2",right:s="right-4"}){return u.jsx("span",{className:V("absolute flex items-center justify-center whitespace-nowrap rounded-full bg-warning text-xs font-bold text-white shadow",n&&"border-2 border-white",e?"h-18 w-18":"h-12 w-12",t,r,s),children:e})}const lP=oe(u.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"}),"DoneAllOutlined");function G1({image:e,title:t,description:n,action:r,className:s,size:i="md",imageHeight:o,imageMargin:a="mb-24"}){const l=TB(i,o);return u.jsxs("div",{className:V("text-center",s),children:[e&&u.jsx("div",{className:V(l.image,a),children:e}),t&&u.jsx("div",{className:V(l.title,"mb-2 text-main"),children:t}),n&&u.jsx("div",{className:V(l.description,"text-muted"),children:n}),r&&u.jsx("div",{className:"mt-20",children:r})]})}function TB(e,t){switch(e){case"xs":return{image:t||"h-60",title:"text-sm",description:"text-xs"};case"sm":return{image:t||"h-80",title:"text-base",description:"text-sm"};default:return{image:t||"h-128",title:"text-lg",description:"text-base"}}}const PB=""+new URL("notify-d1de4ec3.svg",import.meta.url).href;function uP(){const{notif:e}=fe();return u.jsx(G1,{size:"sm",image:u.jsx(P0,{src:PB}),title:u.jsx(P,{message:"Hang tight!"}),description:u.jsx(P,{message:"Notifications will start showing up here soon."}),action:e.subs.integrated&&u.jsx(se,{elementType:Xe,variant:"outline",to:"/notifications/settings",size:"xs",color:"primary",children:u.jsx(P,{message:"Notification settings"})})})}const cP=oe(u.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined");function RB({className:e}){const{user:t}=yt(),{notif:n}=fe(),r=Gn(),s=r1(),i=!!(t!=null&&t.unread_notifications_count),o=()=>{r.data&&s.mutate({markAllAsUnread:!0})};return u.jsxs(Qa,{type:"popover",children:[u.jsx(Yn,{size:"md",className:e,badge:i?u.jsx(aP,{className:"max-md:hidden",children:t==null?void 0:t.unread_notifications_count}):void 0,children:u.jsx(oP,{})}),u.jsxs(Da,{children:[u.jsx(Ma,{showDivider:!0,actions:!i&&n.subs.integrated&&u.jsx(Yn,{className:"text-muted",size:"sm",elementType:Xe,to:"/notifications/settings",target:"_blank",children:u.jsx(cP,{})}),rightAdornment:i&&u.jsx(se,{variant:"text",color:"primary",size:"xs",startIcon:u.jsx(lP,{}),onClick:o,disabled:s.isPending,className:"max-md:hidden",children:u.jsx(P,{message:"Mark all as read"})}),children:u.jsx(P,{message:"Notifications"})}),u.jsx(Fa,{padding:"p-0",children:u.jsx(NB,{})})]})]})}function NB(){const{data:e,isLoading:t}=Gn();return t?u.jsx("div",{className:"flex items-center justify-center px-24 py-20",children:u.jsx(Qs,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):e!=null&&e.pagination.data.length?u.jsx("div",{children:u.jsx(x4,{notifications:e.pagination.data})}):u.jsx("div",{className:"px-24 py-20",children:u.jsx(uP,{})})}const OB=oe(u.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuOutlined"),Y1=oe(u.jsx("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"PersonOutlined"),AB=oe(u.jsx("path",{d:"m7 10 5 5 5-5H7z"}),"ArrowDropDownOutlined"),$B=oe(u.jsx("path",{d:"M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-2 0H3V6h14v8zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm13 0v11c0 1.1-.9 2-2 2H4v-2h17V7h2z"}),"PaymentsOutlined"),IB=oe(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33C4.62 15.49 4 13.82 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"}),"AccountCircleOutlined"),fP=oe(u.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49zM12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"}),"DarkModeOutlined"),LB=oe(u.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}),"LightModeOutlined"),DB=oe(u.jsx("path",{d:"M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"ExitToAppOutlined");function MB({children:e,items:t}){const{auth:n}=y.useContext(Xr),r=N1(),s=D1("auth-dropdown"),{notifications:i,themes:o}=fe(),{user:a,isSubscribed:l}=yt(),c=Mn(),{selectedTheme:f,selectTheme:d}=Nh();if(!f||!a)return null;const h=!!a.unread_notifications_count,p=u.jsxs(Bt,{className:"md:hidden",value:"notifications",startIcon:u.jsx(oP,{}),onSelected:()=>{c("/notifications")},children:[u.jsx(P,{message:"Notifications"}),h?` (${a.unread_notifications_count})`:void 0]}),g=u.jsx(Bt,{value:"billing",startIcon:u.jsx($B,{}),onSelected:()=>{c("/billing")},children:u.jsx(P,{message:"Billing"})});return u.jsxs(tp,{children:[e,u.jsxs(np,{children:[s&&s.items.map(b=>{const w=b.icon&&gh(b.icon);return u.jsx(Bt,{value:b.id,startIcon:w&&u.jsx(w,{}),onSelected:()=>{b.type==="link"?window.open(b.action,"_blank"):c(b.action)},children:u.jsx(P,{message:b.label})},b.id)}),n.getUserProfileLink&&u.jsx(Bt,{value:"profile",startIcon:u.jsx(IB,{}),onSelected:()=>{c(n.getUserProfileLink(a))},children:u.jsx(P,{message:"Profile page"})}),t==null?void 0:t.map(b=>b),i!=null&&i.integrated?p:void 0,l&&g,(o==null?void 0:o.user_change)&&!f.is_dark&&u.jsx(Bt,{value:"light",startIcon:u.jsx(fP,{}),onSelected:()=>{d("dark")},children:u.jsx(P,{message:"Dark mode"})}),(o==null?void 0:o.user_change)&&f.is_dark&&u.jsx(Bt,{value:"dark",startIcon:u.jsx(LB,{}),onSelected:()=>{d("light")},children:u.jsx(P,{message:"Light mode"})}),u.jsx(Bt,{value:"logout",startIcon:u.jsx(DB,{}),onSelected:()=>{r.mutate()},children:u.jsx(P,{message:"Log out"})})]})]})}function FB({items:e=[]}){const{user:t}=yt(),{selectedTheme:n}=Nh();if(!n||!t)return null;const r=!!t.unread_notifications_count,s=u.jsx(Yn,{size:"md",className:"md:hidden",role:"presentation","aria-label":"toggle authentication menu",badge:r?u.jsx(aP,{children:t.unread_notifications_count}):void 0,children:u.jsx(Y1,{})}),i=u.jsxs(yh,{className:"flex items-center max-md:hidden",role:"presentation",children:[u.jsx("img",{className:"mr-12 h-32 w-32 flex-shrink-0 rounded object-cover",src:t.avatar,alt:""}),u.jsx("span",{className:"mr-2 block max-w-124 overflow-x-hidden overflow-ellipsis text-sm",children:t.display_name}),u.jsx(AB,{className:"block icon-sm"})]});return u.jsx(MB,{items:e,children:u.jsxs("span",{role:"button",children:[s,i]})})}function UB({primaryButtonColor:e,navbarColor:t}){return e||(e=t==="primary"?"paper":"primary"),u.jsxs(y.Fragment,{children:[u.jsx(VB,{}),u.jsx(zB,{primaryButtonColor:e})]})}function zB({primaryButtonColor:e}){const{registration:t}=fe();return u.jsxs("div",{className:"text-sm max-md:hidden",children:[!t.disable&&u.jsx(se,{elementType:Xe,to:"/register",variant:"text",className:"mr-10",children:u.jsx(P,{message:"Register"})}),u.jsx(se,{elementType:Xe,to:"/login",variant:"raised",color:e,children:u.jsx(P,{message:"Login"})})]})}function VB(){const{registration:e}=fe(),t=Mn();return u.jsxs(tp,{children:[u.jsx(Yn,{size:"md",className:"md:hidden",children:u.jsx(Y1,{})}),u.jsxs(np,{children:[u.jsx(Bt,{value:"login",onSelected:()=>t("/login"),children:u.jsx(P,{message:"Login"})}),!e.disable&&u.jsx(Bt,{value:"register",onSelected:()=>t("/register"),children:u.jsx(P,{message:"Register"})})]})]})}function BB(){var n;const{data:e}=zt();if(!Gh())return(n=e.themes.all.find(r=>r.is_dark&&r.default_dark))==null?void 0:n.values}function HB({color:e,logoColor:t,isDarkMode:n,className:r}){const{trans:s}=Dn(),{branding:i}=fe();let o,a;return n||!i.logo_dark||t!=="dark"&&e!=="bg"&&e!=="bg-alt"?(o=i.logo_light,a=i.logo_light_mobile):(o=i.logo_dark,a=i.logo_dark_mobile),!a&&!o?null:u.jsx(Xe,{to:"/",className:V("mr-4 block h-full max-h-26 flex-shrink-0 md:mr-24 md:max-h-36",r),"aria-label":s({message:"Go to homepage"}),children:u.jsxs("picture",{children:[u.jsx("source",{srcSet:a||o,media:"(max-width: 768px)"}),u.jsx("source",{srcSet:o,media:"(min-width: 768px)"}),u.jsx("img",{className:"block h-full max-h-26 w-auto md:max-h-36",alt:s({message:"Site logo"})})]})})}function qB(){var t;const{data:e}=zt();return(t=e.themes.all.find(n=>!n.is_dark&&n.default_light))==null?void 0:t.values}function Hi(e){let{hideLogo:t,toggleButton:n,children:r,className:s,border:i,size:o="md",color:a,textColor:l,darkModeColor:c,rightChildren:f,menuPosition:d,logoColor:h,primaryButtonColor:p,authMenuItems:g,alwaysDarkMode:b=!1,wrapInContainer:w=!1}=e;const v=Gh()||b,{notifications:m}=fe(),{isLoggedIn:x}=yt(),_=BB(),S=qB(),j=x&&(m==null?void 0:m.integrated);return a=a??(S==null?void 0:S["--be-navbar-color"])??"primary",c=c??(c==null?void 0:c["--be-navbar-color"])??"bg-alt",v&&(a=c),u.jsx("div",{style:b?_:void 0,className:V(GB(a,l),o==="md"&&"h-64 py-8",o==="sm"&&"h-54 py-4",o==="xs"&&"h-48 py-4",i,s),children:u.jsxs("div",{className:V("flex h-full items-center justify-end gap-10 pl-14 pr-8 md:pl-20 md:pr-20",w&&"container mx-auto"),children:[!t&&u.jsx(HB,{isDarkMode:v,color:a,logoColor:h}),n,r,u.jsx(KB,{position:d}),u.jsx(WB,{position:d}),u.jsxs("div",{className:"ml-auto flex items-center gap-4 md:gap-14",children:[f,j&&u.jsx(RB,{}),x?u.jsx(FB,{items:g}):u.jsx(UB,{navbarColor:a,primaryButtonColor:p})]})]})})}function WB({position:e}){return u.jsx(Dd,{className:"mx-14 text-sm max-md:hidden",itemClassName:t=>V("opacity-90 hover:underline hover:opacity-100",t&&"opacity-100"),menu:e})}function KB({position:e}){const t=Mn(),n=D1(e);if(!(n!=null&&n.items.length))return null;const r=s=>{var i;Ia(s.action)?(i=window.open(s.action,s.target))==null||i.focus():t(s.action)};return u.jsxs(tp,{children:[u.jsx(Yn,{className:"md:hidden","aria-label":"Toggle menu",children:u.jsx(OB,{})}),u.jsx(np,{children:n.items.map(s=>{const i=s.icon&&gh(s.icon);return u.jsx(Bt,{value:s.action,onSelected:()=>r(s),startIcon:i&&u.jsx(i,{}),children:u.jsx(P,{message:s.label})},s.id)})})]})}function GB(e,t){switch(e){case"primary":return`bg-primary ${t||"text-on-primary"} border-b-primary`;case"bg":return`bg ${t||"text-main"} border-b`;case"bg-alt":return`bg-alt ${t||"text-main"} border-b`;case"transparent":return`bg-transparent ${t||"text-white"}`;default:return`${e} ${t}`}}function dP(e,t,n={}){return Xn({queryKey:["value-lists",e,t],queryFn:()=>YB(e,t),staleTime:t?void 0:1/0,placeholderData:dC,enabled:!n.disabled,initialData:()=>{const r=qe.getQueriesData({queryKey:["ValueLists"]}).find(([,s])=>s&&e.every(i=>s[i])?s:null);if(r)return r[1]}})}function YB(e,t){return re.get(`value-lists/${e}`,{params:t}).then(n=>n.data)}const hP=oe(u.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"LanguageOutlined");function pP(){const{mergeBootstrapData:e}=zt();return we({mutationFn:t=>QB(t),onSuccess:t=>{e({i18n:t.locale})},onError:t=>gt(t)})}function QB(e){return re.post("users/me/locale",e).then(t=>t.data)}function XB(){const{locale:e}=zi(),t=pP(),{data:n}=dP(["localizations"]),{i18n:r}=fe();return!(n!=null&&n.localizations)||!e||!r.enable?null:u.jsxs(tp,{floatingWidth:"matchTrigger",selectionMode:"single",selectedValue:e.language,onSelectionChange:s=>{const i=s;i!==(e==null?void 0:e.language)&&t.mutate({locale:i})},children:[u.jsx(se,{disabled:t.isPending,className:"capitalize",startIcon:u.jsx(hP,{}),endIcon:u.jsx(n1,{}),children:e.name}),u.jsx(np,{children:n.localizations.map(s=>u.jsx(Bt,{value:s.language,className:"capitalize",children:s.name},s.language))})]})}const JB=oe(u.jsx("path",{d:"M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"}),"LightbulbOutlined");function fc({className:e,padding:t}){const n=new Date().getFullYear(),{branding:r}=fe();return u.jsxs("footer",{className:V("text-sm",t||"pb-28 pt-54 md:pb-54",e),children:[u.jsx(ZB,{}),u.jsxs("div",{className:"items-center justify-between gap-30 text-center text-muted md:flex md:text-left",children:[u.jsx(P,{message:"Copyright © :year :name, All Rights Reserved",values:{year:n,name:r.site_name}}),u.jsxs("div",{children:[u.jsx(eH,{}),u.jsx(XB,{})]})]})]})}function ZB(){const e=fe(),t=e.menus.find(r=>{var s;return(s=r.positions)==null?void 0:s.includes("footer")}),n=e.menus.find(r=>{var s;return(s=r.positions)==null?void 0:s.includes("footer-secondary")});return!t&&!n?null:u.jsxs("div",{className:"mb-14 items-center justify-between gap-30 overflow-x-auto border-b pb-14 md:flex",children:[t&&u.jsx(Dd,{menu:t,className:"text-primary"}),n&&u.jsx(Dd,{menu:n,className:"mb:mt-0 mt-14 text-muted"})]})}function eH(){const{themes:e}=fe(),{selectedTheme:t,selectTheme:n}=Nh();return!t||!(e!=null&&e.user_change)?null:u.jsx(se,{variant:"text",startIcon:t.is_dark?u.jsx(fP,{}):u.jsx(JB,{}),onClick:()=>{t.is_dark?n("light"):n("dark")},children:t.is_dark?u.jsx(P,{message:"Light mode"}):u.jsx(P,{message:"Dark mode"})})}function tH({page:e}){const t=y.useRef(null);return y.useEffect(()=>{t.current&&q8(t.current)},[]),u.jsx("div",{className:"px-16 md:px-24",children:u.jsxs("div",{className:"custom-page-body prose mx-auto my-50 dark:prose-invert",children:[u.jsx("h1",{children:e.title}),u.jsx("div",{ref:t,className:"whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:e.body}})]})})}function mP(){const{data:{default_meta_tags:e}}=zt();return u.jsx(K1,{tags:e})}function nH({query:e}){var t,n;return(t=e.data)!=null&&t.set_seo?null:(n=e.data)!=null&&n.seo?u.jsx(K1,{tags:e.data.seo}):u.jsx(mP,{})}function rH(){return u.jsx(G1,{className:"mt-40",image:u.jsx("div",{children:u.jsx(t1,{size:"xl"})}),imageHeight:"h-auto",title:u.jsx(P,{message:"There was an issue loading this page"}),description:u.jsx(P,{message:"Please try again later"})})}const sH={delay:500,minDuration:200};function iH(e,t){t=Object.assign({},sH,t);const[n,r]=y.useState("IDLE"),s=y.useRef(null);return y.useEffect(()=>{e&&n==="IDLE"&&(clearTimeout(s.current),s.current=setTimeout(()=>{if(!e)return r("IDLE");s.current=setTimeout(()=>{r("EXPIRE")},t==null?void 0:t.minDuration),r("DISPLAY")},t==null?void 0:t.delay),r("DELAY")),!e&&n!=="DISPLAY"&&(clearTimeout(s.current),r("IDLE"))},[e,n,t.delay,t.minDuration]),y.useEffect(()=>()=>clearTimeout(s.current),[]),n==="DISPLAY"||n==="EXPIRE"}function oH({query:e,show404:t=!0,loader:n,loaderClassName:r,loaderIsScreen:s=!0,delayedSpinner:i=!0,redirectOn404:o}){const{isLoggedIn:a}=yt(),l=iH(e.isLoading,{delay:500,minDuration:200});return e.isLoading?!l&&i?null:n||u.jsx(To,{className:r,screen:s}):e.isError&&(Co(e.error,401)||Co(e.error,403))&&!a?u.jsx(Hs,{to:"/login",replace:!0}):t&&e.isError&&Co(e.error,404)?o?u.jsx(Hs,{to:o,replace:!0}):u.jsx(F1,{}):u.jsx(rH,{})}function Hy({slug:e}){const{pageSlug:t}=a1(),n=jB(e||t);return y.useEffect(()=>{var r;(r=n.data)!=null&&r.page&&window.scrollTo(0,0)},[n]),u.jsxs("div",{className:"flex flex-col min-h-screen bg",children:[u.jsx(nH,{query:n}),u.jsx(Hi,{menuPosition:"custom-page-navbar",className:"flex-shrink-0 sticky top-0"}),u.jsx("div",{className:"flex-auto",children:n.data?u.jsx(tH,{page:n.data.page}):u.jsx(oH,{query:n,loaderClassName:"mt-80"})}),u.jsx(fc,{className:"mx-14 md:mx-40"})]})}function aH(e){const t=gP();return we({mutationFn:lH,onSuccess:n=>{n.two_factor||t(n)},onError:n=>mn(n,e)})}function gP(){const e=Mn(),{getRedirectUri:t}=yt(),{setBootstrapData:n}=zt();return y.useCallback(r=>{n(r.bootstrapData),e(t(),{replace:!0})},[e,n,t])}function lH(e){return re.post("auth/login",e).then(t=>t.data)}function uH(e){const t=gP();return we({mutationFn:n=>cH(n),onSuccess:n=>{t(n)},onError:n=>mn(n,e)})}function cH(e){return re.post("auth/two-factor-challenge",e).then(t=>t.data)}function fH(){const[e,t]=y.useState(!1),n=Xt(),r=uH(n);return u.jsxs(cc,{children:[u.jsx(es,{children:u.jsx(P,{message:"Two factor authentication"})}),u.jsxs(Jt,{form:n,onSubmit:s=>{r.mutate(s)},children:[u.jsx("div",{className:"mb-32 text-sm",children:u.jsx(P,{message:"Confirm access to your account by entering the authentication code provided by your authenticator application."})}),u.jsx("div",{className:"mb-4",children:e?u.jsx(Ie,{name:"recovery_code",minLength:21,maxLength:21,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(P,{message:"Recovery code"}),autoFocus:!0,required:!0}):u.jsx(Ie,{name:"code",minLength:6,maxLength:6,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(P,{message:"Code"}),autoFocus:!0,required:!0})}),u.jsx("div",{className:"mb-32",children:u.jsx(se,{variant:"link",color:"primary",size:"sm",onClick:()=>t(!e),children:u.jsx(P,{message:"Use recovery code instead"})})}),u.jsx(se,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:r.isPending,children:u.jsx(P,{message:"Continue"})})]})]})}function dH({onTwoFactorChallenge:e}){const[t]=l1(),{pathname:n}=Jn(),r=n.includes("workspace"),s=t.get("email")||void 0,{branding:i,registration:o,site:a,social:l}=fe(),c=y.useContext(Xr),f=a.demo&&!s?hH(c):{},d=Xt({defaultValues:{remember:!0,email:s,...f}}),h=aH(d),p=r?u.jsx(P,{values:{siteName:i==null?void 0:i.site_name},message:"To join your team on :siteName, login to your account"}):u.jsx(P,{message:"Sign in to your account"}),g=!o.disable&&u.jsx(P,{values:{a:w=>u.jsx(Xe,{className:Ws,to:"/register",children:w})},message:"Don't have an account? Sign up."}),b=!!Object.keys(d.formState.errors).length;return u.jsxs(cc,{heading:p,message:g,children:[u.jsx(es,{children:u.jsx(P,{message:"Login"})}),u.jsxs(Jt,{form:d,onSubmit:w=>{h.mutate(w,{onSuccess:v=>{v.two_factor&&e()}})},children:[u.jsx(Ie,{className:"mb-32",name:"email",type:"email",label:u.jsx(P,{message:"Email"}),disabled:!!s,invalid:b,required:!0}),u.jsx(Ie,{className:"mb-12",name:"password",type:"password",label:u.jsx(P,{message:"Password"}),invalid:b,labelSuffix:u.jsx(Xe,{className:Ws,to:"/forgot-password",tabIndex:-1,children:u.jsx(P,{message:"Forgot your password?"})}),required:!0}),u.jsx(eP,{name:"remember",className:"mb-32 block",children:u.jsx(P,{message:"Stay signed in for a month"})}),u.jsx(se,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:h.isPending,children:u.jsx(P,{message:"Continue"})})]}),u.jsx(ZT,{dividerMessage:l.compact_buttons?u.jsx(P,{message:"Or sign in with"}):u.jsx(P,{message:"OR"})})]})}function hH(e){if(e.demo.loginPageDefaults==="randomAccount"){const t=Math.floor(Math.random()*100)+1;return{email:`admin@demo${String(t).padStart(3,"0")}.com`,password:"admin"}}else return{email:e.demo.email??"admin@admin.com",password:e.demo.password??"admin"}}function qy(){const[e,t]=y.useState(!1);return e?u.jsx(fH,{}):u.jsx(dH,{onTwoFactorChallenge:()=>t(!0)})}function pH({homepageResolver:e}){const{homepage:t}=fe();return(t==null?void 0:t.type)==="loginPage"?u.jsx(ni,{children:u.jsx(qy,{})}):(t==null?void 0:t.type)==="registerPage"?u.jsx(ni,{children:u.jsx(By,{})}):(t==null?void 0:t.type)==="customPage"?u.jsx(Hy,{slug:t.value}):(e==null?void 0:e(t==null?void 0:t.type))||null}function Nr({variant:e="text",animation:t="wave",size:n,className:r,display:s="block",radius:i="rounded",style:o}){return u.jsx("span",{style:o,className:V("skeleton relative overflow-hidden bg-fg-base/4 bg-no-repeat will-change-transform",i,mH({variant:e,size:n}),s,e==="text"&&"origin-[0_55%] scale-y-[0.6]",e==="avatar"&&"flex-shrink-0",e==="icon"&&"mx-8 flex-shrink-0",t==="wave"&&"skeleton-wave",t==="pulsate"&&"skeleton-pulsate",r),"aria-busy":!0,"aria-live":"polite"})}function mH({variant:e,size:t}){if(t)return t;switch(e){case"avatar":return"h-40 w-40";case"icon":return"h-24 h-24";case"rect":return"h-full w-full";default:return"w-full"}}const yP="billing/products";function Q1(e){return Xn({queryKey:[yP],queryFn:()=>gH(),initialData:()=>{var t;if(e)return(t=In().loaders)==null?void 0:t[e]}})}function gH(){return re.get(yP).then(e=>({products:e.data.pagination.data}))}function Wy(e,t){if(e==="monthly"){const n=vH(t);if(n)return n}if(e==="yearly"){const n=yH(t);if(n)return n}return t[0]}function yH(e){return e.find(t=>{if(t.interval==="month"&&t.interval_count>=12||t.interval==="year"&&t.interval_count>=1)return t})}function vH(e){return e.find(t=>{if(t.interval==="day"&&t.interval_count>=30||t.interval==="month"&&t.interval_count>=1)return t})}const xH=y.memo(({value:e,currency:t})=>{const n=R1({style:"currency",currency:t,currencyDisplay:"narrowSymbol"});return isNaN(e)&&(e=0),u.jsx(y.Fragment,{children:n.format(e)})});function bH({price:e,variant:t="slash",className:n,priceClassName:r,periodClassName:s}){if(!e)return null;const i=u.jsx(P,{message:e.interval});return u.jsxs("div",{className:V("flex gap-6 items-center",n),children:[u.jsx("div",{className:r,children:u.jsx(xH,{value:e.amount/(e.interval_count??1),currency:e.currency})}),t==="slash"?u.jsxs("div",{className:s,children:[" / ",i]}):u.jsxs("div",{className:s,children:[u.jsx(P,{message:"per"})," ",u.jsx("br",{})," ",i]})]})}function wH({product:e}){return e.feature_list.length?u.jsxs("div",{className:"mt-32 border-t pt-24",children:[u.jsx("div",{className:"mb-10 text-sm font-semibold",children:u.jsx(P,{message:"What's included"})}),e.feature_list.map(t=>u.jsxs("div",{className:"flex items-center gap-10 py-6 text-sm",children:[u.jsx(GT,{className:"text-primary",size:"sm"}),u.jsx(P,{message:t})]},t))]}):null}function vP({selectedCycle:e,className:t,productLoader:n}){const r=Q1(n);return u.jsx("div",{className:V("flex flex-col items-stretch gap-24 overflow-x-auto overflow-y-visible pb-20 md:flex-row md:justify-center",t),children:u.jsx(Aa,{initial:!1,mode:"wait",children:r.data?u.jsx(_H,{plans:r.data.products,selectedPeriod:e},"plan-list"):u.jsx(SH,{},"skeleton-loader")})})}function _H({plans:e,selectedPeriod:t}){const{isLoggedIn:n,isSubscribed:r}=yt(),s=e.filter(i=>!i.hidden);return u.jsx(y.Fragment,{children:s.map((i,o)=>{const a=o===0,l=o===s.length-1,c=Wy(t,i.prices);let f;return n||(f="/register?redirectFrom=pricing"),r&&(f=`/change-plan/${i.id}/${c==null?void 0:c.id}/confirm`),n&&!i.free&&(f=`/checkout/${i.id}/${c==null?void 0:c.id}`),u.jsxs(Qr.div,{...ep,className:V("w-full rounded-panel border bg px-28 py-28 shadow-lg md:min-w-240 md:max-w-350",a&&"ml-auto",l&&"mr-auto"),children:[u.jsxs("div",{className:"mb-32",children:[u.jsx(s4,{radius:"rounded",size:"sm",className:V("mb-20 w-min",!i.recommended&&"invisible"),children:u.jsx(P,{message:"Most popular"})}),u.jsx("div",{className:"mb-12 text-xl font-semibold",children:u.jsx(P,{message:i.name})}),u.jsx("div",{className:"text-sm text-muted",children:u.jsx(P,{message:i.description})})]}),u.jsxs("div",{children:[c?u.jsx(bH,{priceClassName:"font-bold text-4xl",periodClassName:"text-muted text-xs",variant:"separateLine",price:c}):u.jsx("div",{className:"text-4xl font-bold",children:u.jsx(P,{message:"Free"})}),u.jsx("div",{className:"mt-60",children:u.jsx(se,{variant:i.recommended?"flat":"outline",color:"primary",className:"w-full",size:"md",elementType:f?Xe:void 0,disabled:!f,onClick:()=>{n||!c||!i||P1("be.onboarding.selected",{productId:i.id,priceId:c.id})},to:f,children:i.free?u.jsx(P,{message:"Get started"}):u.jsx(P,{message:"Upgrade"})})}),u.jsx(wH,{product:i})]})]},i.id)})})}function SH(){return u.jsxs(y.Fragment,{children:[u.jsx(Nm,{},"skeleton-1"),u.jsx(Nm,{},"skeleton-2"),u.jsx(Nm,{},"skeleton-3")]})}function Nm(){return u.jsxs(Qr.div,{...ep,className:"w-full rounded-lg border px-28 py-90 shadow-lg md:max-w-350",children:[u.jsx(Nr,{className:"my-10"}),u.jsx(Nr,{className:"mb-40"}),u.jsx(Nr,{className:"mb-40 h-30"}),u.jsx(Nr,{className:"mb-40 h-40"}),u.jsx(Nr,{className:"mb-20"}),u.jsx(Nr,{}),u.jsx(Nr,{})]})}const Ky=y.forwardRef((e,t)=>{const{children:n,autoFocus:r,size:s,invalid:i,isFirst:o,...a}=e,l=La(t);Xh({autoFocus:r},l);const c=EH(s);return u.jsxs("label",{className:V("inline-flex gap-8 select-none items-center whitespace-nowrap align-middle",c.label,e.disabled&&"text-disabled pointer-events-none",e.invalid&&"text-danger"),children:[u.jsx("input",{type:"radio",className:V("focus-visible:ring outline-none","rounded-full transition-button border-2 appearance-none","border-text-muted disabled:border-disabled-fg checked:border-primary checked:hover:border-primary-dark","before:bg-primary disabled:before:bg-disabled-fg before:hover:bg-primary-dark","before:h-full before:w-full before:block before:rounded-full before:scale-10 before:opacity-0 before:transition before:duration-200","checked:before:scale-[.65] checked:before:opacity-100",c.circle),ref:l,...a}),n&&u.jsx("span",{children:n})]})});function lQ(e){const{field:{onChange:t,onBlur:n,value:r,ref:s},fieldState:{invalid:i}}=Ga({name:e.name}),o={onChange:t,onBlur:n,checked:e.value===r,invalid:e.invalid||i};return u.jsx(Ky,{ref:s,...Jr(o,e)})}function EH(e){switch(e){case"xs":return{circle:"h-12 w-12",label:"text-xs"};case"sm":return{circle:"h-16 w-16",label:"text-sm"};case"lg":return{circle:"h-24 w-24",label:"text-lg"};default:return{circle:"h-20 w-20",label:"text-base"}}}const xP=y.forwardRef((e,t)=>{const n=Ya(e),{label:r,children:s,size:i,className:o,orientation:a="horizontal",disabled:l,required:c,invalid:f,errorMessage:d,description:h}=e,p={},g=y.useId(),b=e.name||g;return u.jsxs("fieldset",{"aria-describedby":h?`${g}-description`:void 0,ref:t,className:V("text-left",o),children:[r&&u.jsx("legend",{className:n.label,...p,children:r}),u.jsx("div",{className:V("flex",r?"mt-6":"mt-0",a==="vertical"?"flex-col gap-10":"flex-row gap-16"),children:y.Children.map(s,w=>{if(y.isValidElement(w))return y.cloneElement(w,{name:b,size:i,invalid:w.props.invalid||f||void 0,disabled:w.props.disabled||l,required:w.props.required||c})})}),h&&!d&&u.jsx("div",{className:n.description,id:`${g}-description`,children:h}),d&&u.jsx("div",{className:n.error,children:d})]})});function uQ({children:e,...t}){const{fieldState:{error:n}}=Ga({name:t.name});return u.jsx(xP,{errorMessage:n==null?void 0:n.message,...t,children:e})}const CH=y.memo(({products:e})=>{const t=jH(e);return t<=0?null:u.jsx(y.Fragment,{children:u.jsxs("span",{className:"font-medium text-positive-darker",children:[" ","(",u.jsx(P,{message:"Save up to :percentage%",values:{percentage:t}}),")"]})})});function jH(e){if(!(e!=null&&e.length))return 0;const t=e.map(n=>{if(n.hidden)return 0;const r=Wy("monthly",n.prices),s=Wy("yearly",n.prices);if(!r||!s)return 0;const i=r.amount*12,o=s.amount,a=Math.round((i-o)/i*100);return a>0&&a<=200?a:0});return Math.max(Math.max(...t),0)}function bP({selectedCycle:e,onChange:t,products:n,...r}){return u.jsxs(xP,{...r,children:[u.jsxs(Ky,{value:"yearly",checked:e==="yearly",onChange:s=>{t(s.target.value)},children:[u.jsx(P,{message:"Annual"}),u.jsx(CH,{products:n})]}),u.jsx(Ky,{value:"monthly",checked:e==="monthly",onChange:s=>{t(s.target.value)},children:u.jsx(P,{message:"Monthly"})})]})}function kH(e,{size:t}={}){if(e)return t||(t="original"),e.includes("image.tmdb")?TH(e,t):`${PH(ok(e),t)}`}function cQ(e){if(e)return e.includes("image.tmdb")||e.includes("themoviedb")?`${e.replace(/original|w1280/,"w300")} 768w, ${e.replace(/original|w1280/,"w780")} 1024w, ${e.replace(/original|w1280/,"w1280")} 1280w`:`${e.replace(/original/,"small")} 768w, ${e.replace(/original/,"medium")} 1024w, ${e.replace(/original/,"large")} 1280w`}function TH(e,t){switch(t){case"sm":return e.replace(/original|w1280/,"w92");case"md":return e.replace(/original|w1280/,"w300");case"lg":return e.replace(/original|w1280/,"w500");default:return e}}function PH(e,t){switch(t){case"sm":return e.replace("original","small");case"md":return e.replace("original","medium");case"lg":return e.replace("original","large");default:return e}}const RH=oe(u.jsx("path",{d:"M4 6.47 5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z"}),"MovieOutlined");function NH(){var t,n;const e=(n=(t=In().loaders)==null?void 0:t.landingPage)==null?void 0:n.trendingTitles;return e!=null&&e.length?u.jsxs("div",{className:"landing-container mb-48 md:mb-80",children:[u.jsx("div",{className:"mb-48 mt-14 h-1 bg-divider md:mb-80"}),u.jsx("h2",{className:"mb-34 text-center text-4xl",children:u.jsx(P,{message:"See what's currently trending."})}),u.jsx("div",{className:"grid grid-cols-3 gap-24",children:e.map(r=>u.jsx(OH,{title:r},r.id))})]}):null}function OH({title:e}){const t=kH(e==null?void 0:e.backdrop,{size:"lg"}),{trans:n}=Dn(),r=V("h-full w-full rounded bg-fg-base/4 object-cover",t?"block":"flex items-center justify-center"),s=t?u.jsx("img",{className:r,draggable:!1,loading:"lazy",src:t,alt:n(le("Poster for :name",{values:{name:e.name}}))}):u.jsx("span",{className:r,children:u.jsx(RH,{className:"max-w-[60%] text-divider",size:"text-6xl"})});return u.jsxs("div",{children:[u.jsx("div",{className:"relative",children:s}),u.jsx("div",{className:"mt-10 text-center text-base font-medium",children:e.name})]})}function AH(){var s,i,o;const e=fe(),t=(s=e.homepage)==null?void 0:s.appearance,n=((i=e.homepage)==null?void 0:i.pricing)&&e.billing.enable,r=(o=e.homepage)==null?void 0:o.trending;return t?u.jsxs(y.Fragment,{children:[u.jsx(mP,{}),u.jsx($H,{content:t}),u.jsx(IH,{content:t}),u.jsx(LH,{content:t}),r&&u.jsx(NH,{}),u.jsx(MH,{content:t}),n&&u.jsx(DH,{content:t}),u.jsx(fc,{className:"landing-container"})]}):null}function $H({content:e}){const{headerTitle:t,headerSubtitle:n,headerImage:r,headerImageOpacity:s,actions:i,headerOverlayColor1:o,headerOverlayColor2:a,blurHeaderImage:l}=e;let c;return o&&a?c=`linear-gradient(45deg, ${o} 0%, ${a} 100%)`:o?c=o:a&&(c=a),u.jsxs("header",{className:"relative isolate mb-14 overflow-hidden md:mb-60",children:[u.jsx("img",{src:r,style:{opacity:s},alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:V("absolute left-1/2 top-1/2 z-20 max-w-none -translate-x-1/2 -translate-y-1/2",l&&"blur-sm")}),c&&u.jsx("div",{className:"absolute z-10 h-full w-full bg-alt",style:{background:c}}),u.jsx("div",{className:"gradient absolute inset-0 z-30 m-auto"}),u.jsxs("div",{className:"relative z-30 flex h-full flex-col",children:[u.jsx(Hi,{color:"transparent",darkModeColor:"transparent",className:"flex-shrink-0",menuPosition:"landing-page-navbar",primaryButtonColor:"white"}),u.jsxs("div",{className:"mx-auto flex max-w-850 flex-auto flex-col items-center justify-center px-14 py-50 text-center text-white lg:py-140",children:[t&&u.jsx("h1",{className:"text-3xl font-normal md:text-5xl","data-testid":"headerTitle",children:u.jsx(P,{message:t})}),n&&u.jsx("div",{className:"max-auto mt-24 max-w-640 text-lg tracking-tight md:text-xl","data-testid":"headerSubtitle",children:u.jsx(P,{message:n})}),u.jsxs("div",{className:"flex min-h-50 gap-20 pb-30 pt-40 empty:min-h-0 md:pb-50 md:pt-60",children:[u.jsx(Gy,{item:i.cta1,variant:"raised",color:"white",size:"lg",radius:"rounded-full",className:"min-w-180"}),u.jsx(Gy,{item:i.cta2,variant:"text",color:"paper",size:"lg",radius:"rounded-full"})]})]})]}),u.jsx("div",{className:"absolute bottom-0 z-20 h-[6vw] w-full translate-y-1/2 -skew-y-3 transform bg"})]})}function Gy({item:e,...t}){if(!(e!=null&&e.label)||!(e!=null&&e.action))return null;const n=e.icon?gh(e.icon):void 0;return u.jsx(se,{elementType:e.type==="route"?Xe:"a",href:e.action,to:e.action,startIcon:n?u.jsx(n,{}):void 0,...t,children:u.jsx(P,{message:e.label})})}function IH({content:e}){var t;return(t=e.primaryFeatures)!=null&&t.length?u.jsxs(y.Fragment,{children:[u.jsx("div",{className:"landing-container z-20 items-stretch gap-26 md:flex",id:"primary-features",children:e.primaryFeatures.map((n,r)=>u.jsxs("div",{className:"mb-14 flex-1 rounded-2xl px-24 py-36 text-center shadow-[0_10px_30px_rgba(0,0,0,0.08)] dark:bg-alt md:mb-0","data-testid":`primary-root-${r}`,children:[u.jsx(R0,{className:"mx-auto mb-30 h-128","data-testid":`primary-image-${r}`,src:n.image}),u.jsx("h2",{className:"my-16 text-lg font-medium","data-testid":`primary-title-${r}`,children:u.jsx(P,{message:n.title})}),u.jsx("div",{className:"text-md text-[0.938rem]","data-testid":`primary-subtitle-${r}`,children:u.jsx(P,{message:n.subtitle})})]},r))}),u.jsx("div",{className:"mt-100 h-1 bg-divider"})]}):null}function LH({content:e}){var t;return u.jsx("div",{className:V("relative overflow-hidden",((t=e.primaryFeatures)==null?void 0:t.length)&&"pt-100"),children:u.jsx("div",{className:"landing-container relative",id:"features",children:e.secondaryFeatures.map((n,r)=>{const s=r%2===0;return u.jsxs("div",{"data-testid":`secondary-root-${r}`,className:V("relative z-20 mb-14 py-16 md:mb-80 md:flex",s&&"flex-row-reverse"),children:[u.jsx("img",{src:n.image,className:"mr-auto aspect-[600/382] w-580 max-w-full rounded-lg shadow-lg dark:border",alt:""}),u.jsxs("div",{className:"ml-30 mr-auto max-w-350 pt-30",children:[u.jsx("small",{className:"mb-16 text-xs font-medium uppercase tracking-widest text-muted","data-testid":`secondary-subtitle-${r}`,children:u.jsx(P,{message:n.subtitle})}),u.jsx("h3",{className:"py-16 text-3xl","data-testid":`secondary-title-${r}`,children:u.jsx(P,{message:n.title})}),u.jsx("div",{className:"h-2 w-50 bg-black/90 dark:bg-divider"}),u.jsx("div",{className:"my-20 text-[0.938rem]","data-testid":`secondary-description-${r}`,children:u.jsx(P,{message:n.description})})]})]},r)})})})}function DH({content:e}){var s;const t=Q1("landingPage"),[n,r]=y.useState("yearly");return u.jsx("div",{className:"py-80 sm:py-128",id:"pricing",children:u.jsxs("div",{className:"mx-auto max-w-1280 px-24 lg:px-32",children:[u.jsxs("div",{className:"text-center",children:[e.pricingTitle&&u.jsx("h2",{className:"font-display text-3xl tracking-tight sm:text-4xl","data-testid":"pricingTitle",children:u.jsx(P,{message:e.pricingTitle})}),e.pricingSubtitle&&u.jsx("p",{className:"mt-16 text-lg text-muted","data-testid":"pricingSubtitle",children:u.jsx(P,{message:e.pricingSubtitle})})]}),u.jsx(bP,{products:(s=t.data)==null?void 0:s.products,selectedCycle:n,onChange:r,className:"my-50 flex justify-center",size:"lg"}),u.jsx(vP,{selectedCycle:n,productLoader:"landingPage"})]})})}function MH({content:{footerSubtitle:e,footerImage:t,footerTitle:n,actions:r}}){return!n&&!e?null:u.jsxs("div",{className:"relative overflow-hidden bg-black py-90 text-white before:pointer-events-none before:absolute before:inset-0 before:z-10 before:bg-gradient-to-r before:from-black before:to-transparent md:py-128","data-testid":"footerImage",children:[t&&u.jsx("img",{draggable:!1,src:t,alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:"absolute left-1/2 top-1/2 max-w-none -translate-x-1/2 -translate-y-1/2 blur-sm"}),u.jsx("div",{className:"relative z-20 mx-auto max-w-1280 px-24 text-center sm:px-16 lg:px-32",children:u.jsxs("div",{className:"mx-auto max-w-512 text-center",children:[n&&u.jsx("h2",{className:" font-display text-3xl tracking-tight sm:text-4xl","data-testid":"footerTitle",children:u.jsx(P,{message:n})}),e&&u.jsx("p",{className:"mt-16 text-lg tracking-tight","data-testid":"footerSubtitle",children:u.jsx(P,{message:e})}),u.jsx(Gy,{item:r.cta3,size:"lg",radius:"rounded-full",variant:"flat",color:"white",className:"mt-40 block","data-testid":"cta3"})]})})]})}function Xs({id:e,title:t,titleSuffix:n,children:r,actions:s}){return u.jsxs("section",{id:e,className:"mb-24 w-full rounded-panel border bg px-24 py-20",children:[u.jsxs("div",{className:"flex items-center gap-14 border-b pb-10",children:[u.jsx("div",{className:"text-lg font-light",children:t}),n&&u.jsx("div",{className:"ml-auto",children:n})]}),u.jsx("div",{className:"pt-24",children:r}),s&&u.jsx("div",{className:"mt-36 flex justify-end border-t pt-10",children:s})]})}function FH({children:e,className:t,padding:n,dataTestId:r}){return u.jsx(Ch,{children:u.jsx("ul",{"data-testid":r,className:V("text-base outline-none sm:text-sm",t,n??"py-4"),children:e})})}const UH=y.forwardRef(({children:e,onSelected:t,borderRadius:n="rounded",className:r,...s},i)=>{const o=qk(),a=!!t,[l,c]=y.useState(!1),f=d=>{switch(d.key){case"ArrowDown":d.preventDefault(),o==null||o.focusNext();break;case"ArrowUp":d.preventDefault(),o==null||o.focusPrevious();break;case"Home":d.preventDefault(),o==null||o.focusFirst();break;case"End":d.preventDefault(),o==null||o.focusLast();break;case"Enter":case"Space":d.preventDefault(),t==null||t();break}};return u.jsx("li",{children:u.jsx(YT,{className:V(r,n),isActive:l,isDisabled:s.isDisabled,...s,onFocus:d=>{c(d.target.matches(":focus-visible"))},onBlur:()=>{c(!1)},onClick:()=>{t==null||t()},ref:i,role:a?"button":void 0,onKeyDown:a?f:void 0,tabIndex:a&&!s.isDisabled?0:void 0,children:e})})}),zH=oe(u.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"}),"LoginOutlined"),VH=oe(u.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}),"LockOutlined"),BH=oe(u.jsx("path",{d:"M19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm-8.2 10V9.5C10.8 8.1 9.4 7 8 7S5.2 8.1 5.2 9.5V11c-.6 0-1.2.6-1.2 1.2v3.5c0 .7.6 1.3 1.2 1.3h5.5c.7 0 1.3-.6 1.3-1.2v-3.5c0-.7-.6-1.3-1.2-1.3zm-1.3 0h-3V9.5c0-.8.7-1.3 1.5-1.3s1.5.5 1.5 1.3V11z"}),"PhonelinkLockOutlined"),HH=oe(u.jsx("path",{d:"m14 12-2 2-2-2 2-2 2 2zm-2-6 2.12 2.12 2.5-2.5L12 1 7.38 5.62l2.5 2.5L12 6zm-6 6 2.12-2.12-2.5-2.5L1 12l4.62 4.62 2.5-2.5L6 12zm12 0-2.12 2.12 2.5 2.5L23 12l-4.62-4.62-2.5 2.5L18 12zm-6 6-2.12-2.12-2.5 2.5L12 23l4.62-4.62-2.5-2.5L12 18z"}),"ApiOutlined"),qH=oe(u.jsx("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM19 14.9 14.9 19H9.1L5 14.9V9.1L9.1 5h5.8L19 9.1v5.8zm-4.17-7.14L12 10.59 9.17 7.76 7.76 9.17 10.59 12l-2.83 2.83 1.41 1.41L12 13.41l2.83 2.83 1.41-1.41L13.41 12l2.83-2.83-1.41-1.41z"}),"DangerousOutlined"),WH=oe(u.jsx("path",{d:"M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"}),"DevicesOutlined");var Sr=(e=>(e.AccountDetails="account-details",e.SocialLogin="social-login",e.Password="password",e.TwoFactor="two-factor",e.LocationAndLanguage="location-and-language",e.Developers="developers",e.DeleteAccount="delete-account",e.Sessions="sessions",e))(Sr||{});function KH(){var o;const e=Sr,{hasPermission:t}=yt(),{api:n,social:r}=fe(),{auth:s}=y.useContext(Xr),i=(r==null?void 0:r.envato)||(r==null?void 0:r.google)||(r==null?void 0:r.facebook)||(r==null?void 0:r.twitter);return u.jsx("aside",{className:"sticky top-10 hidden flex-shrink-0 lg:block",children:u.jsxs(FH,{padding:"p-0",children:[(o=s.accountSettingsPanels)==null?void 0:o.map(a=>u.jsx(kr,{icon:u.jsx(a.icon,{viewBox:"0 0 50 50"}),panel:a.id,children:u.jsx(P,{...a.label})},a.id)),u.jsx(kr,{icon:u.jsx(Y1,{}),panel:e.AccountDetails,children:u.jsx(P,{message:"Account details"})}),i&&u.jsx(kr,{icon:u.jsx(zH,{}),panel:e.SocialLogin,children:u.jsx(P,{message:"Social login"})}),u.jsx(kr,{icon:u.jsx(VH,{}),panel:e.Password,children:u.jsx(P,{message:"Password"})}),u.jsx(kr,{icon:u.jsx(BH,{}),panel:e.TwoFactor,children:u.jsx(P,{message:"Two factor authentication"})}),u.jsx(kr,{icon:u.jsx(WH,{}),panel:e.Sessions,children:u.jsx(P,{message:"Active sessions"})}),u.jsx(kr,{icon:u.jsx(hP,{}),panel:e.LocationAndLanguage,children:u.jsx(P,{message:"Location and language"})}),n!=null&&n.integrated&&t("api.access")?u.jsx(kr,{icon:u.jsx(HH,{}),panel:e.Developers,children:u.jsx(P,{message:"Developers"})}):null,u.jsx(kr,{icon:u.jsx(qH,{}),panel:e.DeleteAccount,children:u.jsx(P,{message:"Delete account"})})]})})}function kr({children:e,icon:t,isLast:n,panel:r}){return u.jsx(UH,{startIcon:t,className:n?void 0:"mb-10",onSelected:()=>{const s=document.querySelector(`#${r}`);s&&s.scrollIntoView({behavior:"smooth",block:"start"})},children:e})}function GH({user:e}){var n,r,s,i;const{social:t}=fe();return!((n=t.envato)!=null&&n.enable)&&!((r=t.google)!=null&&r.enable)&&!((s=t.facebook)!=null&&s.enable)&&!((i=t.twitter)!=null&&i.enable)?null:u.jsxs(Xs,{id:Sr.SocialLogin,title:u.jsx(P,{message:"Manage social login"}),children:[u.jsx(Yc,{icon:u.jsx(JT,{viewBox:"0 0 50 50",className:"border-envato bg-envato text-white"}),service:"envato",user:e}),u.jsx(Yc,{icon:u.jsx(zT,{viewBox:"0 0 48 48"}),service:"google",user:e}),u.jsx(Yc,{icon:u.jsx(VT,{className:"text-facebook"}),service:"facebook",user:e}),u.jsx(Yc,{icon:u.jsx(BT,{className:"text-twitter"}),service:"twitter",user:e}),u.jsx("div",{className:"pb-6 pt-16 text-sm text-muted",children:u.jsx(P,{message:"If you disable social logins, you'll still be able to log in using your email and password."})})]})}function Yc({service:e,user:t,className:n,icon:r}){var l,c,f;const{social:s}=fe(),{connectSocial:i,disconnectSocial:o}=UT(),a=(c=(l=t==null?void 0:t.social_profiles)==null?void 0:l.find(d=>d.service_name===e))==null?void 0:c.username;return(f=s==null?void 0:s[e])!=null&&f.enable?u.jsxs("div",{className:V("flex items-center gap-14 border-b px-10 py-20",n),children:[y.cloneElement(r,{size:"xl",className:V(r.props.className,"border p-8 rounded")}),u.jsxs("div",{className:"mr-auto overflow-hidden text-ellipsis whitespace-nowrap",children:[u.jsx("div",{className:"overflow-hidden text-ellipsis text-sm font-bold first-letter:capitalize",children:u.jsx(P,{message:":service account",values:{service:e}})}),u.jsx("div",{className:"mt-2 text-xs",children:a||u.jsx(P,{message:"Disabled"})})]}),u.jsx(se,{disabled:o.isPending,size:"xs",variant:"outline",color:a?"danger":"primary",onClick:async()=>{if(a)o.mutate({service:e},{onSuccess:()=>{qe.invalidateQueries({queryKey:["users"]}),be(le("Disabled :service account",{values:{service:e}}))}});else{const d=await i(e);(d==null?void 0:d.status)==="SUCCESS"&&(qe.invalidateQueries({queryKey:["users"]}),be(le("Enabled :service account",{values:{service:e}})))}},children:a?u.jsx(P,{message:"Disable"}):u.jsx(P,{message:"Enable"})})]}):null}function wP(e){return we({mutationFn:t=>YH(t),onSuccess:()=>{be(le("Updated account details"))},onError:t=>mn(t,e)})}function YH(e){return re.put("users/me",e).then(t=>t.data)}function QH({file:e,url:t},n){const r=new FormData;return e?r.set("file",e.native):r.set("url",t),re.post(`users/${n.id}/avatar`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(s=>s.data)}function XH({user:e}){return we({mutationFn:t=>QH(t,e),onSuccess:()=>{be(le("Uploaded avatar"))},onError:t=>{const n=As(t,"file");n?be.danger(n):gt(t)}})}function JH(e){return re.delete(`users/${e.id}/avatar`).then(t=>t.data)}function ZH({user:e}){return we({mutationFn:()=>JH(e),onSuccess:()=>{be(le("Removed avatar"))},onError:t=>gt(t)})}const eq=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var tq=e=>!eq.has(e&&e.code);const nq=Qn(tq);function G_(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){n(c);return}a.done?t(l):Promise.resolve(l).then(r,s)}function _P(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){G_(i,r,s,o,a,"next",l)}function a(l){G_(i,r,s,o,a,"throw",l)}o(void 0)})}}function Y_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Q_(e){for(var t=1;t=500&&e.response.status<=599)}function iq(e){return e.config?X1(e)&&EP.indexOf(e.config.method)!==-1:!1}function CP(e){return e.config?X1(e)&&sq.indexOf(e.config.method)!==-1:!1}function jP(e){return SP(e)||CP(e)}function oq(){return 0}function aq(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,n=Math.pow(2,e)*t,r=n*.2*Math.random();return n+r}function X_(e){var t=e[Yy]||{};return t.retryCount=t.retryCount||0,e[Yy]=t,t}function lq(e,t){return Q_(Q_({},t),e[Yy])}function uq(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}function cq(e,t,n,r){return Qy.apply(this,arguments)}function Qy(){return Qy=_P(function*(e,t,n,r){var s=n.retryCount{var i=X_(s);return i.lastRequestTime=Date.now(),s}),r=e.interceptors.response.use(null,function(){var s=_P(function*(i){var{config:o}=i;if(!o)return Promise.reject(i);var{retries:a=3,retryCondition:l=jP,retryDelay:c=oq,shouldResetTimeout:f=!1,onRetry:d=()=>{}}=lq(o,t),h=X_(o);if(yield cq(a,l,h,i)){h.retryCount+=1;var p=c(h.retryCount,i);if(uq(e,o),!f&&o.timeout&&h.lastRequestTime){var g=Date.now()-h.lastRequestTime,b=o.timeout-g-p;if(b<=0)return Promise.reject(i);o.timeout=b}return o.transformRequest=[w=>w],yield d(h.retryCount,i,o),new Promise(w=>setTimeout(()=>w(e(o)),p))}return Promise.reject(i)});return function(i){return s.apply(this,arguments)}}());return{requestInterceptorId:n,responseInterceptorId:r}}qi.isNetworkError=SP;qi.isSafeRequestError=iq;qi.isIdempotentRequestError=CP;qi.isNetworkOrIdempotentRequestError=jP;qi.exponentialDelay=aq;qi.isRetryableError=X1;const kP=1024*1024,fq=20*kP,dq=10,hq=5;class rp{constructor(t,n){Se(this,"abortController");Se(this,"chunks",[]);Se(this,"uploadId");Se(this,"fileKey");Se(this,"chunkAxios");Se(this,"abortedByUser",!1);Se(this,"uploadedParts");this.file=t,this.config=n,this.abortController=new AbortController,this.chunkAxios=wr.create(),qi(this.chunkAxios,{retries:3})}get storageKey(){return`s3-multipart::${this.file.fingerprint}`}async start(){var r,s,i,o,a;const t=T1(this.storageKey);if(t&&await this.getUploadedParts(t),!((r=this.uploadedParts)!=null&&r.length)&&(await this.createMultipartUpload(),!this.uploadId))return;if(this.prepareChunks(),await this.uploadParts()==="done"){if(!await this.completeMultipartUpload())return;try{const c=await this.createFileEntry();if(c!=null&&c.fileEntry){(i=(s=this.config).onSuccess)==null||i.call(s,c==null?void 0:c.fileEntry,this.file),hm(this.storageKey);return}}catch{}}this.abortController.signal.aborted||this.abortController.abort(),this.abortedByUser||(a=(o=this.config).onError)==null||a.call(o,null,this.file)}async abort(){this.abortedByUser=!0,this.abortController.abort(),await this.abortUploadOnS3()}async uploadParts(){const t=this.chunks.filter(r=>!r.done);if(!t.length)return Promise.resolve("done");const n=await this.batchSignUrls(t.slice(0,dq));if(n){for(;n.length;){const s=n.splice(0,hq).map(o=>this.uploadPartToS3(o));if(!(await Promise.all(s)).every(o=>o))return}return await this.uploadParts()}}async batchSignUrls(t){const n=await this.chunkAxios.post("api/v1/s3/multipart/batch-sign-part-urls",{partNumbers:t.map(r=>r.partNumber),uploadId:this.uploadId,key:this.fileKey},{signal:this.abortController.signal}).then(r=>r.data).catch(r=>{this.abortController.signal.aborted||this.abortController.abort()});return n==null?void 0:n.urls}async uploadPartToS3({url:t,partNumber:n}){const r=this.chunks.find(s=>s.partNumber===n);if(r)return this.chunkAxios.put(t,r.blob,{withCredentials:!1,signal:this.abortController.signal,onUploadProgress:s=>{var o,a;if(!s.event.lengthComputable)return;r.bytesUploaded=s.loaded;const i=this.chunks.reduce((l,c)=>l+c.bytesUploaded,0);(a=(o=this.config).onProgress)==null||a.call(o,{bytesUploaded:i,bytesTotal:this.file.size})}}).then(s=>{const i=s.headers.etag;if(i)return r.done=!0,r.etag=i,!0}).catch(s=>{!this.abortController.signal.aborted&&s!==void 0&&this.abortController.abort()})}async createMultipartUpload(){const t=await re.post("s3/multipart/create",{filename:this.file.name,mime:this.file.mime,size:this.file.size,extension:this.file.extension,...this.config.metadata}).then(n=>n.data).catch(n=>{var r,s;n.code!=="ERR_CANCELED"&&((s=(r=this.config).onError)==null||s.call(r,As(n),this.file))});t&&(this.uploadId=t.uploadId,this.fileKey=t.key,P1(this.storageKey,{createdAt:new Date().toISOString(),fileKey:this.fileKey,uploadId:this.uploadId}))}async getUploadedParts({fileKey:t,uploadId:n}){var s;const r=await re.post("s3/multipart/get-uploaded-parts",{key:t,uploadId:n}).then(i=>i.data).catch(()=>(hm(this.storageKey),null));(s=r==null?void 0:r.parts)!=null&&s.length&&(this.uploadedParts=r.parts,this.uploadId=n,this.fileKey=t)}async completeMultipartUpload(){return re.post("s3/multipart/complete",{key:this.fileKey,uploadId:this.uploadId,parts:this.chunks.map(t=>({ETag:t.etag,PartNumber:t.partNumber}))}).then(t=>t.data).catch(()=>{var t,n;(n=(t=this.config).onError)==null||n.call(t,null,this.file),this.abortUploadOnS3()}).finally(()=>{hm(this.storageKey)})}async createFileEntry(){return await re.post("s3/entries",{...this.config.metadata,clientMime:this.file.mime,clientName:this.file.name,filename:this.fileKey.split("/").pop(),size:this.file.size,clientExtension:this.file.extension}).then(t=>t.data).catch()}prepareChunks(){var r;this.chunks=[];const t=Math.max(5*kP,Math.ceil(this.file.size/1e4)),n=Math.max(fq,t);if(this.file.size===0)this.chunks.push({blob:this.file.native,done:!1,partNumber:1,bytesUploaded:0});else{let s=1;for(let i=0;il.PartNumber===s);this.chunks.push({blob:this.file.native.slice(i,o),done:!!a,partNumber:s,etag:a?a.ETag:void 0,bytesUploaded:a!=null&&a.Size?parseInt(a==null?void 0:a.Size):0}),s++}}}abortUploadOnS3(){return re.post("s3/multipart/abort",{key:this.fileKey,uploadId:this.uploadId})}static async create(t,n){return new rp(t,n)}}const TP="3.7.5",pq=TP,mq=typeof atob=="function",gq=typeof btoa=="function",Xa=typeof Buffer=="function",J_=typeof TextDecoder=="function"?new TextDecoder:void 0,Z_=typeof TextEncoder=="function"?new TextEncoder:void 0,yq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wl=Array.prototype.slice.call(yq),Qc=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(wl),vq=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,xt=String.fromCharCode.bind(String),eS=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),PP=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),RP=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),NP=e=>{let t,n,r,s,i="";const o=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|s,i+=wl[t>>18&63]+wl[t>>12&63]+wl[t>>6&63]+wl[t&63]}return o?i.slice(0,o-3)+"===".substring(o):i},J1=gq?e=>btoa(e):Xa?e=>Buffer.from(e,"binary").toString("base64"):NP,Xy=Xa?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,s=e.length;rt?PP(Xy(e)):Xy(e),xq=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?xt(192|t>>>6)+xt(128|t&63):xt(224|t>>>12&15)+xt(128|t>>>6&63)+xt(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return xt(240|t>>>18&7)+xt(128|t>>>12&63)+xt(128|t>>>6&63)+xt(128|t&63)}},bq=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,OP=e=>e.replace(bq,xq),tS=Xa?e=>Buffer.from(e,"utf8").toString("base64"):Z_?e=>Xy(Z_.encode(e)):e=>J1(OP(e)),Po=(e,t=!1)=>t?PP(tS(e)):tS(e),nS=e=>Po(e,!0),wq=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_q=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return xt((n>>>10)+55296)+xt((n&1023)+56320);case 3:return xt((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return xt((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},AP=e=>e.replace(wq,_q),$P=e=>{if(e=e.replace(/\s+/g,""),!vq.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,s;for(let i=0;i>16&255):s===64?xt(t>>16&255,t>>8&255):xt(t>>16&255,t>>8&255,t&255);return n},Z1=mq?e=>atob(RP(e)):Xa?e=>Buffer.from(e,"base64").toString("binary"):$P,IP=Xa?e=>eS(Buffer.from(e,"base64")):e=>eS(Z1(e).split("").map(t=>t.charCodeAt(0))),LP=e=>IP(DP(e)),Sq=Xa?e=>Buffer.from(e,"base64").toString("utf8"):J_?e=>J_.decode(IP(e)):e=>AP(Z1(e)),DP=e=>RP(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Jy=e=>Sq(DP(e)),Eq=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},MP=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),FP=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,MP(n));e("fromBase64",function(){return Jy(this)}),e("toBase64",function(t){return Po(this,t)}),e("toBase64URI",function(){return Po(this,!0)}),e("toBase64URL",function(){return Po(this,!0)}),e("toUint8Array",function(){return LP(this)})},UP=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,MP(n));e("toBase64",function(t){return jf(this,t)}),e("toBase64URI",function(){return jf(this,!0)}),e("toBase64URL",function(){return jf(this,!0)})},Cq=()=>{FP(),UP()},jq={version:TP,VERSION:pq,atob:Z1,atobPolyfill:$P,btoa:J1,btoaPolyfill:NP,fromBase64:Jy,toBase64:Po,encode:Po,encodeURI:nS,encodeURL:nS,utob:OP,btou:AP,decode:Jy,isValid:Eq,fromUint8Array:jf,toUint8Array:LP,extendString:FP,extendUint8Array:UP,extendBuiltins:Cq};var kq=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},ex={},Tq=Object.prototype.hasOwnProperty,Pq;function rS(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function sS(e){try{return encodeURIComponent(e)}catch{return null}}function Rq(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var s=rS(r[1]),i=rS(r[2]);s===null||i===null||s in n||(n[s]=i)}return n}function Nq(e,t){t=t||"";var n=[],r,s;typeof t!="string"&&(t="?");for(s in e)if(Tq.call(e,s)){if(r=e[s],!r&&(r===null||r===Pq||isNaN(r))&&(r=""),s=sS(s),r=sS(r),s===null||r===null)continue;n.push(s+"="+r)}return n.length?t+n.join("&"):""}ex.stringify=Nq;ex.parse=Rq;var zP=kq,sp=ex,Oq=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,VP=/[\n\r\t]/g,Aq=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,BP=/:\d+$/,$q=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Iq=/^[a-zA-Z]:/;function tx(e){return(e||"").toString().replace(Oq,"")}var Zy=[["#","hash"],["?","query"],function(t,n){return gr(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],iS={hash:1,query:1};function HP(e){var t;typeof window<"u"?t=window:typeof Tf<"u"?t=Tf:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},s=typeof e,i;if(e.protocol==="blob:")r=new xr(unescape(e.pathname),{});else if(s==="string"){r=new xr(e,{});for(i in iS)delete r[i]}else if(s==="object"){for(i in e)i in iS||(r[i]=e[i]);r.slashes===void 0&&(r.slashes=Aq.test(e.href))}return r}function gr(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function qP(e,t){e=tx(e),e=e.replace(VP,""),t=t||{};var n=$q.exec(e),r=n[1]?n[1].toLowerCase():"",s=!!n[2],i=!!n[3],o=0,a;return s?i?(a=n[2]+n[3]+n[4],o=n[2].length+n[3].length):(a=n[2]+n[4],o=n[2].length):i?(a=n[3]+n[4],o=n[3].length):a=n[4],r==="file:"?o>=2&&(a=a.slice(2)):gr(r)?a=n[4]:r?s&&(a=a.slice(2)):o>=2&&gr(t.protocol)&&(a=n[4]),{protocol:r,slashes:s||gr(r),slashesCount:o,rest:a}}function Lq(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,s=n[r-1],i=!1,o=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),o++):o&&(r===0&&(i=!0),n.splice(r,1),o--);return i&&n.unshift(""),(s==="."||s==="..")&&n.push(""),n.join("/")}function xr(e,t,n){if(e=tx(e),e=e.replace(VP,""),!(this instanceof xr))return new xr(e,t,n);var r,s,i,o,a,l,c=Zy.slice(),f=typeof t,d=this,h=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=sp.parse),t=HP(t),s=qP(e||"",t),r=!s.protocol&&!s.slashes,d.slashes=s.slashes||r&&t.slashes,d.protocol=s.protocol||t.protocol||"",e=s.rest,(s.protocol==="file:"&&(s.slashesCount!==2||Iq.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!gr(d.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yq(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function vu(e,t){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},vu(e,t)}function xu(e){return xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xu(e)}var Xc=function(e){qq(n,e);var t=Wq(n);function n(r){var s,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(Hq(this,n),s=t.call(this,r),s.originalRequest=o,s.originalResponse=a,s.causingError=i,i!=null&&(r+=", caused by ".concat(i.toString())),o!=null){var l=o.getHeader("X-Request-ID")||"n/a",c=o.getMethod(),f=o.getURL(),d=a?a.getStatus():"n/a",h=a?a.getBody()||"":"n/a";r+=", originated from request (method: ".concat(c,", url: ").concat(f,", response code: ").concat(d,", response text: ").concat(h,", request id: ").concat(l,")")}return s.message=r,s}return zq(n)}(ev(Error));function Qq(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})}function tv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tv=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(T,E,C){T[E]=C.value},s=typeof Symbol=="function"?Symbol:{},i=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",a=s.toStringTag||"@@toStringTag";function l(T,E,C){return Object.defineProperty(T,E,{value:C,enumerable:!0,configurable:!0,writable:!0}),T[E]}try{l({},"")}catch{l=function(C,A,$){return C[A]=$}}function c(T,E,C,A){var $=E&&E.prototype instanceof h?E:h,L=Object.create($.prototype),I=new D(A||[]);return r(L,"_invoke",{value:S(T,C,I)}),L}function f(T,E,C){try{return{type:"normal",arg:T.call(E,C)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var d={};function h(){}function p(){}function g(){}var b={};l(b,i,function(){return this});var w=Object.getPrototypeOf,v=w&&w(w(F([])));v&&v!==t&&n.call(v,i)&&(b=v);var m=g.prototype=h.prototype=Object.create(b);function x(T){["next","throw","return"].forEach(function(E){l(T,E,function(C){return this._invoke(E,C)})})}function _(T,E){function C($,L,I,q){var H=f(T[$],T,L);if(H.type!=="throw"){var Y=H.arg,te=Y.value;return te&&Sa(te)=="object"&&n.call(te,"__await")?E.resolve(te.__await).then(function(ce){C("next",ce,I,q)},function(ce){C("throw",ce,I,q)}):E.resolve(te).then(function(ce){Y.value=ce,I(Y)},function(ce){return C("throw",ce,I,q)})}q(H.arg)}var A;r(this,"_invoke",{value:function(L,I){function q(){return new E(function(H,Y){C(L,I,H,Y)})}return A=A?A.then(q,q):q()}})}function S(T,E,C){var A="suspendedStart";return function($,L){if(A==="executing")throw new Error("Generator is already running");if(A==="completed"){if($==="throw")throw L;return B()}for(C.method=$,C.arg=L;;){var I=C.delegate;if(I){var q=j(I,C);if(q){if(q===d)continue;return q}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(A==="suspendedStart")throw A="completed",C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);A="executing";var H=f(T,E,C);if(H.type==="normal"){if(A=C.done?"completed":"suspendedYield",H.arg===d)continue;return{value:H.arg,done:C.done}}H.type==="throw"&&(A="completed",C.method="throw",C.arg=H.arg)}}}function j(T,E){var C=E.method,A=T.iterator[C];if(A===void 0)return E.delegate=null,C==="throw"&&T.iterator.return&&(E.method="return",E.arg=void 0,j(T,E),E.method==="throw")||C!=="return"&&(E.method="throw",E.arg=new TypeError("The iterator does not provide a '"+C+"' method")),d;var $=f(A,T.iterator,E.arg);if($.type==="throw")return E.method="throw",E.arg=$.arg,E.delegate=null,d;var L=$.arg;return L?L.done?(E[T.resultName]=L.value,E.next=T.nextLoc,E.method!=="return"&&(E.method="next",E.arg=void 0),E.delegate=null,d):L:(E.method="throw",E.arg=new TypeError("iterator result is not an object"),E.delegate=null,d)}function k(T){var E={tryLoc:T[0]};1 in T&&(E.catchLoc=T[1]),2 in T&&(E.finallyLoc=T[2],E.afterLoc=T[3]),this.tryEntries.push(E)}function N(T){var E=T.completion||{};E.type="normal",delete E.arg,T.completion=E}function D(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(k,this),this.reset(!0)}function F(T){if(T){var E=T[i];if(E)return E.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var C=-1,A=function $(){for(;++C=0;--$){var L=this.tryEntries[$],I=L.completion;if(L.tryLoc==="root")return A("end");if(L.tryLoc<=this.prev){var q=n.call(L,"catchLoc"),H=n.call(L,"finallyLoc");if(q&&H){if(this.prev=0;--A){var $=this.tryEntries[A];if($.tryLoc<=this.prev&&n.call($,"finallyLoc")&&this.prev<$.finallyLoc){var L=$;break}}L&&(E==="break"||E==="continue")&&L.tryLoc<=C&&C<=L.finallyLoc&&(L=null);var I=L?L.completion:{};return I.type=E,I.arg=C,L?(this.method="next",this.next=L.finallyLoc,d):this.complete(I)},complete:function(E,C){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&C&&(this.next=C),d},finish:function(E){for(var C=this.tryEntries.length-1;C>=0;--C){var A=this.tryEntries[C];if(A.finallyLoc===E)return this.complete(A.completion,A.afterLoc),N(A),d}},catch:function(E){for(var C=this.tryEntries.length-1;C>=0;--C){var A=this.tryEntries[C];if(A.tryLoc===E){var $=A.completion;if($.type==="throw"){var L=$.arg;N(A)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(E,C,A){return this.delegate={iterator:F(E),resultName:C,nextLoc:A},this.method==="next"&&(this.arg=void 0),d}},e}function aS(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){n(c);return}a.done?t(l):Promise.resolve(l).then(r,s)}function Xq(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){aS(i,r,s,o,a,"next",l)}function a(l){aS(i,r,s,o,a,"throw",l)}o(void 0)})}}function KP(e,t){return tW(e)||eW(e,t)||Zq(e,t)||Jq()}function Jq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zq(e,t){if(e){if(typeof e=="string")return lS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lS(e,t)}}function lS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)for(var i=0,o=["uploadUrl","uploadSize","uploadLengthDeferred"];i1||n._parallelUploadUrls!=null?n._startParallelUpload():n._startSingleUpload()}).catch(function(l){n._emitError(l)})}},{key:"_startParallelUpload",value:function(){var n,r=this,s=this._size,i=0;this._parallelUploads=[];var o=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,a=(n=this.options.parallelUploadBoundaries)!==null&&n!==void 0?n:lW(this._source.size,o);this._parallelUploadUrls&&a.forEach(function(f,d){f.uploadUrl=r._parallelUploadUrls[d]||null}),this._parallelUploadUrls=new Array(a.length);var l=a.map(function(f,d){var h=0;return r._source.slice(f.start,f.end).then(function(p){var g=p.value;return new Promise(function(b,w){var v=Xi(Xi({},r.options),{},{uploadUrl:f.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:{},headers:Xi(Xi({},r.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:b,onError:w,onProgress:function(_){i=i-h+_,h=_,r._emitProgress(i,s)},onUploadUrlAvailable:function(){r._parallelUploadUrls[d]=m.url,r._parallelUploadUrls.filter(function(_){return!!_}).length===a.length&&r._saveUploadInUrlStorage()}}),m=new e(g,v);m.start(),r._parallelUploads.push(m)})})}),c;Promise.all(l).then(function(){c=r._openRequest("POST",r.options.endpoint),c.setHeader("Upload-Concat","final;".concat(r._parallelUploadUrls.join(" ")));var f=fS(r.options.metadata);return f!==""&&c.setHeader("Upload-Metadata",f),r._sendRequest(c,null)}).then(function(f){if(!eo(f.getStatus(),200)){r._emitHttpError(c,f,"tus: unexpected response while creating upload");return}var d=f.getHeader("Location");if(d==null){r._emitHttpError(c,f,"tus: invalid or missing Location header");return}r.url=mS(r.options.endpoint,d),"Created upload at ".concat(r.url),r._emitSuccess()}).catch(function(f){r._emitError(f)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){"Resuming upload from previous URL: ".concat(this.url),this._resumeUpload();return}if(this.options.uploadUrl!=null){"Resuming upload from provided URL: ".concat(this.options.uploadUrl),this.url=this.options.uploadUrl,this._resumeUpload();return}this._createUpload()}},{key:"abort",value:function(n){var r=this;return this._parallelUploads!=null&&this._parallelUploads.forEach(function(s){s.abort(n)}),this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!n||this.url==null?Promise.resolve():e.terminate(this.url,this.options).then(function(){return r._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function(n,r,s,i){this._emitError(new Xc(s,i,n,r))}},{key:"_emitError",value:function(n){var r=this;if(!this._aborted){if(this.options.retryDelays!=null){var s=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(s&&(this._retryAttempt=0),pS(n,this._retryAttempt,this.options)){var i=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){r.start()},i);return}}if(typeof this.options.onError=="function")this.options.onError(n);else throw n}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess()}},{key:"_emitProgress",value:function(n,r){typeof this.options.onProgress=="function"&&this.options.onProgress(n,r)}},{key:"_emitChunkComplete",value:function(n,r,s){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete(n,r,s)}},{key:"_createUpload",value:function(){var n=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var r=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?r.setHeader("Upload-Defer-Length",1):r.setHeader("Upload-Length",this._size);var s=fS(this.options.metadata);s!==""&&r.setHeader("Upload-Metadata",s);var i;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,i=this._addChunkToRequest(r)):i=this._sendRequest(r,null),i.then(function(o){if(!eo(o.getStatus(),200)){n._emitHttpError(r,o,"tus: unexpected response while creating upload");return}var a=o.getHeader("Location");if(a==null){n._emitHttpError(r,o,"tus: invalid or missing Location header");return}if(n.url=mS(n.options.endpoint,a),"Created upload at ".concat(n.url),typeof n.options.onUploadUrlAvailable=="function"&&n.options.onUploadUrlAvailable(),n._size===0){n._emitSuccess(),n._source.close();return}n._saveUploadInUrlStorage().then(function(){n.options.uploadDataDuringCreation?n._handleUploadResponse(r,o):(n._offset=0,n._performUpload())})}).catch(function(o){n._emitHttpError(r,null,"tus: failed to create upload",o)})}},{key:"_resumeUpload",value:function(){var n=this,r=this._openRequest("HEAD",this.url),s=this._sendRequest(r,null);s.then(function(i){var o=i.getStatus();if(!eo(o,200)){if(o===423){n._emitHttpError(r,i,"tus: upload is currently locked; retry later");return}if(eo(o,400)&&n._removeFromUrlStorage(),!n.options.endpoint){n._emitHttpError(r,i,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}n.url=null,n._createUpload();return}var a=parseInt(i.getHeader("Upload-Offset"),10);if(Number.isNaN(a)){n._emitHttpError(r,i,"tus: invalid or missing offset value");return}var l=parseInt(i.getHeader("Upload-Length"),10);if(Number.isNaN(l)&&!n.options.uploadLengthDeferred){n._emitHttpError(r,i,"tus: invalid or missing length value");return}typeof n.options.onUploadUrlAvailable=="function"&&n.options.onUploadUrlAvailable(),n._saveUploadInUrlStorage().then(function(){if(a===l){n._emitProgress(l,l),n._emitSuccess();return}n._offset=a,n._performUpload()})}).catch(function(i){n._emitHttpError(r,null,"tus: failed to resume upload",i)})}},{key:"_performUpload",value:function(){var n=this;if(!this._aborted){var r;this.options.overridePatchMethod?(r=this._openRequest("POST",this.url),r.setHeader("X-HTTP-Method-Override","PATCH")):r=this._openRequest("PATCH",this.url),r.setHeader("Upload-Offset",this._offset);var s=this._addChunkToRequest(r);s.then(function(i){if(!eo(i.getStatus(),200)){n._emitHttpError(r,i,"tus: unexpected response while uploading chunk");return}n._handleUploadResponse(r,i)}).catch(function(i){n._aborted||n._emitHttpError(r,null,"tus: failed to upload chunk at offset ".concat(n._offset),i)})}}},{key:"_addChunkToRequest",value:function(n){var r=this,s=this._offset,i=this._offset+this.options.chunkSize;return n.setProgressHandler(function(o){r._emitProgress(s+o,r._size)}),n.setHeader("Content-Type","application/offset+octet-stream"),(i===1/0||i>this._size)&&!this.options.uploadLengthDeferred&&(i=this._size),this._source.slice(s,i).then(function(o){var a=o.value,l=o.done,c=a&&a.size?a.size:0;r.options.uploadLengthDeferred&&l&&(r._size=r._offset+c,n.setHeader("Upload-Length",r._size));var f=r._offset+c;return!r.options.uploadLengthDeferred&&l&&f!==r._size?Promise.reject(new Error("upload was configured with a size of ".concat(r._size," bytes, but the source is done after ").concat(f," bytes"))):a===null?r._sendRequest(n):(r._emitProgress(r._offset,r._size),r._sendRequest(n,a))})}},{key:"_handleUploadResponse",value:function(n,r){var s=parseInt(r.getHeader("Upload-Offset"),10);if(Number.isNaN(s)){this._emitHttpError(n,r,"tus: invalid or missing offset value");return}if(this._emitProgress(s,this._size),this._emitChunkComplete(s-this._offset,s,this._size),this._offset=s,s===this._size){this._emitSuccess(),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(n,r){var s=dS(n,r,this.options);return this._req=s,s}},{key:"_removeFromUrlStorage",value:function(){var n=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(r){n._emitError(r)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var n=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var r={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?r.parallelUploadUrls=this._parallelUploadUrls:r.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,r).then(function(s){n._urlStorageKey=s})}},{key:"_sendRequest",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return hS(n,r,this.options)}}],[{key:"terminate",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=dS("DELETE",n,r);return hS(s,null,r).then(function(i){if(i.getStatus()!==204)throw new Xc("tus: unexpected response while terminating upload",null,s,i)}).catch(function(i){if(i instanceof Xc||(i=new Xc("tus: failed to terminate upload",i,s,null)),!pS(i,0,r))throw i;var o=r.retryDelays[0],a=r.retryDelays.slice(1),l=Xi(Xi({},r),{},{retryDelays:a});return new Promise(function(c){return setTimeout(c,o)}).then(function(){return e.terminate(n,l)})})}}]),e}();function fS(e){return Object.entries(e).map(function(t){var n=KP(t,2),r=n[0],s=n[1];return"".concat(r," ").concat(jq.encode(String(s)))}).join(",")}function eo(e,t){return e>=t&&e=n.retryDelays.length||e.originalRequest==null)return!1;if(n&&typeof n.onShouldRetry=="function")return n.onShouldRetry(e,t,n);var r=e.originalResponse?e.originalResponse.getStatus():0;return(!eo(r,400)||r===409||r===423)&&aW()}function mS(e,t){return new Uq(t,e).toString()}function lW(e,t){for(var n=Math.floor(e/t),r=[],s=0;s0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(s,i){n._xhr.onload=function(){s(new EW(n._xhr))},n._xhr.onerror=function(o){i(o)},n._xhr.send(r)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),EW=function(){function e(t){nx(this,e),this._xhr=t}return rx(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(n){return this._xhr.getResponseHeader(n)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),YP=function(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function CW(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var s=r.response;t(s)},r.onerror=function(s){n(s)},r.open("GET",e),r.send()})}var jW=function(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")};function kW(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){var s=new Uint8Array(r.result);t({value:s})},r.onerror=function(s){n(s)},r.readAsArrayBuffer(e)})}function Su(e){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Su(e)}function TW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bS(e,t){for(var n=0;n=this.size;return Promise.resolve({value:s,done:i})}},{key:"close",value:function(){}}]),e}();function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}function OW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _S(e,t){for(var n=0;nthis._bufferOffset&&(this._buffer=this._buffer.slice(n-this._bufferOffset),this._bufferOffset=n);var s=SS(this._buffer)===0;return this._done&&s?null:this._buffer.slice(0,r-n)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}();function Ea(e){"@babel/helpers - typeof";return Ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(e)}function sv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sv=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(T,E,C){T[E]=C.value},s=typeof Symbol=="function"?Symbol:{},i=s.iterator||"@@iterator",o=s.asyncIterator||"@@asyncIterator",a=s.toStringTag||"@@toStringTag";function l(T,E,C){return Object.defineProperty(T,E,{value:C,enumerable:!0,configurable:!0,writable:!0}),T[E]}try{l({},"")}catch{l=function(C,A,$){return C[A]=$}}function c(T,E,C,A){var $=E&&E.prototype instanceof h?E:h,L=Object.create($.prototype),I=new D(A||[]);return r(L,"_invoke",{value:S(T,C,I)}),L}function f(T,E,C){try{return{type:"normal",arg:T.call(E,C)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var d={};function h(){}function p(){}function g(){}var b={};l(b,i,function(){return this});var w=Object.getPrototypeOf,v=w&&w(w(F([])));v&&v!==t&&n.call(v,i)&&(b=v);var m=g.prototype=h.prototype=Object.create(b);function x(T){["next","throw","return"].forEach(function(E){l(T,E,function(C){return this._invoke(E,C)})})}function _(T,E){function C($,L,I,q){var H=f(T[$],T,L);if(H.type!=="throw"){var Y=H.arg,te=Y.value;return te&&Ea(te)=="object"&&n.call(te,"__await")?E.resolve(te.__await).then(function(ce){C("next",ce,I,q)},function(ce){C("throw",ce,I,q)}):E.resolve(te).then(function(ce){Y.value=ce,I(Y)},function(ce){return C("throw",ce,I,q)})}q(H.arg)}var A;r(this,"_invoke",{value:function(L,I){function q(){return new E(function(H,Y){C(L,I,H,Y)})}return A=A?A.then(q,q):q()}})}function S(T,E,C){var A="suspendedStart";return function($,L){if(A==="executing")throw new Error("Generator is already running");if(A==="completed"){if($==="throw")throw L;return B()}for(C.method=$,C.arg=L;;){var I=C.delegate;if(I){var q=j(I,C);if(q){if(q===d)continue;return q}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(A==="suspendedStart")throw A="completed",C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);A="executing";var H=f(T,E,C);if(H.type==="normal"){if(A=C.done?"completed":"suspendedYield",H.arg===d)continue;return{value:H.arg,done:C.done}}H.type==="throw"&&(A="completed",C.method="throw",C.arg=H.arg)}}}function j(T,E){var C=E.method,A=T.iterator[C];if(A===void 0)return E.delegate=null,C==="throw"&&T.iterator.return&&(E.method="return",E.arg=void 0,j(T,E),E.method==="throw")||C!=="return"&&(E.method="throw",E.arg=new TypeError("The iterator does not provide a '"+C+"' method")),d;var $=f(A,T.iterator,E.arg);if($.type==="throw")return E.method="throw",E.arg=$.arg,E.delegate=null,d;var L=$.arg;return L?L.done?(E[T.resultName]=L.value,E.next=T.nextLoc,E.method!=="return"&&(E.method="next",E.arg=void 0),E.delegate=null,d):L:(E.method="throw",E.arg=new TypeError("iterator result is not an object"),E.delegate=null,d)}function k(T){var E={tryLoc:T[0]};1 in T&&(E.catchLoc=T[1]),2 in T&&(E.finallyLoc=T[2],E.afterLoc=T[3]),this.tryEntries.push(E)}function N(T){var E=T.completion||{};E.type="normal",delete E.arg,T.completion=E}function D(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(k,this),this.reset(!0)}function F(T){if(T){var E=T[i];if(E)return E.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var C=-1,A=function $(){for(;++C=0;--$){var L=this.tryEntries[$],I=L.completion;if(L.tryLoc==="root")return A("end");if(L.tryLoc<=this.prev){var q=n.call(L,"catchLoc"),H=n.call(L,"finallyLoc");if(q&&H){if(this.prev=0;--A){var $=this.tryEntries[A];if($.tryLoc<=this.prev&&n.call($,"finallyLoc")&&this.prev<$.finallyLoc){var L=$;break}}L&&(E==="break"||E==="continue")&&L.tryLoc<=C&&C<=L.finallyLoc&&(L=null);var I=L?L.completion:{};return I.type=E,I.arg=C,L?(this.method="next",this.next=L.finallyLoc,d):this.complete(I)},complete:function(E,C){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&C&&(this.next=C),d},finish:function(E){for(var C=this.tryEntries.length-1;C>=0;--C){var A=this.tryEntries[C];if(A.finallyLoc===E)return this.complete(A.completion,A.afterLoc),N(A),d}},catch:function(E){for(var C=this.tryEntries.length-1;C>=0;--C){var A=this.tryEntries[C];if(A.tryLoc===E){var $=A.completion;if($.type==="throw"){var L=$.arg;N(A)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(E,C,A){return this.delegate={iterator:F(E),resultName:C,nextLoc:A},this.method==="next"&&(this.arg=void 0),d}},e}function ES(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){n(c);return}a.done?t(l):Promise.resolve(l).then(r,s)}function MW(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){ES(i,r,s,o,a,"next",l)}function a(l){ES(i,r,s,o,a,"throw",l)}o(void 0)})}}function FW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CS(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fd(e){return Fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fd(e)}function kS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function yo(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:null,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return KW(this,n),s=yo(yo({},TS),s),t.call(this,r,s)}return GW(n,null,[{key:"terminate",value:function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i=yo(yo({},TS),i),Md.terminate(s,i)}}]),n}(Md),XP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=b,e.setCookie=e.getCookie=void 0,e.stringifyOptions=h;var t=y;function n(w,v){return a(w)||o(w,v)||s(w,v)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(w,v){if(w){if(typeof w=="string")return i(w,v);var m=Object.prototype.toString.call(w).slice(8,-1);if(m==="Object"&&w.constructor&&(m=w.constructor.name),m==="Map"||m==="Set")return Array.from(w);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return i(w,v)}}function i(w,v){(v==null||v>w.length)&&(v=w.length);for(var m=0,x=new Array(v);mPromise.resolve(l),removeFingerprintOnSuccess:!0,endpoint:`${a}/api/v1/tus/upload`,chunkSize:o,retryDelays:[0,3e3,5e3,1e4,2e4],overridePatchMethod:!0,metadata:{name:window.btoa(t.id),clientName:t.name,clientExtension:t.extension,clientMime:t.mime||"",clientSize:`${t.size}`,...i},headers:{"X-XSRF-TOKEN":XP.getCookie("XSRF-TOKEN")},onError:d=>{var h;if("originalResponse"in d&&d.originalResponse)try{const p=(h=JSON.parse(d.originalResponse.getBody()))==null?void 0:h.message;s==null||s(p,t)}catch{s==null||s(null,t)}else s==null||s(null,t)},onProgress(d,h){n==null||n({bytesUploaded:d,bytesTotal:h})},onSuccess:async()=>{var h;const d=(h=c.url)==null?void 0:h.split("/").pop();try{if(d){const p=await rK(d);r==null||r(p.fileEntry,t)}}catch(p){localStorage.removeItem(l),s==null||s(As(p),t)}}}),f=await c.findPreviousUploads();return f.length&&c.resumeFromPreviousUpload(f[0]),new ip(c)}}function rK(e){return re.post("tus/entries",{uploadKey:e}).then(t=>t.data)}var Cu=(e=>(e.public="public",e.uploads="uploads",e))(Cu||{});class sx{constructor(t,n){Se(this,"abortController");Se(this,"presignedRequest");this.file=t,this.config=n,this.abortController=new AbortController}async start(){var r,s,i,o;if(this.presignedRequest=await this.presignPostUrl(),!this.presignedRequest||await this.uploadFileToS3()!=="uploaded")return;const n=await this.createFileEntry();n!=null&&n.fileEntry?(s=(r=this.config).onSuccess)==null||s.call(r,n.fileEntry,this.file):this.abortController.signal||(o=(i=this.config).onError)==null||o.call(i,null,this.file)}abort(){return this.abortController.abort(),Promise.resolve()}presignPostUrl(){var t;return re.post("s3/simple/presign",{filename:this.file.name,mime:this.file.mime,disk:(t=this.config.metadata)==null?void 0:t.disk,size:this.file.size,extension:this.file.extension,...this.config.metadata},{signal:this.abortController.signal}).then(n=>n.data).catch(n=>{var r,s;n.code!=="ERR_CANCELED"&&((s=(r=this.config).onError)==null||s.call(r,As(n),this.file))})}uploadFileToS3(){const{url:t,acl:n}=this.presignedRequest;return wr.put(t,this.file.native,{signal:this.abortController.signal,withCredentials:!1,headers:{"Content-Type":this.file.mime,"x-amz-acl":n},onUploadProgress:r=>{var s,i;r.event.lengthComputable&&((i=(s=this.config).onProgress)==null||i.call(s,{bytesUploaded:r.loaded,bytesTotal:r.total||0}))}}).then(()=>"uploaded").catch(r=>{var s,i;r.code!=="ERR_CANCELED"&&((i=(s=this.config).onError)==null||i.call(s,As(r),this.file))})}async createFileEntry(){return await re.post("s3/entries",{...this.config.metadata,clientMime:this.file.mime,clientName:this.file.name,filename:this.presignedRequest.key.split("/").pop(),size:this.file.size,clientExtension:this.file.extension}).then(t=>t.data).catch(t=>{var n,r;t.code!=="ERR_CANCELED"&&((r=(n=this.config).onError)==null||r.call(n,As(t),this.file))})}static async create(t,n){return new sx(t,n)}}class ix{constructor(t,n){Se(this,"abortController");this.file=t,this.config=n,this.abortController=new AbortController}async start(){const t=new FormData,{onSuccess:n,onError:r,onProgress:s,metadata:i}=this.config;t.set("file",this.file.native),t.set("workspaceId","12"),i&&Object.entries(i).forEach(([a,l])=>{t.set(a,`${l}`)});const o=await re.post("file-entries",t,{onUploadProgress:a=>{a.event.lengthComputable&&(s==null||s({bytesUploaded:a.loaded,bytesTotal:a.total||0}))},signal:this.abortController.signal,headers:{"Content-Type":"multipart/form-data"}}).catch(a=>{a.code!=="ERR_CANCELED"&&(r==null||r(As(a),this.file))});this.abortController.signal.aborted||o&&o.data.fileEntry&&(n==null||n(o.data.fileEntry,this.file))}abort(){return this.abortController.abort(),Promise.resolve()}static async create(t,n){return new ix(t,n)}}function sK(e,t=1){if(e==null||Number.isNaN(e))return"";const n=e<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(e=-e),e<1)return`${(n?"-":"")+e} B`;const s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),r.length-1);e=Number(e/Math.pow(1024,s));const i=r[s];return e>=10||e%1===0?`${(n?"-":"")+e.toFixed(0)} ${i}`:`${(n?"-":"")+e.toFixed(t)} ${i}`}function JP(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}JP.prototype.match=function(e){var t=!0,n=this.parts,r,s=n.length,i;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(i=(e||"").split(this.separator),r=0;t&&r=2}return t?n(t.split(";")[0]):n};const uK=Qn(lK);function cK(e,t){if(!t)return;const{maxFileSize:n,allowedFileTypes:r,blockedFileTypes:s}=t;if(n&&e.size!=null&&e.size>n)return le("`:file` exceeds maximum allowed size of :size",{values:{file:e.name,size:sK(n)}});if(r!=null&&r.length&&!PS(e,r)||s!=null&&s.length&&PS(e,s))return le("This file type is not allowed")}function PS(e,t){return t.map(n=>n.split(",")).flat().some(n=>{if(n.includes("/"))return e.mime?uK(e.mime.replace(/;.*?$/,""),n):!1;const r=n.replace(".","").toLowerCase();return r&&e.extension?e.extension.toLowerCase()===r:!1})}class fK{constructor(){Se(this,"aliveTimer");Se(this,"isDone",!1);Se(this,"timeout",3e4);Se(this,"timeoutHandler",null)}progress(){this.isDone||!this.timeoutHandler||this.timeout>0&&(clearTimeout(this.aliveTimer),this.aliveTimer=setTimeout(this.timeoutHandler,this.timeout))}done(){this.isDone||(clearTimeout(this.aliveTimer),this.aliveTimer=null,this.isDone=!0)}}async function dK(e,t){var c,f;const n=In().settings,r=e.options,s=e.file;if(r!=null&&r.restrictions){const d=cK(s,r.restrictions);if(d)return t.updateFileUpload(s.id,{errorMessage:d,status:"failed",request:void 0,timer:void 0}),r.showToastOnRestrictionFail&&be.danger(d),t.runQueue(),null}const i=new fK,o={metadata:{...r==null?void 0:r.metadata,relativePath:s.relativePath,disk:((c=r==null?void 0:r.metadata)==null?void 0:c.disk)||Cu.uploads,parentId:((f=r==null?void 0:r.metadata)==null?void 0:f.parentId)||""},chunkSize:n.uploads.chunk_size,baseUrl:n.base_url,onError:d=>{var h;t.updateFileUpload(s.id,{errorMessage:d,status:"failed"}),t.runQueue(),i.done(),(h=r==null?void 0:r.onError)==null||h.call(r,d,s)},onSuccess:d=>{var h;t.updateFileUpload(s.id,{status:"completed",entry:d}),t.runQueue(),i.done(),(h=r==null?void 0:r.onSuccess)==null||h.call(r,d,s)},onProgress:({bytesUploaded:d,bytesTotal:h})=>{var g;const p=d/h*100;t.updateFileUpload(s.id,{percentage:p,bytesUploaded:d}),i.progress(),(g=r==null?void 0:r.onProgress)==null||g.call(r,{bytesUploaded:d,bytesTotal:h})}},l=await mK(s,o).create(s,o);return i.timeoutHandler=()=>{l.abort(),t.updateFileUpload(s.id,{status:"failed",errorMessage:le("Upload timed out")}),t.runQueue()},t.updateFileUpload(s.id,{status:"inProgress",request:l}),l.start(),l}const ZP=1024*1024,hK=4*ZP,pK=100*ZP,mK=(e,t)=>{var i;const n=In().settings,s=(((i=t.metadata)==null?void 0:i.disk)||Cu.uploads)===Cu.uploads?n.uploads.uploads_driver:n.uploads.public_driver;return s!=null&&s.endsWith("s3")&&n.uploads.s3_direct_upload?e.size>=pK?rp:sx:e.size>=hK&&!n.uploads.disable_tus?ip:ix};function e3(e){var n;return((n=/(?:\.([^.]+))?$/.exec(e))==null?void 0:n[1])||""}function gK(e){const t={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",yaml:"text/yaml",yml:"text/yaml"},n=e.name?e3(e.name):null;return e.type?e.type:n&&n in t?t[n]:"application/octet-stream"}class ov{constructor(t,n){Se(this,"id");Se(this,"fingerprint");Se(this,"name");Se(this,"relativePath","");Se(this,"size");Se(this,"mime","");Se(this,"extension","");Se(this,"native");Se(this,"lastModified");Se(this,"cachedData");this.id=Mk(),this.name=t.name,this.size=t.size,this.mime=gK(t),this.lastModified=t.lastModified,this.extension=e3(t.name)||"bin",this.native=t,n=n||t.webkitRelativePath||"",n=n.replace(/^\/+/g,""),n&&n.split("/").length>1&&(this.relativePath=n),this.fingerprint=yK({name:this.name,size:this.size,mime:this.mime,lastModified:this.lastModified})}get data(){return new Promise(t=>{this.cachedData&&t(this.cachedData);const n=new FileReader;n.addEventListener("load",()=>{this.cachedData=n.result,t(this.cachedData)}),this.extension==="json"?n.readAsText(this.native):n.readAsDataURL(this.native)})}}function yK({name:e,mime:t,size:n,relativePath:r,lastModified:s}){let i="be";return typeof e=="string"&&(i+=`-${RS(e.toLowerCase())}`),t&&(i+=`-${t}`),typeof r=="string"&&(i+=`-${RS(r.toLowerCase())}`),n!==void 0&&(i+=`-${n}`),s!==void 0&&(i+=`-${s}`),i+=`${Zj()}`,`${i}-v1`}function vK(e){return e.charCodeAt(0).toString(32)}function RS(e){let t="";return e.replace(/[^A-Z0-9]/gi,n=>(t+=`-${vK(n)}`,"/"))+t}function NS(e,t){return{file:e instanceof ov?e:new ov(e),percentage:0,bytesUploaded:0,status:"pending",options:t||{}}}o6();const OS={concurrency:3,fileUploads:new Map,activeUploadsCount:0,completedUploadsCount:0},xK=({settings:e})=>M0()(V0((t,n)=>({...OS,reset:()=>{t(OS)},getUpload:r=>n().fileUploads.get(r),clearInactive:()=>{t(r=>{r.fileUploads.forEach((s,i)=>{s.status!=="inProgress"&&r.fileUploads.delete(i)})}),n().runQueue()},abortUpload:r=>{var i;const s=n().fileUploads.get(r);s&&((i=s.request)==null||i.abort(),n().updateFileUpload(r,{status:"aborted",percentage:0}),n().runQueue())},updateFileUpload:(r,s)=>{t(i=>{const o=i.fileUploads.get(r);o&&(i.fileUploads.set(r,{...o,...s}),"status"in s&&Am(i))})},uploadSingle:(r,s)=>{const i=NS(r,s),o=new Map(n().fileUploads);return o.set(i.file.id,i),t(a=>{Am(a),a.fileUploads=o}),n().runQueue(),i.file.id},uploadMultiple:(r,s)=>{const i=new Map(n().fileUploads);return[...r].forEach(o=>{const a=NS(o,s);i.set(a.file.id,a)}),t(o=>{Am(o),o.fileUploads=i}),n().runQueue(),[...i.keys()]},runQueue:async()=>{const r=[...n().fileUploads.values()],s=r.filter(o=>o.status==="inProgress");let i=n().concurrency;if(s.filter(o=>o.file.relativePath||o.request instanceof rp||o.request instanceof ip&&e.uploads.chunk_size&&o.file.size>e.uploads.chunk_size).length&&(i=1),s.lengtha.status==="pending");o&&await dK(o,n())}}}))),Am=e=>{e.completedUploadsCount=[...e.fileUploads.values()].filter(t=>t.status==="completed").length,e.activeUploadsCount=[...e.fileUploads.values()].filter(t=>t.status==="inProgress"||t.status==="pending").length},t3=y.createContext(null),Jc=(e,t)=>{const n=y.useContext(t3);return Ok(n,e,t)};function bK({children:e}){const t=fe(),[n]=y.useState(()=>xK({settings:t}));return u.jsx(t3.Provider,{value:n,children:e})}function wK(e={}){const t=document.querySelector("#hidden-file-upload-input");t&&t.remove();const n=document.createElement("input");return n.type="file",n.multiple=e.multiple??!1,n.classList.add("hidden"),n.style.display="none",n.style.visibility="hidden",n.id="hidden-file-upload-input",n.accept=_K(e),e.directory&&(n.webkitdirectory=!0),document.body.appendChild(n),n}function _K({extensions:e=[],types:t=[]}){const n=[];return e!=null&&e.length&&(e=e.map(r=>r.startsWith(".")?r:`.${r}`),n.push(e.join(","))),t!=null&&t.length&&n.push(t.join(",")),n.join(",")}function SK(e={}){return new Promise(t=>{const n=wK(e);n.onchange=r=>{const s=r.target.files;if(!s)return t([]);const i=Array.from(s).filter(o=>o.name!==".DS_Store").map(o=>new ov(o));t(i),n.remove()},document.body.appendChild(n),n.click()})}function EK(e){return re.post("file-entries/delete",e).then(t=>t.data)}function CK(){return we({mutationFn:e=>EK(e),onError:e=>gt(e)})}function jK(){const e=CK(),t=y.useRef(),n=Jc(f=>f.uploadSingle),r=Jc(f=>f.abortUpload),s=Jc(f=>f.updateFileUpload),i=Jc(f=>t.current?f.fileUploads.get(t.current):null),o=y.useCallback((f,d)=>{t.current=n(f,d)},[n]),a=y.useCallback(async f=>{var h;const d=await SK({types:(h=f==null?void 0:f.restrictions)==null?void 0:h.allowedFileTypes});return o(d[0],f),d[0]},[o]),l=y.useCallback(({onSuccess:f,entryPath:d})=>{var p,g,b;const h=()=>{i&&s(i.file.id,{...i,entry:void 0}),f()};if(!d&&!((p=i==null?void 0:i.entry)!=null&&p.id)){h();return}e.mutate({paths:d?[d]:void 0,entryIds:(g=i==null?void 0:i.entry)!=null&&g.id?[(b=i==null?void 0:i.entry)==null?void 0:b.id]:void 0,deleteForever:!0},{onSuccess:h})},[e,i,s]),c=y.useCallback(()=>{i&&r(i.file.id)},[i,r]);return{uploadFile:o,selectAndUploadFile:a,percentage:(i==null?void 0:i.percentage)||0,uploadStatus:i==null?void 0:i.status,entry:i==null?void 0:i.entry,deleteEntry:l,isDeletingEntry:e.isPending,activeUpload:i,abortUpload:c}}var av=(e=>(e.image="image/*",e.audio="audio/*",e.text="text/*",e.json="application/json",e.video="video/mp4,video/mpeg,video/x-m4v,video/*",e))(av||{});function kK(e){let{value:t=0,minValue:n=0,maxValue:r=100,size:s="md",label:i,showValueLabel:o=!!i,isIndeterminate:a=!1,labelPosition:l="top",className:c,role:f,formatOptions:d={style:"percent"},radius:h="rounded",trackColor:p="bg-primary-light",progressColor:g="bg-primary",trackHeight:b=TK(s)}=e;const w=y.useId();t=yT(t,n,r);const v=(t-n)/(r-n),m=R1(d);let x="";if(!a&&o){const k=d.style==="percent"?v:t;x=m.format(k)}const _={};a||(_.width=`${Math.round(v*100)}%`);const S=Ya({size:s}),j=(i||x)&&u.jsxs("div",{className:V("flex gap-10 justify-between my-4",S.label),children:[i&&u.jsx("span",{id:w,children:i}),x&&u.jsx("div",{children:x})]});return u.jsxs("div",{"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:x,"aria-labelledby":i?w:void 0,role:f||"progressbar",className:V(c,"min-w-42"),children:[l==="top"&&j,u.jsx("div",{className:`${b} ${h} ${p} overflow-hidden`,children:u.jsx("div",{className:V(g,"fill h-full transition-width duration-200 rounded-l",a&&"progress-bar-indeterminate-animate"),style:_})}),l==="bottom"&&j]})}function TK(e){switch(e){case"sm":return"h-6";case"xs":return"h-4";default:return"h-8"}}function PK(e){return u.jsx(kK,{...e})}const RK=oe(u.jsx("path",{d:"M21 6h-3.17L16 4h-6v2h5.12l1.83 2H21v12H5v-9H3v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM8 14c0 2.76 2.24 5 5 5s5-2.24 5-5-2.24-5-5-5-5 2.24-5 5zm5-3c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3zM5 6h3V4H5V1H3v3H0v2h3v3h2z"}),"AddAPhotoOutlined"),NK=oe(u.jsx("path",{d:"M24,12 C28.418278,12 32,15.581722 32,20 L32,22 C32,26.418278 28.418278,30 24,30 C19.581722,30 16,26.418278 16,22 L16,20 C16,15.581722 19.581722,12 24,12 Z M24,32 C33.8734019,32 42.1092023,38.8710577 44,48 L4,48 C5.89079771,38.8710577 14.1265981,32 24,32 Z"})),OK=2*1024*1024;function AK({className:e,label:t,description:n,value:r,onChange:s,defaultValue:i,diskPrefix:o,showRemoveButton:a,showEditButtonOnHover:l=!1,invalid:c,errorMessage:f,required:d,autoFocus:h,variant:p="input",previewSize:g="h-80",placeholderIcon:b,stretchPreview:w=!1,previewRadius:v,disabled:m}){const{uploadFile:x,entry:_,uploadStatus:S,deleteEntry:j,isDeletingEntry:k,percentage:N}=jK(),D=y.useRef(null);Xh({autoFocus:h},D);const F=y.useId(),B=t?`${F}-label`:void 0,T=n?`${F}-description`:void 0,E=r||(_==null?void 0:_.url),C={showToastOnRestrictionFail:!0,restrictions:{allowedFileTypes:[av.image],maxFileSize:OK},metadata:{diskPrefix:o,disk:Cu.public},onSuccess:H=>{s==null||s(H.url)},onError:H=>{H&&be.danger(H)}},A=Ya({description:n,descriptionPosition:"top",invalid:c});let $;p==="avatar"?$=LK:p==="square"?$=IK:$=$K;const L=a?u.jsx(se,{variant:"link",color:"danger",size:"xs",disabled:k||!E||m,onClick:()=>{j({onSuccess:()=>s==null?void 0:s("")})},children:u.jsx(P,{message:"Remove image"})}):null,I=i!=null&&r!==i?u.jsx(se,{variant:"outline",color:"primary",size:"xs",disabled:m,onClick:()=>{s==null||s(i)},children:u.jsx(P,{message:"Use default"})}):null,q=y.useCallback(()=>{var H;(H=D.current)==null||H.click()},[]);return u.jsxs("div",{className:V("text-sm",e),children:[t&&u.jsx("div",{id:B,className:A.label,children:t}),n&&u.jsx("div",{className:A.description,children:n}),u.jsx("div",{"aria-labelledby":B,"aria-describedby":T,children:u.jsxs(L1,{fieldClassNames:A,errorMessage:f,invalid:c,children:[u.jsx($,{inputFieldClassNames:A,placeholderIcon:b,previewSize:g,isLoading:S==="inProgress",imageUrl:E,removeButton:L,useDefaultButton:I,showEditButtonOnHover:l,stretchPreview:w,previewRadius:v,handleUpload:q,disabled:m,children:u.jsx("input",{ref:D,"aria-labelledby":B,"aria-describedby":T,required:E?!1:d,accept:av.image,type:"file",disabled:S==="inProgress",className:"sr-only",onChange:H=>{var Y;(Y=H.target.files)!=null&&Y.length&&x(H.target.files[0],C)}})}),S==="inProgress"&&u.jsx(PK,{className:"absolute left-0 right-0 top-0",size:"xs",value:N})]})})]})}function $K({children:e,inputFieldClassNames:t,imageUrl:n,previewSize:r,stretchPreview:s,isLoading:i,handleUpload:o,removeButton:a,useDefaultButton:l,disabled:c}){return n?u.jsxs(y.Fragment,{children:[u.jsxs("div",{className:`${r} relative mb-10 overflow-hidden rounded border bg-fg-base/8 p-6`,children:[u.jsx("img",{className:V("mx-auto h-full rounded",s?"object-cover":"object-contain"),onClick:()=>o(),src:n,alt:""}),e]}),u.jsx(se,{onClick:()=>o(),disabled:i||c,className:"mr-10",variant:"outline",color:"primary",size:"xs",children:u.jsx(P,{message:"Replace"})}),a&&y.cloneElement(a,{variant:"outline"}),l&&y.cloneElement(l,{variant:"outline"})]}):y.cloneElement(e,{className:V(t.input,"py-8","file:bg-primary file:text-on-primary file:border-none file:rounded file:text-sm file:font-semibold file:px-10 file:h-24 file:mr-10")})}function IK({children:e,placeholderIcon:t,previewSize:n,imageUrl:r,stretchPreview:s,handleUpload:i,removeButton:o,useDefaultButton:a,previewRadius:l="rounded",showEditButtonOnHover:c=!1,disabled:f}){return u.jsxs("div",{children:[u.jsxs("div",{className:V(n,l,!r&&"border","group z-20 flex flex-col items-center justify-center gap-14 bg-fg-base/8 bg-center bg-no-repeat",s?"bg-cover":"bg-contain p-6"),style:r?{backgroundImage:`url(${r})`}:void 0,onClick:()=>i(),children:[t&&!r&&y.cloneElement(t,{size:"lg"}),u.jsx(se,{variant:"raised",color:"white",size:"xs",className:V(c&&"invisible group-hover:visible"),disabled:f,children:r?u.jsx(P,{message:"Replace image"}):u.jsx(P,{message:"Upload image"})})]}),e,(o||a)&&u.jsxs("div",{className:"mt-8",children:[o&&y.cloneElement(o,{variant:"link"}),a&&y.cloneElement(a,{variant:"link"})]})]})}function LK({children:e,placeholderIcon:t,previewSize:n,isLoading:r,imageUrl:s,removeButton:i,useDefaultButton:o,handleUpload:a,previewRadius:l="rounded-full",disabled:c}){return t||(t=u.jsx(NK,{viewBox:"0 0 48 48",className:V("h-full w-full bg-primary-light/40 text-primary/40",l)})),u.jsxs("div",{children:[u.jsxs("div",{className:V("relative",n),onClick:()=>a(),children:[s?u.jsx("img",{src:s,className:V("h-full w-full object-cover",l),alt:""}):t,u.jsx("div",{className:"absolute -bottom-6 -right-6 rounded-full bg-paper shadow-xl",children:u.jsx(Yn,{disabled:r||c,type:"button",variant:"outline",size:"sm",color:"primary",radius:"rounded-full",children:u.jsx(RK,{})})})]}),e,(i||o)&&u.jsxs("div",{className:"mt-14",children:[i&&y.cloneElement(i,{variant:"link"}),o&&y.cloneElement(o,{variant:"link"})]})]})}function DK(e){const{field:{onChange:t,value:n=null},fieldState:{error:r}}=Ga({name:e.name}),s={onChange:t,value:n,invalid:r!=null,errorMessage:r?u.jsx(P,{message:"Please select an image."}):null};return u.jsx(AK,{...Jr(s,e)})}function MK({user:e}){const t=XH({user:e}),n=ZH({user:e}),r=y.useId(),s=Xt({defaultValues:{first_name:e.first_name||"",last_name:e.last_name||"",avatar:e.avatar}}),i=wP(s);return u.jsx(Xs,{id:Sr.AccountDetails,title:u.jsx(P,{message:"Update name and profile image"}),actions:u.jsx(se,{type:"submit",variant:"flat",color:"primary",form:r,disabled:i.isPending||!s.formState.isValid,children:u.jsx(P,{message:"Save"})}),children:u.jsxs(Jt,{form:s,className:"flex flex-col flex-col-reverse md:flex-row items-center gap-40 md:gap-80",onSubmit:o=>{i.mutate(o)},id:r,children:[u.jsxs("div",{className:"flex-auto w-full",children:[u.jsx(Ie,{className:"mb-24",name:"first_name",label:u.jsx(P,{message:"First name"})}),u.jsx(Ie,{name:"last_name",label:u.jsx(P,{message:"Last name"})})]}),u.jsx(bK,{children:u.jsx(DK,{className:"md:mr-80",variant:"avatar",previewSize:"w-90 h-90",showRemoveButton:!0,name:"avatar",diskPrefix:"avatars",label:u.jsx(P,{message:"Profile image"}),onChange:o=>{o?t.mutate({url:o}):n.mutate()}})})]})})}function FK(e){return we({mutationFn:t=>UK(t),onSuccess:()=>{be(le("Password changed"))},onError:t=>mn(t,e)})}function UK(e){return re.put("auth/user/password",e).then(t=>t.data)}function zK(){const e=Xt(),t=y.useId(),n=FK(e);return u.jsx(Xs,{id:Sr.Password,title:u.jsx(P,{message:"Update password"}),actions:u.jsx(se,{type:"submit",form:t,variant:"flat",color:"primary",disabled:!e.formState.isValid||n.isPending,children:u.jsx(P,{message:"Update password"})}),children:u.jsxs(Jt,{form:e,id:t,onSubmit:r=>{n.mutate(r,{onSuccess:()=>{e.reset()}})},children:[u.jsx(Ie,{className:"mb-24",name:"current_password",label:u.jsx(P,{message:"Current password"}),type:"password",autoComplete:"current-password",required:!0}),u.jsx(Ie,{className:"mb-24",name:"password",label:u.jsx(P,{message:"New password"}),type:"password",autoComplete:"new-password",required:!0}),u.jsx(Ie,{name:"password_confirmation",label:u.jsx(P,{message:"Confirm password"}),type:"password",autoComplete:"new-password",required:!0})]})})}function n3({isLoading:e,icon:t}){const n=y.useRef(null),{trans:r}=Dn(),[s,i]=y.useState(!1),{state:{isOpen:o,inputValue:a}}=B1(),l=y.useRef(a);return y.useEffect(()=>{e&&!s?(n.current===null&&(n.current=setTimeout(()=>{i(!0)},500)),a!==l.current&&(clearTimeout(n.current),n.current=setTimeout(()=>{i(!0)},500))):e||(i(!1),clearTimeout(n.current),n.current=null),l.current=a},[e,s,a]),s&&(o||e)?u.jsx(Qs,{"aria-label":r({message:"Loading"}),size:"sm",isIndeterminate:!0}):t||u.jsx(n1,{})}function VK(e,t){var St;const{children:n,items:r,isAsync:s,isLoading:i,openMenuOnFocus:o=!0,endAdornmentIcon:a,onItemSelected:l,maxItems:c,clearInputOnItemSelection:f,inputValue:d,selectedValue:h,onSelectionChange:p,allowCustomValue:g=!1,onInputValueChange:b,defaultInputValue:w,selectionMode:v="single",useOptionLabelAsInputValue:m,showEmptyMessage:x,floatingMaxHeight:_,hideEndAdornment:S=!1,blurReferenceOnItemSelection:j,isOpen:k,onOpenChange:N,prependListbox:D,listboxClassName:F,onEndAdornmentClick:B,autoFocusFirstItem:T=!0,...E}=e,C=V1({...e,floatingMaxHeight:_,blurReferenceOnItemSelection:j,selectionMode:v,role:"listbox",virtualFocus:!0,clearSelectionOnInputClear:!0},t),{reference:A,listboxId:$,onInputChange:L,state:{isOpen:I,setIsOpen:q,inputValue:H,setInputValue:Y,selectValues:te,selectedValues:ce,setActiveCollection:ve},collection:et}=C,pe=ce[0]?(St=et.get(ce[0]))==null?void 0:St.textLabel:void 0,{handleListboxSearchFieldKeydown:Oe}=q1(C),de=En(Le=>{o&&!I&&q(!0),Le.target.select()});return u.jsx(H1,{prepend:D,className:F,listbox:C,mobileOverlay:Ll,isLoading:i,onPointerDown:Le=>{Le.preventDefault()},children:u.jsx(uc,{inputRef:A,...E,endAdornment:S?null:u.jsx(Yn,{size:"md",tabIndex:-1,disabled:E.disabled,className:"pointer-events-auto",onPointerDown:Le=>{Le.preventDefault(),Le.stopPropagation(),B?B():(ve("all"),q(!I))},children:u.jsx(n3,{isLoading:i,icon:a})}),"aria-expanded":I?"true":"false","aria-haspopup":"listbox","aria-controls":I?$:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",onChange:L,value:m&&pe?pe:H,onBlur:Le=>{if(g)te(Le.target.value);else if(!f){const lt=ce[0];Y(te.length&<!=null?`${lt}`:"")}},onFocus:de,onClick:de,onKeyDown:Le=>Oe(Le)})})}const fQ=G.forwardRef(VK);function BK(e,t){const n=U1(),{hideCaret:r,placeholder:s=u.jsx(P,{message:"Select an option..."}),selectedValue:i,onItemSelected:o,onOpenChange:a,onInputValueChange:l,onSelectionChange:c,selectionMode:f,minWidth:d="min-w-128",children:h,searchPlaceholder:p,showEmptyMessage:g,showSearchField:b,defaultInputValue:w,inputValue:v,isLoading:m,isAsync:x,valueClassName:_,floatingWidth:S=n?"auto":"matchTrigger",...j}=e,k=V1({...e,clearInputOnItemSelection:!0,showEmptyMessage:g||b,floatingWidth:S,selectionMode:"single",role:"listbox",virtualFocus:b},t),{state:{selectedValues:N,isOpen:D,setIsOpen:F,activeIndex:B,setSelectedIndex:T,inputValue:E,setInputValue:C},collections:A,focusItem:$,listboxId:L,reference:I,refs:q,listContent:H,onInputChange:Y}=k,{fieldProps:te,inputProps:ce}=MT({...j,focusRef:q.reference}),ve=A.collection.get(N[0]),et=ve?u.jsxs("span",{className:"flex items-center gap-10",children:[ve.element.props.startIcon,u.jsx("span",{className:V("overflow-hidden overflow-ellipsis whitespace-nowrap",_),children:ve.element.props.children})]}):u.jsx("span",{className:"italic",children:s}),pe=Ya({...e,endAdornment:!0}),{handleTriggerKeyDown:Oe,handleListboxKeyboardNavigation:de,handleListboxSearchFieldKeydown:St}=q1(k),{findMatchingItem:Le}=QT(),lt=gn=>{if(!D)return;const Ke=Le(gn,H,B);Ke!=null&&$("increment",Ke)},Er=gn=>{if(D)return;const Ke=Le(gn,H,B);Ke!=null&&T(Ke)};return u.jsx(H1,{listbox:k,onKeyDownCapture:b?void 0:lt,onKeyDown:de,onClose:b?()=>C(""):void 0,isLoading:m,searchField:b&&u.jsx(uc,{size:e.size==="xs"||e.size==="sm"?"xs":"sm",placeholder:p,startAdornment:u.jsx(XT,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":D?"true":"false","aria-haspopup":"listbox","aria-controls":D?L:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:E,onChange:Y,onKeyDown:gn=>{St(gn)}}),children:u.jsx(L1,{fieldClassNames:pe,...te,endAdornment:!r&&u.jsx(n3,{isLoading:m}),children:u.jsx("button",{...ce,type:"button","data-selected-value":ve==null?void 0:ve.value,"aria-expanded":D?"true":"false","aria-haspopup":"listbox","aria-controls":D?L:void 0,ref:I,onKeyDown:Oe,onKeyDownCapture:b?void 0:Er,disabled:j.disabled,onClick:()=>{F(!D)},className:V(pe.input,!te.unstyled&&d),children:et})})})}const HK=G.forwardRef(BK);function lv({children:e,...t}){const{field:{onChange:n,onBlur:r,value:s=null,ref:i},fieldState:{invalid:o,error:a}}=Ga({name:t.name}),l={onSelectionChange:n,onBlur:r,selectedValue:s,invalid:o,errorMessage:a==null?void 0:a.message,name:t.name},c=t.errorMessage||(a==null?void 0:a.message);return u.jsx(HK,{ref:i,...Jr(l,t,{errorMessage:c}),children:e})}function qK({name:e,size:t,timezones:n,label:r,...s}){const{trans:i}=Dn();return u.jsx(lv,{selectionMode:"single",name:e,size:t,label:r,showSearchField:!0,searchPlaceholder:i(le("Search timezones")),...s,children:Object.entries(n).map(([o,a])=>u.jsx(WT,{label:o,children:a.map(l=>u.jsx(Bt,{value:l.value,children:l.text},l.value))},o))})}function WK({user:e}){const t=y.useId(),{trans:n}=Dn(),r=Xt({defaultValues:{language:e.language||"",country:e.country||"",timezone:e.timezone||Qu()}}),s=wP(r),i=pP(),{data:o}=dP(["timezones","countries","localizations"]),a=(o==null?void 0:o.countries)||[],l=(o==null?void 0:o.localizations)||[],c=(o==null?void 0:o.timezones)||{};return u.jsx(Xs,{id:Sr.LocationAndLanguage,title:u.jsx(P,{message:"Date, time and language"}),actions:u.jsx(se,{type:"submit",variant:"flat",color:"primary",form:t,disabled:s.isPending||!r.formState.isValid,children:u.jsx(P,{message:"Save"})}),children:u.jsxs(Jt,{form:r,onSubmit:f=>{s.mutate(f),i.mutate({locale:f.language})},id:t,children:[u.jsx(lv,{className:"mb-24",selectionMode:"single",name:"language",label:u.jsx(P,{message:"Language"}),children:l.map(f=>u.jsx(Bt,{value:f.language,children:f.name},f.language))}),u.jsx(lv,{className:"mb-24",selectionMode:"single",name:"country",label:u.jsx(P,{message:"Country"}),showSearchField:!0,searchPlaceholder:n(le("Search countries")),children:a.map(f=>u.jsx(Bt,{value:f.code,children:f.name},f.code))}),u.jsx(qK,{label:u.jsx(P,{message:"Timezone"}),name:"timezone",timezones:c})]})})}function KK(e){const t=y.useRef(null);e&&t.current&&Ri(e,t.current)&&(e=t.current),t.current=e;const{localeCode:n}=zi();return y.useMemo(()=>new yD(n,e),[n,e])}const GK={numeric:{year:"numeric",month:"2-digit",day:"2-digit"},short:{year:"numeric",month:"short",day:"2-digit"},long:{month:"long",day:"2-digit",year:"numeric"},timestamp:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}},YK=y.memo(({date:e,options:t,preset:n})=>{const{dates:r}=fe(),s=Sk(),i=KK(t||GK[n||(r==null?void 0:r.format)]);if(!e)return null;try{typeof e=="string"?e=xk(e).toDate():"toDate"in e&&(e=e.toDate(s))}catch{return null}return u.jsx(y.Fragment,{children:i.format(e)})},Ri);function r3({className:e,title:t,body:n,confirm:r,isDanger:s,isLoading:i,onConfirm:o}){const{close:a}=Ju();return u.jsxs(Da,{className:e,size:"sm",role:"alertdialog",children:[u.jsx(Ma,{color:s?"text-danger":null,leftAdornment:u.jsx(gT,{className:"icon-sm"}),children:t}),u.jsx(Fa,{children:n}),u.jsxs(Zh,{children:[u.jsx(se,{variant:"text",onClick:()=>{a(!1)},children:u.jsx(P,{message:"Cancel"})}),u.jsx(se,{disabled:i,variant:"flat",color:s?"danger":"primary",onClick:()=>{o==null||o(),o||a(!0)},children:r})]})]})}function QK({id:e}){return re.delete(`access-tokens/${e}`).then(t=>t.data)}function XK(){return we({mutationFn:e=>QK(e),onSuccess:()=>{be(le("Token deleted"))},onError:e=>gt(e)})}var JK=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=AS[t.format]||AS.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=tG("message"in t?t.message:eG),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var rG=nG;const sG=Qn(rG);function iG(e,t){var n=y.useState(!1),r=n[0],s=n[1],i=t&&t.successDuration;return y.useEffect(function(){if(r&&i){var o=setTimeout(function(){s(!1)},i);return function(){clearTimeout(o)}}},[r,i]),[r,function(){var o=sG(e);s(o)}]}function oG(e){return re.post("access-tokens",e).then(t=>t.data)}function aG(e){return we({mutationFn:t=>oG(t),onSuccess:()=>{be(le("Token create"))},onError:t=>mn(t,e)})}function lG(){const e=Xt(),{formId:t,close:n}=Ju(),r=aG(e),[s,i]=y.useState(),o=u.jsx(Jt,{form:e,id:t,onSubmit:a=>{r.mutate(a,{onSuccess:l=>{i(l.plainTextToken),qe.invalidateQueries({queryKey:["users"]})}})},children:u.jsx(Ie,{name:"tokenName",label:u.jsx(P,{message:"Token name"}),required:!0,autoFocus:!0})});return u.jsxs(Da,{children:[u.jsx(Ma,{children:u.jsx(P,{message:"Create new token"})}),u.jsx(Fa,{children:s?u.jsx(uG,{plainTextToken:s}):o}),u.jsxs(Zh,{children:[u.jsx(se,{variant:"text",onClick:n,children:u.jsx(P,{message:"Done"})}),!s&&u.jsx(se,{variant:"flat",color:"primary",type:"submit",form:t,disabled:r.isPending,children:u.jsx(P,{message:"Create"})})]})]})}function uG({plainTextToken:e}){const[t,n]=iG(e||"",{successDuration:1e3});return u.jsxs(u.Fragment,{children:[u.jsx(uc,{readOnly:!0,value:e,autoFocus:!0,onClick:r=>{r.currentTarget.focus(),r.currentTarget.select()},endAppend:u.jsx(se,{variant:"flat",color:"primary",onClick:n,children:t?u.jsx(P,{message:"Copied!"}):u.jsx(P,{message:"Copy"})})}),u.jsxs("div",{className:"flex items-center gap-10 mt-14 text-sm",children:[u.jsx(t1,{size:"sm",className:"text-danger"}),u.jsx(P,{message:"Make sure to store the token in a safe place. After this dialog is closed, token will not be viewable anymore."})]})]})}const cG=""+new URL("secure-files-17b4728d.svg",import.meta.url).href;function fG({user:e}){const t=e.tokens||[],{hasPermission:n}=yt(),{api:r}=fe();return!(r!=null&&r.integrated)||!n("api.access")?null:u.jsx(Xs,{id:Sr.Developers,title:u.jsx(P,{message:"API access tokens"}),titleSuffix:u.jsx(Xe,{className:Ws,to:"/api-docs",target:"_blank",children:u.jsx(P,{message:"Documentation"})}),actions:u.jsx(hG,{}),children:t.length?t.map((s,i)=>u.jsx(dG,{token:s,isLast:i===t.length-1},s.id)):u.jsx(G1,{className:"py-40",image:u.jsx(P0,{src:cG}),title:u.jsx(P,{message:"You have no personal access tokens yet"})})})}function dG({token:e,isLast:t}){return u.jsxs("div",{className:V("flex items-center gap-24",!t&&"mb-12 pb-12 border-b"),children:[u.jsxs("div",{className:"text-sm",children:[u.jsx("div",{className:"font-semibold",children:u.jsx(P,{message:"Name"})}),u.jsx("div",{children:e.name}),u.jsx("div",{className:"font-semibold mt-10",children:u.jsx(P,{message:"Last used"})}),u.jsx("div",{children:e.last_used_at?u.jsx(YK,{date:e.last_used_at}):u.jsx(P,{message:"Never"})})]}),u.jsx(pG,{token:e})]})}function hG(){return u.jsxs(Qa,{type:"modal",children:[u.jsx(se,{variant:"flat",color:"primary",children:u.jsx(P,{message:"Create token"})}),u.jsx(lG,{})]})}function pG({token:e}){const t=XK();return u.jsxs(Qa,{type:"modal",onClose:n=>{n&&t.mutate({id:e.id},{onSuccess:()=>qe.invalidateQueries({queryKey:["users"]})})},children:[u.jsx(se,{size:"xs",variant:"outline",color:"danger",className:"flex-shrink-0 ml-auto",children:u.jsx(P,{message:"Delete"})}),u.jsx(r3,{isDanger:!0,title:u.jsx(P,{message:"Delete token?"}),body:u.jsx(P,{message:"This token will be deleted immediately and permanently. Once deleted, it can no longer be used to make API requests."}),confirm:u.jsx(P,{message:"Delete"})})]})}function mG(){const{user:e}=yt(),t=N1();return we({mutationFn:()=>gG(e.id),onSuccess:()=>{be("Account deleted"),t.mutate()},onError:n=>gt(n)})}function gG(e){return re.delete(`users/${e}`,{params:{deleteCurrentUser:!0}}).then(t=>t.data)}function yG(){return Xn({queryKey:["password-confirmation-status"],queryFn:()=>vG()})}function vG(){return re.get("auth/user/confirmed-password-status",{params:{seconds:9e3}}).then(e=>e.data)}function xG(e){qe.setQueryData(["password-confirmation-status"],{confirmed:e})}function bG(e){return we({mutationFn:t=>wG(t),onError:t=>mn(t,e)})}function wG(e){return re.post("auth/user/confirm-password",e).then(t=>t.data)}function _G(){const{close:e,formId:t}=Ju(),n=Xt(),r=bG(n);return u.jsxs(Da,{children:[u.jsx(Ma,{children:u.jsx(P,{message:"Confirm password"})}),u.jsxs(Fa,{children:[u.jsx("p",{className:"text-sm mb-16",children:u.jsx(P,{message:"For your security, please confirm your password to continue."})}),u.jsx(Jt,{id:t,form:n,onSubmit:s=>r.mutate(s,{onSuccess:()=>e(s.password)}),children:u.jsx(Ie,{name:"password",label:u.jsx(P,{message:"Password"}),type:"password",required:!0,autoFocus:!0})})]}),u.jsxs(Zh,{children:[u.jsx(se,{onClick:()=>e(),children:u.jsx(P,{message:"Cancel"})}),u.jsx(se,{type:"submit",variant:"flat",color:"primary",form:t,disabled:r.isPending,children:u.jsx(P,{message:"Confirm"})})]})]})}function dc({needsPassword:e}={}){const{data:t,isLoading:n}=yG(),r=y.useRef(),s=y.useCallback(async i=>{if(t!=null&&t.confirmed&&(r.current||!e))i(r.current);else{const o=await Uk(_G);o&&(r.current=o,xG(!0),i(r.current))}},[t==null?void 0:t.confirmed,e]);return{isLoading:n,withConfirmedPassword:s}}function SG(){const e=mG(),{withConfirmedPassword:t,isLoading:n}=dc(),[r,s]=y.useState(!1);return u.jsxs(Xs,{id:Sr.DeleteAccount,title:u.jsx(P,{message:"Danger zone"}),children:[u.jsx(Qa,{type:"modal",isOpen:r,onOpenChange:s,onClose:i=>{i&&e.mutate()},children:u.jsx(r3,{isDanger:!0,title:u.jsx(P,{message:"Delete account?"}),body:u.jsx(P,{message:"Your account will be deleted immediately and permanently. Once deleted, accounts can not be restored."}),confirm:u.jsx(P,{message:"Delete"})})}),u.jsx(se,{variant:"flat",color:"danger",disabled:n||e.isPending,onClick:()=>{t(()=>{s(!0)})},children:u.jsx(P,{message:"Delete account"})})]})}function EG(){return we({mutationFn:CG,onError:e=>gt(e)})}function CG(){return re.post("auth/user/two-factor-authentication").then(e=>e.data)}function ox({title:e,subtitle:t,description:n,actions:r,children:s}){return t||(t=u.jsx(P,{message:"When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application."})),u.jsxs(y.Fragment,{children:[u.jsx("div",{className:"text-base font-medium mb-16",children:e}),u.jsx("div",{className:"text-sm mb-24",children:t}),u.jsx("p",{className:"text-sm font-medium my-16",children:n}),s,u.jsx("div",{className:"flex items-center gap-12",children:r})]})}function jG({onEnabled:e}){const t=EG(),{withConfirmedPassword:n,isLoading:r}=dc(),s=t.isPending||r;return u.jsx(ox,{title:u.jsx(P,{message:"You have not enabled two factor authentication."}),actions:u.jsx(se,{variant:"flat",color:"primary",disabled:s,onClick:()=>{n(()=>{t.mutate(void 0,{onSuccess:e})})},children:u.jsx(P,{message:"Enable"})})})}function kG(){return Xn({queryKey:["two-factor-qr-code"],queryFn:()=>TG()})}function TG(){return re.get("auth/user/two-factor/qr-code").then(e=>e.data)}function PG(e){return we({mutationFn:t=>RG(t),onError:t=>mn(t,e)})}function RG(e){return re.post("auth/user/confirmed-two-factor-authentication",e).then(t=>t.data)}function s3(){return we({mutationFn:NG,onError:e=>gt(e)})}function NG(){return re.delete("auth/user/two-factor-authentication").then(e=>e.data)}function OG(e){const{data:t}=kG();return u.jsxs(ox,{title:u.jsx(P,{message:"Finish enabling two factor authentication."}),description:u.jsx(P,{message:"To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code."}),children:[u.jsx(Aa,{initial:!1,children:t?u.jsx($S,{animationKey:"real-svg",svg:u.jsx("div",{dangerouslySetInnerHTML:{__html:t.svg}}),secret:u.jsx(P,{message:"Setup key: :key",values:{key:t.secret}})}):u.jsx($S,{animationKey:"svg-skeleton",svg:u.jsx(Nr,{variant:"rect",size:"w-full h-full"}),secret:u.jsx(Nr,{variant:"text",className:"max-w-224"})})}),u.jsx(AG,{...e})]})}function AG({onCancel:e,onConfirmed:t}){const n=Xt(),r=PG(n),s=s3(),{withConfirmedPassword:i,isLoading:o}=dc(),a=r.isPending||s.isPending||o;return u.jsxs(Jt,{form:n,onSubmit:l=>i(()=>{r.mutate(l,{onSuccess:()=>{qe.invalidateQueries({queryKey:["users"]}),t()}})}),children:[u.jsx(Ie,{required:!0,name:"code",label:u.jsx(P,{message:"Code"}),autoFocus:!0}),u.jsxs("div",{className:"flex items-center gap-12 mt-24",children:[u.jsx(se,{type:"button",variant:"outline",disabled:a,onClick:()=>{i(()=>{s.mutate(void 0,{onSuccess:e})})},children:u.jsx(P,{message:"Cancel"})}),u.jsx(se,{type:"submit",variant:"flat",color:"primary",disabled:a,children:u.jsx(P,{message:"Confirm"})})]})]})}function $S({animationKey:e,svg:t,secret:n}){return u.jsxs(Qr.div,{...ep,children:[u.jsx("div",{className:"w-192 h-192 mb-16",children:t}),u.jsx("div",{className:"text-sm font-medium mb-16",children:n})]},e)}function $G(){return we({mutationFn:()=>IG(),onError:e=>gt(e)})}function IG(){return re.post("auth/user/two-factor-recovery-codes").then(e=>e.data)}function LG({user:e,onDisabled:t}){var l;const n=s3(),r=$G(),{withConfirmedPassword:s,isLoading:i}=dc(),o=n.isPending||r.isPending||i,a=u.jsxs(y.Fragment,{children:[u.jsx(se,{type:"button",onClick:()=>s(()=>{r.mutate(void 0,{onSuccess:()=>{qe.invalidateQueries({queryKey:["users"]})}})}),variant:"outline",disabled:o,className:"mr-12",children:u.jsx(P,{message:"Regenerate recovery codes"})}),u.jsx(se,{type:"submit",variant:"flat",color:"danger",disabled:o,onClick:()=>{s(()=>{n.mutate(void 0,{onSuccess:()=>{be(le("Two factor authentication has been disabled.")),t()}})})},children:u.jsx(P,{message:"Disable"})})]});return u.jsx(ox,{title:u.jsx(P,{message:"You have enabled two factor authentication."}),description:u.jsx(P,{message:"Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost."}),actions:a,children:u.jsx("div",{className:"bg-alt p-14 font-mono text-sm mb-16 rounded",children:(l=e.two_factor_recovery_codes)==null?void 0:l.map(c=>u.jsx("div",{className:"mb-4",children:c},c))})})}function DG({user:e}){const[t,n]=y.useState(MG(e));switch(t){case 0:return u.jsx(jG,{onEnabled:()=>n(1)});case 1:return u.jsx(OG,{onCancel:()=>{n(0)},onConfirmed:()=>{n(2)}});case 2:return u.jsx(LG,{user:e,onDisabled:()=>n(0)})}}function MG(e){return e.two_factor_confirmed_at?2:e.two_factor_recovery_codes?1:0}function FG(){return Xn({queryKey:["user-sessions"],queryFn:()=>UG()})}function UG(){return re.get("user-sessions").then(e=>e.data)}const zG=oe(u.jsx("path",{d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"}),"ComputerOutlined"),VG=oe(u.jsx("path",{d:"M17 1.01 7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"}),"SmartphoneOutlined"),BG=oe(u.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z"}),"TabletOutlined");function HG(){return we({mutationFn:e=>qG(e),onError:e=>gt(e)})}function qG(e){return re.post("user-sessions/logout-other",e).then(t=>t.data)}function WG({user:e}){var a;const{data:t,isLoading:n}=FG(),r=HG(),{withConfirmedPassword:s,isLoading:i}=dc({needsPassword:!0}),o=u.jsx("div",{className:"max-h-400 overflow-y-auto",children:(a=t==null?void 0:t.sessions)==null?void 0:a.map(l=>u.jsx(KG,{session:l},l.id))});return u.jsxs(Xs,{id:Sr.Sessions,title:u.jsx(P,{message:"Active sessions"}),children:[u.jsx("p",{className:"text-sm",children:u.jsx(P,{message:"If necessary, you may log out of all of your other browser sessions across all of your devices. Your recent sessions are listed below. If you feel your account has been compromised, you should also update your password."})}),u.jsx("div",{className:"my-30",children:n?u.jsx("div",{className:"min-h-60",children:u.jsx(Qs,{isIndeterminate:!0})}):o}),u.jsx(se,{variant:"outline",color:"primary",disabled:i||r.isPending,onClick:()=>{s(l=>{r.mutate({password:l},{onSuccess:()=>{be(le("Logged out other sessions."))}})})},children:u.jsx(P,{message:"Logout other sessions"})})]})}function KG({session:e}){return u.jsxs("div",{className:"flex items-start gap-14 text-sm mb-14",children:[u.jsx("div",{className:"flex-shrink-0 text-muted",children:u.jsx(GG,{device:e.device_type,size:"lg"})}),u.jsxs("div",{className:"flex-auto",children:[u.jsxs("div",{children:[u.jsx(IS,{children:e.platform})," -"," ",u.jsx(IS,{children:e.browser})]}),u.jsxs("div",{className:"text-xs my-4",children:[e.city,", ",e.country]}),u.jsxs("div",{className:"text-xs",children:[u.jsx(QG,{session:e})," - ",u.jsx(YG,{session:e})]})]})]})}function GG({device:e,size:t}){switch(e){case"mobile":return u.jsx(VG,{size:t});case"tablet":return u.jsx(BG,{size:t});default:return u.jsx(zG,{size:t})}}function YG({session:e}){return e.is_current_device?u.jsx("span",{className:"text-positive",children:u.jsx(P,{message:"This device"})}):u.jsx(jk,{date:e.last_active})}function QG({session:e}){return e.ip_address?u.jsx("span",{children:e.ip_address}):e.token?u.jsx(P,{message:"API Token"}):u.jsx(P,{message:"Unknown IP"})}function IS({children:e}){return e?u.jsx(y.Fragment,{children:e}):u.jsx(P,{message:"Unknown"})}function XG(){var r;const{auth:e}=y.useContext(Xr),{data:t,isLoading:n}=xT("me",{with:["roles","social_profiles","tokens"]});return u.jsxs("div",{className:"min-h-screen bg-alt",children:[u.jsx(es,{children:u.jsx(P,{message:"Account Settings"})}),u.jsx(Hi,{menuPosition:"account-settings-page"}),u.jsx("div",{children:u.jsxs("div",{className:"container mx-auto px-24 py-24",children:[u.jsx("h1",{className:"text-3xl",children:u.jsx(P,{message:"Account settings"})}),u.jsx("div",{className:"mb-40 text-base text-muted",children:u.jsx(P,{message:"View and update your account details, profile and more."})}),n||!t?u.jsx(Qs,{className:"my-80","aria-label":"Loading user..",isIndeterminate:!0}):u.jsxs("div",{className:"flex items-start gap-24",children:[u.jsx(KH,{}),u.jsxs("main",{className:"flex-auto",children:[(r=e.accountSettingsPanels)==null?void 0:r.map(s=>u.jsx(s.component,{user:t.user},s.id)),u.jsx(MK,{user:t.user}),u.jsx(GH,{user:t.user}),u.jsx(zK,{}),u.jsx(Xs,{id:Sr.TwoFactor,title:u.jsx(P,{message:"Two factor authentication"}),children:u.jsx("div",{className:"max-w-580",children:u.jsx(DG,{user:t.user})})}),u.jsx(WG,{user:t.user}),u.jsx(WK,{user:t.user}),u.jsx(fG,{user:t.user}),u.jsx(SG,{})]})]})]})})]})}function JG(e){const t=Mn();return we({mutationFn:ZG,onSuccess:n=>{be(n.message),t("/login")},onError:n=>mn(n,e)})}function ZG(e){return re.post("auth/forgot-password",e).then(t=>t.data)}function eY(){const{registration:e}=fe(),[t]=l1(),n=t.get("email")||void 0,r=Xt({defaultValues:{email:n}}),s=JG(r),i=!e.disable&&u.jsx(P,{values:{a:o=>u.jsx(Xe,{className:Ws,to:"/register",children:o})},message:"Don't have an account? Sign up."});return u.jsxs(cc,{message:i,children:[u.jsx(es,{children:u.jsx(P,{message:"Forgot Password"})}),u.jsxs(Jt,{form:r,onSubmit:o=>{s.mutate(o)},children:[u.jsx("div",{className:"mb-32 text-sm",children:u.jsx(P,{message:"Enter your email address below and we will send you a link to reset or create your password."})}),u.jsx(Ie,{disabled:!!n,className:"mb-32",name:"email",type:"email",autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(P,{message:"Email"}),required:!0}),u.jsx(se,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:s.isPending,children:u.jsx(P,{message:"Continue"})})]})]})}function tY(e){return re.post("auth/reset-password",e).then(t=>t.data)}function nY(e){const t=Mn();return we({mutationFn:tY,onSuccess:()=>{t("/login",{replace:!0}),be(le("Your password has been reset!"))},onError:n=>mn(n,e)})}function rY(){const{token:e}=a1(),t=Xt({defaultValues:{token:e}}),n=nY(t),r=u.jsx(P,{message:"Reset your account password"}),s=u.jsx(P,{values:{a:i=>u.jsx(Xe,{className:Ws,to:"/register",children:i})},message:"Don't have an account? Sign up."});return u.jsxs(cc,{heading:r,message:s,children:[u.jsx(es,{children:u.jsx(P,{message:"Reset Password"})}),u.jsxs(Jt,{form:t,onSubmit:i=>{n.mutate(i)},children:[u.jsx(Ie,{className:"mb-32",name:"email",type:"email",label:u.jsx(P,{message:"Email"}),required:!0}),u.jsx(Ie,{className:"mb-32",name:"password",type:"password",label:u.jsx(P,{message:"New password"}),required:!0}),u.jsx(Ie,{className:"mb-32",name:"password_confirmation",type:"password",label:u.jsx(P,{message:"Confirm password"}),required:!0}),u.jsx(se,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:n.isPending,children:u.jsx(P,{message:"Reset password"})})]})]})}const sY=u.jsxs(y.Fragment,{children:[u.jsx(He,{path:"/register",element:u.jsx(By,{})}),u.jsx(He,{path:"/account-settings",element:u.jsx(yu,{children:u.jsx(XG,{})})}),u.jsx(He,{path:"login",element:u.jsx(ni,{children:u.jsx(qy,{})})}),u.jsx(He,{path:"/workspace/join/register",element:u.jsx(ni,{children:u.jsx(By,{})})}),u.jsx(He,{path:"/workspace/join/login",element:u.jsx(ni,{children:u.jsx(qy,{})})}),u.jsx(He,{path:"forgot-password",element:u.jsx(ni,{children:u.jsx(eY,{})})}),u.jsx(He,{path:"/password/reset/:token",element:u.jsx(ni,{children:u.jsx(rY,{})})})]}),iY=oe(u.jsx("path",{d:"M15 4v7H5.17L4 12.17V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"}),"ForumOutlined");function oY(){var r;const e=Q1("pricingPage"),[t,n]=y.useState("yearly");return u.jsxs(y.Fragment,{children:[u.jsx(es,{children:u.jsx(P,{message:"Pricing"})}),u.jsx(Hi,{color:"bg",darkModeColor:"transparent",border:"border-b",menuPosition:"pricing-table-page"}),u.jsxs("div",{className:"container mx-auto px-24",children:[u.jsx("h1",{className:"mb-30 mt-30 text-center text-3xl font-normal md:mt-60 md:text-4xl md:font-medium",children:u.jsx(P,{message:"Choose the right plan for you"})}),u.jsx(bP,{products:(r=e.data)==null?void 0:r.products,selectedCycle:t,onChange:n,className:"mb-40 flex justify-center md:mb-70",size:"lg"}),u.jsx(vP,{selectedCycle:t,productLoader:"pricingPage"}),u.jsx(aY,{})]}),u.jsx(fc,{className:"container mx-auto flex-shrink-0 px-24"})]})}function aY(){return u.jsxs("div",{className:"my-20 p-24 text-center md:my-80",children:[u.jsx(iY,{size:"xl",className:"text-muted"}),u.jsx("div",{className:"my-8 md:text-lg",children:u.jsx(P,{message:"Do you have any questions about PRO accounts?"})}),u.jsx("div",{className:"mb-24 mt-20 text-sm md:mt-0 md:text-base",children:u.jsx(P,{message:"Our support team will be happy to assist you."})}),u.jsx(se,{variant:"flat",color:"primary",elementType:Xe,to:"/contact",children:u.jsx(P,{message:"Contact us"})})]})}const lY=G.lazy(()=>Va(()=>import("./billing-page-routes-f2634959.js"),["./billing-page-routes-f2634959.js","./OpenInNew-32d7773a.js","./billing-redirect-message-799c6490.js","./TaskAlt-50ceef7c.js","./section-helper-79a95256.js","./CalendarToday-7e762aef.js"],import.meta.url)),uY=G.lazy(()=>Va(()=>import("./checkout-routes-05b6ef38.js"),["./checkout-routes-05b6ef38.js","./billing-redirect-message-799c6490.js","./TaskAlt-50ceef7c.js"],import.meta.url)),cY=u.jsxs(y.Fragment,{children:[u.jsx(He,{path:"/pricing",element:u.jsx(oY,{})}),u.jsx(He,{path:"checkout/*",element:u.jsx(G.Suspense,{fallback:u.jsx(To,{screen:!0}),children:u.jsx(uY,{})})}),u.jsx(He,{path:"billing/*",element:u.jsx(G.Suspense,{fallback:u.jsx(To,{screen:!0}),children:u.jsx(lY,{})})})]});function fY(){const{user:e}=yt(),{data:t,isLoading:n}=Gn({perPage:30}),r=!!(e!=null&&e.unread_notifications_count),s=r1(),{notif:i}=fe(),o=()=>{t&&s.mutate({markAllAsUnread:!0})},a=u.jsx(se,{variant:"outline",color:"primary",size:"xs",startIcon:u.jsx(lP,{}),onClick:o,disabled:s.isPending||n,className:"ml-auto",children:u.jsx(P,{message:"Mark all as read"})});return u.jsxs(y.Fragment,{children:[u.jsx(es,{children:u.jsx(P,{message:"Notifications"})}),u.jsx(Hi,{menuPosition:"notifications-page"}),u.jsxs("div",{className:"container mx-auto min-h-[1000px] p-16 md:p-24",children:[u.jsxs("div",{className:"mb-30 flex items-center gap-24",children:[u.jsx("h1",{className:"text-3xl",children:u.jsx(P,{message:"Notifications"})}),r&&a,i.subs.integrated&&u.jsx(Yn,{className:"ml-auto text-muted",elementType:Xe,to:"/notifications/settings",target:"_blank",children:u.jsx(cP,{})})]}),u.jsx(dY,{})]}),u.jsx(fc,{className:"container mx-auto mt-48 p-16 md:p-24"})]})}function dY(){const{data:e,isLoading:t}=Gn({perPage:30});return t?u.jsx("div",{className:"flex items-center justify-center py-10",children:u.jsx(Qs,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):e!=null&&e.pagination.data.length?u.jsx(x4,{className:"rounded border",notifications:e.pagination.data}):u.jsx(uP,{})}function hY(){return re.get("notifications/me/subscriptions").then(e=>e.data)}function pY(){return Xn({queryKey:["notification-subscriptions"],queryFn:()=>hY(),staleTime:1/0})}function mY(e){return re.put("notifications/me/subscriptions",{selections:e}).then(t=>t.data)}function gY(){return we({mutationFn:e=>mY(e),onSuccess:()=>{be(le("Updated preferences")),qe.invalidateQueries({queryKey:["notification-subscriptions"]})},onError:e=>gt(e)})}function yY(){const{notif:e}=fe(),t=gY(),{data:n,isFetched:r}=pY(),[s,i]=y.useState();return y.useEffect(()=>{if(n&&!s){const o={},a={};n.available_channels.forEach(l=>{a[l]=!1}),n.subscriptions.forEach(l=>{l.subscriptions.forEach(c=>{const f=n.user_selections.find(d=>d.notif_id===c.notif_id);o[c.notif_id]=(f==null?void 0:f.channels)||{...a}})}),i(o)}},[n,s]),!e.subs.integrated||n&&n.subscriptions.length===0?u.jsx(Hs,{to:"/",replace:!0}):u.jsxs("div",{className:"min-h-screen bg-alt",children:[u.jsx(Hi,{menuPosition:"notifications-page"}),!r||!n||!s?u.jsx("div",{className:"container mx-auto my-100 flex justify-center",children:u.jsx(Qs,{size:"md",isIndeterminate:!0,"aria-label":"Loading subscriptions..."})}):u.jsx("div",{className:"container mx-auto my-20 px-10 md:my-40 md:px-20",children:u.jsxs("div",{className:"rounded border bg-paper px-20 pb-30 pt-20",children:[n.subscriptions.map(o=>u.jsxs("div",{className:"mb-10 text-sm",children:[u.jsx(vY,{group:o,allChannels:n==null?void 0:n.available_channels,selection:s,setSelection:i},o.group_name),o.subscriptions.map(a=>u.jsx(xY,{subscription:a,selection:s,setSelection:i,allChannels:n==null?void 0:n.available_channels},a.notif_id))]},o.group_name)),u.jsx(se,{className:"ml-10 mt-20",variant:"flat",color:"primary",disabled:t.isPending,onClick:()=>{t.mutate(Object.entries(s).map(([o,a])=>({notif_id:o,channels:a})))},children:u.jsx(P,{message:"Update preferences"})})]})})]})}function vY({group:e,allChannels:t,selection:n,setSelection:r}){const s=(o,a)=>{const l=z0(n,c=>{Object.keys(n).forEach(f=>{c[f][o]=a})});r(l)},i=u.jsx("div",{className:"ml-auto flex items-center gap-40 max-md:hidden",children:t.map(o=>{const a=Object.values(n).every(c=>c[o]),l=!a&&Object.values(n).some(c=>c[o]);return u.jsx(W1,{orientation:"vertical",isIndeterminate:l,checked:a,onChange:async c=>{if(o==="browser"){const f=await i3();s(o,f?!a:!1)}else s(o,!a)},children:u.jsx(P,{message:o})},o)})});return u.jsxs("div",{className:"flex items-center border-b p-10",children:[u.jsx("div",{className:"font-medium",children:u.jsx(P,{message:e.group_name})}),i]})}function xY({subscription:e,allChannels:t,selection:n,setSelection:r}){const s=e.notif_id,i=(o,a)=>{const l=z0(n,c=>{c[e.notif_id][o]=a});r(l)};return u.jsxs("div",{className:"items-center border-b py-10 pl-8 pr-10 md:flex md:pl-20",children:[u.jsx("div",{className:"pb-14 font-semibold md:pb-0 md:font-normal",children:u.jsx(P,{message:e.name})}),u.jsx("div",{className:"ml-auto flex items-center gap-40",children:t.map(o=>u.jsx(W1,{orientation:"vertical",checked:n[s][o],onChange:async a=>{const l=!n[s][o];if(o==="browser"){const c=await i3();i(o,c?l:!1)}else i(o,l)},"aria-label":o,children:u.jsx("div",{className:"md:invisible md:h-0",children:u.jsx(P,{message:o})})},o))})]})}function i3(){return Notification.permission==="granted"?Promise.resolve(!0):Notification.permission==="denied"?(be.danger(le("Notifications blocked. Please enable them for this site from browser settings.")),Promise.resolve(!1)):Notification.requestPermission().then(e=>e==="granted")}const bY=u.jsxs(y.Fragment,{children:[u.jsx(He,{path:"/notifications",element:u.jsx(yu,{children:u.jsx(uF,{children:u.jsx(fY,{})})})}),u.jsx(He,{path:"/notifications/settings",element:u.jsx(yu,{children:u.jsx(yY,{})})})]});function wY(e){const{trans:t}=Dn(),n=Mn();return we({mutationFn:r=>_Y(r),onSuccess:()=>{be(t(le("Your message has been submitted."))),n("/")},onError:r=>mn(r,e)})}function _Y(e){return re.post("contact-page",e).then(t=>t.data)}function SY(){const e=Xt(),t=wY(e),{verify:n,isVerifying:r}=tP("contact");return u.jsxs("div",{className:"flex flex-col bg-alt min-h-screen",children:[u.jsx(es,{children:u.jsx(P,{message:"Contact us"})}),u.jsx(Hi,{className:"flex-shrink-0 sticky top-0",menuPosition:"contact-us-page"}),u.jsx("div",{className:"container p-24 md:p-40 mx-auto flex-auto flex items-center justify-center",children:u.jsxs("div",{className:"border rounded bg-paper p-24 max-w-620",children:[u.jsx("h1",{className:"text-2xl",children:u.jsx(P,{message:"Contact us"})}),u.jsx("p",{className:"text-sm mt-4 mb-30",children:u.jsx(P,{message:"Please use the form below to send us a message and we'll get back to you as soon as possible."})}),u.jsxs(Jt,{form:e,onSubmit:async s=>{await n()&&t.mutate(s)},children:[u.jsx(Ie,{label:u.jsx(P,{message:"Name"}),name:"name",required:!0,className:"mb-20"}),u.jsx(Ie,{label:u.jsx(P,{message:"Email"}),name:"email",required:!0,type:"email",className:"mb-20"}),u.jsx(Ie,{label:u.jsx(P,{message:"Message"}),name:"message",required:!0,inputElementType:"textarea",className:"mb-20",rows:8}),u.jsx(se,{type:"submit",variant:"flat",color:"primary",disabled:t.isPending||r,children:u.jsx(P,{message:"Send"})})]})]})}),u.jsx(fc,{className:"container mx-auto px-24 flex-shrink-0"})]})}function EY(){const{dialog:e,data:t}=B0();return u.jsx(Qa,{type:"modal",isOpen:e!=null,onClose:n=>{f6(n)},children:e?u.jsx(e,{...t}):null})}const CY=G.lazy(()=>Va(()=>import("./admin-routes-cb411577.js").then(e=>e.a1),["./admin-routes-cb411577.js","./section-helper-79a95256.js","./user-profile-link-0c8224d9.js","./OpenInNew-32d7773a.js"],import.meta.url)),jY=G.lazy(()=>Va(()=>import("./swagger-api-docs-page-94e17c59.js"),["./swagger-api-docs-page-94e17c59.js","./index-c7d484cf.js","./swagger-api-docs-page-34ffaf07.css"],import.meta.url)),kY=G.lazy(()=>Va(()=>import("./site-routes-6742b0c7.js"),["./site-routes-6742b0c7.js","./user-profile-link-0c8224d9.js","./OpenInNew-32d7773a.js","./BookmarkBorder-469fad29.js","./linkify.es-ff711e62.js"],import.meta.url));function TY(){var l;const{homepage:e,billing:t,notifications:n,require_email_confirmation:r,api:s}=fe(),{isAppearanceEditorActive:i}=k1(),{user:o,hasPermission:a}=yt();return o!=null&&r&&!o.email_verified_at?u.jsxs(y.Fragment,{children:[u.jsx($_,{}),u.jsx(Hw,{children:u.jsx(He,{path:"*",element:u.jsx(vV,{})})})]}):u.jsxs(y.Fragment,{children:[u.jsx(SV,{}),u.jsx(AV,{}),u.jsx($_,{}),u.jsxs(Hw,{children:[u.jsx(He,{path:"/*",element:u.jsx(yu,{requireLogin:!1,permission:"titles.view",children:u.jsx(G.Suspense,{fallback:u.jsx(To,{screen:!0}),children:u.jsx(kY,{})})})}),!((l=e==null?void 0:e.type)!=null&&l.startsWith("channel"))&&(o==null||i)&&u.jsx(He,{path:"/",element:u.jsx(pH,{homepageResolver:()=>u.jsx(AH,{})})}),u.jsx(He,{path:"/admin/*",element:u.jsx(yu,{permission:"admin.access",children:u.jsx(G.Suspense,{fallback:u.jsx(To,{screen:!0}),children:u.jsx(CY,{})})})}),sY,t.enable&&cY,n.integrated&&bY,(s==null?void 0:s.integrated)&&a("api.access")&&u.jsx(He,{path:"api-docs",element:u.jsx(G.Suspense,{fallback:u.jsx(To,{screen:!0}),children:u.jsx(jY,{})})}),u.jsx(He,{path:"contact",element:u.jsx(SY,{})}),u.jsx(He,{path:"pages/:pageSlug",element:u.jsx(Hy,{})}),u.jsx(He,{path:"pages/:pageId/:pageSlug",element:u.jsx(Hy,{})}),u.jsx(He,{path:"*",element:u.jsx(F1,{})})]}),u.jsx(EY,{})]})}const op=In(),LS=op.settings.logging.sentry_public;LS&&jz({dsn:LS,integrations:[new Cz],tracesSampleRate:.2,ignoreErrors:kz,release:op.sentry_release});const DS=u.jsx(KM,{basename:op.settings.html_base_uri,children:u.jsx(SF,{children:u.jsx(TY,{})})});op.rendered_ssr?aC(Bs,DS):lC(Bs).render(DS);export{ha as $,Aa as A,se as B,Dd as C,Qa as D,t1 as E,r3 as F,Co as G,G1 as H,Yn as I,P0 as J,mV as K,Da as L,Ma as M,Hi as N,y4 as O,PK as P,Fa as Q,G as R,HK as S,P as T,HT as U,Zh as V,mn as W,JL as X,ZL as Y,VL as Z,KK as _,HV as a,UT as a$,Ga as a0,xk as a1,Jr as a2,Xt as a3,Jt as a4,Ie as a5,GT as a6,Bk as a7,s4 as a8,Xe as a9,k1 as aA,Hs as aB,bK as aC,Qs as aD,nc as aE,Mk as aF,a1 as aG,Mn as aH,zt as aI,QM as aJ,bC as aK,To as aL,Ws as aM,Xr as aN,In as aO,OV as aP,aQ,tp as aR,np as aS,On as aT,Pn as aU,W1 as aV,uQ as aW,lQ as aX,GK as aY,Xu as aZ,sK as a_,YK as aa,U8 as ab,zH as ac,yh as ad,KY as ae,YY as af,Pz as ag,Ya as ah,DK as ai,Yh as aj,dP as ak,lP as al,FH as am,UH as an,z0 as ao,Va as ap,Nr as aq,gh as ar,lv as as,WT as at,oQ as au,bL as av,M0 as aw,V0 as ax,Jn as ay,T_ as az,oe as b,yt as b$,La as b0,MT as b1,L1 as b2,Bz as b3,xT as b4,XH as b5,ZH as b6,Uk as b7,SK as b8,av as b9,yD as bA,Ri as bB,zi as bC,Nh as bD,FT as bE,yu as bF,jB as bG,sB as bH,_V as bI,f6 as bJ,kM as bK,F1 as bL,Qn as bM,Tf as bN,RY as bO,MD as bP,rG as bQ,NY as bR,Uq as bS,fc as bT,l1 as bU,u1 as bV,iG as bW,VT as bX,BT as bY,VH as bZ,ZY as b_,Pa as ba,rL as bb,Ia as bc,Q1 as bd,bH as be,n1 as bf,oH as bg,cP as bh,jk as bi,dC as bj,jK as bk,Xh as bl,cK as bm,ov as bn,Cu as bo,xP as bp,Ky as bq,nQ as br,rH as bs,fQ as bt,nH as bu,s8 as bv,T6 as bw,K8 as bx,W8 as by,Yz as bz,V as c,aB as c$,kH as c0,xH as c1,BB as c2,XN as c3,YN as c4,OY as c5,AY as c6,hO as c7,Qu as c8,BL as c9,eQ as cA,AB as cB,NK as cC,V1 as cD,H1 as cE,Ll as cF,q1 as cG,yT as cH,GY as cI,Bs as cJ,eu as cK,RH as cL,TD as cM,GD as cN,cQ as cO,XP as cP,WY as cQ,Y1 as cR,bP as cS,Wy as cT,Hw as cU,He as cV,QY as cW,JY as cX,hm as cY,XB as cZ,wH as c_,KL as ca,VY as cb,cd as cc,WL as cd,MY as ce,FY as cf,Ch as cg,tQ as ch,lu as ci,Sk as cj,qY as ck,HY as cl,LY as cm,qk as cn,iQ as co,HL as cp,zY as cq,UY as cr,lk as cs,DY as ct,BY as cu,cD as cv,_w as cw,XY as cx,En as cy,Gh as cz,Xn as d,IB as d0,RK as d1,HH as d2,gB as d3,Tz as d4,zG as d5,qH as d6,fP as d7,WH as d8,gT as d9,DB as da,jL as db,iY as dc,EL as dd,hP as de,LB as df,JB as dg,OB as dh,oP as di,$B as dj,CL as dk,BH as dl,VG as dm,BG as dn,SL as dp,JT as dq,re as e,sQ as f,T1 as g,le as h,U1 as i,u as j,R1 as k,Bt as l,Qr as m,Dn as n,uc as o,XT as p,ep as q,y as r,P1 as s,es as t,fe as u,we as v,qe as w,be as x,gt as y,Ju as z}; //# sourceMappingURL=main-239552ae.js.map