4a5feb12465f66947af2f40a4785344e/******/////*///// 请勿使用非法用途


过安全狗、云锁、阿里云、360、护卫神、D盾、百度云、各种杀软!

iamH4CKEERRRRRRRRRRRS

I am a hacker in the dark of a very cold night

path :/home/drive/domains/drive.vcenetwork.com/public_html/public

upload file:

List of files:

name file size edit permission action
.htaccess1125 KBFebruary 26 2023 04:58:260644
1.zip1856 KBMay 26 2025 03:52:060644
arl.txt1 KBMay 26 2025 03:58:190644
build-August 19 2024 20:27:470755
cabs.jpg.phtml34996 KBMay 25 2025 13:50:430644
cool30203 KBMay 26 2025 03:49:270644
cool.php44 KBMay 26 2025 03:50:140644
favicon-May 26 2025 07:38:380755
favicon.ico502 KBAugust 19 2024 21:12:300644
htaccess.example1125 KBMay 20 2024 07:03:520755
images-August 19 2024 20:27:470755
index.php1949 KBMay 20 2024 07:03:520755
install_files-July 31 2023 19:05:060755
invoice.css99133 KBMay 20 2024 07:03:520644
manifest.json1055 KBAugust 19 2024 21:25:160644
robots.txt1154 KBJune 07 2025 12:24:520755
storage-May 25 2025 13:49:550755
style.php26 KBMay 26 2025 03:52:280644
swagger.yaml33646 KBMay 20 2024 07:03:520755
web.config914 KBMay 20 2024 07:03:520755
var Zr=Object.defineProperty;var Qr=(s,i,a)=>i in s?Zr(s,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[i]=a;var zt=(s,i,a)=>(Qr(s,typeof i!="symbol"?i+"":i,a),a),$r=(s,i,a)=>{if(!i.has(s))throw TypeError("Cannot "+a)};var gt=(s,i,a)=>($r(s,i,"read from private field"),a?a.call(s):i.get(s)),Ot=(s,i,a)=>{if(i.has(s))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(s):i.set(s,a)},At=(s,i,a,c)=>($r(s,i,"write to private field"),c?c.call(s,a):i.set(s,a),a);var hr=(s,i,a,c)=>({set _(d){At(s,i,d,a)},get _(){return gt(s,i,c)}}),Ft=(s,i,a)=>($r(s,i,"access private method"),a);function _mergeNamespaces(s,i){for(var a=0;ac[d]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function getAugmentedNamespace(s){if(s.__esModule)return s;var i=s.default;if(typeof i=="function"){var a=function c(){return this instanceof c?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};a.prototype=i.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(c){var d=Object.getOwnPropertyDescriptor(s,c);Object.defineProperty(a,c,d.get?d:{enumerable:!0,get:function(){return s[c]}})}),a}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/** * @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 l$2=Symbol.for("react.element"),n$3=Symbol.for("react.portal"),p$4=Symbol.for("react.fragment"),q$3=Symbol.for("react.strict_mode"),r$5=Symbol.for("react.profiler"),t$2=Symbol.for("react.provider"),u$2=Symbol.for("react.context"),v$2=Symbol.for("react.forward_ref"),w$1=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z$1=Symbol.iterator;function A$1(s){return s===null||typeof s!="object"?null:(s=z$1&&s[z$1]||s["@@iterator"],typeof s=="function"?s:null)}var B$1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$1=Object.assign,D$1={};function E$1(s,i,a){this.props=s,this.context=i,this.refs=D$1,this.updater=a||B$1}E$1.prototype.isReactComponent={};E$1.prototype.setState=function(s,i){if(typeof s!="object"&&typeof s!="function"&&s!=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,s,i,"setState")};E$1.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,"forceUpdate")};function F(){}F.prototype=E$1.prototype;function G$1(s,i,a){this.props=s,this.context=i,this.refs=D$1,this.updater=a||B$1}var H$1=G$1.prototype=new F;H$1.constructor=G$1;C$1(H$1,E$1.prototype);H$1.isPureReactComponent=!0;var I$1=Array.isArray,J=Object.prototype.hasOwnProperty,K$1={current:null},L$1={key:!0,ref:!0,__self:!0,__source:!0};function M$1(s,i,a){var c,d={},g=null,b=null;if(i!=null)for(c in i.ref!==void 0&&(b=i.ref),i.key!==void 0&&(g=""+i.key),i)J.call(i,c)&&!L$1.hasOwnProperty(c)&&(d[c]=i[c]);var $=arguments.length-2;if($===1)d.children=a;else if(1<$){for(var _=Array($),j=0;j<$;j++)_[j]=arguments[j+2];d.children=_}if(s&&s.defaultProps)for(c in $=s.defaultProps,$)d[c]===void 0&&(d[c]=$[c]);return{$$typeof:l$2,type:s,key:g,ref:b,props:d,_owner:K$1.current}}function N$1(s,i){return{$$typeof:l$2,type:s.type,key:i,ref:s.ref,props:s.props,_owner:s._owner}}function O$1(s){return typeof s=="object"&&s!==null&&s.$$typeof===l$2}function escape(s){var i={"=":"=0",":":"=2"};return"$"+s.replace(/[=:]/g,function(a){return i[a]})}var P$1=/\/+/g;function Q$1(s,i){return typeof s=="object"&&s!==null&&s.key!=null?escape(""+s.key):i.toString(36)}function R$1(s,i,a,c,d){var g=typeof s;(g==="undefined"||g==="boolean")&&(s=null);var b=!1;if(s===null)b=!0;else switch(g){case"string":case"number":b=!0;break;case"object":switch(s.$$typeof){case l$2:case n$3:b=!0}}if(b)return b=s,d=d(b),s=c===""?"."+Q$1(b,0):c,I$1(d)?(a="",s!=null&&(a=s.replace(P$1,"$&/")+"/"),R$1(d,i,a,"",function(j){return j})):d!=null&&(O$1(d)&&(d=N$1(d,a+(!d.key||b&&b.key===d.key?"":(""+d.key).replace(P$1,"$&/")+"/")+s)),i.push(d)),1;if(b=0,c=c===""?".":c+":",I$1(s))for(var $=0;$>>1,It=Et[kt];if(0>>1;ktd(Qt,jt))Vtd(qt,Qt)?(Et[kt]=qt,Et[Vt]=jt,kt=Vt):(Et[kt]=Qt,Et[Bt]=jt,kt=Bt);else if(Vtd(qt,jt))Et[kt]=qt,Et[Vt]=jt,kt=Vt;else break e}}return Tt}function d(Et,Tt){var jt=Et.sortIndex-Tt.sortIndex;return jt!==0?jt:Et.id-Tt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;s.unstable_now=function(){return g.now()}}else{var b=Date,$=b.now();s.unstable_now=function(){return b.now()-$}}var _=[],j=[],_e=1,et=null,tt=3,nt=!1,rt=!1,at=!1,lt=typeof setTimeout=="function"?setTimeout:null,ot=typeof clearTimeout=="function"?clearTimeout:null,st=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function it(Et){for(var Tt=a(j);Tt!==null;){if(Tt.callback===null)c(j);else if(Tt.startTime<=Et)c(j),Tt.sortIndex=Tt.expirationTime,i(_,Tt);else break;Tt=a(j)}}function ut(Et){if(at=!1,it(Et),!rt)if(a(_)!==null)rt=!0,bt(ct);else{var Tt=a(j);Tt!==null&&$t(ut,Tt.startTime-Et)}}function ct(Et,Tt){rt=!1,at&&(at=!1,ot(xt),xt=-1),nt=!0;var jt=tt;try{for(it(Tt),et=a(_);et!==null&&(!(et.expirationTime>Tt)||Et&&!_t());){var kt=et.callback;if(typeof kt=="function"){et.callback=null,tt=et.priorityLevel;var It=kt(et.expirationTime<=Tt);Tt=s.unstable_now(),typeof It=="function"?et.callback=It:et===a(_)&&c(_),it(Tt)}else c(_);et=a(_)}if(et!==null)var Mt=!0;else{var Bt=a(j);Bt!==null&&$t(ut,Bt.startTime-Tt),Mt=!1}return Mt}finally{et=null,tt=jt,nt=!1}}var pt=!1,mt=null,xt=-1,St=5,wt=-1;function _t(){return!(s.unstable_now()-wtEt||125kt?(Et.sortIndex=jt,i(j,Et),a(_)===null&&Et===a(j)&&(at?(ot(xt),xt=-1):at=!0,$t(ut,jt-kt))):(Et.sortIndex=It,i(_,Et),rt||nt||(rt=!0,bt(ct))),Et},s.unstable_shouldYield=_t,s.unstable_wrapCallback=function(Et){var Tt=tt;return function(){var jt=tt;tt=Tt;try{return Et.apply(this,arguments)}finally{tt=jt}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.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 aa=reactExports,ca=schedulerExports;function p$2(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka=/^[: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]*$/,la={},ma={};function oa(s){return ja.call(ma,s)?!0:ja.call(la,s)?!1:ka.test(s)?ma[s]=!0:(la[s]=!0,!1)}function pa(s,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function qa(s,i,a,c){if(i===null||typeof i>"u"||pa(s,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function v$1(s,i,a,c,d,g,b){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=g,this.removeEmptyString=b}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){z[s]=new v$1(s,0,!1,s,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];z[i]=new v$1(i,1,!1,s[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(s){z[s]=new v$1(s,2,!1,s.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){z[s]=new v$1(s,2,!1,s,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){z[s]=new v$1(s,3,!1,s.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(s){z[s]=new v$1(s,3,!0,s,null,!1,!1)});["capture","download"].forEach(function(s){z[s]=new v$1(s,4,!1,s,null,!1,!1)});["cols","rows","size","span"].forEach(function(s){z[s]=new v$1(s,6,!1,s,null,!1,!1)});["rowSpan","start"].forEach(function(s){z[s]=new v$1(s,5,!1,s.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(ra,sa);z[i]=new v$1(i,1,!1,s,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(ra,sa);z[i]=new v$1(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(ra,sa);z[i]=new v$1(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(s){z[s]=new v$1(s,1,!1,s.toLowerCase(),null,!1,!1)});z.xlinkHref=new v$1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(s){z[s]=new v$1(s,1,!1,s.toLowerCase(),null,!0,!0)});function ta(s,i,a,c){var d=z.hasOwnProperty(i)?z[i]:null;(d!==null?d.type!==0:c||!(2$||d[b]!==g[$]){var _=` `+d[b].replace(" at new "," at ");return s.displayName&&_.includes("")&&(_=_.replace("",s.displayName)),_}while(1<=b&&0<=$);break}}}finally{Na=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?Ma(s):""}function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return s=Oa(s.type,!1),s;case 11:return s=Oa(s.type.render,!1),s;case 1:return s=Oa(s.type,!0),s;default:return""}}function Qa(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Ca:return(s.displayName||"Context")+".Consumer";case Ba:return(s._context.displayName||"Context")+".Provider";case Da:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Ga:return i=s.displayName||null,i!==null?i:Qa(s.type)||"Memo";case Ha:i=s._payload,s=s._init;try{return Qa(s(i))}catch{}}return null}function Ra(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(i);case 8:return i===za?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Sa(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ta(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ua(s){var i=Ta(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),c=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,g=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return d.call(this)},set:function(b){c=""+b,g.call(this,b)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(b){c=""+b},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function Va(s){s._valueTracker||(s._valueTracker=Ua(s))}function Wa(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return s&&(c=Ta(s)?s.checked?"true":"false":s.value),s=c,s!==a?(i.setValue(s),!0):!1}function Xa(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ya(s,i){var a=i.checked;return A({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function Za(s,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Sa(i.value!=null?i.value:a),s._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function ab(s,i){i=i.checked,i!=null&&ta(s,"checked",i,!1)}function bb(s,i){ab(s,i);var a=Sa(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(c==="submit"||c==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?cb(s,i.type,a):i.hasOwnProperty("defaultValue")&&cb(s,i.type,Sa(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function db(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function cb(s,i,a){(i!=="number"||Xa(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var eb=Array.isArray;function fb(s,i,a,c){if(s=s.options,i){i={};for(var d=0;d"+i.valueOf().toString()+"",i=mb.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function ob(s,i){if(i){var a=s.firstChild;if(a&&a===s.lastChild&&a.nodeType===3){a.nodeValue=i;return}}s.textContent=i}var pb={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},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(s){qb.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),pb[i]=pb[s]})});function rb(s,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||pb.hasOwnProperty(s)&&pb[s]?(""+i).trim():i+"px"}function sb(s,i){s=s.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,d=rb(a,i[a],c);a==="float"&&(a="cssFloat"),c?s.setProperty(a,d):s[a]=d}}var tb=A({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 ub(s,i){if(i){if(tb[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(p$2(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(p$2(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(p$2(61))}if(i.style!=null&&typeof i.style!="object")throw Error(p$2(62))}}function vb(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wb=null;function xb(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var yb=null,zb=null,Ab=null;function Bb(s){if(s=Cb(s)){if(typeof yb!="function")throw Error(p$2(280));var i=s.stateNode;i&&(i=Db(i),yb(s.stateNode,s.type,i))}}function Eb(s){zb?Ab?Ab.push(s):Ab=[s]:zb=s}function Fb(){if(zb){var s=zb,i=Ab;if(Ab=zb=null,Bb(s),i)for(s=0;s>>=0,s===0?32:31-(pc(s)/qc|0)|0}var rc=64,sc=4194304;function tc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function uc(s,i){var a=s.pendingLanes;if(a===0)return 0;var c=0,d=s.suspendedLanes,g=s.pingedLanes,b=a&268435455;if(b!==0){var $=b&~d;$!==0?c=tc($):(g&=b,g!==0&&(c=tc(g)))}else b=a&~d,b!==0?c=tc(b):g!==0&&(c=tc(g));if(c===0)return 0;if(i!==0&&i!==c&&!(i&d)&&(d=c&-c,g=i&-i,d>=g||d===16&&(g&4194240)!==0))return i;if(c&4&&(c|=a&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=c;0a;a++)i.push(s);return i}function Ac(s,i,a){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-oc(i),s[i]=a}function Bc(s,i){var a=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var c=s.eventTimes;for(s=s.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;function ge(s,i){switch(s){case"keyup":return $d.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ie=!1;function je(s,i){switch(s){case"compositionend":return he(i);case"keypress":return i.which!==32?null:(fe=!0,ee);case"textInput":return s=i.data,s===ee&&fe?null:s;default:return null}}function ke(s,i){if(ie)return s==="compositionend"||!ae&&ge(s,i)?(s=nd(),md=ld=kd=null,ie=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-s};s=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Je(a)}}function Le(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?Le(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function Me(){for(var s=window,i=Xa();i instanceof s.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)s=i.contentWindow;else break;i=Xa(s.document)}return i}function Ne(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function Oe(s){var i=Me(),a=s.focusedElem,c=s.selectionRange;if(i!==a&&a&&a.ownerDocument&&Le(a.ownerDocument.documentElement,a)){if(c!==null&&Ne(a)){if(i=c.start,s=c.end,s===void 0&&(s=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(s,a.value.length);else if(s=(i=a.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var d=a.textContent.length,g=Math.min(c.start,d);c=c.end===void 0?g:Math.min(c.end,d),!s.extend&&g>c&&(d=c,c=g,g=d),d=Ke(a,g);var b=Ke(a,c);d&&b&&(s.rangeCount!==1||s.anchorNode!==d.node||s.anchorOffset!==d.offset||s.focusNode!==b.node||s.focusOffset!==b.offset)&&(i=i.createRange(),i.setStart(d.node,d.offset),s.removeAllRanges(),g>c?(s.addRange(i),s.extend(b.node,b.offset)):(i.setEnd(b.node,b.offset),s.addRange(i)))}}for(i=[],s=a;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(s,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Te||Qe==null||Qe!==Xa(c)||(c=Qe,"selectionStart"in c&&Ne(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Se&&Ie(Se,c)||(Se=c,c=oe(Re,"onSelect"),0Tf||(s.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(s,i){Tf++,Sf[Tf]=s.current,s.current=i}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(s,i){var a=s.type.contextTypes;if(!a)return Vf;var c=s.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var d={},g;for(g in a)d[g]=i[g];return c&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=d),d}function Zf(s){return s=s.childContextTypes,s!=null}function $f(){E(Wf),E(H)}function ag(s,i,a){if(H.current!==Vf)throw Error(p$2(168));G(H,i),G(Wf,a)}function bg(s,i,a){var c=s.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var d in c)if(!(d in i))throw Error(p$2(108,Ra(s)||"Unknown",d));return A({},a,c)}function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Vf,Xf=H.current,G(H,s),G(Wf,Wf.current),!0}function dg(s,i,a){var c=s.stateNode;if(!c)throw Error(p$2(169));a?(s=bg(s,i,Xf),c.__reactInternalMemoizedMergedChildContext=s,E(Wf),E(H),G(H,s)):E(Wf),G(Wf,a)}var eg=null,fg=!1,gg=!1;function hg(s){eg===null?eg=[s]:eg.push(s)}function ig(s){fg=!0,hg(s)}function jg(){if(!gg&&eg!==null){gg=!0;var s=0,i=C;try{var a=eg;for(C=1;s>=b,d-=b,rg=1<<32-oc(i)+d|a<xt?(St=mt,mt=null):St=mt.sibling;var wt=tt(ot,mt,it[xt],ut);if(wt===null){mt===null&&(mt=St);break}s&&mt&&wt.alternate===null&&i(ot,mt),st=g(wt,st,xt),pt===null?ct=wt:pt.sibling=wt,pt=wt,mt=St}if(xt===it.length)return a(ot,mt),I&&tg(ot,xt),ct;if(mt===null){for(;xtxt?(St=mt,mt=null):St=mt.sibling;var _t=tt(ot,mt,wt.value,ut);if(_t===null){mt===null&&(mt=St);break}s&&mt&&_t.alternate===null&&i(ot,mt),st=g(_t,st,xt),pt===null?ct=_t:pt.sibling=_t,pt=_t,mt=St}if(wt.done)return a(ot,mt),I&&tg(ot,xt),ct;if(mt===null){for(;!wt.done;xt++,wt=it.next())wt=et(ot,wt.value,ut),wt!==null&&(st=g(wt,st,xt),pt===null?ct=wt:pt.sibling=wt,pt=wt);return I&&tg(ot,xt),ct}for(mt=c(ot,mt);!wt.done;xt++,wt=it.next())wt=nt(mt,ot,xt,wt.value,ut),wt!==null&&(s&&wt.alternate!==null&&mt.delete(wt.key===null?xt:wt.key),st=g(wt,st,xt),pt===null?ct=wt:pt.sibling=wt,pt=wt);return s&&mt.forEach(function(ht){return i(ot,ht)}),I&&tg(ot,xt),ct}function lt(ot,st,it,ut){if(typeof it=="object"&&it!==null&&it.type===ya&&it.key===null&&(it=it.props.children),typeof it=="object"&&it!==null){switch(it.$$typeof){case va:e:{for(var ct=it.key,pt=st;pt!==null;){if(pt.key===ct){if(ct=it.type,ct===ya){if(pt.tag===7){a(ot,pt.sibling),st=d(pt,it.props.children),st.return=ot,ot=st;break e}}else if(pt.elementType===ct||typeof ct=="object"&&ct!==null&&ct.$$typeof===Ha&&uh(ct)===pt.type){a(ot,pt.sibling),st=d(pt,it.props),st.ref=sh(ot,pt,it),st.return=ot,ot=st;break e}a(ot,pt);break}else i(ot,pt);pt=pt.sibling}it.type===ya?(st=Ah(it.props.children,ot.mode,ut,it.key),st.return=ot,ot=st):(ut=yh(it.type,it.key,it.props,null,ot.mode,ut),ut.ref=sh(ot,st,it),ut.return=ot,ot=ut)}return b(ot);case wa:e:{for(pt=it.key;st!==null;){if(st.key===pt)if(st.tag===4&&st.stateNode.containerInfo===it.containerInfo&&st.stateNode.implementation===it.implementation){a(ot,st.sibling),st=d(st,it.children||[]),st.return=ot,ot=st;break e}else{a(ot,st);break}else i(ot,st);st=st.sibling}st=zh(it,ot.mode,ut),st.return=ot,ot=st}return b(ot);case Ha:return pt=it._init,lt(ot,st,pt(it._payload),ut)}if(eb(it))return rt(ot,st,it,ut);if(Ka(it))return at(ot,st,it,ut);th(ot,it)}return typeof it=="string"&&it!==""||typeof it=="number"?(it=""+it,st!==null&&st.tag===6?(a(ot,st.sibling),st=d(st,it),st.return=ot,ot=st):(a(ot,st),st=xh(it,ot.mode,ut),st.return=ot,ot=st),b(ot)):a(ot,st)}return lt}var Bh=vh$1(!0),Ch=vh$1(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(s){if(s===Dh)throw Error(p$2(174));return s}function Ih(s,i){switch(G(Gh,i),G(Fh,s),G(Eh,Dh),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:lb(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=lb(i,s)}E(Eh),G(Eh,i)}function Jh(){E(Eh),E(Fh),E(Gh)}function Kh(s){Hh(Gh.current);var i=Hh(Eh.current),a=lb(i,s.type);i!==a&&(G(Fh,s),G(Eh,a))}function Lh(s){Fh.current===s&&(E(Eh),E(Fh))}var M=Uf(0);function Mh(s){for(var i=s;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if(i.flags&128)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Nh=[];function Oh(){for(var s=0;sa?a:4,s(!0);var c=Qh.transition;Qh.transition={};try{s(!1),i()}finally{C=a,Qh.transition=c}}function Fi(){return di().memoizedState}function Gi(s,i,a){var c=lh(s);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Hi(s))Ii(i,a);else if(a=Yg(s,i,a,c),a!==null){var d=L();mh(a,s,c,d),Ji(a,i,c)}}function ri(s,i,a){var c=lh(s),d={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hi(s))Ii(i,d);else{var g=s.alternate;if(s.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var b=i.lastRenderedState,$=g(b,a);if(d.hasEagerState=!0,d.eagerState=$,He($,b)){var _=i.interleaved;_===null?(d.next=d,Xg(i)):(d.next=_.next,_.next=d),i.interleaved=d;return}}catch{}finally{}a=Yg(s,i,d,c),a!==null&&(d=L(),mh(a,s,c,d),Ji(a,i,c))}}function Hi(s){var i=s.alternate;return s===N||i!==null&&i===N}function Ii(s,i){Th=Sh=!0;var a=s.pending;a===null?i.next=i:(i.next=a.next,a.next=i),s.pending=i}function Ji(s,i,a){if(a&4194240){var c=i.lanes;c&=s.pendingLanes,a|=c,i.lanes=a,Cc(s,a)}}var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(s,i){return ci().memoizedState=[s,i===void 0?null:i],s},useContext:Vg,useEffect:vi,useImperativeHandle:function(s,i,a){return a=a!=null?a.concat([s]):null,ti(4194308,4,yi.bind(null,i,s),a)},useLayoutEffect:function(s,i){return ti(4194308,4,s,i)},useInsertionEffect:function(s,i){return ti(4,2,s,i)},useMemo:function(s,i){var a=ci();return i=i===void 0?null:i,s=s(),a.memoizedState=[s,i],s},useReducer:function(s,i,a){var c=ci();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},c.queue=s,s=s.dispatch=Gi.bind(null,N,s),[c.memoizedState,s]},useRef:function(s){var i=ci();return s={current:s},i.memoizedState=s},useState:qi,useDebugValue:Ai,useDeferredValue:function(s){return ci().memoizedState=s},useTransition:function(){var s=qi(!1),i=s[0];return s=Ei.bind(null,s[1]),ci().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,a){var c=N,d=ci();if(I){if(a===void 0)throw Error(p$2(407));a=a()}else{if(a=i(),R===null)throw Error(p$2(349));Rh&30||ni(c,i,a)}d.memoizedState=a;var g={value:a,getSnapshot:i};return d.queue=g,vi(ki.bind(null,c,g,s),[s]),c.flags|=2048,li(9,mi.bind(null,c,g,a,i),void 0,null),a},useId:function(){var s=ci(),i=R.identifierPrefix;if(I){var a=sg,c=rg;a=(c&~(1<<32-oc(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=Uh++,0<\/script>",s=s.removeChild(s.firstChild)):typeof c.is=="string"?s=b.createElement(a,{is:c.is}):(s=b.createElement(a),a==="select"&&(b=s,c.multiple?b.multiple=!0:c.size&&(b.size=c.size))):s=b.createElementNS(s,a),s[Of]=i,s[Pf]=c,Aj(s,i,!1,!1),i.stateNode=s;e:{switch(b=vb(a,c),a){case"dialog":D("cancel",s),D("close",s),d=c;break;case"iframe":case"object":case"embed":D("load",s),d=c;break;case"video":case"audio":for(d=0;dHj&&(i.flags|=128,c=!0,Ej(g,!1),i.lanes=4194304)}else{if(!c)if(s=Mh(b),s!==null){if(i.flags|=128,c=!0,a=s.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),Ej(g,!0),g.tail===null&&g.tailMode==="hidden"&&!b.alternate&&!I)return S(i),null}else 2*B()-g.renderingStartTime>Hj&&a!==1073741824&&(i.flags|=128,c=!0,Ej(g,!1),i.lanes=4194304);g.isBackwards?(b.sibling=i.child,i.child=b):(a=g.last,a!==null?a.sibling=b:i.child=b,g.last=b)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=B(),i.sibling=null,a=M.current,G(M,c?a&1|2:a&1),i):(S(i),null);case 22:case 23:return Ij(),c=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==c&&(i.flags|=8192),c&&i.mode&1?gj&1073741824&&(S(i),i.subtreeFlags&6&&(i.flags|=8192)):S(i),null;case 24:return null;case 25:return null}throw Error(p$2(156,i.tag))}function Jj(s,i){switch(wg(i),i.tag){case 1:return Zf(i.type)&&$f(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return Jh(),E(Wf),E(H),Oh(),s=i.flags,s&65536&&!(s&128)?(i.flags=s&-65537|128,i):null;case 5:return Lh(i),null;case 13:if(E(M),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(p$2(340));Ig()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(i.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V=null;function Mj(s,i){var a=s.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){W(s,i,c)}else a.current=null}function Nj(s,i,a){try{a()}catch(c){W(s,i,c)}}var Oj=!1;function Pj(s,i){if(Cf=dd,s=Me(),Ne(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var d=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var b=0,$=-1,_=-1,j=0,_e=0,et=s,tt=null;t:for(;;){for(var nt;et!==a||d!==0&&et.nodeType!==3||($=b+d),et!==g||c!==0&&et.nodeType!==3||(_=b+c),et.nodeType===3&&(b+=et.nodeValue.length),(nt=et.firstChild)!==null;)tt=et,et=nt;for(;;){if(et===s)break t;if(tt===a&&++j===d&&($=b),tt===g&&++_e===c&&(_=b),(nt=et.nextSibling)!==null)break;et=tt,tt=et.parentNode}et=nt}a=$===-1||_===-1?null:{start:$,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(Df={focusedElem:s,selectionRange:a},dd=!1,V=i;V!==null;)if(i=V,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,V=s;else for(;V!==null;){i=V;try{var rt=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(rt!==null){var at=rt.memoizedProps,lt=rt.memoizedState,ot=i.stateNode,st=ot.getSnapshotBeforeUpdate(i.elementType===i.type?at:Lg(i.type,at),lt);ot.__reactInternalSnapshotBeforeUpdate=st}break;case 3:var it=i.stateNode.containerInfo;it.nodeType===1?it.textContent="":it.nodeType===9&&it.documentElement&&it.removeChild(it.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$2(163))}}catch(ut){W(i,i.return,ut)}if(s=i.sibling,s!==null){s.return=i.return,V=s;break}V=i.return}return rt=Oj,Oj=!1,rt}function Qj(s,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var d=c=c.next;do{if((d.tag&s)===s){var g=d.destroy;d.destroy=void 0,g!==void 0&&Nj(i,a,g)}d=d.next}while(d!==c)}}function Rj(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&s)===s){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Sj(s){var i=s.ref;if(i!==null){var a=s.stateNode;switch(s.tag){case 5:s=a;break;default:s=a}typeof i=="function"?i(s):i.current=s}}function Tj(s){var i=s.alternate;i!==null&&(s.alternate=null,Tj(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[Of],delete i[Pf],delete i[of],delete i[Qf],delete i[Rf])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Uj(s){return s.tag===5||s.tag===3||s.tag===4}function Vj(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Uj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Wj(s,i,a){var c=s.tag;if(c===5||c===6)s=s.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(s,i):a.insertBefore(s,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(s,a)):(i=a,i.appendChild(s)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Bf));else if(c!==4&&(s=s.child,s!==null))for(Wj(s,i,a),s=s.sibling;s!==null;)Wj(s,i,a),s=s.sibling}function Xj(s,i,a){var c=s.tag;if(c===5||c===6)s=s.stateNode,i?a.insertBefore(s,i):a.appendChild(s);else if(c!==4&&(s=s.child,s!==null))for(Xj(s,i,a),s=s.sibling;s!==null;)Xj(s,i,a),s=s.sibling}var X=null,Yj=!1;function Zj(s,i,a){for(a=a.child;a!==null;)ak(s,i,a),a=a.sibling}function ak(s,i,a){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,a)}catch{}switch(a.tag){case 5:U||Mj(a,i);case 6:var c=X,d=Yj;X=null,Zj(s,i,a),X=c,Yj=d,X!==null&&(Yj?(s=X,a=a.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):X.removeChild(a.stateNode));break;case 18:X!==null&&(Yj?(s=X,a=a.stateNode,s.nodeType===8?Kf(s.parentNode,a):s.nodeType===1&&Kf(s,a),bd(s)):Kf(X,a.stateNode));break;case 4:c=X,d=Yj,X=a.stateNode.containerInfo,Yj=!0,Zj(s,i,a),X=c,Yj=d;break;case 0:case 11:case 14:case 15:if(!U&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){d=c=c.next;do{var g=d,b=g.destroy;g=g.tag,b!==void 0&&(g&2||g&4)&&Nj(a,i,b),d=d.next}while(d!==c)}Zj(s,i,a);break;case 1:if(!U&&(Mj(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch($){W(a,i,$)}Zj(s,i,a);break;case 21:Zj(s,i,a);break;case 22:a.mode&1?(U=(c=U)||a.memoizedState!==null,Zj(s,i,a),U=c):Zj(s,i,a);break;default:Zj(s,i,a)}}function bk(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var a=s.stateNode;a===null&&(a=s.stateNode=new Lj),i.forEach(function(c){var d=ck.bind(null,s,c);a.has(c)||(a.add(c),c.then(d,d))})}}function dk(s,i){var a=i.deletions;if(a!==null)for(var c=0;cd&&(d=b),c&=~g}if(c=d,c=B()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*mk(c/1960))-c,10s?16:s,xk===null)var c=!1;else{if(s=xk,xk=null,yk=0,K&6)throw Error(p$2(331));var d=K;for(K|=4,V=s.current;V!==null;){var g=V,b=g.child;if(V.flags&16){var $=g.deletions;if($!==null){for(var _=0;_<$.length;_++){var j=$[_];for(V=j;V!==null;){var _e=V;switch(_e.tag){case 0:case 11:case 15:Qj(8,_e,g)}var et=_e.child;if(et!==null)et.return=_e,V=et;else for(;V!==null;){_e=V;var tt=_e.sibling,nt=_e.return;if(Tj(_e),_e===j){V=null;break}if(tt!==null){tt.return=nt,V=tt;break}V=nt}}}var rt=g.alternate;if(rt!==null){var at=rt.child;if(at!==null){rt.child=null;do{var lt=at.sibling;at.sibling=null,at=lt}while(at!==null)}}V=g}}if(g.subtreeFlags&2064&&b!==null)b.return=g,V=b;else e:for(;V!==null;){if(g=V,g.flags&2048)switch(g.tag){case 0:case 11:case 15:Qj(9,g,g.return)}var ot=g.sibling;if(ot!==null){ot.return=g.return,V=ot;break e}V=g.return}}var st=s.current;for(V=st;V!==null;){b=V;var it=b.child;if(b.subtreeFlags&2064&&it!==null)it.return=b,V=it;else e:for(b=st;V!==null;){if($=V,$.flags&2048)try{switch($.tag){case 0:case 11:case 15:Rj(9,$)}}catch(ct){W($,$.return,ct)}if($===b){V=null;break e}var ut=$.sibling;if(ut!==null){ut.return=$.return,V=ut;break e}V=$.return}}if(K=d,jg(),lc&&typeof lc.onPostCommitFiberRoot=="function")try{lc.onPostCommitFiberRoot(kc,s)}catch{}c=!0}return c}finally{C=a,pk.transition=i}}return!1}function Yk(s,i,a){i=Ki(a,i),i=Oi(s,i,1),s=dh(s,i,1),i=L(),s!==null&&(Ac(s,1,i),Ek(s,i))}function W(s,i,a){if(s.tag===3)Yk(s,s,a);else for(;i!==null;){if(i.tag===3){Yk(i,s,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Si===null||!Si.has(c))){s=Ki(a,s),s=Ri(i,s,1),i=dh(i,s,1),s=L(),i!==null&&(Ac(i,1,s),Ek(i,s));break}}i=i.return}}function Ui(s,i,a){var c=s.pingCache;c!==null&&c.delete(i),i=L(),s.pingedLanes|=s.suspendedLanes&a,R===s&&(Z&a)===a&&(T===4||T===3&&(Z&130023424)===Z&&500>B()-gk?Lk(s,0):sk|=a),Ek(s,i)}function Zk(s,i){i===0&&(s.mode&1?(i=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):i=1);var a=L();s=Zg(s,i),s!==null&&(Ac(s,i,a),Ek(s,a))}function vj(s){var i=s.memoizedState,a=0;i!==null&&(a=i.retryLane),Zk(s,a)}function ck(s,i){var a=0;switch(s.tag){case 13:var c=s.stateNode,d=s.memoizedState;d!==null&&(a=d.retryLane);break;case 19:c=s.stateNode;break;default:throw Error(p$2(314))}c!==null&&c.delete(i),Zk(s,a)}var Wk;Wk=function(s,i,a){if(s!==null)if(s.memoizedProps!==i.pendingProps||Wf.current)Ug=!0;else{if(!(s.lanes&a)&&!(i.flags&128))return Ug=!1,zj(s,i,a);Ug=!!(s.flags&131072)}else Ug=!1,I&&i.flags&1048576&&ug(i,ng,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;jj(s,i),s=i.pendingProps;var d=Yf(i,H.current);Tg(i,a),d=Xh(null,i,c,s,d,a);var g=bi();return i.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Zf(c)?(g=!0,cg(i)):g=!1,i.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,ah(i),d.updater=nh,i.stateNode=d,d._reactInternals=i,rh(i,c,s,a),i=kj(null,i,c,!0,g,a)):(i.tag=0,I&&g&&vg(i),Yi(null,i,d,a),i=i.child),i;case 16:c=i.elementType;e:{switch(jj(s,i),s=i.pendingProps,d=c._init,c=d(c._payload),i.type=c,d=i.tag=$k(c),s=Lg(c,s),d){case 0:i=dj(null,i,c,s,a);break e;case 1:i=ij(null,i,c,s,a);break e;case 11:i=Zi(null,i,c,s,a);break e;case 14:i=aj(null,i,c,Lg(c.type,s),a);break e}throw Error(p$2(306,c,""))}return i;case 0:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),dj(s,i,c,d,a);case 1:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),ij(s,i,c,d,a);case 3:e:{if(lj(i),s===null)throw Error(p$2(387));c=i.pendingProps,g=i.memoizedState,d=g.element,bh(s,i),gh(i,c,null,a);var b=i.memoizedState;if(c=b.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){d=Ki(Error(p$2(423)),i),i=mj(s,i,c,a,d);break e}else if(c!==d){d=Ki(Error(p$2(424)),i),i=mj(s,i,c,a,d);break e}else for(yg=Lf(i.stateNode.containerInfo.firstChild),xg=i,I=!0,zg=null,a=Ch(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ig(),c===d){i=$i(s,i,a);break e}Yi(s,i,c,a)}i=i.child}return i;case 5:return Kh(i),s===null&&Eg(i),c=i.type,d=i.pendingProps,g=s!==null?s.memoizedProps:null,b=d.children,Ef(c,d)?b=null:g!==null&&Ef(c,g)&&(i.flags|=32),hj(s,i),Yi(s,i,b,a),i.child;case 6:return s===null&&Eg(i),null;case 13:return pj(s,i,a);case 4:return Ih(i,i.stateNode.containerInfo),c=i.pendingProps,s===null?i.child=Bh(i,null,c,a):Yi(s,i,c,a),i.child;case 11:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),Zi(s,i,c,d,a);case 7:return Yi(s,i,i.pendingProps,a),i.child;case 8:return Yi(s,i,i.pendingProps.children,a),i.child;case 12:return Yi(s,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,d=i.pendingProps,g=i.memoizedProps,b=d.value,G(Mg,c._currentValue),c._currentValue=b,g!==null)if(He(g.value,b)){if(g.children===d.children&&!Wf.current){i=$i(s,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var $=g.dependencies;if($!==null){b=g.child;for(var _=$.firstContext;_!==null;){if(_.context===c){if(g.tag===1){_=ch(-1,a&-a),_.tag=2;var j=g.updateQueue;if(j!==null){j=j.shared;var _e=j.pending;_e===null?_.next=_:(_.next=_e.next,_e.next=_),j.pending=_}}g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),Sg(g.return,a,i),$.lanes|=a;break}_=_.next}}else if(g.tag===10)b=g.type===i.type?null:g.child;else if(g.tag===18){if(b=g.return,b===null)throw Error(p$2(341));b.lanes|=a,$=b.alternate,$!==null&&($.lanes|=a),Sg(b,a,i),b=g.sibling}else b=g.child;if(b!==null)b.return=g;else for(b=g;b!==null;){if(b===i){b=null;break}if(g=b.sibling,g!==null){g.return=b.return,b=g;break}b=b.return}g=b}Yi(s,i,d.children,a),i=i.child}return i;case 9:return d=i.type,c=i.pendingProps.children,Tg(i,a),d=Vg(d),c=c(d),i.flags|=1,Yi(s,i,c,a),i.child;case 14:return c=i.type,d=Lg(c,i.pendingProps),d=Lg(c.type,d),aj(s,i,c,d,a);case 15:return cj(s,i,i.type,i.pendingProps,a);case 17:return c=i.type,d=i.pendingProps,d=i.elementType===c?d:Lg(c,d),jj(s,i),i.tag=1,Zf(c)?(s=!0,cg(i)):s=!1,Tg(i,a),ph(i,c,d),rh(i,c,d,a),kj(null,i,c,!0,s,a);case 19:return yj(s,i,a);case 22:return ej(s,i,a)}throw Error(p$2(156,i.tag))};function Gk(s,i){return ac(s,i)}function al(s,i,a,c){this.tag=s,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(s,i,a,c){return new al(s,i,a,c)}function bj(s){return s=s.prototype,!(!s||!s.isReactComponent)}function $k(s){if(typeof s=="function")return bj(s)?1:0;if(s!=null){if(s=s.$$typeof,s===Da)return 11;if(s===Ga)return 14}return 2}function wh(s,i){var a=s.alternate;return a===null?(a=Bg(s.tag,i,s.key,s.mode),a.elementType=s.elementType,a.type=s.type,a.stateNode=s.stateNode,a.alternate=s,s.alternate=a):(a.pendingProps=i,a.type=s.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=s.flags&14680064,a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,i=s.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=s.sibling,a.index=s.index,a.ref=s.ref,a}function yh(s,i,a,c,d,g){var b=2;if(c=s,typeof s=="function")bj(s)&&(b=1);else if(typeof s=="string")b=5;else e:switch(s){case ya:return Ah(a.children,d,g,i);case za:b=8,d|=8;break;case Aa:return s=Bg(12,a,i,d|2),s.elementType=Aa,s.lanes=g,s;case Ea:return s=Bg(13,a,i,d),s.elementType=Ea,s.lanes=g,s;case Fa:return s=Bg(19,a,i,d),s.elementType=Fa,s.lanes=g,s;case Ia:return qj(a,d,g,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Ba:b=10;break e;case Ca:b=9;break e;case Da:b=11;break e;case Ga:b=14;break e;case Ha:b=16,c=null;break e}throw Error(p$2(130,s==null?s:typeof s,""))}return i=Bg(b,a,i,d),i.elementType=s,i.type=c,i.lanes=g,i}function Ah(s,i,a,c){return s=Bg(7,s,c,i),s.lanes=a,s}function qj(s,i,a,c){return s=Bg(22,s,c,i),s.elementType=Ia,s.lanes=a,s.stateNode={isHidden:!1},s}function xh(s,i,a){return s=Bg(6,s,null,i),s.lanes=a,s}function zh(s,i,a){return i=Bg(4,s.children!==null?s.children:[],s.key,i),i.lanes=a,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function bl(s,i,a,c,d){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=c,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function cl(s,i,a,c,d,g,b,$,_){return s=new bl(s,i,a,$,_),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Bg(3,null,null,i),s.current=g,g.stateNode=s,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(g),s}function dl(s,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(s){console.error(s)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var hydrateRoot,createRoot,m$2=reactDomExports;createRoot=m$2.createRoot,hydrateRoot=m$2.hydrateRoot;var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},isServer=typeof window>"u"||"Deno"in window;function noop$3(){}function functionalUpdate(s,i){return typeof s=="function"?s(i):s}function isValidTimeout(s){return typeof s=="number"&&s>=0&&s!==1/0}function timeUntilStale(s,i){return Math.max(s+(i||0)-Date.now(),0)}function matchQuery(s,i){const{type:a="all",exact:c,fetchStatus:d,predicate:g,queryKey:b,stale:$}=s;if(b){if(c){if(i.queryHash!==hashQueryKeyByOptions(b,i.options))return!1}else if(!partialMatchKey(i.queryKey,b))return!1}if(a!=="all"){const _=i.isActive();if(a==="active"&&!_||a==="inactive"&&_)return!1}return!(typeof $=="boolean"&&i.isStale()!==$||typeof d<"u"&&d!==i.state.fetchStatus||g&&!g(i))}function matchMutation(s,i){const{exact:a,status:c,predicate:d,mutationKey:g}=s;if(g){if(!i.options.mutationKey)return!1;if(a){if(hashKey(i.options.mutationKey)!==hashKey(g))return!1}else if(!partialMatchKey(i.options.mutationKey,g))return!1}return!(c&&i.state.status!==c||d&&!d(i))}function hashQueryKeyByOptions(s,i){return((i==null?void 0:i.queryKeyHashFn)||hashKey)(s)}function hashKey(s){return JSON.stringify(s,(i,a)=>isPlainObject$4(a)?Object.keys(a).sort().reduce((c,d)=>(c[d]=a[d],c),{}):a)}function partialMatchKey(s,i){return s===i?!0:typeof s!=typeof i?!1:s&&i&&typeof s=="object"&&typeof i=="object"?!Object.keys(i).some(a=>!partialMatchKey(s[a],i[a])):!1}function replaceEqualDeep(s,i){if(s===i)return s;const a=isPlainArray(s)&&isPlainArray(i);if(a||isPlainObject$4(s)&&isPlainObject$4(i)){const c=a?s.length:Object.keys(s).length,d=a?i:Object.keys(i),g=d.length,b=a?[]:{};let $=0;for(let _=0;_"u")return!0;const a=i.prototype;return!(!hasObjectPrototype(a)||!a.hasOwnProperty("isPrototypeOf"))}function hasObjectPrototype(s){return Object.prototype.toString.call(s)==="[object Object]"}function sleep(s){return new Promise(i=>{setTimeout(i,s)})}function scheduleMicrotask(s){sleep(0).then(s)}function replaceData(s,i,a){return typeof a.structuralSharing=="function"?a.structuralSharing(s,i):a.structuralSharing!==!1?replaceEqualDeep(s,i):i}function keepPreviousData(s){return s}function addToEnd(s,i,a=0){const c=[...s,i];return a&&c.length>a?c.slice(1):c}function addToStart(s,i,a=0){const c=[i,...s];return a&&c.length>a?c.slice(0,-1):c}var Tn,En,Mn,Ir,FocusManager=(Ir=class extends Subscribable{constructor(){super();Ot(this,Tn,void 0);Ot(this,En,void 0);Ot(this,Mn,void 0);At(this,Mn,i=>{if(!isServer&&window.addEventListener){const a=()=>i();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){gt(this,En)||this.setEventListener(gt(this,Mn))}onUnsubscribe(){var i;this.hasListeners()||((i=gt(this,En))==null||i.call(this),At(this,En,void 0))}setEventListener(i){var a;At(this,Mn,i),(a=gt(this,En))==null||a.call(this),At(this,En,i(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(i){gt(this,Tn)!==i&&(At(this,Tn,i),this.onFocus())}onFocus(){this.listeners.forEach(i=>{i()})}isFocused(){var i;return typeof gt(this,Tn)=="boolean"?gt(this,Tn):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},Tn=new WeakMap,En=new WeakMap,Mn=new WeakMap,Ir),focusManager=new FocusManager,Un,$n,Vn,Nr,OnlineManager=(Nr=class extends Subscribable{constructor(){super();Ot(this,Un,!0);Ot(this,$n,void 0);Ot(this,Vn,void 0);At(this,Vn,i=>{if(!isServer&&window.addEventListener){const a=()=>i(!0),c=()=>i(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",c)}}})}onSubscribe(){gt(this,$n)||this.setEventListener(gt(this,Vn))}onUnsubscribe(){var i;this.hasListeners()||((i=gt(this,$n))==null||i.call(this),At(this,$n,void 0))}setEventListener(i){var a;At(this,Vn,i),(a=gt(this,$n))==null||a.call(this),At(this,$n,i(this.setOnline.bind(this)))}setOnline(i){gt(this,Un)!==i&&(At(this,Un,i),this.listeners.forEach(c=>{c(i)}))}isOnline(){return gt(this,Un)}},Un=new WeakMap,$n=new WeakMap,Vn=new WeakMap,Nr),onlineManager=new OnlineManager;function defaultRetryDelay(s){return Math.min(1e3*2**s,3e4)}function canFetch(s){return(s??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class{constructor(s){this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function isCancelledError(s){return s instanceof CancelledError}function createRetryer(s){let i=!1,a=0,c=!1,d,g,b;const $=new Promise((lt,ot)=>{g=lt,b=ot}),_=lt=>{var ot;c||(nt(new CancelledError(lt)),(ot=s.abort)==null||ot.call(s))},j=()=>{i=!0},_e=()=>{i=!1},et=()=>!focusManager.isFocused()||s.networkMode!=="always"&&!onlineManager.isOnline(),tt=lt=>{var ot;c||(c=!0,(ot=s.onSuccess)==null||ot.call(s,lt),d==null||d(),g(lt))},nt=lt=>{var ot;c||(c=!0,(ot=s.onError)==null||ot.call(s,lt),d==null||d(),b(lt))},rt=()=>new Promise(lt=>{var ot;d=st=>{const it=c||!et();return it&<(st),it},(ot=s.onPause)==null||ot.call(s)}).then(()=>{var lt;d=void 0,c||(lt=s.onContinue)==null||lt.call(s)}),at=()=>{if(c)return;let lt;try{lt=s.fn()}catch(ot){lt=Promise.reject(ot)}Promise.resolve(lt).then(tt).catch(ot=>{var pt;if(c)return;const st=s.retry??(isServer?0:3),it=s.retryDelay??defaultRetryDelay,ut=typeof it=="function"?it(a,ot):it,ct=st===!0||typeof st=="number"&&a{if(et())return rt()}).then(()=>{i?nt(ot):at()})})};return canFetch(s.networkMode)?at():rt().then(at),{promise:$,cancel:_,continue:()=>(d==null?void 0:d())?$:Promise.resolve(),cancelRetry:j,continueRetry:_e}}function createNotifyManager(){let s=[],i=0,a=_e=>{_e()},c=_e=>{_e()};const d=_e=>{let et;i++;try{et=_e()}finally{i--,i||$()}return et},g=_e=>{i?s.push(_e):scheduleMicrotask(()=>{a(_e)})},b=_e=>(...et)=>{g(()=>{_e(...et)})},$=()=>{const _e=s;s=[],_e.length&&scheduleMicrotask(()=>{c(()=>{_e.forEach(et=>{a(et)})})})};return{batch:d,batchCalls:b,schedule:g,setNotifyFunction:_e=>{a=_e},setBatchNotifyFunction:_e=>{c=_e}}}var notifyManager=createNotifyManager(),Pn,Dr,Removable=(Dr=class{constructor(){Ot(this,Pn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&At(this,Pn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(isServer?1/0:5*60*1e3))}clearGcTimeout(){gt(this,Pn)&&(clearTimeout(gt(this,Pn)),At(this,Pn,void 0))}},Pn=new WeakMap,Dr),Bn,zn,an,Sn,ln,en,nr,kn,Hn,gr,fn,yn,Fr,Query=(Fr=class extends Removable{constructor(i){super();Ot(this,Hn);Ot(this,fn);Ot(this,Bn,void 0);Ot(this,zn,void 0);Ot(this,an,void 0);Ot(this,Sn,void 0);Ot(this,ln,void 0);Ot(this,en,void 0);Ot(this,nr,void 0);Ot(this,kn,void 0);At(this,kn,!1),At(this,nr,i.defaultOptions),Ft(this,Hn,gr).call(this,i.options),At(this,en,[]),At(this,an,i.cache),this.queryKey=i.queryKey,this.queryHash=i.queryHash,At(this,Bn,i.state||getDefaultState$1(this.options)),this.state=gt(this,Bn),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!gt(this,en).length&&this.state.fetchStatus==="idle"&>(this,an).remove(this)}setData(i,a){const c=replaceData(this.state.data,i,this.options);return Ft(this,fn,yn).call(this,{data:c,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),c}setState(i,a){Ft(this,fn,yn).call(this,{type:"setState",state:i,setStateOptions:a})}cancel(i){var c;const a=gt(this,Sn);return(c=gt(this,ln))==null||c.cancel(i),a?a.then(noop$3).catch(noop$3):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(gt(this,Bn))}isActive(){return gt(this,en).some(i=>i.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||gt(this,en).some(i=>i.getCurrentResult().isStale)}isStaleByTime(i=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!timeUntilStale(this.state.dataUpdatedAt,i)}onFocus(){var a;const i=gt(this,en).find(c=>c.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(a=gt(this,ln))==null||a.continue()}onOnline(){var a;const i=gt(this,en).find(c=>c.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(a=gt(this,ln))==null||a.continue()}addObserver(i){gt(this,en).includes(i)||(gt(this,en).push(i),this.clearGcTimeout(),gt(this,an).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){gt(this,en).includes(i)&&(At(this,en,gt(this,en).filter(a=>a!==i)),gt(this,en).length||(gt(this,ln)&&(gt(this,kn)?gt(this,ln).cancel({revert:!0}):gt(this,ln).cancelRetry()),this.scheduleGc()),gt(this,an).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return gt(this,en).length}invalidate(){this.state.isInvalidated||Ft(this,fn,yn).call(this,{type:"invalidate"})}fetch(i,a){var j,_e,et,tt;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(gt(this,Sn))return(j=gt(this,ln))==null||j.continueRetry(),gt(this,Sn)}if(i&&Ft(this,Hn,gr).call(this,i),!this.options.queryFn){const nt=gt(this,en).find(rt=>rt.options.queryFn);nt&&Ft(this,Hn,gr).call(this,nt.options)}const c=new AbortController,d={queryKey:this.queryKey,meta:this.meta},g=nt=>{Object.defineProperty(nt,"signal",{enumerable:!0,get:()=>(At(this,kn,!0),c.signal)})};g(d);const b=()=>this.options.queryFn?(At(this,kn,!1),this.options.persister?this.options.persister(this.options.queryFn,d,this):this.options.queryFn(d)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),$={fetchOptions:a,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:b};g($),(_e=this.options.behavior)==null||_e.onFetch($,this),At(this,zn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((et=$.fetchOptions)==null?void 0:et.meta))&&Ft(this,fn,yn).call(this,{type:"fetch",meta:(tt=$.fetchOptions)==null?void 0:tt.meta});const _=nt=>{var rt,at,lt,ot;isCancelledError(nt)&&nt.silent||Ft(this,fn,yn).call(this,{type:"error",error:nt}),isCancelledError(nt)||((at=(rt=gt(this,an).config).onError)==null||at.call(rt,nt,this),(ot=(lt=gt(this,an).config).onSettled)==null||ot.call(lt,this.state.data,nt,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return At(this,ln,createRetryer({fn:$.fetchFn,abort:c.abort.bind(c),onSuccess:nt=>{var rt,at,lt,ot;if(typeof nt>"u"){_(new Error(`${this.queryHash} data is undefined`));return}this.setData(nt),(at=(rt=gt(this,an).config).onSuccess)==null||at.call(rt,nt,this),(ot=(lt=gt(this,an).config).onSettled)==null||ot.call(lt,nt,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:_,onFail:(nt,rt)=>{Ft(this,fn,yn).call(this,{type:"failed",failureCount:nt,error:rt})},onPause:()=>{Ft(this,fn,yn).call(this,{type:"pause"})},onContinue:()=>{Ft(this,fn,yn).call(this,{type:"continue"})},retry:$.options.retry,retryDelay:$.options.retryDelay,networkMode:$.options.networkMode})),At(this,Sn,gt(this,ln).promise),gt(this,Sn)}},Bn=new WeakMap,zn=new WeakMap,an=new WeakMap,Sn=new WeakMap,ln=new WeakMap,en=new WeakMap,nr=new WeakMap,kn=new WeakMap,Hn=new WeakSet,gr=function(i){this.options={...gt(this,nr),...i},this.updateGcTime(this.options.gcTime)},fn=new WeakSet,yn=function(i){const a=c=>{switch(i.type){case"failed":return{...c,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:i.meta??null,fetchStatus:canFetch(this.options.networkMode)?"fetching":"paused",...!c.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...c,data:i.data,dataUpdateCount:c.dataUpdateCount+1,dataUpdatedAt:i.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const d=i.error;return isCancelledError(d)&&d.revert&>(this,zn)?{...gt(this,zn),fetchStatus:"idle"}:{...c,error:d,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...i.state}}};this.state=a(this.state),notifyManager.batch(()=>{gt(this,en).forEach(c=>{c.onQueryUpdate()}),gt(this,an).notify({query:this,type:"updated",action:i})})},Fr);function getDefaultState$1(s){const i=typeof s.initialData=="function"?s.initialData():s.initialData,a=typeof i<"u",c=a?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:a?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var pn,Mr,QueryCache=(Mr=class extends Subscribable{constructor(i={}){super();Ot(this,pn,void 0);this.config=i,At(this,pn,new Map)}build(i,a,c){const d=a.queryKey,g=a.queryHash??hashQueryKeyByOptions(d,a);let b=this.get(g);return b||(b=new Query({cache:this,queryKey:d,queryHash:g,options:i.defaultQueryOptions(a),state:c,defaultOptions:i.getQueryDefaults(d)}),this.add(b)),b}add(i){gt(this,pn).has(i.queryHash)||(gt(this,pn).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const a=gt(this,pn).get(i.queryHash);a&&(i.destroy(),a===i&>(this,pn).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return gt(this,pn).get(i)}getAll(){return[...gt(this,pn).values()]}find(i){const a={exact:!0,...i};return this.getAll().find(c=>matchQuery(a,c))}findAll(i={}){const a=this.getAll();return Object.keys(i).length>0?a.filter(c=>matchQuery(i,c)):a}notify(i){notifyManager.batch(()=>{this.listeners.forEach(a=>{a(i)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},pn=new WeakMap,Mr),mn,rr,on,Wn,hn,bn,Ur,Mutation=(Ur=class extends Removable{constructor(i){super();Ot(this,hn);Ot(this,mn,void 0);Ot(this,rr,void 0);Ot(this,on,void 0);Ot(this,Wn,void 0);this.mutationId=i.mutationId,At(this,rr,i.defaultOptions),At(this,on,i.mutationCache),At(this,mn,[]),this.state=i.state||getDefaultState(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options={...gt(this,rr),...i},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){gt(this,mn).includes(i)||(gt(this,mn).push(i),this.clearGcTimeout(),gt(this,on).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){At(this,mn,gt(this,mn).filter(a=>a!==i)),this.scheduleGc(),gt(this,on).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){gt(this,mn).length||(this.state.status==="pending"?this.scheduleGc():gt(this,on).remove(this))}continue(){var i;return((i=gt(this,Wn))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var d,g,b,$,_,j,_e,et,tt,nt,rt,at,lt,ot,st,it,ut,ct,pt,mt;const a=()=>(At(this,Wn,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(i):Promise.reject(new Error("No mutationFn found")),onFail:(xt,St)=>{Ft(this,hn,bn).call(this,{type:"failed",failureCount:xt,error:St})},onPause:()=>{Ft(this,hn,bn).call(this,{type:"pause"})},onContinue:()=>{Ft(this,hn,bn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),gt(this,Wn).promise),c=this.state.status==="pending";try{if(!c){Ft(this,hn,bn).call(this,{type:"pending",variables:i}),await((g=(d=gt(this,on).config).onMutate)==null?void 0:g.call(d,i,this));const St=await(($=(b=this.options).onMutate)==null?void 0:$.call(b,i));St!==this.state.context&&Ft(this,hn,bn).call(this,{type:"pending",context:St,variables:i})}const xt=await a();return await((j=(_=gt(this,on).config).onSuccess)==null?void 0:j.call(_,xt,i,this.state.context,this)),await((et=(_e=this.options).onSuccess)==null?void 0:et.call(_e,xt,i,this.state.context)),await((nt=(tt=gt(this,on).config).onSettled)==null?void 0:nt.call(tt,xt,null,this.state.variables,this.state.context,this)),await((at=(rt=this.options).onSettled)==null?void 0:at.call(rt,xt,null,i,this.state.context)),Ft(this,hn,bn).call(this,{type:"success",data:xt}),xt}catch(xt){try{throw await((ot=(lt=gt(this,on).config).onError)==null?void 0:ot.call(lt,xt,i,this.state.context,this)),await((it=(st=this.options).onError)==null?void 0:it.call(st,xt,i,this.state.context)),await((ct=(ut=gt(this,on).config).onSettled)==null?void 0:ct.call(ut,void 0,xt,this.state.variables,this.state.context,this)),await((mt=(pt=this.options).onSettled)==null?void 0:mt.call(pt,void 0,xt,i,this.state.context)),xt}finally{Ft(this,hn,bn).call(this,{type:"error",error:xt})}}}},mn=new WeakMap,rr=new WeakMap,on=new WeakMap,Wn=new WeakMap,hn=new WeakSet,bn=function(i){const a=c=>{switch(i.type){case"failed":return{...c,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!canFetch(this.options.networkMode),status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...c,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:i.error,failureCount:c.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=a(this.state),notifyManager.batch(()=>{gt(this,mn).forEach(c=>{c.onMutationUpdate(i)}),gt(this,on).notify({mutation:this,type:"updated",action:i})})},Ur);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var un,sr,An,Vr,MutationCache=(Vr=class extends Subscribable{constructor(i={}){super();Ot(this,un,void 0);Ot(this,sr,void 0);Ot(this,An,void 0);this.config=i,At(this,un,[]),At(this,sr,0)}build(i,a,c){const d=new Mutation({mutationCache:this,mutationId:++hr(this,sr)._,options:i.defaultMutationOptions(a),state:c});return this.add(d),d}add(i){gt(this,un).push(i),this.notify({type:"added",mutation:i})}remove(i){At(this,un,gt(this,un).filter(a=>a!==i)),this.notify({type:"removed",mutation:i})}clear(){notifyManager.batch(()=>{gt(this,un).forEach(i=>{this.remove(i)})})}getAll(){return gt(this,un)}find(i){const a={exact:!0,...i};return gt(this,un).find(c=>matchMutation(a,c))}findAll(i={}){return gt(this,un).filter(a=>matchMutation(i,a))}notify(i){notifyManager.batch(()=>{this.listeners.forEach(a=>{a(i)})})}resumePausedMutations(){return At(this,An,(gt(this,An)??Promise.resolve()).then(()=>{const i=gt(this,un).filter(a=>a.state.isPaused);return notifyManager.batch(()=>i.reduce((a,c)=>a.then(()=>c.continue().catch(noop$3)),Promise.resolve()))}).then(()=>{At(this,An,void 0)})),gt(this,An)}},un=new WeakMap,sr=new WeakMap,An=new WeakMap,Vr);function infiniteQueryBehavior(s){return{onFetch:(i,a)=>{const c=async()=>{var rt,at,lt,ot,st;const d=i.options,g=(lt=(at=(rt=i.fetchOptions)==null?void 0:rt.meta)==null?void 0:at.fetchMore)==null?void 0:lt.direction,b=((ot=i.state.data)==null?void 0:ot.pages)||[],$=((st=i.state.data)==null?void 0:st.pageParams)||[],_={pages:[],pageParams:[]};let j=!1;const _e=it=>{Object.defineProperty(it,"signal",{enumerable:!0,get:()=>(i.signal.aborted?j=!0:i.signal.addEventListener("abort",()=>{j=!0}),i.signal)})},et=i.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${i.options.queryHash}'`))),tt=async(it,ut,ct)=>{if(j)return Promise.reject();if(ut==null&&it.pages.length)return Promise.resolve(it);const pt={queryKey:i.queryKey,pageParam:ut,direction:ct?"backward":"forward",meta:i.options.meta};_e(pt);const mt=await et(pt),{maxPages:xt}=i.options,St=ct?addToStart:addToEnd;return{pages:St(it.pages,mt,xt),pageParams:St(it.pageParams,ut,xt)}};let nt;if(g&&b.length){const it=g==="backward",ut=it?getPreviousPageParam:getNextPageParam,ct={pages:b,pageParams:$},pt=ut(d,ct);nt=await tt(ct,pt,it)}else{nt=await tt(_,$[0]??d.initialPageParam);const it=s??b.length;for(let ut=1;ut{var d,g;return(g=(d=i.options).persister)==null?void 0:g.call(d,c,{queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},a)}:i.fetchFn=c}}}function getNextPageParam(s,{pages:i,pageParams:a}){const c=i.length-1;return s.getNextPageParam(i[c],i,a[c],a)}function getPreviousPageParam(s,{pages:i,pageParams:a}){var c;return(c=s.getPreviousPageParam)==null?void 0:c.call(s,i[0],i,a[0],a)}function hasNextPage(s,i){return i?getNextPageParam(s,i)!=null:!1}function hasPreviousPage(s,i){return!i||!s.getPreviousPageParam?!1:getPreviousPageParam(s,i)!=null}var Xt,Cn,wn,qn,Kn,Rn,Gn,Zn,Br,QueryClient=(Br=class{constructor(s={}){Ot(this,Xt,void 0);Ot(this,Cn,void 0);Ot(this,wn,void 0);Ot(this,qn,void 0);Ot(this,Kn,void 0);Ot(this,Rn,void 0);Ot(this,Gn,void 0);Ot(this,Zn,void 0);At(this,Xt,s.queryCache||new QueryCache),At(this,Cn,s.mutationCache||new MutationCache),At(this,wn,s.defaultOptions||{}),At(this,qn,new Map),At(this,Kn,new Map),At(this,Rn,0)}mount(){hr(this,Rn)._++,gt(this,Rn)===1&&(At(this,Gn,focusManager.subscribe(()=>{focusManager.isFocused()&&(this.resumePausedMutations(),gt(this,Xt).onFocus())})),At(this,Zn,onlineManager.subscribe(()=>{onlineManager.isOnline()&&(this.resumePausedMutations(),gt(this,Xt).onOnline())})))}unmount(){var s,i;hr(this,Rn)._--,gt(this,Rn)===0&&((s=gt(this,Gn))==null||s.call(this),At(this,Gn,void 0),(i=gt(this,Zn))==null||i.call(this),At(this,Zn,void 0))}isFetching(s){return gt(this,Xt).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return gt(this,Cn).findAll({...s,status:"pending"}).length}getQueryData(s){var i;return(i=gt(this,Xt).find({queryKey:s}))==null?void 0:i.state.data}ensureQueryData(s){const i=this.getQueryData(s.queryKey);return i!==void 0?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(s){return this.getQueryCache().findAll(s).map(({queryKey:i,state:a})=>{const c=a.data;return[i,c]})}setQueryData(s,i,a){const c=gt(this,Xt).find({queryKey:s}),d=c==null?void 0:c.state.data,g=functionalUpdate(i,d);if(typeof g>"u")return;const b=this.defaultQueryOptions({queryKey:s});return gt(this,Xt).build(this,b).setData(g,{...a,manual:!0})}setQueriesData(s,i,a){return notifyManager.batch(()=>this.getQueryCache().findAll(s).map(({queryKey:c})=>[c,this.setQueryData(c,i,a)]))}getQueryState(s){var i;return(i=gt(this,Xt).find({queryKey:s}))==null?void 0:i.state}removeQueries(s){const i=gt(this,Xt);notifyManager.batch(()=>{i.findAll(s).forEach(a=>{i.remove(a)})})}resetQueries(s,i){const a=gt(this,Xt),c={type:"active",...s};return notifyManager.batch(()=>(a.findAll(s).forEach(d=>{d.reset()}),this.refetchQueries(c,i)))}cancelQueries(s={},i={}){const a={revert:!0,...i},c=notifyManager.batch(()=>gt(this,Xt).findAll(s).map(d=>d.cancel(a)));return Promise.all(c).then(noop$3).catch(noop$3)}invalidateQueries(s={},i={}){return notifyManager.batch(()=>{if(gt(this,Xt).findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const a={...s,type:s.refetchType??s.type??"active"};return this.refetchQueries(a,i)})}refetchQueries(s={},i){const a={...i,cancelRefetch:(i==null?void 0:i.cancelRefetch)??!0},c=notifyManager.batch(()=>gt(this,Xt).findAll(s).filter(d=>!d.isDisabled()).map(d=>{let g=d.fetch(void 0,a);return a.throwOnError||(g=g.catch(noop$3)),d.state.fetchStatus==="paused"?Promise.resolve():g}));return Promise.all(c).then(noop$3)}fetchQuery(s){const i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const a=gt(this,Xt).build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(noop$3).catch(noop$3)}fetchInfiniteQuery(s){return s.behavior=infiniteQueryBehavior(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(noop$3).catch(noop$3)}resumePausedMutations(){return gt(this,Cn).resumePausedMutations()}getQueryCache(){return gt(this,Xt)}getMutationCache(){return gt(this,Cn)}getDefaultOptions(){return gt(this,wn)}setDefaultOptions(s){At(this,wn,s)}setQueryDefaults(s,i){gt(this,qn).set(hashKey(s),{queryKey:s,defaultOptions:i})}getQueryDefaults(s){const i=[...gt(this,qn).values()];let a={};return i.forEach(c=>{partialMatchKey(s,c.queryKey)&&(a={...a,...c.defaultOptions})}),a}setMutationDefaults(s,i){gt(this,Kn).set(hashKey(s),{mutationKey:s,defaultOptions:i})}getMutationDefaults(s){const i=[...gt(this,Kn).values()];let a={};return i.forEach(c=>{partialMatchKey(s,c.mutationKey)&&(a={...a,...c.defaultOptions})}),a}defaultQueryOptions(s){if(s!=null&&s._defaulted)return s;const i={...gt(this,wn).queries,...(s==null?void 0:s.queryKey)&&this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return i.queryHash||(i.queryHash=hashQueryKeyByOptions(i.queryKey,i)),typeof i.refetchOnReconnect>"u"&&(i.refetchOnReconnect=i.networkMode!=="always"),typeof i.throwOnError>"u"&&(i.throwOnError=!!i.suspense),typeof i.networkMode>"u"&&i.persister&&(i.networkMode="offlineFirst"),i}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...gt(this,wn).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){gt(this,Xt).clear(),gt(this,Cn).clear()}},Xt=new WeakMap,Cn=new WeakMap,wn=new WeakMap,qn=new WeakMap,Kn=new WeakMap,Rn=new WeakMap,Gn=new WeakMap,Zn=new WeakMap,Br),sn,Wt,Qn,nn,Ln,Yn,gn,or,Xn,Jn,On,In,_n,Nn,Dn,tr,ir,Sr,ar,Cr,lr,wr,ur,Rr,cr,_r,dr,jr,fr,Tr,yr,Wr,zr,QueryObserver=(zr=class extends Subscribable{constructor(i,a){super();Ot(this,Dn);Ot(this,ir);Ot(this,ar);Ot(this,lr);Ot(this,ur);Ot(this,cr);Ot(this,dr);Ot(this,fr);Ot(this,yr);Ot(this,sn,void 0);Ot(this,Wt,void 0);Ot(this,Qn,void 0);Ot(this,nn,void 0);Ot(this,Ln,void 0);Ot(this,Yn,void 0);Ot(this,gn,void 0);Ot(this,or,void 0);Ot(this,Xn,void 0);Ot(this,Jn,void 0);Ot(this,On,void 0);Ot(this,In,void 0);Ot(this,_n,void 0);Ot(this,Nn,void 0);At(this,Wt,void 0),At(this,Qn,void 0),At(this,nn,void 0),At(this,Nn,new Set),At(this,sn,i),this.options=a,At(this,gn,null),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(gt(this,Wt).addObserver(this),shouldFetchOnMount(gt(this,Wt),this.options)?Ft(this,Dn,tr).call(this):this.updateResult(),Ft(this,ur,Rr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(gt(this,Wt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(gt(this,Wt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ft(this,cr,_r).call(this),Ft(this,dr,jr).call(this),gt(this,Wt).removeObserver(this)}setOptions(i,a){const c=this.options,d=gt(this,Wt);if(this.options=gt(this,sn).defaultQueryOptions(i),shallowEqualObjects(c,this.options)||gt(this,sn).getQueryCache().notify({type:"observerOptionsUpdated",query:gt(this,Wt),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=c.queryKey),Ft(this,fr,Tr).call(this);const g=this.hasListeners();g&&shouldFetchOptionally(gt(this,Wt),d,this.options,c)&&Ft(this,Dn,tr).call(this),this.updateResult(a),g&&(gt(this,Wt)!==d||this.options.enabled!==c.enabled||this.options.staleTime!==c.staleTime)&&Ft(this,ir,Sr).call(this);const b=Ft(this,ar,Cr).call(this);g&&(gt(this,Wt)!==d||this.options.enabled!==c.enabled||b!==gt(this,_n))&&Ft(this,lr,wr).call(this,b)}getOptimisticResult(i){const a=gt(this,sn).getQueryCache().build(gt(this,sn),i),c=this.createResult(a,i);return shouldAssignObserverCurrentProperties(this,c)&&(At(this,nn,c),At(this,Yn,this.options),At(this,Ln,gt(this,Wt).state)),c}getCurrentResult(){return gt(this,nn)}trackResult(i){const a={};return Object.keys(i).forEach(c=>{Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:()=>(gt(this,Nn).add(c),i[c])})}),a}getCurrentQuery(){return gt(this,Wt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const a=gt(this,sn).defaultQueryOptions(i),c=gt(this,sn).getQueryCache().build(gt(this,sn),a);return c.isFetchingOptimistic=!0,c.fetch().then(()=>this.createResult(c,a))}fetch(i){return Ft(this,Dn,tr).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),gt(this,nn)))}createResult(i,a){var pt;const c=gt(this,Wt),d=this.options,g=gt(this,nn),b=gt(this,Ln),$=gt(this,Yn),j=i!==c?i.state:gt(this,Qn),{state:_e}=i;let{error:et,errorUpdatedAt:tt,fetchStatus:nt,status:rt}=_e,at=!1,lt;if(a._optimisticResults){const mt=this.hasListeners(),xt=!mt&&shouldFetchOnMount(i,a),St=mt&&shouldFetchOptionally(i,c,a,d);(xt||St)&&(nt=canFetch(i.options.networkMode)?"fetching":"paused",_e.dataUpdatedAt||(rt="pending")),a._optimisticResults==="isRestoring"&&(nt="idle")}if(a.select&&typeof _e.data<"u")if(g&&_e.data===(b==null?void 0:b.data)&&a.select===gt(this,or))lt=gt(this,Xn);else try{At(this,or,a.select),lt=a.select(_e.data),lt=replaceData(g==null?void 0:g.data,lt,a),At(this,Xn,lt),At(this,gn,null)}catch(mt){At(this,gn,mt)}else lt=_e.data;if(typeof a.placeholderData<"u"&&typeof lt>"u"&&rt==="pending"){let mt;if(g!=null&&g.isPlaceholderData&&a.placeholderData===($==null?void 0:$.placeholderData))mt=g.data;else if(mt=typeof a.placeholderData=="function"?a.placeholderData((pt=gt(this,Jn))==null?void 0:pt.state.data,gt(this,Jn)):a.placeholderData,a.select&&typeof mt<"u")try{mt=a.select(mt),At(this,gn,null)}catch(xt){At(this,gn,xt)}typeof mt<"u"&&(rt="success",lt=replaceData(g==null?void 0:g.data,mt,a),at=!0)}gt(this,gn)&&(et=gt(this,gn),lt=gt(this,Xn),tt=Date.now(),rt="error");const ot=nt==="fetching",st=rt==="pending",it=rt==="error",ut=st&&ot;return{status:rt,fetchStatus:nt,isPending:st,isSuccess:rt==="success",isError:it,isInitialLoading:ut,isLoading:ut,data:lt,dataUpdatedAt:_e.dataUpdatedAt,error:et,errorUpdatedAt:tt,failureCount:_e.fetchFailureCount,failureReason:_e.fetchFailureReason,errorUpdateCount:_e.errorUpdateCount,isFetched:_e.dataUpdateCount>0||_e.errorUpdateCount>0,isFetchedAfterMount:_e.dataUpdateCount>j.dataUpdateCount||_e.errorUpdateCount>j.errorUpdateCount,isFetching:ot,isRefetching:ot&&!st,isLoadingError:it&&_e.dataUpdatedAt===0,isPaused:nt==="paused",isPlaceholderData:at,isRefetchError:it&&_e.dataUpdatedAt!==0,isStale:isStale(i,a),refetch:this.refetch}}updateResult(i){const a=gt(this,nn),c=this.createResult(gt(this,Wt),this.options);if(At(this,Ln,gt(this,Wt).state),At(this,Yn,this.options),shallowEqualObjects(c,a))return;gt(this,Ln).data!==void 0&&At(this,Jn,gt(this,Wt)),At(this,nn,c);const d={},g=()=>{if(!a)return!0;const{notifyOnChangeProps:b}=this.options,$=typeof b=="function"?b():b;if($==="all"||!$&&!gt(this,Nn).size)return!0;const _=new Set($??gt(this,Nn));return this.options.throwOnError&&_.add("error"),Object.keys(gt(this,nn)).some(j=>{const _e=j;return gt(this,nn)[_e]!==a[_e]&&_.has(_e)})};(i==null?void 0:i.listeners)!==!1&&g()&&(d.listeners=!0),Ft(this,yr,Wr).call(this,{...d,...i})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ft(this,ur,Rr).call(this)}},sn=new WeakMap,Wt=new WeakMap,Qn=new WeakMap,nn=new WeakMap,Ln=new WeakMap,Yn=new WeakMap,gn=new WeakMap,or=new WeakMap,Xn=new WeakMap,Jn=new WeakMap,On=new WeakMap,In=new WeakMap,_n=new WeakMap,Nn=new WeakMap,Dn=new WeakSet,tr=function(i){Ft(this,fr,Tr).call(this);let a=gt(this,Wt).fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(noop$3)),a},ir=new WeakSet,Sr=function(){if(Ft(this,cr,_r).call(this),isServer||gt(this,nn).isStale||!isValidTimeout(this.options.staleTime))return;const a=timeUntilStale(gt(this,nn).dataUpdatedAt,this.options.staleTime)+1;At(this,On,setTimeout(()=>{gt(this,nn).isStale||this.updateResult()},a))},ar=new WeakSet,Cr=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(gt(this,Wt)):this.options.refetchInterval)??!1},lr=new WeakSet,wr=function(i){Ft(this,dr,jr).call(this),At(this,_n,i),!(isServer||this.options.enabled===!1||!isValidTimeout(gt(this,_n))||gt(this,_n)===0)&&At(this,In,setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&Ft(this,Dn,tr).call(this)},gt(this,_n)))},ur=new WeakSet,Rr=function(){Ft(this,ir,Sr).call(this),Ft(this,lr,wr).call(this,Ft(this,ar,Cr).call(this))},cr=new WeakSet,_r=function(){gt(this,On)&&(clearTimeout(gt(this,On)),At(this,On,void 0))},dr=new WeakSet,jr=function(){gt(this,In)&&(clearInterval(gt(this,In)),At(this,In,void 0))},fr=new WeakSet,Tr=function(){const i=gt(this,sn).getQueryCache().build(gt(this,sn),this.options);if(i===gt(this,Wt))return;const a=gt(this,Wt);At(this,Wt,i),At(this,Qn,i.state),this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))},yr=new WeakSet,Wr=function(i){notifyManager.batch(()=>{i.listeners&&this.listeners.forEach(a=>{a(gt(this,nn))}),gt(this,sn).getQueryCache().notify({query:gt(this,Wt),type:"observerResultsUpdated"})})},zr);function shouldLoadOnMount(s,i){return i.enabled!==!1&&!s.state.dataUpdatedAt&&!(s.state.status==="error"&&i.retryOnMount===!1)}function shouldFetchOnMount(s,i){return shouldLoadOnMount(s,i)||s.state.dataUpdatedAt>0&&shouldFetchOn(s,i,i.refetchOnMount)}function shouldFetchOn(s,i,a){if(i.enabled!==!1){const c=typeof a=="function"?a(s):a;return c==="always"||c!==!1&&isStale(s,i)}return!1}function shouldFetchOptionally(s,i,a,c){return a.enabled!==!1&&(s!==i||c.enabled===!1)&&(!a.suspense||s.state.status!=="error")&&isStale(s,a)}function isStale(s,i){return s.isStaleByTime(i.staleTime)}function shouldAssignObserverCurrentProperties(s,i){return!shallowEqualObjects(s.getCurrentResult(),i)}var jn,rn,cn,vn,er,xr,pr,Pr,Hr,MutationObserver$1=(Hr=class extends Subscribable{constructor(a,c){super();Ot(this,er);Ot(this,pr);Ot(this,jn,void 0);Ot(this,rn,void 0);Ot(this,cn,void 0);Ot(this,vn,void 0);At(this,rn,void 0),At(this,jn,a),this.setOptions(c),this.bindMethods(),Ft(this,er,xr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){var d;const c=this.options;this.options=gt(this,jn).defaultMutationOptions(a),shallowEqualObjects(c,this.options)||gt(this,jn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:gt(this,cn),observer:this}),(d=gt(this,cn))==null||d.setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=gt(this,cn))==null||a.removeObserver(this)}onMutationUpdate(a){Ft(this,er,xr).call(this),Ft(this,pr,Pr).call(this,a)}getCurrentResult(){return gt(this,rn)}reset(){At(this,cn,void 0),Ft(this,er,xr).call(this),Ft(this,pr,Pr).call(this)}mutate(a,c){var d;return At(this,vn,c),(d=gt(this,cn))==null||d.removeObserver(this),At(this,cn,gt(this,jn).getMutationCache().build(gt(this,jn),this.options)),gt(this,cn).addObserver(this),gt(this,cn).execute(a)}},jn=new WeakMap,rn=new WeakMap,cn=new WeakMap,vn=new WeakMap,er=new WeakSet,xr=function(){var c;const a=((c=gt(this,cn))==null?void 0:c.state)??getDefaultState();At(this,rn,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},pr=new WeakSet,Pr=function(a){notifyManager.batch(()=>{var c,d,g,b,$,_,j,_e;gt(this,vn)&&this.hasListeners()&&((a==null?void 0:a.type)==="success"?((d=(c=gt(this,vn)).onSuccess)==null||d.call(c,a.data,gt(this,rn).variables,gt(this,rn).context),(b=(g=gt(this,vn)).onSettled)==null||b.call(g,a.data,null,gt(this,rn).variables,gt(this,rn).context)):(a==null?void 0:a.type)==="error"&&((_=($=gt(this,vn)).onError)==null||_.call($,a.error,gt(this,rn).variables,gt(this,rn).context),(_e=(j=gt(this,vn)).onSettled)==null||_e.call(j,void 0,a.error,gt(this,rn).variables,gt(this,rn).context))),this.listeners.forEach(et=>{et(gt(this,rn))})})},Hr),QueryClientContext=reactExports.createContext(void 0),useQueryClient=s=>{const i=reactExports.useContext(QueryClientContext);if(s)return s;if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},QueryClientProvider=({client:s,children:i})=>(reactExports.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),reactExports.createElement(QueryClientContext.Provider,{value:s},i)),IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(s,i){return typeof s=="function"?s(...i):!!s}var ensurePreventErrorBoundaryRetry=(s,i)=>{(s.suspense||s.throwOnError)&&(i.isReset()||(s.retryOnMount=!1))},useClearResetErrorBoundary=s=>{reactExports.useEffect(()=>{s.clearReset()},[s])},getHasError=({result:s,errorResetBoundary:i,throwOnError:a,query:c})=>s.isError&&!i.isReset()&&!s.isFetching&&shouldThrowError(a,[s.error,c]),ensureStaleTime=s=>{s.suspense&&typeof s.staleTime!="number"&&(s.staleTime=1e3)},willFetch=(s,i)=>s.isLoading&&s.isFetching&&!i,shouldSuspend=(s,i,a)=>(s==null?void 0:s.suspense)&&willFetch(i,a),fetchOptimistic=(s,i,a)=>i.fetchOptimistic(s).catch(()=>{a.clearReset()});function useBaseQuery(s,i,a){const c=useQueryClient(a),d=useIsRestoring(),g=useQueryErrorResetBoundary(),b=c.defaultQueryOptions(s);b._optimisticResults=d?"isRestoring":"optimistic",ensureStaleTime(b),ensurePreventErrorBoundaryRetry(b,g),useClearResetErrorBoundary(g);const[$]=reactExports.useState(()=>new i(c,b)),_=$.getOptimisticResult(b);if(reactExports.useSyncExternalStore(reactExports.useCallback(j=>{const _e=d?()=>{}:$.subscribe(notifyManager.batchCalls(j));return $.updateResult(),_e},[$,d]),()=>$.getCurrentResult(),()=>$.getCurrentResult()),reactExports.useEffect(()=>{$.setOptions(b,{listeners:!1})},[b,$]),shouldSuspend(b,_,d))throw fetchOptimistic(b,$,g);if(getHasError({result:_,errorResetBoundary:g,throwOnError:b.throwOnError,query:$.getCurrentQuery()}))throw _.error;return b.notifyOnChangeProps?_:$.trackResult(_)}function useQuery(s,i){return useBaseQuery(s,QueryObserver,i)}function useMutation(s,i){const a=useQueryClient(i),[c]=reactExports.useState(()=>new MutationObserver$1(a,s));reactExports.useEffect(()=>{c.setOptions(s)},[c,s]);const d=reactExports.useSyncExternalStore(reactExports.useCallback(b=>c.subscribe(notifyManager.batchCalls(b)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g=reactExports.useCallback((b,$)=>{c.mutate(b,$).catch(noop$2)},[c]);if(d.error&&shouldThrowError(c.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:g,mutateAsync:d.mutate}}function noop$2(){}const MotionConfigContext=reactExports.createContext({transformPagePoint:s=>s,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser$1=typeof document<"u",useIsomorphicLayoutEffect$1=isBrowser$1?reactExports.useLayoutEffect:reactExports.useEffect,LazyContext=reactExports.createContext({strict:!1});function useVisualElement(s,i,a,c){const{visualElement:d}=reactExports.useContext(MotionContext),g=reactExports.useContext(LazyContext),b=reactExports.useContext(PresenceContext),$=reactExports.useContext(MotionConfigContext).reducedMotion,_=reactExports.useRef();c=c||g.renderer,!_.current&&c&&(_.current=c(s,{visualState:i,parent:d,props:a,presenceContext:b,blockInitialAnimation:b?b.initial===!1:!1,reducedMotionConfig:$}));const j=_.current;reactExports.useInsertionEffect(()=>{j&&j.update(a,b)});const _e=reactExports.useRef(!!window.HandoffAppearAnimations);return useIsomorphicLayoutEffect$1(()=>{j&&(j.render(),_e.current&&j.animationState&&j.animationState.animateChanges())}),reactExports.useEffect(()=>{j&&(j.updateFeatures(),!_e.current&&j.animationState&&j.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,_e.current=!1)}),j}function isRefObject(s){return typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,"current")}function useMotionRef(s,i,a){return reactExports.useCallback(c=>{c&&s.mount&&s.mount(c),i&&(c?i.mount(c):i.unmount()),a&&(typeof a=="function"?a(c):isRefObject(a)&&(a.current=c))},[i])}function isVariantLabel(s){return typeof s=="string"||Array.isArray(s)}function isAnimationControls(s){return typeof s=="object"&&typeof s.start=="function"}const variantPriorityOrder=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],variantProps=["initial",...variantPriorityOrder];function isControllingVariants(s){return isAnimationControls(s.animate)||variantProps.some(i=>isVariantLabel(s[i]))}function isVariantNode(s){return!!(isControllingVariants(s)||s.variants)}function getCurrentTreeVariants(s,i){if(isControllingVariants(s)){const{initial:a,animate:c}=s;return{initial:a===!1||isVariantLabel(a)?a:void 0,animate:isVariantLabel(c)?c:void 0}}return s.inherit!==!1?i:{}}function useCreateMotionContext(s){const{initial:i,animate:a}=getCurrentTreeVariants(s,reactExports.useContext(MotionContext));return reactExports.useMemo(()=>({initial:i,animate:a}),[variantLabelsAsDependency(i),variantLabelsAsDependency(a)])}function variantLabelsAsDependency(s){return Array.isArray(s)?s.join(" "):s}const featureProps={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"]},featureDefinitions={};for(const s in featureProps)featureDefinitions[s]={isEnabled:i=>featureProps[s].some(a=>!!i[a])};function loadFeatures(s){for(const i in s)featureDefinitions[i]={...featureDefinitions[i],...s[i]}}const LayoutGroupContext=reactExports.createContext({}),SwitchLayoutGroupContext=reactExports.createContext({}),motionComponentSymbol=Symbol.for("motionComponentSymbol");function createMotionComponent({preloadedFeatures:s,createVisualElement:i,useRender:a,useVisualState:c,Component:d}){s&&loadFeatures(s);function g($,_){let j;const _e={...reactExports.useContext(MotionConfigContext),...$,layoutId:useLayoutId($)},{isStatic:et}=_e,tt=useCreateMotionContext($),nt=c($,et);if(!et&&isBrowser$1){tt.visualElement=useVisualElement(d,nt,_e,i);const rt=reactExports.useContext(SwitchLayoutGroupContext),at=reactExports.useContext(LazyContext).strict;tt.visualElement&&(j=tt.visualElement.loadFeatures(_e,at,s,rt))}return reactExports.createElement(MotionContext.Provider,{value:tt},j&&tt.visualElement?reactExports.createElement(j,{visualElement:tt.visualElement,..._e}):null,a(d,$,useMotionRef(nt,tt.visualElement,_),nt,et,tt.visualElement))}const b=reactExports.forwardRef(g);return b[motionComponentSymbol]=d,b}function useLayoutId({layoutId:s}){const i=reactExports.useContext(LayoutGroupContext).id;return i&&s!==void 0?i+"-"+s:s}function createMotionProxy(s){function i(c,d={}){return createMotionComponent(s(c,d))}if(typeof Proxy>"u")return i;const a=new Map;return new Proxy(i,{get:(c,d)=>(a.has(d)||a.set(d,i(d)),a.get(d))})}const lowercaseSVGElements=["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 isSVGComponent(s){return typeof s!="string"||s.includes("-")?!1:!!(lowercaseSVGElements.indexOf(s)>-1||/[A-Z]/.test(s))}const scaleCorrectors={},transformPropOrder=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],transformProps=new Set(transformPropOrder);function isForcedMotionValue(s,{layout:i,layoutId:a}){return transformProps.has(s)||s.startsWith("origin")||(i||a!==void 0)&&(!!scaleCorrectors[s]||s==="opacity")}const isMotionValue=s=>!!(s&&s.getVelocity),translateAlias={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},numTransforms=transformPropOrder.length;function buildTransform(s,{enableHardwareAcceleration:i=!0,allowTransformNone:a=!0},c,d){let g="";for(let b=0;bi=>typeof i=="string"&&i.startsWith(s),isCSSVariableName=checkStringStartsWith("--"),isCSSVariableToken=checkStringStartsWith("var(--"),cssVariableRegex=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,getValueAsType=(s,i)=>i&&typeof s=="number"?i.transform(s):s,clamp$2=(s,i,a)=>Math.min(Math.max(a,s),i),number={test:s=>typeof s=="number",parse:parseFloat,transform:s=>s},alpha={...number,transform:s=>clamp$2(0,1,s)},scale={...number,default:1},sanitize=s=>Math.round(s*1e5)/1e5,floatRegex=/(-)?([\d]*\.?[\d])+/g,colorRegex=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,singleColorRegex=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function isString$3(s){return typeof s=="string"}const createUnitType=s=>({test:i=>isString$3(i)&&i.endsWith(s)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${s}`}),degrees=createUnitType("deg"),percent=createUnitType("%"),px=createUnitType("px"),vh=createUnitType("vh"),vw=createUnitType("vw"),progressPercentage={...percent,parse:s=>percent.parse(s)/100,transform:s=>percent.transform(s*100)},int={...number,transform:Math.round},numberValueTypes={borderWidth:px,borderTopWidth:px,borderRightWidth:px,borderBottomWidth:px,borderLeftWidth:px,borderRadius:px,radius:px,borderTopLeftRadius:px,borderTopRightRadius:px,borderBottomRightRadius:px,borderBottomLeftRadius:px,width:px,maxWidth:px,height:px,maxHeight:px,size:px,top:px,right:px,bottom:px,left:px,padding:px,paddingTop:px,paddingRight:px,paddingBottom:px,paddingLeft:px,margin:px,marginTop:px,marginRight:px,marginBottom:px,marginLeft:px,rotate:degrees,rotateX:degrees,rotateY:degrees,rotateZ:degrees,scale,scaleX:scale,scaleY:scale,scaleZ:scale,skew:degrees,skewX:degrees,skewY:degrees,distance:px,translateX:px,translateY:px,translateZ:px,x:px,y:px,z:px,perspective:px,transformPerspective:px,opacity:alpha,originX:progressPercentage,originY:progressPercentage,originZ:px,zIndex:int,fillOpacity:alpha,strokeOpacity:alpha,numOctaves:int};function buildHTMLStyles(s,i,a,c){const{style:d,vars:g,transform:b,transformOrigin:$}=s;let _=!1,j=!1,_e=!0;for(const et in i){const tt=i[et];if(isCSSVariableName(et)){g[et]=tt;continue}const nt=numberValueTypes[et],rt=getValueAsType(tt,nt);if(transformProps.has(et)){if(_=!0,b[et]=rt,!_e)continue;tt!==(nt.default||0)&&(_e=!1)}else et.startsWith("origin")?(j=!0,$[et]=rt):d[et]=rt}if(i.transform||(_||c?d.transform=buildTransform(s.transform,a,_e,c):d.transform&&(d.transform="none")),j){const{originX:et="50%",originY:tt="50%",originZ:nt=0}=$;d.transformOrigin=`${et} ${tt} ${nt}`}}const createHtmlRenderState=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function copyRawValuesOnly(s,i,a){for(const c in i)!isMotionValue(i[c])&&!isForcedMotionValue(c,a)&&(s[c]=i[c])}function useInitialMotionValues({transformTemplate:s},i,a){return reactExports.useMemo(()=>{const c=createHtmlRenderState();return buildHTMLStyles(c,i,{enableHardwareAcceleration:!a},s),Object.assign({},c.vars,c.style)},[i])}function useStyle(s,i,a){const c=s.style||{},d={};return copyRawValuesOnly(d,c,s),Object.assign(d,useInitialMotionValues(s,i,a)),s.transformValues?s.transformValues(d):d}function useHTMLProps(s,i,a){const c={},d=useStyle(s,i,a);return s.drag&&s.dragListener!==!1&&(c.draggable=!1,d.userSelect=d.WebkitUserSelect=d.WebkitTouchCallout="none",d.touchAction=s.drag===!0?"none":`pan-${s.drag==="x"?"y":"x"}`),s.tabIndex===void 0&&(s.onTap||s.onTapStart||s.whileTap)&&(c.tabIndex=0),c.style=d,c}const validMotionProps=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 isValidMotionProp(s){return s.startsWith("while")||s.startsWith("drag")&&s!=="draggable"||s.startsWith("layout")||s.startsWith("onTap")||s.startsWith("onPan")||validMotionProps.has(s)}let shouldForward=s=>!isValidMotionProp(s);function loadExternalIsValidProp(s){s&&(shouldForward=i=>i.startsWith("on")?!isValidMotionProp(i):s(i))}try{loadExternalIsValidProp(require("@emotion/is-prop-valid").default)}catch{}function filterProps(s,i,a){const c={};for(const d in s)d==="values"&&typeof s.values=="object"||(shouldForward(d)||a===!0&&isValidMotionProp(d)||!i&&!isValidMotionProp(d)||s.draggable&&d.startsWith("onDrag"))&&(c[d]=s[d]);return c}function calcOrigin(s,i,a){return typeof s=="string"?s:px.transform(i+a*s)}function calcSVGTransformOrigin(s,i,a){const c=calcOrigin(i,s.x,s.width),d=calcOrigin(a,s.y,s.height);return`${c} ${d}`}const dashKeys={offset:"stroke-dashoffset",array:"stroke-dasharray"},camelKeys={offset:"strokeDashoffset",array:"strokeDasharray"};function buildSVGPath(s,i,a=1,c=0,d=!0){s.pathLength=1;const g=d?dashKeys:camelKeys;s[g.offset]=px.transform(-c);const b=px.transform(i),$=px.transform(a);s[g.array]=`${b} ${$}`}function buildSVGAttrs(s,{attrX:i,attrY:a,attrScale:c,originX:d,originY:g,pathLength:b,pathSpacing:$=1,pathOffset:_=0,...j},_e,et,tt){if(buildHTMLStyles(s,j,_e,tt),et){s.style.viewBox&&(s.attrs.viewBox=s.style.viewBox);return}s.attrs=s.style,s.style={};const{attrs:nt,style:rt,dimensions:at}=s;nt.transform&&(at&&(rt.transform=nt.transform),delete nt.transform),at&&(d!==void 0||g!==void 0||rt.transform)&&(rt.transformOrigin=calcSVGTransformOrigin(at,d!==void 0?d:.5,g!==void 0?g:.5)),i!==void 0&&(nt.x=i),a!==void 0&&(nt.y=a),c!==void 0&&(nt.scale=c),b!==void 0&&buildSVGPath(nt,b,$,_,!1)}const createSvgRenderState=()=>({...createHtmlRenderState(),attrs:{}}),isSVGTag=s=>typeof s=="string"&&s.toLowerCase()==="svg";function useSVGProps(s,i,a,c){const d=reactExports.useMemo(()=>{const g=createSvgRenderState();return buildSVGAttrs(g,i,{enableHardwareAcceleration:!1},isSVGTag(c),s.transformTemplate),{...g.attrs,style:{...g.style}}},[i]);if(s.style){const g={};copyRawValuesOnly(g,s.style,s),d.style={...g,...d.style}}return d}function createUseRender(s=!1){return(a,c,d,{latestValues:g},b)=>{const _=(isSVGComponent(a)?useSVGProps:useHTMLProps)(c,g,b,a),_e={...filterProps(c,typeof a=="string",s),..._,ref:d},{children:et}=c,tt=reactExports.useMemo(()=>isMotionValue(et)?et.get():et,[et]);return reactExports.createElement(a,{..._e,children:tt})}}const camelToDash=s=>s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function renderHTML(s,{style:i,vars:a},c,d){Object.assign(s.style,i,d&&d.getProjectionStyles(c));for(const g in a)s.style.setProperty(g,a[g])}const camelCaseAttributes=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 renderSVG(s,i,a,c){renderHTML(s,i,void 0,c);for(const d in i.attrs)s.setAttribute(camelCaseAttributes.has(d)?d:camelToDash(d),i.attrs[d])}function scrapeMotionValuesFromProps$1(s,i){const{style:a}=s,c={};for(const d in a)(isMotionValue(a[d])||i.style&&isMotionValue(i.style[d])||isForcedMotionValue(d,s))&&(c[d]=a[d]);return c}function scrapeMotionValuesFromProps(s,i){const a=scrapeMotionValuesFromProps$1(s,i);for(const c in s)if(isMotionValue(s[c])||isMotionValue(i[c])){const d=transformPropOrder.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;a[d]=s[c]}return a}function resolveVariantFromProps(s,i,a,c={},d={}){return typeof i=="function"&&(i=i(a!==void 0?a:s.custom,c,d)),typeof i=="string"&&(i=s.variants&&s.variants[i]),typeof i=="function"&&(i=i(a!==void 0?a:s.custom,c,d)),i}function useConstant(s){const i=reactExports.useRef(null);return i.current===null&&(i.current=s()),i.current}const isKeyframesTarget=s=>Array.isArray(s),isCustomValue=s=>!!(s&&typeof s=="object"&&s.mix&&s.toValue),resolveFinalValueInKeyframes=s=>isKeyframesTarget(s)?s[s.length-1]||0:s;function resolveMotionValue(s){const i=isMotionValue(s)?s.get():s;return isCustomValue(i)?i.toValue():i}function makeState({scrapeMotionValuesFromProps:s,createRenderState:i,onMount:a},c,d,g){const b={latestValues:makeLatestValues(c,d,g,s),renderState:i()};return a&&(b.mount=$=>a(c,$,b)),b}const makeUseVisualState=s=>(i,a)=>{const c=reactExports.useContext(MotionContext),d=reactExports.useContext(PresenceContext),g=()=>makeState(s,i,c,d);return a?g():useConstant(g)};function makeLatestValues(s,i,a,c){const d={},g=c(s,{});for(const tt in g)d[tt]=resolveMotionValue(g[tt]);let{initial:b,animate:$}=s;const _=isControllingVariants(s),j=isVariantNode(s);i&&j&&!_&&s.inherit!==!1&&(b===void 0&&(b=i.initial),$===void 0&&($=i.animate));let _e=a?a.initial===!1:!1;_e=_e||b===!1;const et=_e?$:b;return et&&typeof et!="boolean"&&!isAnimationControls(et)&&(Array.isArray(et)?et:[et]).forEach(nt=>{const rt=resolveVariantFromProps(s,nt);if(!rt)return;const{transitionEnd:at,transition:lt,...ot}=rt;for(const st in ot){let it=ot[st];if(Array.isArray(it)){const ut=_e?it.length-1:0;it=it[ut]}it!==null&&(d[st]=it)}for(const st in at)d[st]=at[st]}),d}const noop$1=s=>s;class Queue{constructor(){this.order=[],this.scheduled=new Set}add(i){if(!this.scheduled.has(i))return this.scheduled.add(i),this.order.push(i),!0}remove(i){const a=this.order.indexOf(i);a!==-1&&(this.order.splice(a,1),this.scheduled.delete(i))}clear(){this.order.length=0,this.scheduled.clear()}}function createRenderStep(s){let i=new Queue,a=new Queue,c=0,d=!1,g=!1;const b=new WeakSet,$={schedule:(_,j=!1,_e=!1)=>{const et=_e&&d,tt=et?i:a;return j&&b.add(_),tt.add(_)&&et&&d&&(c=i.order.length),_},cancel:_=>{a.remove(_),b.delete(_)},process:_=>{if(d){g=!0;return}if(d=!0,[i,a]=[a,i],a.clear(),c=i.order.length,c)for(let j=0;j(et[tt]=createRenderStep(()=>a=!0),et),{}),b=et=>g[et].process(d),$=()=>{const et=performance.now();a=!1,d.delta=c?1e3/60:Math.max(Math.min(et-d.timestamp,maxElapsed),1),d.timestamp=et,d.isProcessing=!0,stepsOrder.forEach(b),d.isProcessing=!1,a&&i&&(c=!1,s($))},_=()=>{a=!0,c=!0,d.isProcessing||s($)};return{schedule:stepsOrder.reduce((et,tt)=>{const nt=g[tt];return et[tt]=(rt,at=!1,lt=!1)=>(a||_(),nt.schedule(rt,at,lt)),et},{}),cancel:et=>stepsOrder.forEach(tt=>g[tt].cancel(et)),state:d,steps:g}}const{schedule:frame,cancel:cancelFrame,state:frameData,steps}=createRenderBatcher(typeof requestAnimationFrame<"u"?requestAnimationFrame:noop$1,!0),svgMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps,createRenderState:createSvgRenderState,onMount:(s,i,{renderState:a,latestValues:c})=>{frame.read(()=>{try{a.dimensions=typeof i.getBBox=="function"?i.getBBox():i.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}),frame.render(()=>{buildSVGAttrs(a,c,{enableHardwareAcceleration:!1},isSVGTag(i.tagName),s.transformTemplate),renderSVG(i,a)})}})},htmlMotionConfig={useVisualState:makeUseVisualState({scrapeMotionValuesFromProps:scrapeMotionValuesFromProps$1,createRenderState:createHtmlRenderState})};function createDomMotionConfig(s,{forwardMotionProps:i=!1},a,c){return{...isSVGComponent(s)?svgMotionConfig:htmlMotionConfig,preloadedFeatures:a,useRender:createUseRender(i),createVisualElement:c,Component:s}}function addDomEvent(s,i,a,c={passive:!0}){return s.addEventListener(i,a,c),()=>s.removeEventListener(i,a)}const isPrimaryPointer=s=>s.pointerType==="mouse"?typeof s.button!="number"||s.button<=0:s.isPrimary!==!1;function extractEventInfo(s,i="page"){return{point:{x:s[i+"X"],y:s[i+"Y"]}}}const addPointerInfo=s=>i=>isPrimaryPointer(i)&&s(i,extractEventInfo(i));function addPointerEvent(s,i,a,c){return addDomEvent(s,i,addPointerInfo(a),c)}const combineFunctions=(s,i)=>a=>i(s(a)),pipe=(...s)=>s.reduce(combineFunctions);function createLock(s){let i=null;return()=>{const a=()=>{i=null};return i===null?(i=s,a):!1}}const globalHorizontalLock=createLock("dragHorizontal"),globalVerticalLock=createLock("dragVertical");function getGlobalLock(s){let i=!1;if(s==="y")i=globalVerticalLock();else if(s==="x")i=globalHorizontalLock();else{const a=globalHorizontalLock(),c=globalVerticalLock();a&&c?i=()=>{a(),c()}:(a&&a(),c&&c())}return i}function isDragActive(){const s=getGlobalLock(!0);return s?(s(),!1):!0}class Feature{constructor(i){this.isMounted=!1,this.node=i}update(){}}function addHoverEvent(s,i){const a="pointer"+(i?"enter":"leave"),c="onHover"+(i?"Start":"End"),d=(g,b)=>{if(g.type==="touch"||isDragActive())return;const $=s.getProps();s.animationState&&$.whileHover&&s.animationState.setActive("whileHover",i),$[c]&&frame.update(()=>$[c](g,b))};return addPointerEvent(s.current,a,d,{passive:!s.getProps()[c]})}class HoverGesture extends Feature{mount(){this.unmount=pipe(addHoverEvent(this.node,!0),addHoverEvent(this.node,!1))}unmount(){}}class FocusGesture extends Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!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=pipe(addDomEvent(this.node.current,"focus",()=>this.onFocus()),addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const isNodeOrChild=(s,i)=>i?s===i?!0:isNodeOrChild(s,i.parentElement):!1;function fireSyntheticPointerEvent(s,i){if(!i)return;const a=new PointerEvent("pointer"+s);i(a,extractEventInfo(a))}class PressGesture extends Feature{constructor(){super(...arguments),this.removeStartListeners=noop$1,this.removeEndListeners=noop$1,this.removeAccessibleListeners=noop$1,this.startPointerPress=(i,a)=>{if(this.removeEndListeners(),this.isPressing)return;const c=this.node.getProps(),g=addPointerEvent(window,"pointerup",($,_)=>{if(!this.checkPressEnd())return;const{onTap:j,onTapCancel:_e}=this.node.getProps();frame.update(()=>{isNodeOrChild(this.node.current,$.target)?j&&j($,_):_e&&_e($,_)})},{passive:!(c.onTap||c.onPointerUp)}),b=addPointerEvent(window,"pointercancel",($,_)=>this.cancelPress($,_),{passive:!(c.onTapCancel||c.onPointerCancel)});this.removeEndListeners=pipe(g,b),this.startPress(i,a)},this.startAccessiblePress=()=>{const i=g=>{if(g.key!=="Enter"||this.isPressing)return;const b=$=>{$.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(_,j)=>{const{onTap:_e}=this.node.getProps();_e&&frame.update(()=>_e(_,j))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",b),fireSyntheticPointerEvent("down",($,_)=>{this.startPress($,_)})},a=addDomEvent(this.node.current,"keydown",i),c=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(g,b)=>this.cancelPress(g,b))},d=addDomEvent(this.node.current,"blur",c);this.removeAccessibleListeners=pipe(a,d)}}startPress(i,a){this.isPressing=!0;const{onTapStart:c,whileTap:d}=this.node.getProps();d&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),c&&frame.update(()=>c(i,a))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!isDragActive()}cancelPress(i,a){if(!this.checkPressEnd())return;const{onTapCancel:c}=this.node.getProps();c&&frame.update(()=>c(i,a))}mount(){const i=this.node.getProps(),a=addPointerEvent(this.node.current,"pointerdown",this.startPointerPress,{passive:!(i.onTapStart||i.onPointerStart)}),c=addDomEvent(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=pipe(a,c)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const observerCallbacks=new WeakMap,observers=new WeakMap,fireObserverCallback=s=>{const i=observerCallbacks.get(s.target);i&&i(s)},fireAllObserverCallbacks=s=>{s.forEach(fireObserverCallback)};function initIntersectionObserver({root:s,...i}){const a=s||document;observers.has(a)||observers.set(a,{});const c=observers.get(a),d=JSON.stringify(i);return c[d]||(c[d]=new IntersectionObserver(fireAllObserverCallbacks,{root:s,...i})),c[d]}function observeIntersection(s,i,a){const c=initIntersectionObserver(i);return observerCallbacks.set(s,a),c.observe(s),()=>{observerCallbacks.delete(s),c.unobserve(s)}}const thresholdNames={some:0,all:1};class InViewFeature extends Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:a,margin:c,amount:d="some",once:g}=i,b={root:a?a.current:void 0,rootMargin:c,threshold:typeof d=="number"?d:thresholdNames[d]},$=_=>{const{isIntersecting:j}=_;if(this.isInView===j||(this.isInView=j,g&&!j&&this.hasEnteredView))return;j&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",j);const{onViewportEnter:_e,onViewportLeave:et}=this.node.getProps(),tt=j?_e:et;tt&&tt(_)};return observeIntersection(this.node.current,b,$)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:a}=this.node;["amount","margin","root"].some(hasViewportOptionChanged(i,a))&&this.startObserver()}unmount(){}}function hasViewportOptionChanged({viewport:s={}},{viewport:i={}}={}){return a=>s[a]!==i[a]}const gestureAnimations={inView:{Feature:InViewFeature},tap:{Feature:PressGesture},focus:{Feature:FocusGesture},hover:{Feature:HoverGesture}};function shallowCompare(s,i){if(!Array.isArray(i))return!1;const a=i.length;if(a!==s.length)return!1;for(let c=0;ci[c]=a.get()),i}function getVelocity(s){const i={};return s.values.forEach((a,c)=>i[c]=a.getVelocity()),i}function resolveVariant(s,i,a){const c=s.getProps();return resolveVariantFromProps(c,i,a!==void 0?a:c.custom,getCurrent(s),getVelocity(s))}const optimizedAppearDataId="framerAppearId",optimizedAppearDataAttribute="data-"+camelToDash(optimizedAppearDataId);let warning$1=noop$1,invariant$1=noop$1;const secondsToMilliseconds=s=>s*1e3,millisecondsToSeconds=s=>s/1e3,instantAnimationState={current:!1},isBezierDefinition=s=>Array.isArray(s)&&typeof s[0]=="number";function isWaapiSupportedEasing(s){return!!(!s||typeof s=="string"&&supportedWaapiEasing[s]||isBezierDefinition(s)||Array.isArray(s)&&s.every(isWaapiSupportedEasing))}const cubicBezierAsString=([s,i,a,c])=>`cubic-bezier(${s}, ${i}, ${a}, ${c})`,supportedWaapiEasing={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cubicBezierAsString([0,.65,.55,1]),circOut:cubicBezierAsString([.55,0,1,.45]),backIn:cubicBezierAsString([.31,.01,.66,-.59]),backOut:cubicBezierAsString([.33,1.53,.69,.99])};function mapEasingToNativeEasing(s){if(s)return isBezierDefinition(s)?cubicBezierAsString(s):Array.isArray(s)?s.map(mapEasingToNativeEasing):supportedWaapiEasing[s]}function animateStyle(s,i,a,{delay:c=0,duration:d,repeat:g=0,repeatType:b="loop",ease:$,times:_}={}){const j={[i]:a};_&&(j.offset=_);const _e=mapEasingToNativeEasing($);return Array.isArray(_e)&&(j.easing=_e),s.animate(j,{delay:c,duration:d,easing:Array.isArray(_e)?"linear":_e,fill:"both",iterations:g+1,direction:b==="reverse"?"alternate":"normal"})}function getFinalKeyframe(s,{repeat:i,repeatType:a="loop"}){const c=i&&a!=="loop"&&i%2===1?0:s.length-1;return s[c]}const calcBezier=(s,i,a)=>(((1-3*a+3*i)*s+(3*a-6*i))*s+3*i)*s,subdivisionPrecision=1e-7,subdivisionMaxIterations=12;function binarySubdivide(s,i,a,c,d){let g,b,$=0;do b=i+(a-i)/2,g=calcBezier(b,c,d)-s,g>0?a=b:i=b;while(Math.abs(g)>subdivisionPrecision&&++$binarySubdivide(g,0,1,s,a);return g=>g===0||g===1?g:calcBezier(d(g),i,c)}const easeIn=cubicBezier(.42,0,1,1),easeOut=cubicBezier(0,0,.58,1),easeInOut=cubicBezier(.42,0,.58,1),isEasingArray=s=>Array.isArray(s)&&typeof s[0]!="number",mirrorEasing=s=>i=>i<=.5?s(2*i)/2:(2-s(2*(1-i)))/2,reverseEasing=s=>i=>1-s(1-i),circIn=s=>1-Math.sin(Math.acos(s)),circOut=reverseEasing(circIn),circInOut=mirrorEasing(circOut),backOut=cubicBezier(.33,1.53,.69,.99),backIn=reverseEasing(backOut),backInOut=mirrorEasing(backIn),anticipate=s=>(s*=2)<1?.5*backIn(s):.5*(2-Math.pow(2,-10*(s-1))),easingLookup={linear:noop$1,easeIn,easeInOut,easeOut,circIn,circInOut,circOut,backIn,backInOut,backOut,anticipate},easingDefinitionToFunction=s=>{if(Array.isArray(s)){invariant$1(s.length===4);const[i,a,c,d]=s;return cubicBezier(i,a,c,d)}else if(typeof s=="string")return easingLookup[s];return s},isColorString=(s,i)=>a=>!!(isString$3(a)&&singleColorRegex.test(a)&&a.startsWith(s)||i&&Object.prototype.hasOwnProperty.call(a,i)),splitColor=(s,i,a)=>c=>{if(!isString$3(c))return c;const[d,g,b,$]=c.match(floatRegex);return{[s]:parseFloat(d),[i]:parseFloat(g),[a]:parseFloat(b),alpha:$!==void 0?parseFloat($):1}},clampRgbUnit=s=>clamp$2(0,255,s),rgbUnit={...number,transform:s=>Math.round(clampRgbUnit(s))},rgba={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:({red:s,green:i,blue:a,alpha:c=1})=>"rgba("+rgbUnit.transform(s)+", "+rgbUnit.transform(i)+", "+rgbUnit.transform(a)+", "+sanitize(alpha.transform(c))+")"};function parseHex(s){let i="",a="",c="",d="";return s.length>5?(i=s.substring(1,3),a=s.substring(3,5),c=s.substring(5,7),d=s.substring(7,9)):(i=s.substring(1,2),a=s.substring(2,3),c=s.substring(3,4),d=s.substring(4,5),i+=i,a+=a,c+=c,d+=d),{red:parseInt(i,16),green:parseInt(a,16),blue:parseInt(c,16),alpha:d?parseInt(d,16)/255:1}}const hex={test:isColorString("#"),parse:parseHex,transform:rgba.transform},hsla={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:({hue:s,saturation:i,lightness:a,alpha:c=1})=>"hsla("+Math.round(s)+", "+percent.transform(sanitize(i))+", "+percent.transform(sanitize(a))+", "+sanitize(alpha.transform(c))+")"},color={test:s=>rgba.test(s)||hex.test(s)||hsla.test(s),parse:s=>rgba.test(s)?rgba.parse(s):hsla.test(s)?hsla.parse(s):hex.parse(s),transform:s=>isString$3(s)?s:s.hasOwnProperty("red")?rgba.transform(s):hsla.transform(s)},mix=(s,i,a)=>-a*s+a*i+s;function hueToRgb(s,i,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?s+(i-s)*6*a:a<1/2?i:a<2/3?s+(i-s)*(2/3-a)*6:s}function hslaToRgba({hue:s,saturation:i,lightness:a,alpha:c}){s/=360,i/=100,a/=100;let d=0,g=0,b=0;if(!i)d=g=b=a;else{const $=a<.5?a*(1+i):a+i-a*i,_=2*a-$;d=hueToRgb(_,$,s+1/3),g=hueToRgb(_,$,s),b=hueToRgb(_,$,s-1/3)}return{red:Math.round(d*255),green:Math.round(g*255),blue:Math.round(b*255),alpha:c}}const mixLinearColor=(s,i,a)=>{const c=s*s;return Math.sqrt(Math.max(0,a*(i*i-c)+c))},colorTypes=[hex,rgba,hsla],getColorType=s=>colorTypes.find(i=>i.test(s));function asRGBA(s){const i=getColorType(s);let a=i.parse(s);return i===hsla&&(a=hslaToRgba(a)),a}const mixColor=(s,i)=>{const a=asRGBA(s),c=asRGBA(i),d={...a};return g=>(d.red=mixLinearColor(a.red,c.red,g),d.green=mixLinearColor(a.green,c.green,g),d.blue=mixLinearColor(a.blue,c.blue,g),d.alpha=mix(a.alpha,c.alpha,g),rgba.transform(d))};function test(s){var i,a;return isNaN(s)&&isString$3(s)&&(((i=s.match(floatRegex))===null||i===void 0?void 0:i.length)||0)+(((a=s.match(colorRegex))===null||a===void 0?void 0:a.length)||0)>0}const cssVarTokeniser={regex:cssVariableRegex,countKey:"Vars",token:"${v}",parse:noop$1},colorTokeniser={regex:colorRegex,countKey:"Colors",token:"${c}",parse:color.parse},numberTokeniser={regex:floatRegex,countKey:"Numbers",token:"${n}",parse:number.parse};function tokenise(s,{regex:i,countKey:a,token:c,parse:d}){const g=s.tokenised.match(i);g&&(s["num"+a]=g.length,s.tokenised=s.tokenised.replace(i,c),s.values.push(...g.map(d)))}function analyseComplexValue(s){const i=s.toString(),a={value:i,tokenised:i,values:[],numVars:0,numColors:0,numNumbers:0};return a.value.includes("var(--")&&tokenise(a,cssVarTokeniser),tokenise(a,colorTokeniser),tokenise(a,numberTokeniser),a}function parseComplexValue(s){return analyseComplexValue(s).values}function createTransformer(s){const{values:i,numColors:a,numVars:c,tokenised:d}=analyseComplexValue(s),g=i.length;return b=>{let $=d;for(let _=0;_typeof s=="number"?0:s;function getAnimatableNone$1(s){const i=parseComplexValue(s);return createTransformer(s)(i.map(convertNumbersToZero))}const complex={test,parse:parseComplexValue,createTransformer,getAnimatableNone:getAnimatableNone$1},mixImmediate=(s,i)=>a=>`${a>0?i:s}`;function getMixer(s,i){return typeof s=="number"?a=>mix(s,i,a):color.test(s)?mixColor(s,i):s.startsWith("var(")?mixImmediate(s,i):mixComplex(s,i)}const mixArray=(s,i)=>{const a=[...s],c=a.length,d=s.map((g,b)=>getMixer(g,i[b]));return g=>{for(let b=0;b{const a={...s,...i},c={};for(const d in a)s[d]!==void 0&&i[d]!==void 0&&(c[d]=getMixer(s[d],i[d]));return d=>{for(const g in c)a[g]=c[g](d);return a}},mixComplex=(s,i)=>{const a=complex.createTransformer(i),c=analyseComplexValue(s),d=analyseComplexValue(i);return c.numVars===d.numVars&&c.numColors===d.numColors&&c.numNumbers>=d.numNumbers?pipe(mixArray(c.values,d.values),a):mixImmediate(s,i)},progress=(s,i,a)=>{const c=i-s;return c===0?1:(a-s)/c},mixNumber=(s,i)=>a=>mix(s,i,a);function detectMixerFactory(s){return typeof s=="number"?mixNumber:typeof s=="string"?color.test(s)?mixColor:mixComplex:Array.isArray(s)?mixArray:typeof s=="object"?mixObject:mixNumber}function createMixers(s,i,a){const c=[],d=a||detectMixerFactory(s[0]),g=s.length-1;for(let b=0;bi[0];s[0]>s[g-1]&&(s=[...s].reverse(),i=[...i].reverse());const b=createMixers(i,c,d),$=b.length,_=j=>{let _e=0;if($>1)for(;_e_(clamp$2(s[0],s[g-1],j)):_}function fillOffset(s,i){const a=s[s.length-1];for(let c=1;c<=i;c++){const d=progress(0,i,c);s.push(mix(a,1,d))}}function defaultOffset(s){const i=[0];return fillOffset(i,s.length-1),i}function convertOffsetToTimes(s,i){return s.map(a=>a*i)}function defaultEasing(s,i){return s.map(()=>i||easeInOut).splice(0,s.length-1)}function keyframes({duration:s=300,keyframes:i,times:a,ease:c="easeInOut"}){const d=isEasingArray(c)?c.map(easingDefinitionToFunction):easingDefinitionToFunction(c),g={done:!1,value:i[0]},b=convertOffsetToTimes(a&&a.length===i.length?a:defaultOffset(i),s),$=interpolate(b,i,{ease:Array.isArray(d)?d:defaultEasing(i,d)});return{calculatedDuration:s,next:_=>(g.value=$(_),g.done=_>=s,g)}}function velocityPerSecond(s,i){return i?s*(1e3/i):0}const velocitySampleDuration=5;function calcGeneratorVelocity(s,i,a){const c=Math.max(i-velocitySampleDuration,0);return velocityPerSecond(a-s(c),i-c)}const safeMin=.001,minDuration=.01,maxDuration$1=10,minDamping=.05,maxDamping=1;function findSpring({duration:s=800,bounce:i=.25,velocity:a=0,mass:c=1}){let d,g;warning$1(s<=secondsToMilliseconds(maxDuration$1));let b=1-i;b=clamp$2(minDamping,maxDamping,b),s=clamp$2(minDuration,maxDuration$1,millisecondsToSeconds(s)),b<1?(d=j=>{const _e=j*b,et=_e*s,tt=_e-a,nt=calcAngularFreq(j,b),rt=Math.exp(-et);return safeMin-tt/nt*rt},g=j=>{const et=j*b*s,tt=et*a+a,nt=Math.pow(b,2)*Math.pow(j,2)*s,rt=Math.exp(-et),at=calcAngularFreq(Math.pow(j,2),b);return(-d(j)+safeMin>0?-1:1)*((tt-nt)*rt)/at}):(d=j=>{const _e=Math.exp(-j*s),et=(j-a)*s+1;return-safeMin+_e*et},g=j=>{const _e=Math.exp(-j*s),et=(a-j)*(s*s);return _e*et});const $=5/s,_=approximateRoot(d,g,$);if(s=secondsToMilliseconds(s),isNaN(_))return{stiffness:100,damping:10,duration:s};{const j=Math.pow(_,2)*c;return{stiffness:j,damping:b*2*Math.sqrt(c*j),duration:s}}}const rootIterations=12;function approximateRoot(s,i,a){let c=a;for(let d=1;ds[a]!==void 0)}function getSpringOptions(s){let i={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...s};if(!isSpringType(s,physicsKeys)&&isSpringType(s,durationKeys)){const a=findSpring(s);i={...i,...a,velocity:0,mass:1},i.isResolvedFromDuration=!0}return i}function spring({keyframes:s,restDelta:i,restSpeed:a,...c}){const d=s[0],g=s[s.length-1],b={done:!1,value:d},{stiffness:$,damping:_,mass:j,velocity:_e,duration:et,isResolvedFromDuration:tt}=getSpringOptions(c),nt=_e?-millisecondsToSeconds(_e):0,rt=_/(2*Math.sqrt($*j)),at=g-d,lt=millisecondsToSeconds(Math.sqrt($/j)),ot=Math.abs(at)<5;a||(a=ot?.01:2),i||(i=ot?.005:.5);let st;if(rt<1){const it=calcAngularFreq(lt,rt);st=ut=>{const ct=Math.exp(-rt*lt*ut);return g-ct*((nt+rt*lt*at)/it*Math.sin(it*ut)+at*Math.cos(it*ut))}}else if(rt===1)st=it=>g-Math.exp(-lt*it)*(at+(nt+lt*at)*it);else{const it=lt*Math.sqrt(rt*rt-1);st=ut=>{const ct=Math.exp(-rt*lt*ut),pt=Math.min(it*ut,300);return g-ct*((nt+rt*lt*at)*Math.sinh(pt)+it*at*Math.cosh(pt))/it}}return{calculatedDuration:tt&&et||null,next:it=>{const ut=st(it);if(tt)b.done=it>=et;else{let ct=nt;it!==0&&(rt<1?ct=calcGeneratorVelocity(st,it,ut):ct=0);const pt=Math.abs(ct)<=a,mt=Math.abs(g-ut)<=i;b.done=pt&&mt}return b.value=b.done?g:ut,b}}}function inertia({keyframes:s,velocity:i=0,power:a=.8,timeConstant:c=325,bounceDamping:d=10,bounceStiffness:g=500,modifyTarget:b,min:$,max:_,restDelta:j=.5,restSpeed:_e}){const et=s[0],tt={done:!1,value:et},nt=xt=>$!==void 0&&xt<$||_!==void 0&&xt>_,rt=xt=>$===void 0?_:_===void 0||Math.abs($-xt)-at*Math.exp(-xt/c),it=xt=>ot+st(xt),ut=xt=>{const St=st(xt),wt=it(xt);tt.done=Math.abs(St)<=j,tt.value=tt.done?ot:wt};let ct,pt;const mt=xt=>{nt(tt.value)&&(ct=xt,pt=spring({keyframes:[tt.value,rt(tt.value)],velocity:calcGeneratorVelocity(it,xt,tt.value),damping:d,stiffness:g,restDelta:j,restSpeed:_e}))};return mt(0),{calculatedDuration:null,next:xt=>{let St=!1;return!pt&&ct===void 0&&(St=!0,ut(xt),mt(xt)),ct!==void 0&&xt>ct?pt.next(xt-ct):(!St&&ut(xt),tt)}}}const frameloopDriver=s=>{const i=({timestamp:a})=>s(a);return{start:()=>frame.update(i,!0),stop:()=>cancelFrame(i),now:()=>frameData.isProcessing?frameData.timestamp:performance.now()}},maxGeneratorDuration=2e4;function calcGeneratorDuration(s){let i=0;const a=50;let c=s.next(i);for(;!c.done&&i=maxGeneratorDuration?1/0:i}const types={decay:inertia,inertia,tween:keyframes,keyframes,spring};function animateValue({autoplay:s=!0,delay:i=0,driver:a=frameloopDriver,keyframes:c,type:d="keyframes",repeat:g=0,repeatDelay:b=0,repeatType:$="loop",onPlay:_,onStop:j,onComplete:_e,onUpdate:et,...tt}){let nt=1,rt=!1,at,lt;const ot=()=>{lt=new Promise(kt=>{at=kt})};ot();let st;const it=types[d]||keyframes;let ut;it!==keyframes&&typeof c[0]!="number"&&(ut=interpolate([0,100],c,{clamp:!1}),c=[0,100]);const ct=it({...tt,keyframes:c});let pt;$==="mirror"&&(pt=it({...tt,keyframes:[...c].reverse(),velocity:-(tt.velocity||0)}));let mt="idle",xt=null,St=null,wt=null;ct.calculatedDuration===null&&g&&(ct.calculatedDuration=calcGeneratorDuration(ct));const{calculatedDuration:_t}=ct;let ht=1/0,dt=1/0;_t!==null&&(ht=_t+b,dt=ht*(g+1)-b);let ft=0;const vt=kt=>{if(St===null)return;nt>0&&(St=Math.min(St,kt)),nt<0&&(St=Math.min(kt-dt/nt,St)),xt!==null?ft=xt:ft=Math.round(kt-St)*nt;const It=ft-i*(nt>=0?1:-1),Mt=nt>=0?It<0:It>dt;ft=Math.max(It,0),mt==="finished"&&xt===null&&(ft=dt);let Bt=ft,Qt=ct;if(g){const tn=ft/ht;let Kt=Math.floor(tn),Jt=tn%1;!Jt&&tn>=1&&(Jt=1),Jt===1&&Kt--,Kt=Math.min(Kt,g+1);const xn=!!(Kt%2);xn&&($==="reverse"?(Jt=1-Jt,b&&(Jt-=b/ht)):$==="mirror"&&(Qt=pt));let dn=clamp$2(0,1,Jt);ft>dt&&(dn=$==="reverse"&&xn?1:0),Bt=dn*ht}const Vt=Mt?{done:!1,value:c[0]}:Qt.next(Bt);ut&&(Vt.value=ut(Vt.value));let{done:qt}=Vt;!Mt&&_t!==null&&(qt=nt>=0?ft>=dt:ft<=0);const Ut=xt===null&&(mt==="finished"||mt==="running"&&qt);return et&&et(Vt.value),Ut&&Et(),Vt},bt=()=>{st&&st.stop(),st=void 0},$t=()=>{mt="idle",bt(),at(),ot(),St=wt=null},Et=()=>{mt="finished",_e&&_e(),bt(),at()},Tt=()=>{if(rt)return;st||(st=a(vt));const kt=st.now();_&&_(),xt!==null?St=kt-xt:(!St||mt==="finished")&&(St=kt),mt==="finished"&&ot(),wt=St,xt=null,mt="running",st.start()};s&&Tt();const jt={then(kt,It){return lt.then(kt,It)},get time(){return millisecondsToSeconds(ft)},set time(kt){kt=secondsToMilliseconds(kt),ft=kt,xt!==null||!st||nt===0?xt=kt:St=st.now()-kt/nt},get duration(){const kt=ct.calculatedDuration===null?calcGeneratorDuration(ct):ct.calculatedDuration;return millisecondsToSeconds(kt)},get speed(){return nt},set speed(kt){kt===nt||!st||(nt=kt,jt.time=millisecondsToSeconds(ft))},get state(){return mt},play:Tt,pause:()=>{mt="paused",xt=ft},stop:()=>{rt=!0,mt!=="idle"&&(mt="idle",j&&j(),$t())},cancel:()=>{wt!==null&&vt(wt),$t()},complete:()=>{mt="finished"},sample:kt=>(St=0,vt(kt))};return jt}function memo(s){let i;return()=>(i===void 0&&(i=s()),i)}const supportsWaapi=memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),acceleratedValues=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),sampleDelta=10,maxDuration=2e4,requiresPregeneratedKeyframes=(s,i)=>i.type==="spring"||s==="backgroundColor"||!isWaapiSupportedEasing(i.ease);function createAcceleratedAnimation(s,i,{onUpdate:a,onComplete:c,...d}){if(!(supportsWaapi()&&acceleratedValues.has(i)&&!d.repeatDelay&&d.repeatType!=="mirror"&&d.damping!==0&&d.type!=="inertia"))return!1;let b=!1,$,_;const j=()=>{_=new Promise(st=>{$=st})};j();let{keyframes:_e,duration:et=300,ease:tt,times:nt}=d;if(requiresPregeneratedKeyframes(i,d)){const st=animateValue({...d,repeat:0,delay:0});let it={done:!1,value:_e[0]};const ut=[];let ct=0;for(;!it.done&&ctrt.cancel(),lt=()=>{frame.update(at),$(),j()};return rt.onfinish=()=>{s.set(getFinalKeyframe(_e,d)),c&&c(),lt()},{then(st,it){return _.then(st,it)},attachTimeline(st){return rt.timeline=st,rt.onfinish=null,noop$1},get time(){return millisecondsToSeconds(rt.currentTime||0)},set time(st){rt.currentTime=secondsToMilliseconds(st)},get speed(){return rt.playbackRate},set speed(st){rt.playbackRate=st},get duration(){return millisecondsToSeconds(et)},play:()=>{b||(rt.play(),cancelFrame(at))},pause:()=>rt.pause(),stop:()=>{if(b=!0,rt.playState==="idle")return;const{currentTime:st}=rt;if(st){const it=animateValue({...d,autoplay:!1});s.setWithVelocity(it.sample(st-sampleDelta).value,it.sample(st).value,sampleDelta)}lt()},complete:()=>rt.finish(),cancel:lt}}function createInstantAnimation({keyframes:s,delay:i,onUpdate:a,onComplete:c}){const d=()=>(a&&a(s[s.length-1]),c&&c(),{time:0,speed:1,duration:0,play:noop$1,pause:noop$1,stop:noop$1,then:g=>(g(),Promise.resolve()),cancel:noop$1,complete:noop$1});return i?animateValue({keyframes:[0,1],duration:0,delay:i,onComplete:d}):d()}const underDampedSpring={type:"spring",stiffness:500,damping:25,restSpeed:10},criticallyDampedSpring=s=>({type:"spring",stiffness:550,damping:s===0?2*Math.sqrt(550):30,restSpeed:10}),keyframesTransition={type:"keyframes",duration:.8},ease={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},getDefaultTransition=(s,{keyframes:i})=>i.length>2?keyframesTransition:transformProps.has(s)?s.startsWith("scale")?criticallyDampedSpring(i[1]):underDampedSpring:ease,isAnimatable=(s,i)=>s==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(complex.test(i)||i==="0")&&!i.startsWith("url(")),maxDefaults=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(s){const[i,a]=s.slice(0,-1).split("(");if(i==="drop-shadow")return s;const[c]=a.match(floatRegex)||[];if(!c)return s;const d=a.replace(c,"");let g=maxDefaults.has(i)?1:0;return c!==a&&(g*=100),i+"("+g+d+")"}const functionRegex=/([a-z-]*)\(.*?\)/g,filter={...complex,getAnimatableNone:s=>{const i=s.match(functionRegex);return i?i.map(applyDefaultFilter).join(" "):s}},defaultValueTypes={...numberValueTypes,color,backgroundColor:color,outlineColor:color,fill:color,stroke:color,borderColor:color,borderTopColor:color,borderRightColor:color,borderBottomColor:color,borderLeftColor:color,filter,WebkitFilter:filter},getDefaultValueType=s=>defaultValueTypes[s];function getAnimatableNone(s,i){let a=getDefaultValueType(s);return a!==filter&&(a=complex),a.getAnimatableNone?a.getAnimatableNone(i):void 0}const isZeroValueString=s=>/^0[^.\s]+$/.test(s);function isNone(s){if(typeof s=="number")return s===0;if(s!==null)return s==="none"||s==="0"||isZeroValueString(s)}function getKeyframes(s,i,a,c){const d=isAnimatable(i,a);let g;Array.isArray(a)?g=[...a]:g=[null,a];const b=c.from!==void 0?c.from:s.get();let $;const _=[];for(let j=0;jd=>{const g=getValueTransition(c,s)||{},b=g.delay||c.delay||0;let{elapsed:$=0}=c;$=$-secondsToMilliseconds(b);const _=getKeyframes(i,s,a,g),j=_[0],_e=_[_.length-1],et=isAnimatable(s,j),tt=isAnimatable(s,_e);let nt={keyframes:_,velocity:i.getVelocity(),ease:"easeOut",...g,delay:-$,onUpdate:rt=>{i.set(rt),g.onUpdate&&g.onUpdate(rt)},onComplete:()=>{d(),g.onComplete&&g.onComplete()}};if(isTransitionDefined(g)||(nt={...nt,...getDefaultTransition(s,nt)}),nt.duration&&(nt.duration=secondsToMilliseconds(nt.duration)),nt.repeatDelay&&(nt.repeatDelay=secondsToMilliseconds(nt.repeatDelay)),!et||!tt||instantAnimationState.current||g.type===!1)return createInstantAnimation(nt);if(i.owner&&i.owner.current instanceof HTMLElement&&!i.owner.getProps().onUpdate){const rt=createAcceleratedAnimation(i,s,nt);if(rt)return rt}return animateValue(nt)};function isWillChangeMotionValue(s){return!!(isMotionValue(s)&&s.add)}const isNumericalString=s=>/^\-?\d*\.?\d+$/.test(s);function addUniqueItem(s,i){s.indexOf(i)===-1&&s.push(i)}function removeItem(s,i){const a=s.indexOf(i);a>-1&&s.splice(a,1)}class SubscriptionManager{constructor(){this.subscriptions=[]}add(i){return addUniqueItem(this.subscriptions,i),()=>removeItem(this.subscriptions,i)}notify(i,a,c){const d=this.subscriptions.length;if(d)if(d===1)this.subscriptions[0](i,a,c);else for(let g=0;g!isNaN(parseFloat(s));class MotionValue{constructor(i,a={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(c,d=!0)=>{this.prev=this.current,this.current=c;const{delta:g,timestamp:b}=frameData;this.lastUpdated!==b&&(this.timeDelta=g,this.lastUpdated=b,frame.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()),d&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>frame.postRender(this.velocityCheck),this.velocityCheck=({timestamp:c})=>{c!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=i,this.canTrackVelocity=isFloat(this.current),this.owner=a.owner}onChange(i){return this.on("change",i)}on(i,a){this.events[i]||(this.events[i]=new SubscriptionManager);const c=this.events[i].add(a);return i==="change"?()=>{c(),frame.read(()=>{this.events.change.getSize()||this.stop()})}:c}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,a){this.passiveEffect=i,this.stopPassiveEffect=a}set(i,a=!0){!a||!this.passiveEffect?this.updateAndNotify(i,a):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,a,c){this.set(a),this.prev=i,this.timeDelta=c}jump(i){this.updateAndNotify(i),this.prev=i,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?velocityPerSecond(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(i){return this.stop(),new Promise(a=>{this.hasAnimated=!0,this.animation=i(a),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 motionValue(s,i){return new MotionValue(s,i)}const testValueType=s=>i=>i.test(s),auto={test:s=>s==="auto",parse:s=>s},dimensionValueTypes=[number,px,percent,degrees,vw,vh,auto],findDimensionValueType=s=>dimensionValueTypes.find(testValueType(s)),valueTypes=[...dimensionValueTypes,color,complex],findValueType=s=>valueTypes.find(testValueType(s));function setMotionValue(s,i,a){s.hasValue(i)?s.getValue(i).set(a):s.addValue(i,motionValue(a))}function setTarget(s,i){const a=resolveVariant(s,i);let{transitionEnd:c={},transition:d={},...g}=a?s.makeTargetAnimatable(a,!1):{};g={...g,...c};for(const b in g){const $=resolveFinalValueInKeyframes(g[b]);setMotionValue(s,b,$)}}function checkTargetForNewValues(s,i,a){var c,d;const g=Object.keys(i).filter($=>!s.hasValue($)),b=g.length;if(b)for(let $=0;$_.remove(et))),j.push(at)}return b&&Promise.all(j).then(()=>{b&&setTarget(s,b)}),j}function animateVariant(s,i,a={}){const c=resolveVariant(s,i,a.custom);let{transition:d=s.getDefaultTransition()||{}}=c||{};a.transitionOverride&&(d=a.transitionOverride);const g=c?()=>Promise.all(animateTarget(s,c,a)):()=>Promise.resolve(),b=s.variantChildren&&s.variantChildren.size?(_=0)=>{const{delayChildren:j=0,staggerChildren:_e,staggerDirection:et}=d;return animateChildren(s,i,j+_,_e,et,a)}:()=>Promise.resolve(),{when:$}=d;if($){const[_,j]=$==="beforeChildren"?[g,b]:[b,g];return _().then(()=>j())}else return Promise.all([g(),b(a.delay)])}function animateChildren(s,i,a=0,c=0,d=1,g){const b=[],$=(s.variantChildren.size-1)*c,_=d===1?(j=0)=>j*c:(j=0)=>$-j*c;return Array.from(s.variantChildren).sort(sortByTreeOrder).forEach((j,_e)=>{j.notify("AnimationStart",i),b.push(animateVariant(j,i,{...g,delay:a+_(_e)}).then(()=>j.notify("AnimationComplete",i)))}),Promise.all(b)}function sortByTreeOrder(s,i){return s.sortNodePosition(i)}function animateVisualElement(s,i,a={}){s.notify("AnimationStart",i);let c;if(Array.isArray(i)){const d=i.map(g=>animateVariant(s,g,a));c=Promise.all(d)}else if(typeof i=="string")c=animateVariant(s,i,a);else{const d=typeof i=="function"?resolveVariant(s,i,a.custom):i;c=Promise.all(animateTarget(s,d,a))}return c.then(()=>s.notify("AnimationComplete",i))}const reversePriorityOrder=[...variantPriorityOrder].reverse(),numAnimationTypes=variantPriorityOrder.length;function animateList(s){return i=>Promise.all(i.map(({animation:a,options:c})=>animateVisualElement(s,a,c)))}function createAnimationState(s){let i=animateList(s);const a=createState();let c=!0;const d=(_,j)=>{const _e=resolveVariant(s,j);if(_e){const{transition:et,transitionEnd:tt,...nt}=_e;_={..._,...nt,...tt}}return _};function g(_){i=_(s)}function b(_,j){const _e=s.getProps(),et=s.getVariantContext(!0)||{},tt=[],nt=new Set;let rt={},at=1/0;for(let ot=0;otat&&ct;const wt=Array.isArray(ut)?ut:[ut];let _t=wt.reduce(d,{});pt===!1&&(_t={});const{prevResolvedValues:ht={}}=it,dt={...ht,..._t},ft=vt=>{St=!0,nt.delete(vt),it.needsAnimating[vt]=!0};for(const vt in dt){const bt=_t[vt],$t=ht[vt];rt.hasOwnProperty(vt)||(bt!==$t?isKeyframesTarget(bt)&&isKeyframesTarget($t)?!shallowCompare(bt,$t)||xt?ft(vt):it.protectedKeys[vt]=!0:bt!==void 0?ft(vt):nt.add(vt):bt!==void 0&&nt.has(vt)?ft(vt):it.protectedKeys[vt]=!0)}it.prevProp=ut,it.prevResolvedValues=_t,it.isActive&&(rt={...rt,..._t}),c&&s.blockInitialAnimation&&(St=!1),St&&!mt&&tt.push(...wt.map(vt=>({animation:vt,options:{type:st,..._}})))}if(nt.size){const ot={};nt.forEach(st=>{const it=s.getBaseTarget(st);it!==void 0&&(ot[st]=it)}),tt.push({animation:ot})}let lt=!!tt.length;return c&&_e.initial===!1&&!s.manuallyAnimateOnMount&&(lt=!1),c=!1,lt?i(tt):Promise.resolve()}function $(_,j,_e){var et;if(a[_].isActive===j)return Promise.resolve();(et=s.variantChildren)===null||et===void 0||et.forEach(nt=>{var rt;return(rt=nt.animationState)===null||rt===void 0?void 0:rt.setActive(_,j)}),a[_].isActive=j;const tt=b(_e,_);for(const nt in a)a[nt].protectedKeys={};return tt}return{animateChanges:b,setActive:$,setAnimateFunction:g,getState:()=>a}}function checkVariantsDidChange(s,i){return typeof i=="string"?i!==s:Array.isArray(i)?!shallowCompare(i,s):!1}function createTypeState(s=!1){return{isActive:s,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function createState(){return{animate:createTypeState(!0),whileInView:createTypeState(),whileHover:createTypeState(),whileTap:createTypeState(),whileDrag:createTypeState(),whileFocus:createTypeState(),exit:createTypeState()}}class AnimationFeature extends Feature{constructor(i){super(i),i.animationState||(i.animationState=createAnimationState(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();this.unmount(),isAnimationControls(i)&&(this.unmount=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:a}=this.node.prevProps||{};i!==a&&this.updateAnimationControlsSubscription()}unmount(){}}let id=0;class ExitAnimationFeature extends Feature{constructor(){super(...arguments),this.id=id++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:a,custom:c}=this.node.presenceContext,{isPresent:d}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===d)return;const g=this.node.animationState.setActive("exit",!i,{custom:c??this.node.getProps().custom});a&&!i&&g.then(()=>a(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const animations={animation:{Feature:AnimationFeature},exit:{Feature:ExitAnimationFeature}},createAxis=()=>({min:0,max:0}),createBox=()=>({x:createAxis(),y:createAxis()});function convertBoundingBoxToBox({top:s,left:i,right:a,bottom:c}){return{x:{min:i,max:a},y:{min:s,max:c}}}function transformBoxPoints(s,i){if(!i)return s;const a=i({x:s.left,y:s.top}),c=i({x:s.right,y:s.bottom});return{top:a.y,left:a.x,bottom:c.y,right:c.x}}function measureViewportBox(s,i){return convertBoundingBoxToBox(transformBoxPoints(s.getBoundingClientRect(),i))}const splitCSSVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function parseCSSVariable(s){const i=splitCSSVariableRegex.exec(s);if(!i)return[,];const[,a,c]=i;return[a,c]}function getVariableValue(s,i,a=1){const[c,d]=parseCSSVariable(s);if(!c)return;const g=window.getComputedStyle(i).getPropertyValue(c);if(g){const b=g.trim();return isNumericalString(b)?parseFloat(b):b}else return isCSSVariableToken(d)?getVariableValue(d,i,a+1):d}function resolveCSSVariables(s,{...i},a){const c=s.current;if(!(c instanceof Element))return{target:i,transitionEnd:a};a&&(a={...a}),s.values.forEach(d=>{const g=d.get();if(!isCSSVariableToken(g))return;const b=getVariableValue(g,c);b&&d.set(b)});for(const d in i){const g=i[d];if(!isCSSVariableToken(g))continue;const b=getVariableValue(g,c);b&&(i[d]=b,a||(a={}),a[d]===void 0&&(a[d]=g))}return{target:i,transitionEnd:a}}const positionalKeys=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),isPositionalKey=s=>positionalKeys.has(s),hasPositionalKey=s=>Object.keys(s).some(isPositionalKey),isNumOrPxType=s=>s===number||s===px,getPosFromMatrix=(s,i)=>parseFloat(s.split(", ")[i]),getTranslateFromMatrix=(s,i)=>(a,{transform:c})=>{if(c==="none"||!c)return 0;const d=c.match(/^matrix3d\((.+)\)$/);if(d)return getPosFromMatrix(d[1],i);{const g=c.match(/^matrix\((.+)\)$/);return g?getPosFromMatrix(g[1],s):0}},transformKeys=new Set(["x","y","z"]),nonTranslationalTransformKeys=transformPropOrder.filter(s=>!transformKeys.has(s));function removeNonTranslationalTransform(s){const i=[];return nonTranslationalTransformKeys.forEach(a=>{const c=s.getValue(a);c!==void 0&&(i.push([a,c.get()]),c.set(a.startsWith("scale")?1:0))}),i.length&&s.render(),i}const positionalValues={width:({x:s},{paddingLeft:i="0",paddingRight:a="0"})=>s.max-s.min-parseFloat(i)-parseFloat(a),height:({y:s},{paddingTop:i="0",paddingBottom:a="0"})=>s.max-s.min-parseFloat(i)-parseFloat(a),top:(s,{top:i})=>parseFloat(i),left:(s,{left:i})=>parseFloat(i),bottom:({y:s},{top:i})=>parseFloat(i)+(s.max-s.min),right:({x:s},{left:i})=>parseFloat(i)+(s.max-s.min),x:getTranslateFromMatrix(4,13),y:getTranslateFromMatrix(5,14)};positionalValues.translateX=positionalValues.x;positionalValues.translateY=positionalValues.y;const convertChangedValueTypes=(s,i,a)=>{const c=i.measureViewportBox(),d=i.current,g=getComputedStyle(d),{display:b}=g,$={};b==="none"&&i.setStaticValue("display",s.display||"block"),a.forEach(j=>{$[j]=positionalValues[j](c,g)}),i.render();const _=i.measureViewportBox();return a.forEach(j=>{const _e=i.getValue(j);_e&&_e.jump($[j]),s[j]=positionalValues[j](_,g)}),s},checkAndConvertChangedValueTypes=(s,i,a={},c={})=>{i={...i},c={...c};const d=Object.keys(i).filter(isPositionalKey);let g=[],b=!1;const $=[];if(d.forEach(_=>{const j=s.getValue(_);if(!s.hasValue(_))return;let _e=a[_],et=findDimensionValueType(_e);const tt=i[_];let nt;if(isKeyframesTarget(tt)){const rt=tt.length,at=tt[0]===null?1:0;_e=tt[at],et=findDimensionValueType(_e);for(let lt=at;lt=0?window.pageYOffset:null,j=convertChangedValueTypes(i,s,$);return g.length&&g.forEach(([_e,et])=>{s.getValue(_e).set(et)}),s.render(),isBrowser$1&&_!==null&&window.scrollTo({top:_}),{target:j,transitionEnd:c}}else return{target:i,transitionEnd:c}};function unitConversion(s,i,a,c){return hasPositionalKey(i)?checkAndConvertChangedValueTypes(s,i,a,c):{target:i,transitionEnd:c}}const parseDomVariant=(s,i,a,c)=>{const d=resolveCSSVariables(s,i,c);return i=d.target,c=d.transitionEnd,unitConversion(s,i,a,c)},prefersReducedMotion={current:null},hasReducedMotionListener={current:!1};function initPrefersReducedMotion(){if(hasReducedMotionListener.current=!0,!!isBrowser$1)if(window.matchMedia){const s=window.matchMedia("(prefers-reduced-motion)"),i=()=>prefersReducedMotion.current=s.matches;s.addListener(i),i()}else prefersReducedMotion.current=!1}function updateMotionValuesFromProps(s,i,a){const{willChange:c}=i;for(const d in i){const g=i[d],b=a[d];if(isMotionValue(g))s.addValue(d,g),isWillChangeMotionValue(c)&&c.add(d);else if(isMotionValue(b))s.addValue(d,motionValue(g,{owner:s})),isWillChangeMotionValue(c)&&c.remove(d);else if(b!==g)if(s.hasValue(d)){const $=s.getValue(d);!$.hasAnimated&&$.set(g)}else{const $=s.getStaticValue(d);s.addValue(d,motionValue($!==void 0?$:g,{owner:s}))}}for(const d in a)i[d]===void 0&&s.removeValue(d);return i}const visualElementStore=new WeakMap,featureNames=Object.keys(featureDefinitions),numFeatures=featureNames.length,propEventHandlers=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],numVariantProps=variantProps.length;class VisualElement{constructor({parent:i,props:a,presenceContext:c,reducedMotionConfig:d,visualState:g},b={}){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=()=>frame.render(this.render,!1,!0);const{latestValues:$,renderState:_}=g;this.latestValues=$,this.baseTarget={...$},this.initialValues=a.initial?{...$}:{},this.renderState=_,this.parent=i,this.props=a,this.presenceContext=c,this.depth=i?i.depth+1:0,this.reducedMotionConfig=d,this.options=b,this.isControllingVariants=isControllingVariants(a),this.isVariantNode=isVariantNode(a),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:j,..._e}=this.scrapeMotionValuesFromProps(a,{});for(const et in _e){const tt=_e[et];$[et]!==void 0&&isMotionValue(tt)&&(tt.set($[et],!1),isWillChangeMotionValue(j)&&j.add(et))}}scrapeMotionValuesFromProps(i,a){return{}}mount(i){this.current=i,visualElementStore.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((a,c)=>this.bindToMotionValue(c,a)),hasReducedMotionListener.current||initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:prefersReducedMotion.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){visualElementStore.delete(this.current),this.projection&&this.projection.unmount(),cancelFrame(this.notifyUpdate),cancelFrame(this.render),this.valueSubscriptions.forEach(i=>i()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features)this.features[i].unmount();this.current=null}bindToMotionValue(i,a){const c=transformProps.has(i),d=a.on("change",b=>{this.latestValues[i]=b,this.props.onUpdate&&frame.update(this.notifyUpdate,!1,!0),c&&this.projection&&(this.projection.isTransformDirty=!0)}),g=a.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(i,()=>{d(),g()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}loadFeatures({children:i,...a},c,d,g){let b,$;for(let _=0;_this.scheduleRender(),animationType:typeof j=="string"?j:"both",initialPromotionConfig:g,layoutScroll:tt,layoutRoot:nt})}return $}updateFeatures(){for(const i in this.features){const a=this.features[i];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):createBox()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,a){this.latestValues[i]=a}makeTargetAnimatable(i,a=!0){return this.makeTargetAnimatableFromInstance(i,this.props,a)}update(i,a){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=a;for(let c=0;ca.variantChildren.delete(i)}addValue(i,a){a!==this.values.get(i)&&(this.removeValue(i),this.bindToMotionValue(i,a)),this.values.set(i,a),this.latestValues[i]=a.get()}removeValue(i){this.values.delete(i);const a=this.valueSubscriptions.get(i);a&&(a(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,a){if(this.props.values&&this.props.values[i])return this.props.values[i];let c=this.values.get(i);return c===void 0&&a!==void 0&&(c=motionValue(a,{owner:this}),this.addValue(i,c)),c}readValue(i){var a;return this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(a=this.getBaseTargetFromProps(this.props,i))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,i,this.options)}setBaseTarget(i,a){this.baseTarget[i]=a}getBaseTarget(i){var a;const{initial:c}=this.props,d=typeof c=="string"||typeof c=="object"?(a=resolveVariantFromProps(this.props,c))===null||a===void 0?void 0:a[i]:void 0;if(c&&d!==void 0)return d;const g=this.getBaseTargetFromProps(this.props,i);return g!==void 0&&!isMotionValue(g)?g:this.initialValues[i]!==void 0&&d===void 0?void 0:this.baseTarget[i]}on(i,a){return this.events[i]||(this.events[i]=new SubscriptionManager),this.events[i].add(a)}notify(i,...a){this.events[i]&&this.events[i].notify(...a)}}class DOMVisualElement extends VisualElement{sortInstanceNodePosition(i,a){return i.compareDocumentPosition(a)&2?1:-1}getBaseTargetFromProps(i,a){return i.style?i.style[a]:void 0}removeValueFromRenderState(i,{vars:a,style:c}){delete a[i],delete c[i]}makeTargetAnimatableFromInstance({transition:i,transitionEnd:a,...c},{transformValues:d},g){let b=getOrigin(c,i||{},this);if(d&&(a&&(a=d(a)),c&&(c=d(c)),b&&(b=d(b))),g){checkTargetForNewValues(this,c,b);const $=parseDomVariant(this,c,b,a);a=$.transitionEnd,c=$.target}return{transition:i,transitionEnd:a,...c}}}function getComputedStyle$2(s){return window.getComputedStyle(s)}class HTMLVisualElement extends DOMVisualElement{readValueFromInstance(i,a){if(transformProps.has(a)){const c=getDefaultValueType(a);return c&&c.default||0}else{const c=getComputedStyle$2(i),d=(isCSSVariableName(a)?c.getPropertyValue(a):c[a])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(i,{transformPagePoint:a}){return measureViewportBox(i,a)}build(i,a,c,d){buildHTMLStyles(i,a,c,d.transformTemplate)}scrapeMotionValuesFromProps(i,a){return scrapeMotionValuesFromProps$1(i,a)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;isMotionValue(i)&&(this.childSubscription=i.on("change",a=>{this.current&&(this.current.textContent=`${a}`)}))}renderInstance(i,a,c,d){renderHTML(i,a,c,d)}}class SVGVisualElement extends DOMVisualElement{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(i,a){return i[a]}readValueFromInstance(i,a){if(transformProps.has(a)){const c=getDefaultValueType(a);return c&&c.default||0}return a=camelCaseAttributes.has(a)?a:camelToDash(a),i.getAttribute(a)}measureInstanceViewportBox(){return createBox()}scrapeMotionValuesFromProps(i,a){return scrapeMotionValuesFromProps(i,a)}build(i,a,c,d){buildSVGAttrs(i,a,c,this.isSVGTag,d.transformTemplate)}renderInstance(i,a,c,d){renderSVG(i,a,c,d)}mount(i){this.isSVGTag=isSVGTag(i.tagName),super.mount(i)}}const createDomVisualElement=(s,i)=>isSVGComponent(s)?new SVGVisualElement(i,{enableHardwareAcceleration:!1}):new HTMLVisualElement(i,{enableHardwareAcceleration:!0}),m$1=createMotionProxy(createDomMotionConfig);function useIsMounted(){const s=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>(s.current=!0,()=>{s.current=!1}),[]),s}function useForceUpdate(){const s=useIsMounted(),[i,a]=reactExports.useState(0),c=reactExports.useCallback(()=>{s.current&&a(i+1)},[i]);return[reactExports.useCallback(()=>frame.postRender(c),[c]),i]}class PopChildMeasure extends reactExports.Component{getSnapshotBeforeUpdate(i){const a=this.props.childRef.current;if(a&&i.isPresent&&!this.props.isPresent){const c=this.props.sizeRef.current;c.height=a.offsetHeight||0,c.width=a.offsetWidth||0,c.top=a.offsetTop,c.left=a.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function PopChild({children:s,isPresent:i}){const a=reactExports.useId(),c=reactExports.useRef(null),d=reactExports.useRef({width:0,height:0,top:0,left:0});return reactExports.useInsertionEffect(()=>{const{width:g,height:b,top:$,left:_}=d.current;if(i||!c.current||!g||!b)return;c.current.dataset.motionPopId=a;const j=document.createElement("style");return document.head.appendChild(j),j.sheet&&j.sheet.insertRule(` [data-motion-pop-id="${a}"] { position: absolute !important; width: ${g}px !important; height: ${b}px !important; top: ${$}px !important; left: ${_}px !important; } `),()=>{document.head.removeChild(j)}},[i]),reactExports.createElement(PopChildMeasure,{isPresent:i,childRef:c,sizeRef:d},reactExports.cloneElement(s,{ref:c}))}const PresenceChild=({children:s,initial:i,isPresent:a,onExitComplete:c,custom:d,presenceAffectsLayout:g,mode:b})=>{const $=useConstant(newChildrenMap),_=reactExports.useId(),j=reactExports.useMemo(()=>({id:_,initial:i,isPresent:a,custom:d,onExitComplete:_e=>{$.set(_e,!0);for(const et of $.values())if(!et)return;c&&c()},register:_e=>($.set(_e,!1),()=>$.delete(_e))}),g?void 0:[a]);return reactExports.useMemo(()=>{$.forEach((_e,et)=>$.set(et,!1))},[a]),reactExports.useEffect(()=>{!a&&!$.size&&c&&c()},[a]),b==="popLayout"&&(s=reactExports.createElement(PopChild,{isPresent:a},s)),reactExports.createElement(PresenceContext.Provider,{value:j},s)};function newChildrenMap(){return new Map}function useUnmountEffect(s){return reactExports.useEffect(()=>()=>s(),[])}const getChildKey=s=>s.key||"";function updateChildLookup(s,i){s.forEach(a=>{const c=getChildKey(a);i.set(c,a)})}function onlyElements(s){const i=[];return reactExports.Children.forEach(s,a=>{reactExports.isValidElement(a)&&i.push(a)}),i}const AnimatePresence=({children:s,custom:i,initial:a=!0,onExitComplete:c,exitBeforeEnter:d,presenceAffectsLayout:g=!0,mode:b="sync"})=>{const $=reactExports.useContext(LayoutGroupContext).forceRender||useForceUpdate()[0],_=useIsMounted(),j=onlyElements(s);let _e=j;const et=reactExports.useRef(new Map).current,tt=reactExports.useRef(_e),nt=reactExports.useRef(new Map).current,rt=reactExports.useRef(!0);if(useIsomorphicLayoutEffect$1(()=>{rt.current=!1,updateChildLookup(j,nt),tt.current=_e}),useUnmountEffect(()=>{rt.current=!0,nt.clear(),et.clear()}),rt.current)return reactExports.createElement(reactExports.Fragment,null,_e.map(st=>reactExports.createElement(PresenceChild,{key:getChildKey(st),isPresent:!0,initial:a?void 0:!1,presenceAffectsLayout:g,mode:b},st)));_e=[..._e];const at=tt.current.map(getChildKey),lt=j.map(getChildKey),ot=at.length;for(let st=0;st{if(lt.indexOf(it)!==-1)return;const ut=nt.get(it);if(!ut)return;const ct=at.indexOf(it);let pt=st;if(!pt){const mt=()=>{nt.delete(it),et.delete(it);const xt=tt.current.findIndex(St=>St.key===it);if(tt.current.splice(xt,1),!et.size){if(tt.current=j,_.current===!1)return;$(),c&&c()}};pt=reactExports.createElement(PresenceChild,{key:getChildKey(ut),isPresent:!1,onExitComplete:mt,custom:i,presenceAffectsLayout:g,mode:b},ut),et.set(it,pt)}_e.splice(ct,0,pt)}),_e=_e.map(st=>{const it=st.key;return et.has(it)?st:reactExports.createElement(PresenceChild,{key:getChildKey(st),isPresent:!0,presenceAffectsLayout:g,mode:b},st)}),reactExports.createElement(reactExports.Fragment,null,et.size?_e:_e.map(st=>reactExports.cloneElement(st)))};function LazyMotion({children:s,features:i,strict:a=!1}){const[,c]=reactExports.useState(!isLazyBundle(i)),d=reactExports.useRef(void 0);if(!isLazyBundle(i)){const{renderer:g,...b}=i;d.current=g,loadFeatures(b)}return reactExports.useEffect(()=>{isLazyBundle(i)&&i().then(({renderer:g,...b})=>{loadFeatures(b),d.current=g,c(!0)})},[]),reactExports.createElement(LazyContext.Provider,{value:{renderer:d.current,strict:a}},s)}function isLazyBundle(s){return typeof s=="function"}const domAnimation={renderer:createDomVisualElement,...animations,...gestureAnimations};function bind(s,i){return function(){return s.apply(i,arguments)}}const{toString:toString$1}=Object.prototype,{getPrototypeOf:getPrototypeOf$1}=Object,kindOf=(s=>i=>{const a=toString$1.call(i);return s[a]||(s[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=s=>(s=s.toLowerCase(),i=>kindOf(i)===s),typeOfTest=s=>i=>typeof i===s,{isArray}=Array,isUndefined$1=typeOfTest("undefined");function isBuffer(s){return s!==null&&!isUndefined$1(s)&&s.constructor!==null&&!isUndefined$1(s.constructor)&&isFunction$1(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(s){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(s):i=s&&s.buffer&&isArrayBuffer(s.buffer),i}const isString$2=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber=typeOfTest("number"),isObject$2=s=>s!==null&&typeof s=="object",isBoolean$1=s=>s===!0||s===!1,isPlainObject$3=s=>{if(kindOf(s)!=="object")return!1;const i=getPrototypeOf$1(s);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=s=>isObject$2(s)&&isFunction$1(s.pipe),isFormData=s=>{let i;return s&&(typeof FormData=="function"&&s instanceof FormData||isFunction$1(s.append)&&((i=kindOf(s))==="formdata"||i==="object"&&isFunction$1(s.toString)&&s.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),trim=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(s,i,{allOwnKeys:a=!1}={}){if(s===null||typeof s>"u")return;let c,d;if(typeof s!="object"&&(s=[s]),isArray(s))for(c=0,d=s.length;c0;)if(d=a[c],i===d.toLowerCase())return d;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=s=>!isUndefined$1(s)&&s!==_global;function merge(){const{caseless:s}=isContextDefined(this)&&this||{},i={},a=(c,d)=>{const g=s&&findKey(i,d)||d;isPlainObject$3(i[g])&&isPlainObject$3(c)?i[g]=merge(i[g],c):isPlainObject$3(c)?i[g]=merge({},c):isArray(c)?i[g]=c.slice():i[g]=c};for(let c=0,d=arguments.length;c(forEach(i,(d,g)=>{a&&isFunction$1(d)?s[g]=bind(d,a):s[g]=d},{allOwnKeys:c}),s),stripBOM=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),inherits=(s,i,a,c)=>{s.prototype=Object.create(i.prototype,c),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:i.prototype}),a&&Object.assign(s.prototype,a)},toFlatObject=(s,i,a,c)=>{let d,g,b;const $={};if(i=i||{},s==null)return i;do{for(d=Object.getOwnPropertyNames(s),g=d.length;g-- >0;)b=d[g],(!c||c(b,s,i))&&!$[b]&&(i[b]=s[b],$[b]=!0);s=a!==!1&&getPrototypeOf$1(s)}while(s&&(!a||a(s,i))&&s!==Object.prototype);return i},endsWith=(s,i,a)=>{s=String(s),(a===void 0||a>s.length)&&(a=s.length),a-=i.length;const c=s.indexOf(i,a);return c!==-1&&c===a},toArray=s=>{if(!s)return null;if(isArray(s))return s;let i=s.length;if(!isNumber(i))return null;const a=new Array(i);for(;i-- >0;)a[i]=s[i];return a},isTypedArray=(s=>i=>s&&i instanceof s)(typeof Uint8Array<"u"&&getPrototypeOf$1(Uint8Array)),forEachEntry=(s,i)=>{const c=(s&&s[Symbol.iterator]).call(s);let d;for(;(d=c.next())&&!d.done;){const g=d.value;i.call(s,g[0],g[1])}},matchAll=(s,i)=>{let a;const c=[];for(;(a=s.exec(i))!==null;)c.push(a);return c},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,c,d){return c.toUpperCase()+d}),hasOwnProperty$1=(({hasOwnProperty:s})=>(i,a)=>s.call(i,a))(Object.prototype),isRegExp$1=kindOfTest("RegExp"),reduceDescriptors=(s,i)=>{const a=Object.getOwnPropertyDescriptors(s),c={};forEach(a,(d,g)=>{let b;(b=i(d,g,s))!==!1&&(c[g]=b||d)}),Object.defineProperties(s,c)},freezeMethods=s=>{reduceDescriptors(s,(i,a)=>{if(isFunction$1(s)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const c=s[a];if(isFunction$1(c)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},toObjectSet=(s,i)=>{const a={},c=d=>{d.forEach(g=>{a[g]=!0})};return isArray(s)?c(s):c(String(s).split(i)),a},noop=()=>{},toFiniteNumber=(s,i)=>(s=+s,Number.isFinite(s)?s:i),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(s=16,i=ALPHABET.ALPHA_DIGIT)=>{let a="";const{length:c}=i;for(;s--;)a+=i[Math.random()*c|0];return a};function isSpecCompliantForm(s){return!!(s&&isFunction$1(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const toJSONObject=s=>{const i=new Array(10),a=(c,d)=>{if(isObject$2(c)){if(i.indexOf(c)>=0)return;if(!("toJSON"in c)){i[d]=c;const g=isArray(c)?[]:{};return forEach(c,(b,$)=>{const _=a(b,d+1);!isUndefined$1(_)&&(g[$]=_)}),i[d]=void 0,g}}return c};return a(s,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable$1=s=>s&&(isObject$2(s)||isFunction$1(s))&&isFunction$1(s.then)&&isFunction$1(s.catch),utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString:isString$2,isNumber,isBoolean:isBoolean$1,isObject:isObject$2,isPlainObject:isPlainObject$3,isUndefined:isUndefined$1,isDate,isFile,isBlob,isRegExp:isRegExp$1,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable:isThenable$1};function AxiosError(s,i,a,c,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",i&&(this.code=i),a&&(this.config=a),c&&(this.request=c),d&&(this.response=d)}utils.inherits(AxiosError,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:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["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(s=>{descriptors[s]={value:s}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(s,i,a,c,d,g)=>{const b=Object.create(prototype$1);return utils.toFlatObject(s,b,function(_){return _!==Error.prototype},$=>$!=="isAxiosError"),AxiosError.call(b,s.message,i,a,c,d),b.cause=s,b.name=s.name,g&&Object.assign(b,g),b};const httpAdapter=null;function isVisitable(s){return utils.isPlainObject(s)||utils.isArray(s)}function removeBrackets(s){return utils.endsWith(s,"[]")?s.slice(0,-2):s}function renderKey(s,i,a){return s?s.concat(i).map(function(d,g){return d=removeBrackets(d),!a&&g?"["+d+"]":d}).join(a?".":""):i}function isFlatArray(s){return utils.isArray(s)&&!s.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(i){return/^is[A-Z]/.test(i)});function toFormData(s,i,a){if(!utils.isObject(s))throw new TypeError("target must be an object");i=i||new FormData,a=utils.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(at,lt){return!utils.isUndefined(lt[at])});const c=a.metaTokens,d=a.visitor||_e,g=a.dots,b=a.indexes,_=(a.Blob||typeof Blob<"u"&&Blob)&&utils.isSpecCompliantForm(i);if(!utils.isFunction(d))throw new TypeError("visitor must be a function");function j(rt){if(rt===null)return"";if(utils.isDate(rt))return rt.toISOString();if(!_&&utils.isBlob(rt))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(rt)||utils.isTypedArray(rt)?_&&typeof Blob=="function"?new Blob([rt]):Buffer.from(rt):rt}function _e(rt,at,lt){let ot=rt;if(rt&&!lt&&typeof rt=="object"){if(utils.endsWith(at,"{}"))at=c?at:at.slice(0,-2),rt=JSON.stringify(rt);else if(utils.isArray(rt)&&isFlatArray(rt)||(utils.isFileList(rt)||utils.endsWith(at,"[]"))&&(ot=utils.toArray(rt)))return at=removeBrackets(at),ot.forEach(function(it,ut){!(utils.isUndefined(it)||it===null)&&i.append(b===!0?renderKey([at],ut,g):b===null?at:at+"[]",j(it))}),!1}return isVisitable(rt)?!0:(i.append(renderKey(lt,at,g),j(rt)),!1)}const et=[],tt=Object.assign(predicates,{defaultVisitor:_e,convertValue:j,isVisitable});function nt(rt,at){if(!utils.isUndefined(rt)){if(et.indexOf(rt)!==-1)throw Error("Circular reference detected in "+at.join("."));et.push(rt),utils.forEach(rt,function(ot,st){(!(utils.isUndefined(ot)||ot===null)&&d.call(i,ot,utils.isString(st)?st.trim():st,at,tt))===!0&&nt(ot,at?at.concat(st):[st])}),et.pop()}}if(!utils.isObject(s))throw new TypeError("data must be an object");return nt(s),i}function encode$3(s){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(c){return i[c]})}function AxiosURLSearchParams(s,i){this._pairs=[],s&&toFormData(s,this,i)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(i,a){this._pairs.push([i,a])};prototype.toString=function(i){const a=i?function(c){return i.call(this,c,encode$3)}:encode$3;return this._pairs.map(function(d){return a(d[0])+"="+a(d[1])},"").join("&")};function encode$2(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(s,i,a){if(!i)return s;const c=a&&a.encode||encode$2,d=a&&a.serialize;let g;if(d?g=d(i,a):g=utils.isURLSearchParams(i)?i.toString():new AxiosURLSearchParams(i,a).toString(c),g){const b=s.indexOf("#");b!==-1&&(s=s.slice(0,b)),s+=(s.indexOf("?")===-1?"?":"&")+g}return s}class InterceptorManager{constructor(){this.handlers=[]}use(i,a,c){return this.handlers.push({fulfilled:i,rejected:a,synchronous:c?c.synchronous:!1,runWhen:c?c.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){utils.forEach(this.handlers,function(c){c!==null&&i(c)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,isStandardBrowserEnv=(()=>{let s;return typeof navigator<"u"&&((s=navigator.product)==="ReactNative"||s==="NativeScript"||s==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(s,i){return toFormData(s,new platform$1.classes.URLSearchParams,Object.assign({visitor:function(a,c,d,g){return platform$1.isNode&&utils.isBuffer(a)?(this.append(c,a.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)}},i))}function parsePropPath(s){return utils.matchAll(/\w+|\[(\w*)]/g,s).map(i=>i[0]==="[]"?"":i[1]||i[0])}function arrayToObject(s){const i={},a=Object.keys(s);let c;const d=a.length;let g;for(c=0;c=a.length;return b=!b&&utils.isArray(d)?d.length:b,_?(utils.hasOwnProp(d,b)?d[b]=[d[b],c]:d[b]=c,!$):((!d[b]||!utils.isObject(d[b]))&&(d[b]=[]),i(a,c,d[b],g)&&utils.isArray(d[b])&&(d[b]=arrayToObject(d[b])),!$)}if(utils.isFormData(s)&&utils.isFunction(s.entries)){const a={};return utils.forEachEntry(s,(c,d)=>{i(parsePropPath(c),d,a,0)}),a}return null}function stringifySafely(s,i,a){if(utils.isString(s))try{return(i||JSON.parse)(s),utils.trim(s)}catch(c){if(c.name!=="SyntaxError")throw c}return(a||JSON.stringify)(s)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(i,a){const c=a.getContentType()||"",d=c.indexOf("application/json")>-1,g=utils.isObject(i);if(g&&utils.isHTMLForm(i)&&(i=new FormData(i)),utils.isFormData(i))return d&&d?JSON.stringify(formDataToJSON(i)):i;if(utils.isArrayBuffer(i)||utils.isBuffer(i)||utils.isStream(i)||utils.isFile(i)||utils.isBlob(i))return i;if(utils.isArrayBufferView(i))return i.buffer;if(utils.isURLSearchParams(i))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let $;if(g){if(c.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(i,this.formSerializer).toString();if(($=utils.isFileList(i))||c.indexOf("multipart/form-data")>-1){const _=this.env&&this.env.FormData;return toFormData($?{"files[]":i}:i,_&&new _,this.formSerializer)}}return g||d?(a.setContentType("application/json",!1),stringifySafely(i)):i}],transformResponse:[function(i){const a=this.transitional||defaults.transitional,c=a&&a.forcedJSONParsing,d=this.responseType==="json";if(i&&utils.isString(i)&&(c&&!this.responseType||d)){const b=!(a&&a.silentJSONParsing)&&d;try{return JSON.parse(i)}catch($){if(b)throw $.name==="SyntaxError"?AxiosError.from($,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):$}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform$1.classes.FormData,Blob:platform$1.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils.forEach(["delete","get","head","post","put","patch"],s=>{defaults.headers[s]={}});const defaults$1=defaults,ignoreDuplicateOf=utils.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"]),parseHeaders=s=>{const i={};let a,c,d;return s&&s.split(` `).forEach(function(b){d=b.indexOf(":"),a=b.substring(0,d).trim().toLowerCase(),c=b.substring(d+1).trim(),!(!a||i[a]&&ignoreDuplicateOf[a])&&(a==="set-cookie"?i[a]?i[a].push(c):i[a]=[c]:i[a]=i[a]?i[a]+", "+c:c)}),i},$internals=Symbol("internals");function normalizeHeader(s){return s&&String(s).trim().toLowerCase()}function normalizeValue(s){return s===!1||s==null?s:utils.isArray(s)?s.map(normalizeValue):String(s)}function parseTokens(s){const i=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let c;for(;c=a.exec(s);)i[c[1]]=c[2];return i}const isValidHeaderName=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function matchHeaderValue(s,i,a,c,d){if(utils.isFunction(c))return c.call(this,i,a);if(d&&(i=a),!!utils.isString(i)){if(utils.isString(c))return i.indexOf(c)!==-1;if(utils.isRegExp(c))return c.test(i)}}function formatHeader(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(i,a,c)=>a.toUpperCase()+c)}function buildAccessors(s,i){const a=utils.toCamelCase(" "+i);["get","set","has"].forEach(c=>{Object.defineProperty(s,c+a,{value:function(d,g,b){return this[c].call(this,i,d,g,b)},configurable:!0})})}class AxiosHeaders{constructor(i){i&&this.set(i)}set(i,a,c){const d=this;function g($,_,j){const _e=normalizeHeader(_);if(!_e)throw new Error("header name must be a non-empty string");const et=utils.findKey(d,_e);(!et||d[et]===void 0||j===!0||j===void 0&&d[et]!==!1)&&(d[et||_]=normalizeValue($))}const b=($,_)=>utils.forEach($,(j,_e)=>g(j,_e,_));return utils.isPlainObject(i)||i instanceof this.constructor?b(i,a):utils.isString(i)&&(i=i.trim())&&!isValidHeaderName(i)?b(parseHeaders(i),a):i!=null&&g(a,i,c),this}get(i,a){if(i=normalizeHeader(i),i){const c=utils.findKey(this,i);if(c){const d=this[c];if(!a)return d;if(a===!0)return parseTokens(d);if(utils.isFunction(a))return a.call(this,d,c);if(utils.isRegExp(a))return a.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(i,a){if(i=normalizeHeader(i),i){const c=utils.findKey(this,i);return!!(c&&this[c]!==void 0&&(!a||matchHeaderValue(this,this[c],c,a)))}return!1}delete(i,a){const c=this;let d=!1;function g(b){if(b=normalizeHeader(b),b){const $=utils.findKey(c,b);$&&(!a||matchHeaderValue(c,c[$],$,a))&&(delete c[$],d=!0)}}return utils.isArray(i)?i.forEach(g):g(i),d}clear(i){const a=Object.keys(this);let c=a.length,d=!1;for(;c--;){const g=a[c];(!i||matchHeaderValue(this,this[g],g,i,!0))&&(delete this[g],d=!0)}return d}normalize(i){const a=this,c={};return utils.forEach(this,(d,g)=>{const b=utils.findKey(c,g);if(b){a[b]=normalizeValue(d),delete a[g];return}const $=i?formatHeader(g):String(g).trim();$!==g&&delete a[g],a[$]=normalizeValue(d),c[$]=!0}),this}concat(...i){return this.constructor.concat(this,...i)}toJSON(i){const a=Object.create(null);return utils.forEach(this,(c,d)=>{c!=null&&c!==!1&&(a[d]=i&&utils.isArray(c)?c.join(", "):c)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([i,a])=>i+": "+a).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...a){const c=new this(i);return a.forEach(d=>c.set(d)),c}static accessor(i){const c=(this[$internals]=this[$internals]={accessors:{}}).accessors,d=this.prototype;function g(b){const $=normalizeHeader(b);c[$]||(buildAccessors(d,b),c[$]=!0)}return utils.isArray(i)?i.forEach(g):g(i),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils.reduceDescriptors(AxiosHeaders.prototype,({value:s},i)=>{let a=i[0].toUpperCase()+i.slice(1);return{get:()=>s,set(c){this[a]=c}}});utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(s,i){const a=this||defaults$1,c=i||a,d=AxiosHeaders$1.from(c.headers);let g=c.data;return utils.forEach(s,function($){g=$.call(a,g,d.normalize(),i?i.status:void 0)}),d.normalize(),g}function isCancel(s){return!!(s&&s.__CANCEL__)}function CanceledError(s,i,a){AxiosError.call(this,s??"canceled",AxiosError.ERR_CANCELED,i,a),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(s,i,a){const c=a.config.validateStatus;!a.status||!c||c(a.status)?s(a):i(new AxiosError("Request failed with status code "+a.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}const cookies=platform$1.isStandardBrowserEnv?function(){return{write:function(a,c,d,g,b,$){const _=[];_.push(a+"="+encodeURIComponent(c)),utils.isNumber(d)&&_.push("expires="+new Date(d).toGMTString()),utils.isString(g)&&_.push("path="+g),utils.isString(b)&&_.push("domain="+b),$===!0&&_.push("secure"),document.cookie=_.join("; ")},read:function(a){const c=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return c?decodeURIComponent(c[3]):null},remove:function(a){this.write(a,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function combineURLs(s,i){return i?s.replace(/\/+$/,"")+"/"+i.replace(/^\/+/,""):s}function buildFullPath(s,i){return s&&!isAbsoluteURL(i)?combineURLs(s,i):i}const isURLSameOrigin=platform$1.isStandardBrowserEnv?function(){const i=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");let c;function d(g){let b=g;return i&&(a.setAttribute("href",b),b=a.href),a.setAttribute("href",b),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:a.pathname.charAt(0)==="/"?a.pathname:"/"+a.pathname}}return c=d(window.location.href),function(b){const $=utils.isString(b)?d(b):b;return $.protocol===c.protocol&&$.host===c.host}}():function(){return function(){return!0}}();function parseProtocol(s){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return i&&i[1]||""}function speedometer(s,i){s=s||10;const a=new Array(s),c=new Array(s);let d=0,g=0,b;return i=i!==void 0?i:1e3,function(_){const j=Date.now(),_e=c[g];b||(b=j),a[d]=_,c[d]=j;let et=g,tt=0;for(;et!==d;)tt+=a[et++],et=et%s;if(d=(d+1)%s,d===g&&(g=(g+1)%s),j-b{const g=d.loaded,b=d.lengthComputable?d.total:void 0,$=g-a,_=c($),j=g<=b;a=g;const _e={loaded:g,total:b,progress:b?g/b:void 0,bytes:$,rate:_||void 0,estimated:_&&b&&j?(b-g)/_:void 0,event:d};_e[i?"download":"upload"]=!0,s(_e)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(s){return new Promise(function(a,c){let d=s.data;const g=AxiosHeaders$1.from(s.headers).normalize(),b=s.responseType;let $;function _(){s.cancelToken&&s.cancelToken.unsubscribe($),s.signal&&s.signal.removeEventListener("abort",$)}let j;utils.isFormData(d)&&(platform$1.isStandardBrowserEnv||platform$1.isStandardBrowserWebWorkerEnv?g.setContentType(!1):g.getContentType(/^\s*multipart\/form-data/)?utils.isString(j=g.getContentType())&&g.setContentType(j.replace(/^\s*(multipart\/form-data);+/,"$1")):g.setContentType("multipart/form-data"));let _e=new XMLHttpRequest;if(s.auth){const rt=s.auth.username||"",at=s.auth.password?unescape(encodeURIComponent(s.auth.password)):"";g.set("Authorization","Basic "+btoa(rt+":"+at))}const et=buildFullPath(s.baseURL,s.url);_e.open(s.method.toUpperCase(),buildURL(et,s.params,s.paramsSerializer),!0),_e.timeout=s.timeout;function tt(){if(!_e)return;const rt=AxiosHeaders$1.from("getAllResponseHeaders"in _e&&_e.getAllResponseHeaders()),lt={data:!b||b==="text"||b==="json"?_e.responseText:_e.response,status:_e.status,statusText:_e.statusText,headers:rt,config:s,request:_e};settle(function(st){a(st),_()},function(st){c(st),_()},lt),_e=null}if("onloadend"in _e?_e.onloadend=tt:_e.onreadystatechange=function(){!_e||_e.readyState!==4||_e.status===0&&!(_e.responseURL&&_e.responseURL.indexOf("file:")===0)||setTimeout(tt)},_e.onabort=function(){_e&&(c(new AxiosError("Request aborted",AxiosError.ECONNABORTED,s,_e)),_e=null)},_e.onerror=function(){c(new AxiosError("Network Error",AxiosError.ERR_NETWORK,s,_e)),_e=null},_e.ontimeout=function(){let at=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const lt=s.transitional||transitionalDefaults;s.timeoutErrorMessage&&(at=s.timeoutErrorMessage),c(new AxiosError(at,lt.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,s,_e)),_e=null},platform$1.isStandardBrowserEnv){const rt=isURLSameOrigin(et)&&s.xsrfCookieName&&cookies.read(s.xsrfCookieName);rt&&g.set(s.xsrfHeaderName,rt)}d===void 0&&g.setContentType(null),"setRequestHeader"in _e&&utils.forEach(g.toJSON(),function(at,lt){_e.setRequestHeader(lt,at)}),utils.isUndefined(s.withCredentials)||(_e.withCredentials=!!s.withCredentials),b&&b!=="json"&&(_e.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&_e.addEventListener("progress",progressEventReducer(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&_e.upload&&_e.upload.addEventListener("progress",progressEventReducer(s.onUploadProgress)),(s.cancelToken||s.signal)&&($=rt=>{_e&&(c(!rt||rt.type?new CanceledError(null,s,_e):rt),_e.abort(),_e=null)},s.cancelToken&&s.cancelToken.subscribe($),s.signal&&(s.signal.aborted?$():s.signal.addEventListener("abort",$)));const nt=parseProtocol(et);if(nt&&platform$1.protocols.indexOf(nt)===-1){c(new AxiosError("Unsupported protocol "+nt+":",AxiosError.ERR_BAD_REQUEST,s));return}_e.send(d||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(s,i)=>{if(s){try{Object.defineProperty(s,"name",{value:i})}catch{}Object.defineProperty(s,"adapterName",{value:i})}});const renderReason=s=>`- ${s}`,isResolvedHandle=s=>utils.isFunction(s)||s===null||s===!1,adapters={getAdapter:s=>{s=utils.isArray(s)?s:[s];const{length:i}=s;let a,c;const d={};for(let g=0;g`adapter ${$} `+(_===!1?"is not supported by the environment":"is not available in the build"));let b=i?g.length>1?`since : `+g.map(renderReason).join(` `):" "+renderReason(g[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return c},adapters:knownAdapters};function throwIfCancellationRequested(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new CanceledError(null,s)}function dispatchRequest(s){return throwIfCancellationRequested(s),s.headers=AxiosHeaders$1.from(s.headers),s.data=transformData.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(s.adapter||defaults$1.adapter)(s).then(function(c){return throwIfCancellationRequested(s),c.data=transformData.call(s,s.transformResponse,c),c.headers=AxiosHeaders$1.from(c.headers),c},function(c){return isCancel(c)||(throwIfCancellationRequested(s),c&&c.response&&(c.response.data=transformData.call(s,s.transformResponse,c.response),c.response.headers=AxiosHeaders$1.from(c.response.headers))),Promise.reject(c)})}const headersToObject=s=>s instanceof AxiosHeaders$1?s.toJSON():s;function mergeConfig(s,i){i=i||{};const a={};function c(j,_e,et){return utils.isPlainObject(j)&&utils.isPlainObject(_e)?utils.merge.call({caseless:et},j,_e):utils.isPlainObject(_e)?utils.merge({},_e):utils.isArray(_e)?_e.slice():_e}function d(j,_e,et){if(utils.isUndefined(_e)){if(!utils.isUndefined(j))return c(void 0,j,et)}else return c(j,_e,et)}function g(j,_e){if(!utils.isUndefined(_e))return c(void 0,_e)}function b(j,_e){if(utils.isUndefined(_e)){if(!utils.isUndefined(j))return c(void 0,j)}else return c(void 0,_e)}function $(j,_e,et){if(et in i)return c(j,_e);if(et in s)return c(void 0,j)}const _={url:g,method:g,data:g,baseURL:b,transformRequest:b,transformResponse:b,paramsSerializer:b,timeout:b,timeoutMessage:b,withCredentials:b,adapter:b,responseType:b,xsrfCookieName:b,xsrfHeaderName:b,onUploadProgress:b,onDownloadProgress:b,decompress:b,maxContentLength:b,maxBodyLength:b,beforeRedirect:b,transport:b,httpAgent:b,httpsAgent:b,cancelToken:b,socketPath:b,responseEncoding:b,validateStatus:$,headers:(j,_e)=>d(headersToObject(j),headersToObject(_e),!0)};return utils.forEach(Object.keys(Object.assign({},s,i)),function(_e){const et=_[_e]||d,tt=et(s[_e],i[_e],_e);utils.isUndefined(tt)&&et!==$||(a[_e]=tt)}),a}const VERSION$1="1.6.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((s,i)=>{validators$1[s]=function(c){return typeof c===s||"a"+(i<1?"n ":" ")+s}});const deprecatedWarnings={};validators$1.transitional=function(i,a,c){function d(g,b){return"[Axios v"+VERSION$1+"] Transitional option '"+g+"'"+b+(c?". "+c:"")}return(g,b,$)=>{if(i===!1)throw new AxiosError(d(b," has been removed"+(a?" in "+a:"")),AxiosError.ERR_DEPRECATED);return a&&!deprecatedWarnings[b]&&(deprecatedWarnings[b]=!0,console.warn(d(b," has been deprecated since v"+a+" and will be removed in the near future"))),i?i(g,b,$):!0}};function assertOptions(s,i,a){if(typeof s!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const c=Object.keys(s);let d=c.length;for(;d-- >0;){const g=c[d],b=i[g];if(b){const $=s[g],_=$===void 0||b($,g,s);if(_!==!0)throw new AxiosError("option "+g+" must be "+_,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new AxiosError("Unknown option "+g,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(i){this.defaults=i,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(i,a){typeof i=="string"?(a=a||{},a.url=i):a=i||{},a=mergeConfig(this.defaults,a);const{transitional:c,paramsSerializer:d,headers:g}=a;c!==void 0&&validator.assertOptions(c,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),d!=null&&(utils.isFunction(d)?a.paramsSerializer={serialize:d}:validator.assertOptions(d,{encode:validators.function,serialize:validators.function},!0)),a.method=(a.method||this.defaults.method||"get").toLowerCase();let b=g&&utils.merge(g.common,g[a.method]);g&&utils.forEach(["delete","get","head","post","put","patch","common"],rt=>{delete g[rt]}),a.headers=AxiosHeaders$1.concat(b,g);const $=[];let _=!0;this.interceptors.request.forEach(function(at){typeof at.runWhen=="function"&&at.runWhen(a)===!1||(_=_&&at.synchronous,$.unshift(at.fulfilled,at.rejected))});const j=[];this.interceptors.response.forEach(function(at){j.push(at.fulfilled,at.rejected)});let _e,et=0,tt;if(!_){const rt=[dispatchRequest.bind(this),void 0];for(rt.unshift.apply(rt,$),rt.push.apply(rt,j),tt=rt.length,_e=Promise.resolve(a);et{if(!c._listeners)return;let g=c._listeners.length;for(;g-- >0;)c._listeners[g](d);c._listeners=null}),this.promise.then=d=>{let g;const b=new Promise($=>{c.subscribe($),g=$}).then(d);return b.cancel=function(){c.unsubscribe(g)},b},i(function(g,b,$){c.reason||(c.reason=new CanceledError(g,b,$),a(c.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const a=this._listeners.indexOf(i);a!==-1&&this._listeners.splice(a,1)}static source(){let i;return{token:new CancelToken(function(d){i=d}),cancel:i}}}const CancelToken$1=CancelToken;function spread(s){return function(a){return s.apply(null,a)}}function isAxiosError(s){return utils.isObject(s)&&s.isAxiosError===!0}const HttpStatusCode={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(HttpStatusCode).forEach(([s,i])=>{HttpStatusCode[i]=s});const HttpStatusCode$1=HttpStatusCode;function createInstance(s){const i=new Axios$1(s),a=bind(Axios$1.prototype.request,i);return utils.extend(a,Axios$1.prototype,i,{allOwnKeys:!0}),utils.extend(a,i,null,{allOwnKeys:!0}),a.create=function(d){return createInstance(mergeConfig(s,d))},a}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel;axios.VERSION=VERSION$1;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(i){return Promise.all(i)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=s=>formDataToJSON(utils.isHTMLForm(s)?new FormData(s):s);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const axios$1=axios;let activeWorkspaceId=0;function getActiveWorkspaceId(){return activeWorkspaceId}function setActiveWorkspaceId(s){activeWorkspaceId=s}function isAbsoluteUrl(s){return s?/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(s):!1}function errorStatusIs(s,i){var a;return axios$1.isAxiosError(s)&&((a=s.response)==null?void 0:a.status)==i}const queryClient=new QueryClient({defaultOptions:{queries:{staleTime:3e4,retry:(s,i)=>!errorStatusIs(i,401)&&!errorStatusIs(i,403)&&!errorStatusIs(i,404)&&s<2}}}),apiClient=axios$1.create();apiClient.defaults.withCredentials=!0;apiClient.defaults.responseType="json";apiClient.defaults.headers={common:{Accept:"application/json"}};apiClient.interceptors.request.use(s=>{var c,d,g,b,$,_,j,_e;!((c=s.url)!=null&&c.startsWith("auth"))&&!((d=s.url)!=null&&d.startsWith("secure"))&&!((g=s.url)!=null&&g.startsWith("log-viewer"))&&!isAbsoluteUrl(s==null?void 0:s.url)&&(s.url=`api/v1/${s.url}`);const i=(b=s.method)==null?void 0:b.toUpperCase();i==="GET"&&Array.isArray(($=s.params)==null?void 0:$.with)&&(s.params.with=s.params.with.join(",")),i==="GET"&&Array.isArray((_=s.params)==null?void 0:_.load)&&(s.params.load=s.params.load.join(",")),i==="GET"&&Array.isArray((j=s.params)==null?void 0:j.loadCount)&&(s.params.loadCount=s.params.loadCount.join(","));const a=getActiveWorkspaceId();if(a){const et=(_e=s.method)==null?void 0:_e.toLowerCase();["get","post","put"].includes(et)&&(s.params={...s.params,workspaceId:a})}return(i==="PUT"||i==="DELETE"||i==="PATCH")&&(s.headers={...s.headers,"X-HTTP-Method-Override":i},s.method="POST",s.params={...s.params,_method:i}),s});const SiteConfigContext=React.createContext(null);function message(s,i){return{...i,message:s}}const filePreviewSrc=""+new URL("file-preview-8afa3b5f.png",import.meta.url).href,driveSrc=""+new URL("drive-d7c1e515.png",import.meta.url).href,landingTopSrc=""+new URL("landing-top-e0e553bc.png",import.meta.url).href;function r$4(s){var i,a,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s))for(i=0;i{const{attr:a,size:c,title:d,className:g,color:b,style:$,children:_,viewBox:j,width:_e,height:et,...tt}=s;return jsxRuntimeExports.jsxs("svg",{"aria-hidden":!d,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:j||"0 0 24 24",...a,...tt,className:clsx$1("svg-icon",g,getSizeClassName$1(c)),style:{color:b,...$},ref:i,height:et||"1em",width:_e||"1em",children:[d&&jsxRuntimeExports.jsx("title",{children:d}),_]})});function getSizeClassName$1(s){switch(s){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 s}}function createSvgIcon(s,i="",a){const c=(d,g)=>jsxRuntimeExports.jsx(SvgIcon,{"data-testid":`${i}Icon`,ref:g,viewBox:a,...d,size:d.size||"md",children:s});return React.memo(React.forwardRef(c))}function createSvgIconFromTree(s,i=""){const a=treeToElement(s);return createSvgIcon(a,i)}function treeToElement(s){return(s==null?void 0:s.map)&&s.map((i,a)=>React.createElement(i.tag,{key:a,...i.attr},treeToElement(i.child)))}function elementToTree(s){const i={},a={tag:s.tagName,attr:i};return Array.from(s.attributes).forEach(c=>{i[c.name]=c.value}),s.children.length&&(a.child=Array.from(s.children).map(c=>elementToTree(c))),a}const GroupAddIcon=createSvgIcon(jsxRuntimeExports.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"),PeopleIcon=createSvgIcon(jsxRuntimeExports.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"),FileDownloadDoneIcon=createSvgIcon(jsxRuntimeExports.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"),queryKey$1=["bootstrapData"];function getBootstrapData(){return queryClient.getQueryData(queryKey$1)}function invalidateBootstrapData(){queryClient.invalidateQueries({queryKey:queryKey$1})}function setBootstrapData(s){queryClient.setQueryData(queryKey$1,typeof s=="string"?decodeBootstrapData(s):s)}function mergeBootstrapData(s){setBootstrapData({...getBootstrapData(),...s})}const initialBootstrapData=typeof window<"u"&&window.bootstrapData?decodeBootstrapData(window.bootstrapData):void 0;queryClient.setQueryData(queryKey$1,initialBootstrapData);function useBackendBootstrapData(){return useQuery({queryKey:queryKey$1,queryFn:()=>fetchBootstrapData(),staleTime:1/0,placeholderData:keepPreviousData,initialData:initialBootstrapData})}const fetchBootstrapData=async()=>apiClient.get("bootstrap-data").then(s=>decodeBootstrapData(s.data.data));function decodeBootstrapData(s){return typeof s=="string"?JSON.parse(s):s}function getAssetUrl(s){if(isAbsoluteUrl(s))return s;const i=getBootstrapData().settings.asset_url||getBootstrapData().settings.base_url;return s=s.replace(/^\/+/g,""),s.startsWith("assets/")?`${i}/build/${s}`:`${i}/${s}`}const SvgImage=reactExports.memo(({src:s,className:i,height:a="h-full"})=>{const{data:c}=useSvgImageContent(s);return jsxRuntimeExports.jsx("div",{className:clsx$1("svg-image-container inline-block bg-no-repeat",a,i),dangerouslySetInnerHTML:c})});function useSvgImageContent(s){return useQuery({queryKey:["svgImage",getAssetUrl(s)],queryFn:()=>fetchSvgImageContent(s),refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,staleTime:1/0,enabled:!!s})}function fetchSvgImageContent(s){return axios$1.get(s,{responseType:"text"}).then(i=>({__html:i.data}))}const MixedImage=reactExports.memo(({src:s,className:i,...a})=>{let c=null;if(s?typeof s=="object"?c="icon":s.endsWith(".svg")&&!isAbsoluteUrl(s)?c="svg":c="image":c=null,c==="svg")return jsxRuntimeExports.jsx(SvgImage,{...a,className:i,src:s,height:!1});if(c==="image")return jsxRuntimeExports.jsx("img",{...a,className:i,src:s,alt:""});if(c==="icon"){const d=s;return jsxRuntimeExports.jsx(d,{...a,className:i})}return null});function getButtonSizeStyle(s,{padding:i,equalWidth:a,variant:c}={}){switch(s){case"2xs":return c==="link"?"text-xs":`text-xs h-24 ${a?"w-24":i||"px-10"}`;case"xs":return c==="link"?"text-xs":`text-xs h-30 ${a?"w-30":i||"px-14"}`;case"sm":return c==="link"?"text-sm":`text-sm h-36 ${a?"w-36":i||"px-18"}`;case"md":return c==="link"?"text-base":`text-base h-42 ${a?"w-42":i||"px-22"}`;case"lg":return c==="link"?"text-lg":`text-base h-50 ${a?"w-50":i||"px-26"}`;case"xl":return c==="link"?"text-xl":`text-lg h-60 ${a?"w-60":i||"px-32"}`;default:return s||""}}function getSharedButtonStyle(s){const{variant:i,shadow:a,whitespace:c="whitespace-nowrap",display:d="inline-flex"}=s,g={...s,border:s.border||"border"};let b=[];return i==="outline"?b=outline(g):i==="text"?b=text(g):i==="flat"||i==="raised"?b=contained(g):i==="link"&&(b=link(g)),[...b,a||i==="raised"&&"shadow-md",c,d,i&&"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 outline({color:s,border:i}){const a="disabled:text-disabled disabled:bg-transparent disabled:border-disabled-bg";switch(s){case"primary":return[`text-primary bg-transparent ${i} border-primary/50`,"hover:bg-primary/hover hover:border-primary",a];case"danger":return[`text-danger bg-transparent ${i} border-danger/50`,"hover:bg-danger/4 hover:border-danger",a];case"positive":return[`text-positive bg-transparent ${i} border-positive/50`,"hover:bg-positive/4 hover:border-positive",a];case"paper":return[`text bg-paper ${i}`,"hover:bg-hover",a];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 ${i}`,"hover:bg-hover",a]}}function text({color:s}){const i="disabled:text-disabled disabled:bg-transparent";switch(s){case"primary":return["text-primary bg-transparent border-transparent","hover:bg-primary/4",i];case"danger":return["text-danger bg-transparent border-transparent","hover:bg-danger/4",i];case"positive":return["text-positive bg-transparent border-transparent","hover:bg-positive/4",i];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",i]}}function link({color:s}){switch(s){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 contained({color:s,border:i}){const a="disabled:text-disabled disabled:bg-disabled disabled:border-transparent disabled:shadow-none";switch(s){case"primary":return[`text-on-primary bg-primary ${i} border-primary`,"hover:bg-primary-dark hover:border-primary-dark",a];case"danger":return[`text-white bg-danger ${i} border-danger`,"hover:bg-danger/90 hover:border-danger/90",a];case"chip":return[`text-main bg-chip ${i} border-chip`,"hover:bg-chip/90 hover:border-chip/90",a];case"paper":return[`text-main bg-paper ${i} border-paper`,"hover:bg-paper/90 hover:border-paper/90",a];case"white":return[`text-black bg-white ${i} border-white`,"hover:bg-white",a];default:return[`bg ${i} border-background`,"hover:bg-hover",a]}}function createEventHandler(s){return s&&(i=>{i.currentTarget.contains(i.target)&&s(i)})}const ButtonBase=reactExports.forwardRef((s,i)=>{const{children:a,color:c=null,variant:d,radius:g,shadow:b,whitespace:$,justify:_="justify-center",className:j,href:_e,form:et,border:tt,elementType:nt,to:rt,relative:at,replace:lt,end:ot,display:st,type:it="button",onClick:ut,onPointerDown:ct,onPointerUp:pt,onKeyDown:mt,...xt}=s,St=nt||(_e?"a":"button"),wt=St==="a";return jsxRuntimeExports.jsx(St,{ref:i,form:wt?void 0:et,href:_e,to:rt,relative:at,type:wt?void 0:it,replace:lt,end:ot,onPointerDown:createEventHandler(ct),onPointerUp:createEventHandler(pt),onClick:createEventHandler(ut),onKeyDown:createEventHandler(mt),className:clsx$1("focus-visible:ring",getSharedButtonStyle({variant:d,color:c,border:tt,whitespace:$,display:st}),g,_,j),...xt,children:a})}),Button=React.forwardRef(({children:s,startIcon:i,endIcon:a,size:c="sm",sizeClassName:d,className:g,equalWidth:b=!1,radius:$="rounded-button",variant:_="text",disabled:j,elementType:_e,to:et,href:tt,download:nt,...rt},at)=>{const lt=clsx$1("font-semibold",d||getButtonSizeStyle(c,{equalWidth:b,variant:_}),g);return jsxRuntimeExports.jsxs(ButtonBase,{className:lt,ref:at,radius:$,variant:_,disabled:j,to:j?void 0:et,href:j?void 0:tt,download:j?void 0:nt,elementType:j?void 0:_e,...rt,children:[i&&jsxRuntimeExports.jsx(InlineIcon,{position:"start",icon:i,size:c}),s,a&&jsxRuntimeExports.jsx(InlineIcon,{position:"end",icon:a,size:c})]})});function InlineIcon({icon:s,position:i,size:a}){const c=clsx$1("m-auto",{"-ml-4 mr-8":i==="start","-mr-4 ml-8":i==="end"},s.props.className);return React.cloneElement(s,{className:c,size:a})}function _check_private_redeclaration(s,i){if(i.has(s))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _class_private_field_init(s,i,a){_check_private_redeclaration(s,i),i.set(s,a)}function $2b4dce13dd5a17fa$export$842a2cf37af977e1(s,i){return s-i*Math.floor(s/i)}const $3b62074eb05584b2$var$EPOCH=1721426;function $3b62074eb05584b2$export$f297eb839006d339(s,i,a,c){i=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(s,i);let d=i-1,g=-2;return a<=2?g=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(i)&&(g=-1),$3b62074eb05584b2$var$EPOCH-1+365*d+Math.floor(d/4)-Math.floor(d/100)+Math.floor(d/400)+Math.floor((367*a-362)/12+g+c)}function $3b62074eb05584b2$export$553d7fa8e3805fc0(s){return s%4===0&&(s%100!==0||s%400===0)}function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(s,i){return s==="BC"?1-i:i}function $3b62074eb05584b2$export$4475b7e617eb123c(s){let i="AD";return s<=0&&(i="BC",s=1-s),[i,s]}const $3b62074eb05584b2$var$daysInMonth={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 $3b62074eb05584b2$export$80ee6245ec4f29ec{fromJulianDay(i){let a=i,c=a-$3b62074eb05584b2$var$EPOCH,d=Math.floor(c/146097),g=$2b4dce13dd5a17fa$export$842a2cf37af977e1(c,146097),b=Math.floor(g/36524),$=$2b4dce13dd5a17fa$export$842a2cf37af977e1(g,36524),_=Math.floor($/1461),j=$2b4dce13dd5a17fa$export$842a2cf37af977e1($,1461),_e=Math.floor(j/365),et=d*400+b*100+_*4+_e+(b!==4&&_e!==4?1:0),[tt,nt]=$3b62074eb05584b2$export$4475b7e617eb123c(et),rt=a-$3b62074eb05584b2$export$f297eb839006d339(tt,nt,1,1),at=2;a<$3b62074eb05584b2$export$f297eb839006d339(tt,nt,3,1)?at=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(nt)&&(at=1);let lt=Math.floor(((rt+at)*12+373)/367),ot=a-$3b62074eb05584b2$export$f297eb839006d339(tt,nt,lt,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(tt,nt,lt,ot)}toJulianDay(i){return $3b62074eb05584b2$export$f297eb839006d339(i.era,i.year,i.month,i.day)}getDaysInMonth(i){return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(i.year)?"leapyear":"standard"][i.month-1]}getMonthsInYear(i){return 12}getDaysInYear(i){return $3b62074eb05584b2$export$553d7fa8e3805fc0(i.year)?366:365}getYearsInEra(i){return 9999}getEras(){return["BC","AD"]}isInverseEra(i){return i.era==="BC"}balanceDate(i){i.year<=0&&(i.era=i.era==="BC"?"AD":"BC",i.year=1-i.year)}constructor(){this.identifier="gregory"}}const $2fe286d2fb449abb$export$7a5acbd77d414bd9={"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 $14e0f24ef4ac5c92$export$ea39ec197993aef0(s,i){return i=$11d87f3f76e88657$export$b4a036af3fc0b032(i,s.calendar),s.era===i.era&&s.year===i.year&&s.month===i.month&&s.day===i.day}function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(s,i){return i=$11d87f3f76e88657$export$b4a036af3fc0b032(i,s.calendar),s=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(s),i=$14e0f24ef4ac5c92$export$a5a3b454ada2268e(i),s.era===i.era&&s.year===i.year&&s.month===i.month}function $14e0f24ef4ac5c92$export$629b0a497aa65267(s,i){return $14e0f24ef4ac5c92$export$ea39ec197993aef0(s,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(i))}function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(s,i){let a=s.calendar.toJulianDay(s),c=Math.ceil(a+1-$14e0f24ef4ac5c92$var$getWeekStart(i))%7;return c<0&&(c+=7),c}function $14e0f24ef4ac5c92$export$461939dd4422153(s){return $11d87f3f76e88657$export$1b96692a1ba042ac(Date.now(),s)}function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(s){return $11d87f3f76e88657$export$93522d1a439f3617($14e0f24ef4ac5c92$export$461939dd4422153(s))}function $14e0f24ef4ac5c92$export$68781ddf31c0090f(s,i){return s.calendar.toJulianDay(s)-i.calendar.toJulianDay(i)}function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(s,i){return $14e0f24ef4ac5c92$var$timeToMs(s)-$14e0f24ef4ac5c92$var$timeToMs(i)}function $14e0f24ef4ac5c92$var$timeToMs(s){return s.hour*36e5+s.minute*6e4+s.second*1e3+s.millisecond}let $14e0f24ef4ac5c92$var$localTimeZone=null;function $14e0f24ef4ac5c92$export$aa8b41735afcabd2(){return $14e0f24ef4ac5c92$var$localTimeZone==null&&($14e0f24ef4ac5c92$var$localTimeZone=new Intl.DateTimeFormat().resolvedOptions().timeZone),$14e0f24ef4ac5c92$var$localTimeZone}function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(s){return s.subtract({days:s.day-1})}function $14e0f24ef4ac5c92$export$a2258d9c4118825c(s){return s.add({days:s.calendar.getDaysInMonth(s)-s.day})}function $14e0f24ef4ac5c92$export$f91e89d3d0406102(s){return $14e0f24ef4ac5c92$export$a5a3b454ada2268e(s.subtract({months:s.month-1}))}function $14e0f24ef4ac5c92$export$8b7aa55c66d5569e(s){return $14e0f24ef4ac5c92$export$a2258d9c4118825c(s.add({months:s.calendar.getMonthsInYear(s)-s.month}))}function $14e0f24ef4ac5c92$export$5412ac11713b72ad(s){return s.calendar.getMinimumMonthInYear?s.calendar.getMinimumMonthInYear(s):1}function $14e0f24ef4ac5c92$export$b2f4953d301981d5(s){return s.calendar.getMinimumDayInMonth?s.calendar.getMinimumDayInMonth(s):1}function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(s,i){let a=$14e0f24ef4ac5c92$export$2061056d06d7cdf7(s,i);return s.subtract({days:a})}function $14e0f24ef4ac5c92$export$ef8b6d9133084f4e(s,i){return $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(s,i).add({days:6})}const $14e0f24ef4ac5c92$var$cachedRegions=new Map;function $14e0f24ef4ac5c92$var$getRegion(s){if(Intl.Locale){let a=$14e0f24ef4ac5c92$var$cachedRegions.get(s);return a||(a=new Intl.Locale(s).maximize().region,$14e0f24ef4ac5c92$var$cachedRegions.set(s,a)),a}let i=s.split("-")[1];return i==="u"?null:i}function $14e0f24ef4ac5c92$var$getWeekStart(s){let i=$14e0f24ef4ac5c92$var$getRegion(s);return $2fe286d2fb449abb$export$7a5acbd77d414bd9[i]||0}function $14e0f24ef4ac5c92$export$ccc1b2479e7dd654(s,i){let a=s.calendar.getDaysInMonth(s);return Math.ceil(($14e0f24ef4ac5c92$export$2061056d06d7cdf7($14e0f24ef4ac5c92$export$a5a3b454ada2268e(s),i)+a)/7)}function $14e0f24ef4ac5c92$export$5c333a116e949cdd(s,i){return s&&i?s.compare(i)<=0?s:i:s||i}function $14e0f24ef4ac5c92$export$a75f2bff57811055(s,i){return s&&i?s.compare(i)>=0?s:i:s||i}function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(s){s=$11d87f3f76e88657$export$b4a036af3fc0b032(s,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let i=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(s.era,s.year);return $11d87f3f76e88657$var$epochFromParts(i,s.month,s.day,s.hour,s.minute,s.second,s.millisecond)}function $11d87f3f76e88657$var$epochFromParts(s,i,a,c,d,g,b){let $=new Date;return $.setUTCHours(c,d,g,b),$.setUTCFullYear(s,i-1,a),$.getTime()}function $11d87f3f76e88657$export$59c99f3515d3493f(s,i){if(i==="UTC")return 0;if(s>0&&i===$14e0f24ef4ac5c92$export$aa8b41735afcabd2())return new Date(s).getTimezoneOffset()*-6e4;let{year:a,month:c,day:d,hour:g,minute:b,second:$}=$11d87f3f76e88657$var$getTimeZoneParts(s,i);return $11d87f3f76e88657$var$epochFromParts(a,c,d,g,b,$,0)-Math.floor(s/1e3)*1e3}const $11d87f3f76e88657$var$formattersByTimeZone=new Map;function $11d87f3f76e88657$var$getTimeZoneParts(s,i){let a=$11d87f3f76e88657$var$formattersByTimeZone.get(i);a||(a=new Intl.DateTimeFormat("en-US",{timeZone:i,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),$11d87f3f76e88657$var$formattersByTimeZone.set(i,a));let c=a.formatToParts(new Date(s)),d={};for(let g of c)g.type!=="literal"&&(d[g.type]=g.value);return{year:d.era==="BC"||d.era==="B"?-d.year+1:+d.year,month:+d.month,day:+d.day,hour:d.hour==="24"?0:+d.hour,minute:+d.minute,second:+d.second}}const $11d87f3f76e88657$var$DAYMILLIS=864e5;function $11d87f3f76e88657$var$getValidWallTimes(s,i,a,c){return(a===c?[a]:[a,c]).filter(g=>$11d87f3f76e88657$var$isValidWallTime(s,i,g))}function $11d87f3f76e88657$var$isValidWallTime(s,i,a){let c=$11d87f3f76e88657$var$getTimeZoneParts(a,i);return s.year===c.year&&s.month===c.month&&s.day===c.day&&s.hour===c.hour&&s.minute===c.minute&&s.second===c.second}function $11d87f3f76e88657$export$5107c82f94518f5c(s,i,a="compatible"){let c=$11d87f3f76e88657$export$b21e0b124e224484(s);if(i==="UTC")return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(c);if(i===$14e0f24ef4ac5c92$export$aa8b41735afcabd2()&&a==="compatible"){c=$11d87f3f76e88657$export$b4a036af3fc0b032(c,new $3b62074eb05584b2$export$80ee6245ec4f29ec);let _=new Date,j=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(c.era,c.year);return _.setFullYear(j,c.month-1,c.day),_.setHours(c.hour,c.minute,c.second,c.millisecond),_.getTime()}let d=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(c),g=$11d87f3f76e88657$export$59c99f3515d3493f(d-$11d87f3f76e88657$var$DAYMILLIS,i),b=$11d87f3f76e88657$export$59c99f3515d3493f(d+$11d87f3f76e88657$var$DAYMILLIS,i),$=$11d87f3f76e88657$var$getValidWallTimes(c,i,d-g,d-b);if($.length===1)return $[0];if($.length>1)switch(a){case"compatible":case"earlier":return $[0];case"later":return $[$.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(a){case"earlier":return Math.min(d-g,d-b);case"compatible":case"later":return Math.max(d-g,d-b);case"reject":throw new RangeError("No such absolute time found")}}function $11d87f3f76e88657$export$e67a095c620b86fe(s,i,a="compatible"){return new Date($11d87f3f76e88657$export$5107c82f94518f5c(s,i,a))}function $11d87f3f76e88657$export$1b96692a1ba042ac(s,i){let a=$11d87f3f76e88657$export$59c99f3515d3493f(s,i),c=new Date(s+a),d=c.getUTCFullYear(),g=c.getUTCMonth()+1,b=c.getUTCDate(),$=c.getUTCHours(),_=c.getUTCMinutes(),j=c.getUTCSeconds(),_e=c.getUTCMilliseconds();return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(d,g,b,i,a,$,_,j,_e)}function $11d87f3f76e88657$export$93522d1a439f3617(s){return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(s.calendar,s.era,s.year,s.month,s.day)}function $11d87f3f76e88657$export$b21e0b124e224484(s,i){let a=0,c=0,d=0,g=0;if("timeZone"in s)({hour:a,minute:c,second:d,millisecond:g}=s);else if("hour"in s&&!i)return s;return i&&({hour:a,minute:c,second:d,millisecond:g}=i),new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(s.calendar,s.era,s.year,s.month,s.day,a,c,d,g)}function $11d87f3f76e88657$export$b4a036af3fc0b032(s,i){if(s.calendar.identifier===i.identifier)return s;let a=i.fromJulianDay(s.calendar.toJulianDay(s)),c=s.copy();return c.calendar=i,c.era=a.era,c.year=a.year,c.month=a.month,c.day=a.day,$735220c2d4774dd3$export$c4e2ecac49351ef2(c),c}function $11d87f3f76e88657$export$84c95a83c799e074(s,i,a){if(s instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea)return s.timeZone===i?s:$11d87f3f76e88657$export$538b00033cc11c75(s,i);let c=$11d87f3f76e88657$export$5107c82f94518f5c(s,i,a);return $11d87f3f76e88657$export$1b96692a1ba042ac(c,i)}function $11d87f3f76e88657$export$83aac07b4c37b25(s){let i=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset;return new Date(i)}function $11d87f3f76e88657$export$538b00033cc11c75(s,i){let a=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset;return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(a,i),s.calendar)}const $735220c2d4774dd3$var$ONE_HOUR=36e5;function $735220c2d4774dd3$export$e16d8520af44a096(s,i){let a=s.copy(),c="hour"in a?$735220c2d4774dd3$var$addTimeFields(a,i):0;$735220c2d4774dd3$var$addYears(a,i.years||0),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,s),a.month+=i.months||0,$735220c2d4774dd3$var$balanceYearMonth(a),$735220c2d4774dd3$var$constrainMonthDay(a),a.day+=(i.weeks||0)*7,a.day+=i.days||0,a.day+=c,$735220c2d4774dd3$var$balanceDay(a),a.calendar.balanceDate&&a.calendar.balanceDate(a),a.year<1&&(a.year=1,a.month=1,a.day=1);let d=a.calendar.getYearsInEra(a);if(a.year>d){var g,b;let _=(b=(g=a.calendar).isInverseEra)===null||b===void 0?void 0:b.call(g,a);a.year=d,a.month=_?1:a.calendar.getMonthsInYear(a),a.day=_?1:a.calendar.getDaysInMonth(a)}a.month<1&&(a.month=1,a.day=1);let $=a.calendar.getMonthsInYear(a);return a.month>$&&(a.month=$,a.day=a.calendar.getDaysInMonth(a)),a.day=Math.max(1,Math.min(a.calendar.getDaysInMonth(a),a.day)),a}function $735220c2d4774dd3$var$addYears(s,i){var a,c;!((c=(a=s.calendar).isInverseEra)===null||c===void 0)&&c.call(a,s)&&(i=-i),s.year+=i}function $735220c2d4774dd3$var$balanceYearMonth(s){for(;s.month<1;)$735220c2d4774dd3$var$addYears(s,-1),s.month+=s.calendar.getMonthsInYear(s);let i=0;for(;s.month>(i=s.calendar.getMonthsInYear(s));)s.month-=i,$735220c2d4774dd3$var$addYears(s,1)}function $735220c2d4774dd3$var$balanceDay(s){for(;s.day<1;)s.month--,$735220c2d4774dd3$var$balanceYearMonth(s),s.day+=s.calendar.getDaysInMonth(s);for(;s.day>s.calendar.getDaysInMonth(s);)s.day-=s.calendar.getDaysInMonth(s),s.month++,$735220c2d4774dd3$var$balanceYearMonth(s)}function $735220c2d4774dd3$var$constrainMonthDay(s){s.month=Math.max(1,Math.min(s.calendar.getMonthsInYear(s),s.month)),s.day=Math.max(1,Math.min(s.calendar.getDaysInMonth(s),s.day))}function $735220c2d4774dd3$export$c4e2ecac49351ef2(s){s.calendar.constrainDate&&s.calendar.constrainDate(s),s.year=Math.max(1,Math.min(s.calendar.getYearsInEra(s),s.year)),$735220c2d4774dd3$var$constrainMonthDay(s)}function $735220c2d4774dd3$export$3e2544e88a25bff8(s){let i={};for(let a in s)typeof s[a]=="number"&&(i[a]=-s[a]);return i}function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(s,i){return $735220c2d4774dd3$export$e16d8520af44a096(s,$735220c2d4774dd3$export$3e2544e88a25bff8(i))}function $735220c2d4774dd3$export$adaa4cf7ef1b65be(s,i){let a=s.copy();return i.era!=null&&(a.era=i.era),i.year!=null&&(a.year=i.year),i.month!=null&&(a.month=i.month),i.day!=null&&(a.day=i.day),$735220c2d4774dd3$export$c4e2ecac49351ef2(a),a}function $735220c2d4774dd3$export$e5d5e1c1822b6e56(s,i){let a=s.copy();return i.hour!=null&&(a.hour=i.hour),i.minute!=null&&(a.minute=i.minute),i.second!=null&&(a.second=i.second),i.millisecond!=null&&(a.millisecond=i.millisecond),$735220c2d4774dd3$export$7555de1e070510cb(a),a}function $735220c2d4774dd3$var$balanceTime(s){s.second+=Math.floor(s.millisecond/1e3),s.millisecond=$735220c2d4774dd3$var$nonNegativeMod(s.millisecond,1e3),s.minute+=Math.floor(s.second/60),s.second=$735220c2d4774dd3$var$nonNegativeMod(s.second,60),s.hour+=Math.floor(s.minute/60),s.minute=$735220c2d4774dd3$var$nonNegativeMod(s.minute,60);let i=Math.floor(s.hour/24);return s.hour=$735220c2d4774dd3$var$nonNegativeMod(s.hour,24),i}function $735220c2d4774dd3$export$7555de1e070510cb(s){s.millisecond=Math.max(0,Math.min(s.millisecond,1e3)),s.second=Math.max(0,Math.min(s.second,59)),s.minute=Math.max(0,Math.min(s.minute,59)),s.hour=Math.max(0,Math.min(s.hour,23))}function $735220c2d4774dd3$var$nonNegativeMod(s,i){let a=s%i;return a<0&&(a+=i),a}function $735220c2d4774dd3$var$addTimeFields(s,i){return s.hour+=i.hours||0,s.minute+=i.minutes||0,s.second+=i.seconds||0,s.millisecond+=i.milliseconds||0,$735220c2d4774dd3$var$balanceTime(s)}function $735220c2d4774dd3$export$d52ced6badfb9a4c(s,i,a,c){let d=s.copy();switch(i){case"era":{let $=s.calendar.getEras(),_=$.indexOf(s.era);if(_<0)throw new Error("Invalid era: "+s.era);_=$735220c2d4774dd3$var$cycleValue(_,a,0,$.length-1,c==null?void 0:c.round),d.era=$[_],$735220c2d4774dd3$export$c4e2ecac49351ef2(d);break}case"year":var g,b;!((b=(g=d.calendar).isInverseEra)===null||b===void 0)&&b.call(g,d)&&(a=-a),d.year=$735220c2d4774dd3$var$cycleValue(s.year,a,-1/0,9999,c==null?void 0:c.round),d.year===-1/0&&(d.year=1),d.calendar.balanceYearMonth&&d.calendar.balanceYearMonth(d,s);break;case"month":d.month=$735220c2d4774dd3$var$cycleValue(s.month,a,1,s.calendar.getMonthsInYear(s),c==null?void 0:c.round);break;case"day":d.day=$735220c2d4774dd3$var$cycleValue(s.day,a,1,s.calendar.getDaysInMonth(s),c==null?void 0:c.round);break;default:throw new Error("Unsupported field "+i)}return s.calendar.balanceDate&&s.calendar.balanceDate(d),$735220c2d4774dd3$export$c4e2ecac49351ef2(d),d}function $735220c2d4774dd3$export$dd02b3e0007dfe28(s,i,a,c){let d=s.copy();switch(i){case"hour":{let g=s.hour,b=0,$=23;if((c==null?void 0:c.hourCycle)===12){let _=g>=12;b=_?12:0,$=_?23:11}d.hour=$735220c2d4774dd3$var$cycleValue(g,a,b,$,c==null?void 0:c.round);break}case"minute":d.minute=$735220c2d4774dd3$var$cycleValue(s.minute,a,0,59,c==null?void 0:c.round);break;case"second":d.second=$735220c2d4774dd3$var$cycleValue(s.second,a,0,59,c==null?void 0:c.round);break;case"millisecond":d.millisecond=$735220c2d4774dd3$var$cycleValue(s.millisecond,a,0,999,c==null?void 0:c.round);break;default:throw new Error("Unsupported field "+i)}return d}function $735220c2d4774dd3$var$cycleValue(s,i,a,c,d=!1){if(d){s+=Math.sign(i),s0?s=Math.ceil(s/g)*g:s=Math.floor(s/g)*g,s>c&&(s=a)}else s+=i,sc&&(s=a+(s-c-1));return s}function $735220c2d4774dd3$export$96b1d28349274637(s,i){let a;if(i.years!=null&&i.years!==0||i.months!=null&&i.months!==0||i.weeks!=null&&i.weeks!==0||i.days!=null&&i.days!==0){let d=$735220c2d4774dd3$export$e16d8520af44a096($11d87f3f76e88657$export$b21e0b124e224484(s),{years:i.years,months:i.months,weeks:i.weeks,days:i.days});a=$11d87f3f76e88657$export$5107c82f94518f5c(d,s.timeZone)}else a=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset;a+=i.milliseconds||0,a+=(i.seconds||0)*1e3,a+=(i.minutes||0)*6e4,a+=(i.hours||0)*36e5;let c=$11d87f3f76e88657$export$1b96692a1ba042ac(a,s.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032(c,s.calendar)}function $735220c2d4774dd3$export$6814caac34ca03c7(s,i){return $735220c2d4774dd3$export$96b1d28349274637(s,$735220c2d4774dd3$export$3e2544e88a25bff8(i))}function $735220c2d4774dd3$export$9a297d111fc86b79(s,i,a,c){switch(i){case"hour":{let d=0,g=23;if((c==null?void 0:c.hourCycle)===12){let rt=s.hour>=12;d=rt?12:0,g=rt?23:11}let b=$11d87f3f76e88657$export$b21e0b124e224484(s),$=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(b,{hour:d}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),_=[$11d87f3f76e88657$export$5107c82f94518f5c($,s.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c($,s.timeZone,"later")].filter(rt=>$11d87f3f76e88657$export$1b96692a1ba042ac(rt,s.timeZone).day===$.day)[0],j=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56(b,{hour:g}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),_e=[$11d87f3f76e88657$export$5107c82f94518f5c(j,s.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c(j,s.timeZone,"later")].filter(rt=>$11d87f3f76e88657$export$1b96692a1ba042ac(rt,s.timeZone).day===j.day).pop(),et=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset,tt=Math.floor(et/$735220c2d4774dd3$var$ONE_HOUR),nt=et%$735220c2d4774dd3$var$ONE_HOUR;return et=$735220c2d4774dd3$var$cycleValue(tt,a,Math.floor(_/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(_e/$735220c2d4774dd3$var$ONE_HOUR),c==null?void 0:c.round)*$735220c2d4774dd3$var$ONE_HOUR+nt,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(et,s.timeZone),s.calendar)}case"minute":case"second":case"millisecond":return $735220c2d4774dd3$export$dd02b3e0007dfe28(s,i,a,c);case"era":case"year":case"month":case"day":{let d=$735220c2d4774dd3$export$d52ced6badfb9a4c($11d87f3f76e88657$export$b21e0b124e224484(s),i,a,c),g=$11d87f3f76e88657$export$5107c82f94518f5c(d,s.timeZone);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(g,s.timeZone),s.calendar)}default:throw new Error("Unsupported field "+i)}}function $735220c2d4774dd3$export$31b5430eb18be4f8(s,i,a){let c=$11d87f3f76e88657$export$b21e0b124e224484(s),d=$735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(c,i),i);if(d.compare(c)===0)return s;let g=$11d87f3f76e88657$export$5107c82f94518f5c(d,s.timeZone,a);return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(g,s.timeZone),s.calendar)}const $fae977aafc393c5c$var$ABSOLUTE_RE=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function $fae977aafc393c5c$export$5adfdab05168c219(s,i){let a=s.match($fae977aafc393c5c$var$ABSOLUTE_RE);if(!a)throw new Error("Invalid ISO 8601 date time string: "+s);let c=new $35ea8db9cb2ccb90$export$d3b7288e7994edea($fae977aafc393c5c$var$parseNumber(a[1],1,9999),$fae977aafc393c5c$var$parseNumber(a[2],1,12),1,i,0,a[4]?$fae977aafc393c5c$var$parseNumber(a[4],0,23):0,a[5]?$fae977aafc393c5c$var$parseNumber(a[5],0,59):0,a[6]?$fae977aafc393c5c$var$parseNumber(a[6],0,59):0,a[7]?$fae977aafc393c5c$var$parseNumber(a[7],0,1/0)*1e3:0);c.day=$fae977aafc393c5c$var$parseNumber(a[3],0,c.calendar.getDaysInMonth(c));var d;return a[8]&&(c.offset=$fae977aafc393c5c$var$parseNumber(a[8],-23,23)*36e5+$fae977aafc393c5c$var$parseNumber((d=a[9])!==null&&d!==void 0?d:"0",0,59)*6e4),$11d87f3f76e88657$export$538b00033cc11c75(c,i)}function $fae977aafc393c5c$export$8e384432362ed0f0(s){return $fae977aafc393c5c$export$5adfdab05168c219(s,$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}function $fae977aafc393c5c$var$parseNumber(s,i,a){let c=Number(s);if(ca)throw new RangeError(`Value out of range: ${i} <= ${c} <= ${a}`);return c}function $fae977aafc393c5c$export$f59dee82248f5ad4(s){return`${String(s.hour).padStart(2,"0")}:${String(s.minute).padStart(2,"0")}:${String(s.second).padStart(2,"0")}${s.millisecond?String(s.millisecond/1e3).slice(1):""}`}function $fae977aafc393c5c$export$60dfd74aa96791bd(s){let i=$11d87f3f76e88657$export$b4a036af3fc0b032(s,new $3b62074eb05584b2$export$80ee6245ec4f29ec);return`${String(i.year).padStart(4,"0")}-${String(i.month).padStart(2,"0")}-${String(i.day).padStart(2,"0")}`}function $fae977aafc393c5c$export$4223de14708adc63(s){return`${$fae977aafc393c5c$export$60dfd74aa96791bd(s)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(s)}`}function $fae977aafc393c5c$var$offsetToString(s){let i=Math.sign(s)<0?"-":"+";s=Math.abs(s);let a=Math.floor(s/36e5),c=s%36e5/6e4;return`${i}${String(a).padStart(2,"0")}:${String(c).padStart(2,"0")}`}function $fae977aafc393c5c$export$bf79f1ebf4b18792(s){return`${$fae977aafc393c5c$export$4223de14708adc63(s)}${$fae977aafc393c5c$var$offsetToString(s.offset)}[${s.timeZone}]`}function $35ea8db9cb2ccb90$var$shiftArgs(s){let i=typeof s[0]=="object"?s.shift():new $3b62074eb05584b2$export$80ee6245ec4f29ec,a;if(typeof s[0]=="string")a=s.shift();else{let b=i.getEras();a=b[b.length-1]}let c=s.shift(),d=s.shift(),g=s.shift();return[i,a,c,d,g]}var $35ea8db9cb2ccb90$var$_type=new WeakMap;class $35ea8db9cb2ccb90$export$99faa760c7908e4f{copy(){return this.era?new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.era,this.year,this.month,this.day):new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar,this.year,this.month,this.day)}add(i){return $735220c2d4774dd3$export$e16d8520af44a096(this,i)}subtract(i){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,i)}set(i){return $735220c2d4774dd3$export$adaa4cf7ef1b65be(this,i)}cycle(i,a,c){return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,i,a,c)}toDate(i){return $11d87f3f76e88657$export$e67a095c620b86fe(this,i)}toString(){return $fae977aafc393c5c$export$60dfd74aa96791bd(this)}compare(i){return $14e0f24ef4ac5c92$export$68781ddf31c0090f(this,i)}constructor(...i){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type,{writable:!0,value:void 0});let[a,c,d,g,b]=$35ea8db9cb2ccb90$var$shiftArgs(i);this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=b,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}var $35ea8db9cb2ccb90$var$_type2=new WeakMap;class $35ea8db9cb2ccb90$export$ca871e8dbb80966f{copy(){return this.era?new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(i){return $735220c2d4774dd3$export$e16d8520af44a096(this,i)}subtract(i){return $735220c2d4774dd3$export$4e2d2ead65e5f7e3(this,i)}set(i){return $735220c2d4774dd3$export$adaa4cf7ef1b65be($735220c2d4774dd3$export$e5d5e1c1822b6e56(this,i),i)}cycle(i,a,c){switch(i){case"era":case"year":case"month":case"day":return $735220c2d4774dd3$export$d52ced6badfb9a4c(this,i,a,c);default:return $735220c2d4774dd3$export$dd02b3e0007dfe28(this,i,a,c)}}toDate(i,a){return $11d87f3f76e88657$export$e67a095c620b86fe(this,i,a)}toString(){return $fae977aafc393c5c$export$4223de14708adc63(this)}compare(i){let a=$14e0f24ef4ac5c92$export$68781ddf31c0090f(this,i);return a===0?$14e0f24ef4ac5c92$export$c19a80a9721b80f6(this,$11d87f3f76e88657$export$b21e0b124e224484(i)):a}constructor(...i){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type2,{writable:!0,value:void 0});let[a,c,d,g,b]=$35ea8db9cb2ccb90$var$shiftArgs(i);this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=b,this.hour=i.shift()||0,this.minute=i.shift()||0,this.second=i.shift()||0,this.millisecond=i.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}var $35ea8db9cb2ccb90$var$_type3=new WeakMap;class $35ea8db9cb2ccb90$export$d3b7288e7994edea{copy(){return this.era?new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(i){return $735220c2d4774dd3$export$96b1d28349274637(this,i)}subtract(i){return $735220c2d4774dd3$export$6814caac34ca03c7(this,i)}set(i,a){return $735220c2d4774dd3$export$31b5430eb18be4f8(this,i,a)}cycle(i,a,c){return $735220c2d4774dd3$export$9a297d111fc86b79(this,i,a,c)}toDate(){return $11d87f3f76e88657$export$83aac07b4c37b25(this)}toString(){return $fae977aafc393c5c$export$bf79f1ebf4b18792(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(i){return this.toDate().getTime()-$11d87f3f76e88657$export$84c95a83c799e074(i,this.timeZone).toDate().getTime()}constructor(...i){_class_private_field_init(this,$35ea8db9cb2ccb90$var$_type3,{writable:!0,value:void 0});let[a,c,d,g,b]=$35ea8db9cb2ccb90$var$shiftArgs(i),$=i.shift(),_=i.shift();this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=b,this.timeZone=$,this.offset=_,this.hour=i.shift()||0,this.minute=i.shift()||0,this.second=i.shift()||0,this.millisecond=i.shift()||0,$735220c2d4774dd3$export$c4e2ecac49351ef2(this)}}let $fb18d541ea1ad717$var$formatterCache=new Map;class $fb18d541ea1ad717$export$ad991b66133851cf{format(i){return this.formatter.format(i)}formatToParts(i){return this.formatter.formatToParts(i)}formatRange(i,a){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(i,a);if(a= start date");return`${this.formatter.format(i)} – ${this.formatter.format(a)}`}formatRangeToParts(i,a){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(i,a);if(a= start date");let c=this.formatter.formatToParts(i),d=this.formatter.formatToParts(a);return[...c.map(g=>({...g,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...d.map(g=>({...g,source:"endRange"}))]}resolvedOptions(){let i=this.formatter.resolvedOptions();return $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$fb18d541ea1ad717$var$getResolvedHourCycle(i.locale,this.options)),i.hourCycle=this.resolvedHourCycle,i.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),i.calendar==="ethiopic-amete-alem"&&(i.calendar="ethioaa"),i}constructor(i,a={}){this.formatter=$fb18d541ea1ad717$var$getCachedDateFormatter(i,a),this.options=a}}const $fb18d541ea1ad717$var$hour12Preferences={true:{ja:"h11"},false:{}};function $fb18d541ea1ad717$var$getCachedDateFormatter(s,i={}){if(typeof i.hour12=="boolean"&&$fb18d541ea1ad717$var$hasBuggyHour12Behavior()){i={...i};let d=$fb18d541ea1ad717$var$hour12Preferences[String(i.hour12)][s.split("-")[0]],g=i.hour12?"h12":"h23";i.hourCycle=d??g,delete i.hour12}let a=s+(i?Object.entries(i).sort((d,g)=>d[0]g.type==="hour").value,10),d=parseInt(a.formatToParts(new Date(2020,2,3,23)).find(g=>g.type==="hour").value,10);if(c===0&&d===23)return"h23";if(c===24&&d===23)return"h24";if(c===0&&d===11)return"h11";if(c===12&&d===11)return"h12";throw new Error("Unexpected hour cycle result")}function shallowEqual(s,i){if(s===i)return!0;if(!s||!i)return!1;const a=Object.keys(s),c=Object.keys(i),d=a.length;if(c.length!==d)return!1;for(let g=0;g!c||c==="auto"?$14e0f24ef4ac5c92$export$aa8b41735afcabd2():c,[c])}var nanoMemoize={exports:{}};(function(s){(function(){var i=Object.assign;typeof i!="function"&&(i=function(){var d=arguments,g=arguments[0];if(g==null)throw new TypeError("Cannot convert undefined or null to object");g=Object(g);for(var b=1;b=0&&(b=0)}function c(d,g){g||(g={});var b=g.vargs||a(d),$=Object.create(null),_=[],j=[],_e,et=new WeakMap,tt=function(it,ut,ct){return setTimeout(function(){if(ct){ut.splice(it,1),ct.splice(it,1);return}ut instanceof WeakMap?ut.delete(it):delete ut[it]},g.maxAge)},nt=g.maxAge>0&&g.maxAge<1/0?tt:0,rt=g.equals?g.equals:function(it,ut){return it===ut},at=g.maxArgs,lt=g.serializer,ot,st;return d.length===1&&!g.equals&&!b?(ot=(function(it){var ut=typeof it;if(!lt&&(ut==="object"&&it||ut==="function")){var ct;return et.get(it)||(!nt||nt(it,et),et.set(it,ct=d.call(this,it)),ct)}var pt=ut==="number"||ut==="boolean"||it==null?it:ut==="string"?JSON.stringify(it):lt(it);return $[pt]||(!nt||nt(pt,$),$[pt]=d.call(this,it))}).bind(this),st=1):ot=(function(){var it=arguments.length;if(!it&&_e!=null)return j[_e];var ut=at||it,ct;for(ct=_.length-1;ct>=0;ct--)if(!(!at&&_[ct].length!==ut)){for(var pt=ut-1;pt>=0&&rt(_[ct][pt],arguments[pt]);pt--)if(pt===0)return j[ct]}return ct=_.length-(ct+1),!it&&_e==null&&(_e=ct),!nt||nt(ct,j,_),j[ct]=d.apply(this,_[ct]=arguments)}).bind(this),ot.clear=function(){et=new WeakMap,$=Object.create(null),_=[],j=[],_e=void 0},ot.keys=function(){return st?null:_.slice()},ot.values=function(){return st?null:j.slice()},ot.keyValues=function(){return st?{primitives:i({},$),objects:et}:null},ot}s.exports=c,typeof window<"u"&&(window.nanomemoize=c)}).call(commonjsGlobal)})(nanoMemoize);var nanoMemoizeExports=nanoMemoize.exports;const memoize=getDefaultExportFromCjs(nanoMemoizeExports);function handlePluralMessage(s,{message:i,values:a}){const c=i.match(/\[(.+?)]/),d=a==null?void 0:a.count;if(c&&c[1]&&!Number.isNaN(d)){const[g,b]=c,$=b.split("|");if(!$.length)return i;const j=getRules(s).select(d);let _e=$.find(tt=>tt.startsWith(j));_e||(_e=$[0]);const et=_e.substring(_e.indexOf(" ")+1);return i.replace(g,et)}return i}const getRules=memoize(s=>new Intl.PluralRules(s)),Trans=reactExports.memo(s=>{const{message:i,values:a}=s,{lines:c,localeCode:d}=useSelectedLocale();let g;if(Object!=null&&Object.hasOwn(c||{},i)?g=c==null?void 0:c[i]:Object!=null&&Object.hasOwn(c||{},i==null?void 0:i.toLowerCase())?g=c==null?void 0:c[i.toLowerCase()]:g=i,!a||!g)return jsxRuntimeExports.jsx(reactExports.Fragment,{children:g});g=handlePluralMessage(d,{message:g,values:a});const b=[],$=[];if(Object.entries(a).forEach(([_,j])=>{typeof j=="function"?$.push(_):reactExports.isValidElement(j)?b.push(_):j!=null&&(g=g==null?void 0:g.replace(`:${_}`,`${j}`))}),$.length||b.length){const _=[];if($.length){const tt=$.join("");_.push(`(<[${tt}]>.+?<\\/[${tt}]>)`)}if(b.length){const tt=b.join("|");_.push(`(:(?:${tt}))`)}const j=new RegExp(_.join("|"),"gm"),et=g.split(j).filter(Boolean).map((tt,nt)=>{if(tt.startsWith("<")&&tt.endsWith(">")){const rt=tt.match(/<([a-z]+)>(.+?)<\/([a-z]+)>/);if(rt){const[,at,lt]=rt,ot=a==null?void 0:a[at];if(typeof ot=="function"){const st=ot(lt);return reactExports.cloneElement(st,{key:nt})}}}if(tt.startsWith(":")){const rt=tt.replace(":",""),at=a==null?void 0:a[rt];if(reactExports.isValidElement(at))return reactExports.cloneElement(at,{key:nt})}return tt});return jsxRuntimeExports.jsx(reactExports.Fragment,{children:et})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:g})},areEqual);function areEqual(s,i){const{values:a,...c}=s,{values:d,...g}=i;return shallowEqual(d,a)&&shallowEqual(c,g)}const DIVISIONS=[{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"}],FormattedRelativeTime=reactExports.memo(({date:s,style:i})=>{const{localeCode:a}=useSelectedLocale(),c=useUserTimezone(),d=reactExports.useMemo(()=>new Intl.RelativeTimeFormat(a,{numeric:"auto",style:i}),[a,i]);if(!s)return null;try{typeof s=="string"?s=$fae977aafc393c5c$export$8e384432362ed0f0(s).toDate():"toDate"in s&&(s=s.toDate(c))}catch{return null}let g=(s.getTime()-Date.now())/1e3;for(let b=0;b<=DIVISIONS.length;b++){const $=DIVISIONS[b];if(Math.abs(g)<$.amount)return $.name==="seconds"?jsxRuntimeExports.jsx(Trans,{message:"a few seconds ago"}):jsxRuntimeExports.jsx(reactExports.Fragment,{children:d.format(Math.round(g),$.name)});g/=$.amount}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:d.format(Math.round(g),"day")})},shallowEqual);function Line({notification:s,line:i,index:a,iconRenderer:c}){var $,_;const d=i.type==="primary"||a===0,g=c||DefaultIconRenderer,b=i.action?"a":"div";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(b,{className:clsx$1("flex items-center gap-8",i.action&&"hover:underline",d?"text-sm mnarktext-main whitespace-nowrap":"text-xs text-muted mt-6"),href:($=i.action)==null?void 0:$.action,title:(_=i.action)==null?void 0:_.label,children:[i.icon&&jsxRuntimeExports.jsx(g,{icon:i.icon}),jsxRuntimeExports.jsx("div",{className:"overflow-hidden text-ellipsis",dangerouslySetInnerHTML:{__html:i.content}})]},a),a===0&&jsxRuntimeExports.jsx("time",{className:"text-xs text-muted",children:jsxRuntimeExports.jsx(FormattedRelativeTime,{date:s.created_at})})]})}function DefaultIconRenderer({icon:s}){return jsxRuntimeExports.jsx(MixedImage,{src:s})}const Endpoint="notifications";function useUserNotifications(s){return useQuery({queryKey:useUserNotifications.key,queryFn:()=>fetchUserNotifications(s)})}function fetchUserNotifications(s){return apiClient.get(Endpoint,{params:s}).then(i=>i.data)}useUserNotifications.key=[Endpoint];const createStoreImpl=s=>{let i;const a=new Set,c=(_,j)=>{const _e=typeof _=="function"?_(i):_;if(!Object.is(_e,i)){const et=i;i=j??typeof _e!="object"?_e:Object.assign({},i,_e),a.forEach(tt=>tt(i,et))}},d=()=>i,$={setState:c,getState:d,subscribe:_=>(a.add(_),()=>a.delete(_)),destroy:()=>{a.clear()}};return i=s(c,d,$),$},createStore=s=>s?createStoreImpl(s):createStoreImpl;var withSelector={exports:{}},withSelector_production_min={},shim={exports:{}},useSyncExternalStoreShim_production_min={};/** * @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 e=reactExports;function h$1(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var k=typeof Object.is=="function"?Object.is:h$1,l=e.useState,m=e.useEffect,n$1=e.useLayoutEffect,p$1=e.useDebugValue;function q$1(s,i){var a=i(),c=l({inst:{value:a,getSnapshot:i}}),d=c[0].inst,g=c[1];return n$1(function(){d.value=a,d.getSnapshot=i,r$3(d)&&g({inst:d})},[s,a,i]),m(function(){return r$3(d)&&g({inst:d}),s(function(){r$3(d)&&g({inst:d})})},[s]),p$1(a),a}function r$3(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!k(s,a)}catch{return!0}}function t$1(s,i){return i()}var u$1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?t$1:q$1;useSyncExternalStoreShim_production_min.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u$1;shim.exports=useSyncExternalStoreShim_production_min;var shimExports=shim.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 h=reactExports,n=shimExports;function p(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var q=typeof Object.is=="function"?Object.is:p,r$2=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;withSelector_production_min.useSyncExternalStoreWithSelector=function(s,i,a,c,d){var g=t(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=v(function(){function _(nt){if(!j){if(j=!0,_e=nt,nt=c(nt),d!==void 0&&b.hasValue){var rt=b.value;if(d(rt,nt))return et=rt}return et=nt}if(rt=et,q(_e,nt))return rt;var at=c(nt);return d!==void 0&&d(rt,at)?rt:(_e=nt,et=at)}var j=!1,_e,et,tt=a===void 0?null:a;return[function(){return _(i())},tt===null?void 0:function(){return _(tt())}]},[i,a,c,d]);var $=r$2(s,g[0],g[1]);return u(function(){b.hasValue=!0,b.value=$},[$]),w($),$};withSelector.exports=withSelector_production_min;var withSelectorExports=withSelector.exports;const useSyncExternalStoreExports=getDefaultExportFromCjs(withSelectorExports),{useDebugValue}=React,{useSyncExternalStoreWithSelector}=useSyncExternalStoreExports;let didWarnAboutEqualityFn=!1;function useStore(s,i=s.getState,a){const c=useSyncExternalStoreWithSelector(s.subscribe,s.getState,s.getServerState||s.getState,i,a);return useDebugValue(c),c}const createImpl=s=>{const i=typeof s=="function"?createStore(s):s,a=(c,d)=>useStore(i,c,d);return Object.assign(a,i),a},create=s=>s?createImpl(s):createImpl;var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(s,...i){throw new Error(`[Immer] minified error nr: ${s}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(s){return!!s&&!!s[DRAFT_STATE]}function isDraftable(s){var i;return s?isPlainObject$2(s)||Array.isArray(s)||!!s[DRAFTABLE]||!!((i=s.constructor)!=null&&i[DRAFTABLE])||isMap(s)||isSet(s):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject$2(s){if(!s||typeof s!="object")return!1;const i=getPrototypeOf(s);if(i===null)return!0;const a=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return a===Object?!0:typeof a=="function"&&Function.toString.call(a)===objectCtorString}function each(s,i){getArchtype(s)===0?Object.entries(s).forEach(([a,c])=>{i(a,c,s)}):s.forEach((a,c)=>i(c,a,s))}function getArchtype(s){const i=s[DRAFT_STATE];return i?i.type_:Array.isArray(s)?1:isMap(s)?2:isSet(s)?3:0}function has$1(s,i){return getArchtype(s)===2?s.has(i):Object.prototype.hasOwnProperty.call(s,i)}function set$2(s,i,a){const c=getArchtype(s);c===2?s.set(i,a):c===3?s.add(a):s[i]=a}function is(s,i){return s===i?s!==0||1/s===1/i:s!==s&&i!==i}function isMap(s){return s instanceof Map}function isSet(s){return s instanceof Set}function latest(s){return s.copy_||s.base_}function shallowCopy(s,i){if(isMap(s))return new Map(s);if(isSet(s))return new Set(s);if(Array.isArray(s))return Array.prototype.slice.call(s);if(!i&&isPlainObject$2(s))return getPrototypeOf(s)?{...s}:Object.assign(Object.create(null),s);const a=Object.getOwnPropertyDescriptors(s);delete a[DRAFT_STATE];let c=Reflect.ownKeys(a);for(let d=0;d1&&(s.set=s.add=s.clear=s.delete=dontMutateFrozenCollections),Object.freeze(s),i&&each(s,(a,c)=>freeze(c,!0))),s}function dontMutateFrozenCollections(){die(2)}function isFrozen(s){return Object.isFrozen(s)}var plugins={};function getPlugin(s){const i=plugins[s];return i||die(0,s),i}function loadPlugin(s,i){plugins[s]||(plugins[s]=i)}var currentScope;function getCurrentScope(){return currentScope}function createScope(s,i){return{drafts_:[],parent_:s,immer_:i,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(s,i){i&&(getPlugin("Patches"),s.patches_=[],s.inversePatches_=[],s.patchListener_=i)}function revokeScope(s){leaveScope(s),s.drafts_.forEach(revokeDraft),s.drafts_=null}function leaveScope(s){s===currentScope&&(currentScope=s.parent_)}function enterScope(s){return currentScope=createScope(currentScope,s)}function revokeDraft(s){const i=s[DRAFT_STATE];i.type_===0||i.type_===1?i.revoke_():i.revoked_=!0}function processResult(s,i){i.unfinalizedDrafts_=i.drafts_.length;const a=i.drafts_[0];return s!==void 0&&s!==a?(a[DRAFT_STATE].modified_&&(revokeScope(i),die(4)),isDraftable(s)&&(s=finalize(i,s),i.parent_||maybeFreeze(i,s)),i.patches_&&getPlugin("Patches").generateReplacementPatches_(a[DRAFT_STATE].base_,s,i.patches_,i.inversePatches_)):s=finalize(i,a,[]),revokeScope(i),i.patches_&&i.patchListener_(i.patches_,i.inversePatches_),s!==NOTHING?s:void 0}function finalize(s,i,a){if(isFrozen(i))return i;const c=i[DRAFT_STATE];if(!c)return each(i,(d,g)=>finalizeProperty(s,c,i,d,g,a)),i;if(c.scope_!==s)return i;if(!c.modified_)return maybeFreeze(s,c.base_,!0),c.base_;if(!c.finalized_){c.finalized_=!0,c.scope_.unfinalizedDrafts_--;const d=c.copy_;let g=d,b=!1;c.type_===3&&(g=new Set(d),d.clear(),b=!0),each(g,($,_)=>finalizeProperty(s,c,d,$,_,a,b)),maybeFreeze(s,d,!1),a&&s.patches_&&getPlugin("Patches").generatePatches_(c,a,s.patches_,s.inversePatches_)}return c.copy_}function finalizeProperty(s,i,a,c,d,g,b){if(isDraft(d)){const $=g&&i&&i.type_!==3&&!has$1(i.assigned_,c)?g.concat(c):void 0,_=finalize(s,d,$);if(set$2(a,c,_),isDraft(_))s.canAutoFreeze_=!1;else return}else b&&a.add(d);if(isDraftable(d)&&!isFrozen(d)){if(!s.immer_.autoFreeze_&&s.unfinalizedDrafts_<1)return;finalize(s,d),(!i||!i.scope_.parent_)&&maybeFreeze(s,d)}}function maybeFreeze(s,i,a=!1){!s.parent_&&s.immer_.autoFreeze_&&s.canAutoFreeze_&&freeze(i,a)}function createProxyProxy(s,i){const a=Array.isArray(s),c={type_:a?1:0,scope_:i?i.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:i,base_:s,draft_:null,copy_:null,revoke_:null,isManual_:!1};let d=c,g=objectTraps;a&&(d=[c],g=arrayTraps);const{revoke:b,proxy:$}=Proxy.revocable(d,g);return c.draft_=$,c.revoke_=b,$}var objectTraps={get(s,i){if(i===DRAFT_STATE)return s;const a=latest(s);if(!has$1(a,i))return readPropFromProto(s,a,i);const c=a[i];return s.finalized_||!isDraftable(c)?c:c===peek(s.base_,i)?(prepareCopy(s),s.copy_[i]=createProxy(c,s)):c},has(s,i){return i in latest(s)},ownKeys(s){return Reflect.ownKeys(latest(s))},set(s,i,a){const c=getDescriptorFromProto(latest(s),i);if(c!=null&&c.set)return c.set.call(s.draft_,a),!0;if(!s.modified_){const d=peek(latest(s),i),g=d==null?void 0:d[DRAFT_STATE];if(g&&g.base_===a)return s.copy_[i]=a,s.assigned_[i]=!1,!0;if(is(a,d)&&(a!==void 0||has$1(s.base_,i)))return!0;prepareCopy(s),markChanged(s)}return s.copy_[i]===a&&(a!==void 0||i in s.copy_)||Number.isNaN(a)&&Number.isNaN(s.copy_[i])||(s.copy_[i]=a,s.assigned_[i]=!0),!0},deleteProperty(s,i){return peek(s.base_,i)!==void 0||i in s.base_?(s.assigned_[i]=!1,prepareCopy(s),markChanged(s)):delete s.assigned_[i],s.copy_&&delete s.copy_[i],!0},getOwnPropertyDescriptor(s,i){const a=latest(s),c=Reflect.getOwnPropertyDescriptor(a,i);return c&&{writable:!0,configurable:s.type_!==1||i!=="length",enumerable:c.enumerable,value:a[i]}},defineProperty(){die(11)},getPrototypeOf(s){return getPrototypeOf(s.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(s,i)=>{arrayTraps[s]=function(){return arguments[0]=arguments[0][0],i.apply(this,arguments)}});arrayTraps.deleteProperty=function(s,i){return arrayTraps.set.call(this,s,i,void 0)};arrayTraps.set=function(s,i,a){return objectTraps.set.call(this,s[0],i,a,s[0])};function peek(s,i){const a=s[DRAFT_STATE];return(a?latest(a):s)[i]}function readPropFromProto(s,i,a){var d;const c=getDescriptorFromProto(i,a);return c?"value"in c?c.value:(d=c.get)==null?void 0:d.call(s.draft_):void 0}function getDescriptorFromProto(s,i){if(!(i in s))return;let a=getPrototypeOf(s);for(;a;){const c=Object.getOwnPropertyDescriptor(a,i);if(c)return c;a=getPrototypeOf(a)}}function markChanged(s){s.modified_||(s.modified_=!0,s.parent_&&markChanged(s.parent_))}function prepareCopy(s){s.copy_||(s.copy_=shallowCopy(s.base_,s.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(s){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(i,a,c)=>{if(typeof i=="function"&&typeof a!="function"){const g=a;a=i;const b=this;return function(_=g,...j){return b.produce(_,_e=>a.call(this,_e,...j))}}typeof a!="function"&&die(6),c!==void 0&&typeof c!="function"&&die(7);let d;if(isDraftable(i)){const g=enterScope(this),b=createProxy(i,void 0);let $=!0;try{d=a(b),$=!1}finally{$?revokeScope(g):leaveScope(g)}return usePatchesInScope(g,c),processResult(d,g)}else if(!i||typeof i!="object"){if(d=a(i),d===void 0&&(d=i),d===NOTHING&&(d=void 0),this.autoFreeze_&&freeze(d,!0),c){const g=[],b=[];getPlugin("Patches").generateReplacementPatches_(i,d,g,b),c(g,b)}return d}else die(1,i)},this.produceWithPatches=(i,a)=>{if(typeof i=="function")return(b,...$)=>this.produceWithPatches(b,_=>i(_,...$));let c,d;return[this.produce(i,a,(b,$)=>{c=b,d=$}),c,d]},typeof(s==null?void 0:s.autoFreeze)=="boolean"&&this.setAutoFreeze(s.autoFreeze),typeof(s==null?void 0:s.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(s.useStrictShallowCopy)}createDraft(s){isDraftable(s)||die(8),isDraft(s)&&(s=current(s));const i=enterScope(this),a=createProxy(s,void 0);return a[DRAFT_STATE].isManual_=!0,leaveScope(i),a}finishDraft(s,i){const a=s&&s[DRAFT_STATE];(!a||!a.isManual_)&&die(9);const{scope_:c}=a;return usePatchesInScope(c,i),processResult(void 0,c)}setAutoFreeze(s){this.autoFreeze_=s}setUseStrictShallowCopy(s){this.useStrictShallowCopy_=s}applyPatches(s,i){let a;for(a=i.length-1;a>=0;a--){const d=i[a];if(d.path.length===0&&d.op==="replace"){s=d.value;break}}a>-1&&(i=i.slice(a+1));const c=getPlugin("Patches").applyPatches_;return isDraft(s)?c(s,i):this.produce(s,d=>c(d,i))}};function createProxy(s,i){const a=isMap(s)?getPlugin("MapSet").proxyMap_(s,i):isSet(s)?getPlugin("MapSet").proxySet_(s,i):createProxyProxy(s,i);return(i?i.scope_:getCurrentScope()).drafts_.push(a),a}function current(s){return isDraft(s)||die(10,s),currentImpl(s)}function currentImpl(s){if(!isDraftable(s)||isFrozen(s))return s;const i=s[DRAFT_STATE];let a;if(i){if(!i.modified_)return i.base_;i.finalized_=!0,a=shallowCopy(s,i.scope_.immer_.useStrictShallowCopy_)}else a=shallowCopy(s,!0);return each(a,(c,d)=>{set$2(a,c,currentImpl(d))}),i&&(i.finalized_=!1),a}function enableMapSet(){class s extends Map{constructor(_,j){super(),this[DRAFT_STATE]={type_:2,parent_:j,scope_:j?j.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:_,draft_:this,isManual_:!1,revoked_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(_){return latest(this[DRAFT_STATE]).has(_)}set(_,j){const _e=this[DRAFT_STATE];return b(_e),(!latest(_e).has(_)||latest(_e).get(_)!==j)&&(a(_e),markChanged(_e),_e.assigned_.set(_,!0),_e.copy_.set(_,j),_e.assigned_.set(_,!0)),this}delete(_){if(!this.has(_))return!1;const j=this[DRAFT_STATE];return b(j),a(j),markChanged(j),j.base_.has(_)?j.assigned_.set(_,!1):j.assigned_.delete(_),j.copy_.delete(_),!0}clear(){const _=this[DRAFT_STATE];b(_),latest(_).size&&(a(_),markChanged(_),_.assigned_=new Map,each(_.base_,j=>{_.assigned_.set(j,!1)}),_.copy_.clear())}forEach(_,j){const _e=this[DRAFT_STATE];latest(_e).forEach((et,tt,nt)=>{_.call(j,this.get(tt),tt,this)})}get(_){const j=this[DRAFT_STATE];b(j);const _e=latest(j).get(_);if(j.finalized_||!isDraftable(_e)||_e!==j.base_.get(_))return _e;const et=createProxy(_e,j);return a(j),j.copy_.set(_,et),et}keys(){return latest(this[DRAFT_STATE]).keys()}values(){const _=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const j=_.next();return j.done?j:{done:!1,value:this.get(j.value)}}}}entries(){const _=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const j=_.next();if(j.done)return j;const _e=this.get(j.value);return{done:!1,value:[j.value,_e]}}}}[Symbol.iterator](){return this.entries()}}function i($,_){return new s($,_)}function a($){$.copy_||($.assigned_=new Map,$.copy_=new Map($.base_))}class c extends Set{constructor(_,j){super(),this[DRAFT_STATE]={type_:3,parent_:j,scope_:j?j.scope_:getCurrentScope(),modified_:!1,finalized_:!1,copy_:void 0,base_:_,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return latest(this[DRAFT_STATE]).size}has(_){const j=this[DRAFT_STATE];return b(j),j.copy_?!!(j.copy_.has(_)||j.drafts_.has(_)&&j.copy_.has(j.drafts_.get(_))):j.base_.has(_)}add(_){const j=this[DRAFT_STATE];return b(j),this.has(_)||(g(j),markChanged(j),j.copy_.add(_)),this}delete(_){if(!this.has(_))return!1;const j=this[DRAFT_STATE];return b(j),g(j),markChanged(j),j.copy_.delete(_)||(j.drafts_.has(_)?j.copy_.delete(j.drafts_.get(_)):!1)}clear(){const _=this[DRAFT_STATE];b(_),latest(_).size&&(g(_),markChanged(_),_.copy_.clear())}values(){const _=this[DRAFT_STATE];return b(_),g(_),_.copy_.values()}entries(){const _=this[DRAFT_STATE];return b(_),g(_),_.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(_,j){const _e=this.values();let et=_e.next();for(;!et.done;)_.call(j,et.value,et.value,this),et=_e.next()}}function d($,_){return new c($,_)}function g($){$.copy_||($.copy_=new Set,$.base_.forEach(_=>{if(isDraftable(_)){const j=createProxy(_,$);$.drafts_.set(_,j),$.copy_.add(j)}else $.copy_.add(_)}))}function b($){$.revoked_&&die(3,JSON.stringify(latest($)))}loadPlugin("MapSet",{proxyMap_:i,proxySet_:d})}var immer$1=new Immer2,produce=immer$1.produce;immer$1.produceWithPatches.bind(immer$1);immer$1.setAutoFreeze.bind(immer$1);immer$1.setUseStrictShallowCopy.bind(immer$1);immer$1.applyPatches.bind(immer$1);immer$1.createDraft.bind(immer$1);immer$1.finishDraft.bind(immer$1);const immerImpl=s=>(i,a,c)=>(c.setState=(d,g,...b)=>{const $=typeof d=="function"?produce(d):d;return i($,g,...b)},s(c.setState,a,c)),immer=immerImpl;let nanoid=(s=21)=>crypto.getRandomValues(new Uint8Array(s)).reduce((i,a)=>(a&=63,a<36?i+=a.toString(36):a<62?i+=(a-26).toString(36).toUpperCase():a>62?i+="-":i+="_",i),"");class ToastTimer{constructor(i,a){zt(this,"timerId");zt(this,"createdAt",0);this.callback=i,this.remaining=a,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 maximumVisible=1;function getDefaultDuration(s){switch(s){case"danger":return 8e3;case"loading":return 0;default:return 3e3}}const useToastStore=create()(immer((s,i)=>({toasts:[],add:(a,c)=>{const d=i().toasts.length+1-maximumVisible;d>0&&s(_e=>{_e.toasts.splice(0,d)});const g=(c==null?void 0:c.id)||nanoid(6),b=(c==null?void 0:c.type)||"positive",$=(c==null?void 0:c.duration)??getDefaultDuration(b),_={timer:$>0?new ToastTimer(()=>i().remove(g),$):null,message:a,...c,id:g,type:b,position:(c==null?void 0:c.position)||"bottom-center",duration:$,disableExitAnimation:c==null?void 0:c.disableExitAnimation,disableEnterAnimation:c==null?void 0:c.disableEnterAnimation},j=i().toasts.findIndex(_e=>_e.id===_.id);j>-1?s(_e=>{_e.toasts[j]=_}):s(_e=>{_e.toasts.push(_)})},remove:a=>{const c=i().toasts.filter(d=>{var g;return a===d.id?((g=d.timer)==null||g.clear(),!1):!0});s(d=>{d.toasts=c})}})));function toastState(){return useToastStore.getState()}function toast(s,i){toastState().add(s,i)}toast.danger=(s,i)=>{toastState().add(s,{...i,type:"danger"})};toast.positive=(s,i)=>{toastState().add(s,{...i,type:"positive"})};toast.loading=(s,i)=>{toastState().add(s,{...i,type:"loading"})};function getAxiosErrorMessage(s,i){var a;if(axios$1.isAxiosError(s)&&s.response){const c=s.response.data;if(i!=null){const d=(a=c.errors)==null?void 0:a[i];return Array.isArray(d)?d[0]:d}return c==null?void 0:c.message}}const defaultErrorMessage=message("There was an issue. Please try again.");function showHttpErrorToast(s,i=defaultErrorMessage,a,c){var d,g;toast.danger(getAxiosErrorMessage(s,a)||i,{action:(g=(d=s.response)==null?void 0:d.data)==null?void 0:g.action,...c})}function useMarkNotificationsAsRead(){const{data:s,mergeBootstrapData:i}=useBootstrapData();return useMutation({mutationFn:a=>UseMarkNotificationsAsRead(a),onSuccess:a=>{queryClient.invalidateQueries({queryKey:useUserNotifications.key}),a.unreadCount===0&&i({user:{...s.user,unread_notifications_count:0}})},onError:a=>showHttpErrorToast(a)})}function UseMarkNotificationsAsRead(s){return apiClient.post("notifications/mark-as-read",s).then(i=>i.data)}/** * @remix-run/router v1.11.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 _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(s){for(var i=1;i"u")throw new Error(i)}function warning(s,i){if(!s){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function createKey(){return Math.random().toString(36).substr(2,8)}function getHistoryState(s,i){return{usr:s.state,key:s.key,idx:i}}function createLocation(s,i,a,c){return a===void 0&&(a=null),_extends$2({pathname:typeof s=="string"?s:s.pathname,search:"",hash:""},typeof i=="string"?parsePath$1(i):i,{state:a,key:i&&i.key||c||createKey()})}function createPath(s){let{pathname:i="/",search:a="",hash:c=""}=s;return a&&a!=="?"&&(i+=a.charAt(0)==="?"?a:"?"+a),c&&c!=="#"&&(i+=c.charAt(0)==="#"?c:"#"+c),i}function parsePath$1(s){let i={};if(s){let a=s.indexOf("#");a>=0&&(i.hash=s.substr(a),s=s.substr(0,a));let c=s.indexOf("?");c>=0&&(i.search=s.substr(c),s=s.substr(0,c)),s&&(i.pathname=s)}return i}function getUrlBasedHistory(s,i,a,c){c===void 0&&(c={});let{window:d=document.defaultView,v5Compat:g=!1}=c,b=d.history,$=Action.Pop,_=null,j=_e();j==null&&(j=0,b.replaceState(_extends$2({},b.state,{idx:j}),""));function _e(){return(b.state||{idx:null}).idx}function et(){$=Action.Pop;let lt=_e(),ot=lt==null?null:lt-j;j=lt,_&&_({action:$,location:at.location,delta:ot})}function tt(lt,ot){$=Action.Push;let st=createLocation(at.location,lt,ot);a&&a(st,lt),j=_e()+1;let it=getHistoryState(st,j),ut=at.createHref(st);try{b.pushState(it,"",ut)}catch(ct){if(ct instanceof DOMException&&ct.name==="DataCloneError")throw ct;d.location.assign(ut)}g&&_&&_({action:$,location:at.location,delta:1})}function nt(lt,ot){$=Action.Replace;let st=createLocation(at.location,lt,ot);a&&a(st,lt),j=_e();let it=getHistoryState(st,j),ut=at.createHref(st);b.replaceState(it,"",ut),g&&_&&_({action:$,location:at.location,delta:0})}function rt(lt){let ot=d.location.origin!=="null"?d.location.origin:d.location.href,st=typeof lt=="string"?lt:createPath(lt);return invariant(ot,"No window.location.(origin|href) available to create URL for href: "+st),new URL(st,ot)}let at={get action(){return $},get location(){return s(d,b)},listen(lt){if(_)throw new Error("A history only accepts one active listener");return d.addEventListener(PopStateEventType,et),_=lt,()=>{d.removeEventListener(PopStateEventType,et),_=null}},createHref(lt){return i(d,lt)},createURL:rt,encodeLocation(lt){let ot=rt(lt);return{pathname:ot.pathname,search:ot.search,hash:ot.hash}},push:tt,replace:nt,go(lt){return b.go(lt)}};return at}var ResultType;(function(s){s.data="data",s.deferred="deferred",s.redirect="redirect",s.error="error"})(ResultType||(ResultType={}));function matchRoutes(s,i,a){a===void 0&&(a="/");let c=typeof i=="string"?parsePath$1(i):i,d=stripBasename(c.pathname||"/",a);if(d==null)return null;let g=flattenRoutes(s);rankRouteBranches(g);let b=null;for(let $=0;b==null&&${let _={relativePath:$===void 0?g.path||"":$,caseSensitive:g.caseSensitive===!0,childrenIndex:b,route:g};_.relativePath.startsWith("/")&&(invariant(_.relativePath.startsWith(c),'Absolute route path "'+_.relativePath+'" nested under path '+('"'+c+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),_.relativePath=_.relativePath.slice(c.length));let j=joinPaths([c,_.relativePath]),_e=a.concat(_);g.children&&g.children.length>0&&(invariant(g.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+j+'".')),flattenRoutes(g.children,i,_e,j)),!(g.path==null&&!g.index)&&i.push({path:j,score:computeScore(j,g.index),routesMeta:_e})};return s.forEach((g,b)=>{var $;if(g.path===""||!(($=g.path)!=null&&$.includes("?")))d(g,b);else for(let _ of explodeOptionalSegments(g.path))d(g,b,_)}),i}function explodeOptionalSegments(s){let i=s.split("/");if(i.length===0)return[];let[a,...c]=i,d=a.endsWith("?"),g=a.replace(/\?$/,"");if(c.length===0)return d?[g,""]:[g];let b=explodeOptionalSegments(c.join("/")),$=[];return $.push(...b.map(_=>_===""?g:[g,_].join("/"))),d&&$.push(...b),$.map(_=>s.startsWith("/")&&_===""?"/":_)}function rankRouteBranches(s){s.sort((i,a)=>i.score!==a.score?a.score-i.score:compareIndexes(i.routesMeta.map(c=>c.childrenIndex),a.routesMeta.map(c=>c.childrenIndex)))}const paramRe=/^:\w+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=s=>s==="*";function computeScore(s,i){let a=s.split("/"),c=a.length;return a.some(isSplat)&&(c+=splatPenalty),i&&(c+=indexRouteValue),a.filter(d=>!isSplat(d)).reduce((d,g)=>d+(paramRe.test(g)?dynamicSegmentValue:g===""?emptySegmentValue:staticSegmentValue),c)}function compareIndexes(s,i){return s.length===i.length&&s.slice(0,-1).every((c,d)=>c===i[d])?s[s.length-1]-i[i.length-1]:0}function matchRouteBranch(s,i){let{routesMeta:a}=s,c={},d="/",g=[];for(let b=0;b{let{paramName:tt,isOptional:nt}=_e;if(tt==="*"){let at=$[et]||"";b=g.slice(0,g.length-at.length).replace(/(.)\/+$/,"$1")}const rt=$[et];return nt&&!rt?j[tt]=void 0:j[tt]=safelyDecodeURIComponent(rt||"",tt),j},{}),pathname:g,pathnameBase:b,pattern:s}}function compilePath(s,i,a){i===void 0&&(i=!1),a===void 0&&(a=!0),warning(s==="*"||!s.endsWith("*")||s.endsWith("/*"),'Route path "'+s+'" will be treated as if it were '+('"'+s.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+s.replace(/\*$/,"/*")+'".'));let c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(b,$,_)=>(c.push({paramName:$,isOptional:_!=null}),_?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),c]}function safelyDecodeURI(s){try{return decodeURI(s)}catch(i){return warning(!1,'The URL path "'+s+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+i+").")),s}}function safelyDecodeURIComponent(s,i){try{return decodeURIComponent(s)}catch(a){return warning(!1,'The value for the URL param "'+i+'" will not be decoded because'+(' the string "'+s+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+a+").")),s}}function stripBasename(s,i){if(i==="/")return s;if(!s.toLowerCase().startsWith(i.toLowerCase()))return null;let a=i.endsWith("/")?i.length-1:i.length,c=s.charAt(a);return c&&c!=="/"?null:s.slice(a)||"/"}function resolvePath(s,i){i===void 0&&(i="/");let{pathname:a,search:c="",hash:d=""}=typeof s=="string"?parsePath$1(s):s;return{pathname:a?a.startsWith("/")?a:resolvePathname(a,i):i,search:normalizeSearch(c),hash:normalizeHash(d)}}function resolvePathname(s,i){let a=i.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?a.length>1&&a.pop():d!=="."&&a.push(d)}),a.length>1?a.join("/"):"/"}function getInvalidPathError(s,i,a,c){return"Cannot include a '"+s+"' character in a manually specified "+("`to."+i+"` field ["+JSON.stringify(c)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function getPathContributingMatches(s){return s.filter((i,a)=>a===0||i.route.path&&i.route.path.length>0)}function resolveTo(s,i,a,c){c===void 0&&(c=!1);let d;typeof s=="string"?d=parsePath$1(s):(d=_extends$2({},s),invariant(!d.pathname||!d.pathname.includes("?"),getInvalidPathError("?","pathname","search",d)),invariant(!d.pathname||!d.pathname.includes("#"),getInvalidPathError("#","pathname","hash",d)),invariant(!d.search||!d.search.includes("#"),getInvalidPathError("#","search","hash",d)));let g=s===""||d.pathname==="",b=g?"/":d.pathname,$;if(c||b==null)$=a;else{let et=i.length-1;if(b.startsWith("..")){let tt=b.split("/");for(;tt[0]==="..";)tt.shift(),et-=1;d.pathname=tt.join("/")}$=et>=0?i[et]:"/"}let _=resolvePath(d,$),j=b&&b!=="/"&&b.endsWith("/"),_e=(g||b===".")&&a.endsWith("/");return!_.pathname.endsWith("/")&&(j||_e)&&(_.pathname+="/"),_}const joinPaths=s=>s.join("/").replace(/\/\/+/g,"/"),normalizePathname=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,normalizeHash=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function isRouteErrorResponse(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}const validMutationMethodsArr=["post","put","patch","delete"];new Set(validMutationMethodsArr);const validRequestMethodsArr=["get",...validMutationMethodsArr];new Set(validRequestMethodsArr);/** * React Router v6.18.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 _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(s){for(var i=1;i_.pathnameBase)),b=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{b.current=!0}),reactExports.useCallback(function(_,j){if(j===void 0&&(j={}),!b.current)return;if(typeof _=="number"){a.go(_);return}let _e=resolveTo(_,JSON.parse(g),d,j.relative==="path");s==null&&i!=="/"&&(_e.pathname=_e.pathname==="/"?i:joinPaths([i,_e.pathname])),(j.replace?a.replace:a.push)(_e,j.state,j)},[i,a,g,d,s])}const OutletContext=reactExports.createContext(null);function useOutlet(s){let i=reactExports.useContext(RouteContext).outlet;return i&&reactExports.createElement(OutletContext.Provider,{value:s},i)}function useParams(){let{matches:s}=reactExports.useContext(RouteContext),i=s[s.length-1];return i?i.params:{}}function useResolvedPath(s,i){let{relative:a}=i===void 0?{}:i,{matches:c}=reactExports.useContext(RouteContext),{pathname:d}=useLocation(),g=JSON.stringify(getPathContributingMatches(c).map(b=>b.pathnameBase));return reactExports.useMemo(()=>resolveTo(s,JSON.parse(g),d,a==="path"),[s,g,d,a])}function useRoutes(s,i){return useRoutesImpl(s,i)}function useRoutesImpl(s,i,a){useInRouterContext()||invariant(!1);let{navigator:c}=reactExports.useContext(NavigationContext),{matches:d}=reactExports.useContext(RouteContext),g=d[d.length-1],b=g?g.params:{};g&&g.pathname;let $=g?g.pathnameBase:"/";g&&g.route;let _=useLocation(),j;if(i){var _e;let at=typeof i=="string"?parsePath$1(i):i;$==="/"||(_e=at.pathname)!=null&&_e.startsWith($)||invariant(!1),j=at}else j=_;let et=j.pathname||"/",tt=$==="/"?et:et.slice($.length)||"/",nt=matchRoutes(s,{pathname:tt}),rt=_renderMatches(nt&&nt.map(at=>Object.assign({},at,{params:Object.assign({},b,at.params),pathname:joinPaths([$,c.encodeLocation?c.encodeLocation(at.pathname).pathname:at.pathname]),pathnameBase:at.pathnameBase==="/"?$:joinPaths([$,c.encodeLocation?c.encodeLocation(at.pathnameBase).pathname:at.pathnameBase])})),d,a);return i&&rt?reactExports.createElement(LocationContext.Provider,{value:{location:_extends$1({pathname:"/",search:"",hash:"",state:null,key:"default"},j),navigationType:Action.Pop}},rt):rt}function DefaultErrorComponent(){let s=useRouteError(),i=isRouteErrorResponse(s)?s.status+" "+s.statusText:s instanceof Error?s.message:JSON.stringify(s),a=s instanceof Error?s.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},g=null;return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},i),a?reactExports.createElement("pre",{style:d},a):null,g)}const defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null);class RenderErrorBoundary extends reactExports.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,a){return a.location!==i.location||a.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error||a.error,location:a.location,revalidation:i.revalidation||a.revalidation}}componentDidCatch(i,a){console.error("React Router caught the following error during render",i,a)}render(){return this.state.error?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RenderedRoute(s){let{routeContext:i,match:a,children:c}=s,d=reactExports.useContext(DataRouterContext);return d&&d.static&&d.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=a.route.id),reactExports.createElement(RouteContext.Provider,{value:i},c)}function _renderMatches(s,i,a){var c;if(i===void 0&&(i=[]),a===void 0&&(a=null),s==null){var d;if((d=a)!=null&&d.errors)s=a.matches;else return null}let g=s,b=(c=a)==null?void 0:c.errors;if(b!=null){let $=g.findIndex(_=>_.route.id&&(b==null?void 0:b[_.route.id]));$>=0||invariant(!1),g=g.slice(0,Math.min(g.length,$+1))}return g.reduceRight(($,_,j)=>{let _e=_.route.id?b==null?void 0:b[_.route.id]:null,et=null;a&&(et=_.route.errorElement||defaultErrorElement);let tt=i.concat(g.slice(0,j+1)),nt=()=>{let rt;return _e?rt=et:_.route.Component?rt=reactExports.createElement(_.route.Component,null):_.route.element?rt=_.route.element:rt=$,reactExports.createElement(RenderedRoute,{match:_,routeContext:{outlet:$,matches:tt,isDataRoute:a!=null},children:rt})};return a&&(_.route.ErrorBoundary||_.route.errorElement||j===0)?reactExports.createElement(RenderErrorBoundary,{location:a.location,revalidation:a.revalidation,component:et,error:_e,children:nt(),routeContext:{outlet:null,matches:tt,isDataRoute:!0}}):nt()},null)}var DataRouterHook$1=function(s){return s.UseBlocker="useBlocker",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s}(DataRouterHook$1||{}),DataRouterStateHook$1=function(s){return s.UseBlocker="useBlocker",s.UseLoaderData="useLoaderData",s.UseActionData="useActionData",s.UseRouteError="useRouteError",s.UseNavigation="useNavigation",s.UseRouteLoaderData="useRouteLoaderData",s.UseMatches="useMatches",s.UseRevalidator="useRevalidator",s.UseNavigateStable="useNavigate",s.UseRouteId="useRouteId",s}(DataRouterStateHook$1||{});function useDataRouterContext$1(s){let i=reactExports.useContext(DataRouterContext);return i||invariant(!1),i}function useDataRouterState(s){let i=reactExports.useContext(DataRouterStateContext);return i||invariant(!1),i}function useRouteContext(s){let i=reactExports.useContext(RouteContext);return i||invariant(!1),i}function useCurrentRouteId(s){let i=useRouteContext(),a=i.matches[i.matches.length-1];return a.route.id||invariant(!1),a.route.id}function useRouteError(){var s;let i=reactExports.useContext(RouteErrorContext),a=useDataRouterState(DataRouterStateHook$1.UseRouteError),c=useCurrentRouteId(DataRouterStateHook$1.UseRouteError);return i||((s=a.errors)==null?void 0:s[c])}function useNavigateStable(){let{router:s}=useDataRouterContext$1(DataRouterHook$1.UseNavigateStable),i=useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable),a=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{a.current=!0}),reactExports.useCallback(function(d,g){g===void 0&&(g={}),a.current&&(typeof d=="number"?s.navigate(d):s.navigate(d,_extends$1({fromRouteId:i},g)))},[s,i])}function Navigate(s){let{to:i,replace:a,state:c,relative:d}=s;useInRouterContext()||invariant(!1);let{matches:g}=reactExports.useContext(RouteContext),{pathname:b}=useLocation(),$=useNavigate$1(),_=resolveTo(i,getPathContributingMatches(g).map(_e=>_e.pathnameBase),b,d==="path"),j=JSON.stringify(_);return reactExports.useEffect(()=>$(JSON.parse(j),{replace:a,state:c,relative:d}),[$,j,d,a,c]),null}function Outlet(s){return useOutlet(s.context)}function Route(s){invariant(!1)}function Router(s){let{basename:i="/",children:a=null,location:c,navigationType:d=Action.Pop,navigator:g,static:b=!1}=s;useInRouterContext()&&invariant(!1);let $=i.replace(/^\/*/,"/"),_=reactExports.useMemo(()=>({basename:$,navigator:g,static:b}),[$,g,b]);typeof c=="string"&&(c=parsePath$1(c));let{pathname:j="/",search:_e="",hash:et="",state:tt=null,key:nt="default"}=c,rt=reactExports.useMemo(()=>{let at=stripBasename(j,$);return at==null?null:{location:{pathname:at,search:_e,hash:et,state:tt,key:nt},navigationType:d}},[$,j,_e,et,tt,nt,d]);return rt==null?null:reactExports.createElement(NavigationContext.Provider,{value:_},reactExports.createElement(LocationContext.Provider,{children:a,value:rt}))}function Routes(s){let{children:i,location:a}=s;return useRoutes(createRoutesFromChildren(i),a)}new Promise(()=>{});function createRoutesFromChildren(s,i){i===void 0&&(i=[]);let a=[];return reactExports.Children.forEach(s,(c,d)=>{if(!reactExports.isValidElement(c))return;let g=[...i,d];if(c.type===reactExports.Fragment){a.push.apply(a,createRoutesFromChildren(c.props.children,g));return}c.type!==Route&&invariant(!1),!c.props.index||!c.props.children||invariant(!1);let b={id:c.props.id||g.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,loader:c.props.loader,action:c.props.action,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(b.children=createRoutesFromChildren(c.props.children,g)),a.push(b)}),a}/** * React Router DOM v6.18.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 _extends(){return _extends=Object.assign?Object.assign.bind():function(s){for(var i=1;i=0)&&(a[d]=s[d]);return a}function isModifiedEvent(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function shouldProcessLinkClick(s,i){return s.button===0&&(!i||i==="_self")&&!isModifiedEvent(s)}function createSearchParams(s){return s===void 0&&(s=""),new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((i,a)=>{let c=s[a];return i.concat(Array.isArray(c)?c.map(d=>[a,d]):[[a,c]])},[]))}function getSearchParamsForLocation(s,i){let a=createSearchParams(s);return i&&i.forEach((c,d)=>{a.has(d)||i.getAll(d).forEach(g=>{a.append(d,g)})}),a}const _excluded=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],_excluded2=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],ViewTransitionContext=reactExports.createContext({isTransitioning:!1}),START_TRANSITION="startTransition",startTransitionImpl=React$1[START_TRANSITION];function BrowserRouter(s){let{basename:i,children:a,future:c,window:d}=s,g=reactExports.useRef();g.current==null&&(g.current=createBrowserHistory({window:d,v5Compat:!0}));let b=g.current,[$,_]=reactExports.useState({action:b.action,location:b.location}),{v7_startTransition:j}=c||{},_e=reactExports.useCallback(et=>{j&&startTransitionImpl?startTransitionImpl(()=>_(et)):_(et)},[_,j]);return reactExports.useLayoutEffect(()=>b.listen(_e),[b,_e]),reactExports.createElement(Router,{basename:i,children:a,location:$.location,navigationType:$.action,navigator:b})}const isBrowser=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ABSOLUTE_URL_REGEX=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Link=reactExports.forwardRef(function(i,a){let{onClick:c,relative:d,reloadDocument:g,replace:b,state:$,target:_,to:j,preventScrollReset:_e,unstable_viewTransition:et}=i,tt=_objectWithoutPropertiesLoose(i,_excluded),{basename:nt}=reactExports.useContext(NavigationContext),rt,at=!1;if(typeof j=="string"&&ABSOLUTE_URL_REGEX.test(j)&&(rt=j,isBrowser))try{let it=new URL(window.location.href),ut=j.startsWith("//")?new URL(it.protocol+j):new URL(j),ct=stripBasename(ut.pathname,nt);ut.origin===it.origin&&ct!=null?j=ct+ut.search+ut.hash:at=!0}catch{}let lt=useHref(j,{relative:d}),ot=useLinkClickHandler(j,{replace:b,state:$,target:_,preventScrollReset:_e,relative:d,unstable_viewTransition:et});function st(it){c&&c(it),it.defaultPrevented||ot(it)}return reactExports.createElement("a",_extends({},tt,{href:rt||lt,onClick:at||g?c:st,ref:a,target:_}))}),NavLink=reactExports.forwardRef(function(i,a){let{"aria-current":c="page",caseSensitive:d=!1,className:g="",end:b=!1,style:$,to:_,unstable_viewTransition:j,children:_e}=i,et=_objectWithoutPropertiesLoose(i,_excluded2),tt=useResolvedPath(_,{relative:et.relative}),nt=useLocation(),rt=reactExports.useContext(DataRouterStateContext),{navigator:at}=reactExports.useContext(NavigationContext),lt=rt!=null&&useViewTransitionState(tt)&&j===!0,ot=at.encodeLocation?at.encodeLocation(tt).pathname:tt.pathname,st=nt.pathname,it=rt&&rt.navigation&&rt.navigation.location?rt.navigation.location.pathname:null;d||(st=st.toLowerCase(),it=it?it.toLowerCase():null,ot=ot.toLowerCase());let ut=st===ot||!b&&st.startsWith(ot)&&st.charAt(ot.length)==="/",ct=it!=null&&(it===ot||!b&&it.startsWith(ot)&&it.charAt(ot.length)==="/"),pt={isActive:ut,isPending:ct,isTransitioning:lt},mt=ut?c:void 0,xt;typeof g=="function"?xt=g(pt):xt=[g,ut?"active":null,ct?"pending":null,lt?"transitioning":null].filter(Boolean).join(" ");let St=typeof $=="function"?$(pt):$;return reactExports.createElement(Link,_extends({},et,{"aria-current":mt,className:xt,ref:a,style:St,to:_,unstable_viewTransition:j}),typeof _e=="function"?_e(pt):_e)});var DataRouterHook;(function(s){s.UseScrollRestoration="useScrollRestoration",s.UseSubmit="useSubmit",s.UseSubmitFetcher="useSubmitFetcher",s.UseFetcher="useFetcher",s.useViewTransitionState="useViewTransitionState"})(DataRouterHook||(DataRouterHook={}));var DataRouterStateHook;(function(s){s.UseFetcher="useFetcher",s.UseFetchers="useFetchers",s.UseScrollRestoration="useScrollRestoration"})(DataRouterStateHook||(DataRouterStateHook={}));function useDataRouterContext(s){let i=reactExports.useContext(DataRouterContext);return i||invariant(!1),i}function useLinkClickHandler(s,i){let{target:a,replace:c,state:d,preventScrollReset:g,relative:b,unstable_viewTransition:$}=i===void 0?{}:i,_=useNavigate$1(),j=useLocation(),_e=useResolvedPath(s,{relative:b});return reactExports.useCallback(et=>{if(shouldProcessLinkClick(et,a)){et.preventDefault();let tt=c!==void 0?c:createPath(j)===createPath(_e);_(s,{replace:tt,state:d,preventScrollReset:g,relative:b,unstable_viewTransition:$})}},[j,_,_e,c,d,a,s,g,b,$])}function useSearchParams(s){let i=reactExports.useRef(createSearchParams(s)),a=reactExports.useRef(!1),c=useLocation(),d=reactExports.useMemo(()=>getSearchParamsForLocation(c.search,a.current?null:i.current),[c.search]),g=useNavigate$1(),b=reactExports.useCallback(($,_)=>{const j=createSearchParams(typeof $=="function"?$(d):$);a.current=!0,g("?"+j,_)},[g,d]);return[d,b]}function useViewTransitionState(s,i){i===void 0&&(i={});let a=reactExports.useContext(ViewTransitionContext);a==null&&invariant(!1);let{basename:c}=useDataRouterContext(DataRouterHook.useViewTransitionState),d=useResolvedPath(s,{relative:i.relative});if(!a.isTransitioning)return!1;let g=stripBasename(a.currentLocation.pathname,c)||a.currentLocation.pathname,b=stripBasename(a.nextLocation.pathname,c)||a.nextLocation.pathname;return matchPath(d.pathname,b)!=null||matchPath(d.pathname,g)!=null}function useNavigate(){const s=useNavigate$1(),i=useLocation();return reactExports.useCallback((a,c)=>{const d=createPath(i)===createPath(resolvePath(a,i.pathname));s(a,{...c,replace:(c==null?void 0:c.replace)!==!1&&d})},[s,i])}function useSettings(){const{data:{settings:s}}=useBootstrapData();return s}const iconMap={"group-add":GroupAddIcon,people:PeopleIcon,"export-csv":FileDownloadDoneIcon};function NotificationList({notifications:s,className:i}){const{notifications:a}=reactExports.useContext(SiteConfigContext);return jsxRuntimeExports.jsx("div",{className:i,children:s.map((c,d)=>{var $;const g=s.length-1===d,b=(($=a==null?void 0:a.renderMap)==null?void 0:$[c.type])||NotificationListItem;return jsxRuntimeExports.jsx(b,{notification:c,isLast:g},c.id)})})}function NotificationListItem({notification:s,onActionButtonClick:i,lineIconRenderer:a,isLast:c}){const d=useMarkNotificationsAsRead(),g=useNavigate(),b=s.data.mainAction,$=!s.data.image&&!s.read_at;return jsxRuntimeExports.jsxs("div",{onClick:()=>{var _;!d.isPending&&!s.read_at&&d.mutate({ids:[s.id]}),b!=null&&b.action&&(isAbsoluteUrl(b.action)?(_=window.open(b.action,"_blank"))==null||_.focus():g(b.action))},className:clsx$1("flex items-start gap-14 px-32 py-20 bg-alt relative",!c&&"border-b",(b==null?void 0:b.action)&&"cursor-pointer",s.read_at?"hover:bg-hover":"bg-paper hover:bg-primary/10"),title:b!=null&&b.label?b.label:void 0,children:[$&&jsxRuntimeExports.jsx("div",{className:"absolute left-16 top-26 w-8 h-8 shadow rounded-full bg-primary flex-shrink-0"}),s.data.image&&jsxRuntimeExports.jsx(MixedImage,{className:"w-24 h-24 flex-shrink-0 text-muted",src:iconMap[s.data.image]||s.data.image}),jsxRuntimeExports.jsxs("div",{className:"min-w-0",children:[s.data.lines.map((_,j)=>jsxRuntimeExports.jsx(Line,{iconRenderer:a,notification:s,line:_,index:j},j)),jsxRuntimeExports.jsx(ButtonActions,{onActionClick:i,notification:s})]})]})}function ButtonActions({notification:s,onActionClick:i}){const{base_url:a}=useSettings();return s.data.buttonActions?jsxRuntimeExports.jsx("div",{className:"mt-12 flex items-center gap-12",children:s.data.buttonActions.map((c,d)=>jsxRuntimeExports.jsx(Button,{size:"xs",variant:d===0?"flat":"outline",color:d===0?"primary":null,elementType:i?void 0:Link,to:i?void 0:c.action.replace(a,""),onClick:g=>{i==null||i(g,c)},children:c.label},d))}):null}const DefaultFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 23.65625 4 C 22.320313 4 21.066406 4.519531 20.121094 5.464844 L 11.464844 14.121094 C 10.519531 15.066406 10 16.320313 10 17.65625 L 10 57 C 10 58.652344 11.347656 60 13 60 L 53 60 C 54.652344 60 56 58.652344 56 57 L 56 7 C 56 5.347656 54.652344 4 53 4 Z M 24 6 L 53 6 C 53.550781 6 54 6.449219 54 7 L 54 57 C 54 57.550781 53.550781 58 53 58 L 13 58 C 12.449219 58 12 57.550781 12 57 L 12 18 L 21 18 C 22.652344 18 24 16.652344 24 15 Z M 22 6.5 L 22 15 C 22 15.550781 21.550781 16 21 16 L 12.5 16 C 12.605469 15.835938 12.734375 15.679688 12.878906 15.535156 L 21.535156 6.878906 C 21.679688 6.738281 21.835938 6.613281 22 6.5 Z M 21 22 C 20.449219 22 20 22.449219 20 23 C 20 23.550781 20.449219 24 21 24 L 37 24 C 37.550781 24 38 23.550781 38 23 C 38 22.449219 37.550781 22 37 22 Z M 41 22 C 40.449219 22 40 22.449219 40 23 C 40 23.550781 40.449219 24 41 24 L 45 24 C 45.550781 24 46 23.550781 46 23 C 46 22.449219 45.550781 22 45 22 Z M 21 26 C 20.449219 26 20 26.449219 20 27 C 20 27.550781 20.449219 28 21 28 L 41 28 C 41.550781 28 42 27.550781 42 27 C 42 26.449219 41.550781 26 41 26 Z M 21 32 C 20.449219 32 20 32.449219 20 33 C 20 33.550781 20.449219 34 21 34 L 43 34 C 43.550781 34 44 33.550781 44 33 C 44 32.449219 43.550781 32 43 32 Z M 21 36 C 20.449219 36 20 36.449219 20 37 C 20 37.550781 20.449219 38 21 38 L 33 38 C 33.550781 38 34 37.550781 34 37 C 34 36.449219 33.550781 36 33 36 Z M 15 50 C 14.449219 50 14 50.449219 14 51 L 14 53 C 14 53.550781 14.449219 54 15 54 C 15.550781 54 16 53.550781 16 53 L 16 51 C 16 50.449219 15.550781 50 15 50 Z M 20 50 C 19.449219 50 19 50.449219 19 51 L 19 53 C 19 53.550781 19.449219 54 20 54 C 20.550781 54 21 53.550781 21 53 L 21 51 C 21 50.449219 20.550781 50 20 50 Z M 25 50 C 24.449219 50 24 50.449219 24 51 L 24 53 C 24 53.550781 24.449219 54 25 54 C 25.550781 54 26 53.550781 26 53 L 26 51 C 26 50.449219 25.550781 50 25 50 Z M 30 50 C 29.449219 50 29 50.449219 29 51 L 29 53 C 29 53.550781 29.449219 54 30 54 C 30.550781 54 31 53.550781 31 53 L 31 51 C 31 50.449219 30.550781 50 30 50 Z M 35 50 C 34.449219 50 34 50.449219 34 51 L 34 53 C 34 53.550781 34.449219 54 35 54 C 35.550781 54 36 53.550781 36 53 L 36 51 C 36 50.449219 35.550781 50 35 50 Z M 40 50 C 39.449219 50 39 50.449219 39 51 L 39 53 C 39 53.550781 39.449219 54 40 54 C 40.550781 54 41 53.550781 41 53 L 41 51 C 41 50.449219 40.550781 50 40 50 Z M 45 50 C 44.449219 50 44 50.449219 44 51 L 44 53 C 44 53.550781 44.449219 54 45 54 C 45.550781 54 46 53.550781 46 53 L 46 51 C 46 50.449219 45.550781 50 45 50 Z M 50 50 C 49.449219 50 49 50.449219 49 51 L 49 53 C 49 53.550781 49.449219 54 50 54 C 50.550781 54 51 53.550781 51 53 L 51 51 C 51 50.449219 50.550781 50 50 50 Z "})})),AudioFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 21.65625 4 C 20.320313 4 19.0625 4.519531 18.121094 5.464844 L 9.464844 14.121094 C 8.519531 15.066406 8 16.320313 8 17.65625 L 8 57 C 8 58.652344 9.347656 60 11 60 L 51 60 C 52.652344 60 54 58.652344 54 57 L 54 7 C 54 5.347656 52.652344 4 51 4 Z M 22 6 L 51 6 C 51.550781 6 52 6.449219 52 7 L 52 57 C 52 57.550781 51.550781 58 51 58 L 11 58 C 10.449219 58 10 57.550781 10 57 L 10 18 L 19 18 C 20.652344 18 22 16.652344 22 15 Z M 20 6.5 L 20 15 C 20 15.550781 19.550781 16 19 16 L 10.5 16 C 10.609375 15.835938 10.734375 15.679688 10.878906 15.535156 L 19.535156 6.878906 C 19.679688 6.734375 19.835938 6.609375 20 6.5 Z M 42.78125 18.023438 L 24.78125 22.023438 C 24.328125 22.125 24 22.53125 24 23 L 24 37 C 20.691406 37 18 39.242188 18 42 C 18 44.757813 20.691406 47 24 47 C 27.308594 47 30 44.757813 30 42 L 30 29.910156 L 38 28.136719 L 38 33 C 34.691406 33 32 35.242188 32 38 C 32 40.757813 34.691406 43 38 43 C 41.308594 43 44 40.757813 44 38 L 44 19 C 44 18.695313 43.863281 18.410156 43.625 18.21875 C 43.390625 18.03125 43.082031 17.960938 42.78125 18.023438 Z M 42 20.246094 L 42 38 C 42 39.652344 40.207031 41 38 41 C 35.792969 41 34 39.652344 34 38 C 34 36.347656 35.792969 35 38 35 C 38.28125 35 38.5625 35.023438 38.839844 35.066406 C 39.128906 35.117188 39.421875 35.03125 39.648438 34.84375 C 39.871094 34.652344 40 34.375 40 34.078125 L 40 26.890625 C 40 26.585938 39.863281 26.300781 39.625 26.109375 C 39.390625 25.921875 39.078125 25.847656 38.78125 25.910156 L 28.78125 28.136719 C 28.328125 28.238281 28 28.644531 28 29.109375 L 28 42 C 28 43.652344 26.207031 45 24 45 C 21.792969 45 20 43.652344 20 42 C 20 40.347656 21.792969 39 24 39 C 24.28125 39 24.5625 39.023438 24.839844 39.066406 C 25.128906 39.117188 25.425781 39.03125 25.648438 38.84375 C 25.871094 38.652344 26 38.375 26 38.078125 L 26 23.800781 Z M 13 52 C 12.449219 52 12 52.445313 12 53 L 12 55 C 12 55.554688 12.449219 56 13 56 C 13.550781 56 14 55.554688 14 55 L 14 53 C 14 52.445313 13.550781 52 13 52 Z M 18 52 C 17.449219 52 17 52.445313 17 53 L 17 55 C 17 55.554688 17.449219 56 18 56 C 18.550781 56 19 55.554688 19 55 L 19 53 C 19 52.445313 18.550781 52 18 52 Z M 23 52 C 22.449219 52 22 52.445313 22 53 L 22 55 C 22 55.554688 22.449219 56 23 56 C 23.550781 56 24 55.554688 24 55 L 24 53 C 24 52.445313 23.550781 52 23 52 Z M 28 52 C 27.449219 52 27 52.445313 27 53 L 27 55 C 27 55.554688 27.449219 56 28 56 C 28.550781 56 29 55.554688 29 55 L 29 53 C 29 52.445313 28.550781 52 28 52 Z M 33 52 C 32.449219 52 32 52.445313 32 53 L 32 55 C 32 55.554688 32.449219 56 33 56 C 33.550781 56 34 55.554688 34 55 L 34 53 C 34 52.445313 33.550781 52 33 52 Z M 38 52 C 37.449219 52 37 52.445313 37 53 L 37 55 C 37 55.554688 37.449219 56 38 56 C 38.550781 56 39 55.554688 39 55 L 39 53 C 39 52.445313 38.550781 52 38 52 Z M 43 52 C 42.449219 52 42 52.445313 42 53 L 42 55 C 42 55.554688 42.449219 56 43 56 C 43.550781 56 44 55.554688 44 55 L 44 53 C 44 52.445313 43.550781 52 43 52 Z M 48 52 C 47.449219 52 47 52.445313 47 53 L 47 55 C 47 55.554688 47.449219 56 48 56 C 48.550781 56 49 55.554688 49 55 L 49 53 C 49 52.445313 48.550781 52 48 52 Z "})})),VideoFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 23.65625 4 C 22.320313 4 21.0625 4.519531 20.121094 5.464844 L 11.464844 14.121094 C 10.519531 15.066406 10 16.320313 10 17.65625 L 10 57 C 10 58.652344 11.347656 60 13 60 L 53 60 C 54.652344 60 56 58.652344 56 57 L 56 7 C 56 5.347656 54.652344 4 53 4 Z M 24 6 L 53 6 C 53.550781 6 54 6.449219 54 7 L 54 57 C 54 57.550781 53.550781 58 53 58 L 13 58 C 12.449219 58 12 57.550781 12 57 L 12 18 L 21 18 C 22.652344 18 24 16.652344 24 15 Z M 22 6.5 L 22 15 C 22 15.550781 21.550781 16 21 16 L 12.5 16 C 12.613281 15.835938 12.738281 15.675781 12.878906 15.535156 L 21.535156 6.878906 C 21.679688 6.734375 21.835938 6.609375 22 6.5 Z M 28.023438 21.816406 C 27.671875 21.808594 27.316406 21.890625 26.996094 22.0625 C 26.355469 22.417969 25.964844 23.085938 25.964844 23.816406 L 25.964844 42.183594 C 25.964844 42.910156 26.355469 43.582031 26.996094 43.933594 C 27.296875 44.097656 27.632813 44.183594 27.964844 44.183594 C 28.335938 44.183594 28.707031 44.078125 29.03125 43.871094 L 43.53125 34.6875 C 44.113281 34.320313 44.464844 33.6875 44.464844 33 C 44.464844 32.308594 44.113281 31.679688 43.53125 31.3125 L 29.03125 22.125 C 28.722656 21.933594 28.375 21.828125 28.023438 21.816406 Z M 27.964844 23.816406 L 42.464844 33 L 27.964844 42.1875 Z M 15 52 C 14.449219 52 14 52.449219 14 53 L 14 55 C 14 55.550781 14.449219 56 15 56 C 15.550781 56 16 55.550781 16 55 L 16 53 C 16 52.449219 15.550781 52 15 52 Z M 20 52 C 19.449219 52 19 52.449219 19 53 L 19 55 C 19 55.550781 19.449219 56 20 56 C 20.550781 56 21 55.550781 21 55 L 21 53 C 21 52.449219 20.550781 52 20 52 Z M 25 52 C 24.449219 52 24 52.449219 24 53 L 24 55 C 24 55.550781 24.449219 56 25 56 C 25.550781 56 26 55.550781 26 55 L 26 53 C 26 52.449219 25.550781 52 25 52 Z M 30 52 C 29.449219 52 29 52.449219 29 53 L 29 55 C 29 55.550781 29.449219 56 30 56 C 30.550781 56 31 55.550781 31 55 L 31 53 C 31 52.449219 30.550781 52 30 52 Z M 35 52 C 34.449219 52 34 52.449219 34 53 L 34 55 C 34 55.550781 34.449219 56 35 56 C 35.550781 56 36 55.550781 36 55 L 36 53 C 36 52.449219 35.550781 52 35 52 Z M 40 52 C 39.449219 52 39 52.449219 39 53 L 39 55 C 39 55.550781 39.449219 56 40 56 C 40.550781 56 41 55.550781 41 55 L 41 53 C 41 52.449219 40.550781 52 40 52 Z M 45 52 C 44.449219 52 44 52.449219 44 53 L 44 55 C 44 55.550781 44.449219 56 45 56 C 45.550781 56 46 55.550781 46 55 L 46 53 C 46 52.449219 45.550781 52 45 52 Z M 50 52 C 49.449219 52 49 52.449219 49 53 L 49 55 C 49 55.550781 49.449219 56 50 56 C 50.550781 56 51 55.550781 51 55 L 51 53 C 51 52.449219 50.550781 52 50 52 Z "})})),TextFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 17.660156 4 C 16.320313 4 15.058594 4.519531 14.121094 5.460938 L 5.460938 14.121094 C 4.519531 15.070313 4 16.320313 4 17.660156 L 4 57 C 4 58.648438 5.351563 60 7 60 L 47 60 C 48.648438 60 50 58.648438 50 57 L 50 46 L 58 46 C 59.101563 46 60 45.101563 60 44 L 60 24 C 60 22.898438 59.101563 22 58 22 L 50 22 L 50 7 C 50 5.351563 48.648438 4 47 4 Z M 18 6 L 47 6 C 47.550781 6 48 6.449219 48 7 L 48 22 L 16 22 C 14.898438 22 14 22.898438 14 24 L 14 44 C 14 45.101563 14.898438 46 16 46 L 48 46 L 48 57 C 48 57.550781 47.550781 58 47 58 L 7 58 C 6.449219 58 6 57.550781 6 57 L 6 18 L 15 18 C 16.652344 18 18 16.652344 18 15 Z M 16 6.5 L 16 15 C 16 15.550781 15.550781 16 15 16 L 6.5 16 C 6.613281 15.835938 6.738281 15.679688 6.882813 15.539063 L 15.539063 6.882813 C 15.679688 6.738281 15.835938 6.609375 16 6.5 Z M 16 24 L 58 24 L 58 44 L 16 44 Z M 24 28 C 23.449219 28 23 28.445313 23 29 C 23 29.554688 23.449219 30 24 30 L 26 30 L 26 39 C 26 39.554688 26.449219 40 27 40 C 27.550781 40 28 39.554688 28 39 L 28 30 L 30 30 C 30.550781 30 31 29.554688 31 29 C 31 28.445313 30.550781 28 30 28 Z M 44 28 C 43.449219 28 43 28.445313 43 29 C 43 29.554688 43.449219 30 44 30 L 46 30 L 46 39 C 46 39.554688 46.449219 40 47 40 C 47.550781 40 48 39.554688 48 39 L 48 30 L 50 30 C 50.550781 30 51 29.554688 51 29 C 51 28.445313 50.550781 28 50 28 Z M 33.859375 28.011719 C 33.730469 28.027344 33.601563 28.070313 33.484375 28.140625 C 33.011719 28.425781 32.859375 29.039063 33.140625 29.515625 L 35.832031 34 L 33.140625 38.484375 C 32.859375 38.957031 33.011719 39.574219 33.484375 39.859375 C 33.644531 39.953125 33.824219 40 34 40 C 34.339844 40 34.671875 39.828125 34.859375 39.515625 L 37 35.941406 L 39.140625 39.515625 C 39.328125 39.828125 39.660156 40 40 40 C 40.175781 40 40.355469 39.953125 40.515625 39.859375 C 40.988281 39.574219 41.140625 38.957031 40.859375 38.484375 L 38.167969 34 L 40.859375 29.515625 C 41.140625 29.042969 40.988281 28.425781 40.515625 28.140625 C 40.042969 27.859375 39.425781 28.011719 39.140625 28.484375 L 37 32.058594 L 34.859375 28.484375 C 34.644531 28.128906 34.246094 27.957031 33.859375 28.011719 Z M 9 52 C 8.449219 52 8 52.445313 8 53 L 8 55 C 8 55.554688 8.449219 56 9 56 C 9.550781 56 10 55.554688 10 55 L 10 53 C 10 52.445313 9.550781 52 9 52 Z M 14 52 C 13.449219 52 13 52.445313 13 53 L 13 55 C 13 55.554688 13.449219 56 14 56 C 14.550781 56 15 55.554688 15 55 L 15 53 C 15 52.445313 14.550781 52 14 52 Z M 19 52 C 18.449219 52 18 52.445313 18 53 L 18 55 C 18 55.554688 18.449219 56 19 56 C 19.550781 56 20 55.554688 20 55 L 20 53 C 20 52.445313 19.550781 52 19 52 Z M 24 52 C 23.449219 52 23 52.445313 23 53 L 23 55 C 23 55.554688 23.449219 56 24 56 C 24.550781 56 25 55.554688 25 55 L 25 53 C 25 52.445313 24.550781 52 24 52 Z M 29 52 C 28.449219 52 28 52.445313 28 53 L 28 55 C 28 55.554688 28.449219 56 29 56 C 29.550781 56 30 55.554688 30 55 L 30 53 C 30 52.445313 29.550781 52 29 52 Z M 34 52 C 33.449219 52 33 52.445313 33 53 L 33 55 C 33 55.554688 33.449219 56 34 56 C 34.550781 56 35 55.554688 35 55 L 35 53 C 35 52.445313 34.550781 52 34 52 Z M 39 52 C 38.449219 52 38 52.445313 38 53 L 38 55 C 38 55.554688 38.449219 56 39 56 C 39.550781 56 40 55.554688 40 55 L 40 53 C 40 52.445313 39.550781 52 39 52 Z M 44 52 C 43.449219 52 43 52.445313 43 53 L 43 55 C 43 55.554688 43.449219 56 44 56 C 44.550781 56 45 55.554688 45 55 L 45 53 C 45 52.445313 44.550781 52 44 52 Z "})})),PdfFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 17.65625 4 C 16.320313 4 15.066406 4.519531 14.121094 5.464844 L 5.464844 14.121094 C 4.519531 15.066406 4 16.320313 4 17.65625 L 4 57 C 4 58.652344 5.347656 60 7 60 L 47 60 C 48.652344 60 50 58.652344 50 57 L 50 46 L 58 46 C 59.101563 46 60 45.101563 60 44 L 60 24 C 60 22.898438 59.101563 22 58 22 L 50 22 L 50 7 C 50 5.347656 48.652344 4 47 4 Z M 18 6 L 47 6 C 47.550781 6 48 6.449219 48 7 L 48 22 L 16 22 C 14.898438 22 14 22.898438 14 24 L 14 44 C 14 45.101563 14.898438 46 16 46 L 48 46 L 48 57 C 48 57.550781 47.550781 58 47 58 L 7 58 C 6.449219 58 6 57.550781 6 57 L 6 18 L 15 18 C 16.652344 18 18 16.652344 18 15 Z M 16 6.5 L 16 15 C 16 15.550781 15.550781 16 15 16 L 6.5 16 C 6.609375 15.835938 6.734375 15.679688 6.878906 15.535156 L 15.535156 6.878906 C 15.679688 6.734375 15.835938 6.609375 16 6.5 Z M 16 24 L 58 24 L 58 44 L 16 44 Z M 25 28 C 24.445313 28 24 28.449219 24 29 L 24 39 C 24 39.550781 24.445313 40 25 40 C 25.554688 40 26 39.550781 26 39 L 26 36 L 29 36 C 30.652344 36 32 34.652344 32 33 L 32 31 C 32 29.347656 30.652344 28 29 28 Z M 35 28 C 34.445313 28 34 28.449219 34 29 L 34 39 C 34 39.550781 34.445313 40 35 40 L 38 40 C 40.207031 40 42 38.207031 42 36 L 42 32 C 42 29.792969 40.207031 28 38 28 Z M 45 28 C 44.445313 28 44 28.449219 44 29 L 44 39 C 44 39.550781 44.445313 40 45 40 C 45.554688 40 46 39.550781 46 39 L 46 36 L 49 36 C 49.554688 36 50 35.550781 50 35 C 50 34.449219 49.554688 34 49 34 L 46 34 L 46 30 L 50 30 C 50.554688 30 51 29.550781 51 29 C 51 28.449219 50.554688 28 50 28 Z M 26 30 L 29 30 C 29.550781 30 30 30.449219 30 31 L 30 33 C 30 33.550781 29.550781 34 29 34 L 26 34 Z M 36 30 L 38 30 C 39.101563 30 40 30.898438 40 32 L 40 36 C 40 37.101563 39.101563 38 38 38 L 36 38 Z M 9 52 C 8.445313 52 8 52.449219 8 53 L 8 55 C 8 55.550781 8.445313 56 9 56 C 9.554688 56 10 55.550781 10 55 L 10 53 C 10 52.449219 9.554688 52 9 52 Z M 14 52 C 13.445313 52 13 52.449219 13 53 L 13 55 C 13 55.550781 13.445313 56 14 56 C 14.554688 56 15 55.550781 15 55 L 15 53 C 15 52.449219 14.554688 52 14 52 Z M 19 52 C 18.445313 52 18 52.449219 18 53 L 18 55 C 18 55.550781 18.445313 56 19 56 C 19.554688 56 20 55.550781 20 55 L 20 53 C 20 52.449219 19.554688 52 19 52 Z M 24 52 C 23.445313 52 23 52.449219 23 53 L 23 55 C 23 55.550781 23.445313 56 24 56 C 24.554688 56 25 55.550781 25 55 L 25 53 C 25 52.449219 24.554688 52 24 52 Z M 29 52 C 28.445313 52 28 52.449219 28 53 L 28 55 C 28 55.550781 28.445313 56 29 56 C 29.554688 56 30 55.550781 30 55 L 30 53 C 30 52.449219 29.554688 52 29 52 Z M 34 52 C 33.445313 52 33 52.449219 33 53 L 33 55 C 33 55.550781 33.445313 56 34 56 C 34.554688 56 35 55.550781 35 55 L 35 53 C 35 52.449219 34.554688 52 34 52 Z M 39 52 C 38.445313 52 38 52.449219 38 53 L 38 55 C 38 55.550781 38.445313 56 39 56 C 39.554688 56 40 55.550781 40 55 L 40 53 C 40 52.449219 39.554688 52 39 52 Z M 44 52 C 43.445313 52 43 52.449219 43 53 L 43 55 C 43 55.550781 43.445313 56 44 56 C 44.554688 56 45 55.550781 45 55 L 45 53 C 45 52.449219 44.554688 52 44 52 Z "})})),ArchiveFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 21.65625 4 C 20.320313 4 19.066406 4.519531 18.121094 5.464844 L 9.464844 14.121094 C 8.519531 15.066406 8 16.320313 8 17.65625 L 8 57 C 8 58.652344 9.347656 60 11 60 L 51 60 C 52.652344 60 54 58.652344 54 57 L 54 7 C 54 5.347656 52.652344 4 51 4 Z M 22 6 L 36 6 L 36 27.59375 C 35.144531 27.222656 34.210938 27 33.226563 27 L 32.773438 27 C 31.789063 27 30.859375 27.222656 30 27.59375 L 30 9 C 30 8.449219 29.554688 8 29 8 C 28.449219 8 28 8.449219 28 9 L 28 28.902344 C 27.015625 29.824219 26.277344 31.023438 25.953125 32.425781 L 24.875 37.097656 C 24.597656 38.292969 24.878906 39.53125 25.640625 40.488281 C 26.40625 41.449219 27.546875 42 28.769531 42 L 37.230469 42 C 38.457031 42 39.59375 41.449219 40.359375 40.488281 C 41.121094 39.53125 41.402344 38.292969 41.125 37.097656 L 40.046875 32.425781 C 39.726563 31.023438 38.984375 29.824219 38 28.902344 L 38 6 L 51 6 C 51.550781 6 52 6.449219 52 7 L 52 57 C 52 57.550781 51.550781 58 51 58 L 11 58 C 10.449219 58 10 57.550781 10 57 L 10 18 L 19 18 C 20.652344 18 22 16.652344 22 15 Z M 20 6.5 L 20 15 C 20 15.550781 19.550781 16 19 16 L 10.5 16 C 10.609375 15.835938 10.734375 15.679688 10.878906 15.535156 L 19.535156 6.878906 C 19.679688 6.738281 19.835938 6.609375 20 6.5 Z M 32 8 C 31.449219 8 31 8.445313 31 9 C 31 9.554688 31.449219 10 32 10 L 34 10 C 34.550781 10 35 9.554688 35 9 C 35 8.445313 34.550781 8 34 8 Z M 32 13 C 31.449219 13 31 13.445313 31 14 C 31 14.554688 31.449219 15 32 15 L 34 15 C 34.550781 15 35 14.554688 35 14 C 35 13.445313 34.550781 13 34 13 Z M 32 18 C 31.449219 18 31 18.445313 31 19 C 31 19.554688 31.449219 20 32 20 L 34 20 C 34.550781 20 35 19.554688 35 19 C 35 18.445313 34.550781 18 34 18 Z M 32 23 C 31.449219 23 31 23.445313 31 24 C 31 24.554688 31.449219 25 32 25 L 34 25 C 34.550781 25 35 24.554688 35 24 C 35 23.445313 34.550781 23 34 23 Z M 32.773438 29 L 33.226563 29 C 35.570313 29 37.574219 30.59375 38.097656 32.875 L 39.175781 37.550781 C 39.316406 38.148438 39.175781 38.765625 38.796875 39.246094 C 38.414063 39.722656 37.839844 40 37.230469 40 L 28.769531 40 C 28.160156 40 27.589844 39.722656 27.207031 39.246094 C 26.824219 38.765625 26.683594 38.148438 26.824219 37.550781 L 27.902344 32.875 C 28.429688 30.59375 30.429688 29 32.773438 29 Z M 31 34 C 30.449219 34 30 34.445313 30 35 C 30 35.554688 30.449219 36 31 36 L 35 36 C 35.550781 36 36 35.554688 36 35 C 36 34.445313 35.550781 34 35 34 Z M 13 52 C 12.449219 52 12 52.445313 12 53 C 12 53.554688 12.449219 54 13 54 L 17 54 C 17.550781 54 18 53.554688 18 53 C 18 52.445313 17.550781 52 17 52 Z M 21 52 C 20.449219 52 20 52.445313 20 53 C 20 53.554688 20.449219 54 21 54 L 49 54 C 49.550781 54 50 53.554688 50 53 C 50 52.445313 49.550781 52 49 52 Z "})})),FolderFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 5 10 C 3.300781 10 2 11.300781 2 13 L 2 52 C 2 54.199219 3.800781 56 6 56 L 60 56 C 62.199219 56 64 54.199219 64 52 L 64 23 C 64 21.300781 62.699219 20 61 20 L 58 20 L 58 19 C 58 17.300781 56.699219 16 55 16 L 29.699219 16 C 28.898438 16 28.199219 15.699219 27.597656 15.097656 L 23.902344 11.402344 C 23 10.5 21.699219 10 20.402344 10 Z M 5 12 L 20.402344 12 C 21.199219 12 21.898438 12.300781 22.5 12.902344 L 26.199219 16.597656 C 27.097656 17.5 28.398438 18 29.699219 18 L 55 18 C 55.601563 18 56 18.398438 56 19 L 56 52 C 56 52.601563 56.199219 53.300781 56.597656 54 L 6 54 C 4.898438 54 4 53.101563 4 52 L 4 46 L 45 46 C 45.601563 46 46 45.601563 46 45 C 46 44.398438 45.601563 44 45 44 L 4 44 L 4 13 C 4 12.398438 4.398438 12 5 12 Z M 58 22 L 61 22 C 61.601563 22 62 22.398438 62 23 L 62 52 C 62 53.101563 61.101563 54 60 54 C 58.800781 54 58 52.601563 58 52 Z M 11 24 C 10.398438 24 10 24.398438 10 25 C 10 25.601563 10.398438 26 11 26 L 21 26 C 21.601563 26 22 25.601563 22 25 C 22 24.398438 21.601563 24 21 24 Z M 25 24 C 24.398438 24 24 24.398438 24 25 C 24 25.601563 24.398438 26 25 26 L 31 26 C 31.601563 26 32 25.601563 32 25 C 32 24.398438 31.601563 24 31 24 Z M 11 28 C 10.398438 28 10 28.398438 10 29 C 10 29.601563 10.398438 30 11 30 L 15 30 C 15.601563 30 16 29.601563 16 29 C 16 28.398438 15.601563 28 15 28 Z M 19 28 C 18.398438 28 18 28.398438 18 29 C 18 29.601563 18.398438 30 19 30 L 26 30 C 26.601563 30 27 29.601563 27 29 C 27 28.398438 26.601563 28 26 28 Z M 49 44 C 48.398438 44 48 44.398438 48 45 C 48 45.601563 48.398438 46 49 46 L 53 46 C 53.601563 46 54 45.601563 54 45 C 54 44.398438 53.601563 44 53 44 Z M 7 48 C 6.398438 48 6 48.398438 6 49 L 6 51 C 6 51.601563 6.398438 52 7 52 C 7.601563 52 8 51.601563 8 51 L 8 49 C 8 48.398438 7.601563 48 7 48 Z M 12 48 C 11.398438 48 11 48.398438 11 49 L 11 51 C 11 51.601563 11.398438 52 12 52 C 12.601563 52 13 51.601563 13 51 L 13 49 C 13 48.398438 12.601563 48 12 48 Z M 17 48 C 16.398438 48 16 48.398438 16 49 L 16 51 C 16 51.601563 16.398438 52 17 52 C 17.601563 52 18 51.601563 18 51 L 18 49 C 18 48.398438 17.601563 48 17 48 Z M 22 48 C 21.398438 48 21 48.398438 21 49 L 21 51 C 21 51.601563 21.398438 52 22 52 C 22.601563 52 23 51.601563 23 51 L 23 49 C 23 48.398438 22.601563 48 22 48 Z M 27 48 C 26.398438 48 26 48.398438 26 49 L 26 51 C 26 51.601563 26.398438 52 27 52 C 27.601563 52 28 51.601563 28 51 L 28 49 C 28 48.398438 27.601563 48 27 48 Z M 32 48 C 31.398438 48 31 48.398438 31 49 L 31 51 C 31 51.601563 31.398438 52 32 52 C 32.601563 52 33 51.601563 33 51 L 33 49 C 33 48.398438 32.601563 48 32 48 Z M 37 48 C 36.398438 48 36 48.398438 36 49 L 36 51 C 36 51.601563 36.398438 52 37 52 C 37.601563 52 38 51.601563 38 51 L 38 49 C 38 48.398438 37.601563 48 37 48 Z M 42 48 C 41.398438 48 41 48.398438 41 49 L 41 51 C 41 51.601563 41.398438 52 42 52 C 42.601563 52 43 51.601563 43 51 L 43 49 C 43 48.398438 42.601563 48 42 48 Z M 47 48 C 46.398438 48 46 48.398438 46 49 L 46 51 C 46 51.601563 46.398438 52 47 52 C 47.601563 52 48 51.601563 48 51 L 48 49 C 48 48.398438 47.601563 48 47 48 Z M 52 48 C 51.398438 48 51 48.398438 51 49 L 51 51 C 51 51.601563 51.398438 52 52 52 C 52.601563 52 53 51.601563 53 51 L 53 49 C 53 48.398438 52.601563 48 52 48 Z "})})),ImageFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 21.65625 4 C 20.320313 4 19.066406 4.519531 18.121094 5.464844 L 9.464844 14.121094 C 8.519531 15.066406 8 16.320313 8 17.65625 L 8 57 C 8 58.652344 9.347656 60 11 60 L 51 60 C 52.652344 60 54 58.652344 54 57 L 54 7 C 54 5.347656 52.652344 4 51 4 Z M 22 6 L 51 6 C 51.550781 6 52 6.449219 52 7 L 52 57 C 52 57.550781 51.550781 58 51 58 L 11 58 C 10.449219 58 10 57.550781 10 57 L 10 18 L 19 18 C 20.652344 18 22 16.652344 22 15 Z M 20 6.5 L 20 15 C 20 15.550781 19.550781 16 19 16 L 10.5 16 C 10.605469 15.835938 10.734375 15.679688 10.878906 15.535156 L 19.535156 6.878906 C 19.679688 6.738281 19.835938 6.613281 20 6.5 Z M 20 24 C 17.792969 24 16 25.792969 16 28 C 16 30.207031 17.792969 32 20 32 C 22.207031 32 24 30.207031 24 28 C 24 25.792969 22.207031 24 20 24 Z M 20 25.75 C 21.242188 25.75 22.25 26.757813 22.25 28 C 22.25 29.242188 21.242188 30.25 20 30.25 C 18.757813 30.25 17.75 29.242188 17.75 28 C 17.75 26.757813 18.757813 25.75 20 25.75 Z M 37 30.414063 C 36.488281 30.414063 35.976563 30.609375 35.585938 31 L 29 37.585938 L 26.414063 35 C 25.632813 34.21875 24.363281 34.21875 23.585938 35 L 14.585938 44 L 13.042969 44 C 12.417969 44 12 44.398438 12 45 C 12 45.601563 12.523438 46 13.042969 46 L 48.980469 46 C 49.5 46 50.023438 45.601563 50.023438 45 C 50.023438 44.398438 49.5 44 48.980469 44 L 25.414063 44 L 37 32.414063 L 45.292969 40.707031 C 45.683594 41.097656 46.316406 41.097656 46.707031 40.707031 C 47.097656 40.316406 47.097656 39.683594 46.707031 39.292969 L 38.414063 31 C 38.023438 30.609375 37.511719 30.414063 37 30.414063 Z M 25 36.414063 L 27.585938 39 L 22.585938 44 L 17.414063 44 Z M 13 52 C 12.449219 52 12 52.449219 12 53 L 12 55 C 12 55.550781 12.449219 56 13 56 C 13.550781 56 14 55.550781 14 55 L 14 53 C 14 52.449219 13.550781 52 13 52 Z M 18 52 C 17.449219 52 17 52.449219 17 53 L 17 55 C 17 55.550781 17.449219 56 18 56 C 18.550781 56 19 55.550781 19 55 L 19 53 C 19 52.449219 18.550781 52 18 52 Z M 23 52 C 22.449219 52 22 52.449219 22 53 L 22 55 C 22 55.550781 22.449219 56 23 56 C 23.550781 56 24 55.550781 24 55 L 24 53 C 24 52.449219 23.550781 52 23 52 Z M 28 52 C 27.449219 52 27 52.449219 27 53 L 27 55 C 27 55.550781 27.449219 56 28 56 C 28.550781 56 29 55.550781 29 55 L 29 53 C 29 52.449219 28.550781 52 28 52 Z M 33 52 C 32.449219 52 32 52.449219 32 53 L 32 55 C 32 55.550781 32.449219 56 33 56 C 33.550781 56 34 55.550781 34 55 L 34 53 C 34 52.449219 33.550781 52 33 52 Z M 38 52 C 37.449219 52 37 52.449219 37 53 L 37 55 C 37 55.550781 37.449219 56 38 56 C 38.550781 56 39 55.550781 39 55 L 39 53 C 39 52.449219 38.550781 52 38 52 Z M 43 52 C 42.449219 52 42 52.449219 42 53 L 42 55 C 42 55.550781 42.449219 56 43 56 C 43.550781 56 44 55.550781 44 55 L 44 53 C 44 52.449219 43.550781 52 43 52 Z M 48 52 C 47.449219 52 47 52.449219 47 53 L 47 55 C 47 55.550781 47.449219 56 48 56 C 48.550781 56 49 55.550781 49 55 L 49 53 C 49 52.449219 48.550781 52 48 52 Z "})})),PowerPointFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 35.136719 2.386719 C 34.917969 2.378906 34.699219 2.390625 34.480469 2.429688 L 5.304688 7.578125 C 3.390625 7.917969 2 9.574219 2 11.515625 L 2 50.484375 C 2 52.429688 3.390625 54.085938 5.304688 54.421875 L 34.480469 59.570313 C 34.652344 59.601563 34.828125 59.613281 35 59.613281 C 35.703125 59.613281 36.382813 59.371094 36.925781 58.914063 C 37.609375 58.34375 38 57.503906 38 56.613281 L 38 52 L 57 52 C 58.652344 52 60 50.652344 60 49 L 60 13 C 60 11.347656 58.652344 10 57 10 L 38 10 L 38 5.382813 C 38 4.496094 37.609375 3.65625 36.925781 3.085938 C 36.417969 2.65625 35.789063 2.414063 35.136719 2.386719 Z M 35.105469 4.390625 C 35.359375 4.414063 35.542969 4.535156 35.640625 4.617188 C 35.777344 4.730469 36 4.980469 36 5.382813 L 36 56.613281 C 36 57.019531 35.777344 57.269531 35.640625 57.382813 C 35.507813 57.496094 35.226563 57.667969 34.828125 57.601563 L 5.652344 52.453125 C 4.695313 52.285156 4 51.457031 4 50.484375 L 4 11.515625 C 4 10.542969 4.695313 9.714844 5.652344 9.546875 L 34.824219 4.398438 C 34.925781 4.382813 35.019531 4.378906 35.105469 4.390625 Z M 38 12 L 57 12 C 57.550781 12 58 12.449219 58 13 L 58 49 C 58 49.550781 57.550781 50 57 50 L 38 50 L 38 45.949219 L 52.949219 45.949219 C 53.5 45.949219 53.949219 45.554688 53.949219 45 C 53.949219 44.445313 53.5 44 52.949219 44 L 50 44 L 50 41 C 50 40.445313 49.550781 40 49 40 L 46 40 L 46 37 C 46 36.445313 45.550781 36 45 36 L 41 36 C 40.449219 36 40 36.445313 40 37 L 40 39 L 38 39 L 38 32.46875 C 39.46875 33.449219 41.203125 34 43 34 C 47.960938 34 52 29.964844 52 25 C 52 20.035156 47.960938 16 43 16 C 41.1875 16 39.464844 16.535156 38 17.519531 Z M 42 18.078125 L 42 24.832031 C 42 25.027344 42.070313 25.203125 42.171875 25.359375 C 42.21875 25.492188 42.289063 25.617188 42.394531 25.726563 L 47.234375 30.5625 C 46.054688 31.460938 44.589844 32 43 32 C 41.113281 32 39.316406 31.230469 38 29.886719 L 38 20.105469 C 39.089844 18.992188 40.484375 18.292969 42 18.078125 Z M 44 18.078125 C 47.386719 18.566406 50 21.480469 50 25 C 50 26.546875 49.488281 27.976563 48.636719 29.136719 L 44 24.5 Z M 15 20 C 14.449219 20 14 20.445313 14 21 L 14 41 C 14 41.554688 14.449219 42 15 42 C 15.550781 42 16 41.554688 16 41 L 16 34 L 21 34 C 23.757813 34 26 31.757813 26 29 L 26 25 C 26 22.242188 23.757813 20 21 20 Z M 16 22 L 21 22 C 22.652344 22 24 23.347656 24 25 L 24 29 C 24 30.652344 22.652344 32 21 32 L 16 32 Z M 42 38 L 44 38 L 44 44 L 42 44 Z M 38 41 L 40 41 L 40 44 L 38 44 Z M 46 42 L 48 42 L 48 44 L 46 44 Z "})})),WordFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 21.65625 4 C 20.320313 4 19.0625 4.519531 18.121094 5.464844 L 9.464844 14.121094 C 8.519531 15.066406 8 16.320313 8 17.65625 L 8 57 C 8 58.652344 9.347656 60 11 60 L 51 60 C 52.652344 60 54 58.652344 54 57 L 54 7 C 54 5.347656 52.652344 4 51 4 Z M 22 6 L 51 6 C 51.550781 6 52 6.449219 52 7 L 52 57 C 52 57.550781 51.550781 58 51 58 L 11 58 C 10.449219 58 10 57.550781 10 57 L 10 18 L 19 18 C 20.652344 18 22 16.652344 22 15 Z M 20 6.5 L 20 15 C 20 15.550781 19.550781 16 19 16 L 10.5 16 C 10.613281 15.832031 10.738281 15.675781 10.878906 15.535156 L 19.535156 6.878906 C 19.679688 6.734375 19.835938 6.609375 20 6.5 Z M 21.140625 23.011719 C 21.015625 22.992188 20.878906 22.996094 20.746094 23.03125 C 20.210938 23.175781 19.894531 23.722656 20.03125 24.253906 L 25.03125 43.253906 C 25.148438 43.691406 25.539063 43.996094 25.984375 44 L 26 44 C 26.441406 44 26.832031 43.710938 26.957031 43.28125 L 31 29.546875 L 35.042969 43.28125 C 35.167969 43.707031 35.558594 44 36 44 L 36.015625 44 C 36.460938 43.992188 36.851563 43.6875 36.96875 43.253906 L 41.96875 24.253906 C 42.105469 23.722656 41.789063 23.175781 41.253906 23.03125 C 40.71875 22.890625 40.171875 23.210938 40.03125 23.746094 L 35.945313 39.273438 L 31.957031 25.71875 C 31.832031 25.292969 31.445313 25 31 25 C 30.554688 25 30.167969 25.292969 30.042969 25.71875 L 26.054688 39.277344 L 21.96875 23.746094 C 21.863281 23.347656 21.527344 23.066406 21.140625 23.011719 Z M 13 52 C 12.449219 52 12 52.445313 12 53 L 12 55 C 12 55.554688 12.449219 56 13 56 C 13.550781 56 14 55.554688 14 55 L 14 53 C 14 52.445313 13.550781 52 13 52 Z M 18 52 C 17.449219 52 17 52.445313 17 53 L 17 55 C 17 55.554688 17.449219 56 18 56 C 18.550781 56 19 55.554688 19 55 L 19 53 C 19 52.445313 18.550781 52 18 52 Z M 23 52 C 22.449219 52 22 52.445313 22 53 L 22 55 C 22 55.554688 22.449219 56 23 56 C 23.550781 56 24 55.554688 24 55 L 24 53 C 24 52.445313 23.550781 52 23 52 Z M 28 52 C 27.449219 52 27 52.445313 27 53 L 27 55 C 27 55.554688 27.449219 56 28 56 C 28.550781 56 29 55.554688 29 55 L 29 53 C 29 52.445313 28.550781 52 28 52 Z M 33 52 C 32.449219 52 32 52.445313 32 53 L 32 55 C 32 55.554688 32.449219 56 33 56 C 33.550781 56 34 55.554688 34 55 L 34 53 C 34 52.445313 33.550781 52 33 52 Z M 38 52 C 37.449219 52 37 52.445313 37 53 L 37 55 C 37 55.554688 37.449219 56 38 56 C 38.550781 56 39 55.554688 39 55 L 39 53 C 39 52.445313 38.550781 52 38 52 Z M 43 52 C 42.449219 52 42 52.445313 42 53 L 42 55 C 42 55.554688 42.449219 56 43 56 C 43.550781 56 44 55.554688 44 55 L 44 53 C 44 52.445313 43.550781 52 43 52 Z M 48 52 C 47.449219 52 47 52.445313 47 53 L 47 55 C 47 55.554688 47.449219 56 48 56 C 48.550781 56 49 55.554688 49 55 L 49 53 C 49 52.445313 48.550781 52 48 52 Z "})})),SpreadsheetFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 35.136719 2.386719 C 34.917969 2.378906 34.699219 2.390625 34.480469 2.429688 L 5.304688 7.578125 C 3.390625 7.917969 2 9.574219 2 11.515625 L 2 50.484375 C 2 52.429688 3.390625 54.085938 5.304688 54.421875 L 34.480469 59.570313 C 34.652344 59.601563 34.828125 59.613281 35 59.613281 C 35.703125 59.613281 36.382813 59.371094 36.925781 58.914063 C 37.609375 58.34375 38 57.503906 38 56.613281 L 38 52 L 57 52 C 58.652344 52 60 50.652344 60 49 L 60 13 C 60 11.347656 58.652344 10 57 10 L 38 10 L 38 5.382813 C 38 4.496094 37.609375 3.65625 36.925781 3.085938 C 36.417969 2.65625 35.789063 2.414063 35.136719 2.386719 Z M 35.105469 4.390625 C 35.359375 4.414063 35.542969 4.535156 35.640625 4.617188 C 35.777344 4.730469 36 4.980469 36 5.382813 L 36 56.613281 C 36 57.019531 35.777344 57.269531 35.640625 57.382813 C 35.507813 57.496094 35.226563 57.671875 34.828125 57.601563 L 5.652344 52.453125 C 4.695313 52.285156 4 51.457031 4 50.484375 L 4 11.515625 C 4 10.542969 4.695313 9.714844 5.652344 9.546875 L 34.824219 4.398438 C 34.925781 4.382813 35.019531 4.378906 35.105469 4.390625 Z M 38 12 L 57 12 C 57.550781 12 58 12.449219 58 13 L 58 49 C 58 49.550781 57.550781 50 57 50 L 38 50 L 38 44 L 41 44 C 41.550781 44 42 43.554688 42 43 C 42 42.445313 41.550781 42 41 42 L 38 42 L 38 38 L 41 38 C 41.550781 38 42 37.554688 42 37 C 42 36.445313 41.550781 36 41 36 L 38 36 L 38 32 L 41 32 C 41.550781 32 42 31.554688 42 31 C 42 30.445313 41.550781 30 41 30 L 38 30 L 38 26 L 41 26 C 41.550781 26 42 25.554688 42 25 C 42 24.445313 41.550781 24 41 24 L 38 24 L 38 20 L 41 20 C 41.550781 20 42 19.554688 42 19 C 42 18.445313 41.550781 18 41 18 L 38 18 Z M 45 18 C 44.449219 18 44 18.445313 44 19 C 44 19.554688 44.449219 20 45 20 L 51 20 C 51.550781 20 52 19.554688 52 19 C 52 18.445313 51.550781 18 51 18 Z M 12.824219 20.015625 C 12.695313 20.039063 12.570313 20.085938 12.453125 20.160156 C 11.992188 20.460938 11.859375 21.082031 12.160156 21.546875 L 18.308594 31 L 12.160156 40.453125 C 11.859375 40.917969 11.992188 41.539063 12.453125 41.839844 C 12.625 41.949219 12.8125 42 13 42 C 13.324219 42 13.648438 41.839844 13.839844 41.546875 L 19.5 32.835938 L 25.160156 41.546875 C 25.351563 41.839844 25.675781 42 26 42 C 26.1875 42 26.375 41.949219 26.546875 41.839844 C 27.007813 41.539063 27.140625 40.917969 26.839844 40.453125 L 20.691406 31 L 26.839844 21.546875 C 27.140625 21.082031 27.007813 20.460938 26.546875 20.160156 C 26.082031 19.859375 25.460938 19.992188 25.160156 20.453125 L 19.5 29.164063 L 13.839844 20.453125 C 13.613281 20.105469 13.207031 19.945313 12.824219 20.015625 Z M 45 24 C 44.449219 24 44 24.445313 44 25 C 44 25.554688 44.449219 26 45 26 L 51 26 C 51.550781 26 52 25.554688 52 25 C 52 24.445313 51.550781 24 51 24 Z M 45 30 C 44.449219 30 44 30.445313 44 31 C 44 31.554688 44.449219 32 45 32 L 51 32 C 51.550781 32 52 31.554688 52 31 C 52 30.445313 51.550781 30 51 30 Z M 45 36 C 44.449219 36 44 36.445313 44 37 C 44 37.554688 44.449219 38 45 38 L 51 38 C 51.550781 38 52 37.554688 52 37 C 52 36.445313 51.550781 36 51 36 Z M 45 42 C 44.449219 42 44 42.445313 44 43 C 44 43.554688 44.449219 44 45 44 L 51 44 C 51.550781 44 52 43.554688 52 43 C 52 42.445313 51.550781 42 51 42 Z "})})),SharedFolderFileIcon=createSvgIcon(jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:"M 3 8 C 1.347656 8 0 9.347656 0 11 L 0 52 C 0 54.207031 1.792969 56 4 56 L 58 56 C 60.207031 56 62 54.207031 62 52 L 62 21 C 62 19.347656 60.652344 18 59 18 L 56 18 L 56 17 C 56 15.347656 54.652344 14 53 14 L 27.707031 14 C 26.910156 14 26.164063 13.691406 25.597656 13.132813 L 21.875 9.445313 C 20.929688 8.515625 19.679688 8 18.355469 8 Z M 3 10 L 18.355469 10 C 19.152344 10 19.898438 10.308594 20.464844 10.867188 L 24.1875 14.554688 C 25.132813 15.484375 26.382813 16 27.707031 16 L 53 16 C 53.550781 16 54 16.449219 54 17 L 54 52 C 54 52.617188 54.222656 53.339844 54.632813 54 L 4 54 C 2.898438 54 2 53.101563 2 52 L 2 46 L 43 46 C 43.550781 46 44 45.550781 44 45 C 44 44.449219 43.550781 44 43 44 L 2 44 L 2 11 C 2 10.449219 2.449219 10 3 10 Z M 56 20 L 59 20 C 59.550781 20 60 20.449219 60 21 L 60 52 C 60 53.101563 59.101563 54 58 54 C 56.753906 54 56 52.609375 56 52 Z M 27 22 C 24.242188 22 22 24.242188 22 27 L 22 29 C 22 29.992188 22.300781 30.914063 22.800781 31.691406 C 20.058594 32.886719 17.882813 35.527344 17.28125 38.765625 C 17.179688 39.3125 17.539063 39.832031 18.082031 39.933594 C 18.625 40.035156 19.148438 39.675781 19.25 39.132813 C 19.785156 36.242188 21.863281 33.949219 24.371094 33.234375 C 25.136719 33.710938 26.03125 34 27 34 C 27.96875 34 28.863281 33.710938 29.628906 33.234375 C 32.136719 33.949219 34.214844 36.246094 34.75 39.136719 C 34.839844 39.617188 35.261719 39.953125 35.734375 39.953125 C 35.796875 39.953125 35.855469 39.949219 35.917969 39.9375 C 36.460938 39.835938 36.820313 39.3125 36.71875 38.769531 C 36.117188 35.53125 33.941406 32.886719 31.199219 31.691406 C 31.699219 30.914063 32 29.992188 32 29 L 32 27 C 32 24.242188 29.757813 22 27 22 Z M 27 24 C 28.652344 24 30 25.347656 30 27 L 30 29 C 30 30.652344 28.652344 32 27 32 C 25.347656 32 24 30.652344 24 29 L 24 27 C 24 25.347656 25.347656 24 27 24 Z M 47 44 C 46.449219 44 46 44.449219 46 45 C 46 45.550781 46.449219 46 47 46 L 51 46 C 51.550781 46 52 45.550781 52 45 C 52 44.449219 51.550781 44 51 44 Z M 5 48 C 4.449219 48 4 48.449219 4 49 L 4 51 C 4 51.550781 4.449219 52 5 52 C 5.550781 52 6 51.550781 6 51 L 6 49 C 6 48.449219 5.550781 48 5 48 Z M 10 48 C 9.449219 48 9 48.449219 9 49 L 9 51 C 9 51.550781 9.449219 52 10 52 C 10.550781 52 11 51.550781 11 51 L 11 49 C 11 48.449219 10.550781 48 10 48 Z M 15 48 C 14.449219 48 14 48.449219 14 49 L 14 51 C 14 51.550781 14.449219 52 15 52 C 15.550781 52 16 51.550781 16 51 L 16 49 C 16 48.449219 15.550781 48 15 48 Z M 20 48 C 19.449219 48 19 48.449219 19 49 L 19 51 C 19 51.550781 19.449219 52 20 52 C 20.550781 52 21 51.550781 21 51 L 21 49 C 21 48.449219 20.550781 48 20 48 Z M 25 48 C 24.449219 48 24 48.449219 24 49 L 24 51 C 24 51.550781 24.449219 52 25 52 C 25.550781 52 26 51.550781 26 51 L 26 49 C 26 48.449219 25.550781 48 25 48 Z M 30 48 C 29.449219 48 29 48.449219 29 49 L 29 51 C 29 51.550781 29.449219 52 30 52 C 30.550781 52 31 51.550781 31 51 L 31 49 C 31 48.449219 30.550781 48 30 48 Z M 35 48 C 34.449219 48 34 48.449219 34 49 L 34 51 C 34 51.550781 34.449219 52 35 52 C 35.550781 52 36 51.550781 36 51 L 36 49 C 36 48.449219 35.550781 48 35 48 Z M 40 48 C 39.449219 48 39 48.449219 39 49 L 39 51 C 39 51.550781 39.449219 52 40 52 C 40.550781 52 41 51.550781 41 51 L 41 49 C 41 48.449219 40.550781 48 40 48 Z M 45 48 C 44.449219 48 44 48.449219 44 49 L 44 51 C 44 51.550781 44.449219 52 45 52 C 45.550781 52 46 51.550781 46 51 L 46 49 C 46 48.449219 45.550781 48 45 48 Z M 50 48 C 49.449219 48 49 48.449219 49 49 L 49 51 C 49 51.550781 49.449219 52 50 52 C 50.550781 52 51 51.550781 51 51 L 51 49 C 51 48.449219 50.550781 48 50 48 Z "})}));function FileTypeIcon({type:s,mime:i,className:a,size:c}){!s&&i&&(s=i.split("/")[0]);const d=FileTypeIcons[s]||FileTypeIcons.default;return jsxRuntimeExports.jsx(d,{size:c,className:clsx$1(a,`${s}-file-color`),viewBox:"0 0 64 64"})}const FileTypeIcons={default:DefaultFileIcon,audio:AudioFileIcon,video:VideoFileIcon,text:TextFileIcon,pdf:PdfFileIcon,archive:ArchiveFileIcon,folder:FolderFileIcon,sharedFolder:SharedFolderFileIcon,image:ImageFileIcon,powerPoint:PowerPointFileIcon,word:WordFileIcon,spreadsheet:SpreadsheetFileIcon};function FileEntrySharedNotificationRenderer(s){return jsxRuntimeExports.jsx(NotificationListItem,{lineIconRenderer:IconRenderer,...s})}function IconRenderer({icon:s}){return jsxRuntimeExports.jsx(FileTypeIcon,{className:"w-16 h-16",type:s})}const fileEntrySharedNotif="App\\Notifications\\FileEntrySharedNotif",SiteConfig={notifications:{renderMap:{[fileEntrySharedNotif]:FileEntrySharedNotificationRenderer}},homepage:{options:[{label:message("Landing page"),value:"landingPage"}]},auth:{redirectUri:"/drive",adminRedirectUri:"/drive"},tags:{types:[{name:"label",system:!0}]},admin:{ads:[{slot:"ads.file-preview",description:message("This ad will appear on shared file preview page."),image:filePreviewSrc},{slot:"ads.drive",description:message("This ad will appear on user drive page."),image:driveSrc},{slot:"ads.landing-top",description:message("This ad will appear at the top of the landing page."),image:landingTopSrc}]},demo:{loginPageDefaults:"randomAccount"}};var isMergeableObject=function(i){return isNonNullObject(i)&&!isSpecial$1(i)};function isNonNullObject(s){return!!s&&typeof s=="object"}function isSpecial$1(s){var i=Object.prototype.toString.call(s);return i==="[object RegExp]"||i==="[object Date]"||isReactElement(s)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(s){return s.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(s){return Array.isArray(s)?[]:{}}function cloneUnlessOtherwiseSpecified(s,i){return i.clone!==!1&&i.isMergeableObject(s)?deepmerge(emptyTarget(s),s,i):s}function defaultArrayMerge(s,i,a){return s.concat(i).map(function(c){return cloneUnlessOtherwiseSpecified(c,a)})}function getMergeFunction(s,i){if(!i.customMerge)return deepmerge;var a=i.customMerge(s);return typeof a=="function"?a:deepmerge}function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter(function(i){return Object.propertyIsEnumerable.call(s,i)}):[]}function getKeys(s){return Object.keys(s).concat(getEnumerableOwnPropertySymbols(s))}function propertyIsOnObject(s,i){try{return i in s}catch{return!1}}function propertyIsUnsafe(s,i){return propertyIsOnObject(s,i)&&!(Object.hasOwnProperty.call(s,i)&&Object.propertyIsEnumerable.call(s,i))}function mergeObject(s,i,a){var c={};return a.isMergeableObject(s)&&getKeys(s).forEach(function(d){c[d]=cloneUnlessOtherwiseSpecified(s[d],a)}),getKeys(i).forEach(function(d){propertyIsUnsafe(s,d)||(propertyIsOnObject(s,d)&&a.isMergeableObject(i[d])?c[d]=getMergeFunction(d,a)(s[d],i[d],a):c[d]=cloneUnlessOtherwiseSpecified(i[d],a))}),c}function deepmerge(s,i,a){a=a||{},a.arrayMerge=a.arrayMerge||defaultArrayMerge,a.isMergeableObject=a.isMergeableObject||isMergeableObject,a.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var c=Array.isArray(i),d=Array.isArray(s),g=c===d;return g?c?a.arrayMerge(s,i,a):mergeObject(s,i,a):cloneUnlessOtherwiseSpecified(i,a)}deepmerge.all=function(i,a){if(!Array.isArray(i))throw new Error("first argument should be an array");return i.reduce(function(c,d){return deepmerge(c,d,a)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;const deepMerge=getDefaultExportFromCjs(cjs),WorkspaceQueryKeys={fetchUserWorkspaces:["user-workspaces"],workspaceWithMembers:s=>["workspace-with-members",s]},PersonalWorkspace={name:"Default",default:!0,id:0,members_count:1};function fetchUserWorkspaces(){return apiClient.get("me/workspaces").then(s=>s.data)}function addPersonalWorkspaceToResponse(s){return[PersonalWorkspace,...s.workspaces]}function useUserWorkspaces(){return useQuery({queryKey:WorkspaceQueryKeys.fetchUserWorkspaces,queryFn:fetchUserWorkspaces,placeholderData:{workspaces:[]},select:addPersonalWorkspaceToResponse})}const listeners=new Set,listenForCookieChange=(s,i)=>{const a={name:s,callback:i};return listeners.add(a),()=>{listeners.delete(a)}};function stringifyOptions(s){return Object.keys(s).reduce((i,a)=>{const c=a;return c==="days"||s[c]===!1?i:s[c]===!0?`${i}; ${c}`:`${i}; ${c}=${s[c]}`},"")}const setCookie=(s,i,a)=>{const c={days:7,path:"/",...a},d=new Date(Date.now()+c.days*864e5).toUTCString();document.cookie=s+"="+encodeURIComponent(i)+"; expires="+d+stringifyOptions(c),listeners.forEach(g=>{g.name===s&&g.callback(i)})};function getCookie(s,i=""){return document.cookie&&document.cookie.split("; ").reduce((a,c)=>{const d=c.split("=");return d[0]===s?decodeURIComponent(d[1]):a},"")||i}function useCookie(s,i){const[a,c]=reactExports.useState(()=>getCookie(s,i));reactExports.useEffect(()=>listenForCookieChange(s,g=>{c(g)}),[s]);const d=reactExports.useCallback((g,b)=>{c(g),setCookie(s,g,b)},[s]);return[a,d]}const ActiveWorkspaceIdContext=React.createContext({workspaceId:null,setWorkspaceId:()=>{}});function useActiveWorkspaceId(){return reactExports.useContext(ActiveWorkspaceIdContext)}function useActiveWorkspace(){const{workspaceId:s}=useActiveWorkspaceId(),i=useUserWorkspaces();return i.data?i.data.find(a=>a.id===s):null}function ActiveWorkspaceProvider({children:s}){const[i,a]=useCookie("activeWorkspaceId",`${PersonalWorkspace.id}`);reactExports.useEffect(()=>(setActiveWorkspaceId(parseInt(i)),()=>{setActiveWorkspaceId(0)}),[i]);const c=reactExports.useMemo(()=>({workspaceId:parseInt(i),setWorkspaceId:d=>{a(`${d}`)}}),[i,a]);return jsxRuntimeExports.jsx(ActiveWorkspaceIdContext.Provider,{value:c,children:s})}function useJoinWorkspace(){const{setWorkspaceId:s}=useActiveWorkspaceId()||{};return useMutation({mutationFn:i=>joinWorkspace(i),onSuccess:i=>{toast(message("Joined workspace")),s(i.workspace.id),queryClient.invalidateQueries({queryKey:WorkspaceQueryKeys.fetchUserWorkspaces}),queryClient.invalidateQueries({queryKey:useUserNotifications.key})},onError:i=>{axios$1.isAxiosError(i)&&i.response&&i.response.status===404?(queryClient.invalidateQueries({queryKey:useUserNotifications.key}),toast.danger(message("This invite is no longer valid"))):showHttpErrorToast(i)}})}function joinWorkspace({inviteId:s}){return apiClient.get(`workspace/join/${s}`).then(i=>i.data)}function deleteInvite({inviteId:s}){return apiClient.delete(`workspace/invite/${s}`).then(i=>i.data)}function useDeleteInvite(){return useMutation({mutationFn:s=>deleteInvite(s),onSuccess:()=>{queryClient.invalidateQueries({queryKey:useUserNotifications.key}),toast(message("Declined workspace invitation"))},onError:s=>{axios$1.isAxiosError(s)&&s.response&&s.response.status===404?(queryClient.invalidateQueries({queryKey:useUserNotifications.key}),toast.danger(message("This invite is no longer valid"))):showHttpErrorToast(s)}})}const DialogContext=React.createContext(null);function useDialogContext(){return reactExports.useContext(DialogContext)}function WorkspaceInviteNotificationRenderer(s){const{notification:i}=s,a=useJoinWorkspace(),c=useDeleteInvite(),d=useDialogContext();return jsxRuntimeExports.jsx(NotificationListItem,{...s,onActionButtonClick:(g,{action:b})=>{const $=i.data;b==="join"&&a.mutate({inviteId:$.inviteId}),b==="decline"&&c.mutate({inviteId:$.inviteId}),d==null||d.close()}})}const workspaceInviteNotif="Common\\Workspaces\\Notifications\\WorkspaceInvitation",BaseSiteConfig={auth:{redirectUri:"/",adminRedirectUri:"/admin"},tags:{types:[{name:"custom"}]},customPages:{types:[{type:"default",label:message("Default")}]},notifications:{renderMap:{[workspaceInviteNotif]:WorkspaceInviteNotificationRenderer}},admin:{ads:[]},demo:{loginPageDefaults:"singleAccount"},homepage:{options:[{label:message("Login page"),value:"loginPage"},{label:message("Registration page"),value:"registerPage"}]}};let rootEl=typeof document<"u"?document.getElementById("root")??document.body:void 0,themeEl=typeof document<"u"?document.documentElement:void 0;function setThemeValue(s,i){themeEl==null||themeEl.style.setProperty(s,i)}function removeThemeValue(s){themeEl==null||themeEl.style.removeProperty(s)}function applyThemeToDom(s){Object.entries(s.values).forEach(([i,a])=>{setThemeValue(i,a)}),s.is_dark?themeEl.classList.add("dark"):themeEl.classList.remove("dark")}const ThemeSelectorContext=reactExports.createContext(null);function useThemeSelector(){return reactExports.useContext(ThemeSelectorContext)}const STORAGE_KEY="be-active-theme";function ThemeProvider({children:s}){const{themes:i}=useSettings(),a=i==null?void 0:i.user_change,{data:c}=useBootstrapData(),d=reactExports.useMemo(()=>c.themes.all||[],[c.themes.all]),g=c.themes.selectedThemeId||void 0,[b,$]=useCookie(STORAGE_KEY,`${g}`);let _=a?d.find(_e=>_e.id==b):d.find(_e=>_e.id==(i==null?void 0:i.default_id));_||(_=d[0]);const j=reactExports.useMemo(()=>({allThemes:d,selectedTheme:_,selectTheme:_e=>{if(!a)return;const et=findTheme(d,_e);et&&($(`${et.id}`),applyThemeToDom(et))}}),[d,_,$,a]);return jsxRuntimeExports.jsx(ThemeSelectorContext.Provider,{value:j,children:s})}function findTheme(s,i){return s.find(a=>i==="light"?a.default_light===!0:i==="dark"?a.default_dark===!0:a.id===i)}function BootstrapDataProvider({children:s}){const{data:i}=useBackendBootstrapData(),a=reactExports.useMemo(()=>({data:i,setBootstrapData,mergeBootstrapData,invalidateBootstrapData}),[i]);return jsxRuntimeExports.jsx(BoostrapDataContext.Provider,{value:a,children:s})}const mergedConfig=deepMerge(BaseSiteConfig,SiteConfig);function CommonProvider({children:s}){return jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(QueryClientProvider,{client:queryClient,children:jsxRuntimeExports.jsx(LazyMotion,{features:domAnimation,children:jsxRuntimeExports.jsx(SiteConfigContext.Provider,{value:mergedConfig,children:jsxRuntimeExports.jsx(BootstrapDataProvider,{children:jsxRuntimeExports.jsx(ThemeProvider,{children:s})})})})})})}const objectToString=Object.prototype.toString;function isError(s){switch(objectToString.call(s)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return isInstanceOf(s,Error)}}function isBuiltin(s,i){return objectToString.call(s)===`[object ${i}]`}function isErrorEvent$1(s){return isBuiltin(s,"ErrorEvent")}function isDOMError(s){return isBuiltin(s,"DOMError")}function isDOMException(s){return isBuiltin(s,"DOMException")}function isString$1(s){return isBuiltin(s,"String")}function isPrimitive$1(s){return s===null||typeof s!="object"&&typeof s!="function"}function isPlainObject$1(s){return isBuiltin(s,"Object")}function isEvent(s){return typeof Event<"u"&&isInstanceOf(s,Event)}function isElement$1(s){return typeof Element<"u"&&isInstanceOf(s,Element)}function isRegExp(s){return isBuiltin(s,"RegExp")}function isThenable(s){return!!(s&&s.then&&typeof s.then=="function")}function isSyntheticEvent(s){return isPlainObject$1(s)&&"nativeEvent"in s&&"preventDefault"in s&&"stopPropagation"in s}function isNaN$1(s){return typeof s=="number"&&s!==s}function isInstanceOf(s,i){try{return s instanceof i}catch{return!1}}function isVueViewModel(s){return!!(typeof s=="object"&&s!==null&&(s.__isVue||s._isVue))}function truncate(s,i=0){return typeof s!="string"||i===0||s.length<=i?s:`${s.slice(0,i)}...`}function safeJoin(s,i){if(!Array.isArray(s))return"";const a=[];for(let c=0;cisMatchingPattern(s,c,a))}function applyAggregateErrorsToEvent(s,i,a=250,c,d,g,b){if(!g.exception||!g.exception.values||!b||!isInstanceOf(b.originalException,Error))return;const $=g.exception.values.length>0?g.exception.values[g.exception.values.length-1]:void 0;$&&(g.exception.values=truncateAggregateExceptions(aggregateExceptionsFromError(s,i,d,b.originalException,c,g.exception.values,$,0),a))}function aggregateExceptionsFromError(s,i,a,c,d,g,b,$){if(g.length>=a+1)return g;let _=[...g];if(isInstanceOf(c[d],Error)){applyExceptionGroupFieldsForParentException(b,$);const j=s(i,c[d]),_e=_.length;applyExceptionGroupFieldsForChildException(j,d,_e,$),_=aggregateExceptionsFromError(s,i,a,c[d],d,[j,..._],j,_e)}return Array.isArray(c.errors)&&c.errors.forEach((j,_e)=>{if(isInstanceOf(j,Error)){applyExceptionGroupFieldsForParentException(b,$);const et=s(i,j),tt=_.length;applyExceptionGroupFieldsForChildException(et,`errors[${_e}]`,tt,$),_=aggregateExceptionsFromError(s,i,a,j,d,[et,..._],et,tt)}}),_}function applyExceptionGroupFieldsForParentException(s,i){s.mechanism=s.mechanism||{type:"generic",handled:!0},s.mechanism={...s.mechanism,is_exception_group:!0,exception_id:i}}function applyExceptionGroupFieldsForChildException(s,i,a,c){s.mechanism=s.mechanism||{type:"generic",handled:!0},s.mechanism={...s.mechanism,type:"chained",source:i,exception_id:a,parent_id:c}}function truncateAggregateExceptions(s,i){return s.map(a=>(a.value&&(a.value=truncate(a.value,i)),a))}function isGlobalObj(s){return s&&s.Math==Math?s:void 0}const GLOBAL_OBJ=typeof globalThis=="object"&&isGlobalObj(globalThis)||typeof window=="object"&&isGlobalObj(window)||typeof self=="object"&&isGlobalObj(self)||typeof global=="object"&&isGlobalObj(global)||function(){return this}()||{};function getGlobalObject(){return GLOBAL_OBJ}function getGlobalSingleton(s,i,a){const c=a||GLOBAL_OBJ,d=c.__SENTRY__=c.__SENTRY__||{};return d[s]||(d[s]=i())}const WINDOW$6=getGlobalObject(),DEFAULT_MAX_STRING_LENGTH=80;function htmlTreeAsString(s,i={}){if(!s)return"";try{let a=s;const c=5,d=[];let g=0,b=0;const $=" > ",_=$.length;let j;const _e=Array.isArray(i)?i:i.keyAttrs,et=!Array.isArray(i)&&i.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;a&&g++1&&b+d.length*_+j.length>=et));)d.push(j),b+=j.length,a=a.parentNode;return d.reverse().join($)}catch{return""}}function _htmlElementAsString(s,i){const a=s,c=[];let d,g,b,$,_;if(!a||!a.tagName)return"";c.push(a.tagName.toLowerCase());const j=i&&i.length?i.filter(et=>a.getAttribute(et)).map(et=>[et,a.getAttribute(et)]):null;if(j&&j.length)j.forEach(et=>{c.push(`[${et[0]}="${et[1]}"]`)});else if(a.id&&c.push(`#${a.id}`),d=a.className,d&&isString$1(d))for(g=d.split(/\s+/),_=0;_{const g=originalConsoleMethods[d];a[d]=i[d],i[d]=g});try{return s()}finally{c.forEach(d=>{i[d]=a[d]})}}function makeLogger(){let s=!1;const i={enable:()=>{s=!0},disable:()=>{s=!1},isEnabled:()=>s};return CONSOLE_LEVELS.forEach(a=>{i[a]=()=>{}}),i}const logger=makeLogger(),DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function dsnToString(s,i=!1){const{host:a,path:c,pass:d,port:g,projectId:b,protocol:$,publicKey:_}=s;return`${$}://${_}${i&&d?`:${d}`:""}@${a}${g?`:${g}`:""}/${c&&`${c}/`}${b}`}function dsnFromString(s){const i=DSN_REGEX.exec(s);if(!i){console.error(`Invalid Sentry Dsn: ${s}`);return}const[a,c,d="",g,b="",$]=i.slice(1);let _="",j=$;const _e=j.split("/");if(_e.length>1&&(_=_e.slice(0,-1).join("/"),j=_e.pop()),j){const et=j.match(/^\d+/);et&&(j=et[0])}return dsnFromComponents({host:g,pass:d,path:_,projectId:j,port:b,protocol:a,publicKey:c})}function dsnFromComponents(s){return{protocol:s.protocol,publicKey:s.publicKey||"",pass:s.pass||"",host:s.host,port:s.port||"",path:s.path||"",projectId:s.projectId}}function validateDsn(s){return!0}function makeDsn(s){const i=typeof s=="string"?dsnFromString(s):dsnFromComponents(s);if(!(!i||!validateDsn()))return i}class SentryError extends Error{constructor(i,a="warn"){super(i),this.message=i,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=a}}function fill(s,i,a){if(!(i in s))return;const c=s[i],d=a(c);typeof d=="function"&&markFunctionWrapped(d,c),s[i]=d}function addNonEnumerableProperty(s,i,a){try{Object.defineProperty(s,i,{value:a,writable:!0,configurable:!0})}catch{}}function markFunctionWrapped(s,i){try{const a=i.prototype||{};s.prototype=i.prototype=a,addNonEnumerableProperty(s,"__sentry_original__",i)}catch{}}function getOriginalFunction(s){return s.__sentry_original__}function urlEncode(s){return Object.keys(s).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(s[i])}`).join("&")}function convertToPlainObject(s){if(isError(s))return{message:s.message,name:s.name,stack:s.stack,...getOwnProperties(s)};if(isEvent(s)){const i={type:s.type,target:serializeEventTarget(s.target),currentTarget:serializeEventTarget(s.currentTarget),...getOwnProperties(s)};return typeof CustomEvent<"u"&&isInstanceOf(s,CustomEvent)&&(i.detail=s.detail),i}else return s}function serializeEventTarget(s){try{return isElement$1(s)?htmlTreeAsString(s):Object.prototype.toString.call(s)}catch{return""}}function getOwnProperties(s){if(typeof s=="object"&&s!==null){const i={};for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&(i[a]=s[a]);return i}else return{}}function extractExceptionKeysForMessage(s,i=40){const a=Object.keys(convertToPlainObject(s));if(a.sort(),!a.length)return"[object has no keys]";if(a[0].length>=i)return truncate(a[0],i);for(let c=a.length;c>0;c--){const d=a.slice(0,c).join(", ");if(!(d.length>i))return c===a.length?d:truncate(d,i)}return""}function dropUndefinedKeys(s){return _dropUndefinedKeys(s,new Map)}function _dropUndefinedKeys(s,i){if(isPlainObject$1(s)){const a=i.get(s);if(a!==void 0)return a;const c={};i.set(s,c);for(const d of Object.keys(s))typeof s[d]<"u"&&(c[d]=_dropUndefinedKeys(s[d],i));return c}if(Array.isArray(s)){const a=i.get(s);if(a!==void 0)return a;const c=[];return i.set(s,c),s.forEach(d=>{c.push(_dropUndefinedKeys(d,i))}),c}return s}function uuid4(){const s=GLOBAL_OBJ,i=s.crypto||s.msCrypto;let a=()=>Math.random()*16;try{if(i&&i.randomUUID)return i.randomUUID().replace(/-/g,"");i&&i.getRandomValues&&(a=()=>i.getRandomValues(new Uint8Array(1))[0])}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,c=>(c^(a()&15)>>c/4).toString(16))}function getFirstException(s){return s.exception&&s.exception.values?s.exception.values[0]:void 0}function getEventDescription(s){const{message:i,event_id:a}=s;if(i)return i;const c=getFirstException(s);return c?c.type&&c.value?`${c.type}: ${c.value}`:c.type||c.value||a||"":a||""}function addExceptionTypeValue(s,i,a){const c=s.exception=s.exception||{},d=c.values=c.values||[],g=d[0]=d[0]||{};g.value||(g.value=i||""),g.type||(g.type=a||"Error")}function addExceptionMechanism(s,i){const a=getFirstException(s);if(!a)return;const c={type:"generic",handled:!0},d=a.mechanism;if(a.mechanism={...c,...d,...i},i&&"data"in i){const g={...d&&d.data,...i.data};a.mechanism.data=g}}function checkOrSetAlreadyCaught(s){if(s&&s.__sentry_captured__)return!0;try{addNonEnumerableProperty(s,"__sentry_captured__",!0)}catch{}return!1}function arrayify(s){return Array.isArray(s)?s:[s]}const STACKTRACE_FRAME_LIMIT=50,WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...s){const i=s.sort((a,c)=>a[0]-c[0]).map(a=>a[1]);return(a,c=0)=>{const d=[],g=a.split(` `);for(let b=c;b1024)continue;const _=WEBPACK_ERROR_REGEXP.test($)?$.replace(WEBPACK_ERROR_REGEXP,"$1"):$;if(!_.match(/\S*Error: /)){for(const j of i){const _e=j(_);if(_e){d.push(_e);break}}if(d.length>=STACKTRACE_FRAME_LIMIT)break}}return stripSentryFramesAndReverse(d)}}function stackParserFromStackParserOptions(s){return Array.isArray(s)?createStackParser(...s):s}function stripSentryFramesAndReverse(s){if(!s.length)return[];const i=Array.from(s);return/sentryWrapped/.test(i[i.length-1].function||"")&&i.pop(),i.reverse(),STRIP_FRAME_REGEXP.test(i[i.length-1].function||"")&&(i.pop(),STRIP_FRAME_REGEXP.test(i[i.length-1].function||"")&&i.pop()),i.slice(0,STACKTRACE_FRAME_LIMIT).map(a=>({...a,filename:a.filename||i[i.length-1].filename,function:a.function||"?"}))}const defaultFunctionName="";function getFunctionName(s){try{return!s||typeof s!="function"?defaultFunctionName:s.name||defaultFunctionName}catch{return defaultFunctionName}}const WINDOW$5=getGlobalObject();function supportsFetch(){if(!("fetch"in WINDOW$5))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFetch(s){return s&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(s.toString())}function supportsNativeFetch(){if(!supportsFetch())return!1;if(isNativeFetch(WINDOW$5.fetch))return!0;let s=!1;const i=WINDOW$5.document;if(i&&typeof i.createElement=="function")try{const a=i.createElement("iframe");a.hidden=!0,i.head.appendChild(a),a.contentWindow&&a.contentWindow.fetch&&(s=isNativeFetch(a.contentWindow.fetch)),i.head.removeChild(a)}catch{}return s}const WINDOW$4=getGlobalObject();function supportsHistory(){const s=WINDOW$4.chrome,i=s&&s.app&&s.app.runtime,a="history"in WINDOW$4&&!!WINDOW$4.history.pushState&&!!WINDOW$4.history.replaceState;return!i&&a}const WINDOW$3=getGlobalObject(),SENTRY_XHR_DATA_KEY="__sentry_xhr_v2__",handlers$1={},instrumented$1={};function instrument(s){if(!instrumented$1[s])switch(instrumented$1[s]=!0,s){case"console":instrumentConsole();break;case"dom":instrumentDOM();break;case"xhr":instrumentXHR();break;case"fetch":instrumentFetch();break;case"history":instrumentHistory();break;case"error":instrumentError();break;case"unhandledrejection":instrumentUnhandledRejection();break;default:return}}function addInstrumentationHandler(s,i){handlers$1[s]=handlers$1[s]||[],handlers$1[s].push(i),instrument(s)}function triggerHandlers$1(s,i){if(!(!s||!handlers$1[s]))for(const a of handlers$1[s]||[])try{a(i)}catch{}}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(s){s in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,s,function(i){return originalConsoleMethods[s]=i,function(...a){triggerHandlers$1("console",{args:a,level:s});const c=originalConsoleMethods[s];c&&c.apply(GLOBAL_OBJ.console,a)}})})}function instrumentFetch(){supportsNativeFetch()&&fill(GLOBAL_OBJ,"fetch",function(s){return function(...i){const{method:a,url:c}=parseFetchArgs(i),d={args:i,fetchData:{method:a,url:c},startTimestamp:Date.now()};return triggerHandlers$1("fetch",{...d}),s.apply(GLOBAL_OBJ,i).then(g=>(triggerHandlers$1("fetch",{...d,endTimestamp:Date.now(),response:g}),g),g=>{throw triggerHandlers$1("fetch",{...d,endTimestamp:Date.now(),error:g}),g})}})}function hasProp(s,i){return!!s&&typeof s=="object"&&!!s[i]}function getUrlFromResource(s){return typeof s=="string"?s:s?hasProp(s,"url")?s.url:s.toString?s.toString():"":""}function parseFetchArgs(s){if(s.length===0)return{method:"GET",url:""};if(s.length===2){const[a,c]=s;return{url:getUrlFromResource(a),method:hasProp(c,"method")?String(c.method).toUpperCase():"GET"}}const i=s[0];return{url:getUrlFromResource(i),method:hasProp(i,"method")?String(i.method).toUpperCase():"GET"}}function instrumentXHR(){if(!WINDOW$3.XMLHttpRequest)return;const s=XMLHttpRequest.prototype;fill(s,"open",function(i){return function(...a){const c=Date.now(),d=a[1],g=this[SENTRY_XHR_DATA_KEY]={method:isString$1(a[0])?a[0].toUpperCase():a[0],url:a[1],request_headers:{}};isString$1(d)&&g.method==="POST"&&d.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const b=()=>{const $=this[SENTRY_XHR_DATA_KEY];if($&&this.readyState===4){try{$.status_code=this.status}catch{}triggerHandlers$1("xhr",{args:a,endTimestamp:Date.now(),startTimestamp:c,xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?fill(this,"onreadystatechange",function($){return function(..._){return b(),$.apply(this,_)}}):this.addEventListener("readystatechange",b),fill(this,"setRequestHeader",function($){return function(..._){const[j,_e]=_,et=this[SENTRY_XHR_DATA_KEY];return et&&(et.request_headers[j.toLowerCase()]=_e),$.apply(this,_)}}),i.apply(this,a)}}),fill(s,"send",function(i){return function(...a){const c=this[SENTRY_XHR_DATA_KEY];return c&&a[0]!==void 0&&(c.body=a[0]),triggerHandlers$1("xhr",{args:a,startTimestamp:Date.now(),xhr:this}),i.apply(this,a)}})}let lastHref;function instrumentHistory(){if(!supportsHistory())return;const s=WINDOW$3.onpopstate;WINDOW$3.onpopstate=function(...a){const c=WINDOW$3.location.href,d=lastHref;if(lastHref=c,triggerHandlers$1("history",{from:d,to:c}),s)try{return s.apply(this,a)}catch{}};function i(a){return function(...c){const d=c.length>2?c[2]:void 0;if(d){const g=lastHref,b=String(d);lastHref=b,triggerHandlers$1("history",{from:g,to:b})}return a.apply(this,c)}}fill(WINDOW$3.history,"pushState",i),fill(WINDOW$3.history,"replaceState",i)}const DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function isSimilarToLastCapturedEvent(s){if(s.type!==lastCapturedEventType)return!1;try{if(!s.target||s.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(s,i){return s!=="keypress"?!1:!i||!i.tagName?!0:!(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable)}function getEventTarget(s){try{return s.target}catch{return null}}function makeDOMEventHandler(s,i=!1){return a=>{if(!a||a._sentryCaptured)return;const c=getEventTarget(a);if(shouldSkipDOMEvent(a.type,c))return;addNonEnumerableProperty(a,"_sentryCaptured",!0),c&&!c._sentryId&&addNonEnumerableProperty(c,"_sentryId",uuid4());const d=a.type==="keypress"?"input":a.type;isSimilarToLastCapturedEvent(a)||(s({event:a,name:d,global:i}),lastCapturedEventType=a.type,lastCapturedEventTargetId=c?c._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW$3.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function instrumentDOM(){if(!WINDOW$3.document)return;const s=triggerHandlers$1.bind(null,"dom"),i=makeDOMEventHandler(s,!0);WINDOW$3.document.addEventListener("click",i,!1),WINDOW$3.document.addEventListener("keypress",i,!1),["EventTarget","Node"].forEach(a=>{const c=WINDOW$3[a]&&WINDOW$3[a].prototype;!c||!c.hasOwnProperty||!c.hasOwnProperty("addEventListener")||(fill(c,"addEventListener",function(d){return function(g,b,$){if(g==="click"||g=="keypress")try{const _=this,j=_.__sentry_instrumentation_handlers__=_.__sentry_instrumentation_handlers__||{},_e=j[g]=j[g]||{refCount:0};if(!_e.handler){const et=makeDOMEventHandler(s);_e.handler=et,d.call(this,g,et,$)}_e.refCount++}catch{}return d.call(this,g,b,$)}}),fill(c,"removeEventListener",function(d){return function(g,b,$){if(g==="click"||g=="keypress")try{const _=this,j=_.__sentry_instrumentation_handlers__||{},_e=j[g];_e&&(_e.refCount--,_e.refCount<=0&&(d.call(this,g,_e.handler,$),_e.handler=void 0,delete j[g]),Object.keys(j).length===0&&delete _.__sentry_instrumentation_handlers__)}catch{}return d.call(this,g,b,$)}}))})}let _oldOnErrorHandler=null;function instrumentError(){_oldOnErrorHandler=WINDOW$3.onerror,WINDOW$3.onerror=function(s,i,a,c,d){return triggerHandlers$1("error",{column:c,error:d,line:a,msg:s,url:i}),_oldOnErrorHandler&&!_oldOnErrorHandler.__SENTRY_LOADER__?_oldOnErrorHandler.apply(this,arguments):!1},WINDOW$3.onerror.__SENTRY_INSTRUMENTED__=!0}let _oldOnUnhandledRejectionHandler=null;function instrumentUnhandledRejection(){_oldOnUnhandledRejectionHandler=WINDOW$3.onunhandledrejection,WINDOW$3.onunhandledrejection=function(s){return triggerHandlers$1("unhandledrejection",s),_oldOnUnhandledRejectionHandler&&!_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__?_oldOnUnhandledRejectionHandler.apply(this,arguments):!0},WINDOW$3.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function isBrowserBundle(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function getSDKSource(){return"npm"}function isNodeEnv(){return!isBrowserBundle()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function dynamicRequire(s,i){return s.require(i)}function memoBuilder(){const s=typeof WeakSet=="function",i=s?new WeakSet:[];function a(d){if(s)return i.has(d)?!0:(i.add(d),!1);for(let g=0;ga?normalizeToSize(s,i-1,a):c}function visit(s,i,a=1/0,c=1/0,d=memoBuilder()){const[g,b]=d;if(i==null||["number","boolean","string"].includes(typeof i)&&!isNaN$1(i))return i;const $=stringifyValue(s,i);if(!$.startsWith("[object "))return $;if(i.__sentry_skip_normalization__)return i;const _=typeof i.__sentry_override_normalization_depth__=="number"?i.__sentry_override_normalization_depth__:a;if(_===0)return $.replace("object ","");if(g(i))return"[Circular ~]";const j=i;if(j&&typeof j.toJSON=="function")try{const nt=j.toJSON();return visit("",nt,_-1,c,d)}catch{}const _e=Array.isArray(i)?[]:{};let et=0;const tt=convertToPlainObject(i);for(const nt in tt){if(!Object.prototype.hasOwnProperty.call(tt,nt))continue;if(et>=c){_e[nt]="[MaxProperties ~]";break}const rt=tt[nt];_e[nt]=visit(nt,rt,_-1,c,d),et++}return b(i),_e}function stringifyValue(s,i){try{if(s==="domain"&&i&&typeof i=="object"&&i._events)return"[Domain]";if(s==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&i===global)return"[Global]";if(typeof window<"u"&&i===window)return"[Window]";if(typeof document<"u"&&i===document)return"[Document]";if(isVueViewModel(i))return"[VueViewModel]";if(isSyntheticEvent(i))return"[SyntheticEvent]";if(typeof i=="number"&&i!==i)return"[NaN]";if(typeof i=="function")return`[Function: ${getFunctionName(i)}]`;if(typeof i=="symbol")return`[${String(i)}]`;if(typeof i=="bigint")return`[BigInt: ${String(i)}]`;const a=getConstructorName(i);return/^HTML(\w*)Element$/.test(a)?`[HTMLElement: ${a}]`:`[object ${a}]`}catch(a){return`**non-serializable** (${a})`}}function getConstructorName(s){const i=Object.getPrototypeOf(s);return i?i.constructor.name:"null prototype"}function utf8Length(s){return~-encodeURI(s).split(/%..|./).length}function jsonSize(s){return utf8Length(JSON.stringify(s))}var States;(function(s){s[s.PENDING=0]="PENDING";const a=1;s[s.RESOLVED=a]="RESOLVED";const c=2;s[s.REJECTED=c]="REJECTED"})(States||(States={}));function resolvedSyncPromise(s){return new SyncPromise(i=>{i(s)})}function rejectedSyncPromise(s){return new SyncPromise((i,a)=>{a(s)})}class SyncPromise{constructor(i){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),this._state=States.PENDING,this._handlers=[];try{i(this._resolve,this._reject)}catch(a){this._reject(a)}}then(i,a){return new SyncPromise((c,d)=>{this._handlers.push([!1,g=>{if(!i)c(g);else try{c(i(g))}catch(b){d(b)}},g=>{if(!a)d(g);else try{c(a(g))}catch(b){d(b)}}]),this._executeHandlers()})}catch(i){return this.then(a=>a,i)}finally(i){return new SyncPromise((a,c)=>{let d,g;return this.then(b=>{g=!1,d=b,i&&i()},b=>{g=!0,d=b,i&&i()}).then(()=>{if(g){c(d);return}a(d)})})}__init(){this._resolve=i=>{this._setResult(States.RESOLVED,i)}}__init2(){this._reject=i=>{this._setResult(States.REJECTED,i)}}__init3(){this._setResult=(i,a)=>{if(this._state===States.PENDING){if(isThenable(a)){a.then(this._resolve,this._reject);return}this._state=i,this._value=a,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===States.PENDING)return;const i=this._handlers.slice();this._handlers=[],i.forEach(a=>{a[0]||(this._state===States.RESOLVED&&a[1](this._value),this._state===States.REJECTED&&a[2](this._value),a[0]=!0)})}}}function makePromiseBuffer(s){const i=[];function a(){return s===void 0||i.lengthc($)).then(null,()=>c($).then(null,()=>{})),$}function g(b){return new SyncPromise(($,_)=>{let j=i.length;if(!j)return $(!0);const _e=setTimeout(()=>{b&&b>0&&$(!1)},b);i.forEach(et=>{resolvedSyncPromise(et).then(()=>{--j||(clearTimeout(_e),$(!0))},_)})})}return{$:i,add:d,drain:g}}function parseUrl(s){if(!s)return{};const i=s.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!i)return{};const a=i[6]||"",c=i[8]||"";return{host:i[4],path:i[5],protocol:i[2],search:a,hash:c,relative:i[5]+a+c}}const validSeverityLevels=["fatal","error","warning","log","info","debug"];function severityLevelFromString(s){return s==="warn"?"warning":validSeverityLevels.includes(s)?s:"log"}const WINDOW$2=getGlobalObject(),dateTimestampSource={nowSeconds:()=>Date.now()/1e3};function getBrowserPerformance(){const{performance:s}=WINDOW$2;if(!s||!s.now)return;const i=Date.now()-s.now();return{now:()=>s.now(),timeOrigin:i}}function getNodePerformance(){try{return dynamicRequire(module,"perf_hooks").performance}catch{return}}const platformPerformance=isNodeEnv()?getNodePerformance():getBrowserPerformance(),timestampSource=platformPerformance===void 0?dateTimestampSource:{nowSeconds:()=>(platformPerformance.timeOrigin+platformPerformance.now())/1e3},dateTimestampInSeconds=dateTimestampSource.nowSeconds.bind(dateTimestampSource),timestampInSeconds=timestampSource.nowSeconds.bind(timestampSource),browserPerformanceTimeOrigin=(()=>{const{performance:s}=WINDOW$2;if(!s||!s.now)return;const i=3600*1e3,a=s.now(),c=Date.now(),d=s.timeOrigin?Math.abs(s.timeOrigin+a-c):i,g=d{const g=baggageHeaderToObject(d);return{...c,...g}},{});else{if(!s)return;i=baggageHeaderToObject(s)}const a=Object.entries(i).reduce((c,[d,g])=>{if(d.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)){const b=d.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);c[b]=g}return c},{});if(Object.keys(a).length>0)return a}function dynamicSamplingContextToSentryBaggageHeader(s){if(!s)return;const i=Object.entries(s).reduce((a,[c,d])=>(d&&(a[`${SENTRY_BAGGAGE_KEY_PREFIX}${c}`]=d),a),{});return objectToBaggageHeader(i)}function baggageHeaderToObject(s){return s.split(",").map(i=>i.split("=").map(a=>decodeURIComponent(a.trim()))).reduce((i,[a,c])=>(i[a]=c,i),{})}function objectToBaggageHeader(s){if(Object.keys(s).length!==0)return Object.entries(s).reduce((i,[a,c],d)=>{const g=`${encodeURIComponent(a)}=${encodeURIComponent(c)}`,b=d===0?g:`${i},${g}`;return b.length>MAX_BAGGAGE_STRING_LENGTH?i:b},"")}const TRACEPARENT_REGEXP=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function extractTraceparentData(s){if(!s)return;const i=s.match(TRACEPARENT_REGEXP);if(!i)return;let a;return i[3]==="1"?a=!0:i[3]==="0"&&(a=!1),{traceId:i[1],parentSampled:a,parentSpanId:i[2]}}function tracingContextFromHeaders(s,i){const a=extractTraceparentData(s),c=baggageHeaderToDynamicSamplingContext(i),{traceId:d,parentSpanId:g,parentSampled:b}=a||{},$={traceId:d||uuid4(),spanId:uuid4().substring(16),sampled:b};return g&&($.parentSpanId=g),c&&($.dsc=c),{traceparentData:a,dynamicSamplingContext:c,propagationContext:$}}function generateSentryTraceHeader(s=uuid4(),i=uuid4().substring(16),a){let c="";return a!==void 0&&(c=a?"-1":"-0"),`${s}-${i}${c}`}function createEnvelope(s,i=[]){return[s,i]}function addItemToEnvelope(s,i){const[a,c]=s;return[a,[...c,i]]}function forEachEnvelopeItem(s,i){const a=s[1];for(const c of a){const d=c[0].type;if(i(c,d))return!0}return!1}function encodeUTF8(s,i){return(i||new TextEncoder).encode(s)}function serializeEnvelope(s,i){const[a,c]=s;let d=JSON.stringify(a);function g(b){typeof d=="string"?d=typeof b=="string"?d+b:[encodeUTF8(d,i),b]:d.push(typeof b=="string"?encodeUTF8(b,i):b)}for(const b of c){const[$,_]=b;if(g(` ${JSON.stringify($)} `),typeof _=="string"||_ instanceof Uint8Array)g(_);else{let j;try{j=JSON.stringify(_)}catch{j=JSON.stringify(normalize(_))}g(j)}}return typeof d=="string"?d:concatBuffers(d)}function concatBuffers(s){const i=s.reduce((d,g)=>d+g.length,0),a=new Uint8Array(i);let c=0;for(const d of s)a.set(d,c),c+=d.length;return a}function createAttachmentEnvelopeItem(s,i){const a=typeof s.data=="string"?encodeUTF8(s.data,i):s.data;return[dropUndefinedKeys({type:"attachment",length:a.length,filename:s.filename,content_type:s.contentType,attachment_type:s.attachmentType}),a]}const ITEM_TYPE_TO_DATA_CATEGORY_MAP={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 envelopeItemTypeToDataCategory(s){return ITEM_TYPE_TO_DATA_CATEGORY_MAP[s]}function getSdkMetadataForEnvelopeHeader(s){if(!s||!s.sdk)return;const{name:i,version:a}=s.sdk;return{name:i,version:a}}function createEventEnvelopeHeaders(s,i,a,c){const d=s.sdkProcessingMetadata&&s.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:s.event_id,sent_at:new Date().toISOString(),...i&&{sdk:i},...!!a&&c&&{dsn:dsnToString(c)},...d&&{trace:dropUndefinedKeys({...d})}}}function createClientReportEnvelope(s,i,a){const c=[{type:"client_report"},{timestamp:a||dateTimestampInSeconds(),discarded_events:s}];return createEnvelope(i?{dsn:i}:{},[c])}const DEFAULT_RETRY_AFTER=60*1e3;function parseRetryAfterHeader(s,i=Date.now()){const a=parseInt(`${s}`,10);if(!isNaN(a))return a*1e3;const c=Date.parse(`${s}`);return isNaN(c)?DEFAULT_RETRY_AFTER:c-i}function disabledUntil(s,i){return s[i]||s.all||0}function isRateLimited(s,i,a=Date.now()){return disabledUntil(s,i)>a}function updateRateLimits(s,{statusCode:i,headers:a},c=Date.now()){const d={...s},g=a&&a["x-sentry-rate-limits"],b=a&&a["retry-after"];if(g)for(const $ of g.trim().split(",")){const[_,j]=$.split(":",2),_e=parseInt(_,10),et=(isNaN(_e)?60:_e)*1e3;if(!j)d.all=c+et;else for(const tt of j.split(";"))d[tt]=c+et}else b?d.all=c+parseRetryAfterHeader(b,c):i===429&&(d.all=c+60*1e3);return d}const DEFAULT_ENVIRONMENT="production";function getGlobalEventProcessors(){return getGlobalSingleton("globalEventProcessors",()=>[])}function addGlobalEventProcessor(s){getGlobalEventProcessors().push(s)}function notifyEventProcessors(s,i,a,c=0){return new SyncPromise((d,g)=>{const b=s[c];if(i===null||typeof b!="function")d(i);else{const $=b({...i},a);isThenable($)?$.then(_=>notifyEventProcessors(s,_,a,c+1).then(d)).then(null,g):notifyEventProcessors(s,$,a,c+1).then(d).then(null,g)}})}function makeSession(s){const i=timestampInSeconds(),a={sid:uuid4(),init:!0,timestamp:i,started:i,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sessionToJSON(a)};return s&&updateSession(a,s),a}function updateSession(s,i={}){if(i.user&&(!s.ipAddress&&i.user.ip_address&&(s.ipAddress=i.user.ip_address),!s.did&&!i.did&&(s.did=i.user.id||i.user.email||i.user.username)),s.timestamp=i.timestamp||timestampInSeconds(),i.abnormal_mechanism&&(s.abnormal_mechanism=i.abnormal_mechanism),i.ignoreDuration&&(s.ignoreDuration=i.ignoreDuration),i.sid&&(s.sid=i.sid.length===32?i.sid:uuid4()),i.init!==void 0&&(s.init=i.init),!s.did&&i.did&&(s.did=`${i.did}`),typeof i.started=="number"&&(s.started=i.started),s.ignoreDuration)s.duration=void 0;else if(typeof i.duration=="number")s.duration=i.duration;else{const a=s.timestamp-s.started;s.duration=a>=0?a:0}i.release&&(s.release=i.release),i.environment&&(s.environment=i.environment),!s.ipAddress&&i.ipAddress&&(s.ipAddress=i.ipAddress),!s.userAgent&&i.userAgent&&(s.userAgent=i.userAgent),typeof i.errors=="number"&&(s.errors=i.errors),i.status&&(s.status=i.status)}function closeSession(s,i){let a={};i?a={status:i}:s.status==="ok"&&(a={status:"exited"}),updateSession(s,a)}function sessionToJSON(s){return dropUndefinedKeys({sid:`${s.sid}`,init:s.init,started:new Date(s.started*1e3).toISOString(),timestamp:new Date(s.timestamp*1e3).toISOString(),status:s.status,errors:s.errors,did:typeof s.did=="number"||typeof s.did=="string"?`${s.did}`:void 0,duration:s.duration,abnormal_mechanism:s.abnormal_mechanism,attrs:{release:s.release,environment:s.environment,ip_address:s.ipAddress,user_agent:s.userAgent}})}const DEFAULT_MAX_BREADCRUMBS=100;class Scope{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=generatePropagationContext()}static clone(i){const a=new Scope;return i&&(a._breadcrumbs=[...i._breadcrumbs],a._tags={...i._tags},a._extra={...i._extra},a._contexts={...i._contexts},a._user=i._user,a._level=i._level,a._span=i._span,a._session=i._session,a._transactionName=i._transactionName,a._fingerprint=i._fingerprint,a._eventProcessors=[...i._eventProcessors],a._requestSession=i._requestSession,a._attachments=[...i._attachments],a._sdkProcessingMetadata={...i._sdkProcessingMetadata},a._propagationContext={...i._propagationContext}),a}addScopeListener(i){this._scopeListeners.push(i)}addEventProcessor(i){return this._eventProcessors.push(i),this}setUser(i){return this._user=i||{},this._session&&updateSession(this._session,{user:i}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(i){return this._requestSession=i,this}setTags(i){return this._tags={...this._tags,...i},this._notifyScopeListeners(),this}setTag(i,a){return this._tags={...this._tags,[i]:a},this._notifyScopeListeners(),this}setExtras(i){return this._extra={...this._extra,...i},this._notifyScopeListeners(),this}setExtra(i,a){return this._extra={...this._extra,[i]:a},this._notifyScopeListeners(),this}setFingerprint(i){return this._fingerprint=i,this._notifyScopeListeners(),this}setLevel(i){return this._level=i,this._notifyScopeListeners(),this}setTransactionName(i){return this._transactionName=i,this._notifyScopeListeners(),this}setContext(i,a){return a===null?delete this._contexts[i]:this._contexts[i]=a,this._notifyScopeListeners(),this}setSpan(i){return this._span=i,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const i=this.getSpan();return i&&i.transaction}setSession(i){return i?this._session=i:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(i){if(!i)return this;if(typeof i=="function"){const a=i(this);return a instanceof Scope?a:this}return i instanceof Scope?(this._tags={...this._tags,...i._tags},this._extra={...this._extra,...i._extra},this._contexts={...this._contexts,...i._contexts},i._user&&Object.keys(i._user).length&&(this._user=i._user),i._level&&(this._level=i._level),i._fingerprint&&(this._fingerprint=i._fingerprint),i._requestSession&&(this._requestSession=i._requestSession),i._propagationContext&&(this._propagationContext=i._propagationContext)):isPlainObject$1(i)&&(i=i,this._tags={...this._tags,...i.tags},this._extra={...this._extra,...i.extra},this._contexts={...this._contexts,...i.contexts},i.user&&(this._user=i.user),i.level&&(this._level=i.level),i.fingerprint&&(this._fingerprint=i.fingerprint),i.requestSession&&(this._requestSession=i.requestSession),i.propagationContext&&(this._propagationContext=i.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=generatePropagationContext(),this}addBreadcrumb(i,a){const c=typeof a=="number"?a:DEFAULT_MAX_BREADCRUMBS;if(c<=0)return this;const d={timestamp:dateTimestampInSeconds(),...i},g=this._breadcrumbs;return g.push(d),this._breadcrumbs=g.length>c?g.slice(-c):g,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(i){return this._attachments.push(i),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(i,a={},c){if(this._extra&&Object.keys(this._extra).length&&(i.extra={...this._extra,...i.extra}),this._tags&&Object.keys(this._tags).length&&(i.tags={...this._tags,...i.tags}),this._user&&Object.keys(this._user).length&&(i.user={...this._user,...i.user}),this._contexts&&Object.keys(this._contexts).length&&(i.contexts={...this._contexts,...i.contexts}),this._level&&(i.level=this._level),this._transactionName&&(i.transaction=this._transactionName),this._span){i.contexts={trace:this._span.getTraceContext(),...i.contexts};const b=this._span.transaction;if(b){i.sdkProcessingMetadata={dynamicSamplingContext:b.getDynamicSamplingContext(),...i.sdkProcessingMetadata};const $=b.name;$&&(i.tags={transaction:$,...i.tags})}}this._applyFingerprint(i);const d=this._getBreadcrumbs(),g=[...i.breadcrumbs||[],...d];return i.breadcrumbs=g.length>0?g:void 0,i.sdkProcessingMetadata={...i.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},notifyEventProcessors([...c||[],...getGlobalEventProcessors(),...this._eventProcessors],i,a)}setSDKProcessingMetadata(i){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...i},this}setPropagationContext(i){return this._propagationContext=i,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(i=>{i(this)}),this._notifyingListeners=!1)}_applyFingerprint(i){i.fingerprint=i.fingerprint?arrayify(i.fingerprint):[],this._fingerprint&&(i.fingerprint=i.fingerprint.concat(this._fingerprint)),i.fingerprint&&!i.fingerprint.length&&delete i.fingerprint}}function generatePropagationContext(){return{traceId:uuid4(),spanId:uuid4().substring(16)}}const API_VERSION=4,DEFAULT_BREADCRUMBS=100;class Hub{constructor(i,a=new Scope,c=API_VERSION){this._version=c,this._stack=[{scope:a}],i&&this.bindClient(i)}isOlderThan(i){return this._version{g.captureException(i,{originalException:i,syntheticException:d,...a,event_id:c},b)}),c}captureMessage(i,a,c){const d=this._lastEventId=c&&c.event_id?c.event_id:uuid4(),g=new Error(i);return this._withClient((b,$)=>{b.captureMessage(i,a,{originalException:i,syntheticException:g,...c,event_id:d},$)}),d}captureEvent(i,a){const c=a&&a.event_id?a.event_id:uuid4();return i.type||(this._lastEventId=c),this._withClient((d,g)=>{d.captureEvent(i,{...a,event_id:c},g)}),c}lastEventId(){return this._lastEventId}addBreadcrumb(i,a){const{scope:c,client:d}=this.getStackTop();if(!d)return;const{beforeBreadcrumb:g=null,maxBreadcrumbs:b=DEFAULT_BREADCRUMBS}=d.getOptions&&d.getOptions()||{};if(b<=0)return;const _={timestamp:dateTimestampInSeconds(),...i},j=g?consoleSandbox(()=>g(_,a)):_;j!==null&&(d.emit&&d.emit("beforeAddBreadcrumb",j,a),c.addBreadcrumb(j,b))}setUser(i){this.getScope().setUser(i)}setTags(i){this.getScope().setTags(i)}setExtras(i){this.getScope().setExtras(i)}setTag(i,a){this.getScope().setTag(i,a)}setExtra(i,a){this.getScope().setExtra(i,a)}setContext(i,a){this.getScope().setContext(i,a)}configureScope(i){const{scope:a,client:c}=this.getStackTop();c&&i(a)}run(i){const a=makeMain(this);try{i(this)}finally{makeMain(a)}}getIntegration(i){const a=this.getClient();if(!a)return null;try{return a.getIntegration(i)}catch{return null}}startTransaction(i,a){return this._callExtensionMethod("startTransaction",i,a)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(i=!1){if(i)return this.endSession();this._sendSessionUpdate()}endSession(){const a=this.getStackTop().scope,c=a.getSession();c&&closeSession(c),this._sendSessionUpdate(),a.setSession()}startSession(i){const{scope:a,client:c}=this.getStackTop(),{release:d,environment:g=DEFAULT_ENVIRONMENT}=c&&c.getOptions()||{},{userAgent:b}=GLOBAL_OBJ.navigator||{},$=makeSession({release:d,environment:g,user:a.getUser(),...b&&{userAgent:b},...i}),_=a.getSession&&a.getSession();return _&&_.status==="ok"&&updateSession(_,{status:"exited"}),this.endSession(),a.setSession($),$}shouldSendDefaultPii(){const i=this.getClient(),a=i&&i.getOptions();return!!(a&&a.sendDefaultPii)}_sendSessionUpdate(){const{scope:i,client:a}=this.getStackTop(),c=i.getSession();c&&a&&a.captureSession&&a.captureSession(c)}_withClient(i){const{scope:a,client:c}=this.getStackTop();c&&i(c,a)}_callExtensionMethod(i,...a){const d=getMainCarrier().__SENTRY__;if(d&&d.extensions&&typeof d.extensions[i]=="function")return d.extensions[i].apply(this,a)}}function getMainCarrier(){return GLOBAL_OBJ.__SENTRY__=GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},GLOBAL_OBJ}function makeMain(s){const i=getMainCarrier(),a=getHubFromCarrier(i);return setHubOnCarrier(i,s),a}function getCurrentHub(){const s=getMainCarrier();if(s.__SENTRY__&&s.__SENTRY__.acs){const i=s.__SENTRY__.acs.getCurrentHub();if(i)return i}return getGlobalHub(s)}function getGlobalHub(s=getMainCarrier()){return(!hasHubOnCarrier(s)||getHubFromCarrier(s).isOlderThan(API_VERSION))&&setHubOnCarrier(s,new Hub),getHubFromCarrier(s)}function hasHubOnCarrier(s){return!!(s&&s.__SENTRY__&&s.__SENTRY__.hub)}function getHubFromCarrier(s){return getGlobalSingleton("hub",()=>new Hub,s)}function setHubOnCarrier(s,i){if(!s)return!1;const a=s.__SENTRY__=s.__SENTRY__||{};return a.hub=i,!0}function getActiveTransaction(s){return(s||getCurrentHub()).getScope().getTransaction()}let errorsInstrumented=!1;function registerErrorInstrumentation(){errorsInstrumented||(errorsInstrumented=!0,addInstrumentationHandler("error",errorCallback),addInstrumentationHandler("unhandledrejection",errorCallback))}function errorCallback(){const s=getActiveTransaction();if(s){const i="internal_error";s.setStatus(i)}}errorCallback.tag="sentry_tracingErrorCallback";class SpanRecorder{constructor(i=1e3){this._maxlen=i,this.spans=[]}add(i){this.spans.length>this._maxlen?i.spanRecorder=void 0:this.spans.push(i)}}class Span{constructor(i={}){this.traceId=i.traceId||uuid4(),this.spanId=i.spanId||uuid4().substring(16),this.startTimestamp=i.startTimestamp||timestampInSeconds(),this.tags=i.tags||{},this.data=i.data||{},this.instrumenter=i.instrumenter||"sentry",this.origin=i.origin||"manual",i.parentSpanId&&(this.parentSpanId=i.parentSpanId),"sampled"in i&&(this.sampled=i.sampled),i.op&&(this.op=i.op),i.description&&(this.description=i.description),i.name&&(this.description=i.name),i.status&&(this.status=i.status),i.endTimestamp&&(this.endTimestamp=i.endTimestamp)}get name(){return this.description||""}set name(i){this.setName(i)}startChild(i){const a=new Span({...i,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});return a.spanRecorder=this.spanRecorder,a.spanRecorder&&a.spanRecorder.add(a),a.transaction=this.transaction,a}setTag(i,a){return this.tags={...this.tags,[i]:a},this}setData(i,a){return this.data={...this.data,[i]:a},this}setStatus(i){return this.status=i,this}setHttpStatus(i){this.setTag("http.status_code",String(i)),this.setData("http.response.status_code",i);const a=spanStatusfromHttpCode(i);return a!=="unknown_error"&&this.setStatus(a),this}setName(i){this.description=i}isSuccess(){return this.status==="ok"}finish(i){this.endTimestamp=typeof i=="number"?i:timestampInSeconds()}toTraceparent(){return generateSentryTraceHeader(this.traceId,this.spanId,this.sampled)}toContext(){return dropUndefinedKeys({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(i){return this.data=i.data||{},this.description=i.description,this.endTimestamp=i.endTimestamp,this.op=i.op,this.parentSpanId=i.parentSpanId,this.sampled=i.sampled,this.spanId=i.spanId||this.spanId,this.startTimestamp=i.startTimestamp||this.startTimestamp,this.status=i.status,this.tags=i.tags||{},this.traceId=i.traceId||this.traceId,this}getTraceContext(){return dropUndefinedKeys({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 dropUndefinedKeys({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 spanStatusfromHttpCode(s){if(s<400&&s>=100)return"ok";if(s>=400&&s<500)switch(s){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(s>=500&&s<600)switch(s){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function getDynamicSamplingContextFromClient(s,i,a){const c=i.getOptions(),{publicKey:d}=i.getDsn()||{},{segment:g}=a&&a.getUser()||{},b=dropUndefinedKeys({environment:c.environment||DEFAULT_ENVIRONMENT,release:c.release,user_segment:g,public_key:d,trace_id:s});return i.emit&&i.emit("createDsc",b),b}class Transaction extends Span{constructor(i,a){super(i),delete this.description,this._measurements={},this._contexts={},this._hub=a||getCurrentHub(),this._name=i.name||"",this.metadata={source:"custom",...i.metadata,spanMetadata:{}},this._trimEnd=i.trimEnd,this.transaction=this;const c=this.metadata.dynamicSamplingContext;c&&(this._frozenDynamicSamplingContext={...c})}get name(){return this._name}set name(i){this.setName(i)}setName(i,a="custom"){this._name=i,this.metadata.source=a}initSpanRecorder(i=1e3){this.spanRecorder||(this.spanRecorder=new SpanRecorder(i)),this.spanRecorder.add(this)}setContext(i,a){a===null?delete this._contexts[i]:this._contexts[i]=a}setMeasurement(i,a,c=""){this._measurements[i]={value:a,unit:c}}setMetadata(i){this.metadata={...this.metadata,...i}}finish(i){const a=this._finishTransaction(i);if(a)return this._hub.captureEvent(a)}toContext(){const i=super.toContext();return dropUndefinedKeys({...i,name:this.name,trimEnd:this._trimEnd})}updateWithContext(i){return super.updateWithContext(i),this.name=i.name||"",this._trimEnd=i.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const i=this._hub||getCurrentHub(),a=i.getClient();if(!a)return{};const c=i.getScope(),d=getDynamicSamplingContextFromClient(this.traceId,a,c),g=this.metadata.sampleRate;g!==void 0&&(d.sample_rate=`${g}`);const b=this.metadata.source;return b&&b!=="url"&&(d.transaction=this.name),this.sampled!==void 0&&(d.sampled=String(this.sampled)),d}setHub(i){this._hub=i}_finishTransaction(i){if(this.endTimestamp!==void 0)return;this.name||(this.name=""),super.finish(i);const a=this._hub.getClient();if(a&&a.emit&&a.emit("finishTransaction",this),this.sampled!==!0){a&&a.recordDroppedEvent("sample_rate","transaction");return}const c=this.spanRecorder?this.spanRecorder.spans.filter($=>$!==this&&$.endTimestamp):[];this._trimEnd&&c.length>0&&(this.endTimestamp=c.reduce(($,_)=>$.endTimestamp&&_.endTimestamp?$.endTimestamp>_.endTimestamp?$:_:$).endTimestamp);const d=this.metadata,g={contexts:{...this._contexts,trace:this.getTraceContext()},spans:c,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...d,dynamicSamplingContext:this.getDynamicSamplingContext()},...d.source&&{transaction_info:{source:d.source}}};return Object.keys(this._measurements).length>0&&(g.measurements=this._measurements),g}}const TRACING_DEFAULTS={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},FINISH_REASON_TAG="finishReason",IDLE_TRANSACTION_FINISH_REASONS=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class IdleTransactionSpanRecorder extends SpanRecorder{constructor(i,a,c,d){super(d),this._pushActivity=i,this._popActivity=a,this.transactionSpanId=c}add(i){i.spanId!==this.transactionSpanId&&(i.finish=a=>{i.endTimestamp=typeof a=="number"?a:timestampInSeconds(),this._popActivity(i.spanId)},i.endTimestamp===void 0&&this._pushActivity(i.spanId)),super.add(i)}}class IdleTransaction extends Transaction{constructor(i,a,c=TRACING_DEFAULTS.idleTimeout,d=TRACING_DEFAULTS.finalTimeout,g=TRACING_DEFAULTS.heartbeatInterval,b=!1){super(i,a),this._idleHub=a,this._idleTimeout=c,this._finalTimeout=d,this._heartbeatInterval=g,this._onScope=b,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[4],b&&a.configureScope($=>$.setSpan(this)),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[3],this.finish())},this._finalTimeout)}finish(i=timestampInSeconds()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(FINISH_REASON_TAG,this._finishReason),this.spanRecorder){for(const a of this._beforeFinishCallbacks)a(this,i);this.spanRecorder.spans=this.spanRecorder.spans.filter(a=>{if(a.spanId===this.spanId)return!0;a.endTimestamp||(a.endTimestamp=i,a.setStatus("cancelled"));const c=a.startTimestamp{this._finished||this._pushActivity(d)},c=d=>{this._finished||this._popActivity(d)};this.spanRecorder=new IdleTransactionSpanRecorder(a,c,this.spanId,i),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(i,{restartOnChildSpanChange:a}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=a===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[5],this.finish(i)))}setFinishReason(i){this._finishReason=i}_restartIdleTimeout(i){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[1],this.finish(i))},this._idleTimeout)}_pushActivity(i){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),this.activities[i]=!0}_popActivity(i){if(this.activities[i]&&delete this.activities[i],Object.keys(this.activities).length===0){const a=timestampInSeconds();this._idleTimeoutCanceledPermanently?(this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[5],this.finish(a)):this._restartIdleTimeout(a+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const i=Object.keys(this.activities).join("");i===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=i,this._heartbeatCounter>=3?(this.setStatus("deadline_exceeded"),this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function hasTracingEnabled(s){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const i=getCurrentHub().getClient(),a=s||i&&i.getOptions();return!!a&&(a.enableTracing||"tracesSampleRate"in a||"tracesSampler"in a)}function sampleTransaction(s,i,a){if(!hasTracingEnabled(i))return s.sampled=!1,s;if(s.sampled!==void 0)return s.setMetadata({sampleRate:Number(s.sampled)}),s;let c;return typeof i.tracesSampler=="function"?(c=i.tracesSampler(a),s.setMetadata({sampleRate:Number(c)})):a.parentSampled!==void 0?c=a.parentSampled:typeof i.tracesSampleRate<"u"?(c=i.tracesSampleRate,s.setMetadata({sampleRate:Number(c)})):(c=1,s.setMetadata({sampleRate:c})),!isValidSampleRate(c)||!c?(s.sampled=!1,s):(s.sampled=Math.random()1)}function traceHeaders(){const i=this.getScope().getSpan();return i?{"sentry-trace":i.toTraceparent()}:{}}function _startTransaction(s,i){const a=this.getClient(),c=a&&a.getOptions()||{},d=c.instrumenter||"sentry",g=s.instrumenter||"sentry";d!==g&&(s.sampled=!1);let b=new Transaction(s,this);return b=sampleTransaction(b,c,{parentSampled:s.parentSampled,transactionContext:s,...i}),b.sampled&&b.initSpanRecorder(c._experiments&&c._experiments.maxSpans),a&&a.emit&&a.emit("startTransaction",b),b}function startIdleTransaction(s,i,a,c,d,g,b){const $=s.getClient(),_=$&&$.getOptions()||{};let j=new IdleTransaction(i,s,a,c,b,d);return j=sampleTransaction(j,_,{parentSampled:i.parentSampled,transactionContext:i,...g}),j.sampled&&j.initSpanRecorder(_._experiments&&_._experiments.maxSpans),$&&$.emit&&$.emit("startTransaction",j),j}function addTracingExtensions(){const s=getMainCarrier();s.__SENTRY__&&(s.__SENTRY__.extensions=s.__SENTRY__.extensions||{},s.__SENTRY__.extensions.startTransaction||(s.__SENTRY__.extensions.startTransaction=_startTransaction),s.__SENTRY__.extensions.traceHeaders||(s.__SENTRY__.extensions.traceHeaders=traceHeaders),registerErrorInstrumentation())}function captureException(s,i){return getCurrentHub().captureException(s,{captureContext:i})}function withScope(s){getCurrentHub().withScope(s)}const SENTRY_API_VERSION="7";function getBaseApiEndpoint(s){const i=s.protocol?`${s.protocol}:`:"",a=s.port?`:${s.port}`:"";return`${i}//${s.host}${a}${s.path?`/${s.path}`:""}/api/`}function _getIngestEndpoint(s){return`${getBaseApiEndpoint(s)}${s.projectId}/envelope/`}function _encodedAuth(s,i){return urlEncode({sentry_key:s.publicKey,sentry_version:SENTRY_API_VERSION,...i&&{sentry_client:`${i.name}/${i.version}`}})}function getEnvelopeEndpointWithUrlEncodedAuth(s,i={}){const a=typeof i=="string"?i:i.tunnel,c=typeof i=="string"||!i._metadata?void 0:i._metadata.sdk;return a||`${_getIngestEndpoint(s)}?${_encodedAuth(s,c)}`}function enhanceEventWithSdkInfo(s,i){return i&&(s.sdk=s.sdk||{},s.sdk.name=s.sdk.name||i.name,s.sdk.version=s.sdk.version||i.version,s.sdk.integrations=[...s.sdk.integrations||[],...i.integrations||[]],s.sdk.packages=[...s.sdk.packages||[],...i.packages||[]]),s}function createSessionEnvelope(s,i,a,c){const d=getSdkMetadataForEnvelopeHeader(a),g={sent_at:new Date().toISOString(),...d&&{sdk:d},...!!c&&i&&{dsn:dsnToString(i)}},b="aggregates"in s?[{type:"sessions"},s]:[{type:"session"},s.toJSON()];return createEnvelope(g,[b])}function createEventEnvelope(s,i,a,c){const d=getSdkMetadataForEnvelopeHeader(a),g=s.type&&s.type!=="replay_event"?s.type:"event";enhanceEventWithSdkInfo(s,a&&a.sdk);const b=createEventEnvelopeHeaders(s,d,c,i);return delete s.sdkProcessingMetadata,createEnvelope(b,[[{type:g},s]])}const installedIntegrations=[];function filterDuplicates(s){const i={};return s.forEach(a=>{const{name:c}=a,d=i[c];d&&!d.isDefaultInstance&&a.isDefaultInstance||(i[c]=a)}),Object.keys(i).map(a=>i[a])}function getIntegrationsToSetup(s){const i=s.defaultIntegrations||[],a=s.integrations;i.forEach(b=>{b.isDefaultInstance=!0});let c;Array.isArray(a)?c=[...i,...a]:typeof a=="function"?c=arrayify(a(i)):c=i;const d=filterDuplicates(c),g=findIndex(d,b=>b.name==="Debug");if(g!==-1){const[b]=d.splice(g,1);d.push(b)}return d}function setupIntegrations(s,i){const a={};return i.forEach(c=>{c&&setupIntegration(s,c,a)}),a}function setupIntegration(s,i,a){if(a[i.name]=i,installedIntegrations.indexOf(i.name)===-1&&(i.setupOnce(addGlobalEventProcessor,getCurrentHub),installedIntegrations.push(i.name)),s.on&&typeof i.preprocessEvent=="function"){const c=i.preprocessEvent.bind(i);s.on("preprocessEvent",(d,g)=>c(d,g,s))}if(s.addEventProcessor&&typeof i.processEvent=="function"){const c=i.processEvent.bind(i),d=Object.assign((g,b)=>c(g,b,s),{id:i.name});s.addEventProcessor(d)}}function findIndex(s,i){for(let a=0;att.name);applyClientOptions($,s),applyIntegrationsMetadata($,_),i.type===void 0&&applyDebugIds($,s.stackParser);let j=c;a.captureContext&&(j=Scope.clone(j).update(a.captureContext));let _e=resolvedSyncPromise($);const et=d&&d.getEventProcessors?d.getEventProcessors():[];if(j){if(j.getAttachments){const tt=[...a.attachments||[],...j.getAttachments()];tt.length&&(a.attachments=tt)}_e=j.applyToEvent($,a,et)}else _e=notifyEventProcessors([...et,...getGlobalEventProcessors()],$,a);return _e.then(tt=>(tt&&applyDebugMeta(tt),typeof g=="number"&&g>0?normalizeEvent(tt,g,b):tt))}function applyClientOptions(s,i){const{environment:a,release:c,dist:d,maxValueLength:g=250}=i;"environment"in s||(s.environment="environment"in i?a:DEFAULT_ENVIRONMENT),s.release===void 0&&c!==void 0&&(s.release=c),s.dist===void 0&&d!==void 0&&(s.dist=d),s.message&&(s.message=truncate(s.message,g));const b=s.exception&&s.exception.values&&s.exception.values[0];b&&b.value&&(b.value=truncate(b.value,g));const $=s.request;$&&$.url&&($.url=truncate($.url,g))}const debugIdStackParserCache=new WeakMap;function applyDebugIds(s,i){const a=GLOBAL_OBJ._sentryDebugIds;if(!a)return;let c;const d=debugIdStackParserCache.get(i);d?c=d:(c=new Map,debugIdStackParserCache.set(i,c));const g=Object.keys(a).reduce((b,$)=>{let _;const j=c.get($);j?_=j:(_=i($),c.set($,_));for(let _e=_.length-1;_e>=0;_e--){const et=_[_e];if(et.filename){b[et.filename]=a[$];break}}return b},{});try{s.exception.values.forEach(b=>{b.stacktrace.frames.forEach($=>{$.filename&&($.debug_id=g[$.filename])})})}catch{}}function applyDebugMeta(s){const i={};try{s.exception.values.forEach(c=>{c.stacktrace.frames.forEach(d=>{d.debug_id&&(d.abs_path?i[d.abs_path]=d.debug_id:d.filename&&(i[d.filename]=d.debug_id),delete d.debug_id)})})}catch{}if(Object.keys(i).length===0)return;s.debug_meta=s.debug_meta||{},s.debug_meta.images=s.debug_meta.images||[];const a=s.debug_meta.images;Object.keys(i).forEach(c=>{a.push({type:"sourcemap",code_file:c,debug_id:i[c]})})}function applyIntegrationsMetadata(s,i){i.length>0&&(s.sdk=s.sdk||{},s.sdk.integrations=[...s.sdk.integrations||[],...i])}function normalizeEvent(s,i,a){if(!s)return null;const c={...s,...s.breadcrumbs&&{breadcrumbs:s.breadcrumbs.map(d=>({...d,...d.data&&{data:normalize(d.data,i,a)}}))},...s.user&&{user:normalize(s.user,i,a)},...s.contexts&&{contexts:normalize(s.contexts,i,a)},...s.extra&&{extra:normalize(s.extra,i,a)}};return s.contexts&&s.contexts.trace&&c.contexts&&(c.contexts.trace=s.contexts.trace,s.contexts.trace.data&&(c.contexts.trace.data=normalize(s.contexts.trace.data,i,a))),s.spans&&(c.spans=s.spans.map(d=>(d.data&&(d.data=normalize(d.data,i,a)),d))),c}class BaseClient{constructor(i){if(this._options=i,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],i.dsn&&(this._dsn=makeDsn(i.dsn)),this._dsn){const a=getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,i);this._transport=i.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...i.transportOptions,url:a})}}captureException(i,a,c){if(checkOrSetAlreadyCaught(i))return;let d=a&&a.event_id;return this._process(this.eventFromException(i,a).then(g=>this._captureEvent(g,a,c)).then(g=>{d=g})),d}captureMessage(i,a,c,d){let g=c&&c.event_id;const b=isPrimitive$1(i)?this.eventFromMessage(String(i),a,c):this.eventFromException(i,c);return this._process(b.then($=>this._captureEvent($,c,d)).then($=>{g=$})),g}captureEvent(i,a,c){if(a&&a.originalException&&checkOrSetAlreadyCaught(a.originalException))return;let d=a&&a.event_id;return this._process(this._captureEvent(i,a,c).then(g=>{d=g})),d}captureSession(i){typeof i.release!="string"||(this.sendSession(i),updateSession(i,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(i){const a=this._transport;return a?this._isClientDoneProcessing(i).then(c=>a.flush(i).then(d=>c&&d)):resolvedSyncPromise(!0)}close(i){return this.flush(i).then(a=>(this.getOptions().enabled=!1,a))}getEventProcessors(){return this._eventProcessors}addEventProcessor(i){this._eventProcessors.push(i)}setupIntegrations(i){(i&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&(this._integrations=setupIntegrations(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(i){return this._integrations[i]}getIntegration(i){try{return this._integrations[i.id]||null}catch{return null}}addIntegration(i){setupIntegration(this,i,this._integrations)}sendEvent(i,a={}){this.emit("beforeSendEvent",i,a);let c=createEventEnvelope(i,this._dsn,this._options._metadata,this._options.tunnel);for(const g of a.attachments||[])c=addItemToEnvelope(c,createAttachmentEnvelopeItem(g,this._options.transportOptions&&this._options.transportOptions.textEncoder));const d=this._sendEnvelope(c);d&&d.then(g=>this.emit("afterSendEvent",i,g),null)}sendSession(i){const a=createSessionEnvelope(i,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(a)}recordDroppedEvent(i,a,c){if(this._options.sendClientReports){const d=`${i}:${a}`;this._outcomes[d]=this._outcomes[d]+1||1}}on(i,a){this._hooks[i]||(this._hooks[i]=[]),this._hooks[i].push(a)}emit(i,...a){this._hooks[i]&&this._hooks[i].forEach(c=>c(...a))}_updateSessionFromEvent(i,a){let c=!1,d=!1;const g=a.exception&&a.exception.values;if(g){d=!0;for(const _ of g){const j=_.mechanism;if(j&&j.handled===!1){c=!0;break}}}const b=i.status==="ok";(b&&i.errors===0||b&&c)&&(updateSession(i,{...c&&{status:"crashed"},errors:i.errors||Number(d||c)}),this.captureSession(i))}_isClientDoneProcessing(i){return new SyncPromise(a=>{let c=0;const d=1,g=setInterval(()=>{this._numProcessing==0?(clearInterval(g),a(!0)):(c+=d,i&&c>=i&&(clearInterval(g),a(!1)))},d)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(i,a,c){const d=this.getOptions(),g=Object.keys(this._integrations);return!a.integrations&&g.length>0&&(a.integrations=g),this.emit("preprocessEvent",i,a),prepareEvent(d,i,a,c,this).then(b=>{if(b===null)return b;const{propagationContext:$}=b.sdkProcessingMetadata||{};if(!(b.contexts&&b.contexts.trace)&&$){const{traceId:j,spanId:_e,parentSpanId:et,dsc:tt}=$;b.contexts={trace:{trace_id:j,span_id:_e,parent_span_id:et},...b.contexts};const nt=tt||getDynamicSamplingContextFromClient(j,this,c);b.sdkProcessingMetadata={dynamicSamplingContext:nt,...b.sdkProcessingMetadata}}return b})}_captureEvent(i,a={},c){return this._processEvent(i,a,c).then(d=>d.event_id,d=>{})}_processEvent(i,a,c){const d=this.getOptions(),{sampleRate:g}=d,b=isTransactionEvent(i),$=isErrorEvent(i),_=i.type||"error",j=`before send for type \`${_}\``;if($&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error",i),rejectedSyncPromise(new SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${g})`,"log"));const _e=_==="replay_event"?"replay":_;return this._prepareEvent(i,a,c).then(et=>{if(et===null)throw this.recordDroppedEvent("event_processor",_e,i),new SentryError("An event processor returned `null`, will not send event.","log");if(a.data&&a.data.__sentry__===!0)return et;const nt=processBeforeSend(d,et,a);return _validateBeforeSendResult(nt,j)}).then(et=>{if(et===null)throw this.recordDroppedEvent("before_send",_e,i),new SentryError(`${j} returned \`null\`, will not send event.`,"log");const tt=c&&c.getSession();!b&&tt&&this._updateSessionFromEvent(tt,et);const nt=et.transaction_info;if(b&&nt&&et.transaction!==i.transaction){const rt="custom";et.transaction_info={...nt,source:rt}}return this.sendEvent(et,a),et}).then(null,et=>{throw et instanceof SentryError?et:(this.captureException(et,{data:{__sentry__:!0},originalException:et}),new SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${et}`))})}_process(i){this._numProcessing++,i.then(a=>(this._numProcessing--,a),a=>(this._numProcessing--,a))}_sendEnvelope(i){if(this.emit("beforeEnvelope",i),this._isEnabled()&&this._transport)return this._transport.send(i).then(null,a=>{})}_clearOutcomes(){const i=this._outcomes;return this._outcomes={},Object.keys(i).map(a=>{const[c,d]=a.split(":");return{reason:c,category:d,quantity:i[a]}})}}function _validateBeforeSendResult(s,i){const a=`${i} must return \`null\` or a valid event.`;if(isThenable(s))return s.then(c=>{if(!isPlainObject$1(c)&&c!==null)throw new SentryError(a);return c},c=>{throw new SentryError(`${i} rejected with ${c}`)});if(!isPlainObject$1(s)&&s!==null)throw new SentryError(a);return s}function processBeforeSend(s,i,a){const{beforeSend:c,beforeSendTransaction:d}=s;return isErrorEvent(i)&&c?c(i,a):isTransactionEvent(i)&&d?d(i,a):i}function isErrorEvent(s){return s.type===void 0}function isTransactionEvent(s){return s.type==="transaction"}function initAndBind(s,i){i.debug===!0&&console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");const a=getCurrentHub();a.getScope().update(i.initialScope);const d=new s(i);a.bindClient(d)}const DEFAULT_TRANSPORT_BUFFER_SIZE=30;function createTransport(s,i,a=makePromiseBuffer(s.bufferSize||DEFAULT_TRANSPORT_BUFFER_SIZE)){let c={};const d=b=>a.drain(b);function g(b){const $=[];if(forEachEnvelopeItem(b,(et,tt)=>{const nt=envelopeItemTypeToDataCategory(tt);if(isRateLimited(c,nt)){const rt=getEventForEnvelopeItem(et,tt);s.recordDroppedEvent("ratelimit_backoff",nt,rt)}else $.push(et)}),$.length===0)return resolvedSyncPromise();const _=createEnvelope(b[0],$),j=et=>{forEachEnvelopeItem(_,(tt,nt)=>{const rt=getEventForEnvelopeItem(tt,nt);s.recordDroppedEvent(et,envelopeItemTypeToDataCategory(nt),rt)})},_e=()=>i({body:serializeEnvelope(_,s.textEncoder)}).then(et=>(et.statusCode!==void 0&&(et.statusCode<200||et.statusCode>=300),c=updateRateLimits(c,et),et),et=>{throw j("network_error"),et});return a.add(_e).then(et=>et,et=>{if(et instanceof SentryError)return j("queue_overflow"),resolvedSyncPromise();throw et})}return g.__sentry__baseTransport__=!0,{send:g,flush:d}}function getEventForEnvelopeItem(s,i){if(!(i!=="event"&&i!=="transaction"))return Array.isArray(s)?s[1]:void 0}const SDK_VERSION="7.78.0";let originalFunctionToString;class FunctionToString{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=FunctionToString.id}setupOnce(){originalFunctionToString=Function.prototype.toString;try{Function.prototype.toString=function(...i){const a=getOriginalFunction(this)||this;return originalFunctionToString.apply(a,i)}}catch{}}}FunctionToString.__initStatic();const DEFAULT_IGNORE_ERRORS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],DEFAULT_IGNORE_TRANSACTIONS=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/];class InboundFilters{static __initStatic(){this.id="InboundFilters"}constructor(i={}){this.name=InboundFilters.id,this._options=i}setupOnce(i,a){}processEvent(i,a,c){const d=c.getOptions(),g=_mergeOptions(this._options,d);return _shouldDropEvent$1(i,g)?null:i}}InboundFilters.__initStatic();function _mergeOptions(s={},i={}){return{allowUrls:[...s.allowUrls||[],...i.allowUrls||[]],denyUrls:[...s.denyUrls||[],...i.denyUrls||[]],ignoreErrors:[...s.ignoreErrors||[],...i.ignoreErrors||[],...s.disableErrorDefaults?[]:DEFAULT_IGNORE_ERRORS],ignoreTransactions:[...s.ignoreTransactions||[],...i.ignoreTransactions||[],...s.disableTransactionDefaults?[]:DEFAULT_IGNORE_TRANSACTIONS],ignoreInternal:s.ignoreInternal!==void 0?s.ignoreInternal:!0}}function _shouldDropEvent$1(s,i){return!!(i.ignoreInternal&&_isSentryError(s)||_isIgnoredError(s,i.ignoreErrors)||_isIgnoredTransaction(s,i.ignoreTransactions)||_isDeniedUrl(s,i.denyUrls)||!_isAllowedUrl(s,i.allowUrls))}function _isIgnoredError(s,i){return s.type||!i||!i.length?!1:_getPossibleEventMessages(s).some(a=>stringMatchesSomePattern(a,i))}function _isIgnoredTransaction(s,i){if(s.type!=="transaction"||!i||!i.length)return!1;const a=s.transaction;return a?stringMatchesSomePattern(a,i):!1}function _isDeniedUrl(s,i){if(!i||!i.length)return!1;const a=_getEventFilterUrl(s);return a?stringMatchesSomePattern(a,i):!1}function _isAllowedUrl(s,i){if(!i||!i.length)return!0;const a=_getEventFilterUrl(s);return a?stringMatchesSomePattern(a,i):!0}function _getPossibleEventMessages(s){const i=[];s.message&&i.push(s.message);let a;try{a=s.exception.values[s.exception.values.length-1]}catch{}return a&&a.value&&(i.push(a.value),a.type&&i.push(`${a.type}: ${a.value}`)),i}function _isSentryError(s){try{return s.exception.values[0].type==="SentryError"}catch{}return!1}function _getLastValidUrl(s=[]){for(let i=s.length-1;i>=0;i--){const a=s[i];if(a&&a.filename!==""&&a.filename!=="[native code]")return a.filename||null}return null}function _getEventFilterUrl(s){try{let i;try{i=s.exception.values[0].stacktrace.frames}catch{}return i?_getLastValidUrl(i):null}catch{return null}}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap$1(s,i={},a){if(typeof s!="function")return s;try{const d=s.__sentry_wrapped__;if(d)return d;if(getOriginalFunction(s))return s}catch{return s}const c=function(){const d=Array.prototype.slice.call(arguments);try{a&&typeof a=="function"&&a.apply(this,arguments);const g=d.map(b=>wrap$1(b,i));return s.apply(this,g)}catch(g){throw ignoreNextOnError(),withScope(b=>{b.addEventProcessor($=>(i.mechanism&&(addExceptionTypeValue($,void 0,void 0),addExceptionMechanism($,i.mechanism)),$.extra={...$.extra,arguments:d},$)),captureException(g)}),g}};try{for(const d in s)Object.prototype.hasOwnProperty.call(s,d)&&(c[d]=s[d])}catch{}markFunctionWrapped(c,s),addNonEnumerableProperty(s,"__sentry_wrapped__",c);try{Object.getOwnPropertyDescriptor(c,"name").configurable&&Object.defineProperty(c,"name",{get(){return s.name}})}catch{}return c}function exceptionFromError(s,i){const a=parseStackFrames(s,i),c={type:i&&i.name,value:extractMessage(i)};return a.length&&(c.stacktrace={frames:a}),c.type===void 0&&c.value===""&&(c.value="Unrecoverable error caught"),c}function eventFromPlainObject(s,i,a,c){const g=getCurrentHub().getClient(),b=g&&g.getOptions().normalizeDepth,$={exception:{values:[{type:isEvent(i)?i.constructor.name:c?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(i,{isUnhandledRejection:c})}]},extra:{__serialized__:normalizeToSize(i,b)}};if(a){const _=parseStackFrames(s,a);_.length&&($.exception.values[0].stacktrace={frames:_})}return $}function eventFromError(s,i){return{exception:{values:[exceptionFromError(s,i)]}}}function parseStackFrames(s,i){const a=i.stacktrace||i.stack||"",c=getPopSize(i);try{return s(a,c)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getPopSize(s){if(s){if(typeof s.framesToPop=="number")return s.framesToPop;if(reactMinifiedRegexp.test(s.message))return 1}return 0}function extractMessage(s){const i=s&&s.message;return i?i.error&&typeof i.error.message=="string"?i.error.message:i:"No error message"}function eventFromException(s,i,a,c){const d=a&&a.syntheticException||void 0,g=eventFromUnknownInput(s,i,d,c);return addExceptionMechanism(g),g.level="error",a&&a.event_id&&(g.event_id=a.event_id),resolvedSyncPromise(g)}function eventFromMessage(s,i,a="info",c,d){const g=c&&c.syntheticException||void 0,b=eventFromString(s,i,g,d);return b.level=a,c&&c.event_id&&(b.event_id=c.event_id),resolvedSyncPromise(b)}function eventFromUnknownInput(s,i,a,c,d){let g;if(isErrorEvent$1(i)&&i.error)return eventFromError(s,i.error);if(isDOMError(i)||isDOMException(i)){const b=i;if("stack"in i)g=eventFromError(s,i);else{const $=b.name||(isDOMError(b)?"DOMError":"DOMException"),_=b.message?`${$}: ${b.message}`:$;g=eventFromString(s,_,a,c),addExceptionTypeValue(g,_)}return"code"in b&&(g.tags={...g.tags,"DOMException.code":`${b.code}`}),g}return isError(i)?eventFromError(s,i):isPlainObject$1(i)||isEvent(i)?(g=eventFromPlainObject(s,i,a,d),addExceptionMechanism(g,{synthetic:!0}),g):(g=eventFromString(s,i,a,c),addExceptionTypeValue(g,`${i}`,void 0),addExceptionMechanism(g,{synthetic:!0}),g)}function eventFromString(s,i,a,c){const d={message:i};if(c&&a){const g=parseStackFrames(s,a);g.length&&(d.exception={values:[{value:i,stacktrace:{frames:g}}]})}return d}function getNonErrorObjectExceptionValue(s,{isUnhandledRejection:i}){const a=extractExceptionKeysForMessage(s),c=i?"promise rejection":"exception";return isErrorEvent$1(s)?`Event \`ErrorEvent\` captured as ${c} with message \`${s.message}\``:isEvent(s)?`Event \`${getObjectClassName(s)}\` (type=${s.type}) captured as ${c}`:`Object captured as ${c} with keys: ${a}`}function getObjectClassName(s){try{const i=Object.getPrototypeOf(s);return i?i.constructor.name:void 0}catch{}}function createUserFeedbackEnvelope(s,{metadata:i,tunnel:a,dsn:c}){const d={event_id:s.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!a&&!!c&&{dsn:dsnToString(c)}},g=createUserFeedbackEnvelopeItem(s);return createEnvelope(d,[g])}function createUserFeedbackEnvelopeItem(s){return[{type:"user_report"},s]}class BrowserClient extends BaseClient{constructor(i){const a=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();i._metadata=i._metadata||{},i._metadata.sdk=i._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${a}:@sentry/browser`,version:SDK_VERSION}],version:SDK_VERSION},super(i),i.sendClientReports&&WINDOW$1.document&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(i,a){return eventFromException(this._options.stackParser,i,a,this._options.attachStacktrace)}eventFromMessage(i,a="info",c){return eventFromMessage(this._options.stackParser,i,a,c,this._options.attachStacktrace)}captureUserFeedback(i){if(!this._isEnabled())return;const a=createUserFeedbackEnvelope(i,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(a)}_prepareEvent(i,a,c){return i.platform=i.platform||"javascript",super._prepareEvent(i,a,c)}_flushOutcomes(){const i=this._clearOutcomes();if(i.length===0||!this._dsn)return;const a=createClientReportEnvelope(i,this._options.tunnel&&dsnToString(this._dsn));this._sendEnvelope(a)}}let cachedFetchImpl;function getNativeFetchImplementation(){if(cachedFetchImpl)return cachedFetchImpl;if(isNativeFetch(WINDOW$1.fetch))return cachedFetchImpl=WINDOW$1.fetch.bind(WINDOW$1);const s=WINDOW$1.document;let i=WINDOW$1.fetch;if(s&&typeof s.createElement=="function")try{const a=s.createElement("iframe");a.hidden=!0,s.head.appendChild(a);const c=a.contentWindow;c&&c.fetch&&(i=c.fetch),s.head.removeChild(a)}catch{}return cachedFetchImpl=i.bind(WINDOW$1)}function clearCachedFetchImplementation(){cachedFetchImpl=void 0}function makeFetchTransport(s,i=getNativeFetchImplementation()){let a=0,c=0;function d(g){const b=g.body.length;a+=b,c++;const $={body:g.body,method:"POST",referrerPolicy:"origin",headers:s.headers,keepalive:a<=6e4&&c<15,...s.fetchOptions};try{return i(s.url,$).then(_=>(a-=b,c--,{statusCode:_.status,headers:{"x-sentry-rate-limits":_.headers.get("X-Sentry-Rate-Limits"),"retry-after":_.headers.get("Retry-After")}}))}catch(_){return clearCachedFetchImplementation(),a-=b,c--,rejectedSyncPromise(_)}}return createTransport(s,d)}const XHR_READYSTATE_DONE=4;function makeXHRTransport(s){function i(a){return new SyncPromise((c,d)=>{const g=new XMLHttpRequest;g.onerror=d,g.onreadystatechange=()=>{g.readyState===XHR_READYSTATE_DONE&&c({statusCode:g.status,headers:{"x-sentry-rate-limits":g.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":g.getResponseHeader("Retry-After")}})},g.open("POST",s.url);for(const b in s.headers)Object.prototype.hasOwnProperty.call(s.headers,b)&&g.setRequestHeader(b,s.headers[b]);g.send(a.body)})}return createTransport(s,i)}const UNKNOWN_FUNCTION="?",CHROME_PRIORITY=30,WINJS_PRIORITY=40,GECKO_PRIORITY=50;function createFrame(s,i,a,c){const d={filename:s,function:i,in_app:!0};return a!==void 0&&(d.lineno=a),c!==void 0&&(d.colno=c),d}const chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chrome=s=>{const i=chromeRegex.exec(s);if(i){if(i[2]&&i[2].indexOf("eval")===0){const g=chromeEvalRegex.exec(i[2]);g&&(i[2]=g[1],i[3]=g[2],i[4]=g[3])}const[c,d]=extractSafariExtensionDetails(i[1]||UNKNOWN_FUNCTION,i[2]);return createFrame(d,c,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chrome],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=s=>{const i=geckoREgex.exec(s);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){const g=geckoEvalRegex.exec(i[3]);g&&(i[1]=i[1]||"eval",i[3]=g[1],i[4]=g[2],i[5]="")}let c=i[3],d=i[1]||UNKNOWN_FUNCTION;return[d,c]=extractSafariExtensionDetails(d,c),createFrame(c,d,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],winjsRegex=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,winjs=s=>{const i=winjsRegex.exec(s);return i?createFrame(i[2],i[1]||UNKNOWN_FUNCTION,+i[3],i[4]?+i[4]:void 0):void 0},winjsStackLineParser=[WINJS_PRIORITY,winjs],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser,winjsStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(s,i)=>{const a=s.indexOf("safari-extension")!==-1,c=s.indexOf("safari-web-extension")!==-1;return a||c?[s.indexOf("@")!==-1?s.split("@")[0]:UNKNOWN_FUNCTION,a?`safari-extension:${i}`:`safari-web-extension:${i}`]:[s,i]};class GlobalHandlers{static __initStatic(){this.id="GlobalHandlers"}constructor(i){this.name=GlobalHandlers.id,this._options={onerror:!0,onunhandledrejection:!0,...i},this._installFunc={onerror:_installGlobalOnErrorHandler,onunhandledrejection:_installGlobalOnUnhandledRejectionHandler}}setupOnce(){Error.stackTraceLimit=50;const i=this._options;for(const a in i){const c=this._installFunc[a];c&&i[a]&&(c(),this._installFunc[a]=void 0)}}}GlobalHandlers.__initStatic();function _installGlobalOnErrorHandler(){addInstrumentationHandler("error",s=>{const[i,a,c]=getHubAndOptions();if(!i.getIntegration(GlobalHandlers))return;const{msg:d,url:g,line:b,column:$,error:_}=s;if(shouldIgnoreOnError()||_&&_.__sentry_own_request__)return;const j=_===void 0&&isString$1(d)?_eventFromIncompleteOnError(d,g,b,$):_enhanceEventWithInitialFrame(eventFromUnknownInput(a,_||d,void 0,c,!1),g,b,$);j.level="error",addMechanismAndCapture(i,_,j,"onerror")})}function _installGlobalOnUnhandledRejectionHandler(){addInstrumentationHandler("unhandledrejection",s=>{const[i,a,c]=getHubAndOptions();if(!i.getIntegration(GlobalHandlers))return;let d=s;try{"reason"in s?d=s.reason:"detail"in s&&"reason"in s.detail&&(d=s.detail.reason)}catch{}if(shouldIgnoreOnError()||d&&d.__sentry_own_request__)return!0;const g=isPrimitive$1(d)?_eventFromRejectionWithPrimitive(d):eventFromUnknownInput(a,d,void 0,c,!0);g.level="error",addMechanismAndCapture(i,d,g,"onunhandledrejection")})}function _eventFromRejectionWithPrimitive(s){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}}function _eventFromIncompleteOnError(s,i,a,c){const d=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let g=isErrorEvent$1(s)?s.message:s,b="Error";const $=g.match(d);return $&&(b=$[1],g=$[2]),_enhanceEventWithInitialFrame({exception:{values:[{type:b,value:g}]}},i,a,c)}function _enhanceEventWithInitialFrame(s,i,a,c){const d=s.exception=s.exception||{},g=d.values=d.values||[],b=g[0]=g[0]||{},$=b.stacktrace=b.stacktrace||{},_=$.frames=$.frames||[],j=isNaN(parseInt(c,10))?void 0:c,_e=isNaN(parseInt(a,10))?void 0:a,et=isString$1(i)&&i.length>0?i:getLocationHref();return _.length===0&&_.push({colno:j,filename:et,function:"?",in_app:!0,lineno:_e}),s}function addMechanismAndCapture(s,i,a,c){addExceptionMechanism(a,{handled:!1,type:c}),s.captureEvent(a,{originalException:i})}function getHubAndOptions(){const s=getCurrentHub(),i=s.getClient(),a=i&&i.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[s,a.stackParser,a.attachStacktrace]}const DEFAULT_EVENT_TARGET=["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 TryCatch{static __initStatic(){this.id="TryCatch"}constructor(i){this.name=TryCatch.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...i}}setupOnce(){this._options.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),this._options.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),this._options.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),this._options.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const i=this._options.eventTarget;i&&(Array.isArray(i)?i:DEFAULT_EVENT_TARGET).forEach(_wrapEventTarget)}}TryCatch.__initStatic();function _wrapTimeFunction(s){return function(...i){const a=i[0];return i[0]=wrap$1(a,{mechanism:{data:{function:getFunctionName(s)},handled:!1,type:"instrument"}}),s.apply(this,i)}}function _wrapRAF(s){return function(i){return s.apply(this,[wrap$1(i,{mechanism:{data:{function:"requestAnimationFrame",handler:getFunctionName(s)},handled:!1,type:"instrument"}})])}}function _wrapXHR(s){return function(...i){const a=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(d=>{d in a&&typeof a[d]=="function"&&fill(a,d,function(g){const b={mechanism:{data:{function:d,handler:getFunctionName(g)},handled:!1,type:"instrument"}},$=getOriginalFunction(g);return $&&(b.mechanism.data.handler=getFunctionName($)),wrap$1(g,b)})}),s.apply(this,i)}}function _wrapEventTarget(s){const i=WINDOW$1,a=i[s]&&i[s].prototype;!a||!a.hasOwnProperty||!a.hasOwnProperty("addEventListener")||(fill(a,"addEventListener",function(c){return function(d,g,b){try{typeof g.handleEvent=="function"&&(g.handleEvent=wrap$1(g.handleEvent,{mechanism:{data:{function:"handleEvent",handler:getFunctionName(g),target:s},handled:!1,type:"instrument"}}))}catch{}return c.apply(this,[d,wrap$1(g,{mechanism:{data:{function:"addEventListener",handler:getFunctionName(g),target:s},handled:!1,type:"instrument"}}),b])}}),fill(a,"removeEventListener",function(c){return function(d,g,b){const $=g;try{const _=$&&$.__sentry_wrapped__;_&&c.call(this,d,_,b)}catch{}return c.call(this,d,$,b)}}))}const MAX_ALLOWED_STRING_LENGTH=1024;class Breadcrumbs{static __initStatic(){this.id="Breadcrumbs"}constructor(i){this.name=Breadcrumbs.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...i}}setupOnce(){if(this.options.console&&addInstrumentationHandler("console",_consoleBreadcrumb),this.options.dom&&addInstrumentationHandler("dom",_domBreadcrumb(this.options.dom)),this.options.xhr&&addInstrumentationHandler("xhr",_xhrBreadcrumb),this.options.fetch&&addInstrumentationHandler("fetch",_fetchBreadcrumb),this.options.history&&addInstrumentationHandler("history",_historyBreadcrumb),this.options.sentry){const i=getCurrentHub().getClient();i&&i.on&&i.on("beforeSendEvent",addSentryBreadcrumb)}}}Breadcrumbs.__initStatic();function addSentryBreadcrumb(s){getCurrentHub().addBreadcrumb({category:`sentry.${s.type==="transaction"?"transaction":"event"}`,event_id:s.event_id,level:s.level,message:getEventDescription(s)},{event:s})}function _domBreadcrumb(s){function i(a){let c,d=typeof s=="object"?s.serializeAttribute:void 0,g=typeof s=="object"&&typeof s.maxStringLength=="number"?s.maxStringLength:void 0;g&&g>MAX_ALLOWED_STRING_LENGTH&&(g=MAX_ALLOWED_STRING_LENGTH),typeof d=="string"&&(d=[d]);try{const b=a.event;c=_isEvent(b)?htmlTreeAsString(b.target,{keyAttrs:d,maxStringLength:g}):htmlTreeAsString(b,{keyAttrs:d,maxStringLength:g})}catch{c=""}c.length!==0&&getCurrentHub().addBreadcrumb({category:`ui.${a.name}`,message:c},{event:a.event,name:a.name,global:a.global})}return i}function _consoleBreadcrumb(s){const i={category:"console",data:{arguments:s.args,logger:"console"},level:severityLevelFromString(s.level),message:safeJoin(s.args," ")};if(s.level==="assert")if(s.args[0]===!1)i.message=`Assertion failed: ${safeJoin(s.args.slice(1)," ")||"console.assert"}`,i.data.arguments=s.args.slice(1);else return;getCurrentHub().addBreadcrumb(i,{input:s.args,level:s.level})}function _xhrBreadcrumb(s){const{startTimestamp:i,endTimestamp:a}=s,c=s.xhr[SENTRY_XHR_DATA_KEY];if(!i||!a||!c)return;const{method:d,url:g,status_code:b,body:$}=c,_={method:d,url:g,status_code:b},j={xhr:s.xhr,input:$,startTimestamp:i,endTimestamp:a};getCurrentHub().addBreadcrumb({category:"xhr",data:_,type:"http"},j)}function _fetchBreadcrumb(s){const{startTimestamp:i,endTimestamp:a}=s;if(a&&!(s.fetchData.url.match(/sentry_key/)&&s.fetchData.method==="POST"))if(s.error){const c=s.fetchData,d={data:s.error,input:s.args,startTimestamp:i,endTimestamp:a};getCurrentHub().addBreadcrumb({category:"fetch",data:c,level:"error",type:"http"},d)}else{const c={...s.fetchData,status_code:s.response&&s.response.status},d={input:s.args,response:s.response,startTimestamp:i,endTimestamp:a};getCurrentHub().addBreadcrumb({category:"fetch",data:c,type:"http"},d)}}function _historyBreadcrumb(s){let i=s.from,a=s.to;const c=parseUrl(WINDOW$1.location.href);let d=parseUrl(i);const g=parseUrl(a);d.path||(d=c),c.protocol===g.protocol&&c.host===g.host&&(a=g.relative),c.protocol===d.protocol&&c.host===d.host&&(i=d.relative),getCurrentHub().addBreadcrumb({category:"navigation",data:{from:i,to:a}})}function _isEvent(s){return!!s&&!!s.target}const DEFAULT_KEY="cause",DEFAULT_LIMIT=5;class LinkedErrors{static __initStatic(){this.id="LinkedErrors"}constructor(i={}){this.name=LinkedErrors.id,this._key=i.key||DEFAULT_KEY,this._limit=i.limit||DEFAULT_LIMIT}setupOnce(){}preprocessEvent(i,a,c){const d=c.getOptions();applyAggregateErrorsToEvent(exceptionFromError,d.stackParser,d.maxValueLength,this._key,this._limit,i,a)}}LinkedErrors.__initStatic();class HttpContext{static __initStatic(){this.id="HttpContext"}constructor(){this.name=HttpContext.id}setupOnce(){}preprocessEvent(i){if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const a=i.request&&i.request.url||WINDOW$1.location&&WINDOW$1.location.href,{referrer:c}=WINDOW$1.document||{},{userAgent:d}=WINDOW$1.navigator||{},g={...i.request&&i.request.headers,...c&&{Referer:c},...d&&{"User-Agent":d}},b={...i.request,...a&&{url:a},headers:g};i.request=b}}HttpContext.__initStatic();class Dedupe{static __initStatic(){this.id="Dedupe"}constructor(){this.name=Dedupe.id}setupOnce(i,a){}processEvent(i){if(i.type)return i;try{if(_shouldDropEvent(i,this._previousEvent))return null}catch{}return this._previousEvent=i}}Dedupe.__initStatic();function _shouldDropEvent(s,i){return i?!!(_isSameMessageEvent(s,i)||_isSameExceptionEvent(s,i)):!1}function _isSameMessageEvent(s,i){const a=s.message,c=i.message;return!(!a&&!c||a&&!c||!a&&c||a!==c||!_isSameFingerprint(s,i)||!_isSameStacktrace(s,i))}function _isSameExceptionEvent(s,i){const a=_getExceptionFromEvent(i),c=_getExceptionFromEvent(s);return!(!a||!c||a.type!==c.type||a.value!==c.value||!_isSameFingerprint(s,i)||!_isSameStacktrace(s,i))}function _isSameStacktrace(s,i){let a=_getFramesFromEvent(s),c=_getFramesFromEvent(i);if(!a&&!c)return!0;if(a&&!c||!a&&c||(a=a,c=c,c.length!==a.length))return!1;for(let d=0;d"u")return;const s=getCurrentHub();s.captureSession&&(startSessionOnHub(s),addInstrumentationHandler("history",({from:i,to:a})=>{i===void 0||i===a||startSessionOnHub(getCurrentHub())}))}const WINDOW=GLOBAL_OBJ;function registerBackgroundTabDetection(){WINDOW&&WINDOW.document&&WINDOW.document.addEventListener("visibilitychange",()=>{const s=getActiveTransaction();if(WINDOW.document.hidden&&s){const i="cancelled";s.status||s.setStatus(i),s.setTag("visibilitychange","document.hidden"),s.finish()}})}const bindReporter=(s,i,a)=>{let c,d;return g=>{i.value>=0&&(g||a)&&(d=i.value-(c||0),(d||c===void 0)&&(c=i.value,i.delta=d,s(i)))}},generateUniqueID=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,getNavigationEntryFromPerformanceTiming=()=>{const s=WINDOW.performance.timing,i=WINDOW.performance.navigation.type,a={entryType:"navigation",startTime:0,type:i==2?"back_forward":i===1?"reload":"navigate"};for(const c in s)c!=="navigationStart"&&c!=="toJSON"&&(a[c]=Math.max(s[c]-s.navigationStart,0));return a},getNavigationEntry=()=>WINDOW.__WEB_VITALS_POLYFILL__?WINDOW.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||getNavigationEntryFromPerformanceTiming()):WINDOW.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],getActivationStart=()=>{const s=getNavigationEntry();return s&&s.activationStart||0},initMetric=(s,i)=>{const a=getNavigationEntry();let c="navigate";return a&&(WINDOW.document.prerendering||getActivationStart()>0?c="prerender":c=a.type.replace(/_/g,"-")),{name:s,value:typeof i>"u"?-1:i,rating:"good",delta:0,entries:[],id:generateUniqueID(),navigationType:c}},observe=(s,i,a)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(s)){const c=new PerformanceObserver(d=>{i(d.getEntries())});return c.observe(Object.assign({type:s,buffered:!0},a||{})),c}}catch{}},onHidden=(s,i)=>{const a=c=>{(c.type==="pagehide"||WINDOW.document.visibilityState==="hidden")&&(s(c),i&&(removeEventListener("visibilitychange",a,!0),removeEventListener("pagehide",a,!0)))};addEventListener("visibilitychange",a,!0),addEventListener("pagehide",a,!0)},onCLS=s=>{const i=initMetric("CLS",0);let a,c=0,d=[];const g=$=>{$.forEach(_=>{if(!_.hadRecentInput){const j=d[0],_e=d[d.length-1];c&&d.length!==0&&_.startTime-_e.startTime<1e3&&_.startTime-j.startTime<5e3?(c+=_.value,d.push(_)):(c=_.value,d=[_]),c>i.value&&(i.value=c,i.entries=d,a&&a())}})},b=observe("layout-shift",g);if(b){a=bindReporter(s,i);const $=()=>{g(b.takeRecords()),a(!0)};return onHidden($),$}};let firstHiddenTime=-1;const initHiddenTime=()=>WINDOW.document.visibilityState==="hidden"&&!WINDOW.document.prerendering?0:1/0,trackChanges=()=>{onHidden(({timeStamp:s})=>{firstHiddenTime=s},!0)},getVisibilityWatcher=()=>(firstHiddenTime<0&&(firstHiddenTime=initHiddenTime(),trackChanges()),{get firstHiddenTime(){return firstHiddenTime}}),onFID=s=>{const i=getVisibilityWatcher(),a=initMetric("FID");let c;const d=$=>{$.startTime{$.forEach(d)},b=observe("first-input",g);c=bindReporter(s,a),b&&onHidden(()=>{g(b.takeRecords()),b.disconnect()},!0)},reportedMetricIDs={},onLCP=s=>{const i=getVisibilityWatcher(),a=initMetric("LCP");let c;const d=b=>{const $=b[b.length-1];if($){const _=Math.max($.startTime-getActivationStart(),0);_{reportedMetricIDs[a.id]||(d(g.takeRecords()),g.disconnect(),reportedMetricIDs[a.id]=!0,c(!0))};return["keydown","click"].forEach($=>{addEventListener($,b,{once:!0,capture:!0})}),onHidden(b,!0),b}},handlers={},instrumented={};let _previousCls,_previousFid,_previousLcp;function addClsInstrumentationHandler(s){return addMetricObserver("cls",s,instrumentCls,_previousCls)}function addLcpInstrumentationHandler(s){return addMetricObserver("lcp",s,instrumentLcp,_previousLcp)}function addFidInstrumentationHandler(s){return addMetricObserver("fid",s,instrumentFid,_previousFid)}function addPerformanceInstrumentationHandler(s,i){return addHandler(s,i),instrumented[s]||(instrumentPerformanceObserver(s),instrumented[s]=!0),getCleanupCallback(s,i)}function triggerHandlers(s,i){const a=handlers[s];if(!(!a||!a.length))for(const c of a)try{c(i)}catch{}}function instrumentCls(){onCLS(s=>{triggerHandlers("cls",{metric:s}),_previousCls=s})}function instrumentFid(){onFID(s=>{triggerHandlers("fid",{metric:s}),_previousFid=s})}function instrumentLcp(){onLCP(s=>{triggerHandlers("lcp",{metric:s}),_previousLcp=s})}function addMetricObserver(s,i,a,c){return addHandler(s,i),instrumented[s]||(a(),instrumented[s]=!0),c&&i({metric:c}),getCleanupCallback(s,i)}function instrumentPerformanceObserver(s){const i={};s==="event"&&(i.durationThreshold=0),observe(s,a=>{triggerHandlers(s,{entries:a})},i)}function addHandler(s,i){handlers[s]=handlers[s]||[],handlers[s].push(i)}function getCleanupCallback(s,i){return()=>{const a=handlers[s];if(!a)return;const c=a.indexOf(i);c!==-1&&a.splice(c,1)}}function isMeasurementValue(s){return typeof s=="number"&&isFinite(s)}function _startChild(s,{startTimestamp:i,...a}){return i&&s.startTimestamp>i&&(s.startTimestamp=i),s.startChild({startTimestamp:i,...a})}function msToSec(s){return s/1e3}function getBrowserPerformanceAPI(){return WINDOW&&WINDOW.addEventListener&&WINDOW.performance}let _performanceCursor=0,_measurements={},_lcpEntry,_clsEntry;function startTrackingWebVitals(){const s=getBrowserPerformanceAPI();if(s&&browserPerformanceTimeOrigin){s.mark&&WINDOW.performance.mark("sentry-tracing-init");const i=_trackFID(),a=_trackCLS(),c=_trackLCP();return()=>{i(),a(),c()}}return()=>{}}function startTrackingLongTasks(){addPerformanceInstrumentationHandler("longtask",({entries:s})=>{for(const i of s){const a=getActiveTransaction();if(!a)return;const c=msToSec(browserPerformanceTimeOrigin+i.startTime),d=msToSec(i.duration);a.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:c,endTimestamp:c+d})}})}function startTrackingInteractions(){addPerformanceInstrumentationHandler("event",({entries:s})=>{for(const i of s){const a=getActiveTransaction();if(!a)return;if(i.name==="click"){const c=msToSec(browserPerformanceTimeOrigin+i.startTime),d=msToSec(i.duration);a.startChild({description:htmlTreeAsString(i.target),op:`ui.interaction.${i.name}`,origin:"auto.ui.browser.metrics",startTimestamp:c,endTimestamp:c+d})}}})}function _trackCLS(){return addClsInstrumentationHandler(({metric:s})=>{const i=s.entries.pop();i&&(_measurements.cls={value:s.value,unit:""},_clsEntry=i)})}function _trackLCP(){return addLcpInstrumentationHandler(({metric:s})=>{const i=s.entries.pop();i&&(_measurements.lcp={value:s.value,unit:"millisecond"},_lcpEntry=i)})}function _trackFID(){return addFidInstrumentationHandler(({metric:s})=>{const i=s.entries.pop();if(!i)return;const a=msToSec(browserPerformanceTimeOrigin),c=msToSec(i.startTime);_measurements.fid={value:s.value,unit:"millisecond"},_measurements["mark.fid"]={value:a+c,unit:"second"}})}function addPerformanceEntries(s){const i=getBrowserPerformanceAPI();if(!i||!WINDOW.performance.getEntries||!browserPerformanceTimeOrigin)return;const a=msToSec(browserPerformanceTimeOrigin),c=i.getEntries();let d,g;if(c.slice(_performanceCursor).forEach(b=>{const $=msToSec(b.startTime),_=msToSec(b.duration);if(!(s.op==="navigation"&&a+${if(!_measurements[$]||a>=s.startTimestamp)return;const _=_measurements[$].value,j=a+msToSec(_),_e=Math.abs((j-s.startTimestamp)*1e3);_measurements[$].value=_e});const b=_measurements["mark.fid"];b&&_measurements.fid&&(_startChild(s,{description:"first input delay",endTimestamp:b.value+msToSec(_measurements.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:b.value}),delete _measurements["mark.fid"]),"fcp"in _measurements||delete _measurements.cls,Object.keys(_measurements).forEach($=>{s.setMeasurement($,_measurements[$].value,_measurements[$].unit)}),_tagMetricInfo(s)}_lcpEntry=void 0,_clsEntry=void 0,_measurements={}}function _addMeasureSpans(s,i,a,c,d){const g=d+a,b=g+c;return _startChild(s,{description:i.name,endTimestamp:b,op:i.entryType,origin:"auto.resource.browser.metrics",startTimestamp:g}),g}function _addNavigationSpans(s,i,a){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(c=>{_addPerformanceNavigationTiming(s,i,c,a)}),_addPerformanceNavigationTiming(s,i,"secureConnection",a,"TLS/SSL","connectEnd"),_addPerformanceNavigationTiming(s,i,"fetch",a,"cache","domainLookupStart"),_addPerformanceNavigationTiming(s,i,"domainLookup",a,"DNS"),_addRequest(s,i,a)}function _addPerformanceNavigationTiming(s,i,a,c,d,g){const b=g?i[g]:i[`${a}End`],$=i[`${a}Start`];!$||!b||_startChild(s,{op:"browser",origin:"auto.browser.browser.metrics",description:d||a,startTimestamp:c+msToSec($),endTimestamp:c+msToSec(b)})}function _addRequest(s,i,a){_startChild(s,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:a+msToSec(i.requestStart),endTimestamp:a+msToSec(i.responseEnd)}),_startChild(s,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:a+msToSec(i.responseStart),endTimestamp:a+msToSec(i.responseEnd)})}function _addResourceSpans(s,i,a,c,d,g){if(i.initiatorType==="xmlhttprequest"||i.initiatorType==="fetch")return;const b={};"transferSize"in i&&(b["http.response_transfer_size"]=i.transferSize),"encodedBodySize"in i&&(b["http.response_content_length"]=i.encodedBodySize),"decodedBodySize"in i&&(b["http.decoded_response_content_length"]=i.decodedBodySize),"renderBlockingStatus"in i&&(b["resource.render_blocking_status"]=i.renderBlockingStatus);const $=g+c,_=$+d;_startChild(s,{description:a,endTimestamp:_,op:i.initiatorType?`resource.${i.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:$,data:b})}function _trackNavigator(s){const i=WINDOW.navigator;if(!i)return;const a=i.connection;a&&(a.effectiveType&&s.setTag("effectiveConnectionType",a.effectiveType),a.type&&s.setTag("connectionType",a.type),isMeasurementValue(a.rtt)&&(_measurements["connection.rtt"]={value:a.rtt,unit:"millisecond"})),isMeasurementValue(i.deviceMemory)&&s.setTag("deviceMemory",`${i.deviceMemory} GB`),isMeasurementValue(i.hardwareConcurrency)&&s.setTag("hardwareConcurrency",String(i.hardwareConcurrency))}function _tagMetricInfo(s){_lcpEntry&&(_lcpEntry.element&&s.setTag("lcp.element",htmlTreeAsString(_lcpEntry.element)),_lcpEntry.id&&s.setTag("lcp.id",_lcpEntry.id),_lcpEntry.url&&s.setTag("lcp.url",_lcpEntry.url.trim().slice(0,200)),s.setTag("lcp.size",_lcpEntry.size)),_clsEntry&&_clsEntry.sources&&_clsEntry.sources.forEach((i,a)=>s.setTag(`cls.source.${a+1}`,htmlTreeAsString(i.node)))}const DEFAULT_TRACE_PROPAGATION_TARGETS=["localhost",/^\/(?!\/)/],defaultRequestInstrumentationOptions={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:DEFAULT_TRACE_PROPAGATION_TARGETS,tracePropagationTargets:DEFAULT_TRACE_PROPAGATION_TARGETS};function instrumentOutgoingRequests(s){const{traceFetch:i,traceXHR:a,tracePropagationTargets:c,tracingOrigins:d,shouldCreateSpanForRequest:g,enableHTTPTimings:b}={traceFetch:defaultRequestInstrumentationOptions.traceFetch,traceXHR:defaultRequestInstrumentationOptions.traceXHR,...s},$=typeof g=="function"?g:_e=>!0,_=_e=>shouldAttachHeaders(_e,c||d),j={};i&&addInstrumentationHandler("fetch",_e=>{const et=fetchCallback(_e,$,_,j);b&&et&&addHTTPTimings(et)}),a&&addInstrumentationHandler("xhr",_e=>{const et=xhrCallback(_e,$,_,j);b&&et&&addHTTPTimings(et)})}function isPerformanceResourceTiming(s){return s.entryType==="resource"&&"initiatorType"in s&&typeof s.nextHopProtocol=="string"&&(s.initiatorType==="fetch"||s.initiatorType==="xmlhttprequest")}function addHTTPTimings(s){const i=s.data.url;if(!i)return;const a=addPerformanceInstrumentationHandler("resource",({entries:c})=>{c.forEach(d=>{isPerformanceResourceTiming(d)&&d.name.endsWith(i)&&(resourceTimingEntryToSpanData(d).forEach(b=>s.setData(...b)),setTimeout(a))})})}function extractNetworkProtocol(s){let i="unknown",a="unknown",c="";for(const d of s){if(d==="/"){[i,a]=s.split("/");break}if(!isNaN(Number(d))){i=c==="h"?"http":c,a=s.split(c)[1];break}c+=d}return c===s&&(i=c),{name:i,version:a}}function getAbsoluteTime(s=0){return((browserPerformanceTimeOrigin||performance.timeOrigin)+s)/1e3}function resourceTimingEntryToSpanData(s){const{name:i,version:a}=extractNetworkProtocol(s.nextHopProtocol),c=[];return c.push(["network.protocol.version",a],["network.protocol.name",i]),browserPerformanceTimeOrigin?[...c,["http.request.redirect_start",getAbsoluteTime(s.redirectStart)],["http.request.fetch_start",getAbsoluteTime(s.fetchStart)],["http.request.domain_lookup_start",getAbsoluteTime(s.domainLookupStart)],["http.request.domain_lookup_end",getAbsoluteTime(s.domainLookupEnd)],["http.request.connect_start",getAbsoluteTime(s.connectStart)],["http.request.secure_connection_start",getAbsoluteTime(s.secureConnectionStart)],["http.request.connection_end",getAbsoluteTime(s.connectEnd)],["http.request.request_start",getAbsoluteTime(s.requestStart)],["http.request.response_start",getAbsoluteTime(s.responseStart)],["http.request.response_end",getAbsoluteTime(s.responseEnd)]]:c}function shouldAttachHeaders(s,i){return stringMatchesSomePattern(s,i||DEFAULT_TRACE_PROPAGATION_TARGETS)}function fetchCallback(s,i,a,c){if(!hasTracingEnabled()||!s.fetchData)return;const d=i(s.fetchData.url);if(s.endTimestamp&&d){const tt=s.fetchData.__span;if(!tt)return;const nt=c[tt];if(nt){if(s.response){nt.setHttpStatus(s.response.status);const rt=s.response&&s.response.headers&&s.response.headers.get("content-length"),at=parseInt(rt);at>0&&nt.setData("http.response_content_length",at)}else s.error&&nt.setStatus("internal_error");nt.finish(),delete c[tt]}return}const g=getCurrentHub(),b=g.getScope(),$=g.getClient(),_=b.getSpan(),{method:j,url:_e}=s.fetchData,et=d&&_?_.startChild({data:{url:_e,type:"fetch","http.method":j},description:`${j} ${_e}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(et&&(s.fetchData.__span=et.spanId,c[et.spanId]=et),a(s.fetchData.url)&&$){const tt=s.args[0];s.args[1]=s.args[1]||{};const nt=s.args[1];nt.headers=addTracingHeadersToFetchRequest(tt,$,b,nt,et)}return et}function addTracingHeadersToFetchRequest(s,i,a,c,d){const g=d||a.getSpan(),b=g&&g.transaction,{traceId:$,sampled:_,dsc:j}=a.getPropagationContext(),_e=g?g.toTraceparent():generateSentryTraceHeader($,void 0,_),et=b?b.getDynamicSamplingContext():j||getDynamicSamplingContextFromClient($,i,a),tt=dynamicSamplingContextToSentryBaggageHeader(et),nt=typeof Request<"u"&&isInstanceOf(s,Request)?s.headers:c.headers;if(nt)if(typeof Headers<"u"&&isInstanceOf(nt,Headers)){const rt=new Headers(nt);return rt.append("sentry-trace",_e),tt&&rt.append(BAGGAGE_HEADER_NAME,tt),rt}else if(Array.isArray(nt)){const rt=[...nt,["sentry-trace",_e]];return tt&&rt.push([BAGGAGE_HEADER_NAME,tt]),rt}else{const rt="baggage"in nt?nt.baggage:void 0,at=[];return Array.isArray(rt)?at.push(...rt):rt&&at.push(rt),tt&&at.push(tt),{...nt,"sentry-trace":_e,baggage:at.length>0?at.join(","):void 0}}else return{"sentry-trace":_e,baggage:tt}}function xhrCallback(s,i,a,c){const d=s.xhr,g=d&&d[SENTRY_XHR_DATA_KEY];if(!hasTracingEnabled()||d&&d.__sentry_own_request__||!d||!g)return;const b=i(g.url);if(s.endTimestamp&&b){const et=d.__sentry_xhr_span_id__;if(!et)return;const tt=c[et];tt&&(tt.setHttpStatus(g.status_code),tt.finish(),delete c[et]);return}const $=getCurrentHub(),_=$.getScope(),j=_.getSpan(),_e=b&&j?j.startChild({data:{...g.data,type:"xhr","http.method":g.method,url:g.url},description:`${g.method} ${g.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(_e&&(d.__sentry_xhr_span_id__=_e.spanId,c[d.__sentry_xhr_span_id__]=_e),d.setRequestHeader&&a(g.url))if(_e){const et=_e&&_e.transaction,tt=et&&et.getDynamicSamplingContext(),nt=dynamicSamplingContextToSentryBaggageHeader(tt);setHeaderOnXhr(d,_e.toTraceparent(),nt)}else{const et=$.getClient(),{traceId:tt,sampled:nt,dsc:rt}=_.getPropagationContext(),at=generateSentryTraceHeader(tt,void 0,nt),lt=rt||(et?getDynamicSamplingContextFromClient(tt,et,_):void 0),ot=dynamicSamplingContextToSentryBaggageHeader(lt);setHeaderOnXhr(d,at,ot)}return _e}function setHeaderOnXhr(s,i,a){try{s.setRequestHeader("sentry-trace",i),a&&s.setRequestHeader(BAGGAGE_HEADER_NAME,a)}catch{}}function instrumentRoutingWithDefaults(s,i=!0,a=!0){if(!WINDOW||!WINDOW.location)return;let c=WINDOW.location.href,d;i&&(d=s({name:WINDOW.location.pathname,startTimestamp:browserPerformanceTimeOrigin?browserPerformanceTimeOrigin/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),a&&addInstrumentationHandler("history",({to:g,from:b})=>{if(b===void 0&&c&&c.indexOf(g)!==-1){c=void 0;return}b!==g&&(c=void 0,d&&d.finish(),d=s({name:WINDOW.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const BROWSER_TRACING_INTEGRATION_ID="BrowserTracing",DEFAULT_BROWSER_TRACING_OPTIONS={...TRACING_DEFAULTS,markBackgroundTransactions:!0,routingInstrumentation:instrumentRoutingWithDefaults,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...defaultRequestInstrumentationOptions};class BrowserTracing{constructor(i){this.name=BROWSER_TRACING_INTEGRATION_ID,this._hasSetTracePropagationTargets=!1,addTracingExtensions(),this.options={...DEFAULT_BROWSER_TRACING_OPTIONS,...i},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),i&&!i.tracePropagationTargets&&i.tracingOrigins&&(this.options.tracePropagationTargets=i.tracingOrigins),this._collectWebVitals=startTrackingWebVitals(),this.options.enableLongTask&&startTrackingLongTasks(),this.options._experiments.enableInteractions&&startTrackingInteractions()}setupOnce(i,a){this._getCurrentHub=a;const d=a().getClient(),g=d&&d.getOptions(),{routingInstrumentation:b,startTransactionOnLocationChange:$,startTransactionOnPageLoad:_,markBackgroundTransactions:j,traceFetch:_e,traceXHR:et,shouldCreateSpanForRequest:tt,enableHTTPTimings:nt,_experiments:rt}=this.options,lt=g&&g.tracePropagationTargets||this.options.tracePropagationTargets;b(ot=>{const st=this._createRouteTransaction(ot);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(st,ot,a),st},_,$),j&®isterBackgroundTabDetection(),rt.enableInteractions&&this._registerInteractionListener(),instrumentOutgoingRequests({traceFetch:_e,traceXHR:et,tracePropagationTargets:lt,shouldCreateSpanForRequest:tt,enableHTTPTimings:nt})}_createRouteTransaction(i){if(!this._getCurrentHub)return;const a=this._getCurrentHub(),{beforeNavigate:c,idleTimeout:d,finalTimeout:g,heartbeatInterval:b}=this.options,$=i.op==="pageload",_=$?getMetaContent("sentry-trace"):"",j=$?getMetaContent("baggage"):"",{traceparentData:_e,dynamicSamplingContext:et,propagationContext:tt}=tracingContextFromHeaders(_,j),nt={...i,..._e,metadata:{...i.metadata,dynamicSamplingContext:_e&&!et?{}:et},trimEnd:!0},rt=typeof c=="function"?c(nt):nt,at=rt===void 0?{...nt,sampled:!1}:rt;at.metadata=at.name!==nt.name?{...at.metadata,source:"custom"}:at.metadata,this._latestRouteName=at.name,this._latestRouteSource=at.metadata&&at.metadata.source,at.sampled;const{location:lt}=WINDOW,ot=startIdleTransaction(a,at,d,g,!0,{location:lt},b),st=a.getScope();return $&&_e?st.setPropagationContext(tt):st.setPropagationContext({traceId:ot.traceId,spanId:ot.spanId,parentSpanId:ot.parentSpanId,sampled:ot.sampled}),ot.registerBeforeFinishCallback(it=>{this._collectWebVitals(),addPerformanceEntries(it)}),ot}_registerInteractionListener(){let i;const a=()=>{const{idleTimeout:c,finalTimeout:d,heartbeatInterval:g}=this.options,b="ui.action.click",$=getActiveTransaction();if($&&$.op&&["navigation","pageload"].includes($.op)||(i&&(i.setFinishReason("interactionInterrupted"),i.finish(),i=void 0),!this._getCurrentHub)||!this._latestRouteName)return;const _=this._getCurrentHub(),{location:j}=WINDOW,_e={name:this._latestRouteName,op:b,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};i=startIdleTransaction(_,_e,c,d,!0,{location:j},g)};["click"].forEach(c=>{addEventListener(c,a,{once:!1,capture:!0})})}}function getMetaContent(s){const i=getDomElement(`meta[name=${s}]`);return i?i.getAttribute("content"):void 0}function init(s){const i={_metadata:{},...s};i._metadata.sdk=i._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:SDK_VERSION}],version:SDK_VERSION},init$1(i)}const ignoredSentryErrors=["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://"],scriptRel="modulepreload",assetsURL=function(s,i){return new URL(s,i).href},seen={},__vitePreload=function(i,a,c){if(!a||a.length===0)return i();const d=document.getElementsByTagName("link");return Promise.all(a.map(g=>{if(g=assetsURL(g,c),g in seen)return;seen[g]=!0;const b=g.endsWith(".css"),$=b?'[rel="stylesheet"]':"";if(!!c)for(let _e=d.length-1;_e>=0;_e--){const et=d[_e];if(et.href===g&&(!b||et.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${$}`))return;const j=document.createElement("link");if(j.rel=b?"stylesheet":scriptRel,b||(j.as="script",j.crossOrigin=""),j.href=g,document.head.appendChild(j),b)return new Promise((_e,et)=>{j.addEventListener("load",_e),j.addEventListener("error",()=>et(new Error(`Unable to preload CSS for ${g}`)))})})).then(()=>i()).catch(g=>{const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=g,window.dispatchEvent(b),!b.defaultPrevented)throw g})};function useLocalStorage(s,i=null){const[a,c]=reactExports.useState(()=>getFromLocalStorage(s,i)),d=g=>{const b=g instanceof Function?g(a):g;c(b),setInLocalStorage(s,b)};return reactExports.useEffect(()=>{const g=b=>{var $;(($=b.detail)==null?void 0:$.key)===s&&c(b.detail.newValue)};return window.addEventListener("storage",g),()=>window.removeEventListener("storage",g)},[s]),[a,d]}function getFromLocalStorage(s,i=null){if(typeof window>"u")return i;try{const a=window.localStorage.getItem(s);return a!=null?JSON.parse(a):i}catch{return i}}function setInLocalStorage(s,i){try{typeof window<"u"&&(window.localStorage.setItem(s,JSON.stringify(i)),window.dispatchEvent(new CustomEvent("storage",{detail:{key:s,newValue:i}})))}catch{}}function removeFromLocalStorage(s){try{typeof window<"u"&&window.localStorage.removeItem(s)}catch{}}function useAuth(){var _e;const{data:{user:s,guest_role:i}}=useBootstrapData(),{auth:{redirectUri:a="/"}}=reactExports.useContext(SiteConfigContext),c=reactExports.useCallback(et=>{const tt=(s==null?void 0:s.permissions)||(i==null?void 0:i.permissions);if(tt)return tt.find(nt=>nt.name===et)},[s==null?void 0:s.permissions,i==null?void 0:i.permissions]),d=reactExports.useCallback((et,tt)=>{const nt=c(et);let rt=null;if(nt){const at=nt.restrictions.find(lt=>lt.name===tt);rt=at?at.value:void 0}return rt},[c]),g=reactExports.useCallback(et=>{const tt=(s==null?void 0:s.permissions)||(i==null?void 0:i.permissions);return(tt==null?void 0:tt.find(rt=>rt.name==="admin"))!=null||c(et)!=null},[s==null?void 0:s.permissions,i==null?void 0:i.permissions,c]),b=reactExports.useCallback((et,tt,nt)=>{const rt=!g(et),at=d(et,tt),lt=at!=null&&nt>=at;return{overQuota:at!=null&&nt>=at,noPermission:rt,overQuotaOrNoPermission:lt||rt}},[d,g]),$=((_e=s==null?void 0:s.subscriptions)==null?void 0:_e.find(et=>et.valid))!=null,_=reactExports.useCallback(()=>{const et=getFromLocalStorage("be.onboarding.selected");return et?`/checkout/${et.productId}/${et.priceId}`:a},[a]),j=reactExports.useCallback(et=>{var tt;return((tt=s==null?void 0:s.roles)==null?void 0:tt.find(nt=>nt.id===et))!=null},[s]);return{user:s,hasPermission:g,getPermission:c,getRestrictionValue:d,checkOverQuotaOrNoPermission:b,isLoggedIn:!!s,isSubscribed:$,hasRole:j,getRedirectUri:_}}const IconButton=reactExports.forwardRef(({children:s,size:i="md",iconSize:a=i&&i.length<=3?i:"md",variant:c="text",radius:d="rounded-button",className:g,padding:b,equalWidth:$=!0,badge:_,...j},_e)=>{const et=clsx$1(getButtonSizeStyle(i,{padding:b,equalWidth:$,variant:c}),g,_&&"relative");return jsxRuntimeExports.jsxs(ButtonBase,{...j,ref:_e,radius:d,variant:c,className:et,children:[reactExports.cloneElement(s,{size:a}),_]})}),CloseIcon=createSvgIcon(jsxRuntimeExports.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 MixedText({value:s}){return s?typeof s=="string"?jsxRuntimeExports.jsx(reactExports.Fragment,{children:s}):jsxRuntimeExports.jsx(Trans,{...s}):null}const ErrorOutlineIcon=createSvgIcon(jsxRuntimeExports.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"),CheckCircleIcon=createSvgIcon(jsxRuntimeExports.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 clamp$1(s,i,a){return Math.min(Math.max(s,i),a)}let $488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5{format(i){let a="";if(!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?a=$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,i):a=this.numberFormatter.format(i),this.options.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var c;let{unit:d,unitDisplay:g="short",locale:b}=this.resolvedOptions(),$=(c=$488c6ddbf4ef74c2$var$UNITS[d])===null||c===void 0?void 0:c[g];a+=$[b]||$.default}return a}formatToParts(i){return this.numberFormatter.formatToParts(i)}formatRange(i,a){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(i,a);if(a= start date");return`${this.format(i)} – ${this.format(a)}`}formatRangeToParts(i,a){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(i,a);if(a= start date");let c=this.numberFormatter.formatToParts(i),d=this.numberFormatter.formatToParts(a);return[...c.map(g=>({...g,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...d.map(g=>({...g,source:"endRange"}))]}resolvedOptions(){let i=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(i={...i,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style==="unit"&&(i={...i,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),i}constructor(i,a={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(i,a),this.options=a}}function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(s,i={}){let{numberingSystem:a}=i;if(a&&s.indexOf("-u-nu-")===-1&&(s=`${s}-u-nu-${a}`),i.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var c;let{unit:b,unitDisplay:$="short"}=i;if(!b)throw new Error('unit option must be provided with style: "unit"');if(!(!((c=$488c6ddbf4ef74c2$var$UNITS[b])===null||c===void 0)&&c[$]))throw new Error(`Unsupported unit ${b} with unitDisplay = ${$}`);i={...i,style:"decimal"}}let d=s+(i?Object.entries(i).sort((b,$)=>b[0]<$[0]?-1:1).join():"");if($488c6ddbf4ef74c2$var$formatterCache.has(d))return $488c6ddbf4ef74c2$var$formatterCache.get(d);let g=new Intl.NumberFormat(s,i);return $488c6ddbf4ef74c2$var$formatterCache.set(d,g),g}function $488c6ddbf4ef74c2$export$711b50b3c525e0f2(s,i,a){if(i==="auto")return s.format(a);if(i==="never")return s.format(Math.abs(a));{let c=!1;if(i==="always"?c=a>0||Object.is(a,0):i==="exceptZero"&&(Object.is(a,-0)||Object.is(a,0)?a=Math.abs(a):c=a>0),c){let d=s.format(-a),g=s.format(a),b=d.replace(g,"").replace(/\u200e|\u061C/,"");return[...b].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),d.replace(g,"!!!").replace(b,"+").replace("!!!",g)}else return s.format(a)}}const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=new RegExp("^.*\\(.*\\).*$"),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=["latn","arab","hanidec"];class $6c7bd7858deea686$export$cd11ab140839f11d{parse(i){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,i).parse(i)}isValidPartialNumber(i,a,c){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,i).isValidPartialNumber(i,a,c)}getNumberingSystem(i){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,i).options.numberingSystem}constructor(i,a={}){this.locale=i,this.options=a}}const $6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(s,i,a){let c=$6c7bd7858deea686$var$getCachedNumberParser(s,i);if(!s.includes("-nu-")&&!c.isValidPartialNumber(a)){for(let d of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(d!==c.options.numberingSystem){let g=$6c7bd7858deea686$var$getCachedNumberParser(s+(s.includes("-u-")?"-nu-":"-u-nu-")+d,i);if(g.isValidPartialNumber(a))return g}}return c}function $6c7bd7858deea686$var$getCachedNumberParser(s,i){let a=s+(i?Object.entries(i).sort((d,g)=>d[0]0&&(i=i.slice(this.symbols.plusSign.length)),i.startsWith(this.symbols.group)?!1:(i=$6c7bd7858deea686$var$replaceAll(i,this.symbols.group,"").replace(this.symbols.numeral,"").replace(this.symbols.decimal,""),i.length===0)}constructor(i,a={}){this.formatter=new Intl.NumberFormat(i,a),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(this.formatter,this.options,a)}}const $6c7bd7858deea686$var$nonLiteralParts=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(s,i,a){var c,d,g,b;let $=s.formatToParts(-10000.111),_=s.formatToParts(10000.111),j=$6c7bd7858deea686$var$pluralNumbers.map(mt=>s.formatToParts(mt));var _e;let et=(_e=(c=$.find(mt=>mt.type==="minusSign"))===null||c===void 0?void 0:c.value)!==null&&_e!==void 0?_e:"-",tt=(d=_.find(mt=>mt.type==="plusSign"))===null||d===void 0?void 0:d.value;!tt&&((a==null?void 0:a.signDisplay)==="exceptZero"||(a==null?void 0:a.signDisplay)==="always")&&(tt="+");let nt=(g=$.find(mt=>mt.type==="decimal"))===null||g===void 0?void 0:g.value,rt=(b=$.find(mt=>mt.type==="group"))===null||b===void 0?void 0:b.value,at=$.filter(mt=>!$6c7bd7858deea686$var$nonLiteralParts.has(mt.type)).map(mt=>$6c7bd7858deea686$var$escapeRegex(mt.value)),lt=j.flatMap(mt=>mt.filter(xt=>!$6c7bd7858deea686$var$nonLiteralParts.has(xt.type)).map(xt=>$6c7bd7858deea686$var$escapeRegex(xt.value))),ot=[...new Set([...at,...lt])].sort((mt,xt)=>xt.length-mt.length),st=ot.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${ot.join("|")}|[\\p{White_Space}]`,"gu"),it=[...new Intl.NumberFormat(i.locale,{useGrouping:!1}).format(9876543210)].reverse(),ut=new Map(it.map((mt,xt)=>[mt,xt])),ct=new RegExp(`[${it.join("")}]`,"g");return{minusSign:et,plusSign:tt,decimal:nt,group:rt,literals:st,numeral:ct,index:mt=>String(ut.get(mt))}}function $6c7bd7858deea686$var$replaceAll(s,i,a){return s.replaceAll?s.replaceAll(i,a):s.split(i).join(a)}function $6c7bd7858deea686$var$escapeRegex(s){return s.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function useNumberFormatter(s={}){const{localeCode:i}=useSelectedLocale();return reactExports.useMemo(()=>new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(i,s),[i,s])}const ProgressCircle=React.forwardRef((s,i)=>{let{value:a=0,minValue:c=0,maxValue:d=100,size:g="md",isIndeterminate:b=!1,className:$,position:_="relative",trackColor:j,fillColor:_e="border-primary",...et}=s;a=clamp$1(a,c,d);const tt=getCircleStyle(g),nt=(a-c)/(d-c),rt=useNumberFormatter({style:"percent"});let at="";!b&&!at&&(at=rt.format(nt));const lt={},ot={};if(!b){const st=(a-c)/(d-c)*100;let it;st>0&&st<=50?(it=-180+st/50*180,lt.transform=`rotate(${it}deg)`,ot.transform="rotate(-180deg)"):st>50&&(it=-180+(st-50)/50*180,lt.transform="rotate(0deg)",ot.transform=`rotate(${it}deg)`)}return jsxRuntimeExports.jsxs("div",{...et,"aria-valuenow":b?void 0:a,"aria-valuemin":c,"aria-valuemax":d,"aria-valuetext":b?void 0:at,role:"progressbar",ref:i,className:clsx$1("progress-circle",_,tt,b&&"indeterminate",$),children:[jsxRuntimeExports.jsx("div",{className:clsx$1(tt,j,"rounded-full border-4")}),jsxRuntimeExports.jsxs("div",{className:clsx$1("fills absolute left-0 top-0 h-full w-full",b&&"progress-circle-fills-animate"),children:[jsxRuntimeExports.jsx(FillMask,{circleSize:tt,subMaskStyle:lt,isIndeterminate:b,className:"rotate-180",fillColor:_e,subMaskClassName:clsx$1(b&&"progress-circle-fill-submask-1-animate")}),jsxRuntimeExports.jsx(FillMask,{circleSize:tt,subMaskStyle:ot,isIndeterminate:b,fillColor:_e,subMaskClassName:clsx$1(b&&"progress-circle-fill-submask-2-animate")})]})]})});function FillMask({subMaskStyle:s,subMaskClassName:i,className:a,circleSize:c,isIndeterminate:d,fillColor:g}){return jsxRuntimeExports.jsx("div",{className:clsx$1("absolute h-full w-1/2 origin-[100%] overflow-hidden",a),children:jsxRuntimeExports.jsx("div",{className:clsx$1("h-full w-full origin-[100%] rotate-180 overflow-hidden",!d&&"transition-transform duration-100",i),style:s,children:jsxRuntimeExports.jsx("div",{className:clsx$1(c,g,"rounded-full border-4")})})})}function getCircleStyle(s){switch(s){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 s}}const initial={opacity:0,y:50,scale:.3},animate={opacity:1,y:0,scale:1},exit={opacity:0,scale:.5};function ToastContainer(){const s=useToastStore(i=>i.toasts);return jsxRuntimeExports.jsx("div",{className:"relative pointer-events-none",children:jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,children:s.map(i=>jsxRuntimeExports.jsx("div",{className:clsx$1("fixed mx-auto p-20 z-toast",i.position==="bottom-center"?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:jsxRuntimeExports.jsxs(m$1.div,{initial:i.disableEnterAnimation?void 0:initial,animate:i.disableEnterAnimation?void 0:animate,exit:i.disableExitAnimation?void 0:exit,className:clsx$1("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 a;return(a=i.timer)==null?void 0:a.pause()},onPointerLeave:()=>{var a;return(a=i.timer)==null?void 0:a.resume()},role:"alert","aria-live":i.type==="danger"?"assertive":"polite",children:[i.type==="danger"&&jsxRuntimeExports.jsx(ErrorOutlineIcon,{className:"text-danger flex-shrink-0",size:"md"}),i.type==="loading"&&jsxRuntimeExports.jsx(ProgressCircle,{size:"sm",className:"flex-shrink-0",isIndeterminate:!0}),i.type==="positive"&&jsxRuntimeExports.jsx(CheckCircleIcon,{className:"text-positive flex-shrink-0",size:"md"}),jsxRuntimeExports.jsx("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto","data-testid":"toast-message",children:jsxRuntimeExports.jsx(MixedText,{value:i.message})}),i.action&&jsxRuntimeExports.jsx(Button,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var a;return(a=i.timer)==null?void 0:a.pause()},onBlur:()=>{var a;return(a=i.timer)==null?void 0:a.resume()},onClick:()=>toastState().remove(i.id),elementType:Link,to:i.action.action,children:jsxRuntimeExports.jsx(MixedText,{value:i.action.label})}),i.type!=="loading"&&jsxRuntimeExports.jsx(IconButton,{onFocus:()=>{var a;return(a=i.timer)==null?void 0:a.pause()},onBlur:()=>{var a;return(a=i.timer)==null?void 0:a.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{toastState().remove(i.id)},size:"sm",children:jsxRuntimeExports.jsx(CloseIcon,{})})]})},i.id))})})}const queryKey=(s,i)=>{const a=["users",`${s}`];return i&&a.push(i),a};function useUser(s,i){return useQuery({queryKey:queryKey(s,i),queryFn:()=>fetchUser(s,i)})}function fetchUser(s,i){return apiClient.get(`users/${s}`,{params:i}).then(a=>a.data)}function useResendVerificationEmail(){return useMutation({mutationFn:s=>resendEmail(s),onSuccess:()=>{toast(message("Email sent"))},onError:s=>showHttpErrorToast(s)})}function resendEmail(s){return apiClient.post("resend-email-verification",s).then(i=>i.data)}function useIsDarkMode(){const{selectedTheme:s}=useThemeSelector();return s.is_dark??!1}function useAppearanceEditorMode(){var s;return{isAppearanceEditorActive:(s=window.frameElement||void 0)==null?void 0:s.src.includes("appearanceEditor=true")}}const appearanceMessage="Can't logout while in appearance editor.";function useLogout(){const s=useNavigate(),{isAppearanceEditorActive:i}=useAppearanceEditorMode(),{setBootstrapData:a}=useBootstrapData();return useMutation({mutationFn:()=>i?noopLogout():logout(),onSuccess:c=>{a(c.bootstrapData),queryClient.clear(),s("/login"),queryClient.clear(),a(c.bootstrapData)},onError:c=>showHttpErrorToast(c,i?message(appearanceMessage):void 0)})}function logout(){return apiClient.post("auth/logout").then(s=>s.data)}function noopLogout(){return Promise.reject(appearanceMessage)}var isCheckBoxInput=s=>s.type==="checkbox",isDateObject=s=>s instanceof Date,isNullOrUndefined=s=>s==null;const isObjectType=s=>typeof s=="object";var isObject$1=s=>!isNullOrUndefined(s)&&!Array.isArray(s)&&isObjectType(s)&&!isDateObject(s),getEventValue=s=>isObject$1(s)&&s.target?isCheckBoxInput(s.target)?s.target.checked:s.target.value:s,getNodeParentName=s=>s.substring(0,s.search(/\.\d+(\.|$)/))||s,isNameInFieldArray=(s,i)=>s.has(getNodeParentName(i)),isPlainObject=s=>{const i=s.constructor&&s.constructor.prototype;return isObject$1(i)&&i.hasOwnProperty("isPrototypeOf")},isWeb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cloneObject(s){let i;const a=Array.isArray(s);if(s instanceof Date)i=new Date(s);else if(s instanceof Set)i=new Set(s);else if(!(isWeb&&(s instanceof Blob||s instanceof FileList))&&(a||isObject$1(s)))if(i=a?[]:{},!a&&!isPlainObject(s))i=s;else for(const c in s)s.hasOwnProperty(c)&&(i[c]=cloneObject(s[c]));else return s;return i}var compact=s=>Array.isArray(s)?s.filter(Boolean):[],isUndefined=s=>s===void 0,get=(s,i,a)=>{if(!i||!isObject$1(s))return a;const c=compact(i.split(/[,[\].]+?/)).reduce((d,g)=>isNullOrUndefined(d)?d:d[g],s);return isUndefined(c)||c===s?isUndefined(s[i])?a:s[i]:c},isBoolean=s=>typeof s=="boolean";const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=React.createContext(null),useFormContext=()=>React.useContext(HookFormContext),FormProvider=s=>{const{children:i,...a}=s;return React.createElement(HookFormContext.Provider,{value:a},i)};var getProxyFormState=(s,i,a,c=!0)=>{const d={defaultValues:i._defaultValues};for(const g in s)Object.defineProperty(d,g,{get:()=>{const b=g;return i._proxyFormState[b]!==VALIDATION_MODE.all&&(i._proxyFormState[b]=!c||VALIDATION_MODE.all),a&&(a[b]=!0),s[b]}});return d},isEmptyObject$1=s=>isObject$1(s)&&!Object.keys(s).length,shouldRenderFormState=(s,i,a,c)=>{a(s);const{name:d,...g}=s;return isEmptyObject$1(g)||Object.keys(g).length>=Object.keys(i).length||Object.keys(g).find(b=>i[b]===(!c||VALIDATION_MODE.all))},convertToArrayPayload=s=>Array.isArray(s)?s:[s],shouldSubscribeByName=(s,i,a)=>!s||!i||s===i||convertToArrayPayload(s).some(c=>c&&(a?c===i:c.startsWith(i)||i.startsWith(c)));function useSubscribe(s){const i=React.useRef(s);i.current=s,React.useEffect(()=>{const a=!s.disabled&&i.current.subject&&i.current.subject.subscribe({next:i.current.next});return()=>{a&&a.unsubscribe()}},[s.disabled])}function useFormState(s){const i=useFormContext(),{control:a=i.control,disabled:c,name:d,exact:g}=s||{},[b,$]=React.useState(a._formState),_=React.useRef(!0),j=React.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),_e=React.useRef(d);return _e.current=d,useSubscribe({disabled:c,next:et=>_.current&&shouldSubscribeByName(_e.current,et.name,g)&&shouldRenderFormState(et,j.current,a._updateFormState)&&$({...a._formState,...et}),subject:a._subjects.state}),React.useEffect(()=>(_.current=!0,j.current.isValid&&a._updateValid(!0),()=>{_.current=!1}),[a]),getProxyFormState(b,a,j.current,!1)}var isString=s=>typeof s=="string",generateWatchOutput=(s,i,a,c,d)=>isString(s)?(c&&i.watch.add(s),get(a,s,d)):Array.isArray(s)?s.map(g=>(c&&i.watch.add(g),get(a,g))):(c&&(i.watchAll=!0),a);function useWatch(s){const i=useFormContext(),{control:a=i.control,name:c,defaultValue:d,disabled:g,exact:b}=s||{},$=React.useRef(c);$.current=c,useSubscribe({disabled:g,subject:a._subjects.values,next:_e=>{shouldSubscribeByName($.current,_e.name,b)&&j(cloneObject(generateWatchOutput($.current,a._names,_e.values||a._formValues,!1,d)))}});const[_,j]=React.useState(a._getWatch(c,d));return React.useEffect(()=>a._removeUnmounted()),_}var isKey=s=>/^\w*$/.test(s),stringToPath=s=>compact(s.replace(/["|']|\]/g,"").split(/\.|\[/));function set$1(s,i,a){let c=-1;const d=isKey(i)?[i]:stringToPath(i),g=d.length,b=g-1;for(;++c{const _e=d._options.shouldUnregister||g,et=(tt,nt)=>{const rt=get(d._fields,tt);rt&&(rt._f.mount=nt)};if(et(a,!0),_e){const tt=cloneObject(get(d._options.defaultValues,a));set$1(d._defaultValues,a,tt),isUndefined(get(d._formValues,a))&&set$1(d._formValues,a,tt)}return()=>{(b?_e&&!d._state.action:_e)?d.unregister(a):et(a,!1)}},[a,d,b,g]),React.useEffect(()=>{get(d._fields,a)&&d._updateDisabledField({disabled:c,fields:d._fields,name:a,value:get(d._fields,a)._f.value})},[c,a,d]),{field:{name:a,value:$,...isBoolean(c)||isBoolean(_.disabled)?{disabled:_.disabled||c}:{},onChange:React.useCallback(_e=>j.current.onChange({target:{value:getEventValue(_e),name:a},type:EVENTS.CHANGE}),[a]),onBlur:React.useCallback(()=>j.current.onBlur({target:{value:get(d._formValues,a),name:a},type:EVENTS.BLUR}),[a,d]),ref:_e=>{const et=get(d._fields,a);et&&_e&&(et._f.ref={focus:()=>_e.focus(),select:()=>_e.select(),setCustomValidity:tt=>_e.setCustomValidity(tt),reportValidity:()=>_e.reportValidity()})}},formState:_,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!get(_.errors,a)},isDirty:{enumerable:!0,get:()=>!!get(_.dirtyFields,a)},isTouched:{enumerable:!0,get:()=>!!get(_.touchedFields,a)},error:{enumerable:!0,get:()=>get(_.errors,a)}})}}var appendErrors=(s,i,a,c,d)=>i?{...a[s],types:{...a[s]&&a[s].types?a[s].types:{},[c]:d||!0}}:{},generateId$1=()=>{const s=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const a=(Math.random()*16+s)%16|0;return(i=="x"?a:a&3|8).toString(16)})},getFocusFieldName=(s,i,a={})=>a.shouldFocus||isUndefined(a.shouldFocus)?a.focusName||`${s}.${isUndefined(a.focusIndex)?i:a.focusIndex}.`:"",getValidationModes=s=>({isOnSubmit:!s||s===VALIDATION_MODE.onSubmit,isOnBlur:s===VALIDATION_MODE.onBlur,isOnChange:s===VALIDATION_MODE.onChange,isOnAll:s===VALIDATION_MODE.all,isOnTouch:s===VALIDATION_MODE.onTouched}),isWatched=(s,i,a)=>!a&&(i.watchAll||i.watch.has(s)||[...i.watch].some(c=>s.startsWith(c)&&/^\.\w+/.test(s.slice(c.length))));const iterateFieldsByAction=(s,i,a,c)=>{for(const d of a||Object.keys(s)){const g=get(s,d);if(g){const{_f:b,...$}=g;if(b){if(b.refs&&b.refs[0]&&i(b.refs[0],d)&&!c)break;if(b.ref&&i(b.ref,b.name)&&!c)break}else isObject$1($)&&iterateFieldsByAction($,i)}}};var updateFieldArrayRootError=(s,i,a)=>{const c=compact(get(s,a));return set$1(c,"root",i[a]),set$1(s,a,c),s},isFileInput=s=>s.type==="file",isFunction=s=>typeof s=="function",isHTMLElement$1=s=>{if(!isWeb)return!1;const i=s?s.ownerDocument:0;return s instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},isMessage=s=>isString(s),isRadioInput=s=>s.type==="radio",isRegex=s=>s instanceof RegExp;const defaultResult={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=s=>{if(Array.isArray(s)){if(s.length>1){const i=s.filter(a=>a&&a.checked&&!a.disabled).map(a=>a.value);return{value:i,isValid:!!i.length}}return s[0].checked&&!s[0].disabled?s[0].attributes&&!isUndefined(s[0].attributes.value)?isUndefined(s[0].value)||s[0].value===""?validResult:{value:s[0].value,isValid:!0}:validResult:defaultResult}return defaultResult};const defaultReturn={isValid:!1,value:null};var getRadioValue=s=>Array.isArray(s)?s.reduce((i,a)=>a&&a.checked&&!a.disabled?{isValid:!0,value:a.value}:i,defaultReturn):defaultReturn;function getValidateError(s,i,a="validate"){if(isMessage(s)||Array.isArray(s)&&s.every(isMessage)||isBoolean(s)&&!s)return{type:a,message:isMessage(s)?s:"",ref:i}}var getValueAndMessage=s=>isObject$1(s)&&!isRegex(s)?s:{value:s,message:""},validateField=async(s,i,a,c,d)=>{const{ref:g,refs:b,required:$,maxLength:_,minLength:j,min:_e,max:et,pattern:tt,validate:nt,name:rt,valueAsNumber:at,mount:lt,disabled:ot}=s._f,st=get(i,rt);if(!lt||ot)return{};const it=b?b[0]:g,ut=ht=>{c&&it.reportValidity&&(it.setCustomValidity(isBoolean(ht)?"":ht||""),it.reportValidity())},ct={},pt=isRadioInput(g),mt=isCheckBoxInput(g),xt=pt||mt,St=(at||isFileInput(g))&&isUndefined(g.value)&&isUndefined(st)||isHTMLElement$1(g)&&g.value===""||st===""||Array.isArray(st)&&!st.length,wt=appendErrors.bind(null,rt,a,ct),_t=(ht,dt,ft,vt=INPUT_VALIDATION_RULES.maxLength,bt=INPUT_VALIDATION_RULES.minLength)=>{const $t=ht?dt:ft;ct[rt]={type:ht?vt:bt,message:$t,ref:g,...wt(ht?vt:bt,$t)}};if(d?!Array.isArray(st)||!st.length:$&&(!xt&&(St||isNullOrUndefined(st))||isBoolean(st)&&!st||mt&&!getCheckboxValue(b).isValid||pt&&!getRadioValue(b).isValid)){const{value:ht,message:dt}=isMessage($)?{value:!!$,message:$}:getValueAndMessage($);if(ht&&(ct[rt]={type:INPUT_VALIDATION_RULES.required,message:dt,ref:it,...wt(INPUT_VALIDATION_RULES.required,dt)},!a))return ut(dt),ct}if(!St&&(!isNullOrUndefined(_e)||!isNullOrUndefined(et))){let ht,dt;const ft=getValueAndMessage(et),vt=getValueAndMessage(_e);if(!isNullOrUndefined(st)&&!isNaN(st)){const bt=g.valueAsNumber||st&&+st;isNullOrUndefined(ft.value)||(ht=bt>ft.value),isNullOrUndefined(vt.value)||(dt=btnew Date(new Date().toDateString()+" "+jt),Et=g.type=="time",Tt=g.type=="week";isString(ft.value)&&st&&(ht=Et?$t(st)>$t(ft.value):Tt?st>ft.value:bt>new Date(ft.value)),isString(vt.value)&&st&&(dt=Et?$t(st)<$t(vt.value):Tt?st+ht.value,vt=!isNullOrUndefined(dt.value)&&st.length<+dt.value;if((ft||vt)&&(_t(ft,ht.message,dt.message),!a))return ut(ct[rt].message),ct}if(tt&&!St&&isString(st)){const{value:ht,message:dt}=getValueAndMessage(tt);if(isRegex(ht)&&!st.match(ht)&&(ct[rt]={type:INPUT_VALIDATION_RULES.pattern,message:dt,ref:g,...wt(INPUT_VALIDATION_RULES.pattern,dt)},!a))return ut(dt),ct}if(nt){if(isFunction(nt)){const ht=await nt(st,i),dt=getValidateError(ht,it);if(dt&&(ct[rt]={...dt,...wt(INPUT_VALIDATION_RULES.validate,dt.message)},!a))return ut(dt.message),ct}else if(isObject$1(nt)){let ht={};for(const dt in nt){if(!isEmptyObject$1(ht)&&!a)break;const ft=getValidateError(await nt[dt](st,i),it,dt);ft&&(ht={...ft,...wt(dt,ft.message)},ut(ft.message),a&&(ct[rt]=ht))}if(!isEmptyObject$1(ht)&&(ct[rt]={ref:it,...ht},!a))return ct}}return ut(!0),ct};function append(s,i){return[...s,...convertToArrayPayload(i)]}var fillEmptyArray=s=>Array.isArray(s)?s.map(()=>{}):void 0;function insert(s,i,a){return[...s.slice(0,i),...convertToArrayPayload(a),...s.slice(i)]}var moveArrayAt=(s,i,a)=>Array.isArray(s)?(isUndefined(s[a])&&(s[a]=void 0),s.splice(a,0,s.splice(i,1)[0]),s):[];function prepend(s,i){return[...convertToArrayPayload(i),...convertToArrayPayload(s)]}function removeAtIndexes(s,i){let a=0;const c=[...s];for(const d of i)c.splice(d-a,1),a++;return compact(c).length?c:[]}var removeArrayAt=(s,i)=>isUndefined(i)?[]:removeAtIndexes(s,convertToArrayPayload(i).sort((a,c)=>a-c)),swapArrayAt=(s,i,a)=>{s[i]=[s[a],s[a]=s[i]][0]};function baseGet(s,i){const a=i.slice(0,-1).length;let c=0;for(;c(s[i]=a,s);function useFieldArray(s){const i=useFormContext(),{control:a=i.control,name:c,keyName:d="id",shouldUnregister:g}=s,[b,$]=React.useState(a._getFieldArray(c)),_=React.useRef(a._getFieldArray(c).map(generateId$1)),j=React.useRef(b),_e=React.useRef(c),et=React.useRef(!1);_e.current=c,j.current=b,a._names.array.add(c),s.rules&&a.register(c,s.rules),useSubscribe({next:({values:ct,name:pt})=>{if(pt===_e.current||!pt){const mt=get(ct,_e.current);Array.isArray(mt)&&($(mt),_.current=mt.map(generateId$1))}},subject:a._subjects.array});const tt=React.useCallback(ct=>{et.current=!0,a._updateFieldArray(c,ct)},[a,c]),nt=(ct,pt)=>{const mt=convertToArrayPayload(cloneObject(ct)),xt=append(a._getFieldArray(c),mt);a._names.focus=getFocusFieldName(c,xt.length-1,pt),_.current=append(_.current,mt.map(generateId$1)),tt(xt),$(xt),a._updateFieldArray(c,xt,append,{argA:fillEmptyArray(ct)})},rt=(ct,pt)=>{const mt=convertToArrayPayload(cloneObject(ct)),xt=prepend(a._getFieldArray(c),mt);a._names.focus=getFocusFieldName(c,0,pt),_.current=prepend(_.current,mt.map(generateId$1)),tt(xt),$(xt),a._updateFieldArray(c,xt,prepend,{argA:fillEmptyArray(ct)})},at=ct=>{const pt=removeArrayAt(a._getFieldArray(c),ct);_.current=removeArrayAt(_.current,ct),tt(pt),$(pt),a._updateFieldArray(c,pt,removeArrayAt,{argA:ct})},lt=(ct,pt,mt)=>{const xt=convertToArrayPayload(cloneObject(pt)),St=insert(a._getFieldArray(c),ct,xt);a._names.focus=getFocusFieldName(c,ct,mt),_.current=insert(_.current,ct,xt.map(generateId$1)),tt(St),$(St),a._updateFieldArray(c,St,insert,{argA:ct,argB:fillEmptyArray(pt)})},ot=(ct,pt)=>{const mt=a._getFieldArray(c);swapArrayAt(mt,ct,pt),swapArrayAt(_.current,ct,pt),tt(mt),$(mt),a._updateFieldArray(c,mt,swapArrayAt,{argA:ct,argB:pt},!1)},st=(ct,pt)=>{const mt=a._getFieldArray(c);moveArrayAt(mt,ct,pt),moveArrayAt(_.current,ct,pt),tt(mt),$(mt),a._updateFieldArray(c,mt,moveArrayAt,{argA:ct,argB:pt},!1)},it=(ct,pt)=>{const mt=cloneObject(pt),xt=updateAt(a._getFieldArray(c),ct,mt);_.current=[...xt].map((St,wt)=>!St||wt===ct?generateId$1():_.current[wt]),tt(xt),$([...xt]),a._updateFieldArray(c,xt,updateAt,{argA:ct,argB:mt},!0,!1)},ut=ct=>{const pt=convertToArrayPayload(cloneObject(ct));_.current=pt.map(generateId$1),tt([...pt]),$([...pt]),a._updateFieldArray(c,[...pt],mt=>mt,{},!0,!1)};return React.useEffect(()=>{if(a._state.action=!1,isWatched(c,a._names)&&a._subjects.state.next({...a._formState}),et.current&&(!getValidationModes(a._options.mode).isOnSubmit||a._formState.isSubmitted))if(a._options.resolver)a._executeSchema([c]).then(ct=>{const pt=get(ct.errors,c),mt=get(a._formState.errors,c);(mt?!pt&&mt.type||pt&&(mt.type!==pt.type||mt.message!==pt.message):pt&&pt.type)&&(pt?set$1(a._formState.errors,c,pt):unset(a._formState.errors,c),a._subjects.state.next({errors:a._formState.errors}))});else{const ct=get(a._fields,c);ct&&ct._f&&validateField(ct,a._formValues,a._options.criteriaMode===VALIDATION_MODE.all,a._options.shouldUseNativeValidation,!0).then(pt=>!isEmptyObject$1(pt)&&a._subjects.state.next({errors:updateFieldArrayRootError(a._formState.errors,pt,c)}))}a._subjects.values.next({name:c,values:{...a._formValues}}),a._names.focus&&iterateFieldsByAction(a._fields,(ct,pt)=>{if(a._names.focus&&pt.startsWith(a._names.focus)&&ct.focus)return ct.focus(),1}),a._names.focus="",a._updateValid(),et.current=!1},[b,c,a]),React.useEffect(()=>(!get(a._formValues,c)&&a._updateFieldArray(c),()=>{(a._options.shouldUnregister||g)&&a.unregister(c)}),[c,a,d,g]),{swap:React.useCallback(ot,[tt,c,a]),move:React.useCallback(st,[tt,c,a]),prepend:React.useCallback(rt,[tt,c,a]),append:React.useCallback(nt,[tt,c,a]),remove:React.useCallback(at,[tt,c,a]),insert:React.useCallback(lt,[tt,c,a]),update:React.useCallback(it,[tt,c,a]),replace:React.useCallback(ut,[tt,c,a]),fields:React.useMemo(()=>b.map((ct,pt)=>({...ct,[d]:_.current[pt]||generateId$1()})),[b,d])}}function createSubject(){let s=[];return{get observers(){return s},next:d=>{for(const g of s)g.next&&g.next(d)},subscribe:d=>(s.push(d),{unsubscribe:()=>{s=s.filter(g=>g!==d)}}),unsubscribe:()=>{s=[]}}}var isPrimitive=s=>isNullOrUndefined(s)||!isObjectType(s);function deepEqual$1(s,i){if(isPrimitive(s)||isPrimitive(i))return s===i;if(isDateObject(s)&&isDateObject(i))return s.getTime()===i.getTime();const a=Object.keys(s),c=Object.keys(i);if(a.length!==c.length)return!1;for(const d of a){const g=s[d];if(!c.includes(d))return!1;if(d!=="ref"){const b=i[d];if(isDateObject(g)&&isDateObject(b)||isObject$1(g)&&isObject$1(b)||Array.isArray(g)&&Array.isArray(b)?!deepEqual$1(g,b):g!==b)return!1}}return!0}var isMultipleSelect=s=>s.type==="select-multiple",isRadioOrCheckbox=s=>isRadioInput(s)||isCheckBoxInput(s),live=s=>isHTMLElement$1(s)&&s.isConnected,objectHasFunction=s=>{for(const i in s)if(isFunction(s[i]))return!0;return!1};function markFieldsDirty(s,i={}){const a=Array.isArray(s);if(isObject$1(s)||a)for(const c in s)Array.isArray(s[c])||isObject$1(s[c])&&!objectHasFunction(s[c])?(i[c]=Array.isArray(s[c])?[]:{},markFieldsDirty(s[c],i[c])):isNullOrUndefined(s[c])||(i[c]=!0);return i}function getDirtyFieldsFromDefaultValues(s,i,a){const c=Array.isArray(s);if(isObject$1(s)||c)for(const d in s)Array.isArray(s[d])||isObject$1(s[d])&&!objectHasFunction(s[d])?isUndefined(i)||isPrimitive(a[d])?a[d]=Array.isArray(s[d])?markFieldsDirty(s[d],[]):{...markFieldsDirty(s[d])}:getDirtyFieldsFromDefaultValues(s[d],isNullOrUndefined(i)?{}:i[d],a[d]):a[d]=!deepEqual$1(s[d],i[d]);return a}var getDirtyFields=(s,i)=>getDirtyFieldsFromDefaultValues(s,i,markFieldsDirty(i)),getFieldValueAs=(s,{valueAsNumber:i,valueAsDate:a,setValueAs:c})=>isUndefined(s)?s:i?s===""?NaN:s&&+s:a&&isString(s)?new Date(s):c?c(s):s;function getFieldValue(s){const i=s.ref;if(!(s.refs?s.refs.every(a=>a.disabled):i.disabled))return isFileInput(i)?i.files:isRadioInput(i)?getRadioValue(s.refs).value:isMultipleSelect(i)?[...i.selectedOptions].map(({value:a})=>a):isCheckBoxInput(i)?getCheckboxValue(s.refs).value:getFieldValueAs(isUndefined(i.value)?s.ref.value:i.value,s)}var getResolverOptions=(s,i,a,c)=>{const d={};for(const g of s){const b=get(i,g);b&&set$1(d,g,b._f)}return{criteriaMode:a,names:[...s],fields:d,shouldUseNativeValidation:c}},getRuleValue=s=>isUndefined(s)?s:isRegex(s)?s.source:isObject$1(s)?isRegex(s.value)?s.value.source:s.value:s,hasValidation=s=>s.mount&&(s.required||s.min||s.max||s.maxLength||s.minLength||s.pattern||s.validate);function schemaErrorLookup(s,i,a){const c=get(s,a);if(c||isKey(a))return{error:c,name:a};const d=a.split(".");for(;d.length;){const g=d.join("."),b=get(i,g),$=get(s,g);if(b&&!Array.isArray(b)&&a!==g)return{name:a};if($&&$.type)return{name:g,error:$};d.pop()}return{name:a}}var skipValidation=(s,i,a,c,d)=>d.isOnAll?!1:!a&&d.isOnTouch?!(i||s):(a?c.isOnBlur:d.isOnBlur)?!s:(a?c.isOnChange:d.isOnChange)?s:!0,unsetEmptyArray=(s,i)=>!compact(get(s,i)).length&&unset(s,i);const defaultOptions$3={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(s={},i){let a={...defaultOptions$3,...s},c={submitCount:0,isDirty:!1,isLoading:isFunction(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},d={},g=isObject$1(a.defaultValues)||isObject$1(a.values)?cloneObject(a.defaultValues||a.values)||{}:{},b=a.shouldUnregister?{}:cloneObject(g),$={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},j,_e=0;const et={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},tt={values:createSubject(),array:createSubject(),state:createSubject()},nt=s.resetOptions&&s.resetOptions.keepDirtyValues,rt=getValidationModes(a.mode),at=getValidationModes(a.reValidateMode),lt=a.criteriaMode===VALIDATION_MODE.all,ot=yt=>Ct=>{clearTimeout(_e),_e=setTimeout(yt,Ct)},st=async yt=>{if(et.isValid||yt){const Ct=a.resolver?isEmptyObject$1((await St()).errors):await _t(d,!0);Ct!==c.isValid&&tt.state.next({isValid:Ct})}},it=yt=>et.isValidating&&tt.state.next({isValidating:yt}),ut=(yt,Ct=[],Rt,Nt,Lt=!0,Pt=!0)=>{if(Nt&&Rt){if($.action=!0,Pt&&Array.isArray(get(d,yt))){const Dt=Rt(get(d,yt),Nt.argA,Nt.argB);Lt&&set$1(d,yt,Dt)}if(Pt&&Array.isArray(get(c.errors,yt))){const Dt=Rt(get(c.errors,yt),Nt.argA,Nt.argB);Lt&&set$1(c.errors,yt,Dt),unsetEmptyArray(c.errors,yt)}if(et.touchedFields&&Pt&&Array.isArray(get(c.touchedFields,yt))){const Dt=Rt(get(c.touchedFields,yt),Nt.argA,Nt.argB);Lt&&set$1(c.touchedFields,yt,Dt)}et.dirtyFields&&(c.dirtyFields=getDirtyFields(g,b)),tt.state.next({name:yt,isDirty:dt(yt,Ct),dirtyFields:c.dirtyFields,errors:c.errors,isValid:c.isValid})}else set$1(b,yt,Ct)},ct=(yt,Ct)=>{set$1(c.errors,yt,Ct),tt.state.next({errors:c.errors})},pt=(yt,Ct,Rt,Nt)=>{const Lt=get(d,yt);if(Lt){const Pt=get(b,yt,isUndefined(Rt)?get(g,yt):Rt);isUndefined(Pt)||Nt&&Nt.defaultChecked||Ct?set$1(b,yt,Ct?Pt:getFieldValue(Lt._f)):bt(yt,Pt),$.mount&&st()}},mt=(yt,Ct,Rt,Nt,Lt)=>{let Pt=!1,Dt=!1;const Ht={name:yt};if(!Rt||Nt){et.isDirty&&(Dt=c.isDirty,c.isDirty=Ht.isDirty=dt(),Pt=Dt!==Ht.isDirty);const Yt=deepEqual$1(get(g,yt),Ct);Dt=get(c.dirtyFields,yt),Yt?unset(c.dirtyFields,yt):set$1(c.dirtyFields,yt,!0),Ht.dirtyFields=c.dirtyFields,Pt=Pt||et.dirtyFields&&Dt!==!Yt}if(Rt){const Yt=get(c.touchedFields,yt);Yt||(set$1(c.touchedFields,yt,Rt),Ht.touchedFields=c.touchedFields,Pt=Pt||et.touchedFields&&Yt!==Rt)}return Pt&&Lt&&tt.state.next(Ht),Pt?Ht:{}},xt=(yt,Ct,Rt,Nt)=>{const Lt=get(c.errors,yt),Pt=et.isValid&&isBoolean(Ct)&&c.isValid!==Ct;if(s.delayError&&Rt?(j=ot(()=>ct(yt,Rt)),j(s.delayError)):(clearTimeout(_e),j=null,Rt?set$1(c.errors,yt,Rt):unset(c.errors,yt)),(Rt?!deepEqual$1(Lt,Rt):Lt)||!isEmptyObject$1(Nt)||Pt){const Dt={...Nt,...Pt&&isBoolean(Ct)?{isValid:Ct}:{},errors:c.errors,name:yt};c={...c,...Dt},tt.state.next(Dt)}it(!1)},St=async yt=>a.resolver(b,a.context,getResolverOptions(yt||_.mount,d,a.criteriaMode,a.shouldUseNativeValidation)),wt=async yt=>{const{errors:Ct}=await St(yt);if(yt)for(const Rt of yt){const Nt=get(Ct,Rt);Nt?set$1(c.errors,Rt,Nt):unset(c.errors,Rt)}else c.errors=Ct;return Ct},_t=async(yt,Ct,Rt={valid:!0})=>{for(const Nt in yt){const Lt=yt[Nt];if(Lt){const{_f:Pt,...Dt}=Lt;if(Pt){const Ht=_.array.has(Pt.name),Yt=await validateField(Lt,b,lt,a.shouldUseNativeValidation&&!Ct,Ht);if(Yt[Pt.name]&&(Rt.valid=!1,Ct))break;!Ct&&(get(Yt,Pt.name)?Ht?updateFieldArrayRootError(c.errors,Yt,Pt.name):set$1(c.errors,Pt.name,Yt[Pt.name]):unset(c.errors,Pt.name))}Dt&&await _t(Dt,Ct,Rt)}}return Rt.valid},ht=()=>{for(const yt of _.unMount){const Ct=get(d,yt);Ct&&(Ct._f.refs?Ct._f.refs.every(Rt=>!live(Rt)):!live(Ct._f.ref))&&qt(yt)}_.unMount=new Set},dt=(yt,Ct)=>(yt&&Ct&&set$1(b,yt,Ct),!deepEqual$1(It(),g)),ft=(yt,Ct,Rt)=>generateWatchOutput(yt,_,{...$.mount?b:isUndefined(Ct)?g:isString(yt)?{[yt]:Ct}:Ct},Rt,Ct),vt=yt=>compact(get($.mount?b:g,yt,s.shouldUnregister?get(g,yt,[]):[])),bt=(yt,Ct,Rt={})=>{const Nt=get(d,yt);let Lt=Ct;if(Nt){const Pt=Nt._f;Pt&&(!Pt.disabled&&set$1(b,yt,getFieldValueAs(Ct,Pt)),Lt=isHTMLElement$1(Pt.ref)&&isNullOrUndefined(Ct)?"":Ct,isMultipleSelect(Pt.ref)?[...Pt.ref.options].forEach(Dt=>Dt.selected=Lt.includes(Dt.value)):Pt.refs?isCheckBoxInput(Pt.ref)?Pt.refs.length>1?Pt.refs.forEach(Dt=>(!Dt.defaultChecked||!Dt.disabled)&&(Dt.checked=Array.isArray(Lt)?!!Lt.find(Ht=>Ht===Dt.value):Lt===Dt.value)):Pt.refs[0]&&(Pt.refs[0].checked=!!Lt):Pt.refs.forEach(Dt=>Dt.checked=Dt.value===Lt):isFileInput(Pt.ref)?Pt.ref.value="":(Pt.ref.value=Lt,Pt.ref.type||tt.values.next({name:yt,values:{...b}})))}(Rt.shouldDirty||Rt.shouldTouch)&&mt(yt,Lt,Rt.shouldTouch,Rt.shouldDirty,!0),Rt.shouldValidate&&kt(yt)},$t=(yt,Ct,Rt)=>{for(const Nt in Ct){const Lt=Ct[Nt],Pt=`${yt}.${Nt}`,Dt=get(d,Pt);(_.array.has(yt)||!isPrimitive(Lt)||Dt&&!Dt._f)&&!isDateObject(Lt)?$t(Pt,Lt,Rt):bt(Pt,Lt,Rt)}},Et=(yt,Ct,Rt={})=>{const Nt=get(d,yt),Lt=_.array.has(yt),Pt=cloneObject(Ct);set$1(b,yt,Pt),Lt?(tt.array.next({name:yt,values:{...b}}),(et.isDirty||et.dirtyFields)&&Rt.shouldDirty&&tt.state.next({name:yt,dirtyFields:getDirtyFields(g,b),isDirty:dt(yt,Pt)})):Nt&&!Nt._f&&!isNullOrUndefined(Pt)?$t(yt,Pt,Rt):bt(yt,Pt,Rt),isWatched(yt,_)&&tt.state.next({...c}),tt.values.next({name:yt,values:{...b}}),!$.mount&&i()},Tt=async yt=>{const Ct=yt.target;let Rt=Ct.name,Nt=!0;const Lt=get(d,Rt),Pt=()=>Ct.type?getFieldValue(Lt._f):getEventValue(yt),Dt=Ht=>{Nt=Number.isNaN(Ht)||Ht===get(b,Rt,Ht)};if(Lt){let Ht,Yt;const mr=Pt(),Fn=yt.type===EVENTS.BLUR||yt.type===EVENTS.FOCUS_OUT,qr=!hasValidation(Lt._f)&&!a.resolver&&!get(c.errors,Rt)&&!Lt._f.deps||skipValidation(Fn,get(c.touchedFields,Rt),c.isSubmitted,at,rt),br=isWatched(Rt,_,Fn);set$1(b,Rt,mr),Fn?(Lt._f.onBlur&&Lt._f.onBlur(yt),j&&j(0)):Lt._f.onChange&&Lt._f.onChange(yt);const Er=mt(Rt,mr,Fn,!1),Kr=!isEmptyObject$1(Er)||br;if(!Fn&&tt.values.next({name:Rt,type:yt.type,values:{...b}}),qr)return et.isValid&&st(),Kr&&tt.state.next({name:Rt,...br?{}:Er});if(!Fn&&br&&tt.state.next({...c}),it(!0),a.resolver){const{errors:Lr}=await St([Rt]);if(Dt(mr),Nt){const Gr=schemaErrorLookup(c.errors,d,Rt),Or=schemaErrorLookup(Lr,d,Gr.name||Rt);Ht=Or.error,Rt=Or.name,Yt=isEmptyObject$1(Lr)}}else Ht=(await validateField(Lt,b,lt,a.shouldUseNativeValidation))[Rt],Dt(mr),Nt&&(Ht?Yt=!1:et.isValid&&(Yt=await _t(d,!0)));Nt&&(Lt._f.deps&&kt(Lt._f.deps),xt(Rt,Yt,Ht,Er))}},jt=(yt,Ct)=>{if(get(c.errors,Ct)&&yt.focus)return yt.focus(),1},kt=async(yt,Ct={})=>{let Rt,Nt;const Lt=convertToArrayPayload(yt);if(it(!0),a.resolver){const Pt=await wt(isUndefined(yt)?yt:Lt);Rt=isEmptyObject$1(Pt),Nt=yt?!Lt.some(Dt=>get(Pt,Dt)):Rt}else yt?(Nt=(await Promise.all(Lt.map(async Pt=>{const Dt=get(d,Pt);return await _t(Dt&&Dt._f?{[Pt]:Dt}:Dt)}))).every(Boolean),!(!Nt&&!c.isValid)&&st()):Nt=Rt=await _t(d);return tt.state.next({...!isString(yt)||et.isValid&&Rt!==c.isValid?{}:{name:yt},...a.resolver||!yt?{isValid:Rt}:{},errors:c.errors,isValidating:!1}),Ct.shouldFocus&&!Nt&&iterateFieldsByAction(d,jt,yt?Lt:_.mount),Nt},It=yt=>{const Ct={...g,...$.mount?b:{}};return isUndefined(yt)?Ct:isString(yt)?get(Ct,yt):yt.map(Rt=>get(Ct,Rt))},Mt=(yt,Ct)=>({invalid:!!get((Ct||c).errors,yt),isDirty:!!get((Ct||c).dirtyFields,yt),isTouched:!!get((Ct||c).touchedFields,yt),error:get((Ct||c).errors,yt)}),Bt=yt=>{yt&&convertToArrayPayload(yt).forEach(Ct=>unset(c.errors,Ct)),tt.state.next({errors:yt?c.errors:{}})},Qt=(yt,Ct,Rt)=>{const Nt=(get(d,yt,{_f:{}})._f||{}).ref;set$1(c.errors,yt,{...Ct,ref:Nt}),tt.state.next({name:yt,errors:c.errors,isValid:!1}),Rt&&Rt.shouldFocus&&Nt&&Nt.focus&&Nt.focus()},Vt=(yt,Ct)=>isFunction(yt)?tt.values.subscribe({next:Rt=>yt(ft(void 0,Ct),Rt)}):ft(yt,Ct,!0),qt=(yt,Ct={})=>{for(const Rt of yt?convertToArrayPayload(yt):_.mount)_.mount.delete(Rt),_.array.delete(Rt),Ct.keepValue||(unset(d,Rt),unset(b,Rt)),!Ct.keepError&&unset(c.errors,Rt),!Ct.keepDirty&&unset(c.dirtyFields,Rt),!Ct.keepTouched&&unset(c.touchedFields,Rt),!a.shouldUnregister&&!Ct.keepDefaultValue&&unset(g,Rt);tt.values.next({values:{...b}}),tt.state.next({...c,...Ct.keepDirty?{isDirty:dt()}:{}}),!Ct.keepIsValid&&st()},Ut=({disabled:yt,name:Ct,field:Rt,fields:Nt,value:Lt})=>{if(isBoolean(yt)){const Pt=yt?void 0:isUndefined(Lt)?getFieldValue(Rt?Rt._f:get(Nt,Ct)._f):Lt;set$1(b,Ct,Pt),mt(Ct,Pt,!1,!1,!0)}},tn=(yt,Ct={})=>{let Rt=get(d,yt);const Nt=isBoolean(Ct.disabled);return set$1(d,yt,{...Rt||{},_f:{...Rt&&Rt._f?Rt._f:{ref:{name:yt}},name:yt,mount:!0,...Ct}}),_.mount.add(yt),Rt?Ut({field:Rt,disabled:Ct.disabled,name:yt}):pt(yt,!0,Ct.value),{...Nt?{disabled:Ct.disabled}:{},...a.progressive?{required:!!Ct.required,min:getRuleValue(Ct.min),max:getRuleValue(Ct.max),minLength:getRuleValue(Ct.minLength),maxLength:getRuleValue(Ct.maxLength),pattern:getRuleValue(Ct.pattern)}:{},name:yt,onChange:Tt,onBlur:Tt,ref:Lt=>{if(Lt){tn(yt,Ct),Rt=get(d,yt);const Pt=isUndefined(Lt.value)&&Lt.querySelectorAll&&Lt.querySelectorAll("input,select,textarea")[0]||Lt,Dt=isRadioOrCheckbox(Pt),Ht=Rt._f.refs||[];if(Dt?Ht.find(Yt=>Yt===Pt):Pt===Rt._f.ref)return;set$1(d,yt,{_f:{...Rt._f,...Dt?{refs:[...Ht.filter(live),Pt,...Array.isArray(get(g,yt))?[{}]:[]],ref:{type:Pt.type,name:yt}}:{ref:Pt}}}),pt(yt,!1,void 0,Pt)}else Rt=get(d,yt,{}),Rt._f&&(Rt._f.mount=!1),(a.shouldUnregister||Ct.shouldUnregister)&&!(isNameInFieldArray(_.array,yt)&&$.action)&&_.unMount.add(yt)}}},Kt=()=>a.shouldFocusError&&iterateFieldsByAction(d,jt,_.mount),Jt=yt=>{isBoolean(yt)&&(tt.state.next({disabled:yt}),iterateFieldsByAction(d,Ct=>{Ct.disabled=yt},0,!1))},xn=(yt,Ct)=>async Rt=>{Rt&&(Rt.preventDefault&&Rt.preventDefault(),Rt.persist&&Rt.persist());let Nt=cloneObject(b);if(tt.state.next({isSubmitting:!0}),a.resolver){const{errors:Lt,values:Pt}=await St();c.errors=Lt,Nt=Pt}else await _t(d);unset(c.errors,"root"),isEmptyObject$1(c.errors)?(tt.state.next({errors:{}}),await yt(Nt,Rt)):(Ct&&await Ct({...c.errors},Rt),Kt(),setTimeout(Kt)),tt.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject$1(c.errors),submitCount:c.submitCount+1,errors:c.errors})},dn=(yt,Ct={})=>{get(d,yt)&&(isUndefined(Ct.defaultValue)?Et(yt,get(g,yt)):(Et(yt,Ct.defaultValue),set$1(g,yt,Ct.defaultValue)),Ct.keepTouched||unset(c.touchedFields,yt),Ct.keepDirty||(unset(c.dirtyFields,yt),c.isDirty=Ct.defaultValue?dt(yt,get(g,yt)):dt()),Ct.keepError||(unset(c.errors,yt),et.isValid&&st()),tt.state.next({...c}))},Gt=(yt,Ct={})=>{const Rt=yt?cloneObject(yt):g,Nt=cloneObject(Rt),Lt=yt&&!isEmptyObject$1(yt)?Nt:g;if(Ct.keepDefaultValues||(g=Rt),!Ct.keepValues){if(Ct.keepDirtyValues||nt)for(const Pt of _.mount)get(c.dirtyFields,Pt)?set$1(Lt,Pt,get(b,Pt)):Et(Pt,get(Lt,Pt));else{if(isWeb&&isUndefined(yt))for(const Pt of _.mount){const Dt=get(d,Pt);if(Dt&&Dt._f){const Ht=Array.isArray(Dt._f.refs)?Dt._f.refs[0]:Dt._f.ref;if(isHTMLElement$1(Ht)){const Yt=Ht.closest("form");if(Yt){Yt.reset();break}}}}d={}}b=s.shouldUnregister?Ct.keepDefaultValues?cloneObject(g):{}:cloneObject(Lt),tt.array.next({values:{...Lt}}),tt.values.next({values:{...Lt}})}_={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!$.mount&&i(),$.mount=!et.isValid||!!Ct.keepIsValid,$.watch=!!s.shouldUnregister,tt.state.next({submitCount:Ct.keepSubmitCount?c.submitCount:0,isDirty:Ct.keepDirty?c.isDirty:!!(Ct.keepDefaultValues&&!deepEqual$1(yt,g)),isSubmitted:Ct.keepIsSubmitted?c.isSubmitted:!1,dirtyFields:Ct.keepDirtyValues?c.dirtyFields:Ct.keepDefaultValues&&yt?getDirtyFields(g,yt):{},touchedFields:Ct.keepTouched?c.touchedFields:{},errors:Ct.keepErrors?c.errors:{},isSubmitSuccessful:Ct.keepIsSubmitSuccessful?c.isSubmitSuccessful:!1,isSubmitting:!1})},Zt=(yt,Ct)=>Gt(isFunction(yt)?yt(b):yt,Ct);return{control:{register:tn,unregister:qt,getFieldState:Mt,handleSubmit:xn,setError:Qt,_executeSchema:St,_getWatch:ft,_getDirty:dt,_updateValid:st,_removeUnmounted:ht,_updateFieldArray:ut,_updateDisabledField:Ut,_getFieldArray:vt,_reset:Gt,_resetDefaultValues:()=>isFunction(a.defaultValues)&&a.defaultValues().then(yt=>{Zt(yt,a.resetOptions),tt.state.next({isLoading:!1})}),_updateFormState:yt=>{c={...c,...yt}},_disableForm:Jt,_subjects:tt,_proxyFormState:et,get _fields(){return d},get _formValues(){return b},get _state(){return $},set _state(yt){$=yt},get _defaultValues(){return g},get _names(){return _},set _names(yt){_=yt},get _formState(){return c},set _formState(yt){c=yt},get _options(){return a},set _options(yt){a={...a,...yt}}},trigger:kt,register:tn,handleSubmit:xn,watch:Vt,setValue:Et,getValues:It,reset:Zt,resetField:dn,clearErrors:Bt,unregister:qt,setError:Qt,setFocus:(yt,Ct={})=>{const Rt=get(d,yt),Nt=Rt&&Rt._f;if(Nt){const Lt=Nt.refs?Nt.refs[0]:Nt.ref;Lt.focus&&(Lt.focus(),Ct.shouldSelect&&Lt.select())}},getFieldState:Mt}}function useForm(s={}){const i=React.useRef(),a=React.useRef(),[c,d]=React.useState({isDirty:!1,isValidating:!1,isLoading:isFunction(s.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:isFunction(s.defaultValues)?void 0:s.defaultValues});i.current||(i.current={...createFormControl(s,()=>d(b=>({...b}))),formState:c});const g=i.current.control;return g._options=s,useSubscribe({subject:g._subjects.state,next:b=>{shouldRenderFormState(b,g._proxyFormState,g._updateFormState,!0)&&d({...g._formState})}}),React.useEffect(()=>g._disableForm(s.disabled),[g,s.disabled]),React.useEffect(()=>{if(g._proxyFormState.isDirty){const b=g._getDirty();b!==c.isDirty&&g._subjects.state.next({isDirty:b})}},[g,c.isDirty]),React.useEffect(()=>{s.values&&!deepEqual$1(s.values,a.current)?(g._reset(s.values,g._options.resetOptions),a.current=s.values):g._resetDefaultValues()},[s.values,g]),React.useEffect(()=>{g._state.mount||(g._updateValid(),g._state.mount=!0),g._state.watch&&(g._state.watch=!1,g._subjects.state.next({...g._formState})),g._removeUnmounted()}),i.current.formState=getProxyFormState(c,g),i.current}function Form({children:s,onBeforeSubmit:i,onSubmit:a,form:c,className:d,id:g,onBlur:b}){return jsxRuntimeExports.jsx(FormProvider,{...c,children:jsxRuntimeExports.jsx("form",{id:g,onBlur:b,className:d,onSubmit:$=>{$.stopPropagation(),i==null||i(),c.handleSubmit(a)($)},children:s})})}function $458b0a5536c1a7cf$export$40bfa8c7b0832715(s,i,a){let[c,d]=reactExports.useState(s||i),g=reactExports.useRef(s!==void 0),b=s!==void 0;reactExports.useEffect(()=>{let j=g.current;j!==b&&console.warn(`WARN: A component changed from ${j?"controlled":"uncontrolled"} to ${b?"controlled":"uncontrolled"}.`),g.current=b},[b]);let $=b?s:c,_=reactExports.useCallback((j,..._e)=>{let et=(tt,...nt)=>{a&&(Object.is($,tt)||a(tt,...nt)),b||($=tt)};typeof j=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),d((nt,...rt)=>{let at=j(b?$:nt,...rt);return et(at,..._e),b?nt:at})):(b||d(j),et(j,..._e))},[b,$,a]);return[$,_]}function $9446cca9a3875146$export$7d15b64cf5a3a4c4(s,i=-1/0,a=1/0){return Math.min(Math.max(s,i),a)}function $9446cca9a3875146$export$cb6e0bb50bc19463(s,i,a,c){i=Number(i),a=Number(a);let d=(s-(isNaN(i)?0:i))%c,g=Math.abs(d)*2>=c?s+Math.sign(d)*(c-Math.abs(d)):s-d;isNaN(i)?!isNaN(a)&&g>a&&(g=Math.floor(a/c)*c):ga&&(g=i+Math.floor((a-i)/c)*c);let b=c.toString(),$=b.indexOf("."),_=$>=0?b.length-$:0;if(_>0){let j=Math.pow(10,_);g=Math.round(g*j)/j}return g}function $9446cca9a3875146$export$b6268554fba451f(s,i,a=10){const c=Math.pow(a,i);return Math.round(s*c)/c}const $b5e257d569688ac6$var$defaultContext={prefix:String(Math.round(Math.random()*1e10)),current:0},$b5e257d569688ac6$var$SSRContext=React.createContext($b5e257d569688ac6$var$defaultContext),$b5e257d569688ac6$var$IsSSRContext=React.createContext(!1);let $b5e257d569688ac6$var$canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement),$b5e257d569688ac6$var$componentIds=new WeakMap;function $b5e257d569688ac6$var$useCounter(s=!1){let i=reactExports.useContext($b5e257d569688ac6$var$SSRContext),a=reactExports.useRef(null);if(a.current===null&&!s){var c,d;let g=(c=React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||c===void 0||(d=c.ReactCurrentOwner)===null||d===void 0?void 0:d.current;if(g){let b=$b5e257d569688ac6$var$componentIds.get(g);b==null?$b5e257d569688ac6$var$componentIds.set(g,{id:i.current,state:g.memoizedState}):g.memoizedState!==b.state&&(i.current=b.id,$b5e257d569688ac6$var$componentIds.delete(g))}a.current=++i.current}return a.current}function $b5e257d569688ac6$var$useLegacySSRSafeId(s){let i=reactExports.useContext($b5e257d569688ac6$var$SSRContext);i===$b5e257d569688ac6$var$defaultContext&&!$b5e257d569688ac6$var$canUseDOM&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let a=$b5e257d569688ac6$var$useCounter(!!s),c=`react-aria${i.prefix}`;return s||`${c}-${a}`}function $b5e257d569688ac6$var$useModernSSRSafeId(s){let i=React.useId(),[a]=reactExports.useState($b5e257d569688ac6$export$535bd6ca7f90a273()),c=a?"react-aria":`react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;return s||`${c}-${i}`}React.useId;function $b5e257d569688ac6$var$getSnapshot(){return!1}function $b5e257d569688ac6$var$getServerSnapshot(){return!0}function $b5e257d569688ac6$var$subscribe(s){return()=>{}}function $b5e257d569688ac6$export$535bd6ca7f90a273(){return typeof React.useSyncExternalStore=="function"?React.useSyncExternalStore($b5e257d569688ac6$var$subscribe,$b5e257d569688ac6$var$getSnapshot,$b5e257d569688ac6$var$getServerSnapshot):reactExports.useContext($b5e257d569688ac6$var$IsSSRContext)}function r$1(s){var i,a,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s))for(i=0;i{};function $8ae05eaa5c114e9c$export$7f54fc3180508a52(s){const i=reactExports.useRef(null);return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{i.current=s},[s]),reactExports.useCallback((...a)=>{const c=i.current;return c(...a)},[])}function $1dbecbe27a04f9af$export$14d238f342723f25(s){let[i,a]=reactExports.useState(s),c=reactExports.useRef(null),d=$8ae05eaa5c114e9c$export$7f54fc3180508a52(()=>{let b=c.current.next();if(b.done){c.current=null;return}i===b.value?d():a(b.value)});$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{c.current&&d()});let g=$8ae05eaa5c114e9c$export$7f54fc3180508a52(b=>{c.current=b(i),d()});return[i,g]}let $bdb11010cef70236$var$idsUpdaterMap=new Map;function $bdb11010cef70236$export$cd8c9cb68f842629(s,i){if(s===i)return s;let a=$bdb11010cef70236$var$idsUpdaterMap.get(s);if(a)return a(i),i;let c=$bdb11010cef70236$var$idsUpdaterMap.get(i);return c?(c(s),s):i}function $ff5963eb1fccf552$export$e08e3b67e392101e(...s){return(...i)=>{for(let a of s)typeof a=="function"&&a(...i)}}function $3ef42575df84b30b$export$9d1611c77c2fe928(...s){let i={...s[0]};for(let a=1;a=65&&d.charCodeAt(2)<=90?i[d]=$ff5963eb1fccf552$export$e08e3b67e392101e(g,b):(d==="className"||d==="UNSAFE_className")&&typeof g=="string"&&typeof b=="string"?i[d]=clsx(g,b):d==="id"&&g&&b?i.id=$bdb11010cef70236$export$cd8c9cb68f842629(g,b):i[d]=b!==void 0?b:g}}return i}function $7215afc6de606d6b$export$de79e2c695e052f3(s){if($7215afc6de606d6b$var$supportsPreventScroll())s.focus({preventScroll:!0});else{let i=$7215afc6de606d6b$var$getScrollableElements(s);s.focus(),$7215afc6de606d6b$var$restoreScrollPosition(i)}}let $7215afc6de606d6b$var$supportsPreventScrollCached=null;function $7215afc6de606d6b$var$supportsPreventScroll(){if($7215afc6de606d6b$var$supportsPreventScrollCached==null){$7215afc6de606d6b$var$supportsPreventScrollCached=!1;try{var s=document.createElement("div");s.focus({get preventScroll(){return $7215afc6de606d6b$var$supportsPreventScrollCached=!0,!0}})}catch{}}return $7215afc6de606d6b$var$supportsPreventScrollCached}function $7215afc6de606d6b$var$getScrollableElements(s){for(var i=s.parentNode,a=[],c=document.scrollingElement||document.documentElement;i instanceof HTMLElement&&i!==c;)(i.offsetHeight"u"||window.navigator==null?!1:((i=window.navigator.userAgentData)===null||i===void 0?void 0:i.brands.some(a=>s.test(a.brand)))||s.test(window.navigator.userAgent)}function $c87311424ea30a05$var$testPlatform(s){var i;return typeof window<"u"&&window.navigator!=null?s.test(((i=window.navigator.userAgentData)===null||i===void 0?void 0:i.platform)||window.navigator.platform):!1}function $c87311424ea30a05$export$9ac100e40613ea10(){return $c87311424ea30a05$var$testPlatform(/^Mac/i)}function $c87311424ea30a05$export$a11b0059900ceec8(){return $c87311424ea30a05$var$testUserAgent(/Android/i)}let $bbed8b41f857bcc0$var$transitionsByElement=new Map,$bbed8b41f857bcc0$var$transitionCallbacks=new Set;function $bbed8b41f857bcc0$var$setupGlobalEvents(){if(typeof window>"u")return;let s=a=>{let c=$bbed8b41f857bcc0$var$transitionsByElement.get(a.target);c||(c=new Set,$bbed8b41f857bcc0$var$transitionsByElement.set(a.target,c),a.target.addEventListener("transitioncancel",i)),c.add(a.propertyName)},i=a=>{let c=$bbed8b41f857bcc0$var$transitionsByElement.get(a.target);if(c&&(c.delete(a.propertyName),c.size===0&&(a.target.removeEventListener("transitioncancel",i),$bbed8b41f857bcc0$var$transitionsByElement.delete(a.target)),$bbed8b41f857bcc0$var$transitionsByElement.size===0)){for(let d of $bbed8b41f857bcc0$var$transitionCallbacks)d();$bbed8b41f857bcc0$var$transitionCallbacks.clear()}};document.body.addEventListener("transitionrun",s),document.body.addEventListener("transitionend",i)}typeof document<"u"&&(document.readyState!=="loading"?$bbed8b41f857bcc0$var$setupGlobalEvents():document.addEventListener("DOMContentLoaded",$bbed8b41f857bcc0$var$setupGlobalEvents));function $bbed8b41f857bcc0$export$24490316f764c430(s){requestAnimationFrame(()=>{$bbed8b41f857bcc0$var$transitionsByElement.size===0?s():$bbed8b41f857bcc0$var$transitionCallbacks.add(s)})}function $03deb23ff14920c4$export$4eaf04e54aa8eed6(){let s=reactExports.useRef(new Map),i=reactExports.useCallback((d,g,b,$)=>{let _=$!=null&&$.once?(...j)=>{s.current.delete(b),b(...j)}:b;s.current.set(b,{type:g,eventTarget:d,fn:_,options:$}),d.addEventListener(g,b,$)},[]),a=reactExports.useCallback((d,g,b,$)=>{var _;let j=((_=s.current.get(b))===null||_===void 0?void 0:_.fn)||b;d.removeEventListener(g,j,$),s.current.delete(b)},[]),c=reactExports.useCallback(()=>{s.current.forEach((d,g)=>{a(d.eventTarget,d.type,g,d.options)})},[a]);return reactExports.useEffect(()=>c,[c]),{addGlobalListener:i,removeGlobalListener:a,removeAllGlobalListeners:c}}function $df56164dff5785e2$export$4338b53315abf666(s){const i=reactExports.useRef();return reactExports.useMemo(()=>({get current(){return i.current},set current(a){i.current=a,typeof s=="function"?s(a):s&&(s.current=a)}}),[s])}function $9daab02d461809db$var$hasResizeObserver(){return typeof window.ResizeObserver<"u"}function $9daab02d461809db$export$683480f191c0e3ea(s){const{ref:i,onResize:a}=s;reactExports.useEffect(()=>{let c=i==null?void 0:i.current;if(c)if($9daab02d461809db$var$hasResizeObserver()){const d=new window.ResizeObserver(g=>{g.length&&a()});return d.observe(c),()=>{c&&d.unobserve(c)}}else return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)}},[a,i])}function $62d8ded9296f3872$export$cfa2225e87938781(s){for($62d8ded9296f3872$export$2bb74740c4e19def(s)&&(s=s.parentElement);s&&!$62d8ded9296f3872$export$2bb74740c4e19def(s);)s=s.parentElement;return s||document.scrollingElement||document.documentElement}function $62d8ded9296f3872$export$2bb74740c4e19def(s){let i=window.getComputedStyle(s);return/(auto|scroll)/.test(i.overflow+i.overflowX+i.overflowY)}let $5df64b3807dc15ee$var$visualViewport=typeof document<"u"&&window.visualViewport;function $5df64b3807dc15ee$export$d699905dd57c73ca(){let s=$b5e257d569688ac6$export$535bd6ca7f90a273(),[i,a]=reactExports.useState(()=>s?{width:0,height:0}:$5df64b3807dc15ee$var$getViewportSize());return reactExports.useEffect(()=>{let c=()=>{a(d=>{let g=$5df64b3807dc15ee$var$getViewportSize();return g.width===d.width&&g.height===d.height?d:g})};return $5df64b3807dc15ee$var$visualViewport?$5df64b3807dc15ee$var$visualViewport.addEventListener("resize",c):window.addEventListener("resize",c),()=>{$5df64b3807dc15ee$var$visualViewport?$5df64b3807dc15ee$var$visualViewport.removeEventListener("resize",c):window.removeEventListener("resize",c)}},[]),i}function $5df64b3807dc15ee$var$getViewportSize(){return{width:($5df64b3807dc15ee$var$visualViewport==null?void 0:$5df64b3807dc15ee$var$visualViewport.width)||window.innerWidth,height:($5df64b3807dc15ee$var$visualViewport==null?void 0:$5df64b3807dc15ee$var$visualViewport.height)||window.innerHeight}}function $6a7db85432448f7f$export$60278871457622de(s){return s.mozInputSource===0&&s.isTrusted?!0:$c87311424ea30a05$export$a11b0059900ceec8()&&s.pointerType?s.type==="click"&&s.buttons===1:s.detail===0&&!s.pointerType}function getInputFieldClassNames(s={}){const{size:i="md",startAppend:a,endAppend:c,className:d,labelPosition:g,labelDisplay:b="block",inputClassName:$,inputWrapperClassName:_,unstyled:j,invalid:_e,disabled:et,background:tt="bg-transparent",flexibleHeight:nt,inputShadow:rt="shadow-sm",descriptionPosition:at="bottom",inputRing:lt,inputFontSize:ot,labelSuffix:st}={...s};if(j)return{label:"",input:$||"",wrapper:d||"",inputWrapper:_||"",adornment:"",append:{size:"",radius:""},size:{font:"",height:""},description:"",error:""};const it=inputSizeClass({size:s.size,flexibleHeight:nt});ot&&(it.font=ot);const ut=a||c,pt=lt||`focus:ring ${_e?"focus:ring-danger/focus focus:border-danger/60":"focus:ring-primary/focus focus:border-primary/60"}`,mt=getRadius(s);return{label:clsx$1(b,"first-letter:capitalize text-left whitespace-nowrap",et&&"text-disabled",it.font,st?"":g==="side"?"mr-16":"mb-4"),input:clsx$1("block text-left relative w-full appearance-none transition-shadow text",tt,mt.input,getInputBorder(s),!et&&`${pt} focus:outline-none ${rt}`,et&&"text-disabled cursor-not-allowed",$,it.font,it.height,getInputPadding(s)),adornment:iconSizeClass(i),append:{size:getButtonSizeStyle(i),radius:mt.append},wrapper:clsx$1(d,it.font,{"flex items-center":g==="side"}),inputWrapper:clsx$1("isolate relative",_,ut&&"flex items-stretch"),size:it,description:`text-muted ${at==="bottom"?"pt-10":"pb-10"} text-xs`,error:"text-danger pt-10 text-xs"}}function getInputBorder({startAppend:s,endAppend:i,inputBorder:a,invalid:c}){if(a)return a;const d=s||i,g=c?"border-danger":"border-divider";return d?s?`${g} border-y border-r`:`${g} border-y border-l`:`${g} border`}function getInputPadding({startAdornment:s,endAdornment:i,inputRadius:a}){return a==="rounded-full"?clsx$1(s?"pl-54":"pl-28",i?"pr-54":"pr-28"):clsx$1(s?"pl-46":"pl-12",i?"pr-46":"pr-12")}function getRadius(s){const{startAppend:i,endAppend:a,inputRadius:c}=s,d=i||a;return c==="rounded-full"?{input:clsx$1(!d&&"rounded-full",i&&"rounded-r-full rounded-l-none",a&&"rounded-l-full rounded-r-none"),append:i?"rounded-l-full":"rounded-r-full"}:c==="rounded-none"?{input:"",append:""}:c?{input:c,append:c}:{input:clsx$1(!d&&"rounded-input",i&&"rounded-input-r rounded-l-none",a&&"rounded-input-l rounded-r-none"),append:i?"rounded-input-l":"rounded-input-r"}}function inputSizeClass({size:s,flexibleHeight:i}){switch(s){case"2xs":return{font:"text-xs",height:i?"min-h-24":"h-24"};case"xs":return{font:"text-xs",height:i?"min-h-30":"h-30"};case"sm":return{font:"text-sm",height:i?"min-h-36":"h-36"};case"lg":return{font:"text-md md:text-lg",height:i?"min-h-50":"h-50"};case"xl":return{font:"text-xl",height:i?"min-h-60":"h-60"};default:return{font:"text-sm",height:i?"min-h-42":"h-42"}}}function iconSizeClass(s){switch(s){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 Adornment({children:s,direction:i,className:a,position:c=i==="start"?"left-0":"right-0"}){return s?jsxRuntimeExports.jsx("div",{className:clsx$1("pointer-events-none absolute top-0 z-10 flex h-full min-w-42 items-center justify-center text-muted",c,a),children:s}):null}function removeEmptyValuesFromObject(s,i){const a=(i==null?void 0:i.copy)??!0,c=a?{...s}:s;return Object.keys(c).forEach(d=>{const g=d;i!=null&&i.arrays&&Array.isArray(c[g])&&c[g].length===0?delete c[g]:i!=null&&i.deep&&c[g]&&typeof c[g]=="object"?(c[g]=removeEmptyValuesFromObject(c[g],i),Object.keys(c[g]).length===0&&delete c[g]):(c[g]==null||c[g]==="")&&delete c[g]}),a?c:s}const Field=React.forwardRef((s,i)=>{const{children:a,description:c,errorMessage:d,descriptionProps:g={},errorMessageProps:b={},startAdornment:$,endAdornment:_,adornmentPosition:j,startAppend:_e,endAppend:et,fieldClassNames:tt,disabled:nt,wrapperProps:rt}=s;return jsxRuntimeExports.jsxs("div",{className:tt.wrapper,ref:i,...rt,children:[jsxRuntimeExports.jsx(Label,{...s}),jsxRuntimeExports.jsxs("div",{className:tt.inputWrapper,children:[jsxRuntimeExports.jsx(Adornment,{direction:"start",className:tt.adornment,position:j,children:$}),_e&&jsxRuntimeExports.jsx(Append,{style:tt.append,disabled:nt,children:_e}),a,et&&jsxRuntimeExports.jsx(Append,{style:tt.append,disabled:nt,children:et}),jsxRuntimeExports.jsx(Adornment,{direction:"end",className:tt.adornment,position:j,children:_})]}),c&&!d&&jsxRuntimeExports.jsx("div",{className:tt.description,...g,children:c}),d&&jsxRuntimeExports.jsx("div",{className:tt.error,...b,children:d})]})});function Label({labelElementType:s,fieldClassNames:i,labelProps:a,label:c,labelSuffix:d,labelSuffixPosition:g="spaced",required:b}){if(!c)return null;const $=s||"label",_=jsxRuntimeExports.jsxs($,{className:i.label,...a,children:[c,b&&jsxRuntimeExports.jsx("span",{className:"text-danger",children:" *"})]});return d?jsxRuntimeExports.jsxs("div",{className:clsx$1("mb-4 flex w-full gap-4",g==="spaced"?"items-end":"items-center"),children:[_,jsxRuntimeExports.jsx("div",{className:clsx$1("text-xs text-muted",g==="spaced"?"ml-auto":""),children:d})]}):_}function Append({children:s,style:i,disabled:a}){return React.cloneElement(s,{...s.props,disabled:s.props.disabled||a,...removeEmptyValuesFromObject(i)})}function useAutoFocus({autoFocus:s,autoSelectText:i},a){const c=reactExports.useRef(s);reactExports.useEffect(()=>{c.current&&a.current&&requestAnimationFrame(()=>{var d,g;(d=a.current)==null||d.focus(),i&&((g=a.current)==null?void 0:g.nodeName.toLowerCase())==="input"&&a.current.select()}),c.current=!1},[a,i])}function useField(s){const{focusRef:i,labelElementType:a="label",label:c,labelSuffix:d,labelSuffixPosition:g,autoFocus:b,autoSelectText:$,labelPosition:_,descriptionPosition:j,size:_e,errorMessage:et,description:tt,flexibleHeight:nt,startAdornment:rt,endAdornment:at,startAppend:lt,adornmentPosition:ot,endAppend:st,className:it,inputClassName:ut,inputWrapperClassName:ct,unstyled:pt,background:mt,invalid:xt,disabled:St,id:wt,inputRadius:_t,inputBorder:ht,inputShadow:dt,inputRing:ft,inputFontSize:vt,...bt}=s;useAutoFocus(s,i);const $t=reactExports.useId(),Et=wt||$t,Tt=`${Et}-label`,jt=`${Et}-description`,kt=`${Et}-error`,It={id:Tt,htmlFor:a==="label"?Et:void 0},Mt={id:jt},Bt={id:kt},Vt={"aria-label":!s.label&&!s["aria-label"]&&s.placeholder?s.placeholder:s["aria-label"],"aria-invalid":xt||void 0,id:Et,disabled:St,...bt},qt=[];c&&qt.push(It.id),Vt["aria-labelledby"]&&qt.push(Vt["aria-labelledby"]),Vt["aria-labelledby"]=qt.length?qt.join(" "):void 0;const Ut=[];return tt&&Ut.push(Mt.id),et&&Ut.push(Bt.id),Vt["aria-describedby"]&&Ut.push(Vt["aria-describedby"]),Vt["aria-describedby"]=Ut.length?Ut.join(" "):void 0,{fieldProps:{errorMessageProps:Bt,descriptionProps:Mt,labelProps:It,disabled:St,label:c,labelSuffix:d,labelSuffixPosition:g,autoFocus:b,autoSelectText:$,labelPosition:_,descriptionPosition:j,size:_e,errorMessage:et,description:tt,flexibleHeight:nt,startAdornment:rt,endAdornment:at,startAppend:lt,adornmentPosition:ot,endAppend:st,className:it,inputClassName:ut,inputWrapperClassName:ct,unstyled:pt,background:mt,invalid:xt},inputProps:Vt}}const TextField=reactExports.forwardRef(({inputElementType:s="input",flexibleHeight:i,inputRef:a,inputTestId:c,...d},g)=>{const b=$df56164dff5785e2$export$4338b53315abf666(a),{fieldProps:$,inputProps:_}=useField({...d,focusRef:b}),j=s==="textarea",_e=j?"textarea":"input",et=getInputFieldClassNames({...d,flexibleHeight:i||s==="textarea"});return s==="textarea"&&!d.unstyled&&(et.input=`${et.input} py-12`),jsxRuntimeExports.jsx(Field,{ref:g,fieldClassNames:et,...$,children:jsxRuntimeExports.jsx(_e,{"data-testid":c,ref:b,..._,rows:j?_.rows||4:void 0,className:et.input})})}),FormTextField=React.forwardRef(({name:s,...i},a)=>{const{field:{onChange:c,onBlur:d,value:g="",ref:b},fieldState:{invalid:$,error:_}}=useController({name:s}),j={onChange:c,onBlur:d,value:g??"",invalid:$,errorMessage:_==null?void 0:_.message,inputRef:b,name:s};return jsxRuntimeExports.jsx(TextField,{ref:a,...$3ef42575df84b30b$export$9d1611c77c2fe928(j,i)})});function useTrans(){const{lines:s,localeCode:i}=useSelectedLocale();return{trans:reactExports.useCallback(c=>translate({...c,lines:s,localeCode:i}),[s,i])}}const translate=memoize(s=>{let{lines:i,message:a,values:c,localeCode:d}=s;return a==null?"":(a=(i==null?void 0:i[a])||(i==null?void 0:i[a.toLowerCase()])||a,c&&(a=handlePluralMessage(d,s),Object.entries(c).forEach(([g,b])=>{a=a.replace(`:${g}`,`${b}`)})),a)},{equals:shallowEqual,callTimeout:0}),KeyboardArrowLeftIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeftOutlined");function onFormQueryError(s,i){if(i&&axios$1.isAxiosError(s)&&s.response){const a=s.response.data;a.errors?Object.entries(a.errors||{}).forEach(([c,d],g)=>{typeof d=="string"?i.setError(c,{message:d},{shouldFocus:g===0}):d.forEach((b,$)=>{i.setError(c,{message:b},{shouldFocus:g===0&&$===0})})}):showHttpErrorToast(s)}}function useValidateEmailVerificationOtp(s){return useMutation({mutationFn:i=>validate(i),onSuccess:()=>{window.location.reload()},onError:i=>onFormQueryError(i,s)})}function validate(s){return apiClient.post("validate-email-verification-otp",s).then(i=>i.data)}function EmailVerificationPage(){const{trans:s}=useTrans(),{data:i}=useUser("me"),a=useResendVerificationEmail(),{branding:{logo_light:c,logo_dark:d}}=useSettings(),b=useIsDarkMode()?c:d,$=useLogout(),_=useForm(),j=useValidateEmailVerificationOtp(_);return jsxRuntimeExports.jsx("div",{className:"flex min-h-screen w-screen bg-alt p-24",children:jsxRuntimeExports.jsxs("div",{className:"mx-auto mt-40 max-w-440",children:[jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>$.mutate(),startIcon:jsxRuntimeExports.jsx(KeyboardArrowLeftIcon,{}),size:"xs",className:"mb-54 mr-auto",children:jsxRuntimeExports.jsx(Trans,{message:"Logout"})}),b&&jsxRuntimeExports.jsx("img",{src:b,alt:"Site logo",className:"mx-auto mb-44 block h-42 w-auto"}),jsxRuntimeExports.jsxs("div",{className:"text-center",children:[jsxRuntimeExports.jsx("h1",{className:"mb-24 text-3xl",children:jsxRuntimeExports.jsx(Trans,{message:"Verify your email"})}),jsxRuntimeExports.jsx("h2",{className:"text-lg",children:jsxRuntimeExports.jsx(Trans,{message:"Enter the verification code we sent to :email",values:{email:maskEmailAddress(i==null?void 0:i.user.email)}})}),jsxRuntimeExports.jsxs(Form,{form:_,onSubmit:_e=>j.mutate(_e),className:"my-16",children:[jsxRuntimeExports.jsx(FormTextField,{name:"code",label:jsxRuntimeExports.jsx(Trans,{message:"Code"}),placeholder:s(message("Enter your verification code")),autoFocus:!0,autoComplete:"one-time-code",autoCorrect:"off",autoCapitalize:"off",maxLength:6,inputMode:"numeric",required:!0}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",size:"md",className:"mt-24 w-full",disabled:j.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Next"})})]}),jsxRuntimeExports.jsx("div",{className:"mb-24 text-sm",children:jsxRuntimeExports.jsx(Trans,{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:_e=>jsxRuntimeExports.jsx(Button,{variant:"link",color:"primary",disabled:a.isPending||!(i!=null&&i.user.email),onClick:()=>{a.mutate({email:i.user.email})},children:_e})}})})]})]})})}function maskEmailAddress(s){if(!s)return"*******************";const[i,a]=s.split("@");return`${i.slice(0,2)}****@${a}`}const useDialogStore=create()(immer((s,i)=>({dialog:null,data:void 0,resolveClosePromise:null,openDialog:(a,c)=>new Promise(d=>{s(g=>{g.dialog=a,g.data=c,g.resolveClosePromise=d})}),closeActiveDialog:a=>{var c,d;(d=(c=i()).resolveClosePromise)==null||d.call(c,a),s(g=>{g.dialog=null,g.data=void 0,g.resolveClosePromise=null})}}))),openDialog=useDialogStore.getState().openDialog,closeDialog=s=>{useDialogStore.getState().closeActiveDialog(s)},min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=s=>({x:s,y:s}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(s,i,a){return max(s,min(i,a))}function evaluate(s,i){return typeof s=="function"?s(i):s}function getSide(s){return s.split("-")[0]}function getAlignment(s){return s.split("-")[1]}function getOppositeAxis(s){return s==="x"?"y":"x"}function getAxisLength(s){return s==="y"?"height":"width"}function getSideAxis(s){return["top","bottom"].includes(getSide(s))?"y":"x"}function getAlignmentAxis(s){return getOppositeAxis(getSideAxis(s))}function getAlignmentSides(s,i,a){a===void 0&&(a=!1);const c=getAlignment(s),d=getAlignmentAxis(s),g=getAxisLength(d);let b=d==="x"?c===(a?"end":"start")?"right":"left":c==="start"?"bottom":"top";return i.reference[g]>i.floating[g]&&(b=getOppositePlacement(b)),[b,getOppositePlacement(b)]}function getExpandedPlacements(s){const i=getOppositePlacement(s);return[getOppositeAlignmentPlacement(s),i,getOppositeAlignmentPlacement(i)]}function getOppositeAlignmentPlacement(s){return s.replace(/start|end/g,i=>oppositeAlignmentMap[i])}function getSideList(s,i,a){const c=["left","right"],d=["right","left"],g=["top","bottom"],b=["bottom","top"];switch(s){case"top":case"bottom":return a?i?d:c:i?c:d;case"left":case"right":return i?g:b;default:return[]}}function getOppositeAxisPlacements(s,i,a,c){const d=getAlignment(s);let g=getSideList(getSide(s),a==="start",c);return d&&(g=g.map(b=>b+"-"+d),i&&(g=g.concat(g.map(getOppositeAlignmentPlacement)))),g}function getOppositePlacement(s){return s.replace(/left|right|bottom|top/g,i=>oppositeSideMap[i])}function expandPaddingObject(s){return{top:0,right:0,bottom:0,left:0,...s}}function getPaddingObject(s){return typeof s!="number"?expandPaddingObject(s):{top:s,right:s,bottom:s,left:s}}function rectToClientRect(s){return{...s,top:s.y,left:s.x,right:s.x+s.width,bottom:s.y+s.height}}function computeCoordsFromPlacement(s,i,a){let{reference:c,floating:d}=s;const g=getSideAxis(i),b=getAlignmentAxis(i),$=getAxisLength(b),_=getSide(i),j=g==="y",_e=c.x+c.width/2-d.width/2,et=c.y+c.height/2-d.height/2,tt=c[$]/2-d[$]/2;let nt;switch(_){case"top":nt={x:_e,y:c.y-d.height};break;case"bottom":nt={x:_e,y:c.y+c.height};break;case"right":nt={x:c.x+c.width,y:et};break;case"left":nt={x:c.x-d.width,y:et};break;default:nt={x:c.x,y:c.y}}switch(getAlignment(i)){case"start":nt[b]-=tt*(a&&j?-1:1);break;case"end":nt[b]+=tt*(a&&j?-1:1);break}return nt}const computePosition$1=async(s,i,a)=>{const{placement:c="bottom",strategy:d="absolute",middleware:g=[],platform:b}=a,$=g.filter(Boolean),_=await(b.isRTL==null?void 0:b.isRTL(i));let j=await b.getElementRects({reference:s,floating:i,strategy:d}),{x:_e,y:et}=computeCoordsFromPlacement(j,c,_),tt=c,nt={},rt=0;for(let at=0;at<$.length;at++){const{name:lt,fn:ot}=$[at],{x:st,y:it,data:ut,reset:ct}=await ot({x:_e,y:et,initialPlacement:c,placement:tt,strategy:d,middlewareData:nt,rects:j,platform:b,elements:{reference:s,floating:i}});if(_e=st??_e,et=it??et,nt={...nt,[lt]:{...nt[lt],...ut}},ct&&rt<=50){rt++,typeof ct=="object"&&(ct.placement&&(tt=ct.placement),ct.rects&&(j=ct.rects===!0?await b.getElementRects({reference:s,floating:i,strategy:d}):ct.rects),{x:_e,y:et}=computeCoordsFromPlacement(j,tt,_)),at=-1;continue}}return{x:_e,y:et,placement:tt,strategy:d,middlewareData:nt}};async function detectOverflow(s,i){var a;i===void 0&&(i={});const{x:c,y:d,platform:g,rects:b,elements:$,strategy:_}=s,{boundary:j="clippingAncestors",rootBoundary:_e="viewport",elementContext:et="floating",altBoundary:tt=!1,padding:nt=0}=evaluate(i,s),rt=getPaddingObject(nt),lt=$[tt?et==="floating"?"reference":"floating":et],ot=rectToClientRect(await g.getClippingRect({element:(a=await(g.isElement==null?void 0:g.isElement(lt)))==null||a?lt:lt.contextElement||await(g.getDocumentElement==null?void 0:g.getDocumentElement($.floating)),boundary:j,rootBoundary:_e,strategy:_})),st=et==="floating"?{...b.floating,x:c,y:d}:b.reference,it=await(g.getOffsetParent==null?void 0:g.getOffsetParent($.floating)),ut=await(g.isElement==null?void 0:g.isElement(it))?await(g.getScale==null?void 0:g.getScale(it))||{x:1,y:1}:{x:1,y:1},ct=rectToClientRect(g.convertOffsetParentRelativeRectToViewportRelativeRect?await g.convertOffsetParentRelativeRectToViewportRelativeRect({rect:st,offsetParent:it,strategy:_}):st);return{top:(ot.top-ct.top+rt.top)/ut.y,bottom:(ct.bottom-ot.bottom+rt.bottom)/ut.y,left:(ot.left-ct.left+rt.left)/ut.x,right:(ct.right-ot.right+rt.right)/ut.x}}const arrow$1=s=>({name:"arrow",options:s,async fn(i){const{x:a,y:c,placement:d,rects:g,platform:b,elements:$,middlewareData:_}=i,{element:j,padding:_e=0}=evaluate(s,i)||{};if(j==null)return{};const et=getPaddingObject(_e),tt={x:a,y:c},nt=getAlignmentAxis(d),rt=getAxisLength(nt),at=await b.getDimensions(j),lt=nt==="y",ot=lt?"top":"left",st=lt?"bottom":"right",it=lt?"clientHeight":"clientWidth",ut=g.reference[rt]+g.reference[nt]-tt[nt]-g.floating[rt],ct=tt[nt]-g.reference[nt],pt=await(b.getOffsetParent==null?void 0:b.getOffsetParent(j));let mt=pt?pt[it]:0;(!mt||!await(b.isElement==null?void 0:b.isElement(pt)))&&(mt=$.floating[it]||g.floating[rt]);const xt=ut/2-ct/2,St=mt/2-at[rt]/2-1,wt=min(et[ot],St),_t=min(et[st],St),ht=wt,dt=mt-at[rt]-_t,ft=mt/2-at[rt]/2+xt,vt=clamp(ht,ft,dt),bt=!_.arrow&&getAlignment(d)!=null&&ft!=vt&&g.reference[rt]/2-(ftht<=0)){var St,wt;const ht=(((St=g.flip)==null?void 0:St.index)||0)+1,dt=ct[ht];if(dt)return{data:{index:ht,overflows:xt},reset:{placement:dt}};let ft=(wt=xt.filter(vt=>vt.overflows[0]<=0).sort((vt,bt)=>vt.overflows[1]-bt.overflows[1])[0])==null?void 0:wt.placement;if(!ft)switch(nt){case"bestFit":{var _t;const vt=(_t=xt.map(bt=>[bt.placement,bt.overflows.filter($t=>$t>0).reduce(($t,Et)=>$t+Et,0)]).sort((bt,$t)=>bt[1]-$t[1])[0])==null?void 0:_t[0];vt&&(ft=vt);break}case"initialPlacement":ft=$;break}if(d!==ft)return{reset:{placement:ft}}}return{}}}};async function convertValueToCoords(s,i){const{placement:a,platform:c,elements:d}=s,g=await(c.isRTL==null?void 0:c.isRTL(d.floating)),b=getSide(a),$=getAlignment(a),_=getSideAxis(a)==="y",j=["left","top"].includes(b)?-1:1,_e=g&&_?-1:1,et=evaluate(i,s);let{mainAxis:tt,crossAxis:nt,alignmentAxis:rt}=typeof et=="number"?{mainAxis:et,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...et};return $&&typeof rt=="number"&&(nt=$==="end"?rt*-1:rt),_?{x:nt*_e,y:tt*j}:{x:tt*j,y:nt*_e}}const offset=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){const{x:a,y:c}=i,d=await convertValueToCoords(i,s);return{x:a+d.x,y:c+d.y,data:d}}}},shift=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){const{x:a,y:c,placement:d}=i,{mainAxis:g=!0,crossAxis:b=!1,limiter:$={fn:lt=>{let{x:ot,y:st}=lt;return{x:ot,y:st}}},..._}=evaluate(s,i),j={x:a,y:c},_e=await detectOverflow(i,_),et=getSideAxis(getSide(d)),tt=getOppositeAxis(et);let nt=j[tt],rt=j[et];if(g){const lt=tt==="y"?"top":"left",ot=tt==="y"?"bottom":"right",st=nt+_e[lt],it=nt-_e[ot];nt=clamp(st,nt,it)}if(b){const lt=et==="y"?"top":"left",ot=et==="y"?"bottom":"right",st=rt+_e[lt],it=rt-_e[ot];rt=clamp(st,rt,it)}const at=$.fn({...i,[tt]:nt,[et]:rt});return{...at,data:{x:at.x-a,y:at.y-c}}}}},size=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){const{placement:a,rects:c,platform:d,elements:g}=i,{apply:b=()=>{},...$}=evaluate(s,i),_=await detectOverflow(i,$),j=getSide(a),_e=getAlignment(a),et=getSideAxis(a)==="y",{width:tt,height:nt}=c.floating;let rt,at;j==="top"||j==="bottom"?(rt=j,at=_e===(await(d.isRTL==null?void 0:d.isRTL(g.floating))?"start":"end")?"left":"right"):(at=j,rt=_e==="end"?"top":"bottom");const lt=nt-_[rt],ot=tt-_[at],st=!i.middlewareData.shift;let it=lt,ut=ot;if(et){const pt=tt-_.left-_.right;ut=_e||st?min(ot,pt):pt}else{const pt=nt-_.top-_.bottom;it=_e||st?min(lt,pt):pt}if(st&&!_e){const pt=max(_.left,0),mt=max(_.right,0),xt=max(_.top,0),St=max(_.bottom,0);et?ut=tt-2*(pt!==0||mt!==0?pt+mt:max(_.left,_.right)):it=nt-2*(xt!==0||St!==0?xt+St:max(_.top,_.bottom))}await b({...i,availableWidth:ut,availableHeight:it});const ct=await d.getDimensions(g.floating);return tt!==ct.width||nt!==ct.height?{reset:{rects:!0}}:{}}}};function getNodeName(s){return isNode(s)?(s.nodeName||"").toLowerCase():"#document"}function getWindow(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function getDocumentElement(s){var i;return(i=(isNode(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function isNode(s){return s instanceof Node||s instanceof getWindow(s).Node}function isElement(s){return s instanceof Element||s instanceof getWindow(s).Element}function isHTMLElement(s){return s instanceof HTMLElement||s instanceof getWindow(s).HTMLElement}function isShadowRoot(s){return typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof getWindow(s).ShadowRoot}function isOverflowElement(s){const{overflow:i,overflowX:a,overflowY:c,display:d}=getComputedStyle$1(s);return/auto|scroll|overlay|hidden|clip/.test(i+c+a)&&!["inline","contents"].includes(d)}function isTableElement(s){return["table","td","th"].includes(getNodeName(s))}function isContainingBlock(s){const i=isWebKit(),a=getComputedStyle$1(s);return a.transform!=="none"||a.perspective!=="none"||(a.containerType?a.containerType!=="normal":!1)||!i&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!i&&(a.filter?a.filter!=="none":!1)||["transform","perspective","filter"].some(c=>(a.willChange||"").includes(c))||["paint","layout","strict","content"].some(c=>(a.contain||"").includes(c))}function getContainingBlock(s){let i=getParentNode(s);for(;isHTMLElement(i)&&!isLastTraversableNode(i);){if(isContainingBlock(i))return i;i=getParentNode(i)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(s){return["html","body","#document"].includes(getNodeName(s))}function getComputedStyle$1(s){return getWindow(s).getComputedStyle(s)}function getNodeScroll(s){return isElement(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function getParentNode(s){if(getNodeName(s)==="html")return s;const i=s.assignedSlot||s.parentNode||isShadowRoot(s)&&s.host||getDocumentElement(s);return isShadowRoot(i)?i.host:i}function getNearestOverflowAncestor(s){const i=getParentNode(s);return isLastTraversableNode(i)?s.ownerDocument?s.ownerDocument.body:s.body:isHTMLElement(i)&&isOverflowElement(i)?i:getNearestOverflowAncestor(i)}function getOverflowAncestors(s,i,a){var c;i===void 0&&(i=[]),a===void 0&&(a=!0);const d=getNearestOverflowAncestor(s),g=d===((c=s.ownerDocument)==null?void 0:c.body),b=getWindow(d);return g?i.concat(b,b.visualViewport||[],isOverflowElement(d)?d:[],b.frameElement&&a?getOverflowAncestors(b.frameElement):[]):i.concat(d,getOverflowAncestors(d,[],a))}function getCssDimensions(s){const i=getComputedStyle$1(s);let a=parseFloat(i.width)||0,c=parseFloat(i.height)||0;const d=isHTMLElement(s),g=d?s.offsetWidth:a,b=d?s.offsetHeight:c,$=round(a)!==g||round(c)!==b;return $&&(a=g,c=b),{width:a,height:c,$}}function unwrapElement(s){return isElement(s)?s:s.contextElement}function getScale(s){const i=unwrapElement(s);if(!isHTMLElement(i))return createCoords(1);const a=i.getBoundingClientRect(),{width:c,height:d,$:g}=getCssDimensions(i);let b=(g?round(a.width):a.width)/c,$=(g?round(a.height):a.height)/d;return(!b||!Number.isFinite(b))&&(b=1),(!$||!Number.isFinite($))&&($=1),{x:b,y:$}}const noOffsets=createCoords(0);function getVisualOffsets(s){const i=getWindow(s);return!isWebKit()||!i.visualViewport?noOffsets:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function shouldAddVisualOffsets(s,i,a){return i===void 0&&(i=!1),!a||i&&a!==getWindow(s)?!1:i}function getBoundingClientRect(s,i,a,c){i===void 0&&(i=!1),a===void 0&&(a=!1);const d=s.getBoundingClientRect(),g=unwrapElement(s);let b=createCoords(1);i&&(c?isElement(c)&&(b=getScale(c)):b=getScale(s));const $=shouldAddVisualOffsets(g,a,c)?getVisualOffsets(g):createCoords(0);let _=(d.left+$.x)/b.x,j=(d.top+$.y)/b.y,_e=d.width/b.x,et=d.height/b.y;if(g){const tt=getWindow(g),nt=c&&isElement(c)?getWindow(c):c;let rt=tt.frameElement;for(;rt&&c&&nt!==tt;){const at=getScale(rt),lt=rt.getBoundingClientRect(),ot=getComputedStyle$1(rt),st=lt.left+(rt.clientLeft+parseFloat(ot.paddingLeft))*at.x,it=lt.top+(rt.clientTop+parseFloat(ot.paddingTop))*at.y;_*=at.x,j*=at.y,_e*=at.x,et*=at.y,_+=st,j+=it,rt=getWindow(rt).frameElement}}return rectToClientRect({width:_e,height:et,x:_,y:j})}function convertOffsetParentRelativeRectToViewportRelativeRect(s){let{rect:i,offsetParent:a,strategy:c}=s;const d=isHTMLElement(a),g=getDocumentElement(a);if(a===g)return i;let b={scrollLeft:0,scrollTop:0},$=createCoords(1);const _=createCoords(0);if((d||!d&&c!=="fixed")&&((getNodeName(a)!=="body"||isOverflowElement(g))&&(b=getNodeScroll(a)),isHTMLElement(a))){const j=getBoundingClientRect(a);$=getScale(a),_.x=j.x+a.clientLeft,_.y=j.y+a.clientTop}return{width:i.width*$.x,height:i.height*$.y,x:i.x*$.x-b.scrollLeft*$.x+_.x,y:i.y*$.y-b.scrollTop*$.y+_.y}}function getClientRects(s){return Array.from(s.getClientRects())}function getWindowScrollBarX(s){return getBoundingClientRect(getDocumentElement(s)).left+getNodeScroll(s).scrollLeft}function getDocumentRect(s){const i=getDocumentElement(s),a=getNodeScroll(s),c=s.ownerDocument.body,d=max(i.scrollWidth,i.clientWidth,c.scrollWidth,c.clientWidth),g=max(i.scrollHeight,i.clientHeight,c.scrollHeight,c.clientHeight);let b=-a.scrollLeft+getWindowScrollBarX(s);const $=-a.scrollTop;return getComputedStyle$1(c).direction==="rtl"&&(b+=max(i.clientWidth,c.clientWidth)-d),{width:d,height:g,x:b,y:$}}function getViewportRect(s,i){const a=getWindow(s),c=getDocumentElement(s),d=a.visualViewport;let g=c.clientWidth,b=c.clientHeight,$=0,_=0;if(d){g=d.width,b=d.height;const j=isWebKit();(!j||j&&i==="fixed")&&($=d.offsetLeft,_=d.offsetTop)}return{width:g,height:b,x:$,y:_}}function getInnerBoundingClientRect(s,i){const a=getBoundingClientRect(s,!0,i==="fixed"),c=a.top+s.clientTop,d=a.left+s.clientLeft,g=isHTMLElement(s)?getScale(s):createCoords(1),b=s.clientWidth*g.x,$=s.clientHeight*g.y,_=d*g.x,j=c*g.y;return{width:b,height:$,x:_,y:j}}function getClientRectFromClippingAncestor(s,i,a){let c;if(i==="viewport")c=getViewportRect(s,a);else if(i==="document")c=getDocumentRect(getDocumentElement(s));else if(isElement(i))c=getInnerBoundingClientRect(i,a);else{const d=getVisualOffsets(s);c={...i,x:i.x-d.x,y:i.y-d.y}}return rectToClientRect(c)}function hasFixedPositionAncestor(s,i){const a=getParentNode(s);return a===i||!isElement(a)||isLastTraversableNode(a)?!1:getComputedStyle$1(a).position==="fixed"||hasFixedPositionAncestor(a,i)}function getClippingElementAncestors(s,i){const a=i.get(s);if(a)return a;let c=getOverflowAncestors(s,[],!1).filter($=>isElement($)&&getNodeName($)!=="body"),d=null;const g=getComputedStyle$1(s).position==="fixed";let b=g?getParentNode(s):s;for(;isElement(b)&&!isLastTraversableNode(b);){const $=getComputedStyle$1(b),_=isContainingBlock(b);!_&&$.position==="fixed"&&(d=null),(g?!_&&!d:!_&&$.position==="static"&&!!d&&["absolute","fixed"].includes(d.position)||isOverflowElement(b)&&!_&&hasFixedPositionAncestor(s,b))?c=c.filter(_e=>_e!==b):d=$,b=getParentNode(b)}return i.set(s,c),c}function getClippingRect(s){let{element:i,boundary:a,rootBoundary:c,strategy:d}=s;const b=[...a==="clippingAncestors"?getClippingElementAncestors(i,this._c):[].concat(a),c],$=b[0],_=b.reduce((j,_e)=>{const et=getClientRectFromClippingAncestor(i,_e,d);return j.top=max(et.top,j.top),j.right=min(et.right,j.right),j.bottom=min(et.bottom,j.bottom),j.left=max(et.left,j.left),j},getClientRectFromClippingAncestor(i,$,d));return{width:_.right-_.left,height:_.bottom-_.top,x:_.left,y:_.top}}function getDimensions(s){return getCssDimensions(s)}function getRectRelativeToOffsetParent(s,i,a){const c=isHTMLElement(i),d=getDocumentElement(i),g=a==="fixed",b=getBoundingClientRect(s,!0,g,i);let $={scrollLeft:0,scrollTop:0};const _=createCoords(0);if(c||!c&&!g)if((getNodeName(i)!=="body"||isOverflowElement(d))&&($=getNodeScroll(i)),c){const j=getBoundingClientRect(i,!0,g,i);_.x=j.x+i.clientLeft,_.y=j.y+i.clientTop}else d&&(_.x=getWindowScrollBarX(d));return{x:b.left+$.scrollLeft-_.x,y:b.top+$.scrollTop-_.y,width:b.width,height:b.height}}function getTrueOffsetParent(s,i){return!isHTMLElement(s)||getComputedStyle$1(s).position==="fixed"?null:i?i(s):s.offsetParent}function getOffsetParent(s,i){const a=getWindow(s);if(!isHTMLElement(s))return a;let c=getTrueOffsetParent(s,i);for(;c&&isTableElement(c)&&getComputedStyle$1(c).position==="static";)c=getTrueOffsetParent(c,i);return c&&(getNodeName(c)==="html"||getNodeName(c)==="body"&&getComputedStyle$1(c).position==="static"&&!isContainingBlock(c))?a:c||getContainingBlock(s)||a}const getElementRects=async function(s){let{reference:i,floating:a,strategy:c}=s;const d=this.getOffsetParent||getOffsetParent,g=this.getDimensions;return{reference:getRectRelativeToOffsetParent(i,await d(a),c),floating:{x:0,y:0,...await g(a)}}};function isRTL(s){return getComputedStyle$1(s).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function observeMove(s,i){let a=null,c;const d=getDocumentElement(s);function g(){clearTimeout(c),a&&a.disconnect(),a=null}function b($,_){$===void 0&&($=!1),_===void 0&&(_=1),g();const{left:j,top:_e,width:et,height:tt}=s.getBoundingClientRect();if($||i(),!et||!tt)return;const nt=floor(_e),rt=floor(d.clientWidth-(j+et)),at=floor(d.clientHeight-(_e+tt)),lt=floor(j),st={rootMargin:-nt+"px "+-rt+"px "+-at+"px "+-lt+"px",threshold:max(0,min(1,_))||1};let it=!0;function ut(ct){const pt=ct[0].intersectionRatio;if(pt!==_){if(!it)return b();pt?b(!1,pt):c=setTimeout(()=>{b(!1,1e-7)},100)}it=!1}try{a=new IntersectionObserver(ut,{...st,root:d.ownerDocument})}catch{a=new IntersectionObserver(ut,st)}a.observe(s)}return b(!0),g}function autoUpdate(s,i,a,c){c===void 0&&(c={});const{ancestorScroll:d=!0,ancestorResize:g=!0,elementResize:b=typeof ResizeObserver=="function",layoutShift:$=typeof IntersectionObserver=="function",animationFrame:_=!1}=c,j=unwrapElement(s),_e=d||g?[...j?getOverflowAncestors(j):[],...getOverflowAncestors(i)]:[];_e.forEach(ot=>{d&&ot.addEventListener("scroll",a,{passive:!0}),g&&ot.addEventListener("resize",a)});const et=j&&$?observeMove(j,a):null;let tt=-1,nt=null;b&&(nt=new ResizeObserver(ot=>{let[st]=ot;st&&st.target===j&&nt&&(nt.unobserve(i),cancelAnimationFrame(tt),tt=requestAnimationFrame(()=>{nt&&nt.observe(i)})),a()}),j&&!_&&nt.observe(j),nt.observe(i));let rt,at=_?getBoundingClientRect(s):null;_&<();function lt(){const ot=getBoundingClientRect(s);at&&(ot.x!==at.x||ot.y!==at.y||ot.width!==at.width||ot.height!==at.height)&&a(),at=ot,rt=requestAnimationFrame(lt)}return a(),()=>{_e.forEach(ot=>{d&&ot.removeEventListener("scroll",a),g&&ot.removeEventListener("resize",a)}),et&&et(),nt&&nt.disconnect(),nt=null,_&&cancelAnimationFrame(rt)}}const computePosition=(s,i,a)=>{const c=new Map,d={platform,...a},g={...d.platform,_c:c};return computePosition$1(s,i,{...d,platform:g})},arrow=s=>{function i(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:s,fn(a){const{element:c,padding:d}=typeof s=="function"?s(a):s;return c&&i(c)?c.current!=null?arrow$1({element:c.current,padding:d}).fn(a):{}:c?arrow$1({element:c,padding:d}).fn(a):{}}}};var index=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual(s,i){if(s===i)return!0;if(typeof s!=typeof i)return!1;if(typeof s=="function"&&s.toString()===i.toString())return!0;let a,c,d;if(s&&i&&typeof s=="object"){if(Array.isArray(s)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(!deepEqual(s[c],i[c]))return!1;return!0}if(d=Object.keys(s),a=d.length,a!==Object.keys(i).length)return!1;for(c=a;c--!==0;)if(!{}.hasOwnProperty.call(i,d[c]))return!1;for(c=a;c--!==0;){const g=d[c];if(!(g==="_owner"&&s.$$typeof)&&!deepEqual(s[g],i[g]))return!1}return!0}return s!==s&&i!==i}function getDPR(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(s,i){const a=getDPR(s);return Math.round(i*a)/a}function useLatestRef(s){const i=reactExports.useRef(s);return index(()=>{i.current=s}),i}function useFloating(s){s===void 0&&(s={});const{placement:i="bottom",strategy:a="absolute",middleware:c=[],platform:d,elements:{reference:g,floating:b}={},transform:$=!0,whileElementsMounted:_,open:j}=s,[_e,et]=reactExports.useState({x:0,y:0,strategy:a,placement:i,middlewareData:{},isPositioned:!1}),[tt,nt]=reactExports.useState(c);deepEqual(tt,c)||nt(c);const[rt,at]=reactExports.useState(null),[lt,ot]=reactExports.useState(null),st=reactExports.useCallback(bt=>{bt!=pt.current&&(pt.current=bt,at(bt))},[at]),it=reactExports.useCallback(bt=>{bt!==mt.current&&(mt.current=bt,ot(bt))},[ot]),ut=g||rt,ct=b||lt,pt=reactExports.useRef(null),mt=reactExports.useRef(null),xt=reactExports.useRef(_e),St=useLatestRef(_),wt=useLatestRef(d),_t=reactExports.useCallback(()=>{if(!pt.current||!mt.current)return;const bt={placement:i,strategy:a,middleware:tt};wt.current&&(bt.platform=wt.current),computePosition(pt.current,mt.current,bt).then($t=>{const Et={...$t,isPositioned:!0};ht.current&&!deepEqual(xt.current,Et)&&(xt.current=Et,reactDomExports.flushSync(()=>{et(Et)}))})},[tt,i,a,wt]);index(()=>{j===!1&&xt.current.isPositioned&&(xt.current.isPositioned=!1,et(bt=>({...bt,isPositioned:!1})))},[j]);const ht=reactExports.useRef(!1);index(()=>(ht.current=!0,()=>{ht.current=!1}),[]),index(()=>{if(ut&&(pt.current=ut),ct&&(mt.current=ct),ut&&ct){if(St.current)return St.current(ut,ct,_t);_t()}},[ut,ct,_t,St]);const dt=reactExports.useMemo(()=>({reference:pt,floating:mt,setReference:st,setFloating:it}),[st,it]),ft=reactExports.useMemo(()=>({reference:ut,floating:ct}),[ut,ct]),vt=reactExports.useMemo(()=>{const bt={position:a,left:0,top:0};if(!ft.floating)return bt;const $t=roundByDPR(ft.floating,_e.x),Et=roundByDPR(ft.floating,_e.y);return $?{...bt,transform:"translate("+$t+"px, "+Et+"px)",...getDPR(ft.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:$t,top:Et}},[a,$,ft.floating,_e.x,_e.y]);return reactExports.useMemo(()=>({..._e,update:_t,refs:dt,elements:ft,floatingStyles:vt}),[_e,_t,dt,ft,vt])}function o(s){return i=>{s.forEach(a=>{typeof a=="function"?a(i):a!=null&&(a.current=i)})}}function useFloatingPosition({floatingWidth:s,ref:i,disablePositioning:a=!1,placement:c="bottom",offset:d=2,showArrow:g=!1,maxHeight:b,shiftCrossAxis:$=!0,fallbackPlacements:_}){const j=reactExports.useRef(null),_e={placement:c,strategy:"fixed"};a||(_e.whileElementsMounted=autoUpdate,_e.middleware=[offset(d),shift({padding:16,crossAxis:$,mainAxis:!0}),flip({padding:16,fallbackPlacements:_}),size({apply({rects:ot,availableHeight:st,availableWidth:it,elements:ut}){s==="matchTrigger"&&b!=null?Object.assign(ut.floating.style,{width:`${ot.reference.width}px`,maxWidth:`${it}`,maxHeight:`${Math.min(st,b)}px`}):b!=null&&Object.assign(ut.floating.style,{maxHeight:`${Math.min(st,b)}px`})},padding:16})],g&&_e.middleware.push(arrow({element:j})));const et=useFloating(_e),tt=reactExports.useMemo(()=>o([i,et.refs.setReference]),[et.refs.setReference,i]),{x:nt,y:rt}=et.middlewareData.arrow||{},at={top:"bottom",right:"left",bottom:"top",left:"right"}[et.placement.split("-")[0]],lt={left:nt,top:rt,right:"",bottom:"",[at]:"-4px"};return{...et,reference:tt,arrowRef:j,arrowStyle:lt}}function useMediaQuery(s,{noSSR:i}={noSSR:!0}){const a=typeof window<"u"&&typeof window.matchMedia=="function",[c,d]=reactExports.useState(i?()=>a?window.matchMedia(s).matches:!1:null);return reactExports.useEffect(()=>{if(!a)return;const g=window.matchMedia(s),b=()=>{d(g.matches)};return g.addEventListener("change",b),i||b(),()=>{g.removeEventListener("change",b)}},[a,s,i]),typeof window>"u"?null:c}function useIsMobileMediaQuery(s){return useMediaQuery("(max-width: 768px)",s)}const PopoverAnimation={initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{type:"tween",duration:.125}};function useOverlayViewport(){const{width:s,height:i}=$5df64b3807dc15ee$export$d699905dd57c73ca();return{"--be-viewport-height":`${i}px`,"--be-viewport-width":`${s}px`}}const $ae1eeba8b9eafd08$export$5165eccb35aaadb5=React.createContext(null);$ae1eeba8b9eafd08$export$5165eccb35aaadb5.displayName="PressResponderContext";let $507fabe10e71c6fb$var$currentModality=null,$507fabe10e71c6fb$var$changeHandlers=new Set,$507fabe10e71c6fb$var$hasSetupGlobalListeners=!1,$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1;function $507fabe10e71c6fb$var$triggerChangeHandlers(s,i){for(let a of $507fabe10e71c6fb$var$changeHandlers)a(s,i)}function $507fabe10e71c6fb$var$isValidKey(s){return!(s.metaKey||!$c87311424ea30a05$export$9ac100e40613ea10()&&s.altKey||s.ctrlKey||s.key==="Control"||s.key==="Shift"||s.key==="Meta")}function $507fabe10e71c6fb$var$handleKeyboardEvent(s){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$isValidKey(s)&&($507fabe10e71c6fb$var$currentModality="keyboard",$507fabe10e71c6fb$var$triggerChangeHandlers("keyboard",s))}function $507fabe10e71c6fb$var$handlePointerEvent(s){$507fabe10e71c6fb$var$currentModality="pointer",(s.type==="mousedown"||s.type==="pointerdown")&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$triggerChangeHandlers("pointer",s))}function $507fabe10e71c6fb$var$handleClickEvent(s){$6a7db85432448f7f$export$60278871457622de(s)&&($507fabe10e71c6fb$var$hasEventBeforeFocus=!0,$507fabe10e71c6fb$var$currentModality="virtual")}function $507fabe10e71c6fb$var$handleFocusEvent(s){s.target===window||s.target===document||(!$507fabe10e71c6fb$var$hasEventBeforeFocus&&!$507fabe10e71c6fb$var$hasBlurredWindowRecently&&($507fabe10e71c6fb$var$currentModality="virtual",$507fabe10e71c6fb$var$triggerChangeHandlers("virtual",s)),$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!1)}function $507fabe10e71c6fb$var$handleWindowBlur(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!1,$507fabe10e71c6fb$var$hasBlurredWindowRecently=!0}function $507fabe10e71c6fb$var$setupGlobalFocusEvents(){if(typeof window>"u"||$507fabe10e71c6fb$var$hasSetupGlobalListeners)return;let s=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){$507fabe10e71c6fb$var$hasEventBeforeFocus=!0,s.apply(this,arguments)},document.addEventListener("keydown",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),document.addEventListener("keyup",$507fabe10e71c6fb$var$handleKeyboardEvent,!0),document.addEventListener("click",$507fabe10e71c6fb$var$handleClickEvent,!0),window.addEventListener("focus",$507fabe10e71c6fb$var$handleFocusEvent,!0),window.addEventListener("blur",$507fabe10e71c6fb$var$handleWindowBlur,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("pointermove",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("pointerup",$507fabe10e71c6fb$var$handlePointerEvent,!0)):(document.addEventListener("mousedown",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("mousemove",$507fabe10e71c6fb$var$handlePointerEvent,!0),document.addEventListener("mouseup",$507fabe10e71c6fb$var$handlePointerEvent,!0)),$507fabe10e71c6fb$var$hasSetupGlobalListeners=!0}typeof document<"u"&&(document.readyState!=="loading"?$507fabe10e71c6fb$var$setupGlobalFocusEvents():document.addEventListener("DOMContentLoaded",$507fabe10e71c6fb$var$setupGlobalFocusEvents));function $507fabe10e71c6fb$export$630ff653c5ada6a9(){return $507fabe10e71c6fb$var$currentModality}function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(s){let{ref:i,onInteractOutside:a,isDisabled:c,onInteractOutsideStart:d}=s,g=reactExports.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),b=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_=>{a&&$e0b6e0b68ec7f50f$var$isValidEvent(_,i)&&(d&&d(_),g.current.isPointerDown=!0)}),$=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_=>{a&&a(_)});reactExports.useEffect(()=>{let _=g.current;if(!c)if(typeof PointerEvent<"u"){let j=_e=>{_.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(_e,i)&&$(_e),_.isPointerDown=!1};return document.addEventListener("pointerdown",b,!0),document.addEventListener("pointerup",j,!0),()=>{document.removeEventListener("pointerdown",b,!0),document.removeEventListener("pointerup",j,!0)}}else{let j=et=>{_.ignoreEmulatedMouseEvents?_.ignoreEmulatedMouseEvents=!1:_.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(et,i)&&$(et),_.isPointerDown=!1},_e=et=>{_.ignoreEmulatedMouseEvents=!0,_.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(et,i)&&$(et),_.isPointerDown=!1};return document.addEventListener("mousedown",b,!0),document.addEventListener("mouseup",j,!0),document.addEventListener("touchstart",b,!0),document.addEventListener("touchend",_e,!0),()=>{document.removeEventListener("mousedown",b,!0),document.removeEventListener("mouseup",j,!0),document.removeEventListener("touchstart",b,!0),document.removeEventListener("touchend",_e,!0)}}},[i,c,b,$])}function $e0b6e0b68ec7f50f$var$isValidEvent(s,i){if(s.button>0)return!1;if(s.target){const a=s.target.ownerDocument;if(!a||!a.documentElement.contains(s.target)||s.target.closest("[data-react-aria-top-layer]"))return!1}return i.current&&!i.current.contains(s.target)}function $6a99195332edec8b$export$80f3e147d781571c(s){if($507fabe10e71c6fb$export$630ff653c5ada6a9()==="virtual"){let i=document.activeElement;$bbed8b41f857bcc0$export$24490316f764c430(()=>{document.activeElement===i&&document.contains(s)&&$7215afc6de606d6b$export$de79e2c695e052f3(s)})}else $7215afc6de606d6b$export$de79e2c695e052f3(s)}function $645f2e67b85a24c9$var$isStyleVisible(s){if(!(s instanceof HTMLElement)&&!(s instanceof SVGElement))return!1;let{display:i,visibility:a}=s.style,c=i!=="none"&&a!=="hidden"&&a!=="collapse";if(c){const{getComputedStyle:d}=s.ownerDocument.defaultView;let{display:g,visibility:b}=d(s);c=g!=="none"&&b!=="hidden"&&b!=="collapse"}return c}function $645f2e67b85a24c9$var$isAttributeVisible(s,i){return!s.hasAttribute("hidden")&&(s.nodeName==="DETAILS"&&i&&i.nodeName!=="SUMMARY"?s.hasAttribute("open"):!0)}function $645f2e67b85a24c9$export$e989c0fffaa6b27a(s,i){return s.nodeName!=="#comment"&&$645f2e67b85a24c9$var$isStyleVisible(s)&&$645f2e67b85a24c9$var$isAttributeVisible(s,i)&&(!s.parentElement||$645f2e67b85a24c9$export$e989c0fffaa6b27a(s.parentElement,s))}const $9bf71ea28793e738$var$FocusContext=React.createContext(null);let $9bf71ea28793e738$var$activeScope=null;function $9bf71ea28793e738$export$20e40289641fbbb6(s){let{children:i,contain:a,restoreFocus:c,autoFocus:d}=s,g=reactExports.useRef(),b=reactExports.useRef(),$=reactExports.useRef([]),{parentNode:_}=reactExports.useContext($9bf71ea28793e738$var$FocusContext)||{},j=reactExports.useMemo(()=>new $9bf71ea28793e738$var$TreeNode({scopeRef:$}),[$]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let tt=_||$9bf71ea28793e738$export$d06fae2ee68b101e.root;if($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(tt.scopeRef)&&$9bf71ea28793e738$var$activeScope&&!$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,tt.scopeRef)){let nt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);nt&&(tt=nt)}tt.addChild(j),$9bf71ea28793e738$export$d06fae2ee68b101e.addNode(j)},[j,_]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let tt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($);tt.contain=a},[a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let tt=g.current.nextSibling,nt=[];for(;tt&&tt!==b.current;)nt.push(tt),tt=tt.nextSibling;$.current=nt},[i]),$9bf71ea28793e738$var$useActiveScopeTracker($,c,a),$9bf71ea28793e738$var$useFocusContainment($,a),$9bf71ea28793e738$var$useRestoreFocus($,c,a),$9bf71ea28793e738$var$useAutoFocus($,d),reactExports.useEffect(()=>{if($){let tt=document.activeElement,nt=null;if($9bf71ea28793e738$var$isElementInScope(tt,$.current)){for(let rt of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())$9bf71ea28793e738$var$isElementInScope(tt,rt.scopeRef.current)&&(nt=rt);nt===$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($)&&($9bf71ea28793e738$var$activeScope=nt.scopeRef)}return()=>{let rt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($).parent.scopeRef;($===$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($,$9bf71ea28793e738$var$activeScope))&&(!rt||$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(rt))&&($9bf71ea28793e738$var$activeScope=rt),$9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode($)}}},[$]);let _e=reactExports.useMemo(()=>$9bf71ea28793e738$var$createFocusManagerForScope($),[]),et=reactExports.useMemo(()=>({focusManager:_e,parentNode:j}),[j,_e]);return React.createElement($9bf71ea28793e738$var$FocusContext.Provider,{value:et},React.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:g}),i,React.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:b}))}function $9bf71ea28793e738$export$10c5169755ce7bd7(){var s;return(s=reactExports.useContext($9bf71ea28793e738$var$FocusContext))===null||s===void 0?void 0:s.focusManager}function $9bf71ea28793e738$var$createFocusManagerForScope(s){return{focusNext(i={}){let a=s.current,{from:c,tabbable:d,wrap:g,accept:b}=i,$=c||document.activeElement,_=a[0].previousElementSibling,j=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(a),{tabbable:d,accept:b},a);j.currentNode=$9bf71ea28793e738$var$isElementInScope($,a)?$:_;let _e=j.nextNode();return!_e&&g&&(j.currentNode=_,_e=j.nextNode()),_e&&$9bf71ea28793e738$var$focusElement(_e,!0),_e},focusPrevious(i={}){let a=s.current,{from:c,tabbable:d,wrap:g,accept:b}=i,$=c||document.activeElement,_=a[a.length-1].nextElementSibling,j=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(a),{tabbable:d,accept:b},a);j.currentNode=$9bf71ea28793e738$var$isElementInScope($,a)?$:_;let _e=j.previousNode();return!_e&&g&&(j.currentNode=_,_e=j.previousNode()),_e&&$9bf71ea28793e738$var$focusElement(_e,!0),_e},focusFirst(i={}){let a=s.current,{tabbable:c,accept:d}=i,g=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(a),{tabbable:c,accept:d},a);g.currentNode=a[0].previousElementSibling;let b=g.nextNode();return b&&$9bf71ea28793e738$var$focusElement(b,!0),b},focusLast(i={}){let a=s.current,{tabbable:c,accept:d}=i,g=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(a),{tabbable:c,accept:d},a);g.currentNode=a[a.length-1].nextElementSibling;let b=g.previousNode();return b&&$9bf71ea28793e738$var$focusElement(b,!0),b}}}const $9bf71ea28793e738$var$focusableElements=["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]"],$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";$9bf71ea28793e738$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR=$9bf71ea28793e738$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');function $9bf71ea28793e738$var$getScopeRoot(s){return s[0].parentElement}function $9bf71ea28793e738$var$shouldContainFocus(s){let i=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;i&&i.scopeRef!==s;){if(i.contain)return!1;i=i.parent}return!0}function $9bf71ea28793e738$var$useFocusContainment(s,i){let a=reactExports.useRef(),c=reactExports.useRef(null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let d=s.current;if(!i){c.current&&(cancelAnimationFrame(c.current),c.current=null);return}let g=_=>{if(_.key!=="Tab"||_.altKey||_.ctrlKey||_.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(s))return;let j=document.activeElement,_e=s.current;if(!$9bf71ea28793e738$var$isElementInScope(j,_e))return;let et=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(_e),{tabbable:!0},_e);et.currentNode=j;let tt=_.shiftKey?et.previousNode():et.nextNode();tt||(et.currentNode=_.shiftKey?_e[_e.length-1].nextElementSibling:_e[0].previousElementSibling,tt=_.shiftKey?et.previousNode():et.nextNode()),_.preventDefault(),tt&&$9bf71ea28793e738$var$focusElement(tt,!0)},b=_=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,s))&&$9bf71ea28793e738$var$isElementInScope(_.target,s.current)?($9bf71ea28793e738$var$activeScope=s,a.current=_.target):$9bf71ea28793e738$var$shouldContainFocus(s)&&!$9bf71ea28793e738$var$isElementInChildScope(_.target,s)?a.current?a.current.focus():$9bf71ea28793e738$var$activeScope&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current):$9bf71ea28793e738$var$shouldContainFocus(s)&&(a.current=_.target)},$=_=>{c.current&&cancelAnimationFrame(c.current),c.current=requestAnimationFrame(()=>{$9bf71ea28793e738$var$shouldContainFocus(s)&&!$9bf71ea28793e738$var$isElementInChildScope(document.activeElement,s)&&($9bf71ea28793e738$var$activeScope=s,document.body.contains(_.target)?(a.current=_.target,a.current.focus()):$9bf71ea28793e738$var$activeScope&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current))})};return document.addEventListener("keydown",g,!1),document.addEventListener("focusin",b,!1),d.forEach(_=>_.addEventListener("focusin",b,!1)),d.forEach(_=>_.addEventListener("focusout",$,!1)),()=>{document.removeEventListener("keydown",g,!1),document.removeEventListener("focusin",b,!1),d.forEach(_=>_.removeEventListener("focusin",b,!1)),d.forEach(_=>_.removeEventListener("focusout",$,!1))}},[s,i]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{c.current&&cancelAnimationFrame(c.current)},[c])}function $9bf71ea28793e738$var$isElementInAnyScope(s){return $9bf71ea28793e738$var$isElementInChildScope(s)}function $9bf71ea28793e738$var$isElementInScope(s,i){return i.some(a=>a.contains(s))}function $9bf71ea28793e738$var$isElementInChildScope(s,i=null){if(s instanceof Element&&s.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:a}of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(i)))if($9bf71ea28793e738$var$isElementInScope(s,a.current))return!0;return!1}function $9bf71ea28793e738$var$isAncestorScope(s,i){var a;let c=(a=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(i))===null||a===void 0?void 0:a.parent;for(;c;){if(c.scopeRef===s)return!0;c=c.parent}return!1}function $9bf71ea28793e738$var$focusElement(s,i=!1){if(s!=null&&!i)try{$6a99195332edec8b$export$80f3e147d781571c(s)}catch{}else if(s!=null)try{s.focus()}catch{}}function $9bf71ea28793e738$var$focusFirstInScope(s,i=!0){let a=s[0].previousElementSibling,c=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(s),{tabbable:i},s);c.currentNode=a;let d=c.nextNode();i&&!d&&(c=$9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(s),{tabbable:!1},s),c.currentNode=a,d=c.nextNode()),$9bf71ea28793e738$var$focusElement(d)}function $9bf71ea28793e738$var$useAutoFocus(s,i){const a=React.useRef(i);reactExports.useEffect(()=>{a.current&&($9bf71ea28793e738$var$activeScope=s,$9bf71ea28793e738$var$isElementInScope(document.activeElement,$9bf71ea28793e738$var$activeScope.current)||$9bf71ea28793e738$var$focusFirstInScope(s.current)),a.current=!1},[s])}function $9bf71ea28793e738$var$useActiveScopeTracker(s,i,a){$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(i||a)return;let c=s.current,d=g=>{let b=g.target;$9bf71ea28793e738$var$isElementInScope(b,s.current)?$9bf71ea28793e738$var$activeScope=s:$9bf71ea28793e738$var$isElementInAnyScope(b)||($9bf71ea28793e738$var$activeScope=null)};return document.addEventListener("focusin",d,!1),c.forEach(g=>g.addEventListener("focusin",d,!1)),()=>{document.removeEventListener("focusin",d,!1),c.forEach(g=>g.removeEventListener("focusin",d,!1))}},[s,i,a])}function $9bf71ea28793e738$var$shouldRestoreFocus(s){let i=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);for(;i&&i.scopeRef!==s;){if(i.nodeToRestore)return!1;i=i.parent}return(i==null?void 0:i.scopeRef)===s}function $9bf71ea28793e738$var$useRestoreFocus(s,i,a){const c=reactExports.useRef(typeof document<"u"?document.activeElement:null);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let d=s.current;if(!i||a)return;let g=()=>{(!$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,s))&&$9bf71ea28793e738$var$isElementInScope(document.activeElement,s.current)&&($9bf71ea28793e738$var$activeScope=s)};return document.addEventListener("focusin",g,!1),d.forEach(b=>b.addEventListener("focusin",g,!1)),()=>{document.removeEventListener("focusin",g,!1),d.forEach(b=>b.removeEventListener("focusin",g,!1))}},[s,a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!i)return;let d=g=>{if(g.key!=="Tab"||g.altKey||g.ctrlKey||g.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(s))return;let b=document.activeElement;if(!$9bf71ea28793e738$var$isElementInScope(b,s.current))return;let $=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s).nodeToRestore,_=$9bf71ea28793e738$export$2d6ec8fc375ceafa(document.body,{tabbable:!0});_.currentNode=b;let j=g.shiftKey?_.previousNode():_.nextNode();if((!document.body.contains($)||$===document.body)&&($=null,$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s).nodeToRestore=null),(!j||!$9bf71ea28793e738$var$isElementInScope(j,s.current))&&$){_.currentNode=$;do j=g.shiftKey?_.previousNode():_.nextNode();while($9bf71ea28793e738$var$isElementInScope(j,s.current));g.preventDefault(),g.stopPropagation(),j?$9bf71ea28793e738$var$focusElement(j,!0):$9bf71ea28793e738$var$isElementInAnyScope($)?$9bf71ea28793e738$var$focusElement($,!0):b.blur()}};return a||document.addEventListener("keydown",d,!0),()=>{a||document.removeEventListener("keydown",d,!0)}},[s,i,a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(i)return $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s).nodeToRestore=c.current,()=>{let d=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s).nodeToRestore;if(i&&d&&($9bf71ea28793e738$var$isElementInScope(document.activeElement,s.current)||document.activeElement===document.body&&$9bf71ea28793e738$var$shouldRestoreFocus(s))){let g=$9bf71ea28793e738$export$d06fae2ee68b101e.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let b=g.getTreeNode(s);for(;b;){if(b.nodeToRestore&&document.body.contains(b.nodeToRestore)){$9bf71ea28793e738$var$focusElement(b.nodeToRestore);return}b=b.parent}for(b=g.getTreeNode(s);b;){if(b.scopeRef&&$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(b.scopeRef)){$9bf71ea28793e738$var$focusFirstInScope(b.scopeRef.current,!0);return}b=b.parent}}})}}},[s,i])}function $9bf71ea28793e738$export$2d6ec8fc375ceafa(s,i,a){let c=i!=null&&i.tabbable?$9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR:$9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR,d=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode(g){var b;return!(i==null||(b=i.from)===null||b===void 0)&&b.contains(g)?NodeFilter.FILTER_REJECT:g.matches(c)&&$645f2e67b85a24c9$export$e989c0fffaa6b27a(g)&&(!a||$9bf71ea28793e738$var$isElementInScope(g,a))&&(!(i!=null&&i.accept)||i.accept(g))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return i!=null&&i.from&&(d.currentNode=i.from),d}function $9bf71ea28793e738$export$c5251b9e124bf29(s,i={}){return{focusNext(a={}){let c=s.current;if(!c)return;let{from:d,tabbable:g=i.tabbable,wrap:b=i.wrap,accept:$=i.accept}=a,_=d||document.activeElement,j=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:g,accept:$});c.contains(_)&&(j.currentNode=_);let _e=j.nextNode();return!_e&&b&&(j.currentNode=c,_e=j.nextNode()),_e&&$9bf71ea28793e738$var$focusElement(_e,!0),_e},focusPrevious(a=i){let c=s.current;if(!c)return;let{from:d,tabbable:g=i.tabbable,wrap:b=i.wrap,accept:$=i.accept}=a,_=d||document.activeElement,j=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:g,accept:$});if(c.contains(_))j.currentNode=_;else{let et=$9bf71ea28793e738$var$last(j);return et&&$9bf71ea28793e738$var$focusElement(et,!0),et}let _e=j.previousNode();return!_e&&b&&(j.currentNode=c,_e=$9bf71ea28793e738$var$last(j)),_e&&$9bf71ea28793e738$var$focusElement(_e,!0),_e},focusFirst(a=i){let c=s.current;if(!c)return;let{tabbable:d=i.tabbable,accept:g=i.accept}=a,$=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:d,accept:g}).nextNode();return $&&$9bf71ea28793e738$var$focusElement($,!0),$},focusLast(a=i){let c=s.current;if(!c)return;let{tabbable:d=i.tabbable,accept:g=i.accept}=a,b=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:d,accept:g}),$=$9bf71ea28793e738$var$last(b);return $&&$9bf71ea28793e738$var$focusElement($,!0),$}}}function $9bf71ea28793e738$var$last(s){let i,a;do a=s.lastChild(),a&&(i=a);while(a);return i}class $9bf71ea28793e738$var$Tree{get size(){return this.fastMap.size}getTreeNode(i){return this.fastMap.get(i)}addTreeNode(i,a,c){let d=this.fastMap.get(a??null),g=new $9bf71ea28793e738$var$TreeNode({scopeRef:i});d.addChild(g),g.parent=d,this.fastMap.set(i,g),c&&(g.nodeToRestore=c)}addNode(i){this.fastMap.set(i.scopeRef,i)}removeTreeNode(i){if(i===null)return;let a=this.fastMap.get(i),c=a.parent;for(let g of this.traverse())g!==a&&a.nodeToRestore&&g.nodeToRestore&&a.scopeRef.current&&$9bf71ea28793e738$var$isElementInScope(g.nodeToRestore,a.scopeRef.current)&&(g.nodeToRestore=a.nodeToRestore);let d=a.children;c.removeChild(a),d.size>0&&d.forEach(g=>c.addChild(g)),this.fastMap.delete(a.scopeRef)}*traverse(i=this.root){if(i.scopeRef!=null&&(yield i),i.children.size>0)for(let a of i.children)yield*this.traverse(a)}clone(){let i=new $9bf71ea28793e738$var$Tree;for(let a of this.traverse())i.addTreeNode(a.scopeRef,a.parent.scopeRef,a.nodeToRestore);return i}constructor(){this.fastMap=new Map,this.root=new $9bf71ea28793e738$var$TreeNode({scopeRef:null}),this.fastMap.set(null,this.root)}}class $9bf71ea28793e738$var$TreeNode{addChild(i){this.children.add(i),i.parent=this}removeChild(i){this.children.delete(i),i.parent=void 0}constructor(i){this.children=new Set,this.contain=!1,this.scopeRef=i.scopeRef}}let $9bf71ea28793e738$export$d06fae2ee68b101e=new $9bf71ea28793e738$var$Tree;const Popover=reactExports.forwardRef(({children:s,style:i,autoFocus:a=!1,restoreFocus:c=!0,isDismissable:d,isContextMenu:g,isOpen:b,onClose:$,triggerRef:_,arrowRef:j,arrowStyle:_e,onPointerLeave:et,onPointerEnter:tt},nt)=>{const rt=useOverlayViewport(),at=$df56164dff5785e2$export$4338b53315abf666(nt),{domProps:lt}=useCloseOnInteractOutside({isDismissable:d,isOpen:b,onClose:$,triggerRef:_,isContextMenu:g},at);return jsxRuntimeExports.jsx(m$1.div,{className:"isolate z-popover",role:"presentation",ref:at,style:{...rt,...i,position:"fixed"},...PopoverAnimation,...$3ef42575df84b30b$export$9d1611c77c2fe928(lt,{onPointerLeave:et,onPointerEnter:tt}),children:jsxRuntimeExports.jsx($9bf71ea28793e738$export$20e40289641fbbb6,{restoreFocus:c,autoFocus:a,contain:!1,children:s})})}),visibleOverlays=[];function useCloseOnInteractOutside({onClose:s,isDismissable:i=!0,triggerRef:a,isContextMenu:c=!1},d){const g=reactExports.useRef({isPointerDown:!1,isContextMenu:c,onClose:s}),b=g.current;b.isContextMenu=c,b.onClose=s;const $=reactExports.useCallback(rt=>{const at=rt.target;if(at){const lt=at.ownerDocument;if(!lt||!lt.documentElement.contains(at))return!1}return d.current&&!d.current.contains(at)},[d]),_=reactExports.useCallback(()=>visibleOverlays[visibleOverlays.length-1]===d,[d]),j=reactExports.useCallback(()=>{_()&&b.onClose()},[_,b]),_e=reactExports.useCallback(rt=>{var at,lt;return a.current&&"contains"in a.current?(lt=(at=a.current).contains)==null?void 0:lt.call(at,rt):!1},[a]),et=reactExports.useCallback(rt=>{_e(rt.target)||_()&&(rt.stopPropagation(),rt.preventDefault())},[_e,_]),tt=reactExports.useCallback(rt=>{_e(rt.target)||(_()&&(rt.stopPropagation(),rt.preventDefault()),(!b.isContextMenu||rt.button!==2)&&j())},[_e,j,b,_]);return reactExports.useEffect(()=>{visibleOverlays.push(d);const rt=st=>{$(st)&&(et(st),g.current.isPointerDown=!0)},at=st=>{g.current.isPointerDown&&$(st)&&(g.current.isPointerDown=!1,tt(st))},lt=st=>{st.preventDefault(),$(st)&&j()},ot=st=>{if(!a.current)return;const it=st.target;let ut;a.current instanceof Node?ut=a.current:"contextElement"in a.current&&(ut=a.current.contextElement),(!(it instanceof Node)||!ut||it.contains(ut))&&b.onClose()};return document.addEventListener("pointerdown",rt,!0),document.addEventListener("pointerup",at,!0),document.addEventListener("contextmenu",lt,!0),document.addEventListener("scroll",ot,!0),()=>{const st=visibleOverlays.indexOf(d);st>=0&&visibleOverlays.splice(st,1),document.removeEventListener("pointerdown",rt,!0),document.removeEventListener("pointerup",at,!0),document.removeEventListener("contextmenu",lt,!0),document.removeEventListener("scroll",ot,!0)}},[d,$,b,tt,et,a,_e,j]),{domProps:{onKeyDown:rt=>{rt.key==="Escape"&&(rt.stopPropagation(),rt.preventDefault(),j())}}}}const opacityAnimation={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}};function Underlay({position:s="absolute",className:i,isTransparent:a=!1,disableInitialTransition:c,...d}){return jsxRuntimeExports.jsx(m$1.div,{...d,className:clsx$1(i,!a&&"bg-background/80","inset-0 z-10 h-full w-full",s,"backdrop-blur-sm"),"aria-hidden":!0,initial:c?void 0:{opacity:0},animate:{opacity:1},exit:{opacity:0},...opacityAnimation,transition:{duration:.15}})}const Tray=reactExports.forwardRef(({children:s,autoFocus:i=!1,restoreFocus:a=!0,isDismissable:c,isOpen:d,onClose:g},b)=>{const $=useOverlayViewport(),_=$df56164dff5785e2$export$4338b53315abf666(b);return jsxRuntimeExports.jsxs("div",{className:"isolate z-tray fixed inset-0",style:$,children:[jsxRuntimeExports.jsx(Underlay,{onClick:()=>{c&&g()}},"tray-underlay"),jsxRuntimeExports.jsx(m$1.div,{ref:_,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:jsxRuntimeExports.jsx($9bf71ea28793e738$export$20e40289641fbbb6,{restoreFocus:a,autoFocus:i,contain:!0,children:s})})]})}),Modal=reactExports.forwardRef(({children:s,autoFocus:i=!1,restoreFocus:a=!0,isDismissable:c=!0,isOpen:d=!1,placement:g="center",onClose:b},$)=>{const _=useOverlayViewport(),j=$df56164dff5785e2$export$4338b53315abf666($);return jsxRuntimeExports.jsxs("div",{className:"fixed inset-0 isolate z-modal",style:_,onKeyDown:_e=>{_e.key==="Escape"&&(_e.stopPropagation(),_e.preventDefault(),b())},children:[jsxRuntimeExports.jsx(Underlay,{onClick:()=>{c&&b()}},"modal-underlay"),jsxRuntimeExports.jsx(m$1.div,{ref:j,className:clsx$1("pointer-events-none absolute inset-0 z-20 flex h-full w-full",g==="center"&&"items-center justify-center",g==="top"&&"items-start justify-center pt-40"),role:"presentation",initial:{opacity:0,scale:g==="top"?1:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1},transition:{duration:.1},children:jsxRuntimeExports.jsx($9bf71ea28793e738$export$20e40289641fbbb6,{restoreFocus:a,autoFocus:i,contain:!0,children:s})})]})});function Section({children:s,label:i,index:a}){const c=reactExports.useId();return jsxRuntimeExports.jsxs("div",{role:"group",className:clsx$1(a!==0&&"border-t my-4"),"aria-labelledby":i?`be-select-${c}`:void 0,children:[i&&jsxRuntimeExports.jsx("div",{className:"block uppercase text-muted text-xs px-16 py-10",role:"presentation",id:`be-select-${c}`,"aria-hidden":"true",children:i}),s]})}const buildListboxCollection=memoize(({maxItems:s,children:i,items:a,inputValue:c})=>{let d=childrenToCollection({children:i,items:a}),g=filterCollection({collection:d,inputValue:c});return s&&(d=new Map([...d.entries()].slice(0,s)),g=new Map([...g.entries()].slice(0,s))),{collection:d,filteredCollection:g}}),filterCollection=memoize(({collection:s,inputValue:i})=>{let a=new Map;const c=i?`${i}`.toLowerCase().trim():"";if(!c)a=s;else{let d=0;s.forEach((g,b)=>{(g.item?JSON.stringify(g.item):g.textLabel).toLowerCase().trim().includes(c)&&a.set(b,{...g,index:d++})})}return a}),childrenToCollection=memoize(({children:s,items:i})=>{let a;i&&typeof s=="function"?a=i.map(b=>s(b)):a=s;const c=new Map;let d=0;const g=(b,$,_,j)=>{const _e=d++,et=$?i==null?void 0:i[_].items[j]:i==null?void 0:i[_e];c.set(b.props.value,{index:_e,element:b,textLabel:getTextLabel(b),item:et,section:$,isDisabled:b.props.isDisabled,value:b.props.value})};return reactExports.Children.forEach(a,(b,$)=>{reactExports.isValidElement(b)&&(b.type===Section?reactExports.Children.forEach(b.props.children,(_,j)=>{g(_,b,$,j)}):g(b))}),c});function getTextLabel(s){var a;const i=s.props.children;return s.props.textLabel?s.props.textLabel:(a=i==null?void 0:i.props)!=null&&a.message?i.props.message:`${i}`||""}function useListbox(s,i){const{children:a,items:c,role:d="listbox",virtualFocus:g,loopFocus:b=!1,autoFocusFirstItem:$=!0,onItemSelected:_,clearInputOnItemSelection:j,blurReferenceOnItemSelection:_e,floatingWidth:et="matchTrigger",floatingMinWidth:tt,floatingMaxHeight:nt,offset:rt,placement:at,showCheckmark:lt,showEmptyMessage:ot,maxItems:st,isAsync:it,allowCustomValue:ut,clearSelectionOnInputClear:ct}=s,pt=s.selectionMode||"none",xt=`${reactExports.useId()}-listbox`,[St,wt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.inputValue,s.defaultInputValue||"",s.onInputValueChange),[_t,ht]=reactExports.useState("all"),dt=buildListboxCollection({children:a,items:c,inputValue:it?void 0:St,maxItems:st}),ft=_t==="all"?dt.collection:dt.filteredCollection,vt=reactExports.useRef([]),bt=reactExports.useMemo(()=>[...ft.values()].map(Gt=>Gt.isDisabled?null:Gt.textLabel),[ft]),{selectedValues:$t,selectValues:Et}=useControlledSelection(s),[Tt,jt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.isOpen,s.defaultIsOpen,s.onOpenChange),[kt,It]=reactExports.useState(null),Mt=useFloatingPosition({floatingWidth:et,ref:i,placement:at,offset:rt,maxHeight:nt??420,shiftCrossAxis:!g}),{refs:Bt,strategy:Qt,x:Vt,y:qt}=Mt,Ut=pt==="none"?void 0:ft.get($t[0]),tn=pt==="none"||Ut==null?void 0:Ut.index,Kt=Gt=>{if(pt!=="none"){const Zt=[...ft.values()][Gt];Zt&&Et(Zt.value)}},Jt=reactExports.useCallback((Gt,Zt)=>{var yt,Ct;const vr=[...ft.values()],kr=!vr.find(Rt=>!Rt.isDisabled),Ar=ft.size-1;if(Zt==null||!ft.size||Zt>Ar||Zt<0||kr){It(null);return}Zt=getNonDisabledIndex(vr,Zt,b,Gt),It(Zt),g?(yt=vt.current[Zt])==null||yt.scrollIntoView({block:"nearest"}):(Ct=vt.current[Zt])==null||Ct.focus()},[ft,g,b]),xn=reactExports.useCallback(Gt=>{wt(Gt.target.value),ht(Gt.target.value.trim()?"filtered":"all"),Gt.target.value?jt(!0):ct&&Et(""),$&&kt==null?Jt("increment",0):It(null)},[wt,jt,ht,Et,ct,Jt,$,kt]);return{handleItemSelection:Gt=>{const Zt=Bt.reference.current;pt!=="none"?Et(Gt):Zt&&"focus"in Zt&&Zt.focus(),g&&(wt(j?"":`${Gt}`),_e&&Zt&&"blur"in Zt&&Zt.blur()),ht("all"),jt(!1),_==null||_(Gt),It(null)},onInputChange:xn,loopFocus:b,floatingWidth:et,floatingMinWidth:tt,floatingMaxHeight:nt,showCheckmark:lt,collection:ft,collections:dt,virtualFocus:g,focusItem:Jt,showEmptyMessage:ot&&!!St,allowCustomValue:ut,refs:Bt,reference:Mt.reference,floating:Bt.setFloating,positionStyle:{position:Qt,top:qt??"",left:Vt??""},listContent:bt,listItemsRef:vt,listboxId:xt,role:d,state:{activeIndex:kt,setActiveIndex:It,selectedIndex:tn,setSelectedIndex:Kt,selectionMode:pt,selectedValues:$t,selectValues:Et,inputValue:St,setInputValue:wt,isOpen:Tt,setIsOpen:jt,setActiveCollection:ht}}}function getNonDisabledIndex(s,i,a,c){var g;const d=s.length-1;for(;(g=s[i])!=null&&g.isDisabled;)if(c==="increment"){if(i++,i>=d)if(a)i=0;else return i-1}else if(i--,i<0)if(a)i=d;else return i+1;return i}function useControlledSelection(s){const{selectionMode:i,allowEmptySelection:a}=s,c=i==="single"||i==="multiple",[d,g]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(c?s.selectedValue:void 0,c?s.defaultSelectedValue:void 0,c?s.onSelectionChange:void 0),b=reactExports.useMemo(()=>typeof d>"u"?[]:Array.isArray(d)?d:[d],[d]),$=reactExports.useCallback(_=>{const j=Array.isArray(_)?_:[_];i==="single"?g(j[0]):j.forEach(_e=>{const et=b.indexOf(_e);et===-1?(b.push(_e),g([...b])):(b.length>1||a)&&(b.splice(et,1),g([...b]))})},[a,b,i,g]);return{selectedValues:b,selectValues:$}}const ListBoxContext=reactExports.createContext(null);function useListboxContext(){return reactExports.useContext(ListBoxContext)}const MOBILE_SCREEN_WIDTH=768;function useIsMobileDevice(){return $b5e257d569688ac6$export$535bd6ca7f90a273()||typeof window>"u"?getBootstrapData().is_mobile_device:window.screen.width<=MOBILE_SCREEN_WIDTH}function Listbox({listbox:s,children:i,isLoading:a,mobileOverlay:c=Tray,searchField:d,onClose:g,prepend:b,className:$,..._}){const j=useIsMobileDevice(),{floatingWidth:_e,floatingMinWidth:et="min-w-180",collection:tt,showEmptyMessage:nt,state:{isOpen:rt,setIsOpen:at},positionStyle:lt,floating:ot,refs:st}=s,it=!b&&j?c:Popover,ut=clsx$1("text-base sm:text-sm outline-none bg max-h-inherit flex flex-col",!b&&"shadow-xl border py-4",$,it===Popover&&"rounded-panel",it===Popover&&_e==="auto"?`max-w-288 ${et}`:""),ct=reactExports.useMemo(()=>{let xt=0;const St=[];return[...tt.values()].reduce((wt,_t)=>{if(!_t.section)wt.push(reactExports.cloneElement(_t.element,{key:_t.element.key||_t.element.props.value}));else if(!St.includes(_t.section)){const ht=reactExports.cloneElement(_t.section,{key:_t.section.key||xt,index:xt});wt.push(ht),St.push(_t.section),xt++}return wt},[])},[tt]),pt=ct.length>0||nt&&!a,mt=pt?jsxRuntimeExports.jsxs("div",{className:ut,role:"presentation",children:[d,jsxRuntimeExports.jsx(FocusContainer,{isLoading:a,..._,children:ct})]}):null;return jsxRuntimeExports.jsxs(ListBoxContext.Provider,{value:s,children:[i,b?mt:rootEl&&reactDomExports.createPortal(jsxRuntimeExports.jsx(AnimatePresence,{children:rt&&pt&&jsxRuntimeExports.jsx(it,{triggerRef:st.reference,restoreFocus:!0,isOpen:rt,onClose:()=>{g==null||g(),at(!1)},isDismissable:!0,style:lt,ref:ot,children:mt})}),rootEl)]})}function FocusContainer({className:s,children:i,isLoading:a,...c}){const{role:d,listboxId:g,virtualFocus:b,focusItem:$,state:{activeIndex:_,setActiveIndex:j,selectedIndex:_e}}=useListboxContext(),et=reactExports.useRef(!0),tt=reactExports.useRef(null);return reactExports.useEffect(()=>()=>j(null),[j]),reactExports.useEffect(()=>{if(et.current){const nt=_??_e;nt==null&&!b?requestAnimationFrame(()=>{var rt;(rt=tt.current)==null||rt.focus({preventScroll:!0})}):nt!=null&&requestAnimationFrame(()=>{$("increment",nt)})}et.current=!1},[_,_e,$,b]),jsxRuntimeExports.jsx("div",{tabIndex:b?void 0:-1,role:d,id:g,className:"flex-auto overflow-y-auto overscroll-contain outline-none",ref:tt,...c,children:i.length?i:jsxRuntimeExports.jsx(EmptyMessage,{})})}function EmptyMessage(){return jsxRuntimeExports.jsx("div",{className:"px-8 py-4 text-sm italic text-muted",children:jsxRuntimeExports.jsx(Trans,{message:"There are no items matching your query"})})}const CheckIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckOutlined"),ListItemBase=React.forwardRef((s,i)=>{let{startIcon:a,capitalizeFirst:c,children:d,description:g,endIcon:b,endSection:$,isDisabled:_,isActive:j,isSelected:_e,showCheckmark:et,elementType:tt="div",radius:nt,padding:rt,...at}=s;!a&&et&&(a=jsxRuntimeExports.jsx(CheckIcon,{size:"sm",className:clsx$1("text-primary",!_e&&"invisible")}));const lt=clsx$1("icon-sm rounded overflow-hidden flex-shrink-0",!_&&"text-muted"),ot=clsx$1(!_&&"text-muted"),st=tt;return jsxRuntimeExports.jsxs(st,{...at,"aria-disabled":_,className:itemClassName(s),ref:i,children:[a&&jsxRuntimeExports.jsx("div",{className:lt,children:a}),jsxRuntimeExports.jsxs("div",{className:clsx$1("min-w-auto mr-auto w-full overflow-hidden overflow-ellipsis",c&&"first-letter:capitalize"),children:[d,g&&jsxRuntimeExports.jsx("div",{className:clsx$1("mt-4 whitespace-normal text-xs",_?"text-disabled":"text-muted"),children:g})]}),(b||$)&&jsxRuntimeExports.jsx("div",{className:b?lt:ot,children:b||$})]})});function itemClassName({className:s,isSelected:i,isActive:a,isDisabled:c,showCheckmark:d,endIcon:g,endSection:b,radius:$,padding:_}){let j="";c?j="text-disabled pointer-events-none":i?a?j="bg-primary/focus":j="bg-primary/selected hover:bg-primary/focus":a?j="hover:bg-fg-base/15 bg-focus":j="hover:bg-hover";let _e;return _?_e=_:d?g||b?_e="pl-8 pr-8 py-8":_e="pl-8 pr-24 py-8":_e="px-20 py-8",clsx$1("w-full select-none outline-none cursor-pointer","text-sm truncate flex items-center gap-10",!c&&"text-main",_e,j,s,$)}function Item$1({children:s,value:i,startIcon:a,endIcon:c,endSection:d,description:g,capitalizeFirst:b,textLabel:$,isDisabled:_,onSelected:j,onClick:_e,...et}){var wt;const{collection:tt,showCheckmark:nt,virtualFocus:rt,listboxId:at,role:lt,listItemsRef:ot,handleItemSelection:st,state:{selectedValues:it,activeIndex:ut,setActiveIndex:ct}}=useListboxContext(),pt=it.includes(i),mt=(wt=tt.get(i))==null?void 0:wt.index,xt=ut===mt;if(mt==null)return null;const St=xt&&!_?-1:0;return jsxRuntimeExports.jsx(ListItemBase,{...et,onFocus:()=>{rt||ct(mt)},onPointerEnter:_t=>{ct(mt),rt||_t.currentTarget.focus()},onPointerDown:_t=>{rt&&_t.preventDefault()},onKeyDown:_t=>{(_t.key==="Enter"||_t.key===" ")&&(_t.preventDefault(),st(i),j==null||j())},onClick:_t=>{st(i),j==null||j(),_e==null||_e(_t)},ref:_t=>ot.current[mt]=_t,id:`${at}-${mt}`,role:lt==="menu"?"menuitem":"option",tabIndex:rt?void 0:St,"aria-selected":xt&&pt,showCheckmark:nt,isDisabled:_,isActive:xt,isSelected:pt,startIcon:a,description:g,endIcon:c,endSection:d,capitalizeFirst:b,"data-value":i,children:s})}function useListboxKeyboardNavigation({state:{isOpen:s,setIsOpen:i,selectedIndex:a,activeIndex:c,setInputValue:d},loopFocus:g,collection:b,focusItem:$,handleItemSelection:_,allowCustomValue:j}){const _e=nt=>{if(!(s||!nt.currentTarget.contains(nt.target))){if(nt.key==="ArrowDown")return nt.preventDefault(),i(!0),$("increment",a??0),!0;if(nt.key==="ArrowUp")return nt.preventDefault(),i(!0),$("decrement",a??b.size-1),!0;if(nt.key==="Enter"||nt.key==="Space")return nt.preventDefault(),i(!0),$("increment",a??0),!0}},et=nt=>{const rt=Math.max(0,b.size-1);if(!(!s||!nt.currentTarget.contains(nt.target)))switch(nt.key){case"ArrowDown":return nt.preventDefault(),c==null?$("increment",0):c>=rt?g&&$("increment",0):$("increment",c+1),!0;case"ArrowUp":return nt.preventDefault(),c==null?$("decrement",rt):c<=0?g&&$("decrement",rt):$("decrement",c-1),!0;case"Home":return nt.preventDefault(),$("increment",0),!0;case"End":return nt.preventDefault(),$("decrement",rt),!0;case"Tab":return i(!1),!0}};return{handleTriggerKeyDown:_e,handleListboxKeyboardNavigation:et,handleListboxSearchFieldKeydown:nt=>{var at,lt;if(nt.key==="Enter"&&c!=null&&b.size){nt.preventDefault();const[ot,st]=[...b.entries()][c];ot&&(_(ot),(lt=(at=st.element.props).onSelected)==null||lt.call(at));return}nt.key==="Escape"&&s&&(i(!1),j||d("")),_e(nt)||et(nt)}}}const cache=new Map;function useCollator(s){const{localeCode:i}=useSelectedLocale(),a=i+(s?Object.entries(s).sort((d,g)=>d[0]{let b=g??0;for(;b!=null;){const $=d[b],_=$==null?void 0:$.slice(0,i.search.length);if(_&&s.compare(_,i.search)===0)return b;if(b{const $=getStringForKey(d.key);if(!$||d.ctrlKey||d.metaKey)return null;$===" "&&i.search.trim().length>0&&(d.preventDefault(),d.stopPropagation()),i.search+=$;let _=a(g,b);return _==null&&(_=a(g,0)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},500),_??null}}}function getStringForKey(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}const SearchIcon=createSvgIcon(jsxRuntimeExports.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"),MenuTrigger=reactExports.forwardRef((s,i)=>{const{searchPlaceholder:a,showSearchField:c,children:[d,g],floatingWidth:b="auto",isLoading:$}=s,_=reactExports.useId(),j=useIsMobileMediaQuery(),_e=useListbox({...s,clearInputOnItemSelection:!0,showEmptyMessage:c,floatingWidth:j?"auto":b,virtualFocus:c,role:c?"listbox":"menu",loopFocus:!c,children:g.props.children},i),{state:{isOpen:et,setIsOpen:tt,activeIndex:nt,inputValue:rt,setInputValue:at},listboxId:lt,focusItem:ot,listContent:st,reference:it,onInputChange:ut}=_e,{handleTriggerKeyDown:ct,handleListboxKeyboardNavigation:pt,handleListboxSearchFieldKeydown:mt}=useListboxKeyboardNavigation(_e),{findMatchingItem:xt}=useTypeSelect(),St=wt=>{if(!et)return;const _t=xt(wt,st,nt);_t!=null&&ot("increment",_t)};return jsxRuntimeExports.jsx(Listbox,{onClick:wt=>wt.stopPropagation(),listbox:_e,onKeyDownCapture:c?void 0:St,onKeyDown:pt,onClose:c?()=>at(""):void 0,"aria-labelledby":_,isLoading:$,searchField:c?jsxRuntimeExports.jsx(TextField,{size:"sm",placeholder:a,startAdornment:jsxRuntimeExports.jsx(SearchIcon,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":et?"true":"false","aria-haspopup":"listbox","aria-controls":et?lt:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:rt,onChange:ut,onKeyDown:wt=>{mt(wt)}}):null,children:reactExports.cloneElement(d,{id:_,"aria-expanded":et?"true":"false","aria-haspopup":"menu","aria-controls":et?lt:void 0,ref:it,onKeyDown:ct,onClick:createEventHandler(wt=>{var _t,ht;(ht=(_t=d.props)==null?void 0:_t.onClick)==null||ht.call(_t,wt),tt(!et)})})})});function Menu({children:s}){return s}const preventContextOnMenu=s=>{s.preventDefault()};function ContextMenu({position:s,children:i,...a}){const c=useListbox({...a,isOpen:a.isOpen&&!!s,placement:"right-start",floatingWidth:"auto",role:"menu",loopFocus:!0,children:(i==null?void 0:i.type)===Menu?i.props.children:i}),{reference:d,refs:g,state:{isOpen:b,setIsOpen:$,activeIndex:_},focusItem:j,listContent:_e}=c;reactExports.useEffect(()=>{if(g.floating.current)return g.floating.current.addEventListener("contextmenu",preventContextOnMenu),()=>{var nt;(nt=g.floating.current)==null||nt.removeEventListener("contextmenu",preventContextOnMenu)}},[g.floating]),reactExports.useEffect(()=>{s?(d(pointToVirtualElement(s)),$(!0)):$(!1)},[s,d,$]);const{handleListboxKeyboardNavigation:et}=useListboxKeyboardNavigation(c),{findMatchingItem:tt}=useTypeSelect();return jsxRuntimeExports.jsx(Listbox,{listbox:c,onKeyDownCapture:nt=>{if(!b)return;const rt=tt(nt,_e,_);rt&&j("increment",rt)},onKeyDown:et})}function pointToVirtualElement({x:s,y:i},a){return{getBoundingClientRect(){return{x:s,y:i,width:0,height:0,top:i,right:s,bottom:i,left:s}},contextElement:a}}function useCallbackRef(s){const i=reactExports.useRef(s);return reactExports.useEffect(()=>{i.current=s}),reactExports.useMemo(()=>(...a)=>{var c;return(c=i.current)==null?void 0:c.call(i,...a)},[])}function DialogTrigger(s){let{children:i,type:a,disableInitialTransition:c,isDismissable:d=!0,moveFocusToDialog:g=!0,returnFocusToTrigger:b=!0,triggerOnHover:$=!1,triggerOnContextMenu:_=!1,usePortal:j=!0,mobileType:_e,alwaysReturnCurrentValueOnClose:et}=s;const tt=reactExports.useRef(null),nt=_&&!s.triggerRef?tt:s.triggerRef,rt=reactExports.useRef(s.value),[at,lt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.isOpen,s.defaultIsOpen,s.onOpenChange),[ot,st]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.value,s.defaultValue,s.onValueChange);useIsMobileMediaQuery()&&a==="popover"&&(a=_e||"modal");const ut=reactExports.useRef(null),{x:ct,y:pt,reference:mt,strategy:xt,refs:St}=useFloatingPosition({...s,disablePositioning:a==="modal"}),wt=a==="popover"?{position:xt,top:pt??"",left:ct??""}:{},_t=reactExports.useId(),ht=`${_t}-label`,dt=`${_t}-description`,ft=`${_t}-form`,vt=useCallbackRef(s.onClose),bt=reactExports.useCallback(Ut=>{typeof Ut>"u"&&et&&(Ut=ot);const tn=typeof Ut<"u"?Ut:rt.current;vt==null||vt(tn,{initialValue:rt.current,valueChanged:tn!==rt.current}),lt(!1)},[vt,lt,ot,et]),$t=reactExports.useCallback(()=>{lt(!0),rt.current=s.value},[s.value,lt]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{nt!=null&&nt.current&&St.reference.current!==nt.current&&mt(nt.current)},[mt,nt==null?void 0:nt.current,St]);const Et=reactExports.useMemo(()=>({"aria-labelledby":ht,"aria-describedby":dt}),[ht,dt]);let Tt;a==="modal"?Tt=Modal:a==="tray"?Tt=Tray:Tt=Popover;const jt=reactExports.useMemo(()=>({dialogProps:Et,type:a,labelId:ht,descriptionId:dt,isDismissable:d,close:bt,value:ot,initialValue:rt.current,setValue:st,formId:ft}),[bt,dt,Et,ft,ht,a,d,ot,st]);$=$&&a==="popover";const kt={onPointerEnter:createEventHandler(Ut=>{$t()}),onPointerLeave:createEventHandler(Ut=>{ut.current=setTimeout(()=>{bt()},150)})},It={onPointerEnter:createEventHandler(Ut=>{ut.current&&clearTimeout(ut.current)}),onPointerLeave:createEventHandler(Ut=>{bt()})},Mt={onContextMenu:createEventHandler(Ut=>{Ut.preventDefault(),tt.current=pointToVirtualElement({x:Ut.clientX,y:Ut.clientY},Ut.currentTarget),$t()})},Bt={onClick:createEventHandler(Ut=>{Ut.stopPropagation(),at?bt():$t()})},{dialogTrigger:Qt,dialog:Vt}=extractChildren(i,jt),qt=jsxRuntimeExports.jsx(AnimatePresence,{initial:!c,children:at&&jsxRuntimeExports.jsx(DialogContext.Provider,{value:jt,children:jsxRuntimeExports.jsx(Tt,{...$?It:{},ref:St.setFloating,triggerRef:St.reference,style:wt,restoreFocus:b,autoFocus:g,isOpen:at,onClose:bt,isDismissable:d,isContextMenu:_,placement:s.placement,children:Vt})})});return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Qt&&reactExports.cloneElement(Qt,$3ef42575df84b30b$export$9d1611c77c2fe928({...!nt&&!_?{ref:mt}:{},..._?{}:Bt,...$?kt:{},..._?Mt:{}},{...Qt.props})),j?rootEl&&reactDomExports.createPortal(qt,rootEl):qt]})}function extractChildren(s,i){const a=Array.isArray(s)?s:reactExports.Children.toArray(s);let c=a.length===2?a[1]:a[0];return c=typeof c=="function"?c(i):c,a.length===2?{dialogTrigger:a[0],dialog:c}:{dialog:c}}function DialogStoreOutlet(){const{dialog:s,data:i}=useDialogStore();return jsxRuntimeExports.jsx(DialogTrigger,{type:"modal",isOpen:s!=null,onClose:a=>{closeDialog(a)},children:s?jsxRuntimeExports.jsx(s,{...i}):null})}class LazyLoader{constructor(){zt(this,"loadedAssets",{})}loadAsset(i,a={type:"js"}){var g;const c=(g=this.loadedAssets[i])==null?void 0:g.state;return c==="loaded"&&!a.force?new Promise(b=>b()):!c||this.loadedAssets[i].doc!==a.document||a.force&&c==="loaded"?(this.loadedAssets[i]={state:new Promise(b=>{const $=isAbsoluteUrl(i)?i:`assets/${i}`,_=buildId(i,a.id),j={url:$,id:_,resolve:b,parentEl:a.parentEl,document:a.document};a.type==="css"?this.loadStyleAsset(j):this.loadScriptAsset(j)}),doc:a.document},this.loadedAssets[i].state):this.loadedAssets[i].state}isLoadingOrLoaded(i){return this.loadedAssets[i]!=null}loadStyleAsset(i){var b;const a=i.document||document,c=i.parentEl||a.head,d=a.createElement("link"),g=buildId(i.url,i.id);d.rel="stylesheet",d.id=g,d.href=i.url;try{c.querySelector(`#${g}`)&&((b=c.querySelector(`#${g}`))==null||b.remove())}catch{}d.onload=()=>{this.loadedAssets[i.url].state="loaded",i.resolve()},c.appendChild(d)}loadScriptAsset(i){var b;const a=i.document||document,c=i.parentEl||a.body,d=a.createElement("script"),g=buildId(i.url,i.id);d.async=!0,d.id=g,d.src=i.url;try{c.querySelector(`#${g}`)&&((b=c.querySelector(`#${g}`))==null||b.remove())}catch{}d.onload=()=>{this.loadedAssets[i.url].state="loaded",i.resolve()},(c||c).appendChild(d)}}function buildId(s,i){return i||btoa(s.split("/").pop())}const lazyLoader=new LazyLoader;function prefixId(s){return`be-fonts-${s}`}function loadFonts(s,i){const a=i.document||document,c=[],d=[];let g=[];if(s.forEach(b=>{"google"in b&&b.google?c.push(b):"src"in b&&d.push(b)}),c!=null&&c.length){const b=i.weights||[400],$=s.map(j=>`${j.family}:${b.join(",")}`).join("|"),_=lazyLoader.loadAsset(`https://fonts.googleapis.com/css?family=${$}&display=swap`,{type:"css",id:prefixId(i.id),force:i.forceAssetLoad,document:a});g.push(_)}if(d!=null&&d.length){const b=d.map(async $=>{const _=Array.from(a.fonts.values()).find(_e=>_e.family===$.family);if(_)return _.loaded;const j=new FontFace($.family,`url(${i!=null&&i.prefixSrc?i.prefixSrc($.src):$.src})`,$.descriptors);return a.fonts.add(j),j.load()});g=g.concat(b)}return Promise.all(g)}function AppearanceListener(){const s=useNavigate$1(),{mergeBootstrapData:i,data:a}=useBootstrapData(),c=reactExports.useCallback(d=>{switch(d.type){case"navigate":return s(d.to);case"setValues":return i({themes:{...a.themes,all:d.values.appearance.themes.all},settings:{...a.settings,...d.values.settings}});case"setThemeFont":d.value?(setThemeValue("--be-font-family",d.value.family),loadFonts([d.value],{id:"be-primary-font",forceAssetLoad:!0})):removeThemeValue("--be-font-family");return;case"setThemeValue":return setThemeValue(d.name,d.value);case"setActiveTheme":const g=a.themes.all.find(b=>b.id===d.themeId);g&&applyThemeToDom(g);return;case"setCustomCode":return renderCustomCode(d.mode,d.value)}},[a,i,s]);return reactExports.useEffect(()=>{const d=g=>{isAppearanceEvent(g)&&eventIsTrusted(g)&&c(g.data)};return window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}},[s,c]),null}function isAppearanceEvent(s){var i;return((i=s.data)==null?void 0:i.source)==="be-appearance-editor"}function eventIsTrusted(s){return new URL(s.origin).hostname===window.location.hostname}function renderCustomCode(s,i){const a=s==="html"?document.body:document.head,c=s==="html"?"div":"style";let d=a.querySelector("#be-custom-code");i?(d||(d=document.createElement(c),d.id="be-custom-code",a.appendChild(d)),d.innerHTML=i):d&&d.remove()}function useCustomMenu(s){var g;const i=useSettings(),{user:a,hasPermission:c}=useAuth();if(!s)return null;const d=typeof s=="string"?(g=i.menus)==null?void 0:g.find(b=>{var $;return($=b.positions)==null?void 0:$.includes(s)}):s;return d&&(d.items=d.items.filter(b=>{const $=(b.roles||[]).every(j=>a==null?void 0:a.roles.find(_e=>_e.id===j)),_=(b.permissions||[]).every(j=>c(j));return b.action&&$&&_})),d}function CustomMenu({className:s,iconClassName:i,itemClassName:a,gap:c="gap-30",menu:d,orientation:g="horizontal",children:b,matchDescendants:$,onlyShowIcons:_,iconSize:j,unstyled:_e=!1}){const et=useCustomMenu(d);return et?jsxRuntimeExports.jsx("div",{className:clsx$1("flex",c,g==="vertical"?"flex-col items-start":"items-center",s),"data-menu-id":et.id,children:et.items.map(tt=>b?b(tt):jsxRuntimeExports.jsx(CustomMenuItem,{unstyled:_e,onlyShowIcon:_,matchDescendants:$,iconClassName:i,iconSize:j,className:nt=>typeof a=="function"?a({...nt,item:tt}):a,item:tt},tt.id))}):null}const CustomMenuItem=reactExports.forwardRef(({item:s,className:i,matchDescendants:a,unstyled:c,onlyShowIcon:d,iconClassName:g,iconSize:b="sm",...$},_)=>{const j=jsxRuntimeExports.jsx(Trans,{message:s.label}),_e=s.icon&&createSvgIconFromTree(s.icon),et=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[_e&&jsxRuntimeExports.jsx(_e,{size:b,className:g}),(!_e||!d)&&j]}),tt=!c&&"whitespace-nowrap flex items-center justify-start gap-10",nt=!c&&"outline-none focus-visible:ring-2";return s.type==="link"?jsxRuntimeExports.jsx("a",{className:clsx$1(tt,i==null?void 0:i({isActive:!1}),nt),href:s.action,target:s.target,"data-menu-item-id":s.id,ref:_,...$,children:et}):jsxRuntimeExports.jsx(NavLink,{end:typeof a=="function"?a(s.action):a,className:rt=>clsx$1(tt,i==null?void 0:i(rt),nt),to:s.action,target:s.target,"data-menu-item-id":s.id,ref:_,...$,children:et})});function CookieNotice(){const{cookie_notice:{position:s,enable:i}}=useSettings(),[,a]=useCookie("cookie_notice"),[c,d]=reactExports.useState(()=>!getBootstrapData().show_cookie_notice);return!i||c?null:jsxRuntimeExports.jsxs("div",{className:clsx$1("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",s=="top"?"top-0":"bottom-0"),children:[jsxRuntimeExports.jsx(Trans,{message:`We use cookies to optimize site functionality and provide you with the best possible experience.`}),jsxRuntimeExports.jsx(InfoLink,{}),jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",size:"xs",className:"max-w-100",onClick:()=>{a("true",{days:30,path:"/"}),d(!0)},children:jsxRuntimeExports.jsx(Trans,{message:"OK"})})]})}function InfoLink(){const{cookie_notice:{button:s}}=useSettings();return s!=null&&s.label?jsxRuntimeExports.jsx(CustomMenuItem,{className:()=>"text-primary-light hover:underline",item:s}):null}function GuestRoute({children:s}){const{isLoggedIn:i,getRedirectUri:a}=useAuth(),{isAppearanceEditorActive:c}=useAppearanceEditorMode(),d=a(),{auth:g}=reactExports.useContext(SiteConfigContext),{pathname:b}=useLocation();if(i&&!c){if(d!==b)return jsxRuntimeExports.jsx(Navigate,{to:d,replace:!0});if(g.secondaryRedirectUri)return jsxRuntimeExports.jsx(Navigate,{to:g.secondaryRedirectUri,replace:!0})}return s||jsxRuntimeExports.jsx(Outlet,{})}const LinkStyle="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 ExternalLink({children:s,className:i,target:a="_blank",...c}){return jsxRuntimeExports.jsx("a",{className:LinkStyle,target:a,...c,children:s})}function useRegister(s){const i=useNavigate(),{getRedirectUri:a}=useAuth(),{setBootstrapData:c}=useBootstrapData();return useMutation({mutationFn:register,onSuccess:d=>{c(d.bootstrapData),d.status==="needs_email_verification"?i("/"):i(a(),{replace:!0})},onError:d=>onFormQueryError(d,s)})}function register(s){return apiClient.post("auth/register",s).then(i=>i.data)}function useConnectSocialWithPassword(s){const i=useNavigate(),{getRedirectUri:a}=useAuth(),{setBootstrapData:c}=useBootstrapData();return useMutation({mutationFn:connect,onSuccess:d=>{c(d.bootstrapData),i(a(),{replace:!0})},onError:d=>onFormQueryError(d,s)})}function connect(s){return apiClient.post("secure/auth/social/connect",s).then(i=>i.data)}function DismissButton({onDismiss:s}){const{trans:i}=useTrans(),a=()=>{s&&s()};return jsxRuntimeExports.jsx("button",{className:"sr-only","aria-label":i(message("Dismiss")),tabIndex:-1,onClick:a})}function Dialog(s){const{type:i="modal",dialogProps:a,...c}=reactExports.useContext(DialogContext),{children:d,className:g,size:b="md",background:$,radius:_="rounded",maxWidth:j="max-w-dialog",..._e}=s;let et=null;(i==="popover"||i==="tray")&&(et=jsxRuntimeExports.jsx(DismissButton,{onDismiss:c.close}));const tt=b==="fullscreenTakeover"||i==="tray",nt=clsx$1("mx-auto pointer-events-auto outline-none flex flex-col overflow-hidden",$||"bg",i!=="tray"&&sizeStyle(b),i==="tray"&&"rounded-t border-b-bg",b!=="fullscreenTakeover"&&"shadow-2xl border max-h-dialog",!tt&&`${_} ${j}`,g);return jsxRuntimeExports.jsxs("div",{...$3ef42575df84b30b$export$9d1611c77c2fe928({role:"dialog",tabIndex:-1},a,_e),style:{...s.style,"--be-dialog-padding":"24px"},"aria-modal":!0,className:nt,children:[reactExports.Children.toArray(d).map(rt=>reactExports.isValidElement(rt)?reactExports.cloneElement(rt,{size:rt.props.size??b}):rt),et]})}function sizeStyle(s){switch(s){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 s}}function DialogHeader(s){const{children:i,className:a,color:c,onDismiss:d,leftAdornment:g,rightAdornment:b,hideDismissButton:$=!1,size:_,showDivider:j,justify:_e="justify-between",titleFontWeight:et="font-semibold",titleTextSize:tt=_==="xs"?"text-xs":"text-sm",closeButtonSize:nt=_==="xs"?"xs":"sm",actions:rt}=s,{labelId:at,isDismissable:lt,close:ot}=reactExports.useContext(DialogContext);return jsxRuntimeExports.jsxs("div",{className:clsx$1(a,"flex flex-shrink-0 items-center gap-10",et,j&&"border-b",getPadding$2(s),c||"text-main",_e),children:[g,jsxRuntimeExports.jsx("h3",{id:at,className:clsx$1(tt,"mr-auto leading-5 opacity-90"),children:i}),b,rt,lt&&!$&&jsxRuntimeExports.jsx(IconButton,{"aria-label":"Dismiss",onClick:()=>{d?d():ot()},size:nt,className:clsx$1("-mr-8 text-muted",b&&"sr-only"),children:jsxRuntimeExports.jsx(CloseIcon,{})})]})}function getPadding$2({size:s,padding:i}){if(i)return i;switch(s){case"2xs":case"xs":return"px-14 py-4";case"sm":return"px-18 py-4";default:return"px-24 py-6"}}const DialogBody=reactExports.forwardRef((s,i)=>{const{children:a,className:c,padding:d,size:g,...b}=s;return jsxRuntimeExports.jsx("div",{...b,ref:i,className:clsx$1(c,getPadding$1(s),"overflow-y-auto overflow-x-hidden overscroll-contain text-sm flex-auto"),children:a})});function getPadding$1({size:s,padding:i}){if(i)return i;switch(s){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}function DialogFooter(s){const{children:i,startAction:a,className:c,dividerTop:d,padding:g,size:b}=s;return jsxRuntimeExports.jsxs("div",{className:clsx$1(c,d&&"border-t",getPadding(s),"flex items-center gap-10 flex-shrink-0"),children:[jsxRuntimeExports.jsx("div",{children:a}),jsxRuntimeExports.jsx("div",{className:"ml-auto flex items-center gap-10",children:i})]})}function getPadding({padding:s,size:i}){if(s)return s;switch(i){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}function useDisconnectSocial(){return useMutation({mutationFn:disconnect,onError:s=>showHttpErrorToast(s)})}function disconnect(s){return apiClient.post(`secure/auth/social/${s.service}/disconnect`,s).then(i=>i.data)}function useSocialLogin(){const{trans:s}=useTrans(),{setBootstrapData:i}=useBootstrapData(),a=useDisconnectSocial(),[c,d]=reactExports.useState(!1),g=reactExports.useCallback(b=>{const{status:$,callbackData:_}=b;if($)switch($.toUpperCase()){case"SUCCESS":return _!=null&&_.bootstrapData&&i(_.bootstrapData),b;case"REQUEST_PASSWORD":return d(!0),b;case"ERROR":const j=(_==null?void 0:_.errorMessage)||s({message:"An error occurred. Please try again later"});return toast.danger(j),b;default:return b}},[s,i]);return{requestingPassword:c,setIsRequestingPassword:d,loginWithSocial:async b=>{const $=await openNewSocialAuthWindow(`secure/auth/social/${b}/login`);return g($)},connectSocial:async b=>{const $=b.includes("/")?b:`secure/auth/social/${b}/connect`,_=await openNewSocialAuthWindow($);return g(_)},disconnectSocial:a}}const windowHeight=550,windowWidth=650;let win;function openNewSocialAuthWindow(s){const i=window.screen.width/2-windowWidth/2,a=window.screen.height/2-windowHeight/2;return new Promise(c=>{win=window.open(s,"Authenticate Account",`menubar=0, location=0, toolbar=0, titlebar=0, status=0, scrollbars=1, width=${windowWidth}, height=${windowHeight}, left=${i}, top=${a}`);const d=b=>{const $=getBootstrapData().settings.base_url;b.data.type==="social-auth"&&$.indexOf(b.origin)>-1&&(c(b.data),window.removeEventListener("message",d))};window.addEventListener("message",d);const g=setInterval(()=>{(!win||win.closed)&&(clearInterval(g),c({}),window.removeEventListener("message",d))},1e3)})}const GoogleIcon=createSvgIcon(jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.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"}),jsxRuntimeExports.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"}),jsxRuntimeExports.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"}),jsxRuntimeExports.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"}),jsxRuntimeExports.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]})),FacebookIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"})),TwitterIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})),EnvatoIcon=createSvgIcon(jsxRuntimeExports.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 "})),googleLabel=message("Continue with google"),facebookLabel=message("Continue with facebook"),twitterLabel=message("Continue with twitter"),envatoLabel=message("Continue with envato");function SocialAuthSection({dividerMessage:s}){var j,_e,et,tt,nt,rt,at,lt;const{social:i}=useSettings(),a=useNavigate(),{getRedirectUri:c}=useAuth(),{loginWithSocial:d,requestingPassword:g,setIsRequestingPassword:b}=useSocialLogin();if(!((j=i==null?void 0:i.google)!=null&&j.enable)&&!((_e=i==null?void 0:i.facebook)!=null&&_e.enable)&&!((et=i==null?void 0:i.twitter)!=null&&et.enable)&&!((tt=i==null?void 0:i.envato)!=null&&tt.enable))return null;const _=async ot=>{const st=await d(ot);((st==null?void 0:st.status)==="SUCCESS"||(st==null?void 0:st.status)==="ALREADY_LOGGED_IN")&&a(c(),{replace:!0})};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.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:jsxRuntimeExports.jsx("span",{className:"relative z-10 bg-paper px-10 text-sm text-muted",children:s})}),jsxRuntimeExports.jsxs("div",{className:clsx$1("flex items-center justify-center gap-14",!i.compact_buttons&&"flex-col"),children:[(nt=i==null?void 0:i.google)!=null&&nt.enable?jsxRuntimeExports.jsx(SocialLoginButton,{label:googleLabel,icon:jsxRuntimeExports.jsx(GoogleIcon,{viewBox:"0 0 48 48"}),onClick:()=>_("google")}):null,(rt=i==null?void 0:i.facebook)!=null&&rt.enable?jsxRuntimeExports.jsx(SocialLoginButton,{label:facebookLabel,icon:jsxRuntimeExports.jsx(FacebookIcon,{className:"text-facebook"}),onClick:()=>_("facebook")}):null,(at=i==null?void 0:i.twitter)!=null&&at.enable?jsxRuntimeExports.jsx(SocialLoginButton,{label:twitterLabel,icon:jsxRuntimeExports.jsx(TwitterIcon,{className:"text-twitter"}),onClick:()=>_("twitter")}):null,(lt=i==null?void 0:i.envato)!=null&<.enable?jsxRuntimeExports.jsx(SocialLoginButton,{label:envatoLabel,icon:jsxRuntimeExports.jsx(EnvatoIcon,{viewBox:"0 0 50 50",className:"text-envato"}),onClick:()=>_("envato")}):null]}),jsxRuntimeExports.jsx(DialogTrigger,{type:"modal",isOpen:g,onOpenChange:b,children:jsxRuntimeExports.jsx(RequestPasswordDialog,{})})]})}function RequestPasswordDialog(){const s=useForm(),{formId:i}=useDialogContext(),a=useConnectSocialWithPassword(s);return jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogHeader,{children:jsxRuntimeExports.jsx(Trans,{message:"Password required"})}),jsxRuntimeExports.jsxs(DialogBody,{children:[jsxRuntimeExports.jsx("div",{className:"mb-30 text-sm text-muted",children:jsxRuntimeExports.jsx(Trans,{message:"An account with this email address already exists. If you want to connect the two accounts, enter existing account password."})}),jsxRuntimeExports.jsx(Form,{form:s,id:i,onSubmit:c=>{a.mutate(c)},children:jsxRuntimeExports.jsx(FormTextField,{autoFocus:!0,name:"password",type:"password",required:!0,label:jsxRuntimeExports.jsx(Trans,{message:"Password"})})})]}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"text",children:jsxRuntimeExports.jsx(Trans,{message:"Cancel"})}),jsxRuntimeExports.jsx(Button,{type:"submit",form:i,variant:"flat",color:"primary",disabled:a.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Connect"})})]})]})}function SocialLoginButton({onClick:s,label:i,icon:a}){const{trans:c}=useTrans(),{social:{compact_buttons:d}}=useSettings();return d?jsxRuntimeExports.jsx(IconButton,{variant:"outline","aria-label":c(i),onClick:s,children:a}):jsxRuntimeExports.jsx(Button,{variant:"outline",startIcon:a,onClick:s,className:"min-h-42 w-full",children:jsxRuntimeExports.jsx("span",{className:"min-w-160 text-start",children:jsxRuntimeExports.jsx(Trans,{...i})})})}function AuthLayoutFooter(){const{branding:s}=useSettings();return jsxRuntimeExports.jsxs("div",{className:"pt-42 pb-32 flex items-center gap-30 text-sm text-muted mt-auto",children:[jsxRuntimeExports.jsxs(Link,{className:"hover:text-fg-base transition-colors",to:"/",children:["© ",s.site_name]}),jsxRuntimeExports.jsx(CustomMenu,{menu:"auth-page-footer",orientation:"horizontal",itemClassName:"hover:text-fg-base transition-colors"})]})}const authBgSvg=""+new URL("auth-bg-8529ec0e.svg",import.meta.url).href;function AuthLayout({heading:s,children:i,message:a}){const{branding:c}=useSettings(),d=useIsDarkMode(),{trans:g}=useTrans();return jsxRuntimeExports.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:d?void 0:`url("${authBgSvg}")`},children:[jsxRuntimeExports.jsx(Link,{to:"/",className:"mb-40 block flex-shrink-0","aria-label":g({message:"Go to homepage"}),children:jsxRuntimeExports.jsx("img",{src:d?c.logo_light:c==null?void 0:c.logo_dark,className:"m-auto block h-42 w-auto",alt:""})}),jsxRuntimeExports.jsxs("div",{className:"mx-auto w-full max-w-440 rounded-lg bg px-40 pb-32 pt-40 shadow md:shadow-xl",children:[s&&jsxRuntimeExports.jsx("h1",{className:"mb-20 text-xl",children:s}),i]}),a&&jsxRuntimeExports.jsx("div",{className:"mt-36 text-sm",children:a}),jsxRuntimeExports.jsx(AuthLayoutFooter,{})]})}const CheckBoxOutlineBlankIcon=createSvgIcon(jsxRuntimeExports.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"),CheckboxFilledIcon=createSvgIcon(jsxRuntimeExports.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"),IndeterminateCheckboxFilledIcon=createSvgIcon(jsxRuntimeExports.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"),Checkbox=reactExports.forwardRef((s,i)=>{const{size:a="md",children:c,className:d,icon:g,checkedIcon:b,disabled:$,isIndeterminate:_,errorMessage:j,invalid:_e,orientation:et="horizontal",onChange:tt,autoFocus:nt,required:rt,value:at,name:lt,inputTestId:ot}=s,st=getInputFieldClassNames({...s,label:c}),it=g||CheckBoxOutlineBlankIcon,ut=b||(_?IndeterminateCheckboxFilledIcon:CheckboxFilledIcon),ct=$df56164dff5785e2$export$4338b53315abf666(i);useAutoFocus({autoFocus:nt},ct),reactExports.useEffect(()=>{ct.current&&(ct.current.indeterminate=_||!1)});const[pt,mt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.checked,s.defaultChecked||!1),xt=reactExports.useCallback(ht=>{tt==null||tt(ht),mt(ht.target.checked)},[tt,mt]),St=clsx$1("select-none",d,_e&&"text-danger",!_e&&$&&"text-disabled");let wt,_t=_e?"text-danger":null;return _?(wt=IndeterminateCheckboxFilledIcon,_t=_t||"text-primary"):pt?(wt=ut,_t=_t||"text-primary"):(wt=it,_t=_t||"text-muted"),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:St,children:jsxRuntimeExports.jsxs("div",{className:clsx$1("relative flex items-center",et==="vertical"&&"flex-col flex-col-reverse"),children:[jsxRuntimeExports.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":_?"mixed":pt,"aria-invalid":_e||void 0,onChange:xt,ref:ct,required:rt,disabled:$,value:at,name:lt,"data-testid":ot}),jsxRuntimeExports.jsx(wt,{size:a,className:clsx$1("pointer-events-none",$?"text-disabled":_t)}),c&&jsxRuntimeExports.jsx("div",{className:clsx$1("first-letter:capitalize",st.size.font,et==="vertical"?"mb-6":"ml-6"),children:c})]})}),j&&jsxRuntimeExports.jsx("div",{className:st.error,children:j})]})});function FormCheckbox(s){const{field:{onChange:i,onBlur:a,value:c=!1,ref:d},fieldState:{invalid:g,error:b}}=useController({name:s.name}),$={onChange:i,onBlur:a,checked:c,invalid:g,errorMessage:b==null?void 0:b.message,name:s.name};return jsxRuntimeExports.jsx(Checkbox,{ref:d,...$3ef42575df84b30b$export$9d1611c77c2fe928($,s)})}function useRecaptcha(s){const{recaptcha:{site_key:i,enable:a}={}}=useSettings(),c=i&&(a==null?void 0:a[s]),[d,g]=reactExports.useState(!1);return reactExports.useEffect(()=>{c&&load(i)},[c,i]),{verify:reactExports.useCallback(async()=>{if(!c)return!0;g(!0);const $=await execute(i,s);return $||toast.danger(message("Could not verify you are human.")),g(!1),$},[c,i,s]),isVerifying:d}}async function execute(s,i){return await load(s),new Promise(a=>{var c;(c=window.grecaptcha)==null||c.ready(async()=>{var b;const d=await((b=window.grecaptcha)==null?void 0:b.execute(s,{action:i})),g=apiClient.post("recaptcha/verify",{token:d}).then($=>$.data.success).catch(()=>!1);a(g??!1)})})}function load(s){return lazyLoader.loadAsset(`https://www.google.com/recaptcha/api.js?render=${s}`,{id:"recaptcha-js"})}const requestAnimationFrame$1=window.requestAnimationFrame,cancelAnimationFrame$1=window.cancelAnimationFrame,helmetAttribute="data-be-helmet";let rafId;const Helmet=reactExports.memo(({children:s,tags:i})=>{const{trans:a}=useTrans();return!i&&s&&(i=mapChildrenToTags(s,a)),updateTags(i),null},shallowEqual);function mapChildrenToTags(s,i){return reactExports.Children.map(s,a=>{switch(a.type){case"title":return{nodeName:"title",_text:titleTagChildrenToString(a.props.children,i)};case"meta":return{...a.props,nodeName:"meta"}}})}function titleTagChildrenToString(s,i){return s==null?"":typeof s=="string"?s:Array.isArray(s)?s.map(a=>titleTagChildrenToString(a,i)).join(""):"message"in s?i(s):i(s.props)}function removeOldTags(){document.head.querySelectorAll('meta:not([data-keep]), script[type="application/ld+json"]:not([data-keep]), title, link[rel="canonical"]').forEach(s=>{document.head.removeChild(s)})}function updateTags(s){rafId&&cancelAnimationFrame$1(rafId),rafId=requestAnimationFrame$1(()=>{if(removeOldTags(),typeof s=="string"){const i=document.createElement("template");i.innerHTML=s,i.content.childNodes.forEach(a=>{a instanceof HTMLElement&&(a.setAttribute(helmetAttribute,"true"),document.head.prepend(a))})}else s==null||s.forEach(i=>{updateTag(i)});rafId=null})}function updateTag(s){if(s.nodeName==="title"){typeof s._text<"u"&&document.title!==s._text&&(document.title=s._text);return}const i=document.createElement(s.nodeName);for(const a in s){const c=a;if(c!=="nodeName")if(c==="_text")i.textContent=typeof s._text=="string"?s._text:JSON.stringify(s._text);else{const d=s[c]==null?"":s[c];i.setAttribute(c,d)}}i.setAttribute(helmetAttribute,"true"),document.head.prepend(i)}function StaticPageTitle({children:s}){const{branding:{site_name:i}}=useSettings();return jsxRuntimeExports.jsx(Helmet,{children:s?jsxRuntimeExports.jsxs("title",{children:[s," - ",i]}):void 0})}function RegisterPage(){const{branding:s,registration:{disable:i},social:a}=useSettings(),{auth:c}=reactExports.useContext(SiteConfigContext),{verify:d,isVerifying:g}=useRecaptcha("register"),{pathname:b}=useLocation(),[$]=useSearchParams(),_=b.includes("workspace"),j=$.get("redirectFrom")==="pricing",_e=$.get("email")||void 0,et=useForm({defaultValues:{email:_e}}),tt=useRegister(et);if(i)return jsxRuntimeExports.jsx(Navigate,{to:"/login",replace:!0});let nt=jsxRuntimeExports.jsx(Trans,{message:"Create a new account"});_?nt=jsxRuntimeExports.jsx(Trans,{values:{siteName:s==null?void 0:s.site_name},message:"To join your team on :siteName, create an account"}):j&&(nt=jsxRuntimeExports.jsx(Trans,{message:"First, let's create your account"}));const rt=jsxRuntimeExports.jsx(Trans,{values:{a:at=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/login",children:at})},message:"Already have an account? Sign in."});return jsxRuntimeExports.jsxs(AuthLayout,{heading:nt,message:rt,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Register"})}),jsxRuntimeExports.jsxs(Form,{form:et,onSubmit:async at=>{await d()&&tt.mutate(at)},children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"email",type:"email",disabled:!!_e,label:jsxRuntimeExports.jsx(Trans,{message:"Email"}),required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"password",type:"password",label:jsxRuntimeExports.jsx(Trans,{message:"Password"}),required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"password_confirmation",type:"password",label:jsxRuntimeExports.jsx(Trans,{message:"Confirm password"}),required:!0}),c!=null&&c.registerFields?jsxRuntimeExports.jsx(c.registerFields,{}):null,jsxRuntimeExports.jsx(PolicyCheckboxes,{}),jsxRuntimeExports.jsx(Button,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:tt.isPending||g,children:jsxRuntimeExports.jsx(Trans,{message:"Create account"})}),jsxRuntimeExports.jsx(SocialAuthSection,{dividerMessage:a.compact_buttons?jsxRuntimeExports.jsx(Trans,{message:"Or sign up with"}):jsxRuntimeExports.jsx(Trans,{message:"OR"})})]})]})}function PolicyCheckboxes(){const{registration:{policies:s}}=useSettings();return s?jsxRuntimeExports.jsx("div",{className:"mb-32",children:s.map(i=>jsxRuntimeExports.jsx(FormCheckbox,{name:i.id,className:"mb-4 block",required:!0,children:jsxRuntimeExports.jsx(Trans,{message:"I accept the :name",values:{name:jsxRuntimeExports.jsx(CustomMenuItem,{unstyled:!0,className:()=>LinkStyle,item:i})}})},i.id))}):null}const endpoint$1=s=>`custom-pages/${s}`;function useCustomPage(s){const i=useParams();return s||(s=i.pageId),useQuery({queryKey:[endpoint$1(s)],queryFn:()=>fetchCustomPage(s),initialData:()=>{var c;const a=(c=getBootstrapData().loaders)==null?void 0:c.customPage;if(a!=null&&a.page&&(a.page.id==s||a.page.slug==s))return a}})}function fetchCustomPage(s){return apiClient.get(endpoint$1(s)).then(i=>i.data)}const NotificationsIcon=createSvgIcon(jsxRuntimeExports.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 Badge({children:s,className:i,withBorder:a=!0,top:c="top-2",right:d="right-4"}){return jsxRuntimeExports.jsx("span",{className:clsx$1("absolute flex items-center justify-center whitespace-nowrap rounded-full bg-warning text-xs font-bold text-white shadow",a&&"border-2 border-white",s?"h-18 w-18":"h-12 w-12",i,c,d),children:s})}const DoneAllIcon=createSvgIcon(jsxRuntimeExports.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 IllustratedMessage({image:s,title:i,description:a,action:c,className:d,size:g="md",imageHeight:b,imageMargin:$="mb-24"}){const _=getSizeClassName(g,b);return jsxRuntimeExports.jsxs("div",{className:clsx$1("text-center",d),children:[s&&jsxRuntimeExports.jsx("div",{className:clsx$1(_.image,$),children:s}),i&&jsxRuntimeExports.jsx("div",{className:clsx$1(_.title,"mb-2 text-main"),children:i}),a&&jsxRuntimeExports.jsx("div",{className:clsx$1(_.description,"text-muted"),children:a}),c&&jsxRuntimeExports.jsx("div",{className:"mt-20",children:c})]})}function getSizeClassName(s,i){switch(s){case"xs":return{image:i||"h-60",title:"text-sm",description:"text-xs"};case"sm":return{image:i||"h-80",title:"text-base",description:"text-sm"};default:return{image:i||"h-128",title:"text-lg",description:"text-base"}}}const notifySvg=""+new URL("notify-d1de4ec3.svg",import.meta.url).href;function NotificationEmptyStateMessage(){const{notif:s}=useSettings();return jsxRuntimeExports.jsx(IllustratedMessage,{size:"sm",image:jsxRuntimeExports.jsx(SvgImage,{src:notifySvg}),title:jsxRuntimeExports.jsx(Trans,{message:"Hang tight!"}),description:jsxRuntimeExports.jsx(Trans,{message:"Notifications will start showing up here soon."}),action:s.subs.integrated&&jsxRuntimeExports.jsx(Button,{elementType:Link,variant:"outline",to:"/notifications/settings",size:"xs",color:"primary",children:jsxRuntimeExports.jsx(Trans,{message:"Notification settings"})})})}const SettingsIcon=createSvgIcon(jsxRuntimeExports.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 NotificationDialogTrigger({className:s}){const{user:i}=useAuth(),{notif:a}=useSettings(),c=useUserNotifications(),d=useMarkNotificationsAsRead(),g=!!(i!=null&&i.unread_notifications_count),b=()=>{c.data&&d.mutate({markAllAsUnread:!0})};return jsxRuntimeExports.jsxs(DialogTrigger,{type:"popover",children:[jsxRuntimeExports.jsx(IconButton,{size:"md",className:s,badge:g?jsxRuntimeExports.jsx(Badge,{className:"max-md:hidden",children:i==null?void 0:i.unread_notifications_count}):void 0,children:jsxRuntimeExports.jsx(NotificationsIcon,{})}),jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogHeader,{showDivider:!0,actions:!g&&a.subs.integrated&&jsxRuntimeExports.jsx(IconButton,{className:"text-muted",size:"sm",elementType:Link,to:"/notifications/settings",target:"_blank",children:jsxRuntimeExports.jsx(SettingsIcon,{})}),rightAdornment:g&&jsxRuntimeExports.jsx(Button,{variant:"text",color:"primary",size:"xs",startIcon:jsxRuntimeExports.jsx(DoneAllIcon,{}),onClick:b,disabled:d.isPending,className:"max-md:hidden",children:jsxRuntimeExports.jsx(Trans,{message:"Mark all as read"})}),children:jsxRuntimeExports.jsx(Trans,{message:"Notifications"})}),jsxRuntimeExports.jsx(DialogBody,{padding:"p-0",children:jsxRuntimeExports.jsx(DialogContent,{})})]})]})}function DialogContent(){const{data:s,isLoading:i}=useUserNotifications();return i?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center px-24 py-20",children:jsxRuntimeExports.jsx(ProgressCircle,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):s!=null&&s.pagination.data.length?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(NotificationList,{notifications:s.pagination.data})}):jsxRuntimeExports.jsx("div",{className:"px-24 py-20",children:jsxRuntimeExports.jsx(NotificationEmptyStateMessage,{})})}const MenuIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuOutlined"),PersonIcon=createSvgIcon(jsxRuntimeExports.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"),ArrowDropDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"m7 10 5 5 5-5H7z"}),"ArrowDropDownOutlined"),PaymentsIcon=createSvgIcon(jsxRuntimeExports.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"),AccountCircleIcon=createSvgIcon(jsxRuntimeExports.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"),DarkModeIcon=createSvgIcon(jsxRuntimeExports.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"),LightModeIcon=createSvgIcon(jsxRuntimeExports.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"),ExitToAppIcon=createSvgIcon(jsxRuntimeExports.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 NavbarAuthMenu({children:s,items:i}){const{auth:a}=reactExports.useContext(SiteConfigContext),c=useLogout(),d=useCustomMenu("auth-dropdown"),{notifications:g,themes:b}=useSettings(),{user:$,isSubscribed:_}=useAuth(),j=useNavigate(),{selectedTheme:_e,selectTheme:et}=useThemeSelector();if(!_e||!$)return null;const tt=!!$.unread_notifications_count,nt=jsxRuntimeExports.jsxs(Item$1,{className:"md:hidden",value:"notifications",startIcon:jsxRuntimeExports.jsx(NotificationsIcon,{}),onSelected:()=>{j("/notifications")},children:[jsxRuntimeExports.jsx(Trans,{message:"Notifications"}),tt?` (${$.unread_notifications_count})`:void 0]}),rt=jsxRuntimeExports.jsx(Item$1,{value:"billing",startIcon:jsxRuntimeExports.jsx(PaymentsIcon,{}),onSelected:()=>{j("/billing")},children:jsxRuntimeExports.jsx(Trans,{message:"Billing"})});return jsxRuntimeExports.jsxs(MenuTrigger,{children:[s,jsxRuntimeExports.jsxs(Menu,{children:[d&&d.items.map(at=>{const lt=at.icon&&createSvgIconFromTree(at.icon);return jsxRuntimeExports.jsx(Item$1,{value:at.id,startIcon:lt&&jsxRuntimeExports.jsx(lt,{}),onSelected:()=>{at.type==="link"?window.open(at.action,"_blank"):j(at.action)},children:jsxRuntimeExports.jsx(Trans,{message:at.label})},at.id)}),a.getUserProfileLink&&jsxRuntimeExports.jsx(Item$1,{value:"profile",startIcon:jsxRuntimeExports.jsx(AccountCircleIcon,{}),onSelected:()=>{j(a.getUserProfileLink($))},children:jsxRuntimeExports.jsx(Trans,{message:"Profile page"})}),i==null?void 0:i.map(at=>at),g!=null&&g.integrated?nt:void 0,_&&rt,(b==null?void 0:b.user_change)&&!_e.is_dark&&jsxRuntimeExports.jsx(Item$1,{value:"light",startIcon:jsxRuntimeExports.jsx(DarkModeIcon,{}),onSelected:()=>{et("dark")},children:jsxRuntimeExports.jsx(Trans,{message:"Dark mode"})}),(b==null?void 0:b.user_change)&&_e.is_dark&&jsxRuntimeExports.jsx(Item$1,{value:"dark",startIcon:jsxRuntimeExports.jsx(LightModeIcon,{}),onSelected:()=>{et("light")},children:jsxRuntimeExports.jsx(Trans,{message:"Light mode"})}),jsxRuntimeExports.jsx(Item$1,{value:"logout",startIcon:jsxRuntimeExports.jsx(ExitToAppIcon,{}),onSelected:()=>{c.mutate()},children:jsxRuntimeExports.jsx(Trans,{message:"Log out"})})]})]})}function NavbarAuthUser({items:s=[]}){const{user:i}=useAuth(),{selectedTheme:a}=useThemeSelector();if(!a||!i)return null;const c=!!i.unread_notifications_count,d=jsxRuntimeExports.jsx(IconButton,{size:"md",className:"md:hidden",role:"presentation","aria-label":"toggle authentication menu",badge:c?jsxRuntimeExports.jsx(Badge,{children:i.unread_notifications_count}):void 0,children:jsxRuntimeExports.jsx(PersonIcon,{})}),g=jsxRuntimeExports.jsxs(ButtonBase,{className:"flex items-center max-md:hidden",role:"presentation",children:[jsxRuntimeExports.jsx("img",{className:"mr-12 h-32 w-32 flex-shrink-0 rounded object-cover",src:i.avatar,alt:""}),jsxRuntimeExports.jsx("span",{className:"mr-2 block max-w-124 overflow-x-hidden overflow-ellipsis text-sm",children:i.display_name}),jsxRuntimeExports.jsx(ArrowDropDownIcon,{className:"block icon-sm"})]});return jsxRuntimeExports.jsx(NavbarAuthMenu,{items:s,children:jsxRuntimeExports.jsxs("span",{role:"button",children:[d,g]})})}function NavbarAuthButtons({primaryButtonColor:s,navbarColor:i}){return s||(s=i==="primary"?"paper":"primary"),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(MobileButtons,{}),jsxRuntimeExports.jsx(DesktopButtons,{primaryButtonColor:s})]})}function DesktopButtons({primaryButtonColor:s}){const{registration:i}=useSettings();return jsxRuntimeExports.jsxs("div",{className:"text-sm max-md:hidden",children:[!i.disable&&jsxRuntimeExports.jsx(Button,{elementType:Link,to:"/register",variant:"text",className:"mr-10",children:jsxRuntimeExports.jsx(Trans,{message:"Register"})}),jsxRuntimeExports.jsx(Button,{elementType:Link,to:"/login",variant:"raised",color:s,children:jsxRuntimeExports.jsx(Trans,{message:"Login"})})]})}function MobileButtons(){const{registration:s}=useSettings(),i=useNavigate();return jsxRuntimeExports.jsxs(MenuTrigger,{children:[jsxRuntimeExports.jsx(IconButton,{size:"md",className:"md:hidden",children:jsxRuntimeExports.jsx(PersonIcon,{})}),jsxRuntimeExports.jsxs(Menu,{children:[jsxRuntimeExports.jsx(Item$1,{value:"login",onSelected:()=>i("/login"),children:jsxRuntimeExports.jsx(Trans,{message:"Login"})}),!s.disable&&jsxRuntimeExports.jsx(Item$1,{value:"register",onSelected:()=>i("/register"),children:jsxRuntimeExports.jsx(Trans,{message:"Register"})})]})]})}function useDarkThemeVariables(){var a;const{data:s}=useBootstrapData();if(!useIsDarkMode())return(a=s.themes.all.find(c=>c.is_dark&&c.default_dark))==null?void 0:a.values}function Logo({color:s,logoColor:i,isDarkMode:a,className:c}){const{trans:d}=useTrans(),{branding:g}=useSettings();let b,$;return a||!g.logo_dark||i!=="dark"&&s!=="bg"&&s!=="bg-alt"?(b=g.logo_light,$=g.logo_light_mobile):(b=g.logo_dark,$=g.logo_dark_mobile),!$&&!b?null:jsxRuntimeExports.jsx(Link,{to:"/",className:clsx$1("mr-4 block h-full max-h-26 flex-shrink-0 md:mr-24 md:max-h-36",c),"aria-label":d({message:"Go to homepage"}),children:jsxRuntimeExports.jsxs("picture",{children:[jsxRuntimeExports.jsx("source",{srcSet:$||b,media:"(max-width: 768px)"}),jsxRuntimeExports.jsx("source",{srcSet:b,media:"(min-width: 768px)"}),jsxRuntimeExports.jsx("img",{className:"block h-full max-h-26 w-auto md:max-h-36",alt:d({message:"Site logo"})})]})})}function useLightThemeVariables(){var i;const{data:s}=useBootstrapData();return(i=s.themes.all.find(a=>!a.is_dark&&a.default_light))==null?void 0:i.values}function Navbar(s){let{hideLogo:i,toggleButton:a,children:c,className:d,border:g,size:b="md",color:$,textColor:_,darkModeColor:j,rightChildren:_e,menuPosition:et,logoColor:tt,primaryButtonColor:nt,authMenuItems:rt,alwaysDarkMode:at=!1,wrapInContainer:lt=!1}=s;const ot=useIsDarkMode()||at,{notifications:st}=useSettings(),{isLoggedIn:it}=useAuth(),ut=useDarkThemeVariables(),ct=useLightThemeVariables(),pt=it&&(st==null?void 0:st.integrated);return $=$??(ct==null?void 0:ct["--be-navbar-color"])??"primary",j=j??(j==null?void 0:j["--be-navbar-color"])??"bg-alt",ot&&($=j),jsxRuntimeExports.jsx("div",{style:at?ut:void 0,className:clsx$1(getColorStyle($,_),b==="md"&&"h-64 py-8",b==="sm"&&"h-54 py-4",b==="xs"&&"h-48 py-4",g,d),children:jsxRuntimeExports.jsxs("div",{className:clsx$1("flex h-full items-center justify-end gap-10 pl-14 pr-8 md:pl-20 md:pr-20",lt&&"container mx-auto"),children:[!i&&jsxRuntimeExports.jsx(Logo,{isDarkMode:ot,color:$,logoColor:tt}),a,c,jsxRuntimeExports.jsx(MobileMenu,{position:et}),jsxRuntimeExports.jsx(DesktopMenu,{position:et}),jsxRuntimeExports.jsxs("div",{className:"ml-auto flex items-center gap-4 md:gap-14",children:[_e,pt&&jsxRuntimeExports.jsx(NotificationDialogTrigger,{}),it?jsxRuntimeExports.jsx(NavbarAuthUser,{items:rt}):jsxRuntimeExports.jsx(NavbarAuthButtons,{navbarColor:$,primaryButtonColor:nt})]})]})})}function DesktopMenu({position:s}){return jsxRuntimeExports.jsx(CustomMenu,{className:"mx-14 text-sm max-md:hidden",itemClassName:i=>clsx$1("opacity-90 hover:underline hover:opacity-100",i&&"opacity-100"),menu:s})}function MobileMenu({position:s}){const i=useNavigate(),a=useCustomMenu(s);if(!(a!=null&&a.items.length))return null;const c=d=>{var g;isAbsoluteUrl(d.action)?(g=window.open(d.action,d.target))==null||g.focus():i(d.action)};return jsxRuntimeExports.jsxs(MenuTrigger,{children:[jsxRuntimeExports.jsx(IconButton,{className:"md:hidden","aria-label":"Toggle menu",children:jsxRuntimeExports.jsx(MenuIcon,{})}),jsxRuntimeExports.jsx(Menu,{children:a.items.map(d=>{const g=d.icon&&createSvgIconFromTree(d.icon);return jsxRuntimeExports.jsx(Item$1,{value:d.action,onSelected:()=>c(d),startIcon:g&&jsxRuntimeExports.jsx(g,{}),children:jsxRuntimeExports.jsx(Trans,{message:d.label})},d.id)})})]})}function getColorStyle(s,i){switch(s){case"primary":return`bg-primary ${i||"text-on-primary"} border-b-primary`;case"bg":return`bg ${i||"text-main"} border-b`;case"bg-alt":return`bg-alt ${i||"text-main"} border-b`;case"transparent":return`bg-transparent ${i||"text-white"}`;default:return`${s} ${i}`}}function useValueLists(s,i,a={}){return useQuery({queryKey:["value-lists",s,i],queryFn:()=>fetchValueLists(s,i),staleTime:i?void 0:1/0,placeholderData:keepPreviousData,enabled:!a.disabled,initialData:()=>{const c=queryClient.getQueriesData({queryKey:["ValueLists"]}).find(([,d])=>d&&s.every(g=>d[g])?d:null);if(c)return c[1]}})}function fetchValueLists(s,i){return apiClient.get(`value-lists/${s}`,{params:i}).then(a=>a.data)}const LanguageIcon=createSvgIcon(jsxRuntimeExports.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"),KeyboardArrowDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined");function useChangeLocale(){const{mergeBootstrapData:s}=useBootstrapData();return useMutation({mutationFn:i=>changeLocale(i),onSuccess:i=>{s({i18n:i.locale})},onError:i=>showHttpErrorToast(i)})}function changeLocale(s){return apiClient.post("users/me/locale",s).then(i=>i.data)}function LocaleSwitcher(){const{locale:s}=useSelectedLocale(),i=useChangeLocale(),{data:a}=useValueLists(["localizations"]),{i18n:c}=useSettings();return!(a!=null&&a.localizations)||!s||!c.enable?null:jsxRuntimeExports.jsxs(MenuTrigger,{floatingWidth:"matchTrigger",selectionMode:"single",selectedValue:s.language,onSelectionChange:d=>{const g=d;g!==(s==null?void 0:s.language)&&i.mutate({locale:g})},children:[jsxRuntimeExports.jsx(Button,{disabled:i.isPending,className:"capitalize",startIcon:jsxRuntimeExports.jsx(LanguageIcon,{}),endIcon:jsxRuntimeExports.jsx(KeyboardArrowDownIcon,{}),children:s.name}),jsxRuntimeExports.jsx(Menu,{children:a.localizations.map(d=>jsxRuntimeExports.jsx(Item$1,{value:d.language,className:"capitalize",children:d.name},d.language))})]})}const LightbulbIcon=createSvgIcon(jsxRuntimeExports.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 Footer({className:s,padding:i}){const a=new Date().getFullYear(),{branding:c}=useSettings();return jsxRuntimeExports.jsxs("footer",{className:clsx$1("text-sm",i||"pb-28 pt-54 md:pb-54",s),children:[jsxRuntimeExports.jsx(Menus,{}),jsxRuntimeExports.jsxs("div",{className:"items-center justify-between gap-30 text-center text-muted md:flex md:text-left",children:[jsxRuntimeExports.jsx(Trans,{message:"Copyright © :year :name, All Rights Reserved",values:{year:a,name:c.site_name}}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ThemeSwitcher,{}),jsxRuntimeExports.jsx(LocaleSwitcher,{})]})]})]})}function Menus(){const s=useSettings(),i=s.menus.find(c=>{var d;return(d=c.positions)==null?void 0:d.includes("footer")}),a=s.menus.find(c=>{var d;return(d=c.positions)==null?void 0:d.includes("footer-secondary")});return!i&&!a?null:jsxRuntimeExports.jsxs("div",{className:"mb-14 items-center justify-between gap-30 overflow-x-auto border-b pb-14 md:flex",children:[i&&jsxRuntimeExports.jsx(CustomMenu,{menu:i,className:"text-primary"}),a&&jsxRuntimeExports.jsx(CustomMenu,{menu:a,className:"mb:mt-0 mt-14 text-muted"})]})}function ThemeSwitcher(){const{themes:s}=useSettings(),{selectedTheme:i,selectTheme:a}=useThemeSelector();return!i||!(s!=null&&s.user_change)?null:jsxRuntimeExports.jsx(Button,{variant:"text",startIcon:i.is_dark?jsxRuntimeExports.jsx(DarkModeIcon,{}):jsxRuntimeExports.jsx(LightbulbIcon,{}),onClick:()=>{i.is_dark?a("light"):a("dark")},children:i.is_dark?jsxRuntimeExports.jsx(Trans,{message:"Light mode"}):jsxRuntimeExports.jsx(Trans,{message:"Dark mode"})})}function highlightCode(s){__vitePreload(()=>import("./highlight-a37c2e13.js"),["./highlight-a37c2e13.js","./highlight-material-palenight-6689bed9.js","./highlight-material-palenight-c0ff5600.css"],import.meta.url).then(({hljs:i})=>{s.querySelectorAll("pre code").forEach(a=>{i.highlightElement(a)})})}function CustomPageBody({page:s}){const i=reactExports.useRef(null);return reactExports.useEffect(()=>{i.current&&highlightCode(i.current)},[]),jsxRuntimeExports.jsx("div",{className:"px-16 md:px-24",children:jsxRuntimeExports.jsxs("div",{className:"custom-page-body prose mx-auto my-50 dark:prose-invert",children:[jsxRuntimeExports.jsx("h1",{children:s.title}),jsxRuntimeExports.jsx("div",{ref:i,className:"whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:s.body}})]})})}function DefaultMetaTags(){const{data:{default_meta_tags:s}}=useBootstrapData();return jsxRuntimeExports.jsx(Helmet,{tags:s})}function PageMetaTags({query:s}){var i,a;return(i=s.data)!=null&&i.set_seo?null:(a=s.data)!=null&&a.seo?jsxRuntimeExports.jsx(Helmet,{tags:s.data.seo}):jsxRuntimeExports.jsx(DefaultMetaTags,{})}function FullPageLoader({className:s,screen:i}){return jsxRuntimeExports.jsx("div",{className:clsx$1("flex items-center justify-center flex-auto",i?"h-screen w-screen":"h-full w-full",s),children:jsxRuntimeExports.jsx(ProgressCircle,{isIndeterminate:!0,"aria-label":"Loading page..."})})}const imgUrl1=""+new URL("404-1-176145e9.png",import.meta.url).href,imgUrl2=""+new URL("404-2-14c4a897.png",import.meta.url).href;function NotFoundPage(){return jsxRuntimeExports.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:[jsxRuntimeExports.jsx("div",{className:"xl:pt-96 w-full xl:w-1/2 relative pb-48 lg:pb-0",children:jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx("div",{className:"absolute",children:jsxRuntimeExports.jsxs("div",{className:"relative z-10",children:[jsxRuntimeExports.jsx("h1",{className:"my-8 text-main font-bold text-2xl",children:jsxRuntimeExports.jsx(Trans,{message:"Looks like you've found the doorway to the great nothing"})}),jsxRuntimeExports.jsx("p",{className:"my-16 text-main",children:jsxRuntimeExports.jsx(Trans,{message:`Sorry about that! Please visit our homepage to get where you need to go.`})}),jsxRuntimeExports.jsx(Button,{className:"my-8",elementType:Link,size:"lg",to:"/",variant:"flat",color:"primary",children:jsxRuntimeExports.jsx(Trans,{message:"Take me there!"})})]})}),jsxRuntimeExports.jsx("div",{className:"dark:opacity-5",children:jsxRuntimeExports.jsx("img",{src:imgUrl2,alt:""})})]})}),jsxRuntimeExports.jsx("div",{className:"dark:opacity-80",children:jsxRuntimeExports.jsx("img",{src:imgUrl1,alt:""})})]})}const ErrorIcon=createSvgIcon(jsxRuntimeExports.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");function PageErrorMessage(){return jsxRuntimeExports.jsx(IllustratedMessage,{className:"mt-40",image:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(ErrorIcon,{size:"xl"})}),imageHeight:"h-auto",title:jsxRuntimeExports.jsx(Trans,{message:"There was an issue loading this page"}),description:jsxRuntimeExports.jsx(Trans,{message:"Please try again later"})})}const defaultOptions$2={delay:500,minDuration:200};function useSpinDelay(s,i){i=Object.assign({},defaultOptions$2,i);const[a,c]=reactExports.useState("IDLE"),d=reactExports.useRef(null);return reactExports.useEffect(()=>{s&&a==="IDLE"&&(clearTimeout(d.current),d.current=setTimeout(()=>{if(!s)return c("IDLE");d.current=setTimeout(()=>{c("EXPIRE")},i==null?void 0:i.minDuration),c("DISPLAY")},i==null?void 0:i.delay),c("DELAY")),!s&&a!=="DISPLAY"&&(clearTimeout(d.current),c("IDLE"))},[s,a,i.delay,i.minDuration]),reactExports.useEffect(()=>()=>clearTimeout(d.current),[]),a==="DISPLAY"||a==="EXPIRE"}function PageStatus({query:s,show404:i=!0,loader:a,loaderClassName:c,loaderIsScreen:d=!0,delayedSpinner:g=!0,redirectOn404:b}){const{isLoggedIn:$}=useAuth(),_=useSpinDelay(s.isLoading,{delay:500,minDuration:200});return s.isLoading?!_&&g?null:a||jsxRuntimeExports.jsx(FullPageLoader,{className:c,screen:d}):s.isError&&(errorStatusIs(s.error,401)||errorStatusIs(s.error,403))&&!$?jsxRuntimeExports.jsx(Navigate,{to:"/login",replace:!0}):i&&s.isError&&errorStatusIs(s.error,404)?b?jsxRuntimeExports.jsx(Navigate,{to:b,replace:!0}):jsxRuntimeExports.jsx(NotFoundPage,{}):jsxRuntimeExports.jsx(PageErrorMessage,{})}function CustomPageLayout({slug:s}){const{pageSlug:i}=useParams(),a=useCustomPage(s||i);return reactExports.useEffect(()=>{var c;(c=a.data)!=null&&c.page&&window.scrollTo(0,0)},[a]),jsxRuntimeExports.jsxs("div",{className:"flex flex-col min-h-screen bg",children:[jsxRuntimeExports.jsx(PageMetaTags,{query:a}),jsxRuntimeExports.jsx(Navbar,{menuPosition:"custom-page-navbar",className:"flex-shrink-0 sticky top-0"}),jsxRuntimeExports.jsx("div",{className:"flex-auto",children:a.data?jsxRuntimeExports.jsx(CustomPageBody,{page:a.data.page}):jsxRuntimeExports.jsx(PageStatus,{query:a,loaderClassName:"mt-80"})}),jsxRuntimeExports.jsx(Footer,{className:"mx-14 md:mx-40"})]})}function useLogin(s){const i=useHandleLoginSuccess();return useMutation({mutationFn:login,onSuccess:a=>{a.two_factor||i(a)},onError:a=>onFormQueryError(a,s)})}function useHandleLoginSuccess(){const s=useNavigate(),{getRedirectUri:i}=useAuth(),{setBootstrapData:a}=useBootstrapData();return reactExports.useCallback(c=>{a(c.bootstrapData),s(i(),{replace:!0})},[s,a,i])}function login(s){return apiClient.post("auth/login",s).then(i=>i.data)}function useTwoFactorChallenge(s){const i=useHandleLoginSuccess();return useMutation({mutationFn:a=>completeChallenge(a),onSuccess:a=>{i(a)},onError:a=>onFormQueryError(a,s)})}function completeChallenge(s){return apiClient.post("auth/two-factor-challenge",s).then(i=>i.data)}function TwoFactorChallengePage(){const[s,i]=reactExports.useState(!1),a=useForm(),c=useTwoFactorChallenge(a);return jsxRuntimeExports.jsxs(AuthLayout,{children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Two factor authentication"})}),jsxRuntimeExports.jsxs(Form,{form:a,onSubmit:d=>{c.mutate(d)},children:[jsxRuntimeExports.jsx("div",{className:"mb-32 text-sm",children:jsxRuntimeExports.jsx(Trans,{message:"Confirm access to your account by entering the authentication code provided by your authenticator application."})}),jsxRuntimeExports.jsx("div",{className:"mb-4",children:s?jsxRuntimeExports.jsx(FormTextField,{name:"recovery_code",minLength:21,maxLength:21,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:jsxRuntimeExports.jsx(Trans,{message:"Recovery code"}),autoFocus:!0,required:!0}):jsxRuntimeExports.jsx(FormTextField,{name:"code",minLength:6,maxLength:6,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:jsxRuntimeExports.jsx(Trans,{message:"Code"}),autoFocus:!0,required:!0})}),jsxRuntimeExports.jsx("div",{className:"mb-32",children:jsxRuntimeExports.jsx(Button,{variant:"link",color:"primary",size:"sm",onClick:()=>i(!s),children:jsxRuntimeExports.jsx(Trans,{message:"Use recovery code instead"})})}),jsxRuntimeExports.jsx(Button,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:c.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Continue"})})]})]})}function LoginPage({onTwoFactorChallenge:s}){const[i]=useSearchParams(),{pathname:a}=useLocation(),c=a.includes("workspace"),d=i.get("email")||void 0,{branding:g,registration:b,site:$,social:_}=useSettings(),j=reactExports.useContext(SiteConfigContext),_e=$.demo&&!d?getDemoFormDefaults(j):{},et=useForm({defaultValues:{remember:!0,email:d,..._e}}),tt=useLogin(et),nt=c?jsxRuntimeExports.jsx(Trans,{values:{siteName:g==null?void 0:g.site_name},message:"To join your team on :siteName, login to your account"}):jsxRuntimeExports.jsx(Trans,{message:"Sign in to your account"}),rt=!b.disable&&jsxRuntimeExports.jsx(Trans,{values:{a:lt=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/register",children:lt})},message:"Don't have an account? Sign up."}),at=!!Object.keys(et.formState.errors).length;return jsxRuntimeExports.jsxs(AuthLayout,{heading:nt,message:rt,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Login"})}),jsxRuntimeExports.jsxs(Form,{form:et,onSubmit:lt=>{tt.mutate(lt,{onSuccess:ot=>{ot.two_factor&&s()}})},children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"email",type:"email",label:jsxRuntimeExports.jsx(Trans,{message:"Email"}),disabled:!!d,invalid:at,required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-12",name:"password",type:"password",label:jsxRuntimeExports.jsx(Trans,{message:"Password"}),invalid:at,labelSuffix:jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/forgot-password",tabIndex:-1,children:jsxRuntimeExports.jsx(Trans,{message:"Forgot your password?"})}),required:!0}),jsxRuntimeExports.jsx(FormCheckbox,{name:"remember",className:"mb-32 block",children:jsxRuntimeExports.jsx(Trans,{message:"Stay signed in for a month"})}),jsxRuntimeExports.jsx(Button,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:tt.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Continue"})})]}),jsxRuntimeExports.jsx(SocialAuthSection,{dividerMessage:_.compact_buttons?jsxRuntimeExports.jsx(Trans,{message:"Or sign in with"}):jsxRuntimeExports.jsx(Trans,{message:"OR"})})]})}function getDemoFormDefaults(s){if(s.demo.loginPageDefaults==="randomAccount"){const i=Math.floor(Math.random()*100)+1;return{email:`admin@demo${String(i).padStart(3,"0")}.com`,password:"admin"}}else return{email:s.demo.email??"admin@admin.com",password:s.demo.password??"admin"}}function LoginPageWrapper(){const[s,i]=reactExports.useState(!1);return s?jsxRuntimeExports.jsx(TwoFactorChallengePage,{}):jsxRuntimeExports.jsx(LoginPage,{onTwoFactorChallenge:()=>i(!0)})}function DynamicHomepage({homepageResolver:s}){const{homepage:i}=useSettings();return(i==null?void 0:i.type)==="loginPage"?jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(LoginPageWrapper,{})}):(i==null?void 0:i.type)==="registerPage"?jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(RegisterPage,{})}):(i==null?void 0:i.type)==="customPage"?jsxRuntimeExports.jsx(CustomPageLayout,{slug:i.value}):(s==null?void 0:s(i==null?void 0:i.type))||null}function _process(s,i){var a,c;if(typeof i=="function")c=i(s),c!==void 0&&(s=c);else if(Array.isArray(i))for(a=0;a=0&&(s=s.replace(/\[/g,i).replace(/]/g,""));var a=s.split(i),c=a.filter(blacklistFilter);if(c.length!==a.length)throw Error("Refusing to update blacklisted property "+s);return a}var hasOwnProperty=Object.prototype.hasOwnProperty;function DotObject(s,i,a,c){if(!(this instanceof DotObject))return new DotObject(s,i,a,c);typeof i>"u"&&(i=!1),typeof a>"u"&&(a=!0),typeof c>"u"&&(c=!0),this.separator=s||".",this.override=i,this.useArray=a,this.useBrackets=c,this.keepArray=!1,this.cleanup=[]}var dotDefault=new DotObject(".",!1,!0,!0);function wrap(s){return function(){return dotDefault[s].apply(dotDefault,arguments)}}DotObject.prototype._fill=function(s,i,a,c){var d=s.shift();if(s.length>0){if(i[d]=i[d]||(this.useArray&&isIndex(s[0])?[]:{}),!isArrayOrObject(i[d]))if(this.override)i[d]={};else{if(!(isArrayOrObject(a)&&isEmptyObject(a)))throw new Error("Trying to redefine `"+d+"` which is a "+typeof i[d]);return}this._fill(s,i[d],a,c)}else{if(!this.override&&isArrayOrObject(i[d])&&!isEmptyObject(i[d])){if(!(isArrayOrObject(a)&&isEmptyObject(a)))throw new Error("Trying to redefine non-empty obj['"+d+"']");return}i[d]=_process(a,c)}};DotObject.prototype.object=function(s,i){var a=this;return Object.keys(s).forEach(function(c){var d=i===void 0?null:i[c],g=parsePath(c,a.separator).join(a.separator);g.indexOf(a.separator)!==-1?(a._fill(g.split(a.separator),s,s[c],d),delete s[c]):s[c]=_process(s[c],d)}),s};DotObject.prototype.str=function(s,i,a,c){var d=parsePath(s,this.separator).join(this.separator);return s.indexOf(this.separator)!==-1?this._fill(d.split(this.separator),a,i,c):a[s]=_process(i,c),a};DotObject.prototype.pick=function(s,i,a,c){var d,g,b,$,_;for(g=parsePath(s,this.separator),d=0;d"u")return a;for(b=parsePath(s,this.separator),d=0;ddot.pick(`ads.${s}`,a),[s,a]);return(g=a.ads)!=null&&g.disable||c||!d?null:jsxRuntimeExports.jsx(InvariantAd,{className:i,slot:s,adCode:d})}const InvariantAd=reactExports.memo(({slot:s,adCode:i,className:a})=>{const c=reactExports.useRef(null),d=reactExports.useId();return reactExports.useEffect(()=>(c.current&&loadAdScripts(i,c.current).then(()=>{executeAdJavascript(i,d)}),()=>{delete window.google_ad_modifications}),[i,d]),reactExports.useEffect(()=>{if(c.current){const g=$62d8ded9296f3872$export$cfa2225e87938781(c.current);if(g){const b=new MutationObserver(function(){g.style.height="",g.style.minHeight=""});return b.observe(g,{attributes:!0,attributeFilter:["style"]}),()=>b.disconnect()}}},[]),jsxRuntimeExports.jsx("div",{ref:c,id:d,className:clsx$1("ad-host flex max-h-[600px] min-h-90 w-full max-w-full items-center justify-center overflow-hidden",`${s.replace(/\./g,"-")}-host`,a),dangerouslySetInnerHTML:{__html:getAdHtml(i)}})},()=>!1);function getAdHtml(s){return s==null?void 0:s.replace(/)<[^<]*)*<\/script>/gi,"").trim()}function loadAdScripts(s,i){const a=[],c=/]*>([\s\S]*?)<\/script>/g;let content;for(;content=pattern.exec(adCode);)if(content[1]){const r=`var d = document.createElement('div'); d.innerHTML = $1; document.getElementById('${id}').appendChild(d.firstChild);`,toEval=content[1].replace(/document.write\((.+?)\);/,r);eval(toEval)}}function LandingPage(){const i=useSettings().homepage;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(DefaultMetaTags,{}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(HeroHeader,{content:i.appearance}),jsxRuntimeExports.jsx(AdHost,{slot:"landing-top",className:"mb-14 px-14 md:mb-60"}),jsxRuntimeExports.jsx(PrimaryFeatures,{content:i.appearance}),jsxRuntimeExports.jsx("div",{className:"my-40 h-1 bg-divider"}),jsxRuntimeExports.jsx(SecondaryFeatures,{content:i.appearance}),jsxRuntimeExports.jsx(BottomCta,{content:i.appearance}),jsxRuntimeExports.jsx(Footer,{className:"landing-container"})]})]})}function HeroHeader({content:{headerTitle:s,headerSubtitle:i,headerImage:a,headerImageOpacity:c,actions:d,headerOverlayColor1:g,headerOverlayColor2:b}}){const{trans:$}=useTrans();let _;return g&&b?_=`linear-gradient(45deg, ${g} 0%, ${b} 100%)`:g?_=g:b&&(_=b),jsxRuntimeExports.jsxs("header",{className:"relative mb-14 h-500 md:mb-60 md:h-screen",style:{background:_},children:[jsxRuntimeExports.jsx("div",{"data-testid":"headerImage",className:"absolute inset-0 z-10 bg-cover bg-1/2 bg-no-repeat md:bg-fixed",style:{backgroundImage:`url(${a})`,opacity:c}}),jsxRuntimeExports.jsxs("div",{className:"relative z-20 flex h-full flex-col",children:[jsxRuntimeExports.jsx(Navbar,{color:"transparent",className:"flex-shrink-0",menuPosition:"homepage-navbar"}),jsxRuntimeExports.jsxs("div",{className:"mx-auto flex max-w-850 flex-auto flex-col items-center justify-center px-14 text-center text-white",children:[s&&jsxRuntimeExports.jsx("h1",{className:"text-4xl font-medium md:text-5xl","data-testid":"headerTitle",children:jsxRuntimeExports.jsx(Trans,{message:s})}),i&&jsxRuntimeExports.jsx("div",{className:"mt-30 text-lg md:mt-10 md:text-xl","data-testid":"headerSubtitle",children:jsxRuntimeExports.jsx(Trans,{message:i})}),jsxRuntimeExports.jsxs("div",{className:"mt-30 flex min-h-50 gap-20",children:[jsxRuntimeExports.jsx(CtaButton,{item:d==null?void 0:d.cta1,variant:"raised",color:"primary",size:"lg",radius:"rounded-full","data-testid":"cta1",className:"min-w-180"}),jsxRuntimeExports.jsx(CtaButton,{item:d==null?void 0:d.cta2,variant:"text",color:"paper",size:"lg",radius:"rounded-full","data-testid":"cta2"})]})]})]}),jsxRuntimeExports.jsx(IconButton,{size:"lg",className:"absolute bottom-5 left-0 right-0 z-30 mx-auto text-white max-md:hidden",elementType:"a","aria-label":$({message:"View features"}),href:"#primary-features",children:jsxRuntimeExports.jsx(KeyboardArrowDownIcon,{})})]})}function CtaButton({item:s,...i}){if(!(s!=null&&s.label))return null;const a=s.icon?createSvgIconFromTree(s.icon):void 0;return jsxRuntimeExports.jsx(Button,{elementType:s.type==="route"?Link:"a",href:s.action,to:s.action,startIcon:a?jsxRuntimeExports.jsx(a,{}):void 0,...i,children:jsxRuntimeExports.jsx(Trans,{message:s.label})})}function PrimaryFeatures({content:s}){var i;return jsxRuntimeExports.jsx("div",{className:"landing-container items-stretch gap-26 md:flex",id:"primary-features",children:(i=s==null?void 0:s.primaryFeatures)==null?void 0:i.map((a,c)=>jsxRuntimeExports.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)] md:mb-0","data-testid":`primary-root-${c}`,children:[jsxRuntimeExports.jsx(MixedImage,{className:"mx-auto mb-30 h-128","data-testid":`primary-image-${c}`,src:a.image}),jsxRuntimeExports.jsx("h2",{className:"my-16 text-lg font-medium","data-testid":`primary-title-${c}`,children:jsxRuntimeExports.jsx(Trans,{message:a.title})}),jsxRuntimeExports.jsx("div",{className:"text-md text-[0.938rem]","data-testid":`primary-subtitle-${c}`,children:jsxRuntimeExports.jsx(Trans,{message:a.subtitle})})]},c))})}function SecondaryFeatures({content:s}){var i;return jsxRuntimeExports.jsx("div",{className:"landing-container",children:(i=s==null?void 0:s.secondaryFeatures)==null?void 0:i.map((a,c)=>{const d=c%2===0;return jsxRuntimeExports.jsxs("div",{"data-testid":`secondary-root-${c}`,className:clsx$1("mb-14 py-16 md:mb-80 md:flex",d&&"flex-row-reverse"),children:[jsxRuntimeExports.jsx("img",{src:a.image,className:"mr-auto w-580 max-w-full rounded-lg shadow-[0_10px_30px_rgba(0,0,0,0.08)]","data-testid":`secondary-image-${c}`,alt:""}),jsxRuntimeExports.jsxs("div",{className:"ml-30 mr-auto max-w-350 pt-30",children:[jsxRuntimeExports.jsx("small",{className:"mb-16 text-xs font-medium uppercase tracking-widest text-muted","data-testid":`secondary-subtitle-${c}`,children:jsxRuntimeExports.jsx(Trans,{message:a.subtitle})}),jsxRuntimeExports.jsx("h3",{className:"py-16 text-3xl","data-testid":`secondary-title-${c}`,children:jsxRuntimeExports.jsx(Trans,{message:a.title})}),jsxRuntimeExports.jsx("div",{className:"h-2 w-50 bg-black/90"}),jsxRuntimeExports.jsx("div",{className:"my-20 text-[0.938rem]","data-testid":`secondary-description-${c}`,children:jsxRuntimeExports.jsx(Trans,{message:a.description})})]})]},c)})})}function BottomCta({content:s}){var i;return jsxRuntimeExports.jsxs("div",{className:"relative bg-[#2B2B2B] bg-no-repeat py-70 text-center text-on-primary md:bg-fixed",style:{backgroundImage:`url("${s.footerImage}")`},"data-testid":"footerImage",children:[jsxRuntimeExports.jsx("h2",{className:"mx-auto max-w-620 text-3xl font-normal","data-testid":"footerTitle",children:jsxRuntimeExports.jsx(Trans,{message:s.footerTitle})}),s.footerSubtitle&&jsxRuntimeExports.jsx("p",{className:"mx-auto mt-50 max-w-620 text-2xl font-normal","data-testid":"footerSubtitle",children:jsxRuntimeExports.jsx(Trans,{message:s.footerSubtitle})}),jsxRuntimeExports.jsx(CtaButton,{item:(i=s.actions)==null?void 0:i.cta3,size:"lg",variant:"outline",color:"paper",className:"mt-50 block","data-testid":"cta3"})]})}function AuthRoute({children:s,permission:i,requireLogin:a=!0}){const{isLoggedIn:c,hasPermission:d}=useAuth();return a&&!c||i&&!d(i)?c?jsxRuntimeExports.jsx(NotFoundPage,{}):jsxRuntimeExports.jsx(Navigate,{to:"/login",replace:!0}):s||jsxRuntimeExports.jsx(Outlet,{})}function AccountSettingsPanel({id:s,title:i,titleSuffix:a,children:c,actions:d}){return jsxRuntimeExports.jsxs("section",{id:s,className:"mb-24 w-full rounded-panel border bg px-24 py-20",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-14 border-b pb-10",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-light",children:i}),a&&jsxRuntimeExports.jsx("div",{className:"ml-auto",children:a})]}),jsxRuntimeExports.jsx("div",{className:"pt-24",children:c}),d&&jsxRuntimeExports.jsx("div",{className:"mt-36 flex justify-end border-t pt-10",children:d})]})}function List({children:s,className:i,padding:a,dataTestId:c}){return jsxRuntimeExports.jsx($9bf71ea28793e738$export$20e40289641fbbb6,{children:jsxRuntimeExports.jsx("ul",{"data-testid":c,className:clsx$1("text-base outline-none sm:text-sm",i,a??"py-4"),children:s})})}const ListItem=reactExports.forwardRef(({children:s,onSelected:i,borderRadius:a="rounded",className:c,...d},g)=>{const b=$9bf71ea28793e738$export$10c5169755ce7bd7(),$=!!i,[_,j]=reactExports.useState(!1),_e=et=>{switch(et.key){case"ArrowDown":et.preventDefault(),b==null||b.focusNext();break;case"ArrowUp":et.preventDefault(),b==null||b.focusPrevious();break;case"Home":et.preventDefault(),b==null||b.focusFirst();break;case"End":et.preventDefault(),b==null||b.focusLast();break;case"Enter":case"Space":et.preventDefault(),i==null||i();break}};return jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(ListItemBase,{className:clsx$1(c,a),isActive:_,isDisabled:d.isDisabled,...d,onFocus:et=>{j(et.target.matches(":focus-visible"))},onBlur:()=>{j(!1)},onClick:()=>{i==null||i()},ref:g,role:$?"button":void 0,onKeyDown:$?_e:void 0,tabIndex:$&&!d.isDisabled?0:void 0,children:s})})}),LoginIcon=createSvgIcon(jsxRuntimeExports.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"),LockIcon=createSvgIcon(jsxRuntimeExports.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"),PhonelinkLockIcon=createSvgIcon(jsxRuntimeExports.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"),ApiIcon=createSvgIcon(jsxRuntimeExports.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"),DangerousIcon=createSvgIcon(jsxRuntimeExports.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"),DevicesIcon=createSvgIcon(jsxRuntimeExports.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 AccountSettingsId=(s=>(s.AccountDetails="account-details",s.SocialLogin="social-login",s.Password="password",s.TwoFactor="two-factor",s.LocationAndLanguage="location-and-language",s.Developers="developers",s.DeleteAccount="delete-account",s.Sessions="sessions",s))(AccountSettingsId||{});function AccountSettingsSidenav(){var b;const s=AccountSettingsId,{hasPermission:i}=useAuth(),{api:a,social:c}=useSettings(),{auth:d}=reactExports.useContext(SiteConfigContext),g=(c==null?void 0:c.envato)||(c==null?void 0:c.google)||(c==null?void 0:c.facebook)||(c==null?void 0:c.twitter);return jsxRuntimeExports.jsx("aside",{className:"sticky top-10 hidden flex-shrink-0 lg:block",children:jsxRuntimeExports.jsxs(List,{padding:"p-0",children:[(b=d.accountSettingsPanels)==null?void 0:b.map($=>jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx($.icon,{viewBox:"0 0 50 50"}),panel:$.id,children:jsxRuntimeExports.jsx(Trans,{...$.label})},$.id)),jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(PersonIcon,{}),panel:s.AccountDetails,children:jsxRuntimeExports.jsx(Trans,{message:"Account details"})}),g&&jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(LoginIcon,{}),panel:s.SocialLogin,children:jsxRuntimeExports.jsx(Trans,{message:"Social login"})}),jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(LockIcon,{}),panel:s.Password,children:jsxRuntimeExports.jsx(Trans,{message:"Password"})}),jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(PhonelinkLockIcon,{}),panel:s.TwoFactor,children:jsxRuntimeExports.jsx(Trans,{message:"Two factor authentication"})}),jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(DevicesIcon,{}),panel:s.Sessions,children:jsxRuntimeExports.jsx(Trans,{message:"Active sessions"})}),jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(LanguageIcon,{}),panel:s.LocationAndLanguage,children:jsxRuntimeExports.jsx(Trans,{message:"Location and language"})}),a!=null&&a.integrated&&i("api.access")?jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(ApiIcon,{}),panel:s.Developers,children:jsxRuntimeExports.jsx(Trans,{message:"Developers"})}):null,jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(DangerousIcon,{}),panel:s.DeleteAccount,children:jsxRuntimeExports.jsx(Trans,{message:"Delete account"})})]})})}function Item({children:s,icon:i,isLast:a,panel:c}){return jsxRuntimeExports.jsx(ListItem,{startIcon:i,className:a?void 0:"mb-10",onSelected:()=>{const d=document.querySelector(`#${c}`);d&&d.scrollIntoView({behavior:"smooth",block:"start"})},children:s})}function SocialLoginPanel({user:s}){var a,c,d,g;const{social:i}=useSettings();return!((a=i.envato)!=null&&a.enable)&&!((c=i.google)!=null&&c.enable)&&!((d=i.facebook)!=null&&d.enable)&&!((g=i.twitter)!=null&&g.enable)?null:jsxRuntimeExports.jsxs(AccountSettingsPanel,{id:AccountSettingsId.SocialLogin,title:jsxRuntimeExports.jsx(Trans,{message:"Manage social login"}),children:[jsxRuntimeExports.jsx(SocialLoginPanelRow,{icon:jsxRuntimeExports.jsx(EnvatoIcon,{viewBox:"0 0 50 50",className:"border-envato bg-envato text-white"}),service:"envato",user:s}),jsxRuntimeExports.jsx(SocialLoginPanelRow,{icon:jsxRuntimeExports.jsx(GoogleIcon,{viewBox:"0 0 48 48"}),service:"google",user:s}),jsxRuntimeExports.jsx(SocialLoginPanelRow,{icon:jsxRuntimeExports.jsx(FacebookIcon,{className:"text-facebook"}),service:"facebook",user:s}),jsxRuntimeExports.jsx(SocialLoginPanelRow,{icon:jsxRuntimeExports.jsx(TwitterIcon,{className:"text-twitter"}),service:"twitter",user:s}),jsxRuntimeExports.jsx("div",{className:"pb-6 pt-16 text-sm text-muted",children:jsxRuntimeExports.jsx(Trans,{message:"If you disable social logins, you'll still be able to log in using your email and password."})})]})}function SocialLoginPanelRow({service:s,user:i,className:a,icon:c}){var _,j,_e;const{social:d}=useSettings(),{connectSocial:g,disconnectSocial:b}=useSocialLogin(),$=(j=(_=i==null?void 0:i.social_profiles)==null?void 0:_.find(et=>et.service_name===s))==null?void 0:j.username;return(_e=d==null?void 0:d[s])!=null&&_e.enable?jsxRuntimeExports.jsxs("div",{className:clsx$1("flex items-center gap-14 border-b px-10 py-20",a),children:[reactExports.cloneElement(c,{size:"xl",className:clsx$1(c.props.className,"border p-8 rounded")}),jsxRuntimeExports.jsxs("div",{className:"mr-auto overflow-hidden text-ellipsis whitespace-nowrap",children:[jsxRuntimeExports.jsx("div",{className:"overflow-hidden text-ellipsis text-sm font-bold first-letter:capitalize",children:jsxRuntimeExports.jsx(Trans,{message:":service account",values:{service:s}})}),jsxRuntimeExports.jsx("div",{className:"mt-2 text-xs",children:$||jsxRuntimeExports.jsx(Trans,{message:"Disabled"})})]}),jsxRuntimeExports.jsx(Button,{disabled:b.isPending,size:"xs",variant:"outline",color:$?"danger":"primary",onClick:async()=>{if($)b.mutate({service:s},{onSuccess:()=>{queryClient.invalidateQueries({queryKey:["users"]}),toast(message("Disabled :service account",{values:{service:s}}))}});else{const et=await g(s);(et==null?void 0:et.status)==="SUCCESS"&&(queryClient.invalidateQueries({queryKey:["users"]}),toast(message("Enabled :service account",{values:{service:s}})))}},children:$?jsxRuntimeExports.jsx(Trans,{message:"Disable"}):jsxRuntimeExports.jsx(Trans,{message:"Enable"})})]}):null}function useUpdateAccountDetails(s){return useMutation({mutationFn:i=>updateAccountDetails(i),onSuccess:()=>{toast(message("Updated account details"))},onError:i=>onFormQueryError(i,s)})}function updateAccountDetails(s){return apiClient.put("users/me",s).then(i=>i.data)}function UploadAvatar({file:s,url:i},a){const c=new FormData;return s?c.set("file",s.native):c.set("url",i),apiClient.post(`users/${a.id}/avatar`,c,{headers:{"Content-Type":"multipart/form-data"}}).then(d=>d.data)}function useUploadAvatar({user:s}){return useMutation({mutationFn:i=>UploadAvatar(i,s),onSuccess:()=>{toast(message("Uploaded avatar"))},onError:i=>{const a=getAxiosErrorMessage(i,"file");a?toast.danger(a):showHttpErrorToast(i)}})}function removeAvatar(s){return apiClient.delete(`users/${s.id}/avatar`).then(i=>i.data)}function useRemoveAvatar({user:s}){return useMutation({mutationFn:()=>removeAvatar(s),onSuccess:()=>{toast(message("Removed avatar"))},onError:i=>showHttpErrorToast(i)})}const denyList=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 isRetryAllowed=s=>!denyList.has(s&&s.code);const isRetryAllowed$1=getDefaultExportFromCjs(isRetryAllowed);function asyncGeneratorStep$2(s,i,a,c,d,g,b){try{var $=s[g](b),_=$.value}catch(j){a(j);return}$.done?i(_):Promise.resolve(_).then(c,d)}function _asyncToGenerator$2(s){return function(){var i=this,a=arguments;return new Promise(function(c,d){var g=s.apply(i,a);function b(_){asyncGeneratorStep$2(g,c,d,b,$,"next",_)}function $(_){asyncGeneratorStep$2(g,c,d,b,$,"throw",_)}b(void 0)})}}function ownKeys$2(s,i){var a=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);i&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(s,d).enumerable})),a.push.apply(a,c)}return a}function _objectSpread$2(s){for(var i=1;i=500&&s.response.status<=599)}function isSafeRequestError(s){return s.config?isRetryableError(s)&&SAFE_HTTP_METHODS.indexOf(s.config.method)!==-1:!1}function isIdempotentRequestError(s){return s.config?isRetryableError(s)&&IDEMPOTENT_HTTP_METHODS.indexOf(s.config.method)!==-1:!1}function isNetworkOrIdempotentRequestError(s){return isNetworkError(s)||isIdempotentRequestError(s)}function noDelay(){return 0}function exponentialDelay(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,a=Math.pow(2,s)*i,c=a*.2*Math.random();return a+c}function getCurrentState(s){var i=s[namespace]||{};return i.retryCount=i.retryCount||0,s[namespace]=i,i}function getRequestOptions(s,i){return _objectSpread$2(_objectSpread$2({},i),s[namespace])}function fixConfig(s,i){s.defaults.agent===i.agent&&delete i.agent,s.defaults.httpAgent===i.httpAgent&&delete i.httpAgent,s.defaults.httpsAgent===i.httpsAgent&&delete i.httpsAgent}function shouldRetry$1(s,i,a,c){return _shouldRetry.apply(this,arguments)}function _shouldRetry(){return _shouldRetry=_asyncToGenerator$2(function*(s,i,a,c){var d=a.retryCount{var g=getCurrentState(d);return g.lastRequestTime=Date.now(),d}),c=s.interceptors.response.use(null,function(){var d=_asyncToGenerator$2(function*(g){var{config:b}=g;if(!b)return Promise.reject(g);var{retries:$=3,retryCondition:_=isNetworkOrIdempotentRequestError,retryDelay:j=noDelay,shouldResetTimeout:_e=!1,onRetry:et=()=>{}}=getRequestOptions(b,i),tt=getCurrentState(b);if(yield shouldRetry$1($,_,tt,g)){tt.retryCount+=1;var nt=j(tt.retryCount,g);if(fixConfig(s,b),!_e&&b.timeout&&tt.lastRequestTime){var rt=Date.now()-tt.lastRequestTime,at=b.timeout-rt-nt;if(at<=0)return Promise.reject(g);b.timeout=at}return b.transformRequest=[lt=>lt],yield et(tt.retryCount,g,b),new Promise(lt=>setTimeout(()=>lt(s(b)),nt))}return Promise.reject(g)});return function(g){return d.apply(this,arguments)}}());return{requestInterceptorId:a,responseInterceptorId:c}}axiosRetry.isNetworkError=isNetworkError;axiosRetry.isSafeRequestError=isSafeRequestError;axiosRetry.isIdempotentRequestError=isIdempotentRequestError;axiosRetry.isNetworkOrIdempotentRequestError=isNetworkOrIdempotentRequestError;axiosRetry.exponentialDelay=exponentialDelay;axiosRetry.isRetryableError=isRetryableError;const oneMB=1024*1024,desiredChunkSize=20*oneMB,batchSize=10,concurrency=5;class S3MultipartUpload{constructor(i,a){zt(this,"abortController");zt(this,"chunks",[]);zt(this,"uploadId");zt(this,"fileKey");zt(this,"chunkAxios");zt(this,"abortedByUser",!1);zt(this,"uploadedParts");this.file=i,this.config=a,this.abortController=new AbortController,this.chunkAxios=axios$1.create(),axiosRetry(this.chunkAxios,{retries:3})}get storageKey(){return`s3-multipart::${this.file.fingerprint}`}async start(){var c,d,g,b,$;const i=getFromLocalStorage(this.storageKey);if(i&&await this.getUploadedParts(i),!((c=this.uploadedParts)!=null&&c.length)&&(await this.createMultipartUpload(),!this.uploadId))return;if(this.prepareChunks(),await this.uploadParts()==="done"){if(!await this.completeMultipartUpload())return;try{const j=await this.createFileEntry();if(j!=null&&j.fileEntry){(g=(d=this.config).onSuccess)==null||g.call(d,j==null?void 0:j.fileEntry,this.file),removeFromLocalStorage(this.storageKey);return}}catch{}}this.abortController.signal.aborted||this.abortController.abort(),this.abortedByUser||($=(b=this.config).onError)==null||$.call(b,null,this.file)}async abort(){this.abortedByUser=!0,this.abortController.abort(),await this.abortUploadOnS3()}async uploadParts(){const i=this.chunks.filter(c=>!c.done);if(!i.length)return Promise.resolve("done");const a=await this.batchSignUrls(i.slice(0,batchSize));if(a){for(;a.length;){const d=a.splice(0,concurrency).map(b=>this.uploadPartToS3(b));if(!(await Promise.all(d)).every(b=>b))return}return await this.uploadParts()}}async batchSignUrls(i){const a=await this.chunkAxios.post("api/v1/s3/multipart/batch-sign-part-urls",{partNumbers:i.map(c=>c.partNumber),uploadId:this.uploadId,key:this.fileKey},{signal:this.abortController.signal}).then(c=>c.data).catch(c=>{this.abortController.signal.aborted||this.abortController.abort()});return a==null?void 0:a.urls}async uploadPartToS3({url:i,partNumber:a}){const c=this.chunks.find(d=>d.partNumber===a);if(c)return this.chunkAxios.put(i,c.blob,{withCredentials:!1,signal:this.abortController.signal,onUploadProgress:d=>{var b,$;if(!d.event.lengthComputable)return;c.bytesUploaded=d.loaded;const g=this.chunks.reduce((_,j)=>_+j.bytesUploaded,0);($=(b=this.config).onProgress)==null||$.call(b,{bytesUploaded:g,bytesTotal:this.file.size})}}).then(d=>{const g=d.headers.etag;if(g)return c.done=!0,c.etag=g,!0}).catch(d=>{!this.abortController.signal.aborted&&d!==void 0&&this.abortController.abort()})}async createMultipartUpload(){const i=await apiClient.post("s3/multipart/create",{filename:this.file.name,mime:this.file.mime,size:this.file.size,extension:this.file.extension,...this.config.metadata}).then(a=>a.data).catch(a=>{var c,d;a.code!=="ERR_CANCELED"&&((d=(c=this.config).onError)==null||d.call(c,getAxiosErrorMessage(a),this.file))});i&&(this.uploadId=i.uploadId,this.fileKey=i.key,setInLocalStorage(this.storageKey,{createdAt:new Date().toISOString(),fileKey:this.fileKey,uploadId:this.uploadId}))}async getUploadedParts({fileKey:i,uploadId:a}){var d;const c=await apiClient.post("s3/multipart/get-uploaded-parts",{key:i,uploadId:a}).then(g=>g.data).catch(()=>(removeFromLocalStorage(this.storageKey),null));(d=c==null?void 0:c.parts)!=null&&d.length&&(this.uploadedParts=c.parts,this.uploadId=a,this.fileKey=i)}async completeMultipartUpload(){return apiClient.post("s3/multipart/complete",{key:this.fileKey,uploadId:this.uploadId,parts:this.chunks.map(i=>({ETag:i.etag,PartNumber:i.partNumber}))}).then(i=>i.data).catch(()=>{var i,a;(a=(i=this.config).onError)==null||a.call(i,null,this.file),this.abortUploadOnS3()}).finally(()=>{removeFromLocalStorage(this.storageKey)})}async createFileEntry(){return await apiClient.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(i=>i.data).catch()}prepareChunks(){var c;this.chunks=[];const i=Math.max(5*oneMB,Math.ceil(this.file.size/1e4)),a=Math.max(desiredChunkSize,i);if(this.file.size===0)this.chunks.push({blob:this.file.native,done:!1,partNumber:1,bytesUploaded:0});else{let d=1;for(let g=0;g_.PartNumber===d);this.chunks.push({blob:this.file.native.slice(g,b),done:!!$,partNumber:d,etag:$?$.ETag:void 0,bytesUploaded:$!=null&&$.Size?parseInt($==null?void 0:$.Size):0}),d++}}}abortUploadOnS3(){return apiClient.post("s3/multipart/abort",{key:this.fileKey,uploadId:this.uploadId})}static async create(i,a){return new S3MultipartUpload(i,a)}}const version="3.7.5",VERSION=version,_hasatob=typeof atob=="function",_hasbtoa=typeof btoa=="function",_hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(s=>{let i={};return s.forEach((a,c)=>i[a]=c),i})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):s=>new Uint8Array(Array.prototype.slice.call(s,0)),_mkUriSafe=s=>s.replace(/=/g,"").replace(/[+\/]/g,i=>i=="+"?"-":"_"),_tidyB64=s=>s.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=s=>{let i,a,c,d,g="";const b=s.length%3;for(let $=0;$255||(c=s.charCodeAt($++))>255||(d=s.charCodeAt($++))>255)throw new TypeError("invalid character found");i=a<<16|c<<8|d,g+=b64chs[i>>18&63]+b64chs[i>>12&63]+b64chs[i>>6&63]+b64chs[i&63]}return b?g.slice(0,b-3)+"===".substring(b):g},_btoa=_hasbtoa?s=>btoa(s):_hasBuffer?s=>Buffer.from(s,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?s=>Buffer.from(s).toString("base64"):s=>{let a=[];for(let c=0,d=s.length;ci?_mkUriSafe(_fromUint8Array(s)):_fromUint8Array(s),cb_utob=s=>{if(s.length<2){var i=s.charCodeAt(0);return i<128?s:i<2048?_fromCC(192|i>>>6)+_fromCC(128|i&63):_fromCC(224|i>>>12&15)+_fromCC(128|i>>>6&63)+_fromCC(128|i&63)}else{var i=65536+(s.charCodeAt(0)-55296)*1024+(s.charCodeAt(1)-56320);return _fromCC(240|i>>>18&7)+_fromCC(128|i>>>12&63)+_fromCC(128|i>>>6&63)+_fromCC(128|i&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=s=>s.replace(re_utob,cb_utob),_encode=_hasBuffer?s=>Buffer.from(s,"utf8").toString("base64"):_TE?s=>_fromUint8Array(_TE.encode(s)):s=>_btoa(utob(s)),encode$1=(s,i=!1)=>i?_mkUriSafe(_encode(s)):_encode(s),encodeURI$1=s=>encode$1(s,!0),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=s=>{switch(s.length){case 4:var i=(7&s.charCodeAt(0))<<18|(63&s.charCodeAt(1))<<12|(63&s.charCodeAt(2))<<6|63&s.charCodeAt(3),a=i-65536;return _fromCC((a>>>10)+55296)+_fromCC((a&1023)+56320);case 3:return _fromCC((15&s.charCodeAt(0))<<12|(63&s.charCodeAt(1))<<6|63&s.charCodeAt(2));default:return _fromCC((31&s.charCodeAt(0))<<6|63&s.charCodeAt(1))}},btou=s=>s.replace(re_btou,cb_btou),atobPolyfill=s=>{if(s=s.replace(/\s+/g,""),!b64re.test(s))throw new TypeError("malformed base64.");s+="==".slice(2-(s.length&3));let i,a="",c,d;for(let g=0;g>16&255):d===64?_fromCC(i>>16&255,i>>8&255):_fromCC(i>>16&255,i>>8&255,i&255);return a},_atob=_hasatob?s=>atob(_tidyB64(s)):_hasBuffer?s=>Buffer.from(s,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?s=>_U8Afrom(Buffer.from(s,"base64")):s=>_U8Afrom(_atob(s).split("").map(i=>i.charCodeAt(0))),toUint8Array=s=>_toUint8Array(_unURI(s)),_decode=_hasBuffer?s=>Buffer.from(s,"base64").toString("utf8"):_TD?s=>_TD.decode(_toUint8Array(s)):s=>btou(_atob(s)),_unURI=s=>_tidyB64(s.replace(/[-_]/g,i=>i=="-"?"+":"/")),decode$1=s=>_decode(_unURI(s)),isValid=s=>{if(typeof s!="string")return!1;const i=s.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(i)||!/[^\s0-9a-zA-Z\-_]/.test(i)},_noEnum=s=>({value:s,enumerable:!1,writable:!0,configurable:!0}),extendString=function(){const s=(i,a)=>Object.defineProperty(String.prototype,i,_noEnum(a));s("fromBase64",function(){return decode$1(this)}),s("toBase64",function(i){return encode$1(this,i)}),s("toBase64URI",function(){return encode$1(this,!0)}),s("toBase64URL",function(){return encode$1(this,!0)}),s("toUint8Array",function(){return toUint8Array(this)})},extendUint8Array=function(){const s=(i,a)=>Object.defineProperty(Uint8Array.prototype,i,_noEnum(a));s("toBase64",function(i){return fromUint8Array(this,i)}),s("toBase64URI",function(){return fromUint8Array(this,!0)}),s("toBase64URL",function(){return fromUint8Array(this,!0)})},extendBuiltins=()=>{extendString(),extendUint8Array()},gBase64={version,VERSION,atob:_atob,atobPolyfill,btoa:_btoa,btoaPolyfill,fromBase64:decode$1,toBase64:encode$1,encode:encode$1,encodeURI:encodeURI$1,encodeURL:encodeURI$1,utob,btou,decode:decode$1,isValid,fromUint8Array,toUint8Array,extendString,extendUint8Array,extendBuiltins};var requiresPort=function s(i,a){if(a=a.split(":")[0],i=+i,!i)return!1;switch(a){case"http":case"ws":return i!==80;case"https":case"wss":return i!==443;case"ftp":return i!==21;case"gopher":return i!==70;case"file":return!1}return i!==0},querystringify$1={},has=Object.prototype.hasOwnProperty,undef;function decode(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch{return null}}function encode(s){try{return encodeURIComponent(s)}catch{return null}}function querystring(s){for(var i=/([^=?#&]+)=?([^&]*)/g,a={},c;c=i.exec(s);){var d=decode(c[1]),g=decode(c[2]);d===null||g===null||d in a||(a[d]=g)}return a}function querystringify(s,i){i=i||"";var a=[],c,d;typeof i!="string"&&(i="?");for(d in s)if(has.call(s,d)){if(c=s[d],!c&&(c===null||c===undef||isNaN(c))&&(c=""),d=encode(d),c=encode(c),d===null||c===null)continue;a.push(d+"="+c)}return a.length?i+a.join("&"):""}querystringify$1.stringify=querystringify;querystringify$1.parse=querystring;var required=requiresPort,qs=querystringify$1,controlOrWhitespace=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,CRHTLF=/[\n\r\t]/g,slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,port=/:\d+$/,protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,windowsDriveLetter=/^[a-zA-Z]:/;function trimLeft(s){return(s||"").toString().replace(controlOrWhitespace,"")}var rules=[["#","hash"],["?","query"],function s(i,a){return isSpecial(a.protocol)?i.replace(/\\/g,"/"):i},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ignore={hash:1,query:1};function lolcation(s){var i;typeof window<"u"?i=window:typeof commonjsGlobal<"u"?i=commonjsGlobal:typeof self<"u"?i=self:i={};var a=i.location||{};s=s||a;var c={},d=typeof s,g;if(s.protocol==="blob:")c=new Url(unescape(s.pathname),{});else if(d==="string"){c=new Url(s,{});for(g in ignore)delete c[g]}else if(d==="object"){for(g in s)g in ignore||(c[g]=s[g]);c.slashes===void 0&&(c.slashes=slashes.test(s.href))}return c}function isSpecial(s){return s==="file:"||s==="ftp:"||s==="http:"||s==="https:"||s==="ws:"||s==="wss:"}function extractProtocol(s,i){s=trimLeft(s),s=s.replace(CRHTLF,""),i=i||{};var a=protocolre.exec(s),c=a[1]?a[1].toLowerCase():"",d=!!a[2],g=!!a[3],b=0,$;return d?g?($=a[2]+a[3]+a[4],b=a[2].length+a[3].length):($=a[2]+a[4],b=a[2].length):g?($=a[3]+a[4],b=a[3].length):$=a[4],c==="file:"?b>=2&&($=$.slice(2)):isSpecial(c)?$=a[4]:c?d&&($=$.slice(2)):b>=2&&isSpecial(i.protocol)&&($=a[4]),{protocol:c,slashes:d||isSpecial(c),slashesCount:b,rest:$}}function resolve(s,i){if(s==="")return i;for(var a=(i||"/").split("/").slice(0,-1).concat(s.split("/")),c=a.length,d=a[c-1],g=!1,b=0;c--;)a[c]==="."?a.splice(c,1):a[c]===".."?(a.splice(c,1),b++):b&&(c===0&&(g=!0),a.splice(c,1),b--);return g&&a.unshift(""),(d==="."||d==="..")&&a.push(""),a.join("/")}function Url(s,i,a){if(s=trimLeft(s),s=s.replace(CRHTLF,""),!(this instanceof Url))return new Url(s,i,a);var c,d,g,b,$,_,j=rules.slice(),_e=typeof i,et=this,tt=0;for(_e!=="object"&&_e!=="string"&&(a=i,i=null),a&&typeof a!="function"&&(a=qs.parse),i=lolcation(i),d=extractProtocol(s||"",i),c=!d.protocol&&!d.slashes,et.slashes=d.slashes||c&&i.slashes,et.protocol=d.protocol||i.protocol||"",s=d.rest,(d.protocol==="file:"&&(d.slashesCount!==2||windowsDriveLetter.test(s))||!d.slashes&&(d.protocol||d.slashesCount<2||!isSpecial(et.protocol)))&&(j[3]=[/(.*)/,"pathname"]);tt"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 _isNativeFunction(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function _setPrototypeOf$1(s,i){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__=d,c},_setPrototypeOf$1(s,i)}function _getPrototypeOf$1(s){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf$1(s)}var DetailedError=function(s){_inherits$1(a,s);var i=_createSuper$1(a);function a(c){var d,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(_classCallCheck$8(this,a),d=i.call(this,c),d.originalRequest=b,d.originalResponse=$,d.causingError=g,g!=null&&(c+=", caused by ".concat(g.toString())),b!=null){var _=b.getHeader("X-Request-ID")||"n/a",j=b.getMethod(),_e=b.getURL(),et=$?$.getStatus():"n/a",tt=$?$.getBody()||"":"n/a";c+=", originated from request (method: ".concat(j,", url: ").concat(_e,", response code: ").concat(et,", response text: ").concat(tt,", request id: ").concat(_,")")}return d.message=c,d}return _createClass$8(a)}(_wrapNativeSuper(Error));function log(s){}function uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var i=Math.random()*16|0,a=s==="x"?i:i&3|8;return a.toString(16)})}function _regeneratorRuntime$1(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime$1=function(){return s};var s={},i=Object.prototype,a=i.hasOwnProperty,c=Object.defineProperty||function(ht,dt,ft){ht[dt]=ft.value},d=typeof Symbol=="function"?Symbol:{},g=d.iterator||"@@iterator",b=d.asyncIterator||"@@asyncIterator",$=d.toStringTag||"@@toStringTag";function _(ht,dt,ft){return Object.defineProperty(ht,dt,{value:ft,enumerable:!0,configurable:!0,writable:!0}),ht[dt]}try{_({},"")}catch{_=function(ft,vt,bt){return ft[vt]=bt}}function j(ht,dt,ft,vt){var bt=dt&&dt.prototype instanceof tt?dt:tt,$t=Object.create(bt.prototype),Et=new St(vt||[]);return c($t,"_invoke",{value:ct(ht,ft,Et)}),$t}function _e(ht,dt,ft){try{return{type:"normal",arg:ht.call(dt,ft)}}catch(vt){return{type:"throw",arg:vt}}}s.wrap=j;var et={};function tt(){}function nt(){}function rt(){}var at={};_(at,g,function(){return this});var lt=Object.getPrototypeOf,ot=lt&<(lt(wt([])));ot&&ot!==i&&a.call(ot,g)&&(at=ot);var st=rt.prototype=tt.prototype=Object.create(at);function it(ht){["next","throw","return"].forEach(function(dt){_(ht,dt,function(ft){return this._invoke(dt,ft)})})}function ut(ht,dt){function ft(bt,$t,Et,Tt){var jt=_e(ht[bt],ht,$t);if(jt.type!=="throw"){var kt=jt.arg,It=kt.value;return It&&_typeof$7(It)=="object"&&a.call(It,"__await")?dt.resolve(It.__await).then(function(Mt){ft("next",Mt,Et,Tt)},function(Mt){ft("throw",Mt,Et,Tt)}):dt.resolve(It).then(function(Mt){kt.value=Mt,Et(kt)},function(Mt){return ft("throw",Mt,Et,Tt)})}Tt(jt.arg)}var vt;c(this,"_invoke",{value:function($t,Et){function Tt(){return new dt(function(jt,kt){ft($t,Et,jt,kt)})}return vt=vt?vt.then(Tt,Tt):Tt()}})}function ct(ht,dt,ft){var vt="suspendedStart";return function(bt,$t){if(vt==="executing")throw new Error("Generator is already running");if(vt==="completed"){if(bt==="throw")throw $t;return _t()}for(ft.method=bt,ft.arg=$t;;){var Et=ft.delegate;if(Et){var Tt=pt(Et,ft);if(Tt){if(Tt===et)continue;return Tt}}if(ft.method==="next")ft.sent=ft._sent=ft.arg;else if(ft.method==="throw"){if(vt==="suspendedStart")throw vt="completed",ft.arg;ft.dispatchException(ft.arg)}else ft.method==="return"&&ft.abrupt("return",ft.arg);vt="executing";var jt=_e(ht,dt,ft);if(jt.type==="normal"){if(vt=ft.done?"completed":"suspendedYield",jt.arg===et)continue;return{value:jt.arg,done:ft.done}}jt.type==="throw"&&(vt="completed",ft.method="throw",ft.arg=jt.arg)}}}function pt(ht,dt){var ft=dt.method,vt=ht.iterator[ft];if(vt===void 0)return dt.delegate=null,ft==="throw"&&ht.iterator.return&&(dt.method="return",dt.arg=void 0,pt(ht,dt),dt.method==="throw")||ft!=="return"&&(dt.method="throw",dt.arg=new TypeError("The iterator does not provide a '"+ft+"' method")),et;var bt=_e(vt,ht.iterator,dt.arg);if(bt.type==="throw")return dt.method="throw",dt.arg=bt.arg,dt.delegate=null,et;var $t=bt.arg;return $t?$t.done?(dt[ht.resultName]=$t.value,dt.next=ht.nextLoc,dt.method!=="return"&&(dt.method="next",dt.arg=void 0),dt.delegate=null,et):$t:(dt.method="throw",dt.arg=new TypeError("iterator result is not an object"),dt.delegate=null,et)}function mt(ht){var dt={tryLoc:ht[0]};1 in ht&&(dt.catchLoc=ht[1]),2 in ht&&(dt.finallyLoc=ht[2],dt.afterLoc=ht[3]),this.tryEntries.push(dt)}function xt(ht){var dt=ht.completion||{};dt.type="normal",delete dt.arg,ht.completion=dt}function St(ht){this.tryEntries=[{tryLoc:"root"}],ht.forEach(mt,this),this.reset(!0)}function wt(ht){if(ht){var dt=ht[g];if(dt)return dt.call(ht);if(typeof ht.next=="function")return ht;if(!isNaN(ht.length)){var ft=-1,vt=function bt(){for(;++ft=0;--bt){var $t=this.tryEntries[bt],Et=$t.completion;if($t.tryLoc==="root")return vt("end");if($t.tryLoc<=this.prev){var Tt=a.call($t,"catchLoc"),jt=a.call($t,"finallyLoc");if(Tt&&jt){if(this.prev<$t.catchLoc)return vt($t.catchLoc,!0);if(this.prev<$t.finallyLoc)return vt($t.finallyLoc)}else if(Tt){if(this.prev<$t.catchLoc)return vt($t.catchLoc,!0)}else{if(!jt)throw new Error("try statement without catch or finally");if(this.prev<$t.finallyLoc)return vt($t.finallyLoc)}}}},abrupt:function(dt,ft){for(var vt=this.tryEntries.length-1;vt>=0;--vt){var bt=this.tryEntries[vt];if(bt.tryLoc<=this.prev&&a.call(bt,"finallyLoc")&&this.prev=0;--ft){var vt=this.tryEntries[ft];if(vt.finallyLoc===dt)return this.complete(vt.completion,vt.afterLoc),xt(vt),et}},catch:function(dt){for(var ft=this.tryEntries.length-1;ft>=0;--ft){var vt=this.tryEntries[ft];if(vt.tryLoc===dt){var bt=vt.completion;if(bt.type==="throw"){var $t=bt.arg;xt(vt)}return $t}}throw new Error("illegal catch attempt")},delegateYield:function(dt,ft,vt){return this.delegate={iterator:wt(dt),resultName:ft,nextLoc:vt},this.method==="next"&&(this.arg=void 0),et}},s}function asyncGeneratorStep$1(s,i,a,c,d,g,b){try{var $=s[g](b),_=$.value}catch(j){a(j);return}$.done?i(_):Promise.resolve(_).then(c,d)}function _asyncToGenerator$1(s){return function(){var i=this,a=arguments;return new Promise(function(c,d){var g=s.apply(i,a);function b(_){asyncGeneratorStep$1(g,c,d,b,$,"next",_)}function $(_){asyncGeneratorStep$1(g,c,d,b,$,"throw",_)}b(void 0)})}}function _slicedToArray(s,i){return _arrayWithHoles(s)||_iterableToArrayLimit(s,i)||_unsupportedIterableToArray(s,i)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray(s,i){if(s){if(typeof s=="string")return _arrayLikeToArray(s,i);var a=Object.prototype.toString.call(s).slice(8,-1);if(a==="Object"&&s.constructor&&(a=s.constructor.name),a==="Map"||a==="Set")return Array.from(s);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(s,i)}}function _arrayLikeToArray(s,i){(i==null||i>s.length)&&(i=s.length);for(var a=0,c=new Array(i);a1)for(var g=0,b=["uploadUrl","uploadSize","uploadLengthDeferred"];g1||a._parallelUploadUrls!=null?a._startParallelUpload():a._startSingleUpload()}).catch(function(_){a._emitError(_)})}},{key:"_startParallelUpload",value:function(){var a,c=this,d=this._size,g=0;this._parallelUploads=[];var b=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,$=(a=this.options.parallelUploadBoundaries)!==null&&a!==void 0?a:splitSizeIntoParts(this._source.size,b);this._parallelUploadUrls&&$.forEach(function(_e,et){_e.uploadUrl=c._parallelUploadUrls[et]||null}),this._parallelUploadUrls=new Array($.length);var _=$.map(function(_e,et){var tt=0;return c._source.slice(_e.start,_e.end).then(function(nt){var rt=nt.value;return new Promise(function(at,lt){var ot=_objectSpread$1(_objectSpread$1({},c.options),{},{uploadUrl:_e.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:{},headers:_objectSpread$1(_objectSpread$1({},c.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:at,onError:lt,onProgress:function(ut){g=g-tt+ut,tt=ut,c._emitProgress(g,d)},onUploadUrlAvailable:function(){c._parallelUploadUrls[et]=st.url,c._parallelUploadUrls.filter(function(ut){return!!ut}).length===$.length&&c._saveUploadInUrlStorage()}}),st=new s(rt,ot);st.start(),c._parallelUploads.push(st)})})}),j;Promise.all(_).then(function(){j=c._openRequest("POST",c.options.endpoint),j.setHeader("Upload-Concat","final;".concat(c._parallelUploadUrls.join(" ")));var _e=encodeMetadata(c.options.metadata);return _e!==""&&j.setHeader("Upload-Metadata",_e),c._sendRequest(j,null)}).then(function(_e){if(!inStatusCategory(_e.getStatus(),200)){c._emitHttpError(j,_e,"tus: unexpected response while creating upload");return}var et=_e.getHeader("Location");if(et==null){c._emitHttpError(j,_e,"tus: invalid or missing Location header");return}c.url=resolveUrl(c.options.endpoint,et),"Created upload at ".concat(c.url),c._emitSuccess()}).catch(function(_e){c._emitError(_e)})}},{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(a){var c=this;return this._parallelUploads!=null&&this._parallelUploads.forEach(function(d){d.abort(a)}),this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!a||this.url==null?Promise.resolve():s.terminate(this.url,this.options).then(function(){return c._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function(a,c,d,g){this._emitError(new DetailedError(d,g,a,c))}},{key:"_emitError",value:function(a){var c=this;if(!this._aborted){if(this.options.retryDelays!=null){var d=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(d&&(this._retryAttempt=0),shouldRetry(a,this._retryAttempt,this.options)){var g=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){c.start()},g);return}}if(typeof this.options.onError=="function")this.options.onError(a);else throw a}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess()}},{key:"_emitProgress",value:function(a,c){typeof this.options.onProgress=="function"&&this.options.onProgress(a,c)}},{key:"_emitChunkComplete",value:function(a,c,d){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete(a,c,d)}},{key:"_createUpload",value:function(){var a=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var c=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?c.setHeader("Upload-Defer-Length",1):c.setHeader("Upload-Length",this._size);var d=encodeMetadata(this.options.metadata);d!==""&&c.setHeader("Upload-Metadata",d);var g;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,g=this._addChunkToRequest(c)):g=this._sendRequest(c,null),g.then(function(b){if(!inStatusCategory(b.getStatus(),200)){a._emitHttpError(c,b,"tus: unexpected response while creating upload");return}var $=b.getHeader("Location");if($==null){a._emitHttpError(c,b,"tus: invalid or missing Location header");return}if(a.url=resolveUrl(a.options.endpoint,$),"Created upload at ".concat(a.url),typeof a.options.onUploadUrlAvailable=="function"&&a.options.onUploadUrlAvailable(),a._size===0){a._emitSuccess(),a._source.close();return}a._saveUploadInUrlStorage().then(function(){a.options.uploadDataDuringCreation?a._handleUploadResponse(c,b):(a._offset=0,a._performUpload())})}).catch(function(b){a._emitHttpError(c,null,"tus: failed to create upload",b)})}},{key:"_resumeUpload",value:function(){var a=this,c=this._openRequest("HEAD",this.url),d=this._sendRequest(c,null);d.then(function(g){var b=g.getStatus();if(!inStatusCategory(b,200)){if(b===423){a._emitHttpError(c,g,"tus: upload is currently locked; retry later");return}if(inStatusCategory(b,400)&&a._removeFromUrlStorage(),!a.options.endpoint){a._emitHttpError(c,g,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}a.url=null,a._createUpload();return}var $=parseInt(g.getHeader("Upload-Offset"),10);if(Number.isNaN($)){a._emitHttpError(c,g,"tus: invalid or missing offset value");return}var _=parseInt(g.getHeader("Upload-Length"),10);if(Number.isNaN(_)&&!a.options.uploadLengthDeferred){a._emitHttpError(c,g,"tus: invalid or missing length value");return}typeof a.options.onUploadUrlAvailable=="function"&&a.options.onUploadUrlAvailable(),a._saveUploadInUrlStorage().then(function(){if($===_){a._emitProgress(_,_),a._emitSuccess();return}a._offset=$,a._performUpload()})}).catch(function(g){a._emitHttpError(c,null,"tus: failed to resume upload",g)})}},{key:"_performUpload",value:function(){var a=this;if(!this._aborted){var c;this.options.overridePatchMethod?(c=this._openRequest("POST",this.url),c.setHeader("X-HTTP-Method-Override","PATCH")):c=this._openRequest("PATCH",this.url),c.setHeader("Upload-Offset",this._offset);var d=this._addChunkToRequest(c);d.then(function(g){if(!inStatusCategory(g.getStatus(),200)){a._emitHttpError(c,g,"tus: unexpected response while uploading chunk");return}a._handleUploadResponse(c,g)}).catch(function(g){a._aborted||a._emitHttpError(c,null,"tus: failed to upload chunk at offset ".concat(a._offset),g)})}}},{key:"_addChunkToRequest",value:function(a){var c=this,d=this._offset,g=this._offset+this.options.chunkSize;return a.setProgressHandler(function(b){c._emitProgress(d+b,c._size)}),a.setHeader("Content-Type","application/offset+octet-stream"),(g===1/0||g>this._size)&&!this.options.uploadLengthDeferred&&(g=this._size),this._source.slice(d,g).then(function(b){var $=b.value,_=b.done,j=$&&$.size?$.size:0;c.options.uploadLengthDeferred&&_&&(c._size=c._offset+j,a.setHeader("Upload-Length",c._size));var _e=c._offset+j;return!c.options.uploadLengthDeferred&&_&&_e!==c._size?Promise.reject(new Error("upload was configured with a size of ".concat(c._size," bytes, but the source is done after ").concat(_e," bytes"))):$===null?c._sendRequest(a):(c._emitProgress(c._offset,c._size),c._sendRequest(a,$))})}},{key:"_handleUploadResponse",value:function(a,c){var d=parseInt(c.getHeader("Upload-Offset"),10);if(Number.isNaN(d)){this._emitHttpError(a,c,"tus: invalid or missing offset value");return}if(this._emitProgress(d,this._size),this._emitChunkComplete(d-this._offset,d,this._size),this._offset=d,d===this._size){this._emitSuccess(),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(a,c){var d=openRequest(a,c,this.options);return this._req=d,d}},{key:"_removeFromUrlStorage",value:function(){var a=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(c){a._emitError(c)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var a=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var c={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?c.parallelUploadUrls=this._parallelUploadUrls:c.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,c).then(function(d){a._urlStorageKey=d})}},{key:"_sendRequest",value:function(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return sendRequest(a,c,this.options)}}],[{key:"terminate",value:function(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=openRequest("DELETE",a,c);return sendRequest(d,null,c).then(function(g){if(g.getStatus()!==204)throw new DetailedError("tus: unexpected response while terminating upload",null,d,g)}).catch(function(g){if(g instanceof DetailedError||(g=new DetailedError("tus: failed to terminate upload",g,d,null)),!shouldRetry(g,0,c))throw g;var b=c.retryDelays[0],$=c.retryDelays.slice(1),_=_objectSpread$1(_objectSpread$1({},c),{},{retryDelays:$});return new Promise(function(j){return setTimeout(j,b)}).then(function(){return s.terminate(a,_)})})}}]),s}();function encodeMetadata(s){return Object.entries(s).map(function(i){var a=_slicedToArray(i,2),c=a[0],d=a[1];return"".concat(c," ").concat(gBase64.encode(String(d)))}).join(",")}function inStatusCategory(s,i){return s>=i&&s=a.retryDelays.length||s.originalRequest==null)return!1;if(a&&typeof a.onShouldRetry=="function")return a.onShouldRetry(s,i,a);var c=s.originalResponse?s.originalResponse.getStatus():0;return(!inStatusCategory(c,400)||c===409||c===423)&&isOnline()}function resolveUrl(s,i){return new URL$1(i,s).toString()}function splitSizeIntoParts(s,i){for(var a=Math.floor(s/i),c=[],d=0;d0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(d,g){a._xhr.onload=function(){d(new Response$1(a._xhr))},a._xhr.onerror=function(b){g(b)},a._xhr.send(c)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),s}(),Response$1=function(){function s(i){_classCallCheck$4(this,s),this._xhr=i}return _createClass$4(s,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(a){return this._xhr.getResponseHeader(a)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),s}(),isReactNative=function s(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function uriToBlob(s){return new Promise(function(i,a){var c=new XMLHttpRequest;c.responseType="blob",c.onload=function(){var d=c.response;i(d)},c.onerror=function(d){a(d)},c.open("GET",s),c.send()})}var isCordova=function s(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")};function readAsByteArray(s){return new Promise(function(i,a){var c=new FileReader;c.onload=function(){var d=new Uint8Array(c.result);i({value:d})},c.onerror=function(d){a(d)},c.readAsArrayBuffer(s)})}function _typeof$3(s){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$3(s)}function _classCallCheck$3(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(s,i){for(var a=0;a=this.size;return Promise.resolve({value:d,done:g})}},{key:"close",value:function(){}}]),s}();function _typeof$2(s){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$2(s)}function _classCallCheck$2(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(s,i){for(var a=0;athis._bufferOffset&&(this._buffer=this._buffer.slice(a-this._bufferOffset),this._bufferOffset=a);var d=len(this._buffer)===0;return this._done&&d?null:this._buffer.slice(0,c-a)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),s}();function _typeof$1(s){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$1(s)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return s};var s={},i=Object.prototype,a=i.hasOwnProperty,c=Object.defineProperty||function(ht,dt,ft){ht[dt]=ft.value},d=typeof Symbol=="function"?Symbol:{},g=d.iterator||"@@iterator",b=d.asyncIterator||"@@asyncIterator",$=d.toStringTag||"@@toStringTag";function _(ht,dt,ft){return Object.defineProperty(ht,dt,{value:ft,enumerable:!0,configurable:!0,writable:!0}),ht[dt]}try{_({},"")}catch{_=function(ft,vt,bt){return ft[vt]=bt}}function j(ht,dt,ft,vt){var bt=dt&&dt.prototype instanceof tt?dt:tt,$t=Object.create(bt.prototype),Et=new St(vt||[]);return c($t,"_invoke",{value:ct(ht,ft,Et)}),$t}function _e(ht,dt,ft){try{return{type:"normal",arg:ht.call(dt,ft)}}catch(vt){return{type:"throw",arg:vt}}}s.wrap=j;var et={};function tt(){}function nt(){}function rt(){}var at={};_(at,g,function(){return this});var lt=Object.getPrototypeOf,ot=lt&<(lt(wt([])));ot&&ot!==i&&a.call(ot,g)&&(at=ot);var st=rt.prototype=tt.prototype=Object.create(at);function it(ht){["next","throw","return"].forEach(function(dt){_(ht,dt,function(ft){return this._invoke(dt,ft)})})}function ut(ht,dt){function ft(bt,$t,Et,Tt){var jt=_e(ht[bt],ht,$t);if(jt.type!=="throw"){var kt=jt.arg,It=kt.value;return It&&_typeof$1(It)=="object"&&a.call(It,"__await")?dt.resolve(It.__await).then(function(Mt){ft("next",Mt,Et,Tt)},function(Mt){ft("throw",Mt,Et,Tt)}):dt.resolve(It).then(function(Mt){kt.value=Mt,Et(kt)},function(Mt){return ft("throw",Mt,Et,Tt)})}Tt(jt.arg)}var vt;c(this,"_invoke",{value:function($t,Et){function Tt(){return new dt(function(jt,kt){ft($t,Et,jt,kt)})}return vt=vt?vt.then(Tt,Tt):Tt()}})}function ct(ht,dt,ft){var vt="suspendedStart";return function(bt,$t){if(vt==="executing")throw new Error("Generator is already running");if(vt==="completed"){if(bt==="throw")throw $t;return _t()}for(ft.method=bt,ft.arg=$t;;){var Et=ft.delegate;if(Et){var Tt=pt(Et,ft);if(Tt){if(Tt===et)continue;return Tt}}if(ft.method==="next")ft.sent=ft._sent=ft.arg;else if(ft.method==="throw"){if(vt==="suspendedStart")throw vt="completed",ft.arg;ft.dispatchException(ft.arg)}else ft.method==="return"&&ft.abrupt("return",ft.arg);vt="executing";var jt=_e(ht,dt,ft);if(jt.type==="normal"){if(vt=ft.done?"completed":"suspendedYield",jt.arg===et)continue;return{value:jt.arg,done:ft.done}}jt.type==="throw"&&(vt="completed",ft.method="throw",ft.arg=jt.arg)}}}function pt(ht,dt){var ft=dt.method,vt=ht.iterator[ft];if(vt===void 0)return dt.delegate=null,ft==="throw"&&ht.iterator.return&&(dt.method="return",dt.arg=void 0,pt(ht,dt),dt.method==="throw")||ft!=="return"&&(dt.method="throw",dt.arg=new TypeError("The iterator does not provide a '"+ft+"' method")),et;var bt=_e(vt,ht.iterator,dt.arg);if(bt.type==="throw")return dt.method="throw",dt.arg=bt.arg,dt.delegate=null,et;var $t=bt.arg;return $t?$t.done?(dt[ht.resultName]=$t.value,dt.next=ht.nextLoc,dt.method!=="return"&&(dt.method="next",dt.arg=void 0),dt.delegate=null,et):$t:(dt.method="throw",dt.arg=new TypeError("iterator result is not an object"),dt.delegate=null,et)}function mt(ht){var dt={tryLoc:ht[0]};1 in ht&&(dt.catchLoc=ht[1]),2 in ht&&(dt.finallyLoc=ht[2],dt.afterLoc=ht[3]),this.tryEntries.push(dt)}function xt(ht){var dt=ht.completion||{};dt.type="normal",delete dt.arg,ht.completion=dt}function St(ht){this.tryEntries=[{tryLoc:"root"}],ht.forEach(mt,this),this.reset(!0)}function wt(ht){if(ht){var dt=ht[g];if(dt)return dt.call(ht);if(typeof ht.next=="function")return ht;if(!isNaN(ht.length)){var ft=-1,vt=function bt(){for(;++ft=0;--bt){var $t=this.tryEntries[bt],Et=$t.completion;if($t.tryLoc==="root")return vt("end");if($t.tryLoc<=this.prev){var Tt=a.call($t,"catchLoc"),jt=a.call($t,"finallyLoc");if(Tt&&jt){if(this.prev<$t.catchLoc)return vt($t.catchLoc,!0);if(this.prev<$t.finallyLoc)return vt($t.finallyLoc)}else if(Tt){if(this.prev<$t.catchLoc)return vt($t.catchLoc,!0)}else{if(!jt)throw new Error("try statement without catch or finally");if(this.prev<$t.finallyLoc)return vt($t.finallyLoc)}}}},abrupt:function(dt,ft){for(var vt=this.tryEntries.length-1;vt>=0;--vt){var bt=this.tryEntries[vt];if(bt.tryLoc<=this.prev&&a.call(bt,"finallyLoc")&&this.prev=0;--ft){var vt=this.tryEntries[ft];if(vt.finallyLoc===dt)return this.complete(vt.completion,vt.afterLoc),xt(vt),et}},catch:function(dt){for(var ft=this.tryEntries.length-1;ft>=0;--ft){var vt=this.tryEntries[ft];if(vt.tryLoc===dt){var bt=vt.completion;if(bt.type==="throw"){var $t=bt.arg;xt(vt)}return $t}}throw new Error("illegal catch attempt")},delegateYield:function(dt,ft,vt){return this.delegate={iterator:wt(dt),resultName:ft,nextLoc:vt},this.method==="next"&&(this.arg=void 0),et}},s}function asyncGeneratorStep(s,i,a,c,d,g,b){try{var $=s[g](b),_=$.value}catch(j){a(j);return}$.done?i(_):Promise.resolve(_).then(c,d)}function _asyncToGenerator(s){return function(){var i=this,a=arguments;return new Promise(function(c,d){var g=s.apply(i,a);function b(_){asyncGeneratorStep(g,c,d,b,$,"next",_)}function $(_){asyncGeneratorStep(g,c,d,b,$,"throw",_)}b(void 0)})}}function _classCallCheck$1(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(s,i){for(var a=0;a"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 _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(s)}function ownKeys(s,i){var a=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);i&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(s,d).enumerable})),a.push.apply(a,c)}return a}function _objectSpread(s){for(var i=1;i0&&arguments[0]!==void 0?arguments[0]:null,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _classCallCheck(this,a),d=_objectSpread(_objectSpread({},defaultOptions),d),i.call(this,c,d)}return _createClass(a,null,[{key:"terminate",value:function(d){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return g=_objectSpread(_objectSpread({},defaultOptions),g),BaseUpload.terminate(d,g)}}]),a}(BaseUpload),dist={};(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=at,s.setCookie=s.getCookie=void 0,s.stringifyOptions=tt;var i=reactExports;function a(lt,ot){return $(lt)||b(lt,ot)||d(lt,ot)||c()}function c(){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 d(lt,ot){if(lt){if(typeof lt=="string")return g(lt,ot);var st=Object.prototype.toString.call(lt).slice(8,-1);if(st==="Object"&<.constructor&&(st=lt.constructor.name),st==="Map"||st==="Set")return Array.from(lt);if(st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st))return g(lt,ot)}}function g(lt,ot){(ot==null||ot>lt.length)&&(ot=lt.length);for(var st=0,it=new Array(ot);stPromise.resolve(_),removeFingerprintOnSuccess:!0,endpoint:`${$}/api/v1/tus/upload`,chunkSize:b,retryDelays:[0,3e3,5e3,1e4,2e4],overridePatchMethod:!0,metadata:{name:window.btoa(i.id),clientName:i.name,clientExtension:i.extension,clientMime:i.mime||"",clientSize:`${i.size}`,...g},headers:{"X-XSRF-TOKEN":dist.getCookie("XSRF-TOKEN")},onError:et=>{var tt;if("originalResponse"in et&&et.originalResponse)try{const nt=(tt=JSON.parse(et.originalResponse.getBody()))==null?void 0:tt.message;d==null||d(nt,i)}catch{d==null||d(null,i)}else d==null||d(null,i)},onProgress(et,tt){a==null||a({bytesUploaded:et,bytesTotal:tt})},onSuccess:async()=>{var tt;const et=(tt=j.url)==null?void 0:tt.split("/").pop();try{if(et){const nt=await createFileEntry(et);c==null||c(nt.fileEntry,i)}}catch(nt){localStorage.removeItem(_),d==null||d(getAxiosErrorMessage(nt),i)}}}),_e=await j.findPreviousUploads();return _e.length&&j.resumeFromPreviousUpload(_e[0]),new TusUpload(j)}}function createFileEntry(s){return apiClient.post("tus/entries",{uploadKey:s}).then(i=>i.data)}var Disk=(s=>(s.public="public",s.uploads="uploads",s))(Disk||{});class S3Upload{constructor(i,a){zt(this,"abortController");zt(this,"presignedRequest");this.file=i,this.config=a,this.abortController=new AbortController}async start(){var c,d,g,b;if(this.presignedRequest=await this.presignPostUrl(),!this.presignedRequest||await this.uploadFileToS3()!=="uploaded")return;const a=await this.createFileEntry();a!=null&&a.fileEntry?(d=(c=this.config).onSuccess)==null||d.call(c,a.fileEntry,this.file):this.abortController.signal||(b=(g=this.config).onError)==null||b.call(g,null,this.file)}abort(){return this.abortController.abort(),Promise.resolve()}presignPostUrl(){var i;return apiClient.post("s3/simple/presign",{filename:this.file.name,mime:this.file.mime,disk:(i=this.config.metadata)==null?void 0:i.disk,size:this.file.size,extension:this.file.extension,...this.config.metadata},{signal:this.abortController.signal}).then(a=>a.data).catch(a=>{var c,d;a.code!=="ERR_CANCELED"&&((d=(c=this.config).onError)==null||d.call(c,getAxiosErrorMessage(a),this.file))})}uploadFileToS3(){const{url:i,acl:a}=this.presignedRequest;return axios$1.put(i,this.file.native,{signal:this.abortController.signal,withCredentials:!1,headers:{"Content-Type":this.file.mime,"x-amz-acl":a},onUploadProgress:c=>{var d,g;c.event.lengthComputable&&((g=(d=this.config).onProgress)==null||g.call(d,{bytesUploaded:c.loaded,bytesTotal:c.total||0}))}}).then(()=>"uploaded").catch(c=>{var d,g;c.code!=="ERR_CANCELED"&&((g=(d=this.config).onError)==null||g.call(d,getAxiosErrorMessage(c),this.file))})}async createFileEntry(){return await apiClient.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(i=>i.data).catch(i=>{var a,c;i.code!=="ERR_CANCELED"&&((c=(a=this.config).onError)==null||c.call(a,getAxiosErrorMessage(i),this.file))})}static async create(i,a){return new S3Upload(i,a)}}class AxiosUpload{constructor(i,a){zt(this,"abortController");this.file=i,this.config=a,this.abortController=new AbortController}async start(){const i=new FormData,{onSuccess:a,onError:c,onProgress:d,metadata:g}=this.config;i.set("file",this.file.native),i.set("workspaceId","12"),g&&Object.entries(g).forEach(([$,_])=>{i.set($,`${_}`)});const b=await apiClient.post("file-entries",i,{onUploadProgress:$=>{$.event.lengthComputable&&(d==null||d({bytesUploaded:$.loaded,bytesTotal:$.total||0}))},signal:this.abortController.signal,headers:{"Content-Type":"multipart/form-data"}}).catch($=>{$.code!=="ERR_CANCELED"&&(c==null||c(getAxiosErrorMessage($),this.file))});this.abortController.signal.aborted||b&&b.data.fileEntry&&(a==null||a(b.data.fileEntry,this.file))}abort(){return this.abortController.abort(),Promise.resolve()}static async create(i,a){return new AxiosUpload(i,a)}}function prettyBytes(s,i=1){if(s==null||Number.isNaN(s))return"";const a=s<0,c=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(a&&(s=-s),s<1)return`${(a?"-":"")+s} B`;const d=Math.min(Math.floor(Math.log(s)/Math.log(1024)),c.length-1);s=Number(s/Math.pow(1024,d));const g=c[d];return s>=10||s%1===0?`${(a?"-":"")+s.toFixed(0)} ${g}`:`${(a?"-":"")+s.toFixed(i)} ${g}`}function WildcardMatcher(s,i){this.text=s=s||"",this.hasWild=~s.indexOf("*"),this.separator=i,this.parts=s.split(i)}WildcardMatcher.prototype.match=function(s){var i=!0,a=this.parts,c,d=a.length,g;if(typeof s=="string"||s instanceof String)if(!this.hasWild&&this.text!=s)i=!1;else{for(g=(s||"").split(this.separator),c=0;i&&c=2}return i?a(i.split(";")[0]):a};const match=getDefaultExportFromCjs(mimeMatch);function validateUpload(s,i){if(!i)return;const{maxFileSize:a,allowedFileTypes:c,blockedFileTypes:d}=i;if(a&&s.size!=null&&s.size>a)return message("`:file` exceeds maximum allowed size of :size",{values:{file:s.name,size:prettyBytes(a)}});if(c!=null&&c.length&&!fileMatchesTypes(s,c)||d!=null&&d.length&&fileMatchesTypes(s,d))return message("This file type is not allowed")}function fileMatchesTypes(s,i){return i.map(a=>a.split(",")).flat().some(a=>{if(a.includes("/"))return s.mime?match(s.mime.replace(/;.*?$/,""),a):!1;const c=a.replace(".","").toLowerCase();return c&&s.extension?s.extension.toLowerCase()===c:!1})}class ProgressTimeout{constructor(){zt(this,"aliveTimer");zt(this,"isDone",!1);zt(this,"timeout",3e4);zt(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 startUploading(s,i){var j,_e;const a=getBootstrapData().settings,c=s.options,d=s.file;if(c!=null&&c.restrictions){const et=validateUpload(d,c.restrictions);if(et)return i.updateFileUpload(d.id,{errorMessage:et,status:"failed",request:void 0,timer:void 0}),c.showToastOnRestrictionFail&&toast.danger(et),i.runQueue(),null}const g=new ProgressTimeout,b={metadata:{...c==null?void 0:c.metadata,relativePath:d.relativePath,disk:((j=c==null?void 0:c.metadata)==null?void 0:j.disk)||Disk.uploads,parentId:((_e=c==null?void 0:c.metadata)==null?void 0:_e.parentId)||""},chunkSize:a.uploads.chunk_size,baseUrl:a.base_url,onError:et=>{var tt;i.updateFileUpload(d.id,{errorMessage:et,status:"failed"}),i.runQueue(),g.done(),(tt=c==null?void 0:c.onError)==null||tt.call(c,et,d)},onSuccess:et=>{var tt;i.updateFileUpload(d.id,{status:"completed",entry:et}),i.runQueue(),g.done(),(tt=c==null?void 0:c.onSuccess)==null||tt.call(c,et,d)},onProgress:({bytesUploaded:et,bytesTotal:tt})=>{var rt;const nt=et/tt*100;i.updateFileUpload(d.id,{percentage:nt,bytesUploaded:et}),g.progress(),(rt=c==null?void 0:c.onProgress)==null||rt.call(c,{bytesUploaded:et,bytesTotal:tt})}},_=await chooseUploadStrategy(d,b).create(d,b);return g.timeoutHandler=()=>{_.abort(),i.updateFileUpload(d.id,{status:"failed",errorMessage:message("Upload timed out")}),i.runQueue()},i.updateFileUpload(d.id,{status:"inProgress",request:_}),_.start(),_}const OneMB=1024*1024,FourMB=4*OneMB,HundredMB=100*OneMB,chooseUploadStrategy=(s,i)=>{var g;const a=getBootstrapData().settings,d=(((g=i.metadata)==null?void 0:g.disk)||Disk.uploads)===Disk.uploads?a.uploads.uploads_driver:a.uploads.public_driver;return d!=null&&d.endsWith("s3")&&a.uploads.s3_direct_upload?s.size>=HundredMB?S3MultipartUpload:S3Upload:s.size>=FourMB&&!a.uploads.disable_tus?TusUpload:AxiosUpload};function extensionFromFilename(s){var a;return((a=/(?:\.([^.]+))?$/.exec(s))==null?void 0:a[1])||""}function getFileMime(s){const i={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"},a=s.name?extensionFromFilename(s.name):null;return s.type?s.type:a&&a in i?i[a]:"application/octet-stream"}class UploadedFile{constructor(i,a){zt(this,"id");zt(this,"fingerprint");zt(this,"name");zt(this,"relativePath","");zt(this,"size");zt(this,"mime","");zt(this,"extension","");zt(this,"native");zt(this,"lastModified");zt(this,"cachedData");this.id=nanoid(),this.name=i.name,this.size=i.size,this.mime=getFileMime(i),this.lastModified=i.lastModified,this.extension=extensionFromFilename(i.name)||"bin",this.native=i,a=a||i.webkitRelativePath||"",a=a.replace(/^\/+/g,""),a&&a.split("/").length>1&&(this.relativePath=a),this.fingerprint=generateId({name:this.name,size:this.size,mime:this.mime,lastModified:this.lastModified})}get data(){return new Promise(i=>{this.cachedData&&i(this.cachedData);const a=new FileReader;a.addEventListener("load",()=>{this.cachedData=a.result,i(this.cachedData)}),this.extension==="json"?a.readAsText(this.native):a.readAsDataURL(this.native)})}}function generateId({name:s,mime:i,size:a,relativePath:c,lastModified:d}){let g="be";return typeof s=="string"&&(g+=`-${encodeFilename(s.toLowerCase())}`),i&&(g+=`-${i}`),typeof c=="string"&&(g+=`-${encodeFilename(c.toLowerCase())}`),a!==void 0&&(g+=`-${a}`),d!==void 0&&(g+=`-${d}`),g+=`${getActiveWorkspaceId()}`,`${g}-v1`}function encodeCharacter(s){return s.charCodeAt(0).toString(32)}function encodeFilename(s){let i="";return s.replace(/[^A-Z0-9]/gi,a=>(i+=`-${encodeCharacter(a)}`,"/"))+i}function createUpload(s,i){return{file:s instanceof UploadedFile?s:new UploadedFile(s),percentage:0,bytesUploaded:0,status:"pending",options:i||{}}}enableMapSet();const initialState={concurrency:3,fileUploads:new Map,activeUploadsCount:0,completedUploadsCount:0},createFileUploadStore=({settings:s})=>create()(immer((i,a)=>({...initialState,reset:()=>{i(initialState)},getUpload:c=>a().fileUploads.get(c),clearInactive:()=>{i(c=>{c.fileUploads.forEach((d,g)=>{d.status!=="inProgress"&&c.fileUploads.delete(g)})}),a().runQueue()},abortUpload:c=>{var g;const d=a().fileUploads.get(c);d&&((g=d.request)==null||g.abort(),a().updateFileUpload(c,{status:"aborted",percentage:0}),a().runQueue())},updateFileUpload:(c,d)=>{i(g=>{const b=g.fileUploads.get(c);b&&(g.fileUploads.set(c,{...b,...d}),"status"in d&&updateTotals(g))})},uploadSingle:(c,d)=>{const g=createUpload(c,d),b=new Map(a().fileUploads);return b.set(g.file.id,g),i($=>{updateTotals($),$.fileUploads=b}),a().runQueue(),g.file.id},uploadMultiple:(c,d)=>{const g=new Map(a().fileUploads);return[...c].forEach(b=>{const $=createUpload(b,d);g.set($.file.id,$)}),i(b=>{updateTotals(b),b.fileUploads=g}),a().runQueue(),[...g.keys()]},runQueue:async()=>{const c=[...a().fileUploads.values()],d=c.filter(b=>b.status==="inProgress");let g=a().concurrency;if(d.filter(b=>b.file.relativePath||b.request instanceof S3MultipartUpload||b.request instanceof TusUpload&&s.uploads.chunk_size&&b.file.size>s.uploads.chunk_size).length&&(g=1),d.length$.status==="pending");b&&await startUploading(b,a())}}}))),updateTotals=s=>{s.completedUploadsCount=[...s.fileUploads.values()].filter(i=>i.status==="completed").length,s.activeUploadsCount=[...s.fileUploads.values()].filter(i=>i.status==="inProgress"||i.status==="pending").length},FileUploadContext=reactExports.createContext(null),useFileUploadStore=(s,i)=>{const a=reactExports.useContext(FileUploadContext);return useStore(a,s,i)};function FileUploadProvider({children:s}){const i=useSettings(),[a]=reactExports.useState(()=>createFileUploadStore({settings:i}));return jsxRuntimeExports.jsx(FileUploadContext.Provider,{value:a,children:s})}function createUploadInput(s={}){const i=document.querySelector("#hidden-file-upload-input");i&&i.remove();const a=document.createElement("input");return a.type="file",a.multiple=s.multiple??!1,a.classList.add("hidden"),a.style.display="none",a.style.visibility="hidden",a.id="hidden-file-upload-input",a.accept=buildUploadInputAccept(s),s.directory&&(a.webkitdirectory=!0),document.body.appendChild(a),a}function buildUploadInputAccept({extensions:s=[],types:i=[]}){const a=[];return s!=null&&s.length&&(s=s.map(c=>c.startsWith(".")?c:`.${c}`),a.push(s.join(","))),i!=null&&i.length&&a.push(i.join(",")),a.join(",")}function openUploadWindow(s={}){return new Promise(i=>{const a=createUploadInput(s);a.onchange=c=>{const d=c.target.files;if(!d)return i([]);const g=Array.from(d).filter(b=>b.name!==".DS_Store").map(b=>new UploadedFile(b));i(g),a.remove()},document.body.appendChild(a),a.click()})}function deleteFileEntries(s){return apiClient.post("file-entries/delete",s).then(i=>i.data)}function useDeleteFileEntries(){return useMutation({mutationFn:s=>deleteFileEntries(s),onError:s=>showHttpErrorToast(s)})}function useActiveUpload(){const s=useDeleteFileEntries(),i=reactExports.useRef(),a=useFileUploadStore(_e=>_e.uploadSingle),c=useFileUploadStore(_e=>_e.abortUpload),d=useFileUploadStore(_e=>_e.updateFileUpload),g=useFileUploadStore(_e=>i.current?_e.fileUploads.get(i.current):null),b=reactExports.useCallback((_e,et)=>{i.current=a(_e,et)},[a]),$=reactExports.useCallback(async _e=>{var tt;const et=await openUploadWindow({types:(tt=_e==null?void 0:_e.restrictions)==null?void 0:tt.allowedFileTypes});return b(et[0],_e),et[0]},[b]),_=reactExports.useCallback(({onSuccess:_e,entryPath:et})=>{var nt,rt,at;const tt=()=>{g&&d(g.file.id,{...g,entry:void 0}),_e()};if(!et&&!((nt=g==null?void 0:g.entry)!=null&&nt.id)){tt();return}s.mutate({paths:et?[et]:void 0,entryIds:(rt=g==null?void 0:g.entry)!=null&&rt.id?[(at=g==null?void 0:g.entry)==null?void 0:at.id]:void 0,deleteForever:!0},{onSuccess:tt})},[s,g,d]),j=reactExports.useCallback(()=>{g&&c(g.file.id)},[g,c]);return{uploadFile:b,selectAndUploadFile:$,percentage:(g==null?void 0:g.percentage)||0,uploadStatus:g==null?void 0:g.status,entry:g==null?void 0:g.entry,deleteEntry:_,isDeletingEntry:s.isPending,activeUpload:g,abortUpload:j}}var UploadInputType=(s=>(s.image="image/*",s.audio="audio/*",s.text="text/*",s.json="application/json",s.video="video/mp4,video/mpeg,video/x-m4v,video/*",s))(UploadInputType||{});function ProgressBarBase(s){let{value:i=0,minValue:a=0,maxValue:c=100,size:d="md",label:g,showValueLabel:b=!!g,isIndeterminate:$=!1,labelPosition:_="top",className:j,role:_e,formatOptions:et={style:"percent"},radius:tt="rounded",trackColor:nt="bg-primary-light",progressColor:rt="bg-primary",trackHeight:at=getSize(d)}=s;const lt=reactExports.useId();i=clamp$1(i,a,c);const ot=(i-a)/(c-a),st=useNumberFormatter(et);let it="";if(!$&&b){const mt=et.style==="percent"?ot:i;it=st.format(mt)}const ut={};$||(ut.width=`${Math.round(ot*100)}%`);const ct=getInputFieldClassNames({size:d}),pt=(g||it)&&jsxRuntimeExports.jsxs("div",{className:clsx$1("flex gap-10 justify-between my-4",ct.label),children:[g&&jsxRuntimeExports.jsx("span",{id:lt,children:g}),it&&jsxRuntimeExports.jsx("div",{children:it})]});return jsxRuntimeExports.jsxs("div",{"aria-valuenow":$?void 0:i,"aria-valuemin":a,"aria-valuemax":c,"aria-valuetext":$?void 0:it,"aria-labelledby":g?lt:void 0,role:_e||"progressbar",className:clsx$1(j,"min-w-42"),children:[_==="top"&&pt,jsxRuntimeExports.jsx("div",{className:`${at} ${tt} ${nt} overflow-hidden`,children:jsxRuntimeExports.jsx("div",{className:clsx$1(rt,"fill h-full transition-width duration-200 rounded-l",$&&"progress-bar-indeterminate-animate"),style:ut})}),_==="bottom"&&pt]})}function getSize(s){switch(s){case"sm":return"h-6";case"xs":return"h-4";default:return"h-8"}}function ProgressBar(s){return jsxRuntimeExports.jsx(ProgressBarBase,{...s})}const AddAPhotoIcon=createSvgIcon(jsxRuntimeExports.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"),AvatarPlaceholderIcon=createSvgIcon(jsxRuntimeExports.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"})),TwoMB=2*1024*1024;function ImageSelector({className:s,label:i,description:a,value:c,onChange:d,defaultValue:g,diskPrefix:b,showRemoveButton:$,showEditButtonOnHover:_=!1,invalid:j,errorMessage:_e,required:et,autoFocus:tt,variant:nt="input",previewSize:rt="h-80",placeholderIcon:at,stretchPreview:lt=!1,previewRadius:ot,disabled:st}){const{uploadFile:it,entry:ut,uploadStatus:ct,deleteEntry:pt,isDeletingEntry:mt,percentage:xt}=useActiveUpload(),St=reactExports.useRef(null);useAutoFocus({autoFocus:tt},St);const wt=reactExports.useId(),_t=i?`${wt}-label`:void 0,ht=a?`${wt}-description`:void 0,dt=c||(ut==null?void 0:ut.url),ft={showToastOnRestrictionFail:!0,restrictions:{allowedFileTypes:[UploadInputType.image],maxFileSize:TwoMB},metadata:{diskPrefix:b,disk:Disk.public},onSuccess:jt=>{d==null||d(jt.url)},onError:jt=>{jt&&toast.danger(jt)}},vt=getInputFieldClassNames({description:a,descriptionPosition:"top",invalid:j});let bt;nt==="avatar"?bt=AvatarVariant:nt==="square"?bt=SquareVariant:bt=InputVariant;const $t=$?jsxRuntimeExports.jsx(Button,{variant:"link",color:"danger",size:"xs",disabled:mt||!dt||st,onClick:()=>{pt({onSuccess:()=>d==null?void 0:d("")})},children:jsxRuntimeExports.jsx(Trans,{message:"Remove image"})}):null,Et=g!=null&&c!==g?jsxRuntimeExports.jsx(Button,{variant:"outline",color:"primary",size:"xs",disabled:st,onClick:()=>{d==null||d(g)},children:jsxRuntimeExports.jsx(Trans,{message:"Use default"})}):null,Tt=reactExports.useCallback(()=>{var jt;(jt=St.current)==null||jt.click()},[]);return jsxRuntimeExports.jsxs("div",{className:clsx$1("text-sm",s),children:[i&&jsxRuntimeExports.jsx("div",{id:_t,className:vt.label,children:i}),a&&jsxRuntimeExports.jsx("div",{className:vt.description,children:a}),jsxRuntimeExports.jsx("div",{"aria-labelledby":_t,"aria-describedby":ht,children:jsxRuntimeExports.jsxs(Field,{fieldClassNames:vt,errorMessage:_e,invalid:j,children:[jsxRuntimeExports.jsx(bt,{inputFieldClassNames:vt,placeholderIcon:at,previewSize:rt,isLoading:ct==="inProgress",imageUrl:dt,removeButton:$t,useDefaultButton:Et,showEditButtonOnHover:_,stretchPreview:lt,previewRadius:ot,handleUpload:Tt,disabled:st,children:jsxRuntimeExports.jsx("input",{ref:St,"aria-labelledby":_t,"aria-describedby":ht,required:dt?!1:et,accept:UploadInputType.image,type:"file",disabled:ct==="inProgress",className:"sr-only",onChange:jt=>{var kt;(kt=jt.target.files)!=null&&kt.length&&it(jt.target.files[0],ft)}})}),ct==="inProgress"&&jsxRuntimeExports.jsx(ProgressBar,{className:"absolute left-0 right-0 top-0",size:"xs",value:xt})]})})]})}function InputVariant({children:s,inputFieldClassNames:i,imageUrl:a,previewSize:c,stretchPreview:d,isLoading:g,handleUpload:b,removeButton:$,useDefaultButton:_,disabled:j}){return a?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:`${c} relative mb-10 overflow-hidden rounded border bg-fg-base/8 p-6`,children:[jsxRuntimeExports.jsx("img",{className:clsx$1("mx-auto h-full rounded",d?"object-cover":"object-contain"),onClick:()=>b(),src:a,alt:""}),s]}),jsxRuntimeExports.jsx(Button,{onClick:()=>b(),disabled:g||j,className:"mr-10",variant:"outline",color:"primary",size:"xs",children:jsxRuntimeExports.jsx(Trans,{message:"Replace"})}),$&&reactExports.cloneElement($,{variant:"outline"}),_&&reactExports.cloneElement(_,{variant:"outline"})]}):reactExports.cloneElement(s,{className:clsx$1(i.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 SquareVariant({children:s,placeholderIcon:i,previewSize:a,imageUrl:c,stretchPreview:d,handleUpload:g,removeButton:b,useDefaultButton:$,previewRadius:_="rounded",showEditButtonOnHover:j=!1,disabled:_e}){return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:clsx$1(a,_,!c&&"border","group z-20 flex flex-col items-center justify-center gap-14 bg-fg-base/8 bg-center bg-no-repeat",d?"bg-cover":"bg-contain p-6"),style:c?{backgroundImage:`url(${c})`}:void 0,onClick:()=>g(),children:[i&&!c&&reactExports.cloneElement(i,{size:"lg"}),jsxRuntimeExports.jsx(Button,{variant:"raised",color:"white",size:"xs",className:clsx$1(j&&"invisible group-hover:visible"),disabled:_e,children:c?jsxRuntimeExports.jsx(Trans,{message:"Replace image"}):jsxRuntimeExports.jsx(Trans,{message:"Upload image"})})]}),s,(b||$)&&jsxRuntimeExports.jsxs("div",{className:"mt-8",children:[b&&reactExports.cloneElement(b,{variant:"link"}),$&&reactExports.cloneElement($,{variant:"link"})]})]})}function AvatarVariant({children:s,placeholderIcon:i,previewSize:a,isLoading:c,imageUrl:d,removeButton:g,useDefaultButton:b,handleUpload:$,previewRadius:_="rounded-full",disabled:j}){return i||(i=jsxRuntimeExports.jsx(AvatarPlaceholderIcon,{viewBox:"0 0 48 48",className:clsx$1("h-full w-full bg-primary-light/40 text-primary/40",_)})),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:clsx$1("relative",a),onClick:()=>$(),children:[d?jsxRuntimeExports.jsx("img",{src:d,className:clsx$1("h-full w-full object-cover",_),alt:""}):i,jsxRuntimeExports.jsx("div",{className:"absolute -bottom-6 -right-6 rounded-full bg-paper shadow-xl",children:jsxRuntimeExports.jsx(IconButton,{disabled:c||j,type:"button",variant:"outline",size:"sm",color:"primary",radius:"rounded-full",children:jsxRuntimeExports.jsx(AddAPhotoIcon,{})})})]}),s,(g||b)&&jsxRuntimeExports.jsxs("div",{className:"mt-14",children:[g&&reactExports.cloneElement(g,{variant:"link"}),b&&reactExports.cloneElement(b,{variant:"link"})]})]})}function FormImageSelector(s){const{field:{onChange:i,value:a=null},fieldState:{error:c}}=useController({name:s.name}),d={onChange:i,value:a,invalid:c!=null,errorMessage:c?jsxRuntimeExports.jsx(Trans,{message:"Please select an image."}):null};return jsxRuntimeExports.jsx(ImageSelector,{...$3ef42575df84b30b$export$9d1611c77c2fe928(d,s)})}function BasicInfoPanel({user:s}){const i=useUploadAvatar({user:s}),a=useRemoveAvatar({user:s}),c=reactExports.useId(),d=useForm({defaultValues:{first_name:s.first_name||"",last_name:s.last_name||"",avatar:s.avatar}}),g=useUpdateAccountDetails(d);return jsxRuntimeExports.jsx(AccountSettingsPanel,{id:AccountSettingsId.AccountDetails,title:jsxRuntimeExports.jsx(Trans,{message:"Update name and profile image"}),actions:jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",form:c,disabled:g.isPending||!d.formState.isValid,children:jsxRuntimeExports.jsx(Trans,{message:"Save"})}),children:jsxRuntimeExports.jsxs(Form,{form:d,className:"flex flex-col flex-col-reverse md:flex-row items-center gap-40 md:gap-80",onSubmit:b=>{g.mutate(b)},id:c,children:[jsxRuntimeExports.jsxs("div",{className:"flex-auto w-full",children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-24",name:"first_name",label:jsxRuntimeExports.jsx(Trans,{message:"First name"})}),jsxRuntimeExports.jsx(FormTextField,{name:"last_name",label:jsxRuntimeExports.jsx(Trans,{message:"Last name"})})]}),jsxRuntimeExports.jsx(FileUploadProvider,{children:jsxRuntimeExports.jsx(FormImageSelector,{className:"md:mr-80",variant:"avatar",previewSize:"w-90 h-90",showRemoveButton:!0,name:"avatar",diskPrefix:"avatars",label:jsxRuntimeExports.jsx(Trans,{message:"Profile image"}),onChange:b=>{b?i.mutate({url:b}):a.mutate()}})})]})})}function useUpdatePassword(s){return useMutation({mutationFn:i=>updatePassword(i),onSuccess:()=>{toast(message("Password changed"))},onError:i=>onFormQueryError(i,s)})}function updatePassword(s){return apiClient.put("auth/user/password",s).then(i=>i.data)}function ChangePasswordPanel(){const s=useForm(),i=reactExports.useId(),a=useUpdatePassword(s);return jsxRuntimeExports.jsx(AccountSettingsPanel,{id:AccountSettingsId.Password,title:jsxRuntimeExports.jsx(Trans,{message:"Update password"}),actions:jsxRuntimeExports.jsx(Button,{type:"submit",form:i,variant:"flat",color:"primary",disabled:!s.formState.isValid||a.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Update password"})}),children:jsxRuntimeExports.jsxs(Form,{form:s,id:i,onSubmit:c=>{a.mutate(c,{onSuccess:()=>{s.reset()}})},children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-24",name:"current_password",label:jsxRuntimeExports.jsx(Trans,{message:"Current password"}),type:"password",autoComplete:"current-password",required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-24",name:"password",label:jsxRuntimeExports.jsx(Trans,{message:"New password"}),type:"password",autoComplete:"new-password",required:!0}),jsxRuntimeExports.jsx(FormTextField,{name:"password_confirmation",label:jsxRuntimeExports.jsx(Trans,{message:"Confirm password"}),type:"password",autoComplete:"new-password",required:!0})]})})}function ComboboxEndAdornment({isLoading:s,icon:i}){const a=reactExports.useRef(null),{trans:c}=useTrans(),[d,g]=reactExports.useState(!1),{state:{isOpen:b,inputValue:$}}=useListboxContext(),_=reactExports.useRef($);return reactExports.useEffect(()=>{s&&!d?(a.current===null&&(a.current=setTimeout(()=>{g(!0)},500)),$!==_.current&&(clearTimeout(a.current),a.current=setTimeout(()=>{g(!0)},500))):s||(g(!1),clearTimeout(a.current),a.current=null),_.current=$},[s,d,$]),d&&(b||s)?jsxRuntimeExports.jsx(ProgressCircle,{"aria-label":c({message:"Loading"}),size:"sm",isIndeterminate:!0}):i||jsxRuntimeExports.jsx(KeyboardArrowDownIcon,{})}function ComboBox(s,i){var tn;const{children:a,items:c,isAsync:d,isLoading:g,openMenuOnFocus:b=!0,endAdornmentIcon:$,onItemSelected:_,maxItems:j,clearInputOnItemSelection:_e,inputValue:et,selectedValue:tt,onSelectionChange:nt,allowCustomValue:rt=!1,onInputValueChange:at,defaultInputValue:lt,selectionMode:ot="single",useOptionLabelAsInputValue:st,showEmptyMessage:it,floatingMaxHeight:ut,hideEndAdornment:ct=!1,blurReferenceOnItemSelection:pt,isOpen:mt,onOpenChange:xt,prependListbox:St,listboxClassName:wt,onEndAdornmentClick:_t,autoFocusFirstItem:ht=!0,...dt}=s,ft=useListbox({...s,floatingMaxHeight:ut,blurReferenceOnItemSelection:pt,selectionMode:ot,role:"listbox",virtualFocus:!0,clearSelectionOnInputClear:!0},i),{reference:vt,listboxId:bt,onInputChange:$t,state:{isOpen:Et,setIsOpen:Tt,inputValue:jt,setInputValue:kt,selectValues:It,selectedValues:Mt,setActiveCollection:Bt},collection:Qt}=ft,Vt=Mt[0]?(tn=Qt.get(Mt[0]))==null?void 0:tn.textLabel:void 0,{handleListboxSearchFieldKeydown:qt}=useListboxKeyboardNavigation(ft),Ut=createEventHandler(Kt=>{b&&!Et&&Tt(!0),Kt.target.select()});return jsxRuntimeExports.jsx(Listbox,{prepend:St,className:wt,listbox:ft,mobileOverlay:Popover,isLoading:g,onPointerDown:Kt=>{Kt.preventDefault()},children:jsxRuntimeExports.jsx(TextField,{inputRef:vt,...dt,endAdornment:ct?null:jsxRuntimeExports.jsx(IconButton,{size:"md",tabIndex:-1,disabled:dt.disabled,className:"pointer-events-auto",onPointerDown:Kt=>{Kt.preventDefault(),Kt.stopPropagation(),_t?_t():(Bt("all"),Tt(!Et))},children:jsxRuntimeExports.jsx(ComboboxEndAdornment,{isLoading:g,icon:$})}),"aria-expanded":Et?"true":"false","aria-haspopup":"listbox","aria-controls":Et?bt:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",onChange:$t,value:st&&Vt?Vt:jt,onBlur:Kt=>{if(rt)It(Kt.target.value);else if(!_e){const Jt=Mt[0];kt(It.length&&Jt!=null?`${Jt}`:"")}},onFocus:Ut,onClick:Ut,onKeyDown:Kt=>qt(Kt)})})}const ComboBoxForwardRef=React.forwardRef(ComboBox);function Select(s,i){const a=useIsMobileMediaQuery(),{hideCaret:c,placeholder:d=jsxRuntimeExports.jsx(Trans,{message:"Select an option..."}),selectedValue:g,onItemSelected:b,onOpenChange:$,onInputValueChange:_,onSelectionChange:j,selectionMode:_e,minWidth:et="min-w-128",children:tt,searchPlaceholder:nt,showEmptyMessage:rt,showSearchField:at,defaultInputValue:lt,inputValue:ot,isLoading:st,isAsync:it,valueClassName:ut,floatingWidth:ct=a?"auto":"matchTrigger",...pt}=s,mt=useListbox({...s,clearInputOnItemSelection:!0,showEmptyMessage:rt||at,floatingWidth:ct,selectionMode:"single",role:"listbox",virtualFocus:at},i),{state:{selectedValues:xt,isOpen:St,setIsOpen:wt,activeIndex:_t,setSelectedIndex:ht,inputValue:dt,setInputValue:ft},collections:vt,focusItem:bt,listboxId:$t,reference:Et,refs:Tt,listContent:jt,onInputChange:kt}=mt,{fieldProps:It,inputProps:Mt}=useField({...pt,focusRef:Tt.reference}),Bt=vt.collection.get(xt[0]),Qt=Bt?jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-10",children:[Bt.element.props.startIcon,jsxRuntimeExports.jsx("span",{className:clsx$1("overflow-hidden overflow-ellipsis whitespace-nowrap",ut),children:Bt.element.props.children})]}):jsxRuntimeExports.jsx("span",{className:"italic",children:d}),Vt=getInputFieldClassNames({...s,endAdornment:!0}),{handleTriggerKeyDown:qt,handleListboxKeyboardNavigation:Ut,handleListboxSearchFieldKeydown:tn}=useListboxKeyboardNavigation(mt),{findMatchingItem:Kt}=useTypeSelect(),Jt=dn=>{if(!St)return;const Gt=Kt(dn,jt,_t);Gt!=null&&bt("increment",Gt)},xn=dn=>{if(St)return;const Gt=Kt(dn,jt,_t);Gt!=null&&ht(Gt)};return jsxRuntimeExports.jsx(Listbox,{listbox:mt,onKeyDownCapture:at?void 0:Jt,onKeyDown:Ut,onClose:at?()=>ft(""):void 0,isLoading:st,searchField:at&&jsxRuntimeExports.jsx(TextField,{size:s.size==="xs"||s.size==="sm"?"xs":"sm",placeholder:nt,startAdornment:jsxRuntimeExports.jsx(SearchIcon,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":St?"true":"false","aria-haspopup":"listbox","aria-controls":St?$t:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:dt,onChange:kt,onKeyDown:dn=>{tn(dn)}}),children:jsxRuntimeExports.jsx(Field,{fieldClassNames:Vt,...It,endAdornment:!c&&jsxRuntimeExports.jsx(ComboboxEndAdornment,{isLoading:st}),children:jsxRuntimeExports.jsx("button",{...Mt,type:"button","data-selected-value":Bt==null?void 0:Bt.value,"aria-expanded":St?"true":"false","aria-haspopup":"listbox","aria-controls":St?$t:void 0,ref:Et,onKeyDown:qt,onKeyDownCapture:at?void 0:xn,disabled:pt.disabled,onClick:()=>{wt(!St)},className:clsx$1(Vt.input,!It.unstyled&&et),children:Qt})})})}const SelectForwardRef=React.forwardRef(Select);function FormSelect({children:s,...i}){const{field:{onChange:a,onBlur:c,value:d=null,ref:g},fieldState:{invalid:b,error:$}}=useController({name:i.name}),_={onSelectionChange:a,onBlur:c,selectedValue:d,invalid:b,errorMessage:$==null?void 0:$.message,name:i.name},j=i.errorMessage||($==null?void 0:$.message);return jsxRuntimeExports.jsx(SelectForwardRef,{ref:g,...$3ef42575df84b30b$export$9d1611c77c2fe928(_,i,{errorMessage:j}),children:s})}function TimezoneSelect({name:s,size:i,timezones:a,label:c,...d}){const{trans:g}=useTrans();return jsxRuntimeExports.jsx(FormSelect,{selectionMode:"single",name:s,size:i,label:c,showSearchField:!0,searchPlaceholder:g(message("Search timezones")),...d,children:Object.entries(a).map(([b,$])=>jsxRuntimeExports.jsx(Section,{label:b,children:$.map(_=>jsxRuntimeExports.jsx(Item$1,{value:_.value,children:_.text},_.value))},b))})}function LocalizationPanel({user:s}){const i=reactExports.useId(),{trans:a}=useTrans(),c=useForm({defaultValues:{language:s.language||"",country:s.country||"",timezone:s.timezone||$14e0f24ef4ac5c92$export$aa8b41735afcabd2()}}),d=useUpdateAccountDetails(c),g=useChangeLocale(),{data:b}=useValueLists(["timezones","countries","localizations"]),$=(b==null?void 0:b.countries)||[],_=(b==null?void 0:b.localizations)||[],j=(b==null?void 0:b.timezones)||{};return jsxRuntimeExports.jsx(AccountSettingsPanel,{id:AccountSettingsId.LocationAndLanguage,title:jsxRuntimeExports.jsx(Trans,{message:"Date, time and language"}),actions:jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",form:i,disabled:d.isPending||!c.formState.isValid,children:jsxRuntimeExports.jsx(Trans,{message:"Save"})}),children:jsxRuntimeExports.jsxs(Form,{form:c,onSubmit:_e=>{d.mutate(_e),g.mutate({locale:_e.language})},id:i,children:[jsxRuntimeExports.jsx(FormSelect,{className:"mb-24",selectionMode:"single",name:"language",label:jsxRuntimeExports.jsx(Trans,{message:"Language"}),children:_.map(_e=>jsxRuntimeExports.jsx(Item$1,{value:_e.language,children:_e.name},_e.language))}),jsxRuntimeExports.jsx(FormSelect,{className:"mb-24",selectionMode:"single",name:"country",label:jsxRuntimeExports.jsx(Trans,{message:"Country"}),showSearchField:!0,searchPlaceholder:a(message("Search countries")),children:$.map(_e=>jsxRuntimeExports.jsx(Item$1,{value:_e.code,children:_e.name},_e.code))}),jsxRuntimeExports.jsx(TimezoneSelect,{label:jsxRuntimeExports.jsx(Trans,{message:"Timezone"}),name:"timezone",timezones:j})]})})}function useDateFormatter(s){const i=reactExports.useRef(null);s&&i.current&&shallowEqual(s,i.current)&&(s=i.current),i.current=s;const{localeCode:a}=useSelectedLocale();return reactExports.useMemo(()=>new $fb18d541ea1ad717$export$ad991b66133851cf(a,s),[a,s])}const DateFormatPresets={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"}},FormattedDate=reactExports.memo(({date:s,options:i,preset:a})=>{const{dates:c}=useSettings(),d=useUserTimezone(),g=useDateFormatter(i||DateFormatPresets[a||(c==null?void 0:c.format)]);if(!s)return null;try{typeof s=="string"?s=$fae977aafc393c5c$export$8e384432362ed0f0(s).toDate():"toDate"in s&&(s=s.toDate(d))}catch{return null}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:g.format(s)})},shallowEqual);function ConfirmationDialog({className:s,title:i,body:a,confirm:c,isDanger:d,isLoading:g,onConfirm:b}){const{close:$}=useDialogContext();return jsxRuntimeExports.jsxs(Dialog,{className:s,size:"sm",role:"alertdialog",children:[jsxRuntimeExports.jsx(DialogHeader,{color:d?"text-danger":null,leftAdornment:jsxRuntimeExports.jsx(ErrorOutlineIcon,{className:"icon-sm"}),children:i}),jsxRuntimeExports.jsx(DialogBody,{children:a}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"text",onClick:()=>{$(!1)},children:jsxRuntimeExports.jsx(Trans,{message:"Cancel"})}),jsxRuntimeExports.jsx(Button,{disabled:g,variant:"flat",color:d?"danger":"primary",onClick:()=>{b==null||b(),b||$(!0)},children:c})]})]})}function deleteAccessToken({id:s}){return apiClient.delete(`access-tokens/${s}`).then(i=>i.data)}function useDeleteAccessToken(){return useMutation({mutationFn:s=>deleteAccessToken(s),onSuccess:()=>{toast(message("Token deleted"))},onError:s=>showHttpErrorToast(s)})}var toggleSelection=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var i=document.activeElement,a=[],c=0;c"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var et=clipboardToIE11Formatting[i.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(et,s)}else _e.clipboardData.clearData(),_e.clipboardData.setData(i.format,s);i.onCopy&&(_e.preventDefault(),i.onCopy(_e.clipboardData))}),document.body.appendChild($),g.selectNodeContents($),b.addRange(g);var j=document.execCommand("copy");if(!j)throw new Error("copy command was unsuccessful");_=!0}catch(_e){a&&console.error("unable to copy using execCommand: ",_e),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",s),i.onCopy&&i.onCopy(window.clipboardData),_=!0}catch(et){a&&console.error("unable to copy using clipboardData: ",et),a&&console.error("falling back to prompt"),c=format("message"in i?i.message:defaultMessage),window.prompt(c,s)}}finally{b&&(typeof b.removeRange=="function"?b.removeRange(g):b.removeAllRanges()),$&&document.body.removeChild($),d()}return _}var copyToClipboard=copy;const r=getDefaultExportFromCjs(copyToClipboard);function useClipboard(s,i){var a=reactExports.useState(!1),c=a[0],d=a[1],g=i&&i.successDuration;return reactExports.useEffect(function(){if(c&&g){var b=setTimeout(function(){d(!1)},g);return function(){clearTimeout(b)}}},[c,g]),[c,function(){var b=r(s);d(b)}]}function createAccessToken(s){return apiClient.post("access-tokens",s).then(i=>i.data)}function useCreateAccessToken(s){return useMutation({mutationFn:i=>createAccessToken(i),onSuccess:()=>{toast(message("Token create"))},onError:i=>onFormQueryError(i,s)})}function CreateNewTokenDialog(){const s=useForm(),{formId:i,close:a}=useDialogContext(),c=useCreateAccessToken(s),[d,g]=reactExports.useState(),b=jsxRuntimeExports.jsx(Form,{form:s,id:i,onSubmit:$=>{c.mutate($,{onSuccess:_=>{g(_.plainTextToken),queryClient.invalidateQueries({queryKey:["users"]})}})},children:jsxRuntimeExports.jsx(FormTextField,{name:"tokenName",label:jsxRuntimeExports.jsx(Trans,{message:"Token name"}),required:!0,autoFocus:!0})});return jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogHeader,{children:jsxRuntimeExports.jsx(Trans,{message:"Create new token"})}),jsxRuntimeExports.jsx(DialogBody,{children:d?jsxRuntimeExports.jsx(PlainTextPreview,{plainTextToken:d}):b}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{variant:"text",onClick:a,children:jsxRuntimeExports.jsx(Trans,{message:"Done"})}),!d&&jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",type:"submit",form:i,disabled:c.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Create"})})]})]})}function PlainTextPreview({plainTextToken:s}){const[i,a]=useClipboard(s||"",{successDuration:1e3});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TextField,{readOnly:!0,value:s,autoFocus:!0,onClick:c=>{c.currentTarget.focus(),c.currentTarget.select()},endAppend:jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",onClick:a,children:i?jsxRuntimeExports.jsx(Trans,{message:"Copied!"}):jsxRuntimeExports.jsx(Trans,{message:"Copy"})})}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-10 mt-14 text-sm",children:[jsxRuntimeExports.jsx(ErrorIcon,{size:"sm",className:"text-danger"}),jsxRuntimeExports.jsx(Trans,{message:"Make sure to store the token in a safe place. After this dialog is closed, token will not be viewable anymore."})]})]})}const secureFilesSvg=""+new URL("secure-files-17b4728d.svg",import.meta.url).href;function AccessTokenPanel({user:s}){const i=s.tokens||[],{hasPermission:a}=useAuth(),{api:c}=useSettings();return!(c!=null&&c.integrated)||!a("api.access")?null:jsxRuntimeExports.jsx(AccountSettingsPanel,{id:AccountSettingsId.Developers,title:jsxRuntimeExports.jsx(Trans,{message:"API access tokens"}),titleSuffix:jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/api-docs",target:"_blank",children:jsxRuntimeExports.jsx(Trans,{message:"Documentation"})}),actions:jsxRuntimeExports.jsx(CreateNewTokenButton,{}),children:i.length?i.map((d,g)=>jsxRuntimeExports.jsx(TokenLine,{token:d,isLast:g===i.length-1},d.id)):jsxRuntimeExports.jsx(IllustratedMessage,{className:"py-40",image:jsxRuntimeExports.jsx(SvgImage,{src:secureFilesSvg}),title:jsxRuntimeExports.jsx(Trans,{message:"You have no personal access tokens yet"})})})}function TokenLine({token:s,isLast:i}){return jsxRuntimeExports.jsxs("div",{className:clsx$1("flex items-center gap-24",!i&&"mb-12 pb-12 border-b"),children:[jsxRuntimeExports.jsxs("div",{className:"text-sm",children:[jsxRuntimeExports.jsx("div",{className:"font-semibold",children:jsxRuntimeExports.jsx(Trans,{message:"Name"})}),jsxRuntimeExports.jsx("div",{children:s.name}),jsxRuntimeExports.jsx("div",{className:"font-semibold mt-10",children:jsxRuntimeExports.jsx(Trans,{message:"Last used"})}),jsxRuntimeExports.jsx("div",{children:s.last_used_at?jsxRuntimeExports.jsx(FormattedDate,{date:s.last_used_at}):jsxRuntimeExports.jsx(Trans,{message:"Never"})})]}),jsxRuntimeExports.jsx(DeleteTokenButton,{token:s})]})}function CreateNewTokenButton(){return jsxRuntimeExports.jsxs(DialogTrigger,{type:"modal",children:[jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",children:jsxRuntimeExports.jsx(Trans,{message:"Create token"})}),jsxRuntimeExports.jsx(CreateNewTokenDialog,{})]})}function DeleteTokenButton({token:s}){const i=useDeleteAccessToken();return jsxRuntimeExports.jsxs(DialogTrigger,{type:"modal",onClose:a=>{a&&i.mutate({id:s.id},{onSuccess:()=>queryClient.invalidateQueries({queryKey:["users"]})})},children:[jsxRuntimeExports.jsx(Button,{size:"xs",variant:"outline",color:"danger",className:"flex-shrink-0 ml-auto",children:jsxRuntimeExports.jsx(Trans,{message:"Delete"})}),jsxRuntimeExports.jsx(ConfirmationDialog,{isDanger:!0,title:jsxRuntimeExports.jsx(Trans,{message:"Delete token?"}),body:jsxRuntimeExports.jsx(Trans,{message:"This token will be deleted immediately and permanently. Once deleted, it can no longer be used to make API requests."}),confirm:jsxRuntimeExports.jsx(Trans,{message:"Delete"})})]})}function useDeleteAccount(){const{user:s}=useAuth(),i=useLogout();return useMutation({mutationFn:()=>deleteAccount(s.id),onSuccess:()=>{toast("Account deleted"),i.mutate()},onError:a=>showHttpErrorToast(a)})}function deleteAccount(s){return apiClient.delete(`users/${s}`,{params:{deleteCurrentUser:!0}}).then(i=>i.data)}function usePasswordConfirmationStatus(){return useQuery({queryKey:["password-confirmation-status"],queryFn:()=>fetchStatus()})}function fetchStatus(){return apiClient.get("auth/user/confirmed-password-status",{params:{seconds:9e3}}).then(s=>s.data)}function setPasswordConfirmationStatus(s){queryClient.setQueryData(["password-confirmation-status"],{confirmed:s})}function useConfirmPassword(s){return useMutation({mutationFn:i=>confirm$1(i),onError:i=>onFormQueryError(i,s)})}function confirm$1(s){return apiClient.post("auth/user/confirm-password",s).then(i=>i.data)}function ConfirmPasswordDialog(){const{close:s,formId:i}=useDialogContext(),a=useForm(),c=useConfirmPassword(a);return jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogHeader,{children:jsxRuntimeExports.jsx(Trans,{message:"Confirm password"})}),jsxRuntimeExports.jsxs(DialogBody,{children:[jsxRuntimeExports.jsx("p",{className:"text-sm mb-16",children:jsxRuntimeExports.jsx(Trans,{message:"For your security, please confirm your password to continue."})}),jsxRuntimeExports.jsx(Form,{id:i,form:a,onSubmit:d=>c.mutate(d,{onSuccess:()=>s(d.password)}),children:jsxRuntimeExports.jsx(FormTextField,{name:"password",label:jsxRuntimeExports.jsx(Trans,{message:"Password"}),type:"password",required:!0,autoFocus:!0})})]}),jsxRuntimeExports.jsxs(DialogFooter,{children:[jsxRuntimeExports.jsx(Button,{onClick:()=>s(),children:jsxRuntimeExports.jsx(Trans,{message:"Cancel"})}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",form:i,disabled:c.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Confirm"})})]})]})}function usePasswordConfirmedAction({needsPassword:s}={}){const{data:i,isLoading:a}=usePasswordConfirmationStatus(),c=reactExports.useRef(),d=reactExports.useCallback(async g=>{if(i!=null&&i.confirmed&&(c.current||!s))g(c.current);else{const b=await openDialog(ConfirmPasswordDialog);b&&(c.current=b,setPasswordConfirmationStatus(!0),g(c.current))}},[i==null?void 0:i.confirmed,s]);return{isLoading:a,withConfirmedPassword:d}}function DangerZonePanel(){const s=useDeleteAccount(),{withConfirmedPassword:i,isLoading:a}=usePasswordConfirmedAction(),[c,d]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(AccountSettingsPanel,{id:AccountSettingsId.DeleteAccount,title:jsxRuntimeExports.jsx(Trans,{message:"Danger zone"}),children:[jsxRuntimeExports.jsx(DialogTrigger,{type:"modal",isOpen:c,onOpenChange:d,onClose:g=>{g&&s.mutate()},children:jsxRuntimeExports.jsx(ConfirmationDialog,{isDanger:!0,title:jsxRuntimeExports.jsx(Trans,{message:"Delete account?"}),body:jsxRuntimeExports.jsx(Trans,{message:"Your account will be deleted immediately and permanently. Once deleted, accounts can not be restored."}),confirm:jsxRuntimeExports.jsx(Trans,{message:"Delete"})})}),jsxRuntimeExports.jsx(Button,{variant:"flat",color:"danger",disabled:a||s.isPending,onClick:()=>{i(()=>{d(!0)})},children:jsxRuntimeExports.jsx(Trans,{message:"Delete account"})})]})}function useEnableTwoFactor(){return useMutation({mutationFn:enable,onError:s=>showHttpErrorToast(s)})}function enable(){return apiClient.post("auth/user/two-factor-authentication").then(s=>s.data)}function TwoFactorStepperLayout({title:s,subtitle:i,description:a,actions:c,children:d}){return i||(i=jsxRuntimeExports.jsx(Trans,{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."})),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"text-base font-medium mb-16",children:s}),jsxRuntimeExports.jsx("div",{className:"text-sm mb-24",children:i}),jsxRuntimeExports.jsx("p",{className:"text-sm font-medium my-16",children:a}),d,jsxRuntimeExports.jsx("div",{className:"flex items-center gap-12",children:c})]})}function TwoFactorDisabledStep({onEnabled:s}){const i=useEnableTwoFactor(),{withConfirmedPassword:a,isLoading:c}=usePasswordConfirmedAction(),d=i.isPending||c;return jsxRuntimeExports.jsx(TwoFactorStepperLayout,{title:jsxRuntimeExports.jsx(Trans,{message:"You have not enabled two factor authentication."}),actions:jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",disabled:d,onClick:()=>{a(()=>{i.mutate(void 0,{onSuccess:s})})},children:jsxRuntimeExports.jsx(Trans,{message:"Enable"})})})}function useTwoFactorQrCode(){return useQuery({queryKey:["two-factor-qr-code"],queryFn:()=>fetchCode()})}function fetchCode(){return apiClient.get("auth/user/two-factor/qr-code").then(s=>s.data)}function useConfirmTwoFactor(s){return useMutation({mutationFn:i=>confirm(i),onError:i=>onFormQueryError(i,s)})}function confirm(s){return apiClient.post("auth/user/confirmed-two-factor-authentication",s).then(i=>i.data)}function Skeleton({variant:s="text",animation:i="wave",size:a,className:c,display:d="block",radius:g="rounded",style:b}){return jsxRuntimeExports.jsx("span",{style:b,className:clsx$1("skeleton relative overflow-hidden bg-fg-base/4 bg-no-repeat will-change-transform",g,skeletonSize({variant:s,size:a}),d,s==="text"&&"origin-[0_55%] scale-y-[0.6]",s==="avatar"&&"flex-shrink-0",s==="icon"&&"mx-8 flex-shrink-0",i==="wave"&&"skeleton-wave",i==="pulsate"&&"skeleton-pulsate",c),"aria-busy":!0,"aria-live":"polite"})}function skeletonSize({variant:s,size:i}){if(i)return i;switch(s){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"}}function useDisableTwoFactor(){return useMutation({mutationFn:disable,onError:s=>showHttpErrorToast(s)})}function disable(){return apiClient.delete("auth/user/two-factor-authentication").then(s=>s.data)}function TwoFactorConfirmationStep(s){const{data:i}=useTwoFactorQrCode();return jsxRuntimeExports.jsxs(TwoFactorStepperLayout,{title:jsxRuntimeExports.jsx(Trans,{message:"Finish enabling two factor authentication."}),description:jsxRuntimeExports.jsx(Trans,{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:[jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,children:i?jsxRuntimeExports.jsx(QrCodeLayout,{animationKey:"real-svg",svg:jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:i.svg}}),secret:jsxRuntimeExports.jsx(Trans,{message:"Setup key: :key",values:{key:i.secret}})}):jsxRuntimeExports.jsx(QrCodeLayout,{animationKey:"svg-skeleton",svg:jsxRuntimeExports.jsx(Skeleton,{variant:"rect",size:"w-full h-full"}),secret:jsxRuntimeExports.jsx(Skeleton,{variant:"text",className:"max-w-224"})})}),jsxRuntimeExports.jsx(CodeForm,{...s})]})}function CodeForm({onCancel:s,onConfirmed:i}){const a=useForm(),c=useConfirmTwoFactor(a),d=useDisableTwoFactor(),{withConfirmedPassword:g,isLoading:b}=usePasswordConfirmedAction(),$=c.isPending||d.isPending||b;return jsxRuntimeExports.jsxs(Form,{form:a,onSubmit:_=>g(()=>{c.mutate(_,{onSuccess:()=>{queryClient.invalidateQueries({queryKey:["users"]}),i()}})}),children:[jsxRuntimeExports.jsx(FormTextField,{required:!0,name:"code",label:jsxRuntimeExports.jsx(Trans,{message:"Code"}),autoFocus:!0}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-12 mt-24",children:[jsxRuntimeExports.jsx(Button,{type:"button",variant:"outline",disabled:$,onClick:()=>{g(()=>{d.mutate(void 0,{onSuccess:s})})},children:jsxRuntimeExports.jsx(Trans,{message:"Cancel"})}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",disabled:$,children:jsxRuntimeExports.jsx(Trans,{message:"Confirm"})})]})]})}function QrCodeLayout({animationKey:s,svg:i,secret:a}){return jsxRuntimeExports.jsxs(m$1.div,{...opacityAnimation,children:[jsxRuntimeExports.jsx("div",{className:"w-192 h-192 mb-16",children:i}),jsxRuntimeExports.jsx("div",{className:"text-sm font-medium mb-16",children:a})]},s)}function useRegenerateTwoFactorCodes(){return useMutation({mutationFn:()=>regenerate(),onError:s=>showHttpErrorToast(s)})}function regenerate(){return apiClient.post("auth/user/two-factor-recovery-codes").then(s=>s.data)}function TwoFactorEnabledStep({user:s,onDisabled:i}){var _;const a=useDisableTwoFactor(),c=useRegenerateTwoFactorCodes(),{withConfirmedPassword:d,isLoading:g}=usePasswordConfirmedAction(),b=a.isPending||c.isPending||g,$=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{type:"button",onClick:()=>d(()=>{c.mutate(void 0,{onSuccess:()=>{queryClient.invalidateQueries({queryKey:["users"]})}})}),variant:"outline",disabled:b,className:"mr-12",children:jsxRuntimeExports.jsx(Trans,{message:"Regenerate recovery codes"})}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"danger",disabled:b,onClick:()=>{d(()=>{a.mutate(void 0,{onSuccess:()=>{toast(message("Two factor authentication has been disabled.")),i()}})})},children:jsxRuntimeExports.jsx(Trans,{message:"Disable"})})]});return jsxRuntimeExports.jsx(TwoFactorStepperLayout,{title:jsxRuntimeExports.jsx(Trans,{message:"You have enabled two factor authentication."}),description:jsxRuntimeExports.jsx(Trans,{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:$,children:jsxRuntimeExports.jsx("div",{className:"bg-alt p-14 font-mono text-sm mb-16 rounded",children:(_=s.two_factor_recovery_codes)==null?void 0:_.map(j=>jsxRuntimeExports.jsx("div",{className:"mb-4",children:j},j))})})}function TwoFactorStepper({user:s}){const[i,a]=reactExports.useState(getStatus(s));switch(i){case 0:return jsxRuntimeExports.jsx(TwoFactorDisabledStep,{onEnabled:()=>a(1)});case 1:return jsxRuntimeExports.jsx(TwoFactorConfirmationStep,{onCancel:()=>{a(0)},onConfirmed:()=>{a(2)}});case 2:return jsxRuntimeExports.jsx(TwoFactorEnabledStep,{user:s,onDisabled:()=>a(0)})}}function getStatus(s){return s.two_factor_confirmed_at?2:s.two_factor_recovery_codes?1:0}function useUserSessions(){return useQuery({queryKey:["user-sessions"],queryFn:()=>fetchUserSessions()})}function fetchUserSessions(){return apiClient.get("user-sessions").then(s=>s.data)}const ComputerIcon=createSvgIcon(jsxRuntimeExports.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"),SmartphoneIcon=createSvgIcon(jsxRuntimeExports.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"),TabletIcon=createSvgIcon(jsxRuntimeExports.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 useLogoutOtherSessions(){return useMutation({mutationFn:s=>logoutOther(s),onError:s=>showHttpErrorToast(s)})}function logoutOther(s){return apiClient.post("user-sessions/logout-other",s).then(i=>i.data)}function SessionsPanel({user:s}){var $;const{data:i,isLoading:a}=useUserSessions(),c=useLogoutOtherSessions(),{withConfirmedPassword:d,isLoading:g}=usePasswordConfirmedAction({needsPassword:!0}),b=jsxRuntimeExports.jsx("div",{className:"max-h-400 overflow-y-auto",children:($=i==null?void 0:i.sessions)==null?void 0:$.map(_=>jsxRuntimeExports.jsx(SessionItem,{session:_},_.id))});return jsxRuntimeExports.jsxs(AccountSettingsPanel,{id:AccountSettingsId.Sessions,title:jsxRuntimeExports.jsx(Trans,{message:"Active sessions"}),children:[jsxRuntimeExports.jsx("p",{className:"text-sm",children:jsxRuntimeExports.jsx(Trans,{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."})}),jsxRuntimeExports.jsx("div",{className:"my-30",children:a?jsxRuntimeExports.jsx("div",{className:"min-h-60",children:jsxRuntimeExports.jsx(ProgressCircle,{isIndeterminate:!0})}):b}),jsxRuntimeExports.jsx(Button,{variant:"outline",color:"primary",disabled:g||c.isPending,onClick:()=>{d(_=>{c.mutate({password:_},{onSuccess:()=>{toast(message("Logged out other sessions."))}})})},children:jsxRuntimeExports.jsx(Trans,{message:"Logout other sessions"})})]})}function SessionItem({session:s}){return jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-14 text-sm mb-14",children:[jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 text-muted",children:jsxRuntimeExports.jsx(DeviceIcon,{device:s.device_type,size:"lg"})}),jsxRuntimeExports.jsxs("div",{className:"flex-auto",children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ValueOrUnknown,{children:s.platform})," -"," ",jsxRuntimeExports.jsx(ValueOrUnknown,{children:s.browser})]}),jsxRuntimeExports.jsxs("div",{className:"text-xs my-4",children:[s.city,", ",s.country]}),jsxRuntimeExports.jsxs("div",{className:"text-xs",children:[jsxRuntimeExports.jsx(IpAddress,{session:s})," - ",jsxRuntimeExports.jsx(LastActive,{session:s})]})]})]})}function DeviceIcon({device:s,size:i}){switch(s){case"mobile":return jsxRuntimeExports.jsx(SmartphoneIcon,{size:i});case"tablet":return jsxRuntimeExports.jsx(TabletIcon,{size:i});default:return jsxRuntimeExports.jsx(ComputerIcon,{size:i})}}function LastActive({session:s}){return s.is_current_device?jsxRuntimeExports.jsx("span",{className:"text-positive",children:jsxRuntimeExports.jsx(Trans,{message:"This device"})}):jsxRuntimeExports.jsx(FormattedRelativeTime,{date:s.last_active})}function IpAddress({session:s}){return s.ip_address?jsxRuntimeExports.jsx("span",{children:s.ip_address}):s.token?jsxRuntimeExports.jsx(Trans,{message:"API Token"}):jsxRuntimeExports.jsx(Trans,{message:"Unknown IP"})}function ValueOrUnknown({children:s}){return s?jsxRuntimeExports.jsx(reactExports.Fragment,{children:s}):jsxRuntimeExports.jsx(Trans,{message:"Unknown"})}function AccountSettingsPage(){var c;const{auth:s}=reactExports.useContext(SiteConfigContext),{data:i,isLoading:a}=useUser("me",{with:["roles","social_profiles","tokens"]});return jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-alt",children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Account Settings"})}),jsxRuntimeExports.jsx(Navbar,{menuPosition:"account-settings-page"}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-24 py-24",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl",children:jsxRuntimeExports.jsx(Trans,{message:"Account settings"})}),jsxRuntimeExports.jsx("div",{className:"mb-40 text-base text-muted",children:jsxRuntimeExports.jsx(Trans,{message:"View and update your account details, profile and more."})}),a||!i?jsxRuntimeExports.jsx(ProgressCircle,{className:"my-80","aria-label":"Loading user..",isIndeterminate:!0}):jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-24",children:[jsxRuntimeExports.jsx(AccountSettingsSidenav,{}),jsxRuntimeExports.jsxs("main",{className:"flex-auto",children:[(c=s.accountSettingsPanels)==null?void 0:c.map(d=>jsxRuntimeExports.jsx(d.component,{user:i.user},d.id)),jsxRuntimeExports.jsx(BasicInfoPanel,{user:i.user}),jsxRuntimeExports.jsx(SocialLoginPanel,{user:i.user}),jsxRuntimeExports.jsx(ChangePasswordPanel,{}),jsxRuntimeExports.jsx(AccountSettingsPanel,{id:AccountSettingsId.TwoFactor,title:jsxRuntimeExports.jsx(Trans,{message:"Two factor authentication"}),children:jsxRuntimeExports.jsx("div",{className:"max-w-580",children:jsxRuntimeExports.jsx(TwoFactorStepper,{user:i.user})})}),jsxRuntimeExports.jsx(SessionsPanel,{user:i.user}),jsxRuntimeExports.jsx(LocalizationPanel,{user:i.user}),jsxRuntimeExports.jsx(AccessTokenPanel,{user:i.user}),jsxRuntimeExports.jsx(DangerZonePanel,{})]})]})]})})]})}function useSendPasswordResetEmail(s){const i=useNavigate();return useMutation({mutationFn:sendResetPasswordEmail,onSuccess:a=>{toast(a.message),i("/login")},onError:a=>onFormQueryError(a,s)})}function sendResetPasswordEmail(s){return apiClient.post("auth/forgot-password",s).then(i=>i.data)}function ForgotPasswordPage(){const{registration:s}=useSettings(),[i]=useSearchParams(),a=i.get("email")||void 0,c=useForm({defaultValues:{email:a}}),d=useSendPasswordResetEmail(c),g=!s.disable&&jsxRuntimeExports.jsx(Trans,{values:{a:b=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/register",children:b})},message:"Don't have an account? Sign up."});return jsxRuntimeExports.jsxs(AuthLayout,{message:g,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Forgot Password"})}),jsxRuntimeExports.jsxs(Form,{form:c,onSubmit:b=>{d.mutate(b)},children:[jsxRuntimeExports.jsx("div",{className:"mb-32 text-sm",children:jsxRuntimeExports.jsx(Trans,{message:"Enter your email address below and we will send you a link to reset or create your password."})}),jsxRuntimeExports.jsx(FormTextField,{disabled:!!a,className:"mb-32",name:"email",type:"email",autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:jsxRuntimeExports.jsx(Trans,{message:"Email"}),required:!0}),jsxRuntimeExports.jsx(Button,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:d.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Continue"})})]})]})}function reset(s){return apiClient.post("auth/reset-password",s).then(i=>i.data)}function useResetPassword(s){const i=useNavigate();return useMutation({mutationFn:reset,onSuccess:()=>{i("/login",{replace:!0}),toast(message("Your password has been reset!"))},onError:a=>onFormQueryError(a,s)})}function ResetPasswordPage(){const{token:s}=useParams(),i=useForm({defaultValues:{token:s}}),a=useResetPassword(i),c=jsxRuntimeExports.jsx(Trans,{message:"Reset your account password"}),d=jsxRuntimeExports.jsx(Trans,{values:{a:g=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/register",children:g})},message:"Don't have an account? Sign up."});return jsxRuntimeExports.jsxs(AuthLayout,{heading:c,message:d,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Reset Password"})}),jsxRuntimeExports.jsxs(Form,{form:i,onSubmit:g=>{a.mutate(g)},children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"email",type:"email",label:jsxRuntimeExports.jsx(Trans,{message:"Email"}),required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"password",type:"password",label:jsxRuntimeExports.jsx(Trans,{message:"New password"}),required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"password_confirmation",type:"password",label:jsxRuntimeExports.jsx(Trans,{message:"Confirm password"}),required:!0}),jsxRuntimeExports.jsx(Button,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:a.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Reset password"})})]})]})}const AuthRoutes=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Route,{path:"/register",element:jsxRuntimeExports.jsx(RegisterPage,{})}),jsxRuntimeExports.jsx(Route,{path:"/account-settings",element:jsxRuntimeExports.jsx(AuthRoute,{children:jsxRuntimeExports.jsx(AccountSettingsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"login",element:jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(LoginPageWrapper,{})})}),jsxRuntimeExports.jsx(Route,{path:"/workspace/join/register",element:jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(RegisterPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/workspace/join/login",element:jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(LoginPageWrapper,{})})}),jsxRuntimeExports.jsx(Route,{path:"forgot-password",element:jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(ForgotPasswordPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/password/reset/:token",element:jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(ResetPasswordPage,{})})})]}),endpoint="billing/products";function useProducts(s){return useQuery({queryKey:[endpoint],queryFn:()=>fetchProducts(),initialData:()=>{var i;if(s)return(i=getBootstrapData().loaders)==null?void 0:i[s]}})}function fetchProducts(){return apiClient.get(endpoint).then(s=>({products:s.data.pagination.data}))}const ForumIcon=createSvgIcon(jsxRuntimeExports.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"),Radio=reactExports.forwardRef((s,i)=>{const{children:a,autoFocus:c,size:d,invalid:g,isFirst:b,...$}=s,_=$df56164dff5785e2$export$4338b53315abf666(i);useAutoFocus({autoFocus:c},_);const j=getSizeClassNames(d);return jsxRuntimeExports.jsxs("label",{className:clsx$1("inline-flex gap-8 select-none items-center whitespace-nowrap align-middle",j.label,s.disabled&&"text-disabled pointer-events-none",s.invalid&&"text-danger"),children:[jsxRuntimeExports.jsx("input",{type:"radio",className:clsx$1("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",j.circle),ref:_,...$}),a&&jsxRuntimeExports.jsx("span",{children:a})]})});function FormRadio(s){const{field:{onChange:i,onBlur:a,value:c,ref:d},fieldState:{invalid:g}}=useController({name:s.name}),b={onChange:i,onBlur:a,checked:s.value===c,invalid:s.invalid||g};return jsxRuntimeExports.jsx(Radio,{ref:d,...$3ef42575df84b30b$export$9d1611c77c2fe928(b,s)})}function getSizeClassNames(s){switch(s){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 RadioGroup=reactExports.forwardRef((s,i)=>{const a=getInputFieldClassNames(s),{label:c,children:d,size:g,className:b,orientation:$="horizontal",disabled:_,required:j,invalid:_e,errorMessage:et,description:tt}=s,nt={},rt=reactExports.useId(),at=s.name||rt;return jsxRuntimeExports.jsxs("fieldset",{"aria-describedby":tt?`${rt}-description`:void 0,ref:i,className:clsx$1("text-left",b),children:[c&&jsxRuntimeExports.jsx("legend",{className:a.label,...nt,children:c}),jsxRuntimeExports.jsx("div",{className:clsx$1("flex",c?"mt-6":"mt-0",$==="vertical"?"flex-col gap-10":"flex-row gap-16"),children:reactExports.Children.map(d,lt=>{if(reactExports.isValidElement(lt))return reactExports.cloneElement(lt,{name:at,size:g,invalid:lt.props.invalid||_e||void 0,disabled:lt.props.disabled||_,required:lt.props.required||j})})}),tt&&!et&&jsxRuntimeExports.jsx("div",{className:a.description,id:`${rt}-description`,children:tt}),et&&jsxRuntimeExports.jsx("div",{className:a.error,children:et})]})});function FormRadioGroup({children:s,...i}){const{fieldState:{error:a}}=useController({name:i.name});return jsxRuntimeExports.jsx(RadioGroup,{errorMessage:a==null?void 0:a.message,...i,children:s})}function findBestPrice(s,i){if(s==="monthly"){const a=findMonthlyPrice(i);if(a)return a}if(s==="yearly"){const a=findYearlyPrice(i);if(a)return a}return i[0]}function findYearlyPrice(s){return s.find(i=>{if(i.interval==="month"&&i.interval_count>=12||i.interval==="year"&&i.interval_count>=1)return i})}function findMonthlyPrice(s){return s.find(i=>{if(i.interval==="day"&&i.interval_count>=30||i.interval==="month"&&i.interval_count>=1)return i})}const UpsellLabel=reactExports.memo(({products:s})=>{const i=calcHighestUpsellPercentage(s);return i<=0?null:jsxRuntimeExports.jsx(reactExports.Fragment,{children:jsxRuntimeExports.jsxs("span",{className:"font-medium text-positive-darker",children:[" ","(",jsxRuntimeExports.jsx(Trans,{message:"Save up to :percentage%",values:{percentage:i}}),")"]})})});function calcHighestUpsellPercentage(s){if(!(s!=null&&s.length))return 0;const i=s.map(a=>{if(a.hidden)return 0;const c=findBestPrice("monthly",a.prices),d=findBestPrice("yearly",a.prices);if(!c||!d)return 0;const g=c.amount*12,b=d.amount,$=Math.round((g-b)/g*100);return $>0&&$<=200?$:0});return Math.max(Math.max(...i),0)}function BillingCycleRadio({selectedCycle:s,onChange:i,products:a,...c}){return jsxRuntimeExports.jsxs(RadioGroup,{...c,children:[jsxRuntimeExports.jsxs(Radio,{value:"yearly",checked:s==="yearly",onChange:d=>{i(d.target.value)},children:[jsxRuntimeExports.jsx(Trans,{message:"Annual"}),jsxRuntimeExports.jsx(UpsellLabel,{products:a})]}),jsxRuntimeExports.jsx(Radio,{value:"monthly",checked:s==="monthly",onChange:d=>{i(d.target.value)},children:jsxRuntimeExports.jsx(Trans,{message:"Monthly"})})]})}const CancelFilledIcon=createSvgIcon(jsxRuntimeExports.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"})),WarningIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"WarningOutlined"),TOOLTIP_COOLDOWN=500,tooltips={};let globalWarmedUp=!1,globalWarmUpTimeout=null,globalCooldownTimeout=null;const closeOpenTooltips=s=>{var i;for(const a in tooltips)a!==s&&((i=tooltips[a])==null||i.call(tooltips,!0),delete tooltips[a])},Tooltip=reactExports.forwardRef(({children:s,label:i,placement:a="top",offset:c=10,variant:d="neutral",delay:g=1500,isDisabled:b,usePortal:$=!0,..._},j)=>{const{x:_e,y:et,reference:tt,strategy:nt,arrowRef:rt,arrowStyle:at,refs:lt}=useFloatingPosition({placement:a,offset:c,ref:j,showArrow:!0}),[ot,st]=reactExports.useState(!1),it=reactExports.useId(),ut=reactExports.useRef(),ct=()=>{clearTimeout(ut.current),ut.current=void 0,closeOpenTooltips(it),tooltips[it]=pt,globalWarmedUp=!0,st(!0),globalWarmUpTimeout&&(clearTimeout(globalWarmUpTimeout),globalWarmUpTimeout=null),globalCooldownTimeout&&(clearTimeout(globalCooldownTimeout),globalCooldownTimeout=null)},pt=reactExports.useCallback(wt=>{wt?(clearTimeout(ut.current),ut.current=void 0,st(!1)):ut.current||(ut.current=setTimeout(()=>{ut.current=void 0,st(!1)},TOOLTIP_COOLDOWN)),globalWarmUpTimeout&&(clearTimeout(globalWarmUpTimeout),globalWarmUpTimeout=null),globalWarmedUp&&(globalCooldownTimeout&&clearTimeout(globalCooldownTimeout),globalCooldownTimeout=setTimeout(()=>{delete tooltips[it],globalCooldownTimeout=null,globalWarmedUp=!1},TOOLTIP_COOLDOWN))},[it]),mt=()=>{closeOpenTooltips(it),tooltips[it]=pt,!ot&&!globalWarmUpTimeout&&!globalWarmedUp?globalWarmUpTimeout=setTimeout(()=>{globalWarmUpTimeout=null,globalWarmedUp=!0,ct()},g):ot||ct()},xt=wt=>{!wt&&g>0&&!ut.current?mt():ct()};reactExports.useEffect(()=>()=>{clearTimeout(ut.current),tooltips[it]&&delete tooltips[it]},[it]),reactExports.useEffect(()=>{const wt=_t=>{_t.key==="Escape"&&pt(!0)};if(ot)return document.addEventListener("keydown",wt,!0),()=>{document.removeEventListener("keydown",wt,!0)}},[ot,pt]);const St=jsxRuntimeExports.jsx(AnimatePresence,{children:ot&&jsxRuntimeExports.jsxs(m$1.div,{...PopoverAnimation,ref:lt.setFloating,id:it,role:"tooltip",onPointerEnter:()=>{xt(!0)},onPointerLeave:()=>{pt()},className:clsx$1("z-tooltip my-4 max-w-240 break-words rounded px-8 py-4 text-xs text-white shadow",d==="positive"&&"bg-positive",d==="danger"&&"bg-danger",d==="neutral"&&"bg-toast"),style:{position:nt,top:et??"",left:_e??""},children:[jsxRuntimeExports.jsx("div",{ref:rt,className:"absolute h-8 w-8 rotate-45 bg-inherit",style:at}),i]})});return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[reactExports.cloneElement(s,$3ef42575df84b30b$export$9d1611c77c2fe928({"aria-describedby":ot?it:void 0,ref:tt,onPointerEnter:wt=>{wt.pointerType==="mouse"&&xt()},onFocus:wt=>{wt.target.matches(":focus-visible")&&xt(!0)},onPointerLeave:wt=>{wt.pointerType==="mouse"&&pt()},onPointerDown:()=>{pt(!0)},onBlur:()=>{pt()},"aria-label":typeof i=="string"?i:i.props.message},_)),$?rootEl&&reactDomExports.createPortal(St,rootEl):St]})});function Chip(s){const{onRemove:i,disabled:a,invalid:c,errorMessage:d,children:g,className:b,selectable:$=!1,radius:_="rounded-full",elementType:j="div",to:_e,onClick:et}=s,tt=reactExports.useRef(null),nt=reactExports.useRef(null),rt=$9bf71ea28793e738$export$10c5169755ce7bd7(),at=ut=>{switch(ut.key){case"ArrowRight":case"ArrowDown":rt==null||rt.focusNext({tabbable:!0});break;case"ArrowLeft":case"ArrowUp":rt==null||rt.focusPrevious({tabbable:!0});break;case"Backspace":case"Delete":tt.current===document.activeElement&&(i==null||i());break}},lt=ut=>{ut.stopPropagation(),et?et(ut):tt.current.focus()},ot=sizeClassNames(s);let st=c||d!=null?jsxRuntimeExports.jsx(WarningIcon,{className:"text-danger",size:"sm"}):s.adornment&&reactExports.cloneElement(s.adornment,{size:ot.adornment.size,circle:!0,className:clsx$1(s.adornment.props,ot.adornment.margin)});d&&st&&(st=jsxRuntimeExports.jsx(Tooltip,{label:d,variant:"danger",children:st}));const it=j;return jsxRuntimeExports.jsxs(it,{tabIndex:$?0:void 0,ref:tt,to:_e,onKeyDown:$?at:void 0,onClick:$?lt:void 0,className:clsx$1("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",et&&"cursor-pointer",_,colorClassName(s),ot.chip,!a&&$&&"hover:after:bg-black/5 focus:after:bg-black/10",b),children:[st,jsxRuntimeExports.jsx("div",{className:"flex-auto overflow-hidden overflow-ellipsis",children:g}),i&&jsxRuntimeExports.jsx(ButtonBase,{ref:nt,className:clsx$1("text-black/30 dark:text-white/50",ot.closeButton),onClick:ut=>{ut.stopPropagation(),i()},tabIndex:-1,children:jsxRuntimeExports.jsx(CancelFilledIcon,{className:"block",width:"100%",height:"100%"})})]})}function sizeClassNames({size:s,onRemove:i}){switch(s){case"xs":return{adornment:{size:"xs",margin:"-ml-3"},chip:clsx$1("pl-8 h-20 text-xs font-medium w-max",!i&&"pr-8"),closeButton:"mr-4 w-14 h-14"};case"sm":return{adornment:{size:"xs",margin:"-ml-3"},chip:clsx$1("pl-8 h-26 text-xs",!i&&"pr-8"),closeButton:"mr-4 w-18 h-18"};case"lg":return{adornment:{size:"md",margin:"-ml-12"},chip:clsx$1("pl-18 h-38 text-base",!i&&"pr-18"),closeButton:"mr-6 w-24 h-24"};default:return{adornment:{size:"sm",margin:"-ml-6"},chip:clsx$1("pl-12 h-32 text-sm",!i&&"pr-12"),closeButton:"mr-6 w-22 h-22"}}}function colorClassName({color:s}){switch(s){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 FormattedCurrency=reactExports.memo(({value:s,currency:i})=>{const a=useNumberFormatter({style:"currency",currency:i,currencyDisplay:"narrowSymbol"});return isNaN(s)&&(s=0),jsxRuntimeExports.jsx(reactExports.Fragment,{children:a.format(s)})});function FormattedPrice({price:s,variant:i="slash",className:a,priceClassName:c,periodClassName:d}){if(!s)return null;const g=jsxRuntimeExports.jsx(Trans,{message:s.interval});return jsxRuntimeExports.jsxs("div",{className:clsx$1("flex gap-6 items-center",a),children:[jsxRuntimeExports.jsx("div",{className:c,children:jsxRuntimeExports.jsx(FormattedCurrency,{value:s.amount/(s.interval_count??1),currency:s.currency})}),i==="slash"?jsxRuntimeExports.jsxs("div",{className:d,children:[" / ",g]}):jsxRuntimeExports.jsxs("div",{className:d,children:[jsxRuntimeExports.jsx(Trans,{message:"per"})," ",jsxRuntimeExports.jsx("br",{})," ",g]})]})}function ProductFeatureList({product:s}){return s.feature_list.length?jsxRuntimeExports.jsxs("div",{className:"mt-32 border-t pt-24",children:[jsxRuntimeExports.jsx("div",{className:"mb-10 text-sm font-semibold",children:jsxRuntimeExports.jsx(Trans,{message:"What's included"})}),s.feature_list.map(i=>jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-10 py-6 text-sm",children:[jsxRuntimeExports.jsx(CheckIcon,{className:"text-primary",size:"sm"}),jsxRuntimeExports.jsx(Trans,{message:i})]},i))]}):null}function PricingTable({selectedCycle:s,className:i,productLoader:a}){const c=useProducts(a);return jsxRuntimeExports.jsx("div",{className:clsx$1("flex flex-col items-stretch gap-24 overflow-x-auto overflow-y-visible pb-20 md:flex-row md:justify-center",i),children:jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,mode:"wait",children:c.data?jsxRuntimeExports.jsx(PlanList,{plans:c.data.products,selectedPeriod:s},"plan-list"):jsxRuntimeExports.jsx(SkeletonLoader,{},"skeleton-loader")})})}function PlanList({plans:s,selectedPeriod:i}){const{isLoggedIn:a,isSubscribed:c}=useAuth(),d=s.filter(g=>!g.hidden);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:d.map((g,b)=>{const $=b===0,_=b===d.length-1,j=findBestPrice(i,g.prices);let _e;return a||(_e="/register?redirectFrom=pricing"),c&&(_e=`/change-plan/${g.id}/${j==null?void 0:j.id}/confirm`),a&&!g.free&&(_e=`/checkout/${g.id}/${j==null?void 0:j.id}`),jsxRuntimeExports.jsxs(m$1.div,{...opacityAnimation,className:clsx$1("w-full rounded-panel border bg px-28 py-28 shadow-lg md:min-w-240 md:max-w-350",$&&"ml-auto",_&&"mr-auto"),children:[jsxRuntimeExports.jsxs("div",{className:"mb-32",children:[jsxRuntimeExports.jsx(Chip,{radius:"rounded",size:"sm",className:clsx$1("mb-20 w-min",!g.recommended&&"invisible"),children:jsxRuntimeExports.jsx(Trans,{message:"Most popular"})}),jsxRuntimeExports.jsx("div",{className:"mb-12 text-xl font-semibold",children:jsxRuntimeExports.jsx(Trans,{message:g.name})}),jsxRuntimeExports.jsx("div",{className:"text-sm text-muted",children:jsxRuntimeExports.jsx(Trans,{message:g.description})})]}),jsxRuntimeExports.jsxs("div",{children:[j?jsxRuntimeExports.jsx(FormattedPrice,{priceClassName:"font-bold text-4xl",periodClassName:"text-muted text-xs",variant:"separateLine",price:j}):jsxRuntimeExports.jsx("div",{className:"text-4xl font-bold",children:jsxRuntimeExports.jsx(Trans,{message:"Free"})}),jsxRuntimeExports.jsx("div",{className:"mt-60",children:jsxRuntimeExports.jsx(Button,{variant:g.recommended?"flat":"outline",color:"primary",className:"w-full",size:"md",elementType:_e?Link:void 0,disabled:!_e,onClick:()=>{a||!j||!g||setInLocalStorage("be.onboarding.selected",{productId:g.id,priceId:j.id})},to:_e,children:g.free?jsxRuntimeExports.jsx(Trans,{message:"Get started"}):jsxRuntimeExports.jsx(Trans,{message:"Upgrade"})})}),jsxRuntimeExports.jsx(ProductFeatureList,{product:g})]})]},g.id)})})}function SkeletonLoader(){return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(PlanSkeleton,{},"skeleton-1"),jsxRuntimeExports.jsx(PlanSkeleton,{},"skeleton-2"),jsxRuntimeExports.jsx(PlanSkeleton,{},"skeleton-3")]})}function PlanSkeleton(){return jsxRuntimeExports.jsxs(m$1.div,{...opacityAnimation,className:"w-full rounded-lg border px-28 py-90 shadow-lg md:max-w-350",children:[jsxRuntimeExports.jsx(Skeleton,{className:"my-10"}),jsxRuntimeExports.jsx(Skeleton,{className:"mb-40"}),jsxRuntimeExports.jsx(Skeleton,{className:"mb-40 h-30"}),jsxRuntimeExports.jsx(Skeleton,{className:"mb-40 h-40"}),jsxRuntimeExports.jsx(Skeleton,{className:"mb-20"}),jsxRuntimeExports.jsx(Skeleton,{}),jsxRuntimeExports.jsx(Skeleton,{})]})}function PricingPage(){var c;const s=useProducts("pricingPage"),[i,a]=reactExports.useState("yearly");return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Pricing"})}),jsxRuntimeExports.jsx(Navbar,{color:"bg",darkModeColor:"transparent",border:"border-b",menuPosition:"pricing-table-page"}),jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-24",children:[jsxRuntimeExports.jsx("h1",{className:"mb-30 mt-30 text-center text-3xl font-normal md:mt-60 md:text-4xl md:font-medium",children:jsxRuntimeExports.jsx(Trans,{message:"Choose the right plan for you"})}),jsxRuntimeExports.jsx(BillingCycleRadio,{products:(c=s.data)==null?void 0:c.products,selectedCycle:i,onChange:a,className:"mb-40 flex justify-center md:mb-70",size:"lg"}),jsxRuntimeExports.jsx(PricingTable,{selectedCycle:i,productLoader:"pricingPage"}),jsxRuntimeExports.jsx(ContactSection,{})]}),jsxRuntimeExports.jsx(Footer,{className:"container mx-auto flex-shrink-0 px-24"})]})}function ContactSection(){return jsxRuntimeExports.jsxs("div",{className:"my-20 p-24 text-center md:my-80",children:[jsxRuntimeExports.jsx(ForumIcon,{size:"xl",className:"text-muted"}),jsxRuntimeExports.jsx("div",{className:"my-8 md:text-lg",children:jsxRuntimeExports.jsx(Trans,{message:"Do you have any questions about PRO accounts?"})}),jsxRuntimeExports.jsx("div",{className:"mb-24 mt-20 text-sm md:mt-0 md:text-base",children:jsxRuntimeExports.jsx(Trans,{message:"Our support team will be happy to assist you."})}),jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",elementType:Link,to:"/contact",children:jsxRuntimeExports.jsx(Trans,{message:"Contact us"})})]})}const BillingPageRoutes=React.lazy(()=>__vitePreload(()=>import("./billing-page-routes-577212eb.js"),["./billing-page-routes-577212eb.js","./Edit-007bdb63.js","./billing-redirect-message-703a8e38.js","./TaskAlt-c6a46604.js","./use-resume-subscription-81a149c4.js","./OpenInNew-a258380a.js"],import.meta.url)),CheckoutRoutes=React.lazy(()=>__vitePreload(()=>import("./checkout-routes-bb758a52.js"),["./checkout-routes-bb758a52.js","./billing-redirect-message-703a8e38.js","./TaskAlt-c6a46604.js"],import.meta.url)),BillingRoutes=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Route,{path:"/pricing",element:jsxRuntimeExports.jsx(PricingPage,{})}),jsxRuntimeExports.jsx(Route,{path:"checkout/*",element:jsxRuntimeExports.jsx(React.Suspense,{fallback:jsxRuntimeExports.jsx(FullPageLoader,{screen:!0}),children:jsxRuntimeExports.jsx(CheckoutRoutes,{})})}),jsxRuntimeExports.jsx(Route,{path:"billing/*",element:jsxRuntimeExports.jsx(React.Suspense,{fallback:jsxRuntimeExports.jsx(FullPageLoader,{screen:!0}),children:jsxRuntimeExports.jsx(BillingPageRoutes,{})})})]});function NotificationsPage(){const{user:s}=useAuth(),{data:i,isLoading:a}=useUserNotifications({perPage:30}),c=!!(s!=null&&s.unread_notifications_count),d=useMarkNotificationsAsRead(),{notif:g}=useSettings(),b=()=>{i&&d.mutate({markAllAsUnread:!0})},$=jsxRuntimeExports.jsx(Button,{variant:"outline",color:"primary",size:"xs",startIcon:jsxRuntimeExports.jsx(DoneAllIcon,{}),onClick:b,disabled:d.isPending||a,className:"ml-auto",children:jsxRuntimeExports.jsx(Trans,{message:"Mark all as read"})});return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Notifications"})}),jsxRuntimeExports.jsx(Navbar,{menuPosition:"notifications-page"}),jsxRuntimeExports.jsxs("div",{className:"container mx-auto min-h-[1000px] p-16 md:p-24",children:[jsxRuntimeExports.jsxs("div",{className:"mb-30 flex items-center gap-24",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl",children:jsxRuntimeExports.jsx(Trans,{message:"Notifications"})}),c&&$,g.subs.integrated&&jsxRuntimeExports.jsx(IconButton,{className:"ml-auto text-muted",elementType:Link,to:"/notifications/settings",target:"_blank",children:jsxRuntimeExports.jsx(SettingsIcon,{})})]}),jsxRuntimeExports.jsx(PageContent,{})]}),jsxRuntimeExports.jsx(Footer,{className:"container mx-auto mt-48 p-16 md:p-24"})]})}function PageContent(){const{data:s,isLoading:i}=useUserNotifications({perPage:30});return i?jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center py-10",children:jsxRuntimeExports.jsx(ProgressCircle,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):s!=null&&s.pagination.data.length?jsxRuntimeExports.jsx(NotificationList,{className:"rounded border",notifications:s.pagination.data}):jsxRuntimeExports.jsx(NotificationEmptyStateMessage,{})}function fetchNotificationSubscriptions(){return apiClient.get("notifications/me/subscriptions").then(s=>s.data)}function useNotificationSubscriptions(){return useQuery({queryKey:["notification-subscriptions"],queryFn:()=>fetchNotificationSubscriptions(),staleTime:1/0})}function UpdateNotificationSettings(s){return apiClient.put("notifications/me/subscriptions",{selections:s}).then(i=>i.data)}function useUpdateNotificationSettings(){return useMutation({mutationFn:s=>UpdateNotificationSettings(s),onSuccess:()=>{toast(message("Updated preferences")),queryClient.invalidateQueries({queryKey:["notification-subscriptions"]})},onError:s=>showHttpErrorToast(s)})}function NotificationSettingsPage(){const{notif:s}=useSettings(),i=useUpdateNotificationSettings(),{data:a,isFetched:c}=useNotificationSubscriptions(),[d,g]=reactExports.useState();return reactExports.useEffect(()=>{if(a&&!d){const b={},$={};a.available_channels.forEach(_=>{$[_]=!1}),a.subscriptions.forEach(_=>{_.subscriptions.forEach(j=>{const _e=a.user_selections.find(et=>et.notif_id===j.notif_id);b[j.notif_id]=(_e==null?void 0:_e.channels)||{...$}})}),g(b)}},[a,d]),!s.subs.integrated||a&&a.subscriptions.length===0?jsxRuntimeExports.jsx(Navigate,{to:"/",replace:!0}):jsxRuntimeExports.jsxs("div",{className:"min-h-screen bg-alt",children:[jsxRuntimeExports.jsx(Navbar,{menuPosition:"notifications-page"}),!c||!a||!d?jsxRuntimeExports.jsx("div",{className:"container mx-auto my-100 flex justify-center",children:jsxRuntimeExports.jsx(ProgressCircle,{size:"md",isIndeterminate:!0,"aria-label":"Loading subscriptions..."})}):jsxRuntimeExports.jsx("div",{className:"container mx-auto my-20 px-10 md:my-40 md:px-20",children:jsxRuntimeExports.jsxs("div",{className:"rounded border bg-paper px-20 pb-30 pt-20",children:[a.subscriptions.map(b=>jsxRuntimeExports.jsxs("div",{className:"mb-10 text-sm",children:[jsxRuntimeExports.jsx(GroupRow,{group:b,allChannels:a==null?void 0:a.available_channels,selection:d,setSelection:g},b.group_name),b.subscriptions.map($=>jsxRuntimeExports.jsx(SubscriptionRow,{subscription:$,selection:d,setSelection:g,allChannels:a==null?void 0:a.available_channels},$.notif_id))]},b.group_name)),jsxRuntimeExports.jsx(Button,{className:"ml-10 mt-20",variant:"flat",color:"primary",disabled:i.isPending,onClick:()=>{i.mutate(Object.entries(d).map(([b,$])=>({notif_id:b,channels:$})))},children:jsxRuntimeExports.jsx(Trans,{message:"Update preferences"})})]})})]})}function GroupRow({group:s,allChannels:i,selection:a,setSelection:c}){const d=(b,$)=>{const _=produce(a,j=>{Object.keys(a).forEach(_e=>{j[_e][b]=$})});c(_)},g=jsxRuntimeExports.jsx("div",{className:"ml-auto flex items-center gap-40 max-md:hidden",children:i.map(b=>{const $=Object.values(a).every(j=>j[b]),_=!$&&Object.values(a).some(j=>j[b]);return jsxRuntimeExports.jsx(Checkbox,{orientation:"vertical",isIndeterminate:_,checked:$,onChange:async j=>{if(b==="browser"){const _e=await requestBrowserPermission();d(b,_e?!$:!1)}else d(b,!$)},children:jsxRuntimeExports.jsx(Trans,{message:b})},b)})});return jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b p-10",children:[jsxRuntimeExports.jsx("div",{className:"font-medium",children:jsxRuntimeExports.jsx(Trans,{message:s.group_name})}),g]})}function SubscriptionRow({subscription:s,allChannels:i,selection:a,setSelection:c}){const d=s.notif_id,g=(b,$)=>{const _=produce(a,j=>{j[s.notif_id][b]=$});c(_)};return jsxRuntimeExports.jsxs("div",{className:"items-center border-b py-10 pl-8 pr-10 md:flex md:pl-20",children:[jsxRuntimeExports.jsx("div",{className:"pb-14 font-semibold md:pb-0 md:font-normal",children:jsxRuntimeExports.jsx(Trans,{message:s.name})}),jsxRuntimeExports.jsx("div",{className:"ml-auto flex items-center gap-40",children:i.map(b=>jsxRuntimeExports.jsx(Checkbox,{orientation:"vertical",checked:a[d][b],onChange:async $=>{const _=!a[d][b];if(b==="browser"){const j=await requestBrowserPermission();g(b,j?_:!1)}else g(b,_)},"aria-label":b,children:jsxRuntimeExports.jsx("div",{className:"md:invisible md:h-0",children:jsxRuntimeExports.jsx(Trans,{message:b})})},b))})]})}function requestBrowserPermission(){return Notification.permission==="granted"?Promise.resolve(!0):Notification.permission==="denied"?(toast.danger(message("Notifications blocked. Please enable them for this site from browser settings.")),Promise.resolve(!1)):Notification.requestPermission().then(s=>s==="granted")}const NotificationRoutes=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(AuthRoute,{children:jsxRuntimeExports.jsx(ActiveWorkspaceProvider,{children:jsxRuntimeExports.jsx(NotificationsPage,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications/settings",element:jsxRuntimeExports.jsx(AuthRoute,{children:jsxRuntimeExports.jsx(NotificationSettingsPage,{})})})]});function useSubmitContactForm(s){const{trans:i}=useTrans(),a=useNavigate();return useMutation({mutationFn:c=>submitContactForm(c),onSuccess:()=>{toast(i(message("Your message has been submitted."))),a("/")},onError:c=>onFormQueryError(c,s)})}function submitContactForm(s){return apiClient.post("contact-page",s).then(i=>i.data)}function ContactUsPage(){const s=useForm(),i=useSubmitContactForm(s),{verify:a,isVerifying:c}=useRecaptcha("contact");return jsxRuntimeExports.jsxs("div",{className:"flex flex-col bg-alt min-h-screen",children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Contact us"})}),jsxRuntimeExports.jsx(Navbar,{className:"flex-shrink-0 sticky top-0",menuPosition:"contact-us-page"}),jsxRuntimeExports.jsx("div",{className:"container p-24 md:p-40 mx-auto flex-auto flex items-center justify-center",children:jsxRuntimeExports.jsxs("div",{className:"border rounded bg-paper p-24 max-w-620",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl",children:jsxRuntimeExports.jsx(Trans,{message:"Contact us"})}),jsxRuntimeExports.jsx("p",{className:"text-sm mt-4 mb-30",children:jsxRuntimeExports.jsx(Trans,{message:"Please use the form below to send us a message and we'll get back to you as soon as possible."})}),jsxRuntimeExports.jsxs(Form,{form:s,onSubmit:async d=>{await a()&&i.mutate(d)},children:[jsxRuntimeExports.jsx(FormTextField,{label:jsxRuntimeExports.jsx(Trans,{message:"Name"}),name:"name",required:!0,className:"mb-20"}),jsxRuntimeExports.jsx(FormTextField,{label:jsxRuntimeExports.jsx(Trans,{message:"Email"}),name:"email",required:!0,type:"email",className:"mb-20"}),jsxRuntimeExports.jsx(FormTextField,{label:jsxRuntimeExports.jsx(Trans,{message:"Message"}),name:"message",required:!0,inputElementType:"textarea",className:"mb-20",rows:8}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",disabled:i.isPending||c,children:jsxRuntimeExports.jsx(Trans,{message:"Send"})})]})]})}),jsxRuntimeExports.jsx(Footer,{className:"container mx-auto px-24 flex-shrink-0"})]})}const AdminRoutes=React.lazy(()=>__vitePreload(()=>import("./admin-routes-8ad01f06.js").then(s=>s.B),["./admin-routes-8ad01f06.js","./Info-61549577.js","./Edit-007bdb63.js","./use-resume-subscription-81a149c4.js"],import.meta.url)),DriveRoutes=React.lazy(()=>__vitePreload(()=>import("./drive-routes-fc701802.js"),["./drive-routes-fc701802.js","./Info-61549577.js","./Edit-007bdb63.js","./ViewModule-5103cfe2.js"],import.meta.url)),SwaggerApiDocs=React.lazy(()=>__vitePreload(()=>import("./swagger-api-docs-page-ff7ee802.js"),["./swagger-api-docs-page-ff7ee802.js","./index-899074d6.js","./swagger-api-docs-page-34ffaf07.css"],import.meta.url));function AppRoutes(){const{billing:s,notifications:i,require_email_confirmation:a,api:c}=useSettings(),{user:d,hasPermission:g}=useAuth();return d!=null&&a&&!d.email_verified_at?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(ToastContainer,{}),jsxRuntimeExports.jsx(Routes,{children:jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(EmailVerificationPage,{})})}),jsxRuntimeExports.jsx(DialogStoreOutlet,{})]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(AppearanceListener,{}),jsxRuntimeExports.jsx(CookieNotice,{}),jsxRuntimeExports.jsx(ToastContainer,{}),jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(DynamicHomepage,{homepageResolver:()=>jsxRuntimeExports.jsx(GuestRoute,{children:jsxRuntimeExports.jsx(LandingPage,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/drive/*",element:jsxRuntimeExports.jsx(React.Suspense,{fallback:jsxRuntimeExports.jsx(FullPageLoader,{screen:!0}),children:jsxRuntimeExports.jsx(ActiveWorkspaceProvider,{children:jsxRuntimeExports.jsx(DriveRoutes,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/admin/*",element:jsxRuntimeExports.jsx(AuthRoute,{permission:"admin.access",children:jsxRuntimeExports.jsx(React.Suspense,{fallback:jsxRuntimeExports.jsx(FullPageLoader,{screen:!0}),children:jsxRuntimeExports.jsx(AdminRoutes,{})})})}),AuthRoutes,s.enable&&BillingRoutes,i.integrated&&NotificationRoutes,(c==null?void 0:c.integrated)&&g("api.access")&&jsxRuntimeExports.jsx(Route,{path:"api-docs",element:jsxRuntimeExports.jsx(React.Suspense,{fallback:jsxRuntimeExports.jsx(FullPageLoader,{screen:!0}),children:jsxRuntimeExports.jsx(SwaggerApiDocs,{})})}),jsxRuntimeExports.jsx(Route,{path:"contact",element:jsxRuntimeExports.jsx(ContactUsPage,{})}),jsxRuntimeExports.jsx(Route,{path:"pages/:pageSlug",element:jsxRuntimeExports.jsx(CustomPageLayout,{})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]}),jsxRuntimeExports.jsx(DialogStoreOutlet,{})]})}const data=getBootstrapData(),sentryDsn=data.settings.logging.sentry_public;sentryDsn&&init({dsn:sentryDsn,integrations:[new BrowserTracing],tracesSampleRate:.2,ignoreErrors:ignoredSentryErrors,release:data.sentry_release});const app=jsxRuntimeExports.jsx(BrowserRouter,{basename:data.settings.html_base_uri,children:jsxRuntimeExports.jsx(CommonProvider,{children:jsxRuntimeExports.jsx(AppRoutes,{})})});data.rendered_ssr?hydrateRoot(rootEl,app):createRoot(rootEl).render(app);export{$458b0a5536c1a7cf$export$40bfa8c7b0832715 as $,AnimatePresence as A,Button as B,CustomMenu as C,Dialog as D,ErrorIcon as E,Form as F,SearchIcon as G,opacityAnimation as H,Item$1 as I,Skeleton as J,KeyboardArrowLeftIcon as K,StaticPageTitle as L,useMutation as M,queryClient as N,Outlet as O,ProgressBar as P,toast as Q,React as R,SelectForwardRef as S,Trans as T,showHttpErrorToast as U,ConfirmationDialog as V,IllustratedMessage as W,SvgImage as X,DialogFooter as Y,onFormQueryError as Z,FormTextField as _,useQuery as a,useSocialLogin as a$,CheckIcon as a0,CloseIcon as a1,Chip as a2,Link as a3,FormattedDate as a4,Tooltip as a5,LoginIcon as a6,getInputFieldClassNames as a7,$03deb23ff14920c4$export$4eaf04e54aa8eed6 as a8,clamp$1 as a9,useAppearanceEditorMode as aA,Navigate as aB,FileUploadProvider as aC,ProgressCircle as aD,useNavigate$1 as aE,nanoid as aF,$62d8ded9296f3872$export$cfa2225e87938781 as aG,useParams as aH,useNavigate as aI,useBootstrapData as aJ,NavLink as aK,useQueryClient as aL,FullPageLoader as aM,LinkStyle as aN,SiteConfigContext as aO,getBootstrapData as aP,dot as aQ,ExternalLink as aR,MenuTrigger as aS,Menu as aT,FormRadioGroup as aU,FormRadio as aV,$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as aW,$9bf71ea28793e738$export$2d6ec8fc375ceafa as aX,DateFormatPresets as aY,memoize as aZ,prettyBytes as a_,$3ef42575df84b30b$export$9d1611c77c2fe928 as aa,$9446cca9a3875146$export$cb6e0bb50bc19463 as ab,$df56164dff5785e2$export$4338b53315abf666 as ac,createEventHandler as ad,useController as ae,ButtonBase as af,$9446cca9a3875146$export$7d15b64cf5a3a4c4 as ag,$9446cca9a3875146$export$b6268554fba451f as ah,$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 as ai,FormImageSelector as aj,useFormContext as ak,useValueLists as al,DoneAllIcon as am,List as an,ListItem as ao,produce as ap,__vitePreload as aq,createSvgIconFromTree as ar,FormSelect as as,Section as at,useFieldArray as au,deepMerge as av,create as aw,immer as ax,useLocation as ay,MixedText as az,apiClient as b,Underlay as b$,useField as b0,Field as b1,useResendVerificationEmail as b2,useUser as b3,useUploadAvatar as b4,useRemoveAvatar as b5,commonjsGlobal as b6,getDefaultExportFromCjs as b7,FileTypeIcon as b8,useProducts as b9,Navbar as bA,secureFilesSvg as bB,enableMapSet as bC,getAxiosErrorMessage as bD,useFileUploadStore as bE,getActiveWorkspaceId as bF,UploadedFile as bG,openUploadWindow as bH,AdHost as bI,ProgressBarBase as bJ,WorkspaceQueryKeys as bK,useActiveWorkspaceId as bL,PersonalWorkspace as bM,ExitToAppIcon as bN,useUserWorkspaces as bO,useActiveWorkspace as bP,CustomMenuItem as bQ,useSearchParams as bR,shallowEqual as bS,ContextMenu as bT,useMediaQuery as bU,CheckCircleIcon as bV,axios$1 as bW,useClipboard as bX,$14e0f24ef4ac5c92$export$461939dd4422153 as bY,$14e0f24ef4ac5c92$export$aa8b41735afcabd2 as bZ,ComboBoxForwardRef as b_,FormattedPrice as ba,useActiveUpload as bb,UploadInputType as bc,Disk as bd,WarningIcon as be,$c87311424ea30a05$export$9ac100e40613ea10 as bf,KeyboardArrowDownIcon as bg,useCustomPage as bh,PageMetaTags as bi,PageStatus as bj,FormProvider as bk,useCollator as bl,loadFonts as bm,FormattedRelativeTime as bn,openDialog as bo,closeDialog as bp,useRoutes as bq,AuthRoute as br,NotFoundPage as bs,QueryObserver as bt,infiniteQueryBehavior as bu,hasNextPage as bv,hasPreviousPage as bw,useBaseQuery as bx,getFromLocalStorage as by,useAuth as bz,clsx$1 as c,DarkModeIcon as c$,$14e0f24ef4ac5c92$export$42c81a444fbfb5d4 as c0,$14e0f24ef4ac5c92$export$ef8b6d9133084f4e as c1,$14e0f24ef4ac5c92$export$a5a3b454ada2268e as c2,$14e0f24ef4ac5c92$export$a2258d9c4118825c as c3,$14e0f24ef4ac5c92$export$f91e89d3d0406102 as c4,$14e0f24ef4ac5c92$export$8b7aa55c66d5569e as c5,$9bf71ea28793e738$export$c5251b9e124bf29 as c6,$35ea8db9cb2ccb90$export$99faa760c7908e4f as c7,useUserTimezone as c8,$11d87f3f76e88657$export$84c95a83c799e074 as c9,isAbsoluteUrl as cA,getAugmentedNamespace as cB,shimExports as cC,copyToClipboard as cD,ReactDOM as cE,URL$1 as cF,Footer as cG,BillingCycleRadio as cH,findBestPrice as cI,FormattedCurrency as cJ,Routes as cK,Route as cL,$1dbecbe27a04f9af$export$14d238f342723f25 as cM,$9daab02d461809db$export$683480f191c0e3ea as cN,removeFromLocalStorage as cO,LocaleSwitcher as cP,ProductFeatureList as cQ,$fb18d541ea1ad717$export$ad991b66133851cf as cR,useThemeSelector as cS,lazyLoader as cT,useCallbackRef as cU,AccountCircleIcon as cV,AddAPhotoIcon as cW,ApiIcon as cX,CheckBoxOutlineBlankIcon as cY,ComputerIcon as cZ,DangerousIcon as c_,$14e0f24ef4ac5c92$export$a75f2bff57811055 as ca,$14e0f24ef4ac5c92$export$5c333a116e949cdd as cb,$14e0f24ef4ac5c92$export$ea39ec197993aef0 as cc,$11d87f3f76e88657$export$93522d1a439f3617 as cd,$14e0f24ef4ac5c92$export$a18c89cbd24170ff as ce,useSelectedLocale as cf,useDateFormatter as cg,$6c7bd7858deea686$export$cd11ab140839f11d as ch,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3 as ci,$14e0f24ef4ac5c92$export$b2f4953d301981d5 as cj,$14e0f24ef4ac5c92$export$5412ac11713b72ad as ck,$14e0f24ef4ac5c92$export$2061056d06d7cdf7 as cl,$14e0f24ef4ac5c92$export$629b0a497aa65267 as cm,$14e0f24ef4ac5c92$export$ccc1b2479e7dd654 as cn,$fae977aafc393c5c$export$5adfdab05168c219 as co,useAutoFocus as cp,$fae977aafc393c5c$export$8e384432362ed0f0 as cq,$7215afc6de606d6b$export$de79e2c695e052f3 as cr,useIsDarkMode as cs,$e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as ct,AvatarPlaceholderIcon as cu,useListbox as cv,Listbox as cw,Popover as cx,useListboxKeyboardNavigation as cy,reactDomExports as cz,useLocalStorage as d,DevicesIcon as d0,ErrorOutlineIcon as d1,FileDownloadDoneIcon as d2,ForumIcon as d3,GroupAddIcon as d4,LanguageIcon as d5,LightModeIcon as d6,LightbulbIcon as d7,LockIcon as d8,MenuIcon as d9,NotificationsIcon as da,PaymentsIcon as db,PeopleIcon as dc,PersonIcon as dd,PhonelinkLockIcon as de,SettingsIcon as df,SmartphoneIcon as dg,TabletIcon as dh,elementToTree as di,EnvatoIcon as dj,FacebookIcon as dk,TwitterIcon as dl,useIsMobileMediaQuery as e,useNumberFormatter as f,IconButton as g,createSvgIcon as h,$9bf71ea28793e738$export$20e40289641fbbb6 as i,jsxRuntimeExports as j,keepPreviousData as k,$9bf71ea28793e738$export$10c5169755ce7bd7 as l,message as m,ArrowDropDownIcon as n,m$1 as o,useDialogContext as p,DialogHeader as q,reactExports as r,setInLocalStorage as s,DialogBody as t,useSettings as u,useForm as v,Checkbox as w,DialogTrigger as x,useTrans as y,TextField as z}; //# sourceMappingURL=main-d4af3e3c.js.map