JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "main-96065a7f.js"

Full Path: /home/markqprx/iniasli.pro/public/build/assets/main-96065a7f.js
File size: 1006.15 KB
MIME-type: text/plain
Charset: utf-8

var Yn=Object.defineProperty;var Xn=(s,i,a)=>i in s?Yn(s,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[i]=a;var Ft=(s,i,a)=>(Xn(s,typeof i!="symbol"?i+"":i,a),a),Sn=(s,i,a)=>{if(!i.has(s))throw TypeError("Cannot "+a)};var yt=(s,i,a)=>(Sn(s,i,"read from private field"),a?a.call(s):i.get(s)),Nt=(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)},It=(s,i,a,c)=>(Sn(s,i,"write to private field"),c?c.call(s,a):i.set(s,a),a);var gn=(s,i,a,c)=>({set _(d){It(s,i,d,a)},get _(){return yt(s,i,c)}}),Vt=(s,i,a)=>(Sn(s,i,"access private method"),a);function _mergeNamespaces(s,i){for(var a=0;a<i.length;a++){const c=i[a];if(typeof c!="string"&&!Array.isArray(c)){for(const d in c)if(d!=="default"&&!(d in s)){const g=Object.getOwnPropertyDescriptor(c,d);g&&Object.defineProperty(s,d,g.get?g:{enumerable:!0,get:()=>c[d]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}const 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 $=g.endsWith(".css"),j=$?'[rel="stylesheet"]':"";if(!!c)for(let et=d.length-1;et>=0;et--){const tt=d[et];if(tt.href===g&&(!$||tt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${j}`))return;const _e=document.createElement("link");if(_e.rel=$?"stylesheet":scriptRel,$||(_e.as="script",_e.crossOrigin=""),_e.href=g,document.head.appendChild(_e),$)return new Promise((et,tt)=>{_e.addEventListener("load",et),_e.addEventListener("error",()=>tt(new Error(`Unable to preload CSS for ${g}`)))})})).then(()=>i()).catch(g=>{const $=new Event("vite:preloadError",{cancelable:!0});if($.payload=g,window.dispatchEvent($),!$.defaultPrevented)throw g})};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,$=null;if(i!=null)for(c in i.ref!==void 0&&($=i.ref),i.key!==void 0&&(g=""+i.key),i)J.call(i,c)&&!L$1.hasOwnProperty(c)&&(d[c]=i[c]);var j=arguments.length-2;if(j===1)d.children=a;else if(1<j){for(var _=Array(j),_e=0;_e<j;_e++)_[_e]=arguments[_e+2];d.children=_}if(s&&s.defaultProps)for(c in j=s.defaultProps,j)d[c]===void 0&&(d[c]=j[c]);return{$$typeof:l$2,type:s,key:g,ref:$,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$1(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$1(""+s.key):i.toString(36)}function R$1(s,i,a,c,d){var g=typeof s;(g==="undefined"||g==="boolean")&&(s=null);var $=!1;if(s===null)$=!0;else switch(g){case"string":case"number":$=!0;break;case"object":switch(s.$$typeof){case l$2:case n$3:$=!0}}if($)return $=s,d=d($),s=c===""?"."+Q$1($,0):c,I$1(d)?(a="",s!=null&&(a=s.replace(P$1,"$&/")+"/"),R$1(d,i,a,"",function(_e){return _e})):d!=null&&(O$1(d)&&(d=N$1(d,a+(!d.key||$&&$.key===d.key?"":(""+d.key).replace(P$1,"$&/")+"/")+s)),i.push(d)),1;if($=0,c=c===""?".":c+":",I$1(s))for(var j=0;j<s.length;j++){g=s[j];var _=c+Q$1(g,j);$+=R$1(g,i,a,_,d)}else if(_=A$1(s),typeof _=="function")for(s=_.call(s),j=0;!(g=s.next()).done;)g=g.value,_=c+Q$1(g,j++),$+=R$1(g,i,a,_,d);else if(g==="object")throw i=String(s),Error("Objects are not valid as a React child (found: "+(i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return $}function S$1(s,i,a){if(s==null)return s;var c=[],d=0;return R$1(s,c,"","",function(g){return i.call(a,g,d++)}),c}function T$1(s){if(s._status===-1){var i=s._result;i=i(),i.then(function(a){(s._status===0||s._status===-1)&&(s._status=1,s._result=a)},function(a){(s._status===0||s._status===-1)&&(s._status=2,s._result=a)}),s._status===-1&&(s._status=0,s._result=i)}if(s._status===1)return s._result.default;throw s._result}var U$1={current:null},V$1={transition:null},W$1={ReactCurrentDispatcher:U$1,ReactCurrentBatchConfig:V$1,ReactCurrentOwner:K$1};react_production_min.Children={map:S$1,forEach:function(s,i,a){S$1(s,function(){i.apply(this,arguments)},a)},count:function(s){var i=0;return S$1(s,function(){i++}),i},toArray:function(s){return S$1(s,function(i){return i})||[]},only:function(s){if(!O$1(s))throw Error("React.Children.only expected to receive a single React element child.");return s}};react_production_min.Component=E$1;react_production_min.Fragment=p$4;react_production_min.Profiler=r$5;react_production_min.PureComponent=G$1;react_production_min.StrictMode=q$3;react_production_min.Suspense=w$1;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W$1;react_production_min.cloneElement=function(s,i,a){if(s==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+s+".");var c=C$1({},s.props),d=s.key,g=s.ref,$=s._owner;if(i!=null){if(i.ref!==void 0&&(g=i.ref,$=K$1.current),i.key!==void 0&&(d=""+i.key),s.type&&s.type.defaultProps)var j=s.type.defaultProps;for(_ in i)J.call(i,_)&&!L$1.hasOwnProperty(_)&&(c[_]=i[_]===void 0&&j!==void 0?j[_]:i[_])}var _=arguments.length-2;if(_===1)c.children=a;else if(1<_){j=Array(_);for(var _e=0;_e<_;_e++)j[_e]=arguments[_e+2];c.children=j}return{$$typeof:l$2,type:s.type,key:d,ref:g,props:c,_owner:$}};react_production_min.createContext=function(s){return s={$$typeof:u$2,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},s.Provider={$$typeof:t$2,_context:s},s.Consumer=s};react_production_min.createElement=M$1;react_production_min.createFactory=function(s){var i=M$1.bind(null,s);return i.type=s,i};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(s){return{$$typeof:v$2,render:s}};react_production_min.isValidElement=O$1;react_production_min.lazy=function(s){return{$$typeof:y,_payload:{_status:-1,_result:s},_init:T$1}};react_production_min.memo=function(s,i){return{$$typeof:x,type:s,compare:i===void 0?null:i}};react_production_min.startTransition=function(s){var i=V$1.transition;V$1.transition={};try{s()}finally{V$1.transition=i}};react_production_min.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};react_production_min.useCallback=function(s,i){return U$1.current.useCallback(s,i)};react_production_min.useContext=function(s){return U$1.current.useContext(s)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(s){return U$1.current.useDeferredValue(s)};react_production_min.useEffect=function(s,i){return U$1.current.useEffect(s,i)};react_production_min.useId=function(){return U$1.current.useId()};react_production_min.useImperativeHandle=function(s,i,a){return U$1.current.useImperativeHandle(s,i,a)};react_production_min.useInsertionEffect=function(s,i){return U$1.current.useInsertionEffect(s,i)};react_production_min.useLayoutEffect=function(s,i){return U$1.current.useLayoutEffect(s,i)};react_production_min.useMemo=function(s,i){return U$1.current.useMemo(s,i)};react_production_min.useReducer=function(s,i,a){return U$1.current.useReducer(s,i,a)};react_production_min.useRef=function(s){return U$1.current.useRef(s)};react_production_min.useState=function(s){return U$1.current.useState(s)};react_production_min.useSyncExternalStore=function(s,i,a){return U$1.current.useSyncExternalStore(s,i,a)};react_production_min.useTransition=function(){return U$1.current.useTransition()};react_production_min.version="18.2.0";react.exports=react_production_min;var reactExports=react.exports;const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);/**
 * @license React
 * react-jsx-runtime.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 f=reactExports,k$1=Symbol.for("react.element"),l$1=Symbol.for("react.fragment"),m$3=Object.prototype.hasOwnProperty,n$2=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p$3={key:!0,ref:!0,__self:!0,__source:!0};function q$2(s,i,a){var c,d={},g=null,$=null;a!==void 0&&(g=""+a),i.key!==void 0&&(g=""+i.key),i.ref!==void 0&&($=i.ref);for(c in i)m$3.call(i,c)&&!p$3.hasOwnProperty(c)&&(d[c]=i[c]);if(s&&s.defaultProps)for(c in i=s.defaultProps,i)d[c]===void 0&&(d[c]=i[c]);return{$$typeof:k$1,type:s,key:g,ref:$,props:d,_owner:n$2.current}}reactJsxRuntime_production_min.Fragment=l$1;reactJsxRuntime_production_min.jsx=q$2;reactJsxRuntime_production_min.jsxs=q$2;jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports;const app$1="";/**
 * @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<arguments.length;i++){var a=arguments[i];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c])}return s},_extends$2.apply(this,arguments)}var Action;(function(s){s.Pop="POP",s.Push="PUSH",s.Replace="REPLACE"})(Action||(Action={}));const PopStateEventType="popstate";function createBrowserHistory(s){s===void 0&&(s={});function i(c,d){let{pathname:g,search:$,hash:j}=c.location;return createLocation("",{pathname:g,search:$,hash:j},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function a(c,d){return typeof d=="string"?d:createPath(d)}return getUrlBasedHistory(i,a,null,s)}function invariant$1(s,i){if(s===!1||s===null||typeof s>"u")throw new Error(i)}function warning$1(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,$=d.history,j=Action.Pop,_=null,_e=et();_e==null&&(_e=0,$.replaceState(_extends$2({},$.state,{idx:_e}),""));function et(){return($.state||{idx:null}).idx}function tt(){j=Action.Pop;let ct=et(),it=ct==null?null:ct-_e;_e=ct,_&&_({action:j,location:lt.location,delta:it})}function rt(ct,it){j=Action.Push;let st=createLocation(lt.location,ct,it);a&&a(st,ct),_e=et()+1;let at=getHistoryState(st,_e),ut=lt.createHref(st);try{$.pushState(at,"",ut)}catch(dt){if(dt instanceof DOMException&&dt.name==="DataCloneError")throw dt;d.location.assign(ut)}g&&_&&_({action:j,location:lt.location,delta:1})}function nt(ct,it){j=Action.Replace;let st=createLocation(lt.location,ct,it);a&&a(st,ct),_e=et();let at=getHistoryState(st,_e),ut=lt.createHref(st);$.replaceState(at,"",ut),g&&_&&_({action:j,location:lt.location,delta:0})}function ot(ct){let it=d.location.origin!=="null"?d.location.origin:d.location.href,st=typeof ct=="string"?ct:createPath(ct);return invariant$1(it,"No window.location.(origin|href) available to create URL for href: "+st),new URL(st,it)}let lt={get action(){return j},get location(){return s(d,$)},listen(ct){if(_)throw new Error("A history only accepts one active listener");return d.addEventListener(PopStateEventType,tt),_=ct,()=>{d.removeEventListener(PopStateEventType,tt),_=null}},createHref(ct){return i(d,ct)},createURL:ot,encodeLocation(ct){let it=ot(ct);return{pathname:it.pathname,search:it.search,hash:it.hash}},push:rt,replace:nt,go(ct){return $.go(ct)}};return lt}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 $=null;for(let j=0;$==null&&j<g.length;++j)$=matchRouteBranch(g[j],safelyDecodeURI(d));return $}function flattenRoutes(s,i,a,c){i===void 0&&(i=[]),a===void 0&&(a=[]),c===void 0&&(c="");let d=(g,$,j)=>{let _={relativePath:j===void 0?g.path||"":j,caseSensitive:g.caseSensitive===!0,childrenIndex:$,route:g};_.relativePath.startsWith("/")&&(invariant$1(_.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 _e=joinPaths([c,_.relativePath]),et=a.concat(_);g.children&&g.children.length>0&&(invariant$1(g.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+_e+'".')),flattenRoutes(g.children,i,et,_e)),!(g.path==null&&!g.index)&&i.push({path:_e,score:computeScore(_e,g.index),routesMeta:et})};return s.forEach((g,$)=>{var j;if(g.path===""||!((j=g.path)!=null&&j.includes("?")))d(g,$);else for(let _ of explodeOptionalSegments(g.path))d(g,$,_)}),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 $=explodeOptionalSegments(c.join("/")),j=[];return j.push(...$.map(_=>_===""?g:[g,_].join("/"))),d&&j.push(...$),j.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 $=0;$<a.length;++$){let j=a[$],_=$===a.length-1,_e=d==="/"?i:i.slice(d.length)||"/",et=matchPath({path:j.relativePath,caseSensitive:j.caseSensitive,end:_},_e);if(!et)return null;Object.assign(c,et.params);let tt=j.route;g.push({params:c,pathname:joinPaths([d,et.pathname]),pathnameBase:normalizePathname(joinPaths([d,et.pathnameBase])),route:tt}),et.pathnameBase!=="/"&&(d=joinPaths([d,et.pathnameBase]))}return g}function matchPath(s,i){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[a,c]=compilePath(s.path,s.caseSensitive,s.end),d=i.match(a);if(!d)return null;let g=d[0],$=g.replace(/(.)\/+$/,"$1"),j=d.slice(1);return{params:c.reduce((_e,et,tt)=>{let{paramName:rt,isOptional:nt}=et;if(rt==="*"){let lt=j[tt]||"";$=g.slice(0,g.length-lt.length).replace(/(.)\/+$/,"$1")}const ot=j[tt];return nt&&!ot?_e[rt]=void 0:_e[rt]=safelyDecodeURIComponent(ot||"",rt),_e},{}),pathname:g,pathnameBase:$,pattern:s}}function compilePath(s,i,a){i===void 0&&(i=!1),a===void 0&&(a=!0),warning$1(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,($,j,_)=>(c.push({paramName:j,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(!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(!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 <Link to="..."> 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$1(!d.pathname||!d.pathname.includes("?"),getInvalidPathError("?","pathname","search",d)),invariant$1(!d.pathname||!d.pathname.includes("#"),getInvalidPathError("#","pathname","hash",d)),invariant$1(!d.search||!d.search.includes("#"),getInvalidPathError("#","search","hash",d)));let g=s===""||d.pathname==="",$=g?"/":d.pathname,j;if(c||$==null)j=a;else{let tt=i.length-1;if($.startsWith("..")){let rt=$.split("/");for(;rt[0]==="..";)rt.shift(),tt-=1;d.pathname=rt.join("/")}j=tt>=0?i[tt]:"/"}let _=resolvePath(d,j),_e=$&&$!=="/"&&$.endsWith("/"),et=(g||$===".")&&a.endsWith("/");return!_.pathname.endsWith("/")&&(_e||et)&&(_.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<arguments.length;i++){var a=arguments[i];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c])}return s},_extends$1.apply(this,arguments)}const DataRouterContext=reactExports.createContext(null),DataRouterStateContext=reactExports.createContext(null),NavigationContext=reactExports.createContext(null),LocationContext=reactExports.createContext(null),RouteContext=reactExports.createContext({outlet:null,matches:[],isDataRoute:!1}),RouteErrorContext=reactExports.createContext(null);function useHref(s,i){let{relative:a}=i===void 0?{}:i;useInRouterContext()||invariant$1(!1);let{basename:c,navigator:d}=reactExports.useContext(NavigationContext),{hash:g,pathname:$,search:j}=useResolvedPath(s,{relative:a}),_=$;return c!=="/"&&(_=$==="/"?c:joinPaths([c,$])),d.createHref({pathname:_,search:j,hash:g})}function useInRouterContext(){return reactExports.useContext(LocationContext)!=null}function useLocation(){return useInRouterContext()||invariant$1(!1),reactExports.useContext(LocationContext).location}function useIsomorphicLayoutEffect$1(s){reactExports.useContext(NavigationContext).static||reactExports.useLayoutEffect(s)}function useNavigate$1(){let{isDataRoute:s}=reactExports.useContext(RouteContext);return s?useNavigateStable():useNavigateUnstable()}function useNavigateUnstable(){useInRouterContext()||invariant$1(!1);let s=reactExports.useContext(DataRouterContext),{basename:i,navigator:a}=reactExports.useContext(NavigationContext),{matches:c}=reactExports.useContext(RouteContext),{pathname:d}=useLocation(),g=JSON.stringify(getPathContributingMatches(c).map(_=>_.pathnameBase)),$=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{$.current=!0}),reactExports.useCallback(function(_,_e){if(_e===void 0&&(_e={}),!$.current)return;if(typeof _=="number"){a.go(_);return}let et=resolveTo(_,JSON.parse(g),d,_e.relative==="path");s==null&&i!=="/"&&(et.pathname=et.pathname==="/"?i:joinPaths([i,et.pathname])),(_e.replace?a.replace:a.push)(et,_e.state,_e)},[i,a,g,d,s])}const OutletContext=reactExports.createContext(null);function useOutletContext(){return reactExports.useContext(OutletContext)}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($=>$.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(!1);let{navigator:c}=reactExports.useContext(NavigationContext),{matches:d}=reactExports.useContext(RouteContext),g=d[d.length-1],$=g?g.params:{};g&&g.pathname;let j=g?g.pathnameBase:"/";g&&g.route;let _=useLocation(),_e;if(i){var et;let lt=typeof i=="string"?parsePath$1(i):i;j==="/"||(et=lt.pathname)!=null&&et.startsWith(j)||invariant$1(!1),_e=lt}else _e=_;let tt=_e.pathname||"/",rt=j==="/"?tt:tt.slice(j.length)||"/",nt=matchRoutes(s,{pathname:rt}),ot=_renderMatches(nt&&nt.map(lt=>Object.assign({},lt,{params:Object.assign({},$,lt.params),pathname:joinPaths([j,c.encodeLocation?c.encodeLocation(lt.pathname).pathname:lt.pathname]),pathnameBase:lt.pathnameBase==="/"?j:joinPaths([j,c.encodeLocation?c.encodeLocation(lt.pathnameBase).pathname:lt.pathnameBase])})),d,a);return i&&ot?reactExports.createElement(LocationContext.Provider,{value:{location:_extends$1({pathname:"/",search:"",hash:"",state:null,key:"default"},_e),navigationType:Action.Pop}},ot):ot}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,$=(c=a)==null?void 0:c.errors;if($!=null){let j=g.findIndex(_=>_.route.id&&($==null?void 0:$[_.route.id]));j>=0||invariant$1(!1),g=g.slice(0,Math.min(g.length,j+1))}return g.reduceRight((j,_,_e)=>{let et=_.route.id?$==null?void 0:$[_.route.id]:null,tt=null;a&&(tt=_.route.errorElement||defaultErrorElement);let rt=i.concat(g.slice(0,_e+1)),nt=()=>{let ot;return et?ot=tt:_.route.Component?ot=reactExports.createElement(_.route.Component,null):_.route.element?ot=_.route.element:ot=j,reactExports.createElement(RenderedRoute,{match:_,routeContext:{outlet:j,matches:rt,isDataRoute:a!=null},children:ot})};return a&&(_.route.ErrorBoundary||_.route.errorElement||_e===0)?reactExports.createElement(RenderErrorBoundary,{location:a.location,revalidation:a.revalidation,component:tt,error:et,children:nt(),routeContext:{outlet:null,matches:rt,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(!1),i}function useDataRouterState(s){let i=reactExports.useContext(DataRouterStateContext);return i||invariant$1(!1),i}function useRouteContext(s){let i=reactExports.useContext(RouteContext);return i||invariant$1(!1),i}function useCurrentRouteId(s){let i=useRouteContext(),a=i.matches[i.matches.length-1];return a.route.id||invariant$1(!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$1(()=>{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(!1);let{matches:g}=reactExports.useContext(RouteContext),{pathname:$}=useLocation(),j=useNavigate$1(),_=resolveTo(i,getPathContributingMatches(g).map(et=>et.pathnameBase),$,d==="path"),_e=JSON.stringify(_);return reactExports.useEffect(()=>j(JSON.parse(_e),{replace:a,state:c,relative:d}),[j,_e,d,a,c]),null}function Outlet(s){return useOutlet(s.context)}function Route(s){invariant$1(!1)}function Router(s){let{basename:i="/",children:a=null,location:c,navigationType:d=Action.Pop,navigator:g,static:$=!1}=s;useInRouterContext()&&invariant$1(!1);let j=i.replace(/^\/*/,"/"),_=reactExports.useMemo(()=>({basename:j,navigator:g,static:$}),[j,g,$]);typeof c=="string"&&(c=parsePath$1(c));let{pathname:_e="/",search:et="",hash:tt="",state:rt=null,key:nt="default"}=c,ot=reactExports.useMemo(()=>{let lt=stripBasename(_e,j);return lt==null?null:{location:{pathname:lt,search:et,hash:tt,state:rt,key:nt},navigationType:d}},[j,_e,et,tt,rt,nt,d]);return ot==null?null:reactExports.createElement(NavigationContext.Provider,{value:_},reactExports.createElement(LocationContext.Provider,{children:a,value:ot}))}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(!1),!c.props.index||!c.props.children||invariant$1(!1);let $={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&&($.children=createRoutesFromChildren(c.props.children,g)),a.push($)}),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<arguments.length;i++){var a=arguments[i];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(s[c]=a[c])}return s},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(s,i){if(s==null)return{};var a={},c=Object.keys(s),d,g;for(g=0;g<c.length;g++)d=c[g],!(i.indexOf(d)>=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 $=g.current,[j,_]=reactExports.useState({action:$.action,location:$.location}),{v7_startTransition:_e}=c||{},et=reactExports.useCallback(tt=>{_e&&startTransitionImpl?startTransitionImpl(()=>_(tt)):_(tt)},[_,_e]);return reactExports.useLayoutEffect(()=>$.listen(et),[$,et]),reactExports.createElement(Router,{basename:i,children:a,location:j.location,navigationType:j.action,navigator:$})}const isBrowser$1=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:$,state:j,target:_,to:_e,preventScrollReset:et,unstable_viewTransition:tt}=i,rt=_objectWithoutPropertiesLoose(i,_excluded),{basename:nt}=reactExports.useContext(NavigationContext),ot,lt=!1;if(typeof _e=="string"&&ABSOLUTE_URL_REGEX.test(_e)&&(ot=_e,isBrowser$1))try{let at=new URL(window.location.href),ut=_e.startsWith("//")?new URL(at.protocol+_e):new URL(_e),dt=stripBasename(ut.pathname,nt);ut.origin===at.origin&&dt!=null?_e=dt+ut.search+ut.hash:lt=!0}catch{}let ct=useHref(_e,{relative:d}),it=useLinkClickHandler(_e,{replace:$,state:j,target:_,preventScrollReset:et,relative:d,unstable_viewTransition:tt});function st(at){c&&c(at),at.defaultPrevented||it(at)}return reactExports.createElement("a",_extends({},rt,{href:ot||ct,onClick:lt||g?c:st,ref:a,target:_}))}),NavLink=reactExports.forwardRef(function(i,a){let{"aria-current":c="page",caseSensitive:d=!1,className:g="",end:$=!1,style:j,to:_,unstable_viewTransition:_e,children:et}=i,tt=_objectWithoutPropertiesLoose(i,_excluded2),rt=useResolvedPath(_,{relative:tt.relative}),nt=useLocation(),ot=reactExports.useContext(DataRouterStateContext),{navigator:lt}=reactExports.useContext(NavigationContext),ct=ot!=null&&useViewTransitionState(rt)&&_e===!0,it=lt.encodeLocation?lt.encodeLocation(rt).pathname:rt.pathname,st=nt.pathname,at=ot&&ot.navigation&&ot.navigation.location?ot.navigation.location.pathname:null;d||(st=st.toLowerCase(),at=at?at.toLowerCase():null,it=it.toLowerCase());let ut=st===it||!$&&st.startsWith(it)&&st.charAt(it.length)==="/",dt=at!=null&&(at===it||!$&&at.startsWith(it)&&at.charAt(it.length)==="/"),mt={isActive:ut,isPending:dt,isTransitioning:ct},ht=ut?c:void 0,xt;typeof g=="function"?xt=g(mt):xt=[g,ut?"active":null,dt?"pending":null,ct?"transitioning":null].filter(Boolean).join(" ");let wt=typeof j=="function"?j(mt):j;return reactExports.createElement(Link,_extends({},tt,{"aria-current":ht,className:xt,ref:a,style:wt,to:_,unstable_viewTransition:_e}),typeof et=="function"?et(mt):et)});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(!1),i}function useLinkClickHandler(s,i){let{target:a,replace:c,state:d,preventScrollReset:g,relative:$,unstable_viewTransition:j}=i===void 0?{}:i,_=useNavigate$1(),_e=useLocation(),et=useResolvedPath(s,{relative:$});return reactExports.useCallback(tt=>{if(shouldProcessLinkClick(tt,a)){tt.preventDefault();let rt=c!==void 0?c:createPath(_e)===createPath(et);_(s,{replace:rt,state:d,preventScrollReset:g,relative:$,unstable_viewTransition:j})}},[_e,_,et,c,d,a,s,g,$,j])}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(),$=reactExports.useCallback((j,_)=>{const _e=createSearchParams(typeof j=="function"?j(d):j);a.current=!0,g("?"+_e,_)},[g,d]);return[d,$]}function useViewTransitionState(s,i){i===void 0&&(i={});let a=reactExports.useContext(ViewTransitionContext);a==null&&invariant$1(!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,$=stripBasename(a.nextLocation.pathname,c)||a.nextLocation.pathname;return matchPath(d.pathname,$)!=null||matchPath(d.pathname,g)!=null}var reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};/**
 * @license React
 * scheduler.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.
 */(function(s){function i($t,kt){var Tt=$t.length;$t.push(kt);e:for(;0<Tt;){var At=Tt-1>>>1,Lt=$t[At];if(0<d(Lt,kt))$t[At]=kt,$t[Tt]=Lt,Tt=At;else break e}}function a($t){return $t.length===0?null:$t[0]}function c($t){if($t.length===0)return null;var kt=$t[0],Tt=$t.pop();if(Tt!==kt){$t[0]=Tt;e:for(var At=0,Lt=$t.length,Bt=Lt>>>1;At<Bt;){var zt=2*(At+1)-1,Xt=$t[zt],Ut=zt+1,Gt=$t[Ut];if(0>d(Xt,Tt))Ut<Lt&&0>d(Gt,Xt)?($t[At]=Gt,$t[Ut]=Tt,At=Ut):($t[At]=Xt,$t[zt]=Tt,At=zt);else if(Ut<Lt&&0>d(Gt,Tt))$t[At]=Gt,$t[Ut]=Tt,At=Ut;else break e}}return kt}function d($t,kt){var Tt=$t.sortIndex-kt.sortIndex;return Tt!==0?Tt:$t.id-kt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;s.unstable_now=function(){return g.now()}}else{var $=Date,j=$.now();s.unstable_now=function(){return $.now()-j}}var _=[],_e=[],et=1,tt=null,rt=3,nt=!1,ot=!1,lt=!1,ct=typeof setTimeout=="function"?setTimeout:null,it=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 at($t){for(var kt=a(_e);kt!==null;){if(kt.callback===null)c(_e);else if(kt.startTime<=$t)c(_e),kt.sortIndex=kt.expirationTime,i(_,kt);else break;kt=a(_e)}}function ut($t){if(lt=!1,at($t),!ot)if(a(_)!==null)ot=!0,Et(dt);else{var kt=a(_e);kt!==null&&St(ut,kt.startTime-$t)}}function dt($t,kt){ot=!1,lt&&(lt=!1,it(xt),xt=-1),nt=!0;var Tt=rt;try{for(at(kt),tt=a(_);tt!==null&&(!(tt.expirationTime>kt)||$t&&!Ct());){var At=tt.callback;if(typeof At=="function"){tt.callback=null,rt=tt.priorityLevel;var Lt=At(tt.expirationTime<=kt);kt=s.unstable_now(),typeof Lt=="function"?tt.callback=Lt:tt===a(_)&&c(_),at(kt)}else c(_);tt=a(_)}if(tt!==null)var Bt=!0;else{var zt=a(_e);zt!==null&&St(ut,zt.startTime-kt),Bt=!1}return Bt}finally{tt=null,rt=Tt,nt=!1}}var mt=!1,ht=null,xt=-1,wt=5,Rt=-1;function Ct(){return!(s.unstable_now()-Rt<wt)}function gt(){if(ht!==null){var $t=s.unstable_now();Rt=$t;var kt=!0;try{kt=ht(!0,$t)}finally{kt?ft():(mt=!1,ht=null)}}else mt=!1}var ft;if(typeof st=="function")ft=function(){st(gt)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,bt=pt.port2;pt.port1.onmessage=gt,ft=function(){bt.postMessage(null)}}else ft=function(){ct(gt,0)};function Et($t){ht=$t,mt||(mt=!0,ft())}function St($t,kt){xt=ct(function(){$t(s.unstable_now())},kt)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function($t){$t.callback=null},s.unstable_continueExecution=function(){ot||nt||(ot=!0,Et(dt))},s.unstable_forceFrameRate=function($t){0>$t||125<$t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):wt=0<$t?Math.floor(1e3/$t):5},s.unstable_getCurrentPriorityLevel=function(){return rt},s.unstable_getFirstCallbackNode=function(){return a(_)},s.unstable_next=function($t){switch(rt){case 1:case 2:case 3:var kt=3;break;default:kt=rt}var Tt=rt;rt=kt;try{return $t()}finally{rt=Tt}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function($t,kt){switch($t){case 1:case 2:case 3:case 4:case 5:break;default:$t=3}var Tt=rt;rt=$t;try{return kt()}finally{rt=Tt}},s.unstable_scheduleCallback=function($t,kt,Tt){var At=s.unstable_now();switch(typeof Tt=="object"&&Tt!==null?(Tt=Tt.delay,Tt=typeof Tt=="number"&&0<Tt?At+Tt:At):Tt=At,$t){case 1:var Lt=-1;break;case 2:Lt=250;break;case 5:Lt=1073741823;break;case 4:Lt=1e4;break;default:Lt=5e3}return Lt=Tt+Lt,$t={id:et++,callback:kt,priorityLevel:$t,startTime:Tt,expirationTime:Lt,sortIndex:-1},Tt>At?($t.sortIndex=Tt,i(_e,$t),a(_)===null&&$t===a(_e)&&(lt?(it(xt),xt=-1):lt=!0,St(ut,Tt-At))):($t.sortIndex=Lt,i(_,$t),ot||nt||(ot=!0,Et(dt))),$t},s.unstable_shouldYield=Ct,s.unstable_wrapCallback=function($t){var kt=rt;return function(){var Tt=rt;rt=kt;try{return $t.apply(this,arguments)}finally{rt=Tt}}}})(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<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(s,i){ha(s,i),ha(s+"Capture",i)}function ha(s,i){for(ea[s]=i,s=0;s<i.length;s++)da.add(i[s])}var ia=!(typeof window>"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,$){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=$}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<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(qa(i,a,d,c)&&(a=null),c||d===null?oa(i)&&(a===null?s.removeAttribute(i):s.setAttribute(i,""+a)):d.mustUseProperty?s[d.propertyName]=a===null?d.type===3?!1:"":a:(i=d.attributeName,c=d.attributeNamespace,a===null?s.removeAttribute(i):(d=d.type,a=d===3||d===4&&a===!0?"":""+a,c?s.setAttributeNS(c,i,a):s.setAttribute(i,a))))}var ua=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy"),Ia=Symbol.for("react.offscreen"),Ja=Symbol.iterator;function Ka(s){return s===null||typeof s!="object"?null:(s=Ja&&s[Ja]||s["@@iterator"],typeof s=="function"?s:null)}var A=Object.assign,La;function Ma(s){if(La===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);La=i&&i[1]||""}return`
`+La+s}var Na=!1;function Oa(s,i){if(!s||Na)return"";Na=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(_e){var c=_e}Reflect.construct(s,[],i)}else{try{i.call()}catch(_e){c=_e}s.call(i.prototype)}else{try{throw Error()}catch(_e){c=_e}s()}}catch(_e){if(_e&&c&&typeof _e.stack=="string"){for(var d=_e.stack.split(`
`),g=c.stack.split(`
`),$=d.length-1,j=g.length-1;1<=$&&0<=j&&d[$]!==g[j];)j--;for(;1<=$&&0<=j;$--,j--)if(d[$]!==g[j]){if($!==1||j!==1)do if($--,j--,0>j||d[$]!==g[j]){var _=`
`+d[$].replace(" at new "," at ");return s.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",s.displayName)),_}while(1<=$&&0<=j);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($){c=""+$,g.call(this,$)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function($){c=""+$},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<a.length;d++)i["$"+a[d]]=!0;for(a=0;a<s.length;a++)d=i.hasOwnProperty("$"+s[a].value),s[a].selected!==d&&(s[a].selected=d),d&&c&&(s[a].defaultSelected=!0)}else{for(a=""+Sa(a),i=null,d=0;d<s.length;d++){if(s[d].value===a){s[d].selected=!0,c&&(s[d].defaultSelected=!0);return}i!==null||s[d].disabled||(i=s[d])}i!==null&&(i.selected=!0)}}function gb(s,i){if(i.dangerouslySetInnerHTML!=null)throw Error(p$2(91));return A({},i,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function hb(s,i){var a=i.value;if(a==null){if(a=i.children,i=i.defaultValue,a!=null){if(i!=null)throw Error(p$2(92));if(eb(a)){if(1<a.length)throw Error(p$2(93));a=a[0]}i=a}i==null&&(i=""),a=i}s._wrapperState={initialValue:Sa(a)}}function ib(s,i){var a=Sa(i.value),c=Sa(i.defaultValue);a!=null&&(a=""+a,a!==s.value&&(s.value=a),i.defaultValue==null&&s.defaultValue!==a&&(s.defaultValue=a)),c!=null&&(s.defaultValue=""+c)}function jb(s){var i=s.textContent;i===s._wrapperState.initialValue&&i!==""&&i!==null&&(s.value=i)}function kb(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lb(s,i){return s==null||s==="http://www.w3.org/1999/xhtml"?kb(i):s==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var mb,nb=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,a,c,d){MSApp.execUnsafeLocalFunction(function(){return s(i,a,c,d)})}:s}(function(s,i){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=i;else{for(mb=mb||document.createElement("div"),mb.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",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<i.length;s++)Bb(i[s])}}function Gb(s,i){return s(i)}function Hb(){}var Ib=!1;function Jb(s,i,a){if(Ib)return s(i,a);Ib=!0;try{return Gb(s,i,a)}finally{Ib=!1,(zb!==null||Ab!==null)&&(Hb(),Fb())}}function Kb(s,i){var a=s.stateNode;if(a===null)return null;var c=Db(a);if(c===null)return null;a=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(s=s.type,c=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!c;break e;default:s=!1}if(s)return null;if(a&&typeof a!="function")throw Error(p$2(231,i,typeof a));return a}var Lb=!1;if(ia)try{var Mb={};Object.defineProperty(Mb,"passive",{get:function(){Lb=!0}}),window.addEventListener("test",Mb,Mb),window.removeEventListener("test",Mb,Mb)}catch{Lb=!1}function Nb(s,i,a,c,d,g,$,j,_){var _e=Array.prototype.slice.call(arguments,3);try{i.apply(a,_e)}catch(et){this.onError(et)}}var Ob=!1,Pb=null,Qb=!1,Rb=null,Sb={onError:function(s){Ob=!0,Pb=s}};function Tb(s,i,a,c,d,g,$,j,_){Ob=!1,Pb=null,Nb.apply(Sb,arguments)}function Ub(s,i,a,c,d,g,$,j,_){if(Tb.apply(this,arguments),Ob){if(Ob){var _e=Pb;Ob=!1,Pb=null}else throw Error(p$2(198));Qb||(Qb=!0,Rb=_e)}}function Vb(s){var i=s,a=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,i.flags&4098&&(a=i.return),s=i.return;while(s)}return i.tag===3?a:null}function Wb(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function Xb(s){if(Vb(s)!==s)throw Error(p$2(188))}function Yb(s){var i=s.alternate;if(!i){if(i=Vb(s),i===null)throw Error(p$2(188));return i!==s?null:s}for(var a=s,c=i;;){var d=a.return;if(d===null)break;var g=d.alternate;if(g===null){if(c=d.return,c!==null){a=c;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===a)return Xb(d),s;if(g===c)return Xb(d),i;g=g.sibling}throw Error(p$2(188))}if(a.return!==c.return)a=d,c=g;else{for(var $=!1,j=d.child;j;){if(j===a){$=!0,a=d,c=g;break}if(j===c){$=!0,c=d,a=g;break}j=j.sibling}if(!$){for(j=g.child;j;){if(j===a){$=!0,a=g,c=d;break}if(j===c){$=!0,c=g,a=d;break}j=j.sibling}if(!$)throw Error(p$2(189))}}if(a.alternate!==c)throw Error(p$2(190))}if(a.tag!==3)throw Error(p$2(188));return a.stateNode.current===a?s:i}function Zb(s){return s=Yb(s),s!==null?$b(s):null}function $b(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var i=$b(s);if(i!==null)return i;s=s.sibling}return null}var ac=ca.unstable_scheduleCallback,bc=ca.unstable_cancelCallback,cc=ca.unstable_shouldYield,dc=ca.unstable_requestPaint,B=ca.unstable_now,ec=ca.unstable_getCurrentPriorityLevel,fc=ca.unstable_ImmediatePriority,gc=ca.unstable_UserBlockingPriority,hc=ca.unstable_NormalPriority,ic=ca.unstable_LowPriority,jc=ca.unstable_IdlePriority,kc=null,lc=null;function mc(s){if(lc&&typeof lc.onCommitFiberRoot=="function")try{lc.onCommitFiberRoot(kc,s,void 0,(s.current.flags&128)===128)}catch{}}var oc=Math.clz32?Math.clz32:nc,pc=Math.log,qc=Math.LN2;function nc(s){return 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,$=a&268435455;if($!==0){var j=$&~d;j!==0?c=tc(j):(g&=$,g!==0&&(c=tc(g)))}else $=a&~d,$!==0?c=tc($):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;0<i;)a=31-oc(i),d=1<<a,c|=s[a],i&=~d;return c}function vc(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wc(s,i){for(var a=s.suspendedLanes,c=s.pingedLanes,d=s.expirationTimes,g=s.pendingLanes;0<g;){var $=31-oc(g),j=1<<$,_=d[$];_===-1?(!(j&a)||j&c)&&(d[$]=vc(j,i)):_<=i&&(s.expiredLanes|=j),g&=~j}}function xc(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function yc(){var s=rc;return rc<<=1,!(rc&4194240)&&(rc=64),s}function zc(s){for(var i=[],a=0;31>a;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<a;){var d=31-oc(a),g=1<<d;i[d]=0,c[d]=-1,s[d]=-1,a&=~g}}function Cc(s,i){var a=s.entangledLanes|=i;for(s=s.entanglements;a;){var c=31-oc(a),d=1<<c;d&i|s[c]&i&&(s[c]|=i),a&=~d}}var C=0;function Dc(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var Ec,Fc,Gc,Hc,Ic,Jc=!1,Kc=[],Lc=null,Mc=null,Nc=null,Oc=new Map,Pc=new Map,Qc=[],Rc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sc(s,i){switch(s){case"focusin":case"focusout":Lc=null;break;case"dragenter":case"dragleave":Mc=null;break;case"mouseover":case"mouseout":Nc=null;break;case"pointerover":case"pointerout":Oc.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pc.delete(i.pointerId)}}function Tc(s,i,a,c,d,g){return s===null||s.nativeEvent!==g?(s={blockedOn:i,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[d]},i!==null&&(i=Cb(i),i!==null&&Fc(i)),s):(s.eventSystemFlags|=c,i=s.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),s)}function Uc(s,i,a,c,d){switch(i){case"focusin":return Lc=Tc(Lc,s,i,a,c,d),!0;case"dragenter":return Mc=Tc(Mc,s,i,a,c,d),!0;case"mouseover":return Nc=Tc(Nc,s,i,a,c,d),!0;case"pointerover":var g=d.pointerId;return Oc.set(g,Tc(Oc.get(g)||null,s,i,a,c,d)),!0;case"gotpointercapture":return g=d.pointerId,Pc.set(g,Tc(Pc.get(g)||null,s,i,a,c,d)),!0}return!1}function Vc(s){var i=Wc(s.target);if(i!==null){var a=Vb(i);if(a!==null){if(i=a.tag,i===13){if(i=Wb(a),i!==null){s.blockedOn=i,Ic(s.priority,function(){Gc(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){s.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Xc(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var a=Yc(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(a===null){a=s.nativeEvent;var c=new a.constructor(a.type,a);wb=c,a.target.dispatchEvent(c),wb=null}else return i=Cb(a),i!==null&&Fc(i),s.blockedOn=a,!1;i.shift()}return!0}function Zc(s,i,a){Xc(s)&&a.delete(i)}function $c(){Jc=!1,Lc!==null&&Xc(Lc)&&(Lc=null),Mc!==null&&Xc(Mc)&&(Mc=null),Nc!==null&&Xc(Nc)&&(Nc=null),Oc.forEach(Zc),Pc.forEach(Zc)}function ad(s,i){s.blockedOn===i&&(s.blockedOn=null,Jc||(Jc=!0,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,$c)))}function bd(s){function i(d){return ad(d,s)}if(0<Kc.length){ad(Kc[0],s);for(var a=1;a<Kc.length;a++){var c=Kc[a];c.blockedOn===s&&(c.blockedOn=null)}}for(Lc!==null&&ad(Lc,s),Mc!==null&&ad(Mc,s),Nc!==null&&ad(Nc,s),Oc.forEach(i),Pc.forEach(i),a=0;a<Qc.length;a++)c=Qc[a],c.blockedOn===s&&(c.blockedOn=null);for(;0<Qc.length&&(a=Qc[0],a.blockedOn===null);)Vc(a),a.blockedOn===null&&Qc.shift()}var cd=ua.ReactCurrentBatchConfig,dd=!0;function ed(s,i,a,c){var d=C,g=cd.transition;cd.transition=null;try{C=1,fd(s,i,a,c)}finally{C=d,cd.transition=g}}function gd(s,i,a,c){var d=C,g=cd.transition;cd.transition=null;try{C=4,fd(s,i,a,c)}finally{C=d,cd.transition=g}}function fd(s,i,a,c){if(dd){var d=Yc(s,i,a,c);if(d===null)hd(s,i,c,id$1,a),Sc(s,c);else if(Uc(d,s,i,a,c))c.stopPropagation();else if(Sc(s,c),i&4&&-1<Rc.indexOf(s)){for(;d!==null;){var g=Cb(d);if(g!==null&&Ec(g),g=Yc(s,i,a,c),g===null&&hd(s,i,c,id$1,a),g===d)break;d=g}d!==null&&c.stopPropagation()}else hd(s,i,c,null,a)}}var id$1=null;function Yc(s,i,a,c){if(id$1=null,s=xb(c),s=Wc(s),s!==null)if(i=Vb(s),i===null)s=null;else if(a=i.tag,a===13){if(s=Wb(i),s!==null)return s;s=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return id$1=s,null}function jd(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ec()){case fc:return 1;case gc:return 4;case hc:case ic:return 16;case jc:return 536870912;default:return 16}default:return 16}}var kd=null,ld=null,md=null;function nd(){if(md)return md;var s,i=ld,a=i.length,c,d="value"in kd?kd.value:kd.textContent,g=d.length;for(s=0;s<a&&i[s]===d[s];s++);var $=a-s;for(c=1;c<=$&&i[a-c]===d[g-c];c++);return md=d.slice(s,1<c?1-c:void 0)}function od(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function pd(){return!0}function qd(){return!1}function rd(s){function i(a,c,d,g,$){this._reactName=a,this._targetInst=d,this.type=c,this.nativeEvent=g,this.target=$,this.currentTarget=null;for(var j in s)s.hasOwnProperty(j)&&(a=s[j],this[j]=a?a(g):g[j]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?pd:qd,this.isPropagationStopped=qd,this}return A(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),i}var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==yd&&(yd&&s.type==="mousemove"?(wd=s.screenX-yd.screenX,xd=s.screenY-yd.screenY):xd=wd=0,yd=s),wd)},movementY:function(s){return"movementY"in s?s.movementY:xd}}),Bd=rd(Ad),Cd=A({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A({},sd,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=Od[s])?!!i[s]:!1}function zd(){return Pd}var Qd=A({},ud,{key:function(s){if(s.key){var i=Md[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=od(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Nd[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(s){return s.type==="keypress"?od(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?od(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8<be&&11>=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.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return de&&i.locale!=="ko"?null:i.data;default:return null}}var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!le[s.type]:i==="textarea"}function ne(s,i,a,c){Eb(c),i=oe(i,"onChange"),0<i.length&&(a=new td("onChange","change",null,a,c),s.push({event:a,listeners:i}))}var pe=null,qe=null;function re(s){se(s,0)}function te(s){var i=ue(s);if(Wa(i))return s}function ve(s,i){if(s==="change")return i}var we=!1;if(ia){var xe;if(ia){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;"),ye=typeof ze.oninput=="function"}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(s){if(s.propertyName==="value"&&te(qe)){var i=[];ne(i,qe,s,xb(s)),Jb(re,i)}}function Ce(s,i,a){s==="focusin"?(Ae(),pe=i,qe=a,pe.attachEvent("onpropertychange",Be)):s==="focusout"&&Ae()}function De(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return te(qe)}function Ee(s,i){if(s==="click")return te(i)}function Fe(s,i){if(s==="input"||s==="change")return te(i)}function Ge(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var He=typeof Object.is=="function"?Object.is:Ge;function Ie(s,i){if(He(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var a=Object.keys(s),c=Object.keys(i);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var d=a[c];if(!ja.call(i,d)||!He(s[d],i[d]))return!1}return!0}function Je(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ke(s,i){var a=Je(s);s=0;for(var c;a;){if(a.nodeType===3){if(c=s+a.textContent.length,s<=i&&c>=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 $=Ke(a,c);d&&$&&(s.rangeCount!==1||s.anchorNode!==d.node||s.anchorOffset!==d.offset||s.focusNode!==$.node||s.focusOffset!==$.offset)&&(i=i.createRange(),i.setStart(d.node,d.offset),s.removeAllRanges(),g>c?(s.addRange(i),s.extend($.node,$.offset)):(i.setEnd($.node,$.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<i.length;a++)s=i[a],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Pe=ia&&"documentMode"in document&&11>=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"),0<c.length&&(i=new td("onSelect","select",null,i,a),s.push({event:i,listeners:c}),i.target=Qe)))}function Ve(s,i){var a={};return a[s.toLowerCase()]=i.toLowerCase(),a["Webkit"+s]="webkit"+i,a["Moz"+s]="moz"+i,a}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={};ia&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(s){if(Xe[s])return Xe[s];if(!We[s])return s;var i=We[s],a;for(a in i)if(i.hasOwnProperty(a)&&a in Ye)return Xe[s]=i[a];return s}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ff(s,i){df.set(s,i),fa(i,[s])}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf)}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha("onMouseEnter",["mouseout","mouseover"]);ha("onMouseLeave",["mouseout","mouseover"]);ha("onPointerEnter",["pointerout","pointerover"]);ha("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));function nf(s,i,a){var c=s.type||"unknown-event";s.currentTarget=a,Ub(c,i,void 0,s),s.currentTarget=null}function se(s,i){i=(i&4)!==0;for(var a=0;a<s.length;a++){var c=s[a],d=c.event;c=c.listeners;e:{var g=void 0;if(i)for(var $=c.length-1;0<=$;$--){var j=c[$],_=j.instance,_e=j.currentTarget;if(j=j.listener,_!==g&&d.isPropagationStopped())break e;nf(d,j,_e),g=_}else for($=0;$<c.length;$++){if(j=c[$],_=j.instance,_e=j.currentTarget,j=j.listener,_!==g&&d.isPropagationStopped())break e;nf(d,j,_e),g=_}}}if(Qb)throw s=Rb,Qb=!1,Rb=null,s}function D(s,i){var a=i[of];a===void 0&&(a=i[of]=new Set);var c=s+"__bubble";a.has(c)||(pf(i,s,2,!1),a.add(c))}function qf(s,i,a){var c=0;i&&(c|=4),pf(a,s,c,i)}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(s){if(!s[rf]){s[rf]=!0,da.forEach(function(a){a!=="selectionchange"&&(mf.has(a)||qf(a,!1,s),qf(a,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[rf]||(i[rf]=!0,qf("selectionchange",!1,i))}}function pf(s,i,a,c){switch(jd(i)){case 1:var d=ed;break;case 4:d=gd;break;default:d=fd}a=d.bind(null,i,a,s),d=void 0,!Lb||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),c?d!==void 0?s.addEventListener(i,a,{capture:!0,passive:d}):s.addEventListener(i,a,!0):d!==void 0?s.addEventListener(i,a,{passive:d}):s.addEventListener(i,a,!1)}function hd(s,i,a,c,d){var g=c;if(!(i&1)&&!(i&2)&&c!==null)e:for(;;){if(c===null)return;var $=c.tag;if($===3||$===4){var j=c.stateNode.containerInfo;if(j===d||j.nodeType===8&&j.parentNode===d)break;if($===4)for($=c.return;$!==null;){var _=$.tag;if((_===3||_===4)&&(_=$.stateNode.containerInfo,_===d||_.nodeType===8&&_.parentNode===d))return;$=$.return}for(;j!==null;){if($=Wc(j),$===null)return;if(_=$.tag,_===5||_===6){c=g=$;continue e}j=j.parentNode}}c=c.return}Jb(function(){var _e=g,et=xb(a),tt=[];e:{var rt=df.get(s);if(rt!==void 0){var nt=td,ot=s;switch(s){case"keypress":if(od(a)===0)break e;case"keydown":case"keyup":nt=Rd;break;case"focusin":ot="focus",nt=Fd;break;case"focusout":ot="blur",nt=Fd;break;case"beforeblur":case"afterblur":nt=Fd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":nt=Bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":nt=Dd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":nt=Vd;break;case $e:case af:case bf:nt=Hd;break;case cf:nt=Xd;break;case"scroll":nt=vd;break;case"wheel":nt=Zd;break;case"copy":case"cut":case"paste":nt=Jd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":nt=Td}var lt=(i&4)!==0,ct=!lt&&s==="scroll",it=lt?rt!==null?rt+"Capture":null:rt;lt=[];for(var st=_e,at;st!==null;){at=st;var ut=at.stateNode;if(at.tag===5&&ut!==null&&(at=ut,it!==null&&(ut=Kb(st,it),ut!=null&&lt.push(tf(st,ut,at)))),ct)break;st=st.return}0<lt.length&&(rt=new nt(rt,ot,null,a,et),tt.push({event:rt,listeners:lt}))}}if(!(i&7)){e:{if(rt=s==="mouseover"||s==="pointerover",nt=s==="mouseout"||s==="pointerout",rt&&a!==wb&&(ot=a.relatedTarget||a.fromElement)&&(Wc(ot)||ot[uf]))break e;if((nt||rt)&&(rt=et.window===et?et:(rt=et.ownerDocument)?rt.defaultView||rt.parentWindow:window,nt?(ot=a.relatedTarget||a.toElement,nt=_e,ot=ot?Wc(ot):null,ot!==null&&(ct=Vb(ot),ot!==ct||ot.tag!==5&&ot.tag!==6)&&(ot=null)):(nt=null,ot=_e),nt!==ot)){if(lt=Bd,ut="onMouseLeave",it="onMouseEnter",st="mouse",(s==="pointerout"||s==="pointerover")&&(lt=Td,ut="onPointerLeave",it="onPointerEnter",st="pointer"),ct=nt==null?rt:ue(nt),at=ot==null?rt:ue(ot),rt=new lt(ut,st+"leave",nt,a,et),rt.target=ct,rt.relatedTarget=at,ut=null,Wc(et)===_e&&(lt=new lt(it,st+"enter",ot,a,et),lt.target=at,lt.relatedTarget=ct,ut=lt),ct=ut,nt&&ot)t:{for(lt=nt,it=ot,st=0,at=lt;at;at=vf(at))st++;for(at=0,ut=it;ut;ut=vf(ut))at++;for(;0<st-at;)lt=vf(lt),st--;for(;0<at-st;)it=vf(it),at--;for(;st--;){if(lt===it||it!==null&&lt===it.alternate)break t;lt=vf(lt),it=vf(it)}lt=null}else lt=null;nt!==null&&wf(tt,rt,nt,lt,!1),ot!==null&&ct!==null&&wf(tt,ct,ot,lt,!0)}}e:{if(rt=_e?ue(_e):window,nt=rt.nodeName&&rt.nodeName.toLowerCase(),nt==="select"||nt==="input"&&rt.type==="file")var dt=ve;else if(me(rt))if(we)dt=Fe;else{dt=De;var mt=Ce}else(nt=rt.nodeName)&&nt.toLowerCase()==="input"&&(rt.type==="checkbox"||rt.type==="radio")&&(dt=Ee);if(dt&&(dt=dt(s,_e))){ne(tt,dt,a,et);break e}mt&&mt(s,rt,_e),s==="focusout"&&(mt=rt._wrapperState)&&mt.controlled&&rt.type==="number"&&cb(rt,"number",rt.value)}switch(mt=_e?ue(_e):window,s){case"focusin":(me(mt)||mt.contentEditable==="true")&&(Qe=mt,Re=_e,Se=null);break;case"focusout":Se=Re=Qe=null;break;case"mousedown":Te=!0;break;case"contextmenu":case"mouseup":case"dragend":Te=!1,Ue(tt,a,et);break;case"selectionchange":if(Pe)break;case"keydown":case"keyup":Ue(tt,a,et)}var ht;if(ae)e:{switch(s){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else ie?ge(s,a)&&(xt="onCompositionEnd"):s==="keydown"&&a.keyCode===229&&(xt="onCompositionStart");xt&&(de&&a.locale!=="ko"&&(ie||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&ie&&(ht=nd()):(kd=et,ld="value"in kd?kd.value:kd.textContent,ie=!0)),mt=oe(_e,xt),0<mt.length&&(xt=new Ld(xt,s,null,a,et),tt.push({event:xt,listeners:mt}),ht?xt.data=ht:(ht=he(a),ht!==null&&(xt.data=ht)))),(ht=ce?je(s,a):ke(s,a))&&(_e=oe(_e,"onBeforeInput"),0<_e.length&&(et=new Ld("onBeforeInput","beforeinput",null,a,et),tt.push({event:et,listeners:_e}),et.data=ht))}se(tt,i)})}function tf(s,i,a){return{instance:s,listener:i,currentTarget:a}}function oe(s,i){for(var a=i+"Capture",c=[];s!==null;){var d=s,g=d.stateNode;d.tag===5&&g!==null&&(d=g,g=Kb(s,a),g!=null&&c.unshift(tf(s,g,d)),g=Kb(s,i),g!=null&&c.push(tf(s,g,d))),s=s.return}return c}function vf(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function wf(s,i,a,c,d){for(var g=i._reactName,$=[];a!==null&&a!==c;){var j=a,_=j.alternate,_e=j.stateNode;if(_!==null&&_===c)break;j.tag===5&&_e!==null&&(j=_e,d?(_=Kb(a,g),_!=null&&$.unshift(tf(a,_,j))):d||(_=Kb(a,g),_!=null&&$.push(tf(a,_,j)))),a=a.return}$.length!==0&&s.push({event:i,listeners:$})}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(s){return(typeof s=="string"?s:""+s).replace(xf,`
`).replace(yf,"")}function Af(s,i,a){if(i=zf(i),zf(s)!==i&&a)throw Error(p$2(425))}function Bf(){}var Cf=null,Df=null;function Ef(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Ff=typeof setTimeout=="function"?setTimeout:void 0,Gf=typeof clearTimeout=="function"?clearTimeout:void 0,Hf=typeof Promise=="function"?Promise:void 0,Jf=typeof queueMicrotask=="function"?queueMicrotask:typeof Hf<"u"?function(s){return Hf.resolve(null).then(s).catch(If)}:Ff;function If(s){setTimeout(function(){throw s})}function Kf(s,i){var a=i,c=0;do{var d=a.nextSibling;if(s.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(c===0){s.removeChild(d),bd(i);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=d}while(a);bd(i)}function Lf(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Mf(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf;function Wc(s){var i=s[Of];if(i)return i;for(var a=s.parentNode;a;){if(i=a[uf]||a[Of]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=Mf(s);s!==null;){if(a=s[Of])return a;s=Mf(s)}return i}s=a,a=s.parentNode}return null}function Cb(s){return s=s[Of]||s[uf],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function ue(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(p$2(33))}function Db(s){return s[Pf]||null}var Sf=[],Tf=-1;function Uf(s){return{current:s}}function E(s){0>Tf||(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<a.length;s++){var c=a[s];do c=c(!0);while(c!==null)}eg=null,fg=!1}catch(d){throw eg!==null&&(eg=eg.slice(s+1)),ac(fc,jg),d}finally{C=i,gg=!1}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(s,i){kg[lg++]=ng,kg[lg++]=mg,mg=s,ng=i}function ug(s,i,a){og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,qg=s;var c=rg;s=sg;var d=32-oc(c)-1;c&=~(1<<d),a+=1;var g=32-oc(i)+d;if(30<g){var $=d-d%5;g=(c&(1<<$)-1).toString(32),c>>=$,d-=$,rg=1<<32-oc(i)+d|a<<d|c,sg=g+s}else rg=1<<g|a<<d|c,sg=s}function vg(s){s.return!==null&&(tg(s,1),ug(s,1,0))}function wg(s){for(;s===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;s===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null}var xg=null,yg=null,I=!1,zg=null;function Ag(s,i){var a=Bg(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function Cg(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,xg=s,yg=Lf(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,xg=s,yg=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=qg!==null?{id:rg,overflow:sg}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Bg(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,xg=s,yg=null,!0):!1;default:return!1}}function Dg(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Eg(s){if(I){var i=yg;if(i){var a=i;if(!Cg(s,i)){if(Dg(s))throw Error(p$2(418));i=Lf(a.nextSibling);var c=xg;i&&Cg(s,i)?Ag(c,a):(s.flags=s.flags&-4097|2,I=!1,xg=s)}}else{if(Dg(s))throw Error(p$2(418));s.flags=s.flags&-4097|2,I=!1,xg=s}}}function Fg(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;xg=s}function Gg(s){if(s!==xg)return!1;if(!I)return Fg(s),I=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!Ef(s.type,s.memoizedProps)),i&&(i=yg)){if(Dg(s))throw Hg(),Error(p$2(418));for(;i;)Ag(s,i),i=Lf(i.nextSibling)}if(Fg(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(p$2(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="/$"){if(i===0){yg=Lf(s.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}s=s.nextSibling}yg=null}}else yg=xg?Lf(s.stateNode.nextSibling):null;return!0}function Hg(){for(var s=yg;s;)s=Lf(s.nextSibling)}function Ig(){yg=xg=null,I=!1}function Jg(s){zg===null?zg=[s]:zg.push(s)}var Kg=ua.ReactCurrentBatchConfig;function Lg(s,i){if(s&&s.defaultProps){i=A({},i),s=s.defaultProps;for(var a in s)i[a]===void 0&&(i[a]=s[a]);return i}return i}var Mg=Uf(null),Ng=null,Og=null,Pg=null;function Qg(){Pg=Og=Ng=null}function Rg(s){var i=Mg.current;E(Mg),s._currentValue=i}function Sg(s,i,a){for(;s!==null;){var c=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),s===a)break;s=s.return}}function Tg(s,i){Ng=s,Pg=Og=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&i&&(Ug=!0),s.firstContext=null)}function Vg(s){var i=s._currentValue;if(Pg!==s)if(s={context:s,memoizedValue:i,next:null},Og===null){if(Ng===null)throw Error(p$2(308));Og=s,Ng.dependencies={lanes:0,firstContext:s}}else Og=Og.next=s;return i}var Wg=null;function Xg(s){Wg===null?Wg=[s]:Wg.push(s)}function Yg(s,i,a,c){var d=i.interleaved;return d===null?(a.next=a,Xg(i)):(a.next=d.next,d.next=a),i.interleaved=a,Zg(s,c)}function Zg(s,i){s.lanes|=i;var a=s.alternate;for(a!==null&&(a.lanes|=i),a=s,s=s.return;s!==null;)s.childLanes|=i,a=s.alternate,a!==null&&(a.childLanes|=i),a=s,s=s.return;return a.tag===3?a.stateNode:null}var $g=!1;function ah(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bh(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ch(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function dh(s,i,a){var c=s.updateQueue;if(c===null)return null;if(c=c.shared,K&2){var d=c.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),c.pending=i,Zg(s,a)}return d=c.interleaved,d===null?(i.next=i,Xg(c)):(i.next=d.next,d.next=i),c.interleaved=i,Zg(s,a)}function eh(s,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=s.pendingLanes,a|=c,i.lanes=a,Cc(s,a)}}function fh(s,i){var a=s.updateQueue,c=s.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var d=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var $={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?d=g=$:g=g.next=$,a=a.next}while(a!==null);g===null?d=g=i:g=g.next=i}else d=g=i;a={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:c.shared,effects:c.effects},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=i:s.next=i,a.lastBaseUpdate=i}function gh(s,i,a,c){var d=s.updateQueue;$g=!1;var g=d.firstBaseUpdate,$=d.lastBaseUpdate,j=d.shared.pending;if(j!==null){d.shared.pending=null;var _=j,_e=_.next;_.next=null,$===null?g=_e:$.next=_e,$=_;var et=s.alternate;et!==null&&(et=et.updateQueue,j=et.lastBaseUpdate,j!==$&&(j===null?et.firstBaseUpdate=_e:j.next=_e,et.lastBaseUpdate=_))}if(g!==null){var tt=d.baseState;$=0,et=_e=_=null,j=g;do{var rt=j.lane,nt=j.eventTime;if((c&rt)===rt){et!==null&&(et=et.next={eventTime:nt,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ot=s,lt=j;switch(rt=i,nt=a,lt.tag){case 1:if(ot=lt.payload,typeof ot=="function"){tt=ot.call(nt,tt,rt);break e}tt=ot;break e;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=lt.payload,rt=typeof ot=="function"?ot.call(nt,tt,rt):ot,rt==null)break e;tt=A({},tt,rt);break e;case 2:$g=!0}}j.callback!==null&&j.lane!==0&&(s.flags|=64,rt=d.effects,rt===null?d.effects=[j]:rt.push(j))}else nt={eventTime:nt,lane:rt,tag:j.tag,payload:j.payload,callback:j.callback,next:null},et===null?(_e=et=nt,_=tt):et=et.next=nt,$|=rt;if(j=j.next,j===null){if(j=d.shared.pending,j===null)break;rt=j,j=rt.next,rt.next=null,d.lastBaseUpdate=rt,d.shared.pending=null}}while(1);if(et===null&&(_=tt),d.baseState=_,d.firstBaseUpdate=_e,d.lastBaseUpdate=et,i=d.shared.interleaved,i!==null){d=i;do $|=d.lane,d=d.next;while(d!==i)}else g===null&&(d.shared.lanes=0);hh|=$,s.lanes=$,s.memoizedState=tt}}function ih(s,i,a){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var c=s[i],d=c.callback;if(d!==null){if(c.callback=null,c=a,typeof d!="function")throw Error(p$2(191,d));d.call(c)}}}var jh=new aa.Component().refs;function kh(s,i,a,c){i=s.memoizedState,a=a(c,i),a=a==null?i:A({},i,a),s.memoizedState=a,s.lanes===0&&(s.updateQueue.baseState=a)}var nh={isMounted:function(s){return(s=s._reactInternals)?Vb(s)===s:!1},enqueueSetState:function(s,i,a){s=s._reactInternals;var c=L(),d=lh(s),g=ch(c,d);g.payload=i,a!=null&&(g.callback=a),i=dh(s,g,d),i!==null&&(mh(i,s,d,c),eh(i,s,d))},enqueueReplaceState:function(s,i,a){s=s._reactInternals;var c=L(),d=lh(s),g=ch(c,d);g.tag=1,g.payload=i,a!=null&&(g.callback=a),i=dh(s,g,d),i!==null&&(mh(i,s,d,c),eh(i,s,d))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var a=L(),c=lh(s),d=ch(a,c);d.tag=2,i!=null&&(d.callback=i),i=dh(s,d,c),i!==null&&(mh(i,s,c,a),eh(i,s,c))}};function oh(s,i,a,c,d,g,$){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(c,g,$):i.prototype&&i.prototype.isPureReactComponent?!Ie(a,c)||!Ie(d,g):!0}function ph(s,i,a){var c=!1,d=Vf,g=i.contextType;return typeof g=="object"&&g!==null?g=Vg(g):(d=Zf(i)?Xf:H.current,c=i.contextTypes,g=(c=c!=null)?Yf(s,d):Vf),i=new i(a,g),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=nh,s.stateNode=i,i._reactInternals=s,c&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=d,s.__reactInternalMemoizedMaskedChildContext=g),i}function qh(s,i,a,c){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,c),i.state!==s&&nh.enqueueReplaceState(i,i.state,null)}function rh(s,i,a,c){var d=s.stateNode;d.props=a,d.state=s.memoizedState,d.refs=jh,ah(s);var g=i.contextType;typeof g=="object"&&g!==null?d.context=Vg(g):(g=Zf(i)?Xf:H.current,d.context=Yf(s,g)),d.state=s.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(kh(s,i,g,a),d.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(i=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),i!==d.state&&nh.enqueueReplaceState(d,d.state,null),gh(s,a,d,c),d.state=s.memoizedState),typeof d.componentDidMount=="function"&&(s.flags|=4194308)}function sh(s,i,a){if(s=a.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(p$2(309));var c=a.stateNode}if(!c)throw Error(p$2(147,s));var d=c,g=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===g?i.ref:(i=function($){var j=d.refs;j===jh&&(j=d.refs={}),$===null?delete j[g]:j[g]=$},i._stringRef=g,i)}if(typeof s!="string")throw Error(p$2(284));if(!a._owner)throw Error(p$2(290,s))}return s}function th(s,i){throw s=Object.prototype.toString.call(i),Error(p$2(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function uh(s){var i=s._init;return i(s._payload)}function vh$1(s){function i(it,st){if(s){var at=it.deletions;at===null?(it.deletions=[st],it.flags|=16):at.push(st)}}function a(it,st){if(!s)return null;for(;st!==null;)i(it,st),st=st.sibling;return null}function c(it,st){for(it=new Map;st!==null;)st.key!==null?it.set(st.key,st):it.set(st.index,st),st=st.sibling;return it}function d(it,st){return it=wh(it,st),it.index=0,it.sibling=null,it}function g(it,st,at){return it.index=at,s?(at=it.alternate,at!==null?(at=at.index,at<st?(it.flags|=2,st):at):(it.flags|=2,st)):(it.flags|=1048576,st)}function $(it){return s&&it.alternate===null&&(it.flags|=2),it}function j(it,st,at,ut){return st===null||st.tag!==6?(st=xh(at,it.mode,ut),st.return=it,st):(st=d(st,at),st.return=it,st)}function _(it,st,at,ut){var dt=at.type;return dt===ya?et(it,st,at.props.children,ut,at.key):st!==null&&(st.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===Ha&&uh(dt)===st.type)?(ut=d(st,at.props),ut.ref=sh(it,st,at),ut.return=it,ut):(ut=yh(at.type,at.key,at.props,null,it.mode,ut),ut.ref=sh(it,st,at),ut.return=it,ut)}function _e(it,st,at,ut){return st===null||st.tag!==4||st.stateNode.containerInfo!==at.containerInfo||st.stateNode.implementation!==at.implementation?(st=zh(at,it.mode,ut),st.return=it,st):(st=d(st,at.children||[]),st.return=it,st)}function et(it,st,at,ut,dt){return st===null||st.tag!==7?(st=Ah(at,it.mode,ut,dt),st.return=it,st):(st=d(st,at),st.return=it,st)}function tt(it,st,at){if(typeof st=="string"&&st!==""||typeof st=="number")return st=xh(""+st,it.mode,at),st.return=it,st;if(typeof st=="object"&&st!==null){switch(st.$$typeof){case va:return at=yh(st.type,st.key,st.props,null,it.mode,at),at.ref=sh(it,null,st),at.return=it,at;case wa:return st=zh(st,it.mode,at),st.return=it,st;case Ha:var ut=st._init;return tt(it,ut(st._payload),at)}if(eb(st)||Ka(st))return st=Ah(st,it.mode,at,null),st.return=it,st;th(it,st)}return null}function rt(it,st,at,ut){var dt=st!==null?st.key:null;if(typeof at=="string"&&at!==""||typeof at=="number")return dt!==null?null:j(it,st,""+at,ut);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case va:return at.key===dt?_(it,st,at,ut):null;case wa:return at.key===dt?_e(it,st,at,ut):null;case Ha:return dt=at._init,rt(it,st,dt(at._payload),ut)}if(eb(at)||Ka(at))return dt!==null?null:et(it,st,at,ut,null);th(it,at)}return null}function nt(it,st,at,ut,dt){if(typeof ut=="string"&&ut!==""||typeof ut=="number")return it=it.get(at)||null,j(st,it,""+ut,dt);if(typeof ut=="object"&&ut!==null){switch(ut.$$typeof){case va:return it=it.get(ut.key===null?at:ut.key)||null,_(st,it,ut,dt);case wa:return it=it.get(ut.key===null?at:ut.key)||null,_e(st,it,ut,dt);case Ha:var mt=ut._init;return nt(it,st,at,mt(ut._payload),dt)}if(eb(ut)||Ka(ut))return it=it.get(at)||null,et(st,it,ut,dt,null);th(st,ut)}return null}function ot(it,st,at,ut){for(var dt=null,mt=null,ht=st,xt=st=0,wt=null;ht!==null&&xt<at.length;xt++){ht.index>xt?(wt=ht,ht=null):wt=ht.sibling;var Rt=rt(it,ht,at[xt],ut);if(Rt===null){ht===null&&(ht=wt);break}s&&ht&&Rt.alternate===null&&i(it,ht),st=g(Rt,st,xt),mt===null?dt=Rt:mt.sibling=Rt,mt=Rt,ht=wt}if(xt===at.length)return a(it,ht),I&&tg(it,xt),dt;if(ht===null){for(;xt<at.length;xt++)ht=tt(it,at[xt],ut),ht!==null&&(st=g(ht,st,xt),mt===null?dt=ht:mt.sibling=ht,mt=ht);return I&&tg(it,xt),dt}for(ht=c(it,ht);xt<at.length;xt++)wt=nt(ht,it,xt,at[xt],ut),wt!==null&&(s&&wt.alternate!==null&&ht.delete(wt.key===null?xt:wt.key),st=g(wt,st,xt),mt===null?dt=wt:mt.sibling=wt,mt=wt);return s&&ht.forEach(function(Ct){return i(it,Ct)}),I&&tg(it,xt),dt}function lt(it,st,at,ut){var dt=Ka(at);if(typeof dt!="function")throw Error(p$2(150));if(at=dt.call(at),at==null)throw Error(p$2(151));for(var mt=dt=null,ht=st,xt=st=0,wt=null,Rt=at.next();ht!==null&&!Rt.done;xt++,Rt=at.next()){ht.index>xt?(wt=ht,ht=null):wt=ht.sibling;var Ct=rt(it,ht,Rt.value,ut);if(Ct===null){ht===null&&(ht=wt);break}s&&ht&&Ct.alternate===null&&i(it,ht),st=g(Ct,st,xt),mt===null?dt=Ct:mt.sibling=Ct,mt=Ct,ht=wt}if(Rt.done)return a(it,ht),I&&tg(it,xt),dt;if(ht===null){for(;!Rt.done;xt++,Rt=at.next())Rt=tt(it,Rt.value,ut),Rt!==null&&(st=g(Rt,st,xt),mt===null?dt=Rt:mt.sibling=Rt,mt=Rt);return I&&tg(it,xt),dt}for(ht=c(it,ht);!Rt.done;xt++,Rt=at.next())Rt=nt(ht,it,xt,Rt.value,ut),Rt!==null&&(s&&Rt.alternate!==null&&ht.delete(Rt.key===null?xt:Rt.key),st=g(Rt,st,xt),mt===null?dt=Rt:mt.sibling=Rt,mt=Rt);return s&&ht.forEach(function(gt){return i(it,gt)}),I&&tg(it,xt),dt}function ct(it,st,at,ut){if(typeof at=="object"&&at!==null&&at.type===ya&&at.key===null&&(at=at.props.children),typeof at=="object"&&at!==null){switch(at.$$typeof){case va:e:{for(var dt=at.key,mt=st;mt!==null;){if(mt.key===dt){if(dt=at.type,dt===ya){if(mt.tag===7){a(it,mt.sibling),st=d(mt,at.props.children),st.return=it,it=st;break e}}else if(mt.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===Ha&&uh(dt)===mt.type){a(it,mt.sibling),st=d(mt,at.props),st.ref=sh(it,mt,at),st.return=it,it=st;break e}a(it,mt);break}else i(it,mt);mt=mt.sibling}at.type===ya?(st=Ah(at.props.children,it.mode,ut,at.key),st.return=it,it=st):(ut=yh(at.type,at.key,at.props,null,it.mode,ut),ut.ref=sh(it,st,at),ut.return=it,it=ut)}return $(it);case wa:e:{for(mt=at.key;st!==null;){if(st.key===mt)if(st.tag===4&&st.stateNode.containerInfo===at.containerInfo&&st.stateNode.implementation===at.implementation){a(it,st.sibling),st=d(st,at.children||[]),st.return=it,it=st;break e}else{a(it,st);break}else i(it,st);st=st.sibling}st=zh(at,it.mode,ut),st.return=it,it=st}return $(it);case Ha:return mt=at._init,ct(it,st,mt(at._payload),ut)}if(eb(at))return ot(it,st,at,ut);if(Ka(at))return lt(it,st,at,ut);th(it,at)}return typeof at=="string"&&at!==""||typeof at=="number"?(at=""+at,st!==null&&st.tag===6?(a(it,st.sibling),st=d(st,at),st.return=it,it=st):(a(it,st),st=xh(at,it.mode,ut),st.return=it,it=st),$(it)):a(it,st)}return ct}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;s<Nh.length;s++)Nh[s]._workInProgressVersionPrimary=null;Nh.length=0}var Ph=ua.ReactCurrentDispatcher,Qh=ua.ReactCurrentBatchConfig,Rh=0,N=null,O=null,P=null,Sh=!1,Th=!1,Uh=0,Vh=0;function Q(){throw Error(p$2(321))}function Wh(s,i){if(i===null)return!1;for(var a=0;a<i.length&&a<s.length;a++)if(!He(s[a],i[a]))return!1;return!0}function Xh(s,i,a,c,d,g){if(Rh=g,N=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Ph.current=s===null||s.memoizedState===null?Yh:Zh,s=a(c,d),Th){g=0;do{if(Th=!1,Uh=0,25<=g)throw Error(p$2(301));g+=1,P=O=null,i.updateQueue=null,Ph.current=$h,s=a(c,d)}while(Th)}if(Ph.current=ai,i=O!==null&&O.next!==null,Rh=0,P=O=N=null,Sh=!1,i)throw Error(p$2(300));return s}function bi(){var s=Uh!==0;return Uh=0,s}function ci(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return P===null?N.memoizedState=P=s:P=P.next=s,P}function di(){if(O===null){var s=N.alternate;s=s!==null?s.memoizedState:null}else s=O.next;var i=P===null?N.memoizedState:P.next;if(i!==null)P=i,O=s;else{if(s===null)throw Error(p$2(310));O=s,s={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null},P===null?N.memoizedState=P=s:P=P.next=s}return P}function ei(s,i){return typeof i=="function"?i(s):i}function fi(s){var i=di(),a=i.queue;if(a===null)throw Error(p$2(311));a.lastRenderedReducer=s;var c=O,d=c.baseQueue,g=a.pending;if(g!==null){if(d!==null){var $=d.next;d.next=g.next,g.next=$}c.baseQueue=d=g,a.pending=null}if(d!==null){g=d.next,c=c.baseState;var j=$=null,_=null,_e=g;do{var et=_e.lane;if((Rh&et)===et)_!==null&&(_=_.next={lane:0,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null}),c=_e.hasEagerState?_e.eagerState:s(c,_e.action);else{var tt={lane:et,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null};_===null?(j=_=tt,$=c):_=_.next=tt,N.lanes|=et,hh|=et}_e=_e.next}while(_e!==null&&_e!==g);_===null?$=c:_.next=j,He(c,i.memoizedState)||(Ug=!0),i.memoizedState=c,i.baseState=$,i.baseQueue=_,a.lastRenderedState=c}if(s=a.interleaved,s!==null){d=s;do g=d.lane,N.lanes|=g,hh|=g,d=d.next;while(d!==s)}else d===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function gi(s){var i=di(),a=i.queue;if(a===null)throw Error(p$2(311));a.lastRenderedReducer=s;var c=a.dispatch,d=a.pending,g=i.memoizedState;if(d!==null){a.pending=null;var $=d=d.next;do g=s(g,$.action),$=$.next;while($!==d);He(g,i.memoizedState)||(Ug=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),a.lastRenderedState=g}return[g,c]}function hi(){}function ii(s,i){var a=N,c=di(),d=i(),g=!He(c.memoizedState,d);if(g&&(c.memoizedState=d,Ug=!0),c=c.queue,ji(ki.bind(null,a,c,s),[s]),c.getSnapshot!==i||g||P!==null&&P.memoizedState.tag&1){if(a.flags|=2048,li(9,mi.bind(null,a,c,d,i),void 0,null),R===null)throw Error(p$2(349));Rh&30||ni(a,i,d)}return d}function ni(s,i,a){s.flags|=16384,s={getSnapshot:i,value:a},i=N.updateQueue,i===null?(i={lastEffect:null,stores:null},N.updateQueue=i,i.stores=[s]):(a=i.stores,a===null?i.stores=[s]:a.push(s))}function mi(s,i,a,c){i.value=a,i.getSnapshot=c,oi(i)&&pi(s)}function ki(s,i,a){return a(function(){oi(i)&&pi(s)})}function oi(s){var i=s.getSnapshot;s=s.value;try{var a=i();return!He(s,a)}catch{return!0}}function pi(s){var i=Zg(s,1);i!==null&&mh(i,s,1,-1)}function qi(s){var i=ci();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:s},i.queue=s,s=s.dispatch=ri.bind(null,N,s),[i.memoizedState,s]}function li(s,i,a,c){return s={tag:s,create:i,destroy:a,deps:c,next:null},i=N.updateQueue,i===null?(i={lastEffect:null,stores:null},N.updateQueue=i,i.lastEffect=s.next=s):(a=i.lastEffect,a===null?i.lastEffect=s.next=s:(c=a.next,a.next=s,s.next=c,i.lastEffect=s)),s}function si(){return di().memoizedState}function ti(s,i,a,c){var d=ci();N.flags|=s,d.memoizedState=li(1|i,a,void 0,c===void 0?null:c)}function ui(s,i,a,c){var d=di();c=c===void 0?null:c;var g=void 0;if(O!==null){var $=O.memoizedState;if(g=$.destroy,c!==null&&Wh(c,$.deps)){d.memoizedState=li(i,a,g,c);return}}N.flags|=s,d.memoizedState=li(1|i,a,g,c)}function vi(s,i){return ti(8390656,8,s,i)}function ji(s,i){return ui(2048,8,s,i)}function wi(s,i){return ui(4,2,s,i)}function xi(s,i){return ui(4,4,s,i)}function yi(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function zi(s,i,a){return a=a!=null?a.concat([s]):null,ui(4,4,yi.bind(null,i,s),a)}function Ai(){}function Bi(s,i){var a=di();i=i===void 0?null:i;var c=a.memoizedState;return c!==null&&i!==null&&Wh(i,c[1])?c[0]:(a.memoizedState=[s,i],s)}function Ci(s,i){var a=di();i=i===void 0?null:i;var c=a.memoizedState;return c!==null&&i!==null&&Wh(i,c[1])?c[0]:(s=s(),a.memoizedState=[s,i],s)}function Di(s,i,a){return Rh&21?(He(a,i)||(a=yc(),N.lanes|=a,hh|=a,s.baseState=!0),i):(s.baseState&&(s.baseState=!1,Ug=!0),s.memoizedState=a)}function Ei(s,i){var a=C;C=a!==0&&4>a?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 $=i.lastRenderedState,j=g($,a);if(d.hasEagerState=!0,d.eagerState=j,He(j,$)){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<a&&(i+="H"+a.toString(32)),i+=":"}else a=Vh++,i=":"+i+"r"+a.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},Zh={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:fi,useRef:si,useState:function(){return fi(ei)},useDebugValue:Ai,useDeferredValue:function(s){var i=di();return Di(i,O.memoizedState,s)},useTransition:function(){var s=fi(ei)[0],i=di().memoizedState;return[s,i]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1},$h={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:gi,useRef:si,useState:function(){return gi(ei)},useDebugValue:Ai,useDeferredValue:function(s){var i=di();return O===null?i.memoizedState=s:Di(i,O.memoizedState,s)},useTransition:function(){var s=gi(ei)[0],i=di().memoizedState;return[s,i]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1};function Ki(s,i){try{var a="",c=i;do a+=Pa(c),c=c.return;while(c);var d=a}catch(g){d=`
Error generating stack: `+g.message+`
`+g.stack}return{value:s,source:i,stack:d,digest:null}}function Li(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function Mi(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Ni=typeof WeakMap=="function"?WeakMap:Map;function Oi(s,i,a){a=ch(-1,a),a.tag=3,a.payload={element:null};var c=i.value;return a.callback=function(){Pi||(Pi=!0,Qi=c),Mi(s,i)},a}function Ri(s,i,a){a=ch(-1,a),a.tag=3;var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var d=i.value;a.payload=function(){return c(d)},a.callback=function(){Mi(s,i)}}var g=s.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){Mi(s,i),typeof c!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var $=i.stack;this.componentDidCatch(i.value,{componentStack:$!==null?$:""})}),a}function Ti(s,i,a){var c=s.pingCache;if(c===null){c=s.pingCache=new Ni;var d=new Set;c.set(i,d)}else d=c.get(i),d===void 0&&(d=new Set,c.set(i,d));d.has(a)||(d.add(a),s=Ui.bind(null,s,i,a),i.then(s,s))}function Vi(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function Wi(s,i,a,c,d){return s.mode&1?(s.flags|=65536,s.lanes=d,s):(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=ch(-1,1),i.tag=2,dh(a,i,1))),a.lanes|=1),s)}var Xi=ua.ReactCurrentOwner,Ug=!1;function Yi(s,i,a,c){i.child=s===null?Ch(i,null,a,c):Bh(i,s.child,a,c)}function Zi(s,i,a,c,d){a=a.render;var g=i.ref;return Tg(i,d),c=Xh(s,i,a,c,g,d),a=bi(),s!==null&&!Ug?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~d,$i(s,i,d)):(I&&a&&vg(i),i.flags|=1,Yi(s,i,c,d),i.child)}function aj(s,i,a,c,d){if(s===null){var g=a.type;return typeof g=="function"&&!bj(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=g,cj(s,i,g,c,d)):(s=yh(a.type,null,c,i,i.mode,d),s.ref=i.ref,s.return=i,i.child=s)}if(g=s.child,!(s.lanes&d)){var $=g.memoizedProps;if(a=a.compare,a=a!==null?a:Ie,a($,c)&&s.ref===i.ref)return $i(s,i,d)}return i.flags|=1,s=wh(g,c),s.ref=i.ref,s.return=i,i.child=s}function cj(s,i,a,c,d){if(s!==null){var g=s.memoizedProps;if(Ie(g,c)&&s.ref===i.ref)if(Ug=!1,i.pendingProps=c=g,(s.lanes&d)!==0)s.flags&131072&&(Ug=!0);else return i.lanes=s.lanes,$i(s,i,d)}return dj(s,i,a,c,d)}function ej(s,i,a){var c=i.pendingProps,d=c.children,g=s!==null?s.memoizedState:null;if(c.mode==="hidden")if(!(i.mode&1))i.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(fj,gj),gj|=a;else{if(!(a&1073741824))return s=g!==null?g.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,G(fj,gj),gj|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,G(fj,gj),gj|=c}else g!==null?(c=g.baseLanes|a,i.memoizedState=null):c=a,G(fj,gj),gj|=c;return Yi(s,i,d,a),i.child}function hj(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function dj(s,i,a,c,d){var g=Zf(a)?Xf:H.current;return g=Yf(i,g),Tg(i,d),a=Xh(s,i,a,c,g,d),c=bi(),s!==null&&!Ug?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~d,$i(s,i,d)):(I&&c&&vg(i),i.flags|=1,Yi(s,i,a,d),i.child)}function ij(s,i,a,c,d){if(Zf(a)){var g=!0;cg(i)}else g=!1;if(Tg(i,d),i.stateNode===null)jj(s,i),ph(i,a,c),rh(i,a,c,d),c=!0;else if(s===null){var $=i.stateNode,j=i.memoizedProps;$.props=j;var _=$.context,_e=a.contextType;typeof _e=="object"&&_e!==null?_e=Vg(_e):(_e=Zf(a)?Xf:H.current,_e=Yf(i,_e));var et=a.getDerivedStateFromProps,tt=typeof et=="function"||typeof $.getSnapshotBeforeUpdate=="function";tt||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(j!==c||_!==_e)&&qh(i,$,c,_e),$g=!1;var rt=i.memoizedState;$.state=rt,gh(i,c,$,d),_=i.memoizedState,j!==c||rt!==_||Wf.current||$g?(typeof et=="function"&&(kh(i,a,et,c),_=i.memoizedState),(j=$g||oh(i,a,j,c,rt,_,_e))?(tt||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount()),typeof $.componentDidMount=="function"&&(i.flags|=4194308)):(typeof $.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=_),$.props=c,$.state=_,$.context=_e,c=j):(typeof $.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{$=i.stateNode,bh(s,i),j=i.memoizedProps,_e=i.type===i.elementType?j:Lg(i.type,j),$.props=_e,tt=i.pendingProps,rt=$.context,_=a.contextType,typeof _=="object"&&_!==null?_=Vg(_):(_=Zf(a)?Xf:H.current,_=Yf(i,_));var nt=a.getDerivedStateFromProps;(et=typeof nt=="function"||typeof $.getSnapshotBeforeUpdate=="function")||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(j!==tt||rt!==_)&&qh(i,$,c,_),$g=!1,rt=i.memoizedState,$.state=rt,gh(i,c,$,d);var ot=i.memoizedState;j!==tt||rt!==ot||Wf.current||$g?(typeof nt=="function"&&(kh(i,a,nt,c),ot=i.memoizedState),(_e=$g||oh(i,a,_e,c,rt,ot,_)||!1)?(et||typeof $.UNSAFE_componentWillUpdate!="function"&&typeof $.componentWillUpdate!="function"||(typeof $.componentWillUpdate=="function"&&$.componentWillUpdate(c,ot,_),typeof $.UNSAFE_componentWillUpdate=="function"&&$.UNSAFE_componentWillUpdate(c,ot,_)),typeof $.componentDidUpdate=="function"&&(i.flags|=4),typeof $.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof $.componentDidUpdate!="function"||j===s.memoizedProps&&rt===s.memoizedState||(i.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||j===s.memoizedProps&&rt===s.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ot),$.props=c,$.state=ot,$.context=_,c=_e):(typeof $.componentDidUpdate!="function"||j===s.memoizedProps&&rt===s.memoizedState||(i.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||j===s.memoizedProps&&rt===s.memoizedState||(i.flags|=1024),c=!1)}return kj(s,i,a,c,g,d)}function kj(s,i,a,c,d,g){hj(s,i);var $=(i.flags&128)!==0;if(!c&&!$)return d&&dg(i,a,!1),$i(s,i,g);c=i.stateNode,Xi.current=i;var j=$&&typeof a.getDerivedStateFromError!="function"?null:c.render();return i.flags|=1,s!==null&&$?(i.child=Bh(i,s.child,null,g),i.child=Bh(i,null,j,g)):Yi(s,i,j,g),i.memoizedState=c.state,d&&dg(i,a,!0),i.child}function lj(s){var i=s.stateNode;i.pendingContext?ag(s,i.pendingContext,i.pendingContext!==i.context):i.context&&ag(s,i.context,!1),Ih(s,i.containerInfo)}function mj(s,i,a,c,d){return Ig(),Jg(d),i.flags|=256,Yi(s,i,a,c),i.child}var nj={dehydrated:null,treeContext:null,retryLane:0};function oj(s){return{baseLanes:s,cachePool:null,transitions:null}}function pj(s,i,a){var c=i.pendingProps,d=M.current,g=!1,$=(i.flags&128)!==0,j;if((j=$)||(j=s!==null&&s.memoizedState===null?!1:(d&2)!==0),j?(g=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(d|=1),G(M,d&1),s===null)return Eg(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(i.mode&1?s.data==="$!"?i.lanes=8:i.lanes=1073741824:i.lanes=1,null):($=c.children,s=c.fallback,g?(c=i.mode,g=i.child,$={mode:"hidden",children:$},!(c&1)&&g!==null?(g.childLanes=0,g.pendingProps=$):g=qj($,c,0,null),s=Ah(s,c,a,null),g.return=i,s.return=i,g.sibling=s,i.child=g,i.child.memoizedState=oj(a),i.memoizedState=nj,s):rj(i,$));if(d=s.memoizedState,d!==null&&(j=d.dehydrated,j!==null))return sj(s,i,$,c,j,d,a);if(g){g=c.fallback,$=i.mode,d=s.child,j=d.sibling;var _={mode:"hidden",children:c.children};return!($&1)&&i.child!==d?(c=i.child,c.childLanes=0,c.pendingProps=_,i.deletions=null):(c=wh(d,_),c.subtreeFlags=d.subtreeFlags&14680064),j!==null?g=wh(j,g):(g=Ah(g,$,a,null),g.flags|=2),g.return=i,c.return=i,c.sibling=g,i.child=c,c=g,g=i.child,$=s.child.memoizedState,$=$===null?oj(a):{baseLanes:$.baseLanes|a,cachePool:null,transitions:$.transitions},g.memoizedState=$,g.childLanes=s.childLanes&~a,i.memoizedState=nj,c}return g=s.child,s=g.sibling,c=wh(g,{mode:"visible",children:c.children}),!(i.mode&1)&&(c.lanes=a),c.return=i,c.sibling=null,s!==null&&(a=i.deletions,a===null?(i.deletions=[s],i.flags|=16):a.push(s)),i.child=c,i.memoizedState=null,c}function rj(s,i){return i=qj({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function tj(s,i,a,c){return c!==null&&Jg(c),Bh(i,s.child,null,a),s=rj(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function sj(s,i,a,c,d,g,$){if(a)return i.flags&256?(i.flags&=-257,c=Li(Error(p$2(422))),tj(s,i,$,c)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(g=c.fallback,d=i.mode,c=qj({mode:"visible",children:c.children},d,0,null),g=Ah(g,d,$,null),g.flags|=2,c.return=i,g.return=i,c.sibling=g,i.child=c,i.mode&1&&Bh(i,s.child,null,$),i.child.memoizedState=oj($),i.memoizedState=nj,g);if(!(i.mode&1))return tj(s,i,$,null);if(d.data==="$!"){if(c=d.nextSibling&&d.nextSibling.dataset,c)var j=c.dgst;return c=j,g=Error(p$2(419)),c=Li(g,c,void 0),tj(s,i,$,c)}if(j=($&s.childLanes)!==0,Ug||j){if(c=R,c!==null){switch($&-$){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=d&(c.suspendedLanes|$)?0:d,d!==0&&d!==g.retryLane&&(g.retryLane=d,Zg(s,d),mh(c,s,d,-1))}return uj(),c=Li(Error(p$2(421))),tj(s,i,$,c)}return d.data==="$?"?(i.flags|=128,i.child=s.child,i=vj.bind(null,s),d._reactRetry=i,null):(s=g.treeContext,yg=Lf(d.nextSibling),xg=i,I=!0,zg=null,s!==null&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=s.id,sg=s.overflow,qg=i),i=rj(i,c.children),i.flags|=4096,i)}function wj(s,i,a){s.lanes|=i;var c=s.alternate;c!==null&&(c.lanes|=i),Sg(s.return,i,a)}function xj(s,i,a,c,d){var g=s.memoizedState;g===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:d}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=d)}function yj(s,i,a){var c=i.pendingProps,d=c.revealOrder,g=c.tail;if(Yi(s,i,c.children,a),c=M.current,c&2)c=c&1|2,i.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&wj(s,a,i);else if(s.tag===19)wj(s,a,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}c&=1}if(G(M,c),!(i.mode&1))i.memoizedState=null;else switch(d){case"forwards":for(a=i.child,d=null;a!==null;)s=a.alternate,s!==null&&Mh(s)===null&&(d=a),a=a.sibling;a=d,a===null?(d=i.child,i.child=null):(d=a.sibling,a.sibling=null),xj(i,!1,d,a,g);break;case"backwards":for(a=null,d=i.child,i.child=null;d!==null;){if(s=d.alternate,s!==null&&Mh(s)===null){i.child=d;break}s=d.sibling,d.sibling=a,a=d,d=s}xj(i,!0,a,null,g);break;case"together":xj(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function jj(s,i){!(i.mode&1)&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function $i(s,i,a){if(s!==null&&(i.dependencies=s.dependencies),hh|=i.lanes,!(a&i.childLanes))return null;if(s!==null&&i.child!==s.child)throw Error(p$2(153));if(i.child!==null){for(s=i.child,a=wh(s,s.pendingProps),i.child=a,a.return=i;s.sibling!==null;)s=s.sibling,a=a.sibling=wh(s,s.pendingProps),a.return=i;a.sibling=null}return i.child}function zj(s,i,a){switch(i.tag){case 3:lj(i),Ig();break;case 5:Kh(i);break;case 1:Zf(i.type)&&cg(i);break;case 4:Ih(i,i.stateNode.containerInfo);break;case 10:var c=i.type._context,d=i.memoizedProps.value;G(Mg,c._currentValue),c._currentValue=d;break;case 13:if(c=i.memoizedState,c!==null)return c.dehydrated!==null?(G(M,M.current&1),i.flags|=128,null):a&i.child.childLanes?pj(s,i,a):(G(M,M.current&1),s=$i(s,i,a),s!==null?s.sibling:null);G(M,M.current&1);break;case 19:if(c=(a&i.childLanes)!==0,s.flags&128){if(c)return yj(s,i,a);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),G(M,M.current),c)break;return null;case 22:case 23:return i.lanes=0,ej(s,i,a)}return $i(s,i,a)}var Aj,Bj,Cj,Dj;Aj=function(s,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}};Bj=function(){};Cj=function(s,i,a,c){var d=s.memoizedProps;if(d!==c){s=i.stateNode,Hh(Eh.current);var g=null;switch(a){case"input":d=Ya(s,d),c=Ya(s,c),g=[];break;case"select":d=A({},d,{value:void 0}),c=A({},c,{value:void 0}),g=[];break;case"textarea":d=gb(s,d),c=gb(s,c),g=[];break;default:typeof d.onClick!="function"&&typeof c.onClick=="function"&&(s.onclick=Bf)}ub(a,c);var $;a=null;for(_e in d)if(!c.hasOwnProperty(_e)&&d.hasOwnProperty(_e)&&d[_e]!=null)if(_e==="style"){var j=d[_e];for($ in j)j.hasOwnProperty($)&&(a||(a={}),a[$]="")}else _e!=="dangerouslySetInnerHTML"&&_e!=="children"&&_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&_e!=="autoFocus"&&(ea.hasOwnProperty(_e)?g||(g=[]):(g=g||[]).push(_e,null));for(_e in c){var _=c[_e];if(j=d!=null?d[_e]:void 0,c.hasOwnProperty(_e)&&_!==j&&(_!=null||j!=null))if(_e==="style")if(j){for($ in j)!j.hasOwnProperty($)||_&&_.hasOwnProperty($)||(a||(a={}),a[$]="");for($ in _)_.hasOwnProperty($)&&j[$]!==_[$]&&(a||(a={}),a[$]=_[$])}else a||(g||(g=[]),g.push(_e,a)),a=_;else _e==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,j=j?j.__html:void 0,_!=null&&j!==_&&(g=g||[]).push(_e,_)):_e==="children"?typeof _!="string"&&typeof _!="number"||(g=g||[]).push(_e,""+_):_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&(ea.hasOwnProperty(_e)?(_!=null&&_e==="onScroll"&&D("scroll",s),g||j===_||(g=[])):(g=g||[]).push(_e,_))}a&&(g=g||[]).push("style",a);var _e=g;(i.updateQueue=_e)&&(i.flags|=4)}};Dj=function(s,i,a,c){a!==c&&(i.flags|=4)};function Ej(s,i){if(!I)switch(s.tailMode){case"hidden":i=s.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?s.tail=null:a.sibling=null;break;case"collapsed":a=s.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:c.sibling=null}}function S(s){var i=s.alternate!==null&&s.alternate.child===s.child,a=0,c=0;if(i)for(var d=s.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags&14680064,c|=d.flags&14680064,d.return=s,d=d.sibling;else for(d=s.child;d!==null;)a|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=s,d=d.sibling;return s.subtreeFlags|=c,s.childLanes=a,i}function Fj(s,i,a){var c=i.pendingProps;switch(wg(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(i),null;case 1:return Zf(i.type)&&$f(),S(i),null;case 3:return c=i.stateNode,Jh(),E(Wf),E(H),Oh(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(s===null||s.child===null)&&(Gg(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&!(i.flags&256)||(i.flags|=1024,zg!==null&&(Gj(zg),zg=null))),Bj(s,i),S(i),null;case 5:Lh(i);var d=Hh(Gh.current);if(a=i.type,s!==null&&i.stateNode!=null)Cj(s,i,a,c,d),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!c){if(i.stateNode===null)throw Error(p$2(166));return S(i),null}if(s=Hh(Eh.current),Gg(i)){c=i.stateNode,a=i.type;var g=i.memoizedProps;switch(c[Of]=i,c[Pf]=g,s=(i.mode&1)!==0,a){case"dialog":D("cancel",c),D("close",c);break;case"iframe":case"object":case"embed":D("load",c);break;case"video":case"audio":for(d=0;d<lf.length;d++)D(lf[d],c);break;case"source":D("error",c);break;case"img":case"image":case"link":D("error",c),D("load",c);break;case"details":D("toggle",c);break;case"input":Za(c,g),D("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},D("invalid",c);break;case"textarea":hb(c,g),D("invalid",c)}ub(a,g),d=null;for(var $ in g)if(g.hasOwnProperty($)){var j=g[$];$==="children"?typeof j=="string"?c.textContent!==j&&(g.suppressHydrationWarning!==!0&&Af(c.textContent,j,s),d=["children",j]):typeof j=="number"&&c.textContent!==""+j&&(g.suppressHydrationWarning!==!0&&Af(c.textContent,j,s),d=["children",""+j]):ea.hasOwnProperty($)&&j!=null&&$==="onScroll"&&D("scroll",c)}switch(a){case"input":Va(c),db(c,g,!0);break;case"textarea":Va(c),jb(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=Bf)}c=d,i.updateQueue=c,c!==null&&(i.flags|=4)}else{$=d.nodeType===9?d:d.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=kb(a)),s==="http://www.w3.org/1999/xhtml"?a==="script"?(s=$.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof c.is=="string"?s=$.createElement(a,{is:c.is}):(s=$.createElement(a),a==="select"&&($=s,c.multiple?$.multiple=!0:c.size&&($.size=c.size))):s=$.createElementNS(s,a),s[Of]=i,s[Pf]=c,Aj(s,i,!1,!1),i.stateNode=s;e:{switch($=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;d<lf.length;d++)D(lf[d],s);d=c;break;case"source":D("error",s),d=c;break;case"img":case"image":case"link":D("error",s),D("load",s),d=c;break;case"details":D("toggle",s),d=c;break;case"input":Za(s,c),d=Ya(s,c),D("invalid",s);break;case"option":d=c;break;case"select":s._wrapperState={wasMultiple:!!c.multiple},d=A({},c,{value:void 0}),D("invalid",s);break;case"textarea":hb(s,c),d=gb(s,c),D("invalid",s);break;default:d=c}ub(a,d),j=d;for(g in j)if(j.hasOwnProperty(g)){var _=j[g];g==="style"?sb(s,_):g==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,_!=null&&nb(s,_)):g==="children"?typeof _=="string"?(a!=="textarea"||_!=="")&&ob(s,_):typeof _=="number"&&ob(s,""+_):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(ea.hasOwnProperty(g)?_!=null&&g==="onScroll"&&D("scroll",s):_!=null&&ta(s,g,_,$))}switch(a){case"input":Va(s),db(s,c,!1);break;case"textarea":Va(s),jb(s);break;case"option":c.value!=null&&s.setAttribute("value",""+Sa(c.value));break;case"select":s.multiple=!!c.multiple,g=c.value,g!=null?fb(s,!!c.multiple,g,!1):c.defaultValue!=null&&fb(s,!!c.multiple,c.defaultValue,!0);break;default:typeof d.onClick=="function"&&(s.onclick=Bf)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return S(i),null;case 6:if(s&&i.stateNode!=null)Dj(s,i,s.memoizedProps,c);else{if(typeof c!="string"&&i.stateNode===null)throw Error(p$2(166));if(a=Hh(Gh.current),Hh(Eh.current),Gg(i)){if(c=i.stateNode,a=i.memoizedProps,c[Of]=i,(g=c.nodeValue!==a)&&(s=xg,s!==null))switch(s.tag){case 3:Af(c.nodeValue,a,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Af(c.nodeValue,a,(s.mode&1)!==0)}g&&(i.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[Of]=i,i.stateNode=c}return S(i),null;case 13:if(E(M),c=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(I&&yg!==null&&i.mode&1&&!(i.flags&128))Hg(),Ig(),i.flags|=98560,g=!1;else if(g=Gg(i),c!==null&&c.dehydrated!==null){if(s===null){if(!g)throw Error(p$2(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(p$2(317));g[Of]=i}else Ig(),!(i.flags&128)&&(i.memoizedState=null),i.flags|=4;S(i),g=!1}else zg!==null&&(Gj(zg),zg=null),g=!0;if(!g)return i.flags&65536?i:null}return i.flags&128?(i.lanes=a,i):(c=c!==null,c!==(s!==null&&s.memoizedState!==null)&&c&&(i.child.flags|=8192,i.mode&1&&(s===null||M.current&1?T===0&&(T=3):uj())),i.updateQueue!==null&&(i.flags|=4),S(i),null);case 4:return Jh(),Bj(s,i),s===null&&sf(i.stateNode.containerInfo),S(i),null;case 10:return Rg(i.type._context),S(i),null;case 17:return Zf(i.type)&&$f(),S(i),null;case 19:if(E(M),g=i.memoizedState,g===null)return S(i),null;if(c=(i.flags&128)!==0,$=g.rendering,$===null)if(c)Ej(g,!1);else{if(T!==0||s!==null&&s.flags&128)for(s=i.child;s!==null;){if($=Mh(s),$!==null){for(i.flags|=128,Ej(g,!1),c=$.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),i.subtreeFlags=0,c=a,a=i.child;a!==null;)g=a,s=c,g.flags&=14680066,$=g.alternate,$===null?(g.childLanes=0,g.lanes=s,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=$.childLanes,g.lanes=$.lanes,g.child=$.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=$.memoizedProps,g.memoizedState=$.memoizedState,g.updateQueue=$.updateQueue,g.type=$.type,s=$.dependencies,g.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a=a.sibling;return G(M,M.current&1|2),i.child}s=s.sibling}g.tail!==null&&B()>Hj&&(i.flags|=128,c=!0,Ej(g,!1),i.lanes=4194304)}else{if(!c)if(s=Mh($),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"&&!$.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?($.sibling=i.child,i.child=$):(a=g.last,a!==null?a.sibling=$:i.child=$,g.last=$)}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 $=0,j=-1,_=-1,_e=0,et=0,tt=s,rt=null;t:for(;;){for(var nt;tt!==a||d!==0&&tt.nodeType!==3||(j=$+d),tt!==g||c!==0&&tt.nodeType!==3||(_=$+c),tt.nodeType===3&&($+=tt.nodeValue.length),(nt=tt.firstChild)!==null;)rt=tt,tt=nt;for(;;){if(tt===s)break t;if(rt===a&&++_e===d&&(j=$),rt===g&&++et===c&&(_=$),(nt=tt.nextSibling)!==null)break;tt=rt,rt=tt.parentNode}tt=nt}a=j===-1||_===-1?null:{start:j,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 ot=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ot!==null){var lt=ot.memoizedProps,ct=ot.memoizedState,it=i.stateNode,st=it.getSnapshotBeforeUpdate(i.elementType===i.type?lt:Lg(i.type,lt),ct);it.__reactInternalSnapshotBeforeUpdate=st}break;case 3:var at=i.stateNode.containerInfo;at.nodeType===1?at.textContent="":at.nodeType===9&&at.documentElement&&at.removeChild(at.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 ot=Oj,Oj=!1,ot}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,$=g.destroy;g=g.tag,$!==void 0&&(g&2||g&4)&&Nj(a,i,$),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(j){W(a,i,j)}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;c<a.length;c++){var d=a[c];try{var g=s,$=i,j=$;e:for(;j!==null;){switch(j.tag){case 5:X=j.stateNode,Yj=!1;break e;case 3:X=j.stateNode.containerInfo,Yj=!0;break e;case 4:X=j.stateNode.containerInfo,Yj=!0;break e}j=j.return}if(X===null)throw Error(p$2(160));ak(g,$,d),X=null,Yj=!1;var _=d.alternate;_!==null&&(_.return=null),d.return=null}catch(_e){W(d,i,_e)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)ek(i,s),i=i.sibling}function ek(s,i){var a=s.alternate,c=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(dk(i,s),fk(s),c&4){try{Qj(3,s,s.return),Rj(3,s)}catch(lt){W(s,s.return,lt)}try{Qj(5,s,s.return)}catch(lt){W(s,s.return,lt)}}break;case 1:dk(i,s),fk(s),c&512&&a!==null&&Mj(a,a.return);break;case 5:if(dk(i,s),fk(s),c&512&&a!==null&&Mj(a,a.return),s.flags&32){var d=s.stateNode;try{ob(d,"")}catch(lt){W(s,s.return,lt)}}if(c&4&&(d=s.stateNode,d!=null)){var g=s.memoizedProps,$=a!==null?a.memoizedProps:g,j=s.type,_=s.updateQueue;if(s.updateQueue=null,_!==null)try{j==="input"&&g.type==="radio"&&g.name!=null&&ab(d,g),vb(j,$);var _e=vb(j,g);for($=0;$<_.length;$+=2){var et=_[$],tt=_[$+1];et==="style"?sb(d,tt):et==="dangerouslySetInnerHTML"?nb(d,tt):et==="children"?ob(d,tt):ta(d,et,tt,_e)}switch(j){case"input":bb(d,g);break;case"textarea":ib(d,g);break;case"select":var rt=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!g.multiple;var nt=g.value;nt!=null?fb(d,!!g.multiple,nt,!1):rt!==!!g.multiple&&(g.defaultValue!=null?fb(d,!!g.multiple,g.defaultValue,!0):fb(d,!!g.multiple,g.multiple?[]:"",!1))}d[Pf]=g}catch(lt){W(s,s.return,lt)}}break;case 6:if(dk(i,s),fk(s),c&4){if(s.stateNode===null)throw Error(p$2(162));d=s.stateNode,g=s.memoizedProps;try{d.nodeValue=g}catch(lt){W(s,s.return,lt)}}break;case 3:if(dk(i,s),fk(s),c&4&&a!==null&&a.memoizedState.isDehydrated)try{bd(i.containerInfo)}catch(lt){W(s,s.return,lt)}break;case 4:dk(i,s),fk(s);break;case 13:dk(i,s),fk(s),d=s.child,d.flags&8192&&(g=d.memoizedState!==null,d.stateNode.isHidden=g,!g||d.alternate!==null&&d.alternate.memoizedState!==null||(gk=B())),c&4&&bk(s);break;case 22:if(et=a!==null&&a.memoizedState!==null,s.mode&1?(U=(_e=U)||et,dk(i,s),U=_e):dk(i,s),fk(s),c&8192){if(_e=s.memoizedState!==null,(s.stateNode.isHidden=_e)&&!et&&s.mode&1)for(V=s,et=s.child;et!==null;){for(tt=V=et;V!==null;){switch(rt=V,nt=rt.child,rt.tag){case 0:case 11:case 14:case 15:Qj(4,rt,rt.return);break;case 1:Mj(rt,rt.return);var ot=rt.stateNode;if(typeof ot.componentWillUnmount=="function"){c=rt,a=rt.return;try{i=c,ot.props=i.memoizedProps,ot.state=i.memoizedState,ot.componentWillUnmount()}catch(lt){W(c,a,lt)}}break;case 5:Mj(rt,rt.return);break;case 22:if(rt.memoizedState!==null){hk(tt);continue}}nt!==null?(nt.return=rt,V=nt):hk(tt)}et=et.sibling}e:for(et=null,tt=s;;){if(tt.tag===5){if(et===null){et=tt;try{d=tt.stateNode,_e?(g=d.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(j=tt.stateNode,_=tt.memoizedProps.style,$=_!=null&&_.hasOwnProperty("display")?_.display:null,j.style.display=rb("display",$))}catch(lt){W(s,s.return,lt)}}}else if(tt.tag===6){if(et===null)try{tt.stateNode.nodeValue=_e?"":tt.memoizedProps}catch(lt){W(s,s.return,lt)}}else if((tt.tag!==22&&tt.tag!==23||tt.memoizedState===null||tt===s)&&tt.child!==null){tt.child.return=tt,tt=tt.child;continue}if(tt===s)break e;for(;tt.sibling===null;){if(tt.return===null||tt.return===s)break e;et===tt&&(et=null),tt=tt.return}et===tt&&(et=null),tt.sibling.return=tt.return,tt=tt.sibling}}break;case 19:dk(i,s),fk(s),c&4&&bk(s);break;case 21:break;default:dk(i,s),fk(s)}}function fk(s){var i=s.flags;if(i&2){try{e:{for(var a=s.return;a!==null;){if(Uj(a)){var c=a;break e}a=a.return}throw Error(p$2(160))}switch(c.tag){case 5:var d=c.stateNode;c.flags&32&&(ob(d,""),c.flags&=-33);var g=Vj(s);Xj(s,g,d);break;case 3:case 4:var $=c.stateNode.containerInfo,j=Vj(s);Wj(s,j,$);break;default:throw Error(p$2(161))}}catch(_){W(s,s.return,_)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function ik(s,i,a){V=s,jk(s)}function jk(s,i,a){for(var c=(s.mode&1)!==0;V!==null;){var d=V,g=d.child;if(d.tag===22&&c){var $=d.memoizedState!==null||Kj;if(!$){var j=d.alternate,_=j!==null&&j.memoizedState!==null||U;j=Kj;var _e=U;if(Kj=$,(U=_)&&!_e)for(V=d;V!==null;)$=V,_=$.child,$.tag===22&&$.memoizedState!==null?kk(d):_!==null?(_.return=$,V=_):kk(d);for(;g!==null;)V=g,jk(g),g=g.sibling;V=d,Kj=j,U=_e}lk(s)}else d.subtreeFlags&8772&&g!==null?(g.return=d,V=g):lk(s)}}function lk(s){for(;V!==null;){var i=V;if(i.flags&8772){var a=i.alternate;try{if(i.flags&8772)switch(i.tag){case 0:case 11:case 15:U||Rj(5,i);break;case 1:var c=i.stateNode;if(i.flags&4&&!U)if(a===null)c.componentDidMount();else{var d=i.elementType===i.type?a.memoizedProps:Lg(i.type,a.memoizedProps);c.componentDidUpdate(d,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=i.updateQueue;g!==null&&ih(i,g,c);break;case 3:var $=i.updateQueue;if($!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}ih(i,$,a)}break;case 5:var j=i.stateNode;if(a===null&&i.flags&4){a=j;var _=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":_.autoFocus&&a.focus();break;case"img":_.src&&(a.src=_.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var _e=i.alternate;if(_e!==null){var et=_e.memoizedState;if(et!==null){var tt=et.dehydrated;tt!==null&&bd(tt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(p$2(163))}U||i.flags&512&&Sj(i)}catch(rt){W(i,i.return,rt)}}if(i===s){V=null;break}if(a=i.sibling,a!==null){a.return=i.return,V=a;break}V=i.return}}function hk(s){for(;V!==null;){var i=V;if(i===s){V=null;break}var a=i.sibling;if(a!==null){a.return=i.return,V=a;break}V=i.return}}function kk(s){for(;V!==null;){var i=V;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{Rj(4,i)}catch(_){W(i,a,_)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var d=i.return;try{c.componentDidMount()}catch(_){W(i,d,_)}}var g=i.return;try{Sj(i)}catch(_){W(i,g,_)}break;case 5:var $=i.return;try{Sj(i)}catch(_){W(i,$,_)}}}catch(_){W(i,i.return,_)}if(i===s){V=null;break}var j=i.sibling;if(j!==null){j.return=i.return,V=j;break}V=i.return}}var mk=Math.ceil,nk=ua.ReactCurrentDispatcher,ok=ua.ReactCurrentOwner,pk=ua.ReactCurrentBatchConfig,K=0,R=null,Y=null,Z=0,gj=0,fj=Uf(0),T=0,qk=null,hh=0,rk=0,sk=0,tk=null,uk=null,gk=0,Hj=1/0,vk=null,Pi=!1,Qi=null,Si=null,wk=!1,xk=null,yk=0,zk=0,Ak=null,Bk=-1,Ck=0;function L(){return K&6?B():Bk!==-1?Bk:Bk=B()}function lh(s){return s.mode&1?K&2&&Z!==0?Z&-Z:Kg.transition!==null?(Ck===0&&(Ck=yc()),Ck):(s=C,s!==0||(s=window.event,s=s===void 0?16:jd(s.type)),s):1}function mh(s,i,a,c){if(50<zk)throw zk=0,Ak=null,Error(p$2(185));Ac(s,a,c),(!(K&2)||s!==R)&&(s===R&&(!(K&2)&&(rk|=a),T===4&&Dk(s,Z)),Ek(s,c),a===1&&K===0&&!(i.mode&1)&&(Hj=B()+500,fg&&jg()))}function Ek(s,i){var a=s.callbackNode;wc(s,i);var c=uc(s,s===R?Z:0);if(c===0)a!==null&&bc(a),s.callbackNode=null,s.callbackPriority=0;else if(i=c&-c,s.callbackPriority!==i){if(a!=null&&bc(a),i===1)s.tag===0?ig(Fk.bind(null,s)):hg(Fk.bind(null,s)),Jf(function(){!(K&6)&&jg()}),a=null;else{switch(Dc(c)){case 1:a=fc;break;case 4:a=gc;break;case 16:a=hc;break;case 536870912:a=jc;break;default:a=hc}a=Gk(a,Hk.bind(null,s))}s.callbackPriority=i,s.callbackNode=a}}function Hk(s,i){if(Bk=-1,Ck=0,K&6)throw Error(p$2(327));var a=s.callbackNode;if(Ik()&&s.callbackNode!==a)return null;var c=uc(s,s===R?Z:0);if(c===0)return null;if(c&30||c&s.expiredLanes||i)i=Jk(s,c);else{i=c;var d=K;K|=2;var g=Kk();(R!==s||Z!==i)&&(vk=null,Hj=B()+500,Lk(s,i));do try{Mk();break}catch(j){Nk(s,j)}while(1);Qg(),nk.current=g,K=d,Y!==null?i=0:(R=null,Z=0,i=T)}if(i!==0){if(i===2&&(d=xc(s),d!==0&&(c=d,i=Ok(s,d))),i===1)throw a=qk,Lk(s,0),Dk(s,c),Ek(s,B()),a;if(i===6)Dk(s,c);else{if(d=s.current.alternate,!(c&30)&&!Pk(d)&&(i=Jk(s,c),i===2&&(g=xc(s),g!==0&&(c=g,i=Ok(s,g))),i===1))throw a=qk,Lk(s,0),Dk(s,c),Ek(s,B()),a;switch(s.finishedWork=d,s.finishedLanes=c,i){case 0:case 1:throw Error(p$2(345));case 2:Qk(s,uk,vk);break;case 3:if(Dk(s,c),(c&130023424)===c&&(i=gk+500-B(),10<i)){if(uc(s,0)!==0)break;if(d=s.suspendedLanes,(d&c)!==c){L(),s.pingedLanes|=s.suspendedLanes&d;break}s.timeoutHandle=Ff(Qk.bind(null,s,uk,vk),i);break}Qk(s,uk,vk);break;case 4:if(Dk(s,c),(c&4194240)===c)break;for(i=s.eventTimes,d=-1;0<c;){var $=31-oc(c);g=1<<$,$=i[$],$>d&&(d=$),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,10<c){s.timeoutHandle=Ff(Qk.bind(null,s,uk,vk),c);break}Qk(s,uk,vk);break;case 5:Qk(s,uk,vk);break;default:throw Error(p$2(329))}}}return Ek(s,B()),s.callbackNode===a?Hk.bind(null,s):null}function Ok(s,i){var a=tk;return s.current.memoizedState.isDehydrated&&(Lk(s,i).flags|=256),s=Jk(s,i),s!==2&&(i=uk,uk=a,i!==null&&Gj(i)),s}function Gj(s){uk===null?uk=s:uk.push.apply(uk,s)}function Pk(s){for(var i=s;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var d=a[c],g=d.getSnapshot;d=d.value;try{if(!He(g(),d))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Dk(s,i){for(i&=~sk,i&=~rk,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var a=31-oc(i),c=1<<a;s[a]=-1,i&=~c}}function Fk(s){if(K&6)throw Error(p$2(327));Ik();var i=uc(s,0);if(!(i&1))return Ek(s,B()),null;var a=Jk(s,i);if(s.tag!==0&&a===2){var c=xc(s);c!==0&&(i=c,a=Ok(s,c))}if(a===1)throw a=qk,Lk(s,0),Dk(s,i),Ek(s,B()),a;if(a===6)throw Error(p$2(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,Qk(s,uk,vk),Ek(s,B()),null}function Rk(s,i){var a=K;K|=1;try{return s(i)}finally{K=a,K===0&&(Hj=B()+500,fg&&jg())}}function Sk(s){xk!==null&&xk.tag===0&&!(K&6)&&Ik();var i=K;K|=1;var a=pk.transition,c=C;try{if(pk.transition=null,C=1,s)return s()}finally{C=c,pk.transition=a,K=i,!(K&6)&&jg()}}function Ij(){gj=fj.current,E(fj)}function Lk(s,i){s.finishedWork=null,s.finishedLanes=0;var a=s.timeoutHandle;if(a!==-1&&(s.timeoutHandle=-1,Gf(a)),Y!==null)for(a=Y.return;a!==null;){var c=a;switch(wg(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&$f();break;case 3:Jh(),E(Wf),E(H),Oh();break;case 5:Lh(c);break;case 4:Jh();break;case 13:E(M);break;case 19:E(M);break;case 10:Rg(c.type._context);break;case 22:case 23:Ij()}a=a.return}if(R=s,Y=s=wh(s.current,null),Z=gj=i,T=0,qk=null,sk=rk=hh=0,uk=tk=null,Wg!==null){for(i=0;i<Wg.length;i++)if(a=Wg[i],c=a.interleaved,c!==null){a.interleaved=null;var d=c.next,g=a.pending;if(g!==null){var $=g.next;g.next=d,c.next=$}a.pending=c}Wg=null}return s}function Nk(s,i){do{var a=Y;try{if(Qg(),Ph.current=ai,Sh){for(var c=N.memoizedState;c!==null;){var d=c.queue;d!==null&&(d.pending=null),c=c.next}Sh=!1}if(Rh=0,P=O=N=null,Th=!1,Uh=0,ok.current=null,a===null||a.return===null){T=1,qk=i,Y=null;break}e:{var g=s,$=a.return,j=a,_=i;if(i=Z,j.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){var _e=_,et=j,tt=et.tag;if(!(et.mode&1)&&(tt===0||tt===11||tt===15)){var rt=et.alternate;rt?(et.updateQueue=rt.updateQueue,et.memoizedState=rt.memoizedState,et.lanes=rt.lanes):(et.updateQueue=null,et.memoizedState=null)}var nt=Vi($);if(nt!==null){nt.flags&=-257,Wi(nt,$,j,g,i),nt.mode&1&&Ti(g,_e,i),i=nt,_=_e;var ot=i.updateQueue;if(ot===null){var lt=new Set;lt.add(_),i.updateQueue=lt}else ot.add(_);break e}else{if(!(i&1)){Ti(g,_e,i),uj();break e}_=Error(p$2(426))}}else if(I&&j.mode&1){var ct=Vi($);if(ct!==null){!(ct.flags&65536)&&(ct.flags|=256),Wi(ct,$,j,g,i),Jg(Ki(_,j));break e}}g=_=Ki(_,j),T!==4&&(T=2),tk===null?tk=[g]:tk.push(g),g=$;do{switch(g.tag){case 3:g.flags|=65536,i&=-i,g.lanes|=i;var it=Oi(g,_,i);fh(g,it);break e;case 1:j=_;var st=g.type,at=g.stateNode;if(!(g.flags&128)&&(typeof st.getDerivedStateFromError=="function"||at!==null&&typeof at.componentDidCatch=="function"&&(Si===null||!Si.has(at)))){g.flags|=65536,i&=-i,g.lanes|=i;var ut=Ri(g,j,i);fh(g,ut);break e}}g=g.return}while(g!==null)}Tk(a)}catch(dt){i=dt,Y===a&&a!==null&&(Y=a=a.return);continue}break}while(1)}function Kk(){var s=nk.current;return nk.current=ai,s===null?ai:s}function uj(){(T===0||T===3||T===2)&&(T=4),R===null||!(hh&268435455)&&!(rk&268435455)||Dk(R,Z)}function Jk(s,i){var a=K;K|=2;var c=Kk();(R!==s||Z!==i)&&(vk=null,Lk(s,i));do try{Uk();break}catch(d){Nk(s,d)}while(1);if(Qg(),K=a,nk.current=c,Y!==null)throw Error(p$2(261));return R=null,Z=0,T}function Uk(){for(;Y!==null;)Vk(Y)}function Mk(){for(;Y!==null&&!cc();)Vk(Y)}function Vk(s){var i=Wk(s.alternate,s,gj);s.memoizedProps=s.pendingProps,i===null?Tk(s):Y=i,ok.current=null}function Tk(s){var i=s;do{var a=i.alternate;if(s=i.return,i.flags&32768){if(a=Jj(a,i),a!==null){a.flags&=32767,Y=a;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{T=6,Y=null;return}}else if(a=Fj(a,i,gj),a!==null){Y=a;return}if(i=i.sibling,i!==null){Y=i;return}Y=i=s}while(i!==null);T===0&&(T=5)}function Qk(s,i,a){var c=C,d=pk.transition;try{pk.transition=null,C=1,Xk(s,i,a,c)}finally{pk.transition=d,C=c}return null}function Xk(s,i,a,c){do Ik();while(xk!==null);if(K&6)throw Error(p$2(327));a=s.finishedWork;var d=s.finishedLanes;if(a===null)return null;if(s.finishedWork=null,s.finishedLanes=0,a===s.current)throw Error(p$2(177));s.callbackNode=null,s.callbackPriority=0;var g=a.lanes|a.childLanes;if(Bc(s,g),s===R&&(Y=R=null,Z=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||wk||(wk=!0,Gk(hc,function(){return Ik(),null})),g=(a.flags&15990)!==0,a.subtreeFlags&15990||g){g=pk.transition,pk.transition=null;var $=C;C=1;var j=K;K|=4,ok.current=null,Pj(s,a),ek(a,s),Oe(Df),dd=!!Cf,Df=Cf=null,s.current=a,ik(a),dc(),K=j,C=$,pk.transition=g}else s.current=a;if(wk&&(wk=!1,xk=s,yk=d),g=s.pendingLanes,g===0&&(Si=null),mc(a.stateNode),Ek(s,B()),i!==null)for(c=s.onRecoverableError,a=0;a<i.length;a++)d=i[a],c(d.value,{componentStack:d.stack,digest:d.digest});if(Pi)throw Pi=!1,s=Qi,Qi=null,s;return yk&1&&s.tag!==0&&Ik(),g=s.pendingLanes,g&1?s===Ak?zk++:(zk=0,Ak=s):zk=0,jg(),null}function Ik(){if(xk!==null){var s=Dc(yk),i=pk.transition,a=C;try{if(pk.transition=null,C=16>s?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,$=g.child;if(V.flags&16){var j=g.deletions;if(j!==null){for(var _=0;_<j.length;_++){var _e=j[_];for(V=_e;V!==null;){var et=V;switch(et.tag){case 0:case 11:case 15:Qj(8,et,g)}var tt=et.child;if(tt!==null)tt.return=et,V=tt;else for(;V!==null;){et=V;var rt=et.sibling,nt=et.return;if(Tj(et),et===_e){V=null;break}if(rt!==null){rt.return=nt,V=rt;break}V=nt}}}var ot=g.alternate;if(ot!==null){var lt=ot.child;if(lt!==null){ot.child=null;do{var ct=lt.sibling;lt.sibling=null,lt=ct}while(lt!==null)}}V=g}}if(g.subtreeFlags&2064&&$!==null)$.return=g,V=$;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 it=g.sibling;if(it!==null){it.return=g.return,V=it;break e}V=g.return}}var st=s.current;for(V=st;V!==null;){$=V;var at=$.child;if($.subtreeFlags&2064&&at!==null)at.return=$,V=at;else e:for($=st;V!==null;){if(j=V,j.flags&2048)try{switch(j.tag){case 0:case 11:case 15:Rj(9,j)}}catch(dt){W(j,j.return,dt)}if(j===$){V=null;break e}var ut=j.sibling;if(ut!==null){ut.return=j.return,V=ut;break e}V=j.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 $=i.memoizedState;if(c=$.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.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,$=d.children,Ef(c,d)?$=null:g!==null&&Ef(c,g)&&(i.flags|=32),hj(s,i),Yi(s,i,$,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,$=d.value,G(Mg,c._currentValue),c._currentValue=$,g!==null)if(He(g.value,$)){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 j=g.dependencies;if(j!==null){$=g.child;for(var _=j.firstContext;_!==null;){if(_.context===c){if(g.tag===1){_=ch(-1,a&-a),_.tag=2;var _e=g.updateQueue;if(_e!==null){_e=_e.shared;var et=_e.pending;et===null?_.next=_:(_.next=et.next,et.next=_),_e.pending=_}}g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),Sg(g.return,a,i),j.lanes|=a;break}_=_.next}}else if(g.tag===10)$=g.type===i.type?null:g.child;else if(g.tag===18){if($=g.return,$===null)throw Error(p$2(341));$.lanes|=a,j=$.alternate,j!==null&&(j.lanes|=a),Sg($,a,i),$=g.sibling}else $=g.child;if($!==null)$.return=g;else for($=g;$!==null;){if($===i){$=null;break}if(g=$.sibling,g!==null){g.return=$.return,$=g;break}$=$.return}g=$}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 $=2;if(c=s,typeof s=="function")bj(s)&&($=1);else if(typeof s=="string")$=5;else e:switch(s){case ya:return Ah(a.children,d,g,i);case za:$=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:$=10;break e;case Ca:$=9;break e;case Da:$=11;break e;case Ga:$=14;break e;case Ha:$=16,c=null;break e}throw Error(p$2(130,s==null?s:typeof s,""))}return i=Bg($,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,$,j,_){return s=new bl(s,i,a,j,_),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<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wa,key:c==null?null:""+c,children:s,containerInfo:i,implementation:a}}function el(s){if(!s)return Vf;s=s._reactInternals;e:{if(Vb(s)!==s||s.tag!==1)throw Error(p$2(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Zf(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(p$2(171))}if(s.tag===1){var a=s.type;if(Zf(a))return bg(s,a,i)}return i}function fl(s,i,a,c,d,g,$,j,_){return s=cl(a,c,!0,s,d,g,$,j,_),s.context=el(null),a=s.current,c=L(),d=lh(a),g=ch(c,d),g.callback=i??null,dh(a,g,d),s.current.lanes=d,Ac(s,d,c),Ek(s,c),s}function gl(s,i,a,c){var d=i.current,g=L(),$=lh(d);return a=el(a),i.context===null?i.context=a:i.pendingContext=a,i=ch(g,$),i.payload={element:s},c=c===void 0?null:c,c!==null&&(i.callback=c),s=dh(d,i,$),s!==null&&(mh(s,d,$,g),eh(s,d,$)),$}function hl(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function il(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var a=s.retryLane;s.retryLane=a!==0&&a<i?a:i}}function jl(s,i){il(s,i),(s=s.alternate)&&il(s,i)}function kl(){return null}var ll=typeof reportError=="function"?reportError:function(s){console.error(s)};function ml(s){this._internalRoot=s}nl.prototype.render=ml.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(p$2(409));gl(s,i,null,null)};nl.prototype.unmount=ml.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;Sk(function(){gl(null,s,null,null)}),i[uf]=null}};function nl(s){this._internalRoot=s}nl.prototype.unstable_scheduleHydration=function(s){if(s){var i=Hc();s={blockedOn:null,target:s,priority:i};for(var a=0;a<Qc.length&&i!==0&&i<Qc[a].priority;a++);Qc.splice(a,0,s),a===0&&Vc(s)}};function ol(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function pl(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function ql(){}function rl(s,i,a,c,d){if(d){if(typeof c=="function"){var g=c;c=function(){var _e=hl($);g.call(_e)}}var $=fl(i,c,s,0,null,!1,!1,"",ql);return s._reactRootContainer=$,s[uf]=$.current,sf(s.nodeType===8?s.parentNode:s),Sk(),$}for(;d=s.lastChild;)s.removeChild(d);if(typeof c=="function"){var j=c;c=function(){var _e=hl(_);j.call(_e)}}var _=cl(s,0,!1,null,null,!1,!1,"",ql);return s._reactRootContainer=_,s[uf]=_.current,sf(s.nodeType===8?s.parentNode:s),Sk(function(){gl(i,_,a,c)}),_}function sl(s,i,a,c,d){var g=a._reactRootContainer;if(g){var $=g;if(typeof d=="function"){var j=d;d=function(){var _=hl($);j.call(_)}}gl(i,$,s,d)}else $=rl(a,i,s,d,c);return hl($)}Ec=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var a=tc(i.pendingLanes);a!==0&&(Cc(i,a|1),Ek(i,B()),!(K&6)&&(Hj=B()+500,jg()))}break;case 13:Sk(function(){var c=Zg(s,1);if(c!==null){var d=L();mh(c,s,1,d)}}),jl(s,1)}};Fc=function(s){if(s.tag===13){var i=Zg(s,134217728);if(i!==null){var a=L();mh(i,s,134217728,a)}jl(s,134217728)}};Gc=function(s){if(s.tag===13){var i=lh(s),a=Zg(s,i);if(a!==null){var c=L();mh(a,s,i,c)}jl(s,i)}};Hc=function(){return C};Ic=function(s,i){var a=C;try{return C=s,i()}finally{C=a}};yb=function(s,i,a){switch(i){case"input":if(bb(s,a),i=a.name,a.type==="radio"&&i!=null){for(a=s;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var c=a[i];if(c!==s&&c.form===s.form){var d=Db(c);if(!d)throw Error(p$2(90));Wa(c),bb(c,d)}}}break;case"textarea":ib(s,a);break;case"select":i=a.value,i!=null&&fb(s,!!a.multiple,i,!1)}};Gb=Rk;Hb=Sk;var tl={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Rk]},ul={findFiberByHostInstance:Wc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},vl={bundleType:ul.bundleType,version:ul.version,rendererPackageName:ul.rendererPackageName,rendererConfig:ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Zb(s),s===null?null:s.stateNode},findFiberByHostInstance:ul.findFiberByHostInstance||kl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{kc=wl.inject(vl),lc=wl}catch{}}reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl;reactDom_production_min.createPortal=function(s,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ol(i))throw Error(p$2(200));return dl(s,i,null,a)};reactDom_production_min.createRoot=function(s,i){if(!ol(s))throw Error(p$2(299));var a=!1,c="",d=ll;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onRecoverableError!==void 0&&(d=i.onRecoverableError)),i=cl(s,1,!1,null,null,a,!1,c,d),s[uf]=i.current,sf(s.nodeType===8?s.parentNode:s),new ml(i)};reactDom_production_min.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(p$2(188)):(s=Object.keys(s).join(","),Error(p$2(268,s)));return s=Zb(i),s=s===null?null:s.stateNode,s};reactDom_production_min.flushSync=function(s){return Sk(s)};reactDom_production_min.hydrate=function(s,i,a){if(!pl(i))throw Error(p$2(200));return sl(null,s,i,!0,a)};reactDom_production_min.hydrateRoot=function(s,i,a){if(!ol(s))throw Error(p$2(405));var c=a!=null&&a.hydratedSources||null,d=!1,g="",$=ll;if(a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&($=a.onRecoverableError)),i=fl(i,null,s,1,a??null,d,!1,g,$),s[uf]=i.current,sf(s),c)for(s=0;s<c.length;s++)a=c[s],d=a._getVersion,d=d(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,d]:i.mutableSourceEagerHydrationData.push(a,d);return new nl(i)};reactDom_production_min.render=function(s,i,a){if(!pl(i))throw Error(p$2(200));return sl(null,s,i,!1,a)};reactDom_production_min.unmountComponentAtNode=function(s){if(!pl(s))throw Error(p$2(40));return s._reactRootContainer?(Sk(function(){sl(null,null,s,!1,function(){s._reactRootContainer=null,s[uf]=null})}),!0):!1};reactDom_production_min.unstable_batchedUpdates=Rk;reactDom_production_min.unstable_renderSubtreeIntoContainer=function(s,i,a,c){if(!pl(a))throw Error(p$2(200));if(s==null||s._reactInternals===void 0)throw Error(p$2(38));return sl(s,i,a,!1,c)};reactDom_production_min.version="18.2.0-next-9e3b772b8-20220608";function checkDCE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"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:$,stale:j}=s;if($){if(c){if(i.queryHash!==hashQueryKeyByOptions($,i.options))return!1}else if(!partialMatchKey(i.queryKey,$))return!1}if(a!=="all"){const _=i.isActive();if(a==="active"&&!_||a==="inactive"&&_)return!1}return!(typeof j=="boolean"&&i.isStale()!==j||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,$=a?[]:{};let j=0;for(let _=0;_<g;_++){const _e=a?_:d[_];$[_e]=replaceEqualDeep(s[_e],i[_e]),$[_e]===s[_e]&&j++}return c===g&&j===c?s:$}return i}function shallowEqualObjects(s,i){if(s&&!i||i&&!s)return!1;for(const a in s)if(s[a]!==i[a])return!1;return!0}function isPlainArray(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function isPlainObject$4(s){if(!hasObjectPrototype(s))return!1;const i=s.constructor;if(typeof i>"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 Tr,Er,Mr,Ln,FocusManager=(Ln=class extends Subscribable{constructor(){super();Nt(this,Tr,void 0);Nt(this,Er,void 0);Nt(this,Mr,void 0);It(this,Mr,i=>{if(!isServer&&window.addEventListener){const a=()=>i();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){yt(this,Er)||this.setEventListener(yt(this,Mr))}onUnsubscribe(){var i;this.hasListeners()||((i=yt(this,Er))==null||i.call(this),It(this,Er,void 0))}setEventListener(i){var a;It(this,Mr,i),(a=yt(this,Er))==null||a.call(this),It(this,Er,i(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(i){yt(this,Tr)!==i&&(It(this,Tr,i),this.onFocus())}onFocus(){this.listeners.forEach(i=>{i()})}isFocused(){var i;return typeof yt(this,Tr)=="boolean"?yt(this,Tr):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},Tr=new WeakMap,Er=new WeakMap,Mr=new WeakMap,Ln),focusManager=new FocusManager,Ur,$r,Vr,Dn,OnlineManager=(Dn=class extends Subscribable{constructor(){super();Nt(this,Ur,!0);Nt(this,$r,void 0);Nt(this,Vr,void 0);It(this,Vr,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(){yt(this,$r)||this.setEventListener(yt(this,Vr))}onUnsubscribe(){var i;this.hasListeners()||((i=yt(this,$r))==null||i.call(this),It(this,$r,void 0))}setEventListener(i){var a;It(this,Vr,i),(a=yt(this,$r))==null||a.call(this),It(this,$r,i(this.setOnline.bind(this)))}setOnline(i){yt(this,Ur)!==i&&(It(this,Ur,i),this.listeners.forEach(c=>{c(i)}))}isOnline(){return yt(this,Ur)}},Ur=new WeakMap,$r=new WeakMap,Vr=new WeakMap,Dn),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,$;const j=new Promise((ct,it)=>{g=ct,$=it}),_=ct=>{var it;c||(nt(new CancelledError(ct)),(it=s.abort)==null||it.call(s))},_e=()=>{i=!0},et=()=>{i=!1},tt=()=>!focusManager.isFocused()||s.networkMode!=="always"&&!onlineManager.isOnline(),rt=ct=>{var it;c||(c=!0,(it=s.onSuccess)==null||it.call(s,ct),d==null||d(),g(ct))},nt=ct=>{var it;c||(c=!0,(it=s.onError)==null||it.call(s,ct),d==null||d(),$(ct))},ot=()=>new Promise(ct=>{var it;d=st=>{const at=c||!tt();return at&&ct(st),at},(it=s.onPause)==null||it.call(s)}).then(()=>{var ct;d=void 0,c||(ct=s.onContinue)==null||ct.call(s)}),lt=()=>{if(c)return;let ct;try{ct=s.fn()}catch(it){ct=Promise.reject(it)}Promise.resolve(ct).then(rt).catch(it=>{var mt;if(c)return;const st=s.retry??(isServer?0:3),at=s.retryDelay??defaultRetryDelay,ut=typeof at=="function"?at(a,it):at,dt=st===!0||typeof st=="number"&&a<st||typeof st=="function"&&st(a,it);if(i||!dt){nt(it);return}a++,(mt=s.onFail)==null||mt.call(s,a,it),sleep(ut).then(()=>{if(tt())return ot()}).then(()=>{i?nt(it):lt()})})};return canFetch(s.networkMode)?lt():ot().then(lt),{promise:j,cancel:_,continue:()=>(d==null?void 0:d())?j:Promise.resolve(),cancelRetry:_e,continueRetry:et}}function createNotifyManager(){let s=[],i=0,a=et=>{et()},c=et=>{et()};const d=et=>{let tt;i++;try{tt=et()}finally{i--,i||j()}return tt},g=et=>{i?s.push(et):scheduleMicrotask(()=>{a(et)})},$=et=>(...tt)=>{g(()=>{et(...tt)})},j=()=>{const et=s;s=[],et.length&&scheduleMicrotask(()=>{c(()=>{et.forEach(tt=>{a(tt)})})})};return{batch:d,batchCalls:$,schedule:g,setNotifyFunction:et=>{a=et},setBatchNotifyFunction:et=>{c=et}}}var notifyManager=createNotifyManager(),kr,Fn,Removable=(Fn=class{constructor(){Nt(this,kr,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&It(this,kr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(isServer?1/0:5*60*1e3))}clearGcTimeout(){yt(this,kr)&&(clearTimeout(yt(this,kr)),It(this,kr,void 0))}},kr=new WeakMap,Fn),Br,zr,ar,Sr,lr,tr,rn,Pr,Hr,xn,fr,yr,Mn,Query=(Mn=class extends Removable{constructor(i){super();Nt(this,Hr);Nt(this,fr);Nt(this,Br,void 0);Nt(this,zr,void 0);Nt(this,ar,void 0);Nt(this,Sr,void 0);Nt(this,lr,void 0);Nt(this,tr,void 0);Nt(this,rn,void 0);Nt(this,Pr,void 0);It(this,Pr,!1),It(this,rn,i.defaultOptions),Vt(this,Hr,xn).call(this,i.options),It(this,tr,[]),It(this,ar,i.cache),this.queryKey=i.queryKey,this.queryHash=i.queryHash,It(this,Br,i.state||getDefaultState$1(this.options)),this.state=yt(this,Br),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!yt(this,tr).length&&this.state.fetchStatus==="idle"&&yt(this,ar).remove(this)}setData(i,a){const c=replaceData(this.state.data,i,this.options);return Vt(this,fr,yr).call(this,{data:c,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),c}setState(i,a){Vt(this,fr,yr).call(this,{type:"setState",state:i,setStateOptions:a})}cancel(i){var c;const a=yt(this,Sr);return(c=yt(this,lr))==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(yt(this,Br))}isActive(){return yt(this,tr).some(i=>i.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||yt(this,tr).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=yt(this,tr).find(c=>c.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(a=yt(this,lr))==null||a.continue()}onOnline(){var a;const i=yt(this,tr).find(c=>c.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(a=yt(this,lr))==null||a.continue()}addObserver(i){yt(this,tr).includes(i)||(yt(this,tr).push(i),this.clearGcTimeout(),yt(this,ar).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){yt(this,tr).includes(i)&&(It(this,tr,yt(this,tr).filter(a=>a!==i)),yt(this,tr).length||(yt(this,lr)&&(yt(this,Pr)?yt(this,lr).cancel({revert:!0}):yt(this,lr).cancelRetry()),this.scheduleGc()),yt(this,ar).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return yt(this,tr).length}invalidate(){this.state.isInvalidated||Vt(this,fr,yr).call(this,{type:"invalidate"})}fetch(i,a){var _e,et,tt,rt;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if(yt(this,Sr))return(_e=yt(this,lr))==null||_e.continueRetry(),yt(this,Sr)}if(i&&Vt(this,Hr,xn).call(this,i),!this.options.queryFn){const nt=yt(this,tr).find(ot=>ot.options.queryFn);nt&&Vt(this,Hr,xn).call(this,nt.options)}const c=new AbortController,d={queryKey:this.queryKey,meta:this.meta},g=nt=>{Object.defineProperty(nt,"signal",{enumerable:!0,get:()=>(It(this,Pr,!0),c.signal)})};g(d);const $=()=>this.options.queryFn?(It(this,Pr,!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}'`)),j={fetchOptions:a,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:$};g(j),(et=this.options.behavior)==null||et.onFetch(j,this),It(this,zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((tt=j.fetchOptions)==null?void 0:tt.meta))&&Vt(this,fr,yr).call(this,{type:"fetch",meta:(rt=j.fetchOptions)==null?void 0:rt.meta});const _=nt=>{var ot,lt,ct,it;isCancelledError(nt)&&nt.silent||Vt(this,fr,yr).call(this,{type:"error",error:nt}),isCancelledError(nt)||((lt=(ot=yt(this,ar).config).onError)==null||lt.call(ot,nt,this),(it=(ct=yt(this,ar).config).onSettled)==null||it.call(ct,this.state.data,nt,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return It(this,lr,createRetryer({fn:j.fetchFn,abort:c.abort.bind(c),onSuccess:nt=>{var ot,lt,ct,it;if(typeof nt>"u"){_(new Error(`${this.queryHash} data is undefined`));return}this.setData(nt),(lt=(ot=yt(this,ar).config).onSuccess)==null||lt.call(ot,nt,this),(it=(ct=yt(this,ar).config).onSettled)==null||it.call(ct,nt,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:_,onFail:(nt,ot)=>{Vt(this,fr,yr).call(this,{type:"failed",failureCount:nt,error:ot})},onPause:()=>{Vt(this,fr,yr).call(this,{type:"pause"})},onContinue:()=>{Vt(this,fr,yr).call(this,{type:"continue"})},retry:j.options.retry,retryDelay:j.options.retryDelay,networkMode:j.options.networkMode})),It(this,Sr,yt(this,lr).promise),yt(this,Sr)}},Br=new WeakMap,zr=new WeakMap,ar=new WeakMap,Sr=new WeakMap,lr=new WeakMap,tr=new WeakMap,rn=new WeakMap,Pr=new WeakMap,Hr=new WeakSet,xn=function(i){this.options={...yt(this,rn),...i},this.updateGcTime(this.options.gcTime)},fr=new WeakSet,yr=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&&yt(this,zr)?{...yt(this,zr),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(()=>{yt(this,tr).forEach(c=>{c.onQueryUpdate()}),yt(this,ar).notify({query:this,type:"updated",action:i})})},Mn);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 pr,Un,QueryCache=(Un=class extends Subscribable{constructor(i={}){super();Nt(this,pr,void 0);this.config=i,It(this,pr,new Map)}build(i,a,c){const d=a.queryKey,g=a.queryHash??hashQueryKeyByOptions(d,a);let $=this.get(g);return $||($=new Query({cache:this,queryKey:d,queryHash:g,options:i.defaultQueryOptions(a),state:c,defaultOptions:i.getQueryDefaults(d)}),this.add($)),$}add(i){yt(this,pr).has(i.queryHash)||(yt(this,pr).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const a=yt(this,pr).get(i.queryHash);a&&(i.destroy(),a===i&&yt(this,pr).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return yt(this,pr).get(i)}getAll(){return[...yt(this,pr).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()})})}},pr=new WeakMap,Un),mr,nn,ir,Wr,hr,br,Vn,Mutation=(Vn=class extends Removable{constructor(i){super();Nt(this,hr);Nt(this,mr,void 0);Nt(this,nn,void 0);Nt(this,ir,void 0);Nt(this,Wr,void 0);this.mutationId=i.mutationId,It(this,nn,i.defaultOptions),It(this,ir,i.mutationCache),It(this,mr,[]),this.state=i.state||getDefaultState(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options={...yt(this,nn),...i},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){yt(this,mr).includes(i)||(yt(this,mr).push(i),this.clearGcTimeout(),yt(this,ir).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){It(this,mr,yt(this,mr).filter(a=>a!==i)),this.scheduleGc(),yt(this,ir).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){yt(this,mr).length||(this.state.status==="pending"?this.scheduleGc():yt(this,ir).remove(this))}continue(){var i;return((i=yt(this,Wr))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var d,g,$,j,_,_e,et,tt,rt,nt,ot,lt,ct,it,st,at,ut,dt,mt,ht;const a=()=>(It(this,Wr,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(i):Promise.reject(new Error("No mutationFn found")),onFail:(xt,wt)=>{Vt(this,hr,br).call(this,{type:"failed",failureCount:xt,error:wt})},onPause:()=>{Vt(this,hr,br).call(this,{type:"pause"})},onContinue:()=>{Vt(this,hr,br).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),yt(this,Wr).promise),c=this.state.status==="pending";try{if(!c){Vt(this,hr,br).call(this,{type:"pending",variables:i}),await((g=(d=yt(this,ir).config).onMutate)==null?void 0:g.call(d,i,this));const wt=await((j=($=this.options).onMutate)==null?void 0:j.call($,i));wt!==this.state.context&&Vt(this,hr,br).call(this,{type:"pending",context:wt,variables:i})}const xt=await a();return await((_e=(_=yt(this,ir).config).onSuccess)==null?void 0:_e.call(_,xt,i,this.state.context,this)),await((tt=(et=this.options).onSuccess)==null?void 0:tt.call(et,xt,i,this.state.context)),await((nt=(rt=yt(this,ir).config).onSettled)==null?void 0:nt.call(rt,xt,null,this.state.variables,this.state.context,this)),await((lt=(ot=this.options).onSettled)==null?void 0:lt.call(ot,xt,null,i,this.state.context)),Vt(this,hr,br).call(this,{type:"success",data:xt}),xt}catch(xt){try{throw await((it=(ct=yt(this,ir).config).onError)==null?void 0:it.call(ct,xt,i,this.state.context,this)),await((at=(st=this.options).onError)==null?void 0:at.call(st,xt,i,this.state.context)),await((dt=(ut=yt(this,ir).config).onSettled)==null?void 0:dt.call(ut,void 0,xt,this.state.variables,this.state.context,this)),await((ht=(mt=this.options).onSettled)==null?void 0:ht.call(mt,void 0,xt,i,this.state.context)),xt}finally{Vt(this,hr,br).call(this,{type:"error",error:xt})}}}},mr=new WeakMap,nn=new WeakMap,ir=new WeakMap,Wr=new WeakMap,hr=new WeakSet,br=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(()=>{yt(this,mr).forEach(c=>{c.onMutationUpdate(i)}),yt(this,ir).notify({mutation:this,type:"updated",action:i})})},Vn);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 cr,sn,Ar,Bn,MutationCache=(Bn=class extends Subscribable{constructor(i={}){super();Nt(this,cr,void 0);Nt(this,sn,void 0);Nt(this,Ar,void 0);this.config=i,It(this,cr,[]),It(this,sn,0)}build(i,a,c){const d=new Mutation({mutationCache:this,mutationId:++gn(this,sn)._,options:i.defaultMutationOptions(a),state:c});return this.add(d),d}add(i){yt(this,cr).push(i),this.notify({type:"added",mutation:i})}remove(i){It(this,cr,yt(this,cr).filter(a=>a!==i)),this.notify({type:"removed",mutation:i})}clear(){notifyManager.batch(()=>{yt(this,cr).forEach(i=>{this.remove(i)})})}getAll(){return yt(this,cr)}find(i){const a={exact:!0,...i};return yt(this,cr).find(c=>matchMutation(a,c))}findAll(i={}){return yt(this,cr).filter(a=>matchMutation(i,a))}notify(i){notifyManager.batch(()=>{this.listeners.forEach(a=>{a(i)})})}resumePausedMutations(){return It(this,Ar,(yt(this,Ar)??Promise.resolve()).then(()=>{const i=yt(this,cr).filter(a=>a.state.isPaused);return notifyManager.batch(()=>i.reduce((a,c)=>a.then(()=>c.continue().catch(noop$3)),Promise.resolve()))}).then(()=>{It(this,Ar,void 0)})),yt(this,Ar)}},cr=new WeakMap,sn=new WeakMap,Ar=new WeakMap,Bn);function infiniteQueryBehavior(s){return{onFetch:(i,a)=>{const c=async()=>{var ot,lt,ct,it,st;const d=i.options,g=(ct=(lt=(ot=i.fetchOptions)==null?void 0:ot.meta)==null?void 0:lt.fetchMore)==null?void 0:ct.direction,$=((it=i.state.data)==null?void 0:it.pages)||[],j=((st=i.state.data)==null?void 0:st.pageParams)||[],_={pages:[],pageParams:[]};let _e=!1;const et=at=>{Object.defineProperty(at,"signal",{enumerable:!0,get:()=>(i.signal.aborted?_e=!0:i.signal.addEventListener("abort",()=>{_e=!0}),i.signal)})},tt=i.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${i.options.queryHash}'`))),rt=async(at,ut,dt)=>{if(_e)return Promise.reject();if(ut==null&&at.pages.length)return Promise.resolve(at);const mt={queryKey:i.queryKey,pageParam:ut,direction:dt?"backward":"forward",meta:i.options.meta};et(mt);const ht=await tt(mt),{maxPages:xt}=i.options,wt=dt?addToStart:addToEnd;return{pages:wt(at.pages,ht,xt),pageParams:wt(at.pageParams,ut,xt)}};let nt;if(g&&$.length){const at=g==="backward",ut=at?getPreviousPageParam:getNextPageParam,dt={pages:$,pageParams:j},mt=ut(d,dt);nt=await rt(dt,mt,at)}else{nt=await rt(_,j[0]??d.initialPageParam);const at=s??$.length;for(let ut=1;ut<at;ut++){const dt=getNextPageParam(d,nt);nt=await rt(nt,dt)}}return nt};i.options.persister?i.fetchFn=()=>{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$1(s,i){return i?getNextPageParam(s,i)!=null:!1}function hasPreviousPage(s,i){return!i||!s.getPreviousPageParam?!1:getPreviousPageParam(s,i)!=null}var Jt,wr,jr,qr,Kr,Rr,Gr,Qr,zn,QueryClient=(zn=class{constructor(s={}){Nt(this,Jt,void 0);Nt(this,wr,void 0);Nt(this,jr,void 0);Nt(this,qr,void 0);Nt(this,Kr,void 0);Nt(this,Rr,void 0);Nt(this,Gr,void 0);Nt(this,Qr,void 0);It(this,Jt,s.queryCache||new QueryCache),It(this,wr,s.mutationCache||new MutationCache),It(this,jr,s.defaultOptions||{}),It(this,qr,new Map),It(this,Kr,new Map),It(this,Rr,0)}mount(){gn(this,Rr)._++,yt(this,Rr)===1&&(It(this,Gr,focusManager.subscribe(()=>{focusManager.isFocused()&&(this.resumePausedMutations(),yt(this,Jt).onFocus())})),It(this,Qr,onlineManager.subscribe(()=>{onlineManager.isOnline()&&(this.resumePausedMutations(),yt(this,Jt).onOnline())})))}unmount(){var s,i;gn(this,Rr)._--,yt(this,Rr)===0&&((s=yt(this,Gr))==null||s.call(this),It(this,Gr,void 0),(i=yt(this,Qr))==null||i.call(this),It(this,Qr,void 0))}isFetching(s){return yt(this,Jt).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return yt(this,wr).findAll({...s,status:"pending"}).length}getQueryData(s){var i;return(i=yt(this,Jt).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=yt(this,Jt).find({queryKey:s}),d=c==null?void 0:c.state.data,g=functionalUpdate(i,d);if(typeof g>"u")return;const $=this.defaultQueryOptions({queryKey:s});return yt(this,Jt).build(this,$).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=yt(this,Jt).find({queryKey:s}))==null?void 0:i.state}removeQueries(s){const i=yt(this,Jt);notifyManager.batch(()=>{i.findAll(s).forEach(a=>{i.remove(a)})})}resetQueries(s,i){const a=yt(this,Jt),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(()=>yt(this,Jt).findAll(s).map(d=>d.cancel(a)));return Promise.all(c).then(noop$3).catch(noop$3)}invalidateQueries(s={},i={}){return notifyManager.batch(()=>{if(yt(this,Jt).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(()=>yt(this,Jt).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=yt(this,Jt).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 yt(this,wr).resumePausedMutations()}getQueryCache(){return yt(this,Jt)}getMutationCache(){return yt(this,wr)}getDefaultOptions(){return yt(this,jr)}setDefaultOptions(s){It(this,jr,s)}setQueryDefaults(s,i){yt(this,qr).set(hashKey(s),{queryKey:s,defaultOptions:i})}getQueryDefaults(s){const i=[...yt(this,qr).values()];let a={};return i.forEach(c=>{partialMatchKey(s,c.queryKey)&&(a={...a,...c.defaultOptions})}),a}setMutationDefaults(s,i){yt(this,Kr).set(hashKey(s),{mutationKey:s,defaultOptions:i})}getMutationDefaults(s){const i=[...yt(this,Kr).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={...yt(this,jr).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:{...yt(this,jr).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){yt(this,Jt).clear(),yt(this,wr).clear()}},Jt=new WeakMap,wr=new WeakMap,jr=new WeakMap,qr=new WeakMap,Kr=new WeakMap,Rr=new WeakMap,Gr=new WeakMap,Qr=new WeakMap,zn),or,Wt,Yr,rr,Ir,Xr,gr,on,Zr,Jr,Or,Nr,_r,Lr,Dr,tn,an,wn,ln,jn,cn,Rn,un,_n,dn,Cn,fn,Tn,pn,kn,vn,qn,Hn,QueryObserver=(Hn=class extends Subscribable{constructor(i,a){super();Nt(this,Dr);Nt(this,an);Nt(this,ln);Nt(this,cn);Nt(this,un);Nt(this,dn);Nt(this,fn);Nt(this,pn);Nt(this,vn);Nt(this,or,void 0);Nt(this,Wt,void 0);Nt(this,Yr,void 0);Nt(this,rr,void 0);Nt(this,Ir,void 0);Nt(this,Xr,void 0);Nt(this,gr,void 0);Nt(this,on,void 0);Nt(this,Zr,void 0);Nt(this,Jr,void 0);Nt(this,Or,void 0);Nt(this,Nr,void 0);Nt(this,_r,void 0);Nt(this,Lr,void 0);It(this,Wt,void 0),It(this,Yr,void 0),It(this,rr,void 0),It(this,Lr,new Set),It(this,or,i),this.options=a,It(this,gr,null),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(yt(this,Wt).addObserver(this),shouldFetchOnMount(yt(this,Wt),this.options)&&Vt(this,Dr,tn).call(this),Vt(this,un,_n).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(yt(this,Wt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(yt(this,Wt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Vt(this,dn,Cn).call(this),Vt(this,fn,Tn).call(this),yt(this,Wt).removeObserver(this)}setOptions(i,a){const c=this.options,d=yt(this,Wt);if(this.options=yt(this,or).defaultQueryOptions(i),shallowEqualObjects(c,this.options)||yt(this,or).getQueryCache().notify({type:"observerOptionsUpdated",query:yt(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),Vt(this,pn,kn).call(this);const g=this.hasListeners();g&&shouldFetchOptionally(yt(this,Wt),d,this.options,c)&&Vt(this,Dr,tn).call(this),this.updateResult(a),g&&(yt(this,Wt)!==d||this.options.enabled!==c.enabled||this.options.staleTime!==c.staleTime)&&Vt(this,an,wn).call(this);const $=Vt(this,ln,jn).call(this);g&&(yt(this,Wt)!==d||this.options.enabled!==c.enabled||$!==yt(this,_r))&&Vt(this,cn,Rn).call(this,$)}getOptimisticResult(i){const a=yt(this,or).getQueryCache().build(yt(this,or),i),c=this.createResult(a,i);return shouldAssignObserverCurrentProperties(this,c)&&(It(this,rr,c),It(this,Xr,this.options),It(this,Ir,yt(this,Wt).state)),c}getCurrentResult(){return yt(this,rr)}trackResult(i){const a={};return Object.keys(i).forEach(c=>{Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:()=>(yt(this,Lr).add(c),i[c])})}),a}getCurrentQuery(){return yt(this,Wt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const a=yt(this,or).defaultQueryOptions(i),c=yt(this,or).getQueryCache().build(yt(this,or),a);return c.isFetchingOptimistic=!0,c.fetch().then(()=>this.createResult(c,a))}fetch(i){return Vt(this,Dr,tn).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),yt(this,rr)))}createResult(i,a){var mt;const c=yt(this,Wt),d=this.options,g=yt(this,rr),$=yt(this,Ir),j=yt(this,Xr),_e=i!==c?i.state:yt(this,Yr),{state:et}=i;let{error:tt,errorUpdatedAt:rt,fetchStatus:nt,status:ot}=et,lt=!1,ct;if(a._optimisticResults){const ht=this.hasListeners(),xt=!ht&&shouldFetchOnMount(i,a),wt=ht&&shouldFetchOptionally(i,c,a,d);(xt||wt)&&(nt=canFetch(i.options.networkMode)?"fetching":"paused",et.dataUpdatedAt||(ot="pending")),a._optimisticResults==="isRestoring"&&(nt="idle")}if(a.select&&typeof et.data<"u")if(g&&et.data===($==null?void 0:$.data)&&a.select===yt(this,on))ct=yt(this,Zr);else try{It(this,on,a.select),ct=a.select(et.data),ct=replaceData(g==null?void 0:g.data,ct,a),It(this,Zr,ct),It(this,gr,null)}catch(ht){It(this,gr,ht)}else ct=et.data;if(typeof a.placeholderData<"u"&&typeof ct>"u"&&ot==="pending"){let ht;if(g!=null&&g.isPlaceholderData&&a.placeholderData===(j==null?void 0:j.placeholderData))ht=g.data;else if(ht=typeof a.placeholderData=="function"?a.placeholderData((mt=yt(this,Jr))==null?void 0:mt.state.data,yt(this,Jr)):a.placeholderData,a.select&&typeof ht<"u")try{ht=a.select(ht),It(this,gr,null)}catch(xt){It(this,gr,xt)}typeof ht<"u"&&(ot="success",ct=replaceData(g==null?void 0:g.data,ht,a),lt=!0)}yt(this,gr)&&(tt=yt(this,gr),ct=yt(this,Zr),rt=Date.now(),ot="error");const it=nt==="fetching",st=ot==="pending",at=ot==="error",ut=st&&it;return{status:ot,fetchStatus:nt,isPending:st,isSuccess:ot==="success",isError:at,isInitialLoading:ut,isLoading:ut,data:ct,dataUpdatedAt:et.dataUpdatedAt,error:tt,errorUpdatedAt:rt,failureCount:et.fetchFailureCount,failureReason:et.fetchFailureReason,errorUpdateCount:et.errorUpdateCount,isFetched:et.dataUpdateCount>0||et.errorUpdateCount>0,isFetchedAfterMount:et.dataUpdateCount>_e.dataUpdateCount||et.errorUpdateCount>_e.errorUpdateCount,isFetching:it,isRefetching:it&&!st,isLoadingError:at&&et.dataUpdatedAt===0,isPaused:nt==="paused",isPlaceholderData:lt,isRefetchError:at&&et.dataUpdatedAt!==0,isStale:isStale(i,a),refetch:this.refetch}}updateResult(i){const a=yt(this,rr),c=this.createResult(yt(this,Wt),this.options);if(It(this,Ir,yt(this,Wt).state),It(this,Xr,this.options),shallowEqualObjects(c,a))return;yt(this,Ir).data!==void 0&&It(this,Jr,yt(this,Wt)),It(this,rr,c);const d={},g=()=>{if(!a)return!0;const{notifyOnChangeProps:$}=this.options,j=typeof $=="function"?$():$;if(j==="all"||!j&&!yt(this,Lr).size)return!0;const _=new Set(j??yt(this,Lr));return this.options.throwOnError&&_.add("error"),Object.keys(yt(this,rr)).some(_e=>{const et=_e;return yt(this,rr)[et]!==a[et]&&_.has(et)})};(i==null?void 0:i.listeners)!==!1&&g()&&(d.listeners=!0),Vt(this,vn,qn).call(this,{...d,...i})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Vt(this,un,_n).call(this)}},or=new WeakMap,Wt=new WeakMap,Yr=new WeakMap,rr=new WeakMap,Ir=new WeakMap,Xr=new WeakMap,gr=new WeakMap,on=new WeakMap,Zr=new WeakMap,Jr=new WeakMap,Or=new WeakMap,Nr=new WeakMap,_r=new WeakMap,Lr=new WeakMap,Dr=new WeakSet,tn=function(i){Vt(this,pn,kn).call(this);let a=yt(this,Wt).fetch(this.options,i);return i!=null&&i.throwOnError||(a=a.catch(noop$3)),a},an=new WeakSet,wn=function(){if(Vt(this,dn,Cn).call(this),isServer||yt(this,rr).isStale||!isValidTimeout(this.options.staleTime))return;const a=timeUntilStale(yt(this,rr).dataUpdatedAt,this.options.staleTime)+1;It(this,Or,setTimeout(()=>{yt(this,rr).isStale||this.updateResult()},a))},ln=new WeakSet,jn=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(yt(this,Wt)):this.options.refetchInterval)??!1},cn=new WeakSet,Rn=function(i){Vt(this,fn,Tn).call(this),It(this,_r,i),!(isServer||this.options.enabled===!1||!isValidTimeout(yt(this,_r))||yt(this,_r)===0)&&It(this,Nr,setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&Vt(this,Dr,tn).call(this)},yt(this,_r)))},un=new WeakSet,_n=function(){Vt(this,an,wn).call(this),Vt(this,cn,Rn).call(this,Vt(this,ln,jn).call(this))},dn=new WeakSet,Cn=function(){yt(this,Or)&&(clearTimeout(yt(this,Or)),It(this,Or,void 0))},fn=new WeakSet,Tn=function(){yt(this,Nr)&&(clearInterval(yt(this,Nr)),It(this,Nr,void 0))},pn=new WeakSet,kn=function(){const i=yt(this,or).getQueryCache().build(yt(this,or),this.options);if(i===yt(this,Wt))return;const a=yt(this,Wt);It(this,Wt,i),It(this,Yr,i.state),this.hasListeners()&&(a==null||a.removeObserver(this),i.addObserver(this))},vn=new WeakSet,qn=function(i){notifyManager.batch(()=>{i.listeners&&this.listeners.forEach(a=>{a(yt(this,rr))}),yt(this,or).getQueryCache().notify({query:yt(this,Wt),type:"observerResultsUpdated"})})},Hn);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 InfiniteQueryObserver=class extends QueryObserver{constructor(s,i){super(s,i)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(s,i){super.setOptions({...s,behavior:infiniteQueryBehavior()},i)}getOptimisticResult(s){return s.behavior=infiniteQueryBehavior(),super.getOptimisticResult(s)}fetchNextPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"backward"}}})}createResult(s,i){var _,_e,et,tt;const{state:a}=s,c=super.createResult(s,i),{isFetching:d,isRefetching:g}=c,$=d&&((_e=(_=a.fetchMeta)==null?void 0:_.fetchMore)==null?void 0:_e.direction)==="forward",j=d&&((tt=(et=a.fetchMeta)==null?void 0:et.fetchMore)==null?void 0:tt.direction)==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:hasNextPage$1(i,a.data),hasPreviousPage:hasPreviousPage(i,a.data),isFetchingNextPage:$,isFetchingPreviousPage:j,isRefetching:g&&!$&&!j}}},Cr,nr,ur,vr,en,yn,mn,Pn,Wn,MutationObserver$1=(Wn=class extends Subscribable{constructor(a,c){super();Nt(this,en);Nt(this,mn);Nt(this,Cr,void 0);Nt(this,nr,void 0);Nt(this,ur,void 0);Nt(this,vr,void 0);It(this,nr,void 0),It(this,Cr,a),this.setOptions(c),this.bindMethods(),Vt(this,en,yn).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=yt(this,Cr).defaultMutationOptions(a),shallowEqualObjects(c,this.options)||yt(this,Cr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:yt(this,ur),observer:this}),(d=yt(this,ur))==null||d.setOptions(this.options)}onUnsubscribe(){var a;this.hasListeners()||(a=yt(this,ur))==null||a.removeObserver(this)}onMutationUpdate(a){Vt(this,en,yn).call(this),Vt(this,mn,Pn).call(this,a)}getCurrentResult(){return yt(this,nr)}reset(){It(this,ur,void 0),Vt(this,en,yn).call(this),Vt(this,mn,Pn).call(this)}mutate(a,c){var d;return It(this,vr,c),(d=yt(this,ur))==null||d.removeObserver(this),It(this,ur,yt(this,Cr).getMutationCache().build(yt(this,Cr),this.options)),yt(this,ur).addObserver(this),yt(this,ur).execute(a)}},Cr=new WeakMap,nr=new WeakMap,ur=new WeakMap,vr=new WeakMap,en=new WeakSet,yn=function(){var c;const a=((c=yt(this,ur))==null?void 0:c.state)??getDefaultState();It(this,nr,{...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset})},mn=new WeakSet,Pn=function(a){notifyManager.batch(()=>{var c,d,g,$,j,_,_e,et;yt(this,vr)&&this.hasListeners()&&((a==null?void 0:a.type)==="success"?((d=(c=yt(this,vr)).onSuccess)==null||d.call(c,a.data,yt(this,nr).variables,yt(this,nr).context),($=(g=yt(this,vr)).onSettled)==null||$.call(g,a.data,null,yt(this,nr).variables,yt(this,nr).context)):(a==null?void 0:a.type)==="error"&&((_=(j=yt(this,vr)).onError)==null||_.call(j,a.error,yt(this,nr).variables,yt(this,nr).context),(et=(_e=yt(this,vr)).onSettled)==null||et.call(_e,void 0,a.error,yt(this,nr).variables,yt(this,nr).context))),this.listeners.forEach(tt=>{tt(yt(this,nr))})})},Wn),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(),$=c.defaultQueryOptions(s);$._optimisticResults=d?"isRestoring":"optimistic",ensureStaleTime($),ensurePreventErrorBoundaryRetry($,g),useClearResetErrorBoundary(g);const[j]=reactExports.useState(()=>new i(c,$)),_=j.getOptimisticResult($);if(reactExports.useSyncExternalStore(reactExports.useCallback(_e=>{const et=d?()=>{}:j.subscribe(notifyManager.batchCalls(_e));return j.updateResult(),et},[j,d]),()=>j.getCurrentResult(),()=>j.getCurrentResult()),reactExports.useEffect(()=>{j.setOptions($,{listeners:!1})},[$,j]),shouldSuspend($,_,d))throw fetchOptimistic($,j,g);if(getHasError({result:_,errorResetBoundary:g,throwOnError:$.throwOnError,query:j.getCurrentQuery()}))throw _.error;return $.notifyOnChangeProps?_:j.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($=>c.subscribe(notifyManager.batchCalls($)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g=reactExports.useCallback(($,j)=>{c.mutate($,j).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(){}function useInfiniteQuery(s,i){return useBaseQuery(s,InfiniteQueryObserver,i)}const MotionConfigContext=reactExports.createContext({transformPagePoint:s=>s,isStatic:!1,reducedMotion:"never"}),MotionContext=reactExports.createContext({}),PresenceContext=reactExports.createContext(null),isBrowser=typeof document<"u",useIsomorphicLayoutEffect=isBrowser?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),$=reactExports.useContext(PresenceContext),j=reactExports.useContext(MotionConfigContext).reducedMotion,_=reactExports.useRef();c=c||g.renderer,!_.current&&c&&(_.current=c(s,{visualState:i,parent:d,props:a,presenceContext:$,blockInitialAnimation:$?$.initial===!1:!1,reducedMotionConfig:j}));const _e=_.current;reactExports.useInsertionEffect(()=>{_e&&_e.update(a,$)});const et=reactExports.useRef(!!window.HandoffAppearAnimations);return useIsomorphicLayoutEffect(()=>{_e&&(_e.render(),et.current&&_e.animationState&&_e.animationState.animateChanges())}),reactExports.useEffect(()=>{_e&&(_e.updateFeatures(),!et.current&&_e.animationState&&_e.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,et.current=!1)}),_e}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(j,_){let _e;const et={...reactExports.useContext(MotionConfigContext),...j,layoutId:useLayoutId(j)},{isStatic:tt}=et,rt=useCreateMotionContext(j),nt=c(j,tt);if(!tt&&isBrowser){rt.visualElement=useVisualElement(d,nt,et,i);const ot=reactExports.useContext(SwitchLayoutGroupContext),lt=reactExports.useContext(LazyContext).strict;rt.visualElement&&(_e=rt.visualElement.loadFeatures(et,lt,s,ot))}return reactExports.createElement(MotionContext.Provider,{value:rt},_e&&rt.visualElement?reactExports.createElement(_e,{visualElement:rt.visualElement,...et}):null,a(d,j,useMotionRef(nt,rt.visualElement,_),nt,tt,rt.visualElement))}const $=reactExports.forwardRef(g);return $[motionComponentSymbol]=d,$}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 $=0;$<numTransforms;$++){const j=transformPropOrder[$];if(s[j]!==void 0){const _=translateAlias[j]||j;g+=`${_}(${s[j]}) `}}return i&&!s.z&&(g+="translateZ(0)"),g=g.trim(),d?g=d(s,c?"":g):a&&c&&(g="none"),g}const checkStringStartsWith=s=>i=>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:$,transformOrigin:j}=s;let _=!1,_e=!1,et=!0;for(const tt in i){const rt=i[tt];if(isCSSVariableName(tt)){g[tt]=rt;continue}const nt=numberValueTypes[tt],ot=getValueAsType(rt,nt);if(transformProps.has(tt)){if(_=!0,$[tt]=ot,!et)continue;rt!==(nt.default||0)&&(et=!1)}else tt.startsWith("origin")?(_e=!0,j[tt]=ot):d[tt]=ot}if(i.transform||(_||c?d.transform=buildTransform(s.transform,a,et,c):d.transform&&(d.transform="none")),_e){const{originX:tt="50%",originY:rt="50%",originZ:nt=0}=j;d.transformOrigin=`${tt} ${rt} ${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 $=px.transform(i),j=px.transform(a);s[g.array]=`${$} ${j}`}function buildSVGAttrs(s,{attrX:i,attrY:a,attrScale:c,originX:d,originY:g,pathLength:$,pathSpacing:j=1,pathOffset:_=0,..._e},et,tt,rt){if(buildHTMLStyles(s,_e,et,rt),tt){s.style.viewBox&&(s.attrs.viewBox=s.style.viewBox);return}s.attrs=s.style,s.style={};const{attrs:nt,style:ot,dimensions:lt}=s;nt.transform&&(lt&&(ot.transform=nt.transform),delete nt.transform),lt&&(d!==void 0||g!==void 0||ot.transform)&&(ot.transformOrigin=calcSVGTransformOrigin(lt,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),$!==void 0&&buildSVGPath(nt,$,j,_,!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},$)=>{const _=(isSVGComponent(a)?useSVGProps:useHTMLProps)(c,g,$,a),et={...filterProps(c,typeof a=="string",s),..._,ref:d},{children:tt}=c,rt=reactExports.useMemo(()=>isMotionValue(tt)?tt.get():tt,[tt]);return reactExports.createElement(a,{...et,children:rt})}}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 $={latestValues:makeLatestValues(c,d,g,s),renderState:i()};return a&&($.mount=j=>a(c,j,$)),$}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 rt in g)d[rt]=resolveMotionValue(g[rt]);let{initial:$,animate:j}=s;const _=isControllingVariants(s),_e=isVariantNode(s);i&&_e&&!_&&s.inherit!==!1&&($===void 0&&($=i.initial),j===void 0&&(j=i.animate));let et=a?a.initial===!1:!1;et=et||$===!1;const tt=et?j:$;return tt&&typeof tt!="boolean"&&!isAnimationControls(tt)&&(Array.isArray(tt)?tt:[tt]).forEach(nt=>{const ot=resolveVariantFromProps(s,nt);if(!ot)return;const{transitionEnd:lt,transition:ct,...it}=ot;for(const st in it){let at=it[st];if(Array.isArray(at)){const ut=et?at.length-1:0;at=at[ut]}at!==null&&(d[st]=at)}for(const st in lt)d[st]=lt[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 $=new WeakSet,j={schedule:(_,_e=!1,et=!1)=>{const tt=et&&d,rt=tt?i:a;return _e&&$.add(_),rt.add(_)&&tt&&d&&(c=i.order.length),_},cancel:_=>{a.remove(_),$.delete(_)},process:_=>{if(d){g=!0;return}if(d=!0,[i,a]=[a,i],a.clear(),c=i.order.length,c)for(let _e=0;_e<c;_e++){const et=i.order[_e];et(_),$.has(et)&&(j.schedule(et),s())}d=!1,g&&(g=!1,j.process(_))}};return j}const stepsOrder=["prepare","read","update","preRender","render","postRender"],maxElapsed=40;function createRenderBatcher(s,i){let a=!1,c=!0;const d={delta:0,timestamp:0,isProcessing:!1},g=stepsOrder.reduce((tt,rt)=>(tt[rt]=createRenderStep(()=>a=!0),tt),{}),$=tt=>g[tt].process(d),j=()=>{const tt=performance.now();a=!1,d.delta=c?1e3/60:Math.max(Math.min(tt-d.timestamp,maxElapsed),1),d.timestamp=tt,d.isProcessing=!0,stepsOrder.forEach($),d.isProcessing=!1,a&&i&&(c=!1,s(j))},_=()=>{a=!0,c=!0,d.isProcessing||s(j)};return{schedule:stepsOrder.reduce((tt,rt)=>{const nt=g[rt];return tt[rt]=(ot,lt=!1,ct=!1)=>(a||_(),nt.schedule(ot,lt,ct)),tt},{}),cancel:tt=>stepsOrder.forEach(rt=>g[rt].cancel(tt)),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,$)=>{if(g.type==="touch"||isDragActive())return;const j=s.getProps();s.animationState&&j.whileHover&&s.animationState.setActive("whileHover",i),j[c]&&frame.update(()=>j[c](g,$))};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",(j,_)=>{if(!this.checkPressEnd())return;const{onTap:_e,onTapCancel:et}=this.node.getProps();frame.update(()=>{isNodeOrChild(this.node.current,j.target)?_e&&_e(j,_):et&&et(j,_)})},{passive:!(c.onTap||c.onPointerUp)}),$=addPointerEvent(window,"pointercancel",(j,_)=>this.cancelPress(j,_),{passive:!(c.onTapCancel||c.onPointerCancel)});this.removeEndListeners=pipe(g,$),this.startPress(i,a)},this.startAccessiblePress=()=>{const i=g=>{if(g.key!=="Enter"||this.isPressing)return;const $=j=>{j.key!=="Enter"||!this.checkPressEnd()||fireSyntheticPointerEvent("up",(_,_e)=>{const{onTap:et}=this.node.getProps();et&&frame.update(()=>et(_,_e))})};this.removeEndListeners(),this.removeEndListeners=addDomEvent(this.node.current,"keyup",$),fireSyntheticPointerEvent("down",(j,_)=>{this.startPress(j,_)})},a=addDomEvent(this.node.current,"keydown",i),c=()=>{this.isPressing&&fireSyntheticPointerEvent("cancel",(g,$)=>this.cancelPress(g,$))},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,$={root:a?a.current:void 0,rootMargin:c,threshold:typeof d=="number"?d:thresholdNames[d]},j=_=>{const{isIntersecting:_e}=_;if(this.isInView===_e||(this.isInView=_e,g&&!_e&&this.hasEnteredView))return;_e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",_e);const{onViewportEnter:et,onViewportLeave:tt}=this.node.getProps(),rt=_e?et:tt;rt&&rt(_)};return observeIntersection(this.node.current,$,j)}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;c<a;c++)if(i[c]!==s[c])return!1;return!0}function getCurrent(s){const i={};return s.values.forEach((a,c)=>i[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=noop$1,invariant=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:$="loop",ease:j,times:_}={}){const _e={[i]:a};_&&(_e.offset=_);const et=mapEasingToNativeEasing(j);return Array.isArray(et)&&(_e.easing=et),s.animate(_e,{delay:c,duration:d,easing:Array.isArray(et)?"linear":et,fill:"both",iterations:g+1,direction:$==="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,$,j=0;do $=i+(a-i)/2,g=calcBezier($,c,d)-s,g>0?a=$:i=$;while(Math.abs(g)>subdivisionPrecision&&++j<subdivisionMaxIterations);return $}function cubicBezier(s,i,a,c){if(s===i&&a===c)return noop$1;const d=g=>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(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,$,j]=c.match(floatRegex);return{[s]:parseFloat(d),[i]:parseFloat(g),[a]:parseFloat($),alpha:j!==void 0?parseFloat(j):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,$=0;if(!i)d=g=$=a;else{const j=a<.5?a*(1+i):a+i-a*i,_=2*a-j;d=hueToRgb(_,j,s+1/3),g=hueToRgb(_,j,s),$=hueToRgb(_,j,s-1/3)}return{red:Math.round(d*255),green:Math.round(g*255),blue:Math.round($*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 $=>{let j=d;for(let _=0;_<g;_++)_<c?j=j.replace(cssVarTokeniser.token,$[_]):_<c+a?j=j.replace(colorTokeniser.token,color.transform($[_])):j=j.replace(numberTokeniser.token,sanitize($[_]));return j}}const convertNumbersToZero=s=>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,$)=>getMixer(g,i[$]));return g=>{for(let $=0;$<c;$++)a[$]=d[$](g);return a}},mixObject=(s,i)=>{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 $=0;$<g;$++){let j=d(s[$],s[$+1]);if(i){const _=Array.isArray(i)?i[$]||noop$1:i;j=pipe(_,j)}c.push(j)}return c}function interpolate(s,i,{clamp:a=!0,ease:c,mixer:d}={}){const g=s.length;if(invariant(g===i.length),g===1)return()=>i[0];s[0]>s[g-1]&&(s=[...s].reverse(),i=[...i].reverse());const $=createMixers(i,c,d),j=$.length,_=_e=>{let et=0;if(j>1)for(;et<s.length-2&&!(_e<s[et+1]);et++);const tt=progress(s[et],s[et+1],_e);return $[et](tt)};return a?_e=>_(clamp$2(s[0],s[g-1],_e)):_}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]},$=convertOffsetToTimes(a&&a.length===i.length?a:defaultOffset(i),s),j=interpolate($,i,{ease:Array.isArray(d)?d:defaultEasing(i,d)});return{calculatedDuration:s,next:_=>(g.value=j(_),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(s<=secondsToMilliseconds(maxDuration$1));let $=1-i;$=clamp$2(minDamping,maxDamping,$),s=clamp$2(minDuration,maxDuration$1,millisecondsToSeconds(s)),$<1?(d=_e=>{const et=_e*$,tt=et*s,rt=et-a,nt=calcAngularFreq(_e,$),ot=Math.exp(-tt);return safeMin-rt/nt*ot},g=_e=>{const tt=_e*$*s,rt=tt*a+a,nt=Math.pow($,2)*Math.pow(_e,2)*s,ot=Math.exp(-tt),lt=calcAngularFreq(Math.pow(_e,2),$);return(-d(_e)+safeMin>0?-1:1)*((rt-nt)*ot)/lt}):(d=_e=>{const et=Math.exp(-_e*s),tt=(_e-a)*s+1;return-safeMin+et*tt},g=_e=>{const et=Math.exp(-_e*s),tt=(a-_e)*(s*s);return et*tt});const j=5/s,_=approximateRoot(d,g,j);if(s=secondsToMilliseconds(s),isNaN(_))return{stiffness:100,damping:10,duration:s};{const _e=Math.pow(_,2)*c;return{stiffness:_e,damping:$*2*Math.sqrt(c*_e),duration:s}}}const rootIterations=12;function approximateRoot(s,i,a){let c=a;for(let d=1;d<rootIterations;d++)c=c-s(c)/i(c);return c}function calcAngularFreq(s,i){return s*Math.sqrt(1-i*i)}const durationKeys=["duration","bounce"],physicsKeys=["stiffness","damping","mass"];function isSpringType(s,i){return i.some(a=>s[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],$={done:!1,value:d},{stiffness:j,damping:_,mass:_e,velocity:et,duration:tt,isResolvedFromDuration:rt}=getSpringOptions(c),nt=et?-millisecondsToSeconds(et):0,ot=_/(2*Math.sqrt(j*_e)),lt=g-d,ct=millisecondsToSeconds(Math.sqrt(j/_e)),it=Math.abs(lt)<5;a||(a=it?.01:2),i||(i=it?.005:.5);let st;if(ot<1){const at=calcAngularFreq(ct,ot);st=ut=>{const dt=Math.exp(-ot*ct*ut);return g-dt*((nt+ot*ct*lt)/at*Math.sin(at*ut)+lt*Math.cos(at*ut))}}else if(ot===1)st=at=>g-Math.exp(-ct*at)*(lt+(nt+ct*lt)*at);else{const at=ct*Math.sqrt(ot*ot-1);st=ut=>{const dt=Math.exp(-ot*ct*ut),mt=Math.min(at*ut,300);return g-dt*((nt+ot*ct*lt)*Math.sinh(mt)+at*lt*Math.cosh(mt))/at}}return{calculatedDuration:rt&&tt||null,next:at=>{const ut=st(at);if(rt)$.done=at>=tt;else{let dt=nt;at!==0&&(ot<1?dt=calcGeneratorVelocity(st,at,ut):dt=0);const mt=Math.abs(dt)<=a,ht=Math.abs(g-ut)<=i;$.done=mt&&ht}return $.value=$.done?g:ut,$}}}function inertia({keyframes:s,velocity:i=0,power:a=.8,timeConstant:c=325,bounceDamping:d=10,bounceStiffness:g=500,modifyTarget:$,min:j,max:_,restDelta:_e=.5,restSpeed:et}){const tt=s[0],rt={done:!1,value:tt},nt=xt=>j!==void 0&&xt<j||_!==void 0&&xt>_,ot=xt=>j===void 0?_:_===void 0||Math.abs(j-xt)<Math.abs(_-xt)?j:_;let lt=a*i;const ct=tt+lt,it=$===void 0?ct:$(ct);it!==ct&&(lt=it-tt);const st=xt=>-lt*Math.exp(-xt/c),at=xt=>it+st(xt),ut=xt=>{const wt=st(xt),Rt=at(xt);rt.done=Math.abs(wt)<=_e,rt.value=rt.done?it:Rt};let dt,mt;const ht=xt=>{nt(rt.value)&&(dt=xt,mt=spring({keyframes:[rt.value,ot(rt.value)],velocity:calcGeneratorVelocity(at,xt,rt.value),damping:d,stiffness:g,restDelta:_e,restSpeed:et}))};return ht(0),{calculatedDuration:null,next:xt=>{let wt=!1;return!mt&&dt===void 0&&(wt=!0,ut(xt),ht(xt)),dt!==void 0&&xt>dt?mt.next(xt-dt):(!wt&&ut(xt),rt)}}}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;)i+=a,c=s.next(i);return 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:$=0,repeatType:j="loop",onPlay:_,onStop:_e,onComplete:et,onUpdate:tt,...rt}){let nt=1,ot=!1,lt,ct;const it=()=>{ct=new Promise(At=>{lt=At})};it();let st;const at=types[d]||keyframes;let ut;at!==keyframes&&typeof c[0]!="number"&&(ut=interpolate([0,100],c,{clamp:!1}),c=[0,100]);const dt=at({...rt,keyframes:c});let mt;j==="mirror"&&(mt=at({...rt,keyframes:[...c].reverse(),velocity:-(rt.velocity||0)}));let ht="idle",xt=null,wt=null,Rt=null;dt.calculatedDuration===null&&g&&(dt.calculatedDuration=calcGeneratorDuration(dt));const{calculatedDuration:Ct}=dt;let gt=1/0,ft=1/0;Ct!==null&&(gt=Ct+$,ft=gt*(g+1)-$);let pt=0;const bt=At=>{if(wt===null)return;nt>0&&(wt=Math.min(wt,At)),nt<0&&(wt=Math.min(At-ft/nt,wt)),xt!==null?pt=xt:pt=Math.round(At-wt)*nt;const Lt=pt-i*(nt>=0?1:-1),Bt=nt>=0?Lt<0:Lt>ft;pt=Math.max(Lt,0),ht==="finished"&&xt===null&&(pt=ft);let zt=pt,Xt=dt;if(g){const sr=pt/gt;let qt=Math.floor(sr),er=sr%1;!er&&sr>=1&&(er=1),er===1&&qt--,qt=Math.min(qt,g+1);const xr=!!(qt%2);xr&&(j==="reverse"?(er=1-er,$&&(er-=$/gt)):j==="mirror"&&(Xt=mt));let dr=clamp$2(0,1,er);pt>ft&&(dr=j==="reverse"&&xr?1:0),zt=dr*gt}const Ut=Bt?{done:!1,value:c[0]}:Xt.next(zt);ut&&(Ut.value=ut(Ut.value));let{done:Gt}=Ut;!Bt&&Ct!==null&&(Gt=nt>=0?pt>=ft:pt<=0);const Zt=xt===null&&(ht==="finished"||ht==="running"&&Gt);return tt&&tt(Ut.value),Zt&&$t(),Ut},Et=()=>{st&&st.stop(),st=void 0},St=()=>{ht="idle",Et(),lt(),it(),wt=Rt=null},$t=()=>{ht="finished",et&&et(),Et(),lt()},kt=()=>{if(ot)return;st||(st=a(bt));const At=st.now();_&&_(),xt!==null?wt=At-xt:(!wt||ht==="finished")&&(wt=At),ht==="finished"&&it(),Rt=wt,xt=null,ht="running",st.start()};s&&kt();const Tt={then(At,Lt){return ct.then(At,Lt)},get time(){return millisecondsToSeconds(pt)},set time(At){At=secondsToMilliseconds(At),pt=At,xt!==null||!st||nt===0?xt=At:wt=st.now()-At/nt},get duration(){const At=dt.calculatedDuration===null?calcGeneratorDuration(dt):dt.calculatedDuration;return millisecondsToSeconds(At)},get speed(){return nt},set speed(At){At===nt||!st||(nt=At,Tt.time=millisecondsToSeconds(pt))},get state(){return ht},play:kt,pause:()=>{ht="paused",xt=pt},stop:()=>{ot=!0,ht!=="idle"&&(ht="idle",_e&&_e(),St())},cancel:()=>{Rt!==null&&bt(Rt),St()},complete:()=>{ht="finished"},sample:At=>(wt=0,bt(At))};return Tt}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 $=!1,j,_;const _e=()=>{_=new Promise(st=>{j=st})};_e();let{keyframes:et,duration:tt=300,ease:rt,times:nt}=d;if(requiresPregeneratedKeyframes(i,d)){const st=animateValue({...d,repeat:0,delay:0});let at={done:!1,value:et[0]};const ut=[];let dt=0;for(;!at.done&&dt<maxDuration;)at=st.sample(dt),ut.push(at.value),dt+=sampleDelta;nt=void 0,et=ut,tt=dt-sampleDelta,rt="linear"}const ot=animateStyle(s.owner.current,i,et,{...d,duration:tt,ease:rt,times:nt});d.syncStart&&(ot.startTime=frameData.isProcessing?frameData.timestamp:document.timeline?document.timeline.currentTime:performance.now());const lt=()=>ot.cancel(),ct=()=>{frame.update(lt),j(),_e()};return ot.onfinish=()=>{s.set(getFinalKeyframe(et,d)),c&&c(),ct()},{then(st,at){return _.then(st,at)},attachTimeline(st){return ot.timeline=st,ot.onfinish=null,noop$1},get time(){return millisecondsToSeconds(ot.currentTime||0)},set time(st){ot.currentTime=secondsToMilliseconds(st)},get speed(){return ot.playbackRate},set speed(st){ot.playbackRate=st},get duration(){return millisecondsToSeconds(tt)},play:()=>{$||(ot.play(),cancelFrame(lt))},pause:()=>ot.pause(),stop:()=>{if($=!0,ot.playState==="idle")return;const{currentTime:st}=ot;if(st){const at=animateValue({...d,autoplay:!1});s.setWithVelocity(at.sample(st-sampleDelta).value,at.sample(st).value,sampleDelta)}ct()},complete:()=>ot.finish(),cancel:ct}}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 $=c.from!==void 0?c.from:s.get();let j;const _=[];for(let _e=0;_e<g.length;_e++)g[_e]===null&&(g[_e]=_e===0?$:g[_e-1]),isNone(g[_e])&&_.push(_e),typeof g[_e]=="string"&&g[_e]!=="none"&&g[_e]!=="0"&&(j=g[_e]);if(d&&_.length&&j)for(let _e=0;_e<_.length;_e++){const et=_[_e];g[et]=getAnimatableNone(i,j)}return g}function isTransitionDefined({when:s,delay:i,delayChildren:a,staggerChildren:c,staggerDirection:d,repeat:g,repeatType:$,repeatDelay:j,from:_,elapsed:_e,...et}){return!!Object.keys(et).length}function getValueTransition(s,i){return s[i]||s.default||s}const animateMotionValue=(s,i,a,c={})=>d=>{const g=getValueTransition(c,s)||{},$=g.delay||c.delay||0;let{elapsed:j=0}=c;j=j-secondsToMilliseconds($);const _=getKeyframes(i,s,a,g),_e=_[0],et=_[_.length-1],tt=isAnimatable(s,_e),rt=isAnimatable(s,et);let nt={keyframes:_,velocity:i.getVelocity(),ease:"easeOut",...g,delay:-j,onUpdate:ot=>{i.set(ot),g.onUpdate&&g.onUpdate(ot)},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)),!tt||!rt||instantAnimationState.current||g.type===!1)return createInstantAnimation(nt);if(i.owner&&i.owner.current instanceof HTMLElement&&!i.owner.getProps().onUpdate){const ot=createAcceleratedAnimation(i,s,nt);if(ot)return ot}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<d;g++){const $=this.subscriptions[g];$&&$(i,a,c)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const isFloat=s=>!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:$}=frameData;this.lastUpdated!==$&&(this.timeDelta=g,this.lastUpdated=$,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 $ in g){const j=resolveFinalValueInKeyframes(g[$]);setMotionValue(s,$,j)}}function checkTargetForNewValues(s,i,a){var c,d;const g=Object.keys(i).filter(j=>!s.hasValue(j)),$=g.length;if($)for(let j=0;j<$;j++){const _=g[j],_e=i[_];let et=null;Array.isArray(_e)&&(et=_e[0]),et===null&&(et=(d=(c=a[_])!==null&&c!==void 0?c:s.readValue(_))!==null&&d!==void 0?d:i[_]),et!=null&&(typeof et=="string"&&(isNumericalString(et)||isZeroValueString(et))?et=parseFloat(et):!findValueType(et)&&complex.test(_e)&&(et=getAnimatableNone(_,_e)),s.addValue(_,motionValue(et,{owner:s})),a[_]===void 0&&(a[_]=et),et!==null&&s.setBaseTarget(_,et))}}function getOriginFromTransition(s,i){return i?(i[s]||i.default||i).from:void 0}function getOrigin(s,i,a){const c={};for(const d in s){const g=getOriginFromTransition(d,i);if(g!==void 0)c[d]=g;else{const $=a.getValue(d);$&&(c[d]=$.get())}}return c}function shouldBlockAnimation({protectedKeys:s,needsAnimating:i},a){const c=s.hasOwnProperty(a)&&i[a]!==!0;return i[a]=!1,c}function animateTarget(s,i,{delay:a=0,transitionOverride:c,type:d}={}){let{transition:g=s.getDefaultTransition(),transitionEnd:$,...j}=s.makeTargetAnimatable(i);const _=s.getValue("willChange");c&&(g=c);const _e=[],et=d&&s.animationState&&s.animationState.getState()[d];for(const tt in j){const rt=s.getValue(tt),nt=j[tt];if(!rt||nt===void 0||et&&shouldBlockAnimation(et,tt))continue;const ot={delay:a,elapsed:0,...g};if(window.HandoffAppearAnimations&&!rt.hasAnimated){const ct=s.getProps()[optimizedAppearDataAttribute];ct&&(ot.elapsed=window.HandoffAppearAnimations(ct,tt,rt,frame),ot.syncStart=!0)}rt.start(animateMotionValue(tt,rt,nt,s.shouldReduceMotion&&transformProps.has(tt)?{type:!1}:ot));const lt=rt.animation;isWillChangeMotionValue(_)&&(_.add(tt),lt.then(()=>_.remove(tt))),_e.push(lt)}return $&&Promise.all(_e).then(()=>{$&&setTarget(s,$)}),_e}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(),$=s.variantChildren&&s.variantChildren.size?(_=0)=>{const{delayChildren:_e=0,staggerChildren:et,staggerDirection:tt}=d;return animateChildren(s,i,_e+_,et,tt,a)}:()=>Promise.resolve(),{when:j}=d;if(j){const[_,_e]=j==="beforeChildren"?[g,$]:[$,g];return _().then(()=>_e())}else return Promise.all([g(),$(a.delay)])}function animateChildren(s,i,a=0,c=0,d=1,g){const $=[],j=(s.variantChildren.size-1)*c,_=d===1?(_e=0)=>_e*c:(_e=0)=>j-_e*c;return Array.from(s.variantChildren).sort(sortByTreeOrder).forEach((_e,et)=>{_e.notify("AnimationStart",i),$.push(animateVariant(_e,i,{...g,delay:a+_(et)}).then(()=>_e.notify("AnimationComplete",i)))}),Promise.all($)}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=(_,_e)=>{const et=resolveVariant(s,_e);if(et){const{transition:tt,transitionEnd:rt,...nt}=et;_={..._,...nt,...rt}}return _};function g(_){i=_(s)}function $(_,_e){const et=s.getProps(),tt=s.getVariantContext(!0)||{},rt=[],nt=new Set;let ot={},lt=1/0;for(let it=0;it<numAnimationTypes;it++){const st=reversePriorityOrder[it],at=a[st],ut=et[st]!==void 0?et[st]:tt[st],dt=isVariantLabel(ut),mt=st===_e?at.isActive:null;mt===!1&&(lt=it);let ht=ut===tt[st]&&ut!==et[st]&&dt;if(ht&&c&&s.manuallyAnimateOnMount&&(ht=!1),at.protectedKeys={...ot},!at.isActive&&mt===null||!ut&&!at.prevProp||isAnimationControls(ut)||typeof ut=="boolean")continue;const xt=checkVariantsDidChange(at.prevProp,ut);let wt=xt||st===_e&&at.isActive&&!ht&&dt||it>lt&&dt;const Rt=Array.isArray(ut)?ut:[ut];let Ct=Rt.reduce(d,{});mt===!1&&(Ct={});const{prevResolvedValues:gt={}}=at,ft={...gt,...Ct},pt=bt=>{wt=!0,nt.delete(bt),at.needsAnimating[bt]=!0};for(const bt in ft){const Et=Ct[bt],St=gt[bt];ot.hasOwnProperty(bt)||(Et!==St?isKeyframesTarget(Et)&&isKeyframesTarget(St)?!shallowCompare(Et,St)||xt?pt(bt):at.protectedKeys[bt]=!0:Et!==void 0?pt(bt):nt.add(bt):Et!==void 0&&nt.has(bt)?pt(bt):at.protectedKeys[bt]=!0)}at.prevProp=ut,at.prevResolvedValues=Ct,at.isActive&&(ot={...ot,...Ct}),c&&s.blockInitialAnimation&&(wt=!1),wt&&!ht&&rt.push(...Rt.map(bt=>({animation:bt,options:{type:st,..._}})))}if(nt.size){const it={};nt.forEach(st=>{const at=s.getBaseTarget(st);at!==void 0&&(it[st]=at)}),rt.push({animation:it})}let ct=!!rt.length;return c&&et.initial===!1&&!s.manuallyAnimateOnMount&&(ct=!1),c=!1,ct?i(rt):Promise.resolve()}function j(_,_e,et){var tt;if(a[_].isActive===_e)return Promise.resolve();(tt=s.variantChildren)===null||tt===void 0||tt.forEach(nt=>{var ot;return(ot=nt.animationState)===null||ot===void 0?void 0:ot.setActive(_,_e)}),a[_].isActive=_e;const rt=$(et,_);for(const nt in a)a[nt].protectedKeys={};return rt}return{animateChanges:$,setActive:j,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 $=g.trim();return isNumericalString($)?parseFloat($):$}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 $=getVariableValue(g,c);$&&d.set($)});for(const d in i){const g=i[d];if(!isCSSVariableToken(g))continue;const $=getVariableValue(g,c);$&&(i[d]=$,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:$}=g,j={};$==="none"&&i.setStaticValue("display",s.display||"block"),a.forEach(_e=>{j[_e]=positionalValues[_e](c,g)}),i.render();const _=i.measureViewportBox();return a.forEach(_e=>{const et=i.getValue(_e);et&&et.jump(j[_e]),s[_e]=positionalValues[_e](_,g)}),s},checkAndConvertChangedValueTypes=(s,i,a={},c={})=>{i={...i},c={...c};const d=Object.keys(i).filter(isPositionalKey);let g=[],$=!1;const j=[];if(d.forEach(_=>{const _e=s.getValue(_);if(!s.hasValue(_))return;let et=a[_],tt=findDimensionValueType(et);const rt=i[_];let nt;if(isKeyframesTarget(rt)){const ot=rt.length,lt=rt[0]===null?1:0;et=rt[lt],tt=findDimensionValueType(et);for(let ct=lt;ct<ot&&rt[ct]!==null;ct++)nt?invariant(findDimensionValueType(rt[ct])===nt):nt=findDimensionValueType(rt[ct])}else nt=findDimensionValueType(rt);if(tt!==nt)if(isNumOrPxType(tt)&&isNumOrPxType(nt)){const ot=_e.get();typeof ot=="string"&&_e.set(parseFloat(ot)),typeof rt=="string"?i[_]=parseFloat(rt):Array.isArray(rt)&&nt===px&&(i[_]=rt.map(parseFloat))}else tt!=null&&tt.transform&&(nt!=null&&nt.transform)&&(et===0||rt===0)?et===0?_e.set(nt.transform(et)):i[_]=tt.transform(rt):($||(g=removeNonTranslationalTransform(s),$=!0),j.push(_),c[_]=c[_]!==void 0?c[_]:i[_],_e.jump(rt))}),j.length){const _=j.indexOf("height")>=0?window.pageYOffset:null,_e=convertChangedValueTypes(i,s,j);return g.length&&g.forEach(([et,tt])=>{s.getValue(et).set(tt)}),s.render(),isBrowser&&_!==null&&window.scrollTo({top:_}),{target:_e,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)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],$=a[d];if(isMotionValue(g))s.addValue(d,g),isWillChangeMotionValue(c)&&c.add(d);else if(isMotionValue($))s.addValue(d,motionValue(g,{owner:s})),isWillChangeMotionValue(c)&&c.remove(d);else if($!==g)if(s.hasValue(d)){const j=s.getValue(d);!j.hasAnimated&&j.set(g)}else{const j=s.getStaticValue(d);s.addValue(d,motionValue(j!==void 0?j: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},$={}){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:j,renderState:_}=g;this.latestValues=j,this.baseTarget={...j},this.initialValues=a.initial?{...j}:{},this.renderState=_,this.parent=i,this.props=a,this.presenceContext=c,this.depth=i?i.depth+1:0,this.reducedMotionConfig=d,this.options=$,this.isControllingVariants=isControllingVariants(a),this.isVariantNode=isVariantNode(a),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:_e,...et}=this.scrapeMotionValuesFromProps(a,{});for(const tt in et){const rt=et[tt];j[tt]!==void 0&&isMotionValue(rt)&&(rt.set(j[tt],!1),isWillChangeMotionValue(_e)&&_e.add(tt))}}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",$=>{this.latestValues[i]=$,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 $,j;for(let _=0;_<numFeatures;_++){const _e=featureNames[_],{isEnabled:et,Feature:tt,ProjectionNode:rt,MeasureLayout:nt}=featureDefinitions[_e];rt&&($=rt),et(a)&&(!this.features[_e]&&tt&&(this.features[_e]=new tt(this)),nt&&(j=nt))}if(!this.projection&&$){this.projection=new $(this.latestValues,this.parent&&this.parent.projection);const{layoutId:_,layout:_e,drag:et,dragConstraints:tt,layoutScroll:rt,layoutRoot:nt}=a;this.projection.setOptions({layoutId:_,layout:_e,alwaysMeasureLayout:!!et||tt&&isRefObject(tt),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof _e=="string"?_e:"both",initialPromotionConfig:g,layoutScroll:rt,layoutRoot:nt})}return j}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;c<propEventHandlers.length;c++){const d=propEventHandlers[c];this.propEventSubscriptions[d]&&(this.propEventSubscriptions[d](),delete this.propEventSubscriptions[d]);const g=i["on"+d];g&&(this.propEventSubscriptions[d]=this.on(d,g))}this.prevMotionValues=updateMotionValuesFromProps(this,this.scrapeMotionValuesFromProps(i,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(i=!1){if(i)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const c=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(c.initial=this.props.initial),c}const a={};for(let c=0;c<numVariantProps;c++){const d=variantProps[c],g=this.props[d];(isVariantLabel(g)||g===!1)&&(a[d]=g)}return a}addVariantChild(i){const a=this.getClosestVariantNode();if(a)return a.variantChildren&&a.variantChildren.add(i),()=>a.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 $=getOrigin(c,i||{},this);if(d&&(a&&(a=d(a)),c&&(c=d(c)),$&&($=d($))),g){checkTargetForNewValues(this,c,$);const j=parseDomVariant(this,c,$,a);a=j.transitionEnd,c=j.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(()=>(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:$,top:j,left:_}=d.current;if(i||!c.current||!g||!$)return;c.current.dataset.motionPopId=a;const _e=document.createElement("style");return document.head.appendChild(_e),_e.sheet&&_e.sheet.insertRule(`
          [data-motion-pop-id="${a}"] {
            position: absolute !important;
            width: ${g}px !important;
            height: ${$}px !important;
            top: ${j}px !important;
            left: ${_}px !important;
          }
        `),()=>{document.head.removeChild(_e)}},[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:$})=>{const j=useConstant(newChildrenMap),_=reactExports.useId(),_e=reactExports.useMemo(()=>({id:_,initial:i,isPresent:a,custom:d,onExitComplete:et=>{j.set(et,!0);for(const tt of j.values())if(!tt)return;c&&c()},register:et=>(j.set(et,!1),()=>j.delete(et))}),g?void 0:[a]);return reactExports.useMemo(()=>{j.forEach((et,tt)=>j.set(tt,!1))},[a]),reactExports.useEffect(()=>{!a&&!j.size&&c&&c()},[a]),$==="popLayout"&&(s=reactExports.createElement(PopChild,{isPresent:a},s)),reactExports.createElement(PresenceContext.Provider,{value:_e},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:$="sync"})=>{const j=reactExports.useContext(LayoutGroupContext).forceRender||useForceUpdate()[0],_=useIsMounted(),_e=onlyElements(s);let et=_e;const tt=reactExports.useRef(new Map).current,rt=reactExports.useRef(et),nt=reactExports.useRef(new Map).current,ot=reactExports.useRef(!0);if(useIsomorphicLayoutEffect(()=>{ot.current=!1,updateChildLookup(_e,nt),rt.current=et}),useUnmountEffect(()=>{ot.current=!0,nt.clear(),tt.clear()}),ot.current)return reactExports.createElement(reactExports.Fragment,null,et.map(st=>reactExports.createElement(PresenceChild,{key:getChildKey(st),isPresent:!0,initial:a?void 0:!1,presenceAffectsLayout:g,mode:$},st)));et=[...et];const lt=rt.current.map(getChildKey),ct=_e.map(getChildKey),it=lt.length;for(let st=0;st<it;st++){const at=lt[st];ct.indexOf(at)===-1&&!tt.has(at)&&tt.set(at,void 0)}return $==="wait"&&tt.size&&(et=[]),tt.forEach((st,at)=>{if(ct.indexOf(at)!==-1)return;const ut=nt.get(at);if(!ut)return;const dt=lt.indexOf(at);let mt=st;if(!mt){const ht=()=>{nt.delete(at),tt.delete(at);const xt=rt.current.findIndex(wt=>wt.key===at);if(rt.current.splice(xt,1),!tt.size){if(rt.current=_e,_.current===!1)return;j(),c&&c()}};mt=reactExports.createElement(PresenceChild,{key:getChildKey(ut),isPresent:!1,onExitComplete:ht,custom:i,presenceAffectsLayout:g,mode:$},ut),tt.set(at,mt)}et.splice(dt,0,mt)}),et=et.map(st=>{const at=st.key;return tt.has(at)?st:reactExports.createElement(PresenceChild,{key:getChildKey(st),isPresent:!0,presenceAffectsLayout:g,mode:$},st)}),reactExports.createElement(reactExports.Fragment,null,tt.size?et:et.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,...$}=i;d.current=g,loadFeatures($)}return reactExports.useEffect(()=>{isLazyBundle(i)&&i().then(({renderer:g,...$})=>{loadFeatures($),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;c<d;c++)i.call(null,s[c],c,s);else{const g=a?Object.getOwnPropertyNames(s):Object.keys(s),$=g.length;let j;for(c=0;c<$;c++)j=g[c],i.call(null,s[j],j,s)}}function findKey(s,i){i=i.toLowerCase();const a=Object.keys(s);let c=a.length,d;for(;c-- >0;)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<d;c++)arguments[c]&&forEach(arguments[c],a);return i}const extend=(s,i,a,{allOwnKeys: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,$;const j={};if(i=i||{},s==null)return i;do{for(d=Object.getOwnPropertyNames(s),g=d.length;g-- >0;)$=d[g],(!c||c($,s,i))&&!j[$]&&(i[$]=s[$],j[$]=!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 $;($=i(d,g,s))!==!1&&(c[g]=$||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,($,j)=>{const _=a($,d+1);!isUndefined$1(_)&&(g[j]=_)}),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 $=Object.create(prototype$1);return utils.toFlatObject(s,$,function(_){return _!==Error.prototype},j=>j!=="isAxiosError"),AxiosError.call($,s.message,i,a,c,d),$.cause=s,$.name=s.name,g&&Object.assign($,g),$};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(lt,ct){return!utils.isUndefined(ct[lt])});const c=a.metaTokens,d=a.visitor||et,g=a.dots,$=a.indexes,_=(a.Blob||typeof Blob<"u"&&Blob)&&utils.isSpecCompliantForm(i);if(!utils.isFunction(d))throw new TypeError("visitor must be a function");function _e(ot){if(ot===null)return"";if(utils.isDate(ot))return ot.toISOString();if(!_&&utils.isBlob(ot))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(ot)||utils.isTypedArray(ot)?_&&typeof Blob=="function"?new Blob([ot]):Buffer.from(ot):ot}function et(ot,lt,ct){let it=ot;if(ot&&!ct&&typeof ot=="object"){if(utils.endsWith(lt,"{}"))lt=c?lt:lt.slice(0,-2),ot=JSON.stringify(ot);else if(utils.isArray(ot)&&isFlatArray(ot)||(utils.isFileList(ot)||utils.endsWith(lt,"[]"))&&(it=utils.toArray(ot)))return lt=removeBrackets(lt),it.forEach(function(at,ut){!(utils.isUndefined(at)||at===null)&&i.append($===!0?renderKey([lt],ut,g):$===null?lt:lt+"[]",_e(at))}),!1}return isVisitable(ot)?!0:(i.append(renderKey(ct,lt,g),_e(ot)),!1)}const tt=[],rt=Object.assign(predicates,{defaultVisitor:et,convertValue:_e,isVisitable});function nt(ot,lt){if(!utils.isUndefined(ot)){if(tt.indexOf(ot)!==-1)throw Error("Circular reference detected in "+lt.join("."));tt.push(ot),utils.forEach(ot,function(it,st){(!(utils.isUndefined(it)||it===null)&&d.call(i,it,utils.isString(st)?st.trim():st,lt,rt))===!0&&nt(it,lt?lt.concat(st):[st])}),tt.pop()}}if(!utils.isObject(s))throw new TypeError("data must be an object");return nt(s),i}function encode$4(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$4)}:encode$4;return this._pairs.map(function(d){return a(d[0])+"="+a(d[1])},"").join("&")};function encode$3(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$3,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 $=s.indexOf("#");$!==-1&&(s=s.slice(0,$)),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<d;c++)g=a[c],i[g]=s[g];return i}function formDataToJSON(s){function i(a,c,d,g){let $=a[g++];const j=Number.isFinite(+$),_=g>=a.length;return $=!$&&utils.isArray(d)?d.length:$,_?(utils.hasOwnProp(d,$)?d[$]=[d[$],c]:d[$]=c,!j):((!d[$]||!utils.isObject(d[$]))&&(d[$]=[]),i(a,c,d[$],g)&&utils.isArray(d[$])&&(d[$]=arrayToObject(d[$])),!j)}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 j;if(g){if(c.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(i,this.formSerializer).toString();if((j=utils.isFileList(i))||c.indexOf("multipart/form-data")>-1){const _=this.env&&this.env.FormData;return toFormData(j?{"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 $=!(a&&a.silentJSONParsing)&&d;try{return JSON.parse(i)}catch(j){if($)throw j.name==="SyntaxError"?AxiosError.from(j,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):j}}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($){d=$.indexOf(":"),a=$.substring(0,d).trim().toLowerCase(),c=$.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,$){return this[c].call(this,i,d,g,$)},configurable:!0})})}class AxiosHeaders{constructor(i){i&&this.set(i)}set(i,a,c){const d=this;function g(j,_,_e){const et=normalizeHeader(_);if(!et)throw new Error("header name must be a non-empty string");const tt=utils.findKey(d,et);(!tt||d[tt]===void 0||_e===!0||_e===void 0&&d[tt]!==!1)&&(d[tt||_]=normalizeValue(j))}const $=(j,_)=>utils.forEach(j,(_e,et)=>g(_e,et,_));return utils.isPlainObject(i)||i instanceof this.constructor?$(i,a):utils.isString(i)&&(i=i.trim())&&!isValidHeaderName(i)?$(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($){if($=normalizeHeader($),$){const j=utils.findKey(c,$);j&&(!a||matchHeaderValue(c,c[j],j,a))&&(delete c[j],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 $=utils.findKey(c,g);if($){a[$]=normalizeValue(d),delete a[g];return}const j=i?formatHeader(g):String(g).trim();j!==g&&delete a[g],a[j]=normalizeValue(d),c[j]=!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($){const j=normalizeHeader($);c[j]||(buildAccessors(d,$),c[j]=!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(j){g=j.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,$,j){const _=[];_.push(a+"="+encodeURIComponent(c)),utils.isNumber(d)&&_.push("expires="+new Date(d).toGMTString()),utils.isString(g)&&_.push("path="+g),utils.isString($)&&_.push("domain="+$),j===!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 $=g;return i&&(a.setAttribute("href",$),$=a.href),a.setAttribute("href",$),{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($){const j=utils.isString($)?d($):$;return j.protocol===c.protocol&&j.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,$;return i=i!==void 0?i:1e3,function(_){const _e=Date.now(),et=c[g];$||($=_e),a[d]=_,c[d]=_e;let tt=g,rt=0;for(;tt!==d;)rt+=a[tt++],tt=tt%s;if(d=(d+1)%s,d===g&&(g=(g+1)%s),_e-$<i)return;const nt=et&&_e-et;return nt?Math.round(rt*1e3/nt):void 0}}function progressEventReducer(s,i){let a=0;const c=speedometer(50,250);return d=>{const g=d.loaded,$=d.lengthComputable?d.total:void 0,j=g-a,_=c(j),_e=g<=$;a=g;const et={loaded:g,total:$,progress:$?g/$:void 0,bytes:j,rate:_||void 0,estimated:_&&$&&_e?($-g)/_:void 0,event:d};et[i?"download":"upload"]=!0,s(et)}}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(),$=s.responseType;let j;function _(){s.cancelToken&&s.cancelToken.unsubscribe(j),s.signal&&s.signal.removeEventListener("abort",j)}let _e;utils.isFormData(d)&&(platform$1.isStandardBrowserEnv||platform$1.isStandardBrowserWebWorkerEnv?g.setContentType(!1):g.getContentType(/^\s*multipart\/form-data/)?utils.isString(_e=g.getContentType())&&g.setContentType(_e.replace(/^\s*(multipart\/form-data);+/,"$1")):g.setContentType("multipart/form-data"));let et=new XMLHttpRequest;if(s.auth){const ot=s.auth.username||"",lt=s.auth.password?unescape(encodeURIComponent(s.auth.password)):"";g.set("Authorization","Basic "+btoa(ot+":"+lt))}const tt=buildFullPath(s.baseURL,s.url);et.open(s.method.toUpperCase(),buildURL(tt,s.params,s.paramsSerializer),!0),et.timeout=s.timeout;function rt(){if(!et)return;const ot=AxiosHeaders$1.from("getAllResponseHeaders"in et&&et.getAllResponseHeaders()),ct={data:!$||$==="text"||$==="json"?et.responseText:et.response,status:et.status,statusText:et.statusText,headers:ot,config:s,request:et};settle(function(st){a(st),_()},function(st){c(st),_()},ct),et=null}if("onloadend"in et?et.onloadend=rt:et.onreadystatechange=function(){!et||et.readyState!==4||et.status===0&&!(et.responseURL&&et.responseURL.indexOf("file:")===0)||setTimeout(rt)},et.onabort=function(){et&&(c(new AxiosError("Request aborted",AxiosError.ECONNABORTED,s,et)),et=null)},et.onerror=function(){c(new AxiosError("Network Error",AxiosError.ERR_NETWORK,s,et)),et=null},et.ontimeout=function(){let lt=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const ct=s.transitional||transitionalDefaults;s.timeoutErrorMessage&&(lt=s.timeoutErrorMessage),c(new AxiosError(lt,ct.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,s,et)),et=null},platform$1.isStandardBrowserEnv){const ot=isURLSameOrigin(tt)&&s.xsrfCookieName&&cookies.read(s.xsrfCookieName);ot&&g.set(s.xsrfHeaderName,ot)}d===void 0&&g.setContentType(null),"setRequestHeader"in et&&utils.forEach(g.toJSON(),function(lt,ct){et.setRequestHeader(ct,lt)}),utils.isUndefined(s.withCredentials)||(et.withCredentials=!!s.withCredentials),$&&$!=="json"&&(et.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&et.addEventListener("progress",progressEventReducer(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&et.upload&&et.upload.addEventListener("progress",progressEventReducer(s.onUploadProgress)),(s.cancelToken||s.signal)&&(j=ot=>{et&&(c(!ot||ot.type?new CanceledError(null,s,et):ot),et.abort(),et=null)},s.cancelToken&&s.cancelToken.subscribe(j),s.signal&&(s.signal.aborted?j():s.signal.addEventListener("abort",j)));const nt=parseProtocol(tt);if(nt&&platform$1.protocols.indexOf(nt)===-1){c(new AxiosError("Unsupported protocol "+nt+":",AxiosError.ERR_BAD_REQUEST,s));return}et.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<i;g++){a=s[g];let $;if(c=a,!isResolvedHandle(a)&&(c=knownAdapters[($=String(a)).toLowerCase()],c===void 0))throw new AxiosError(`Unknown adapter '${$}'`);if(c)break;d[$||"#"+g]=c}if(!c){const g=Object.entries(d).map(([j,_])=>`adapter ${j} `+(_===!1?"is not supported by the environment":"is not available in the build"));let $=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 "+$,"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(_e,et,tt){return utils.isPlainObject(_e)&&utils.isPlainObject(et)?utils.merge.call({caseless:tt},_e,et):utils.isPlainObject(et)?utils.merge({},et):utils.isArray(et)?et.slice():et}function d(_e,et,tt){if(utils.isUndefined(et)){if(!utils.isUndefined(_e))return c(void 0,_e,tt)}else return c(_e,et,tt)}function g(_e,et){if(!utils.isUndefined(et))return c(void 0,et)}function $(_e,et){if(utils.isUndefined(et)){if(!utils.isUndefined(_e))return c(void 0,_e)}else return c(void 0,et)}function j(_e,et,tt){if(tt in i)return c(_e,et);if(tt in s)return c(void 0,_e)}const _={url:g,method:g,data:g,baseURL:$,transformRequest:$,transformResponse:$,paramsSerializer:$,timeout:$,timeoutMessage:$,withCredentials:$,adapter:$,responseType:$,xsrfCookieName:$,xsrfHeaderName:$,onUploadProgress:$,onDownloadProgress:$,decompress:$,maxContentLength:$,maxBodyLength:$,beforeRedirect:$,transport:$,httpAgent:$,httpsAgent:$,cancelToken:$,socketPath:$,responseEncoding:$,validateStatus:j,headers:(_e,et)=>d(headersToObject(_e),headersToObject(et),!0)};return utils.forEach(Object.keys(Object.assign({},s,i)),function(et){const tt=_[et]||d,rt=tt(s[et],i[et],et);utils.isUndefined(rt)&&tt!==j||(a[et]=rt)}),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,$){return"[Axios v"+VERSION$1+"] Transitional option '"+g+"'"+$+(c?". "+c:"")}return(g,$,j)=>{if(i===!1)throw new AxiosError(d($," has been removed"+(a?" in "+a:"")),AxiosError.ERR_DEPRECATED);return a&&!deprecatedWarnings[$]&&(deprecatedWarnings[$]=!0,console.warn(d($," has been deprecated since v"+a+" and will be removed in the near future"))),i?i(g,$,j):!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],$=i[g];if($){const j=s[g],_=j===void 0||$(j,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 $=g&&utils.merge(g.common,g[a.method]);g&&utils.forEach(["delete","get","head","post","put","patch","common"],ot=>{delete g[ot]}),a.headers=AxiosHeaders$1.concat($,g);const j=[];let _=!0;this.interceptors.request.forEach(function(lt){typeof lt.runWhen=="function"&&lt.runWhen(a)===!1||(_=_&&lt.synchronous,j.unshift(lt.fulfilled,lt.rejected))});const _e=[];this.interceptors.response.forEach(function(lt){_e.push(lt.fulfilled,lt.rejected)});let et,tt=0,rt;if(!_){const ot=[dispatchRequest.bind(this),void 0];for(ot.unshift.apply(ot,j),ot.push.apply(ot,_e),rt=ot.length,et=Promise.resolve(a);tt<rt;)et=et.then(ot[tt++],ot[tt++]);return et}rt=j.length;let nt=a;for(tt=0;tt<rt;){const ot=j[tt++],lt=j[tt++];try{nt=ot(nt)}catch(ct){lt.call(this,ct);break}}try{et=dispatchRequest.call(this,nt)}catch(ot){return Promise.reject(ot)}for(tt=0,rt=_e.length;tt<rt;)et=et.then(_e[tt++],_e[tt++]);return et}getUri(i){i=mergeConfig(this.defaults,i);const a=buildFullPath(i.baseURL,i.url);return buildURL(a,i.params,i.paramsSerializer)}}utils.forEach(["delete","get","head","options"],function(i){Axios.prototype[i]=function(a,c){return this.request(mergeConfig(c||{},{method:i,url:a,data:(c||{}).data}))}});utils.forEach(["post","put","patch"],function(i){function a(c){return function(g,$,j){return this.request(mergeConfig(j||{},{method:i,headers:c?{"Content-Type":"multipart/form-data"}:{},url:g,data:$}))}}Axios.prototype[i]=a(),Axios.prototype[i+"Form"]=a(!0)});const Axios$1=Axios;class CancelToken{constructor(i){if(typeof i!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(g){a=g});const c=this;this.promise.then(d=>{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 $=new Promise(j=>{c.subscribe(j),g=j}).then(d);return $.cancel=function(){c.unsubscribe(g)},$},i(function(g,$,j){c.reason||(c.reason=new CanceledError(g,$,j),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,$,j,_,_e;!((c=s.url)!=null&&c.startsWith("auth"))&&!((d=s.url)!=null&&d.startsWith("secure"))&&!isAbsoluteUrl(s==null?void 0:s.url)&&(s.url=`api/v1/${s.url}`);const i=(g=s.method)==null?void 0:g.toUpperCase();i==="GET"&&Array.isArray(($=s.params)==null?void 0:$.with)&&(s.params.with=s.params.with.join(",")),i==="GET"&&Array.isArray((j=s.params)==null?void 0:j.load)&&(s.params.load=s.params.load.join(",")),i==="GET"&&Array.isArray((_=s.params)==null?void 0:_.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 pageTop=""+new URL("page-top-85207f10.png",import.meta.url).href,splashTop=""+new URL("splash-top-5fef075e.png",import.meta.url).href,splashBottom=""+new URL("splash-bottom-01df97c7.png",import.meta.url).href,dashboardTop=""+new URL("dashboard-top-e510929a.png",import.meta.url).href,frameTop=""+new URL("frame-top-2edadf70.png",import.meta.url).href,landingTop=""+new URL("landing-top-8eca6071.png",import.meta.url).href,biolinkTop=""+new URL("biolink-top-ce799801.png",import.meta.url).href,SiteConfig={homepage:{options:[{label:message("Landing page"),value:"landingPage"}]},settings:{showRecaptchaLinkSwitch:!0},auth:{redirectUri:"/dashboard",adminRedirectUri:"/admin"},tags:{types:[{name:"label",system:!0}]},customPages:{types:[{type:"link_page",label:message("Link page")}]},admin:{ads:[{slot:"ads.biolink_top",description:message("This ad will appear at the top of biolink pages."),image:biolinkTop},{slot:"ads.splash_top",description:message("This ad will appear at the top of link splash pages."),image:splashTop},{slot:"ads.splash_bottom",description:message("This ad will appear at the bottom of link splash pages."),image:splashBottom},{slot:"ads.dashboard",description:message("This ad will appear on user dashboard page."),image:dashboardTop},{slot:"ads.frame",description:message("This ad will appear on link frame page."),image:frameTop},{slot:"ads.landing",description:message("This ad will appear at the top of landing page."),image:landingTop},{slot:"ads.link_page",description:message("This ad will appear on custom link pages."),image:pageTop}]}};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);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<s.length;i++)s[i]&&(a=r$4(s[i]))&&(c&&(c+=" "),c+=a);else for(i in s)s[i]&&(c&&(c+=" "),c+=i);return c}function clsx$1(){for(var s,i,a=0,c="";a<arguments.length;)(s=arguments[a++])&&(i=r$4(s))&&(c&&(c+=" "),c+=i);return c}const SvgIcon=reactExports.forwardRef((s,i)=>{const{attr:a,size:c,title:d,className:g,color:$,style:j,children:_,viewBox:_e,width:et,height:tt,...rt}=s;return jsxRuntimeExports.jsxs("svg",{"aria-hidden":!d,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:_e||"0 0 24 24",...a,...rt,className:clsx$1("svg-icon",g,getSizeClassName$1(c)),style:{color:$,...j},ref:i,height:tt||"1em",width:et||"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("http://bedesk.test/api/v1/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 $=[];return i==="outline"?$=outline(g):i==="text"?$=text(g):i==="flat"||i==="raised"?$=contained(g):i==="link"&&($=link(g)),[...$,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:$,whitespace:j,justify:_="justify-center",className:_e,href:et,form:tt,border:rt,elementType:nt,to:ot,relative:lt,replace:ct,end:it,display:st,type:at="button",onClick:ut,onPointerDown:dt,onPointerUp:mt,onKeyDown:ht,...xt}=s,wt=nt||(et?"a":"button"),Rt=wt==="a";return jsxRuntimeExports.jsx(wt,{ref:i,form:Rt?void 0:tt,href:et,to:ot,relative:lt,type:Rt?void 0:at,replace:ct,end:it,onPointerDown:createEventHandler(dt),onPointerUp:createEventHandler(mt),onClick:createEventHandler(ut),onKeyDown:createEventHandler(ht),className:clsx$1("focus-visible:ring",getSharedButtonStyle({variant:d,color:c,border:rt,whitespace:j,display:st}),g,_,_e),...xt,children:a})}),Button=React.forwardRef(({children:s,startIcon:i,endIcon:a,size:c="sm",sizeClassName:d,className:g,equalWidth:$=!1,radius:j="rounded-button",variant:_="text",..._e},et)=>{const tt=clsx$1("font-semibold",d||getButtonSizeStyle(c,{equalWidth:$,variant:_}),g);return jsxRuntimeExports.jsxs(ButtonBase,{className:tt,ref:et,radius:j,variant:_,..._e,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),$=Math.floor(g/36524),j=$2b4dce13dd5a17fa$export$842a2cf37af977e1(g,36524),_=Math.floor(j/1461),_e=$2b4dce13dd5a17fa$export$842a2cf37af977e1(j,1461),et=Math.floor(_e/365),tt=d*400+$*100+_*4+et+($!==4&&et!==4?1:0),[rt,nt]=$3b62074eb05584b2$export$4475b7e617eb123c(tt),ot=a-$3b62074eb05584b2$export$f297eb839006d339(rt,nt,1,1),lt=2;a<$3b62074eb05584b2$export$f297eb839006d339(rt,nt,3,1)?lt=0:$3b62074eb05584b2$export$553d7fa8e3805fc0(nt)&&(lt=1);let ct=Math.floor(((ot+lt)*12+373)/367),it=a-$3b62074eb05584b2$export$f297eb839006d339(rt,nt,ct,1)+1;return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(rt,nt,ct,it)}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,$){let j=new Date;return j.setUTCHours(c,d,g,$),j.setUTCFullYear(s,i-1,a),j.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:$,second:j}=$11d87f3f76e88657$var$getTimeZoneParts(s,i);return $11d87f3f76e88657$var$epochFromParts(a,c,d,g,$,j,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,_e=$3b62074eb05584b2$export$c36e0ecb2d4fa69d(c.era,c.year);return _.setFullYear(_e,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),$=$11d87f3f76e88657$export$59c99f3515d3493f(d+$11d87f3f76e88657$var$DAYMILLIS,i),j=$11d87f3f76e88657$var$getValidWallTimes(c,i,d-g,d-$);if(j.length===1)return j[0];if(j.length>1)switch(a){case"compatible":case"earlier":return j[0];case"later":return j[j.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(a){case"earlier":return Math.min(d-g,d-$);case"compatible":case"later":return Math.max(d-g,d-$);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,$=c.getUTCDate(),j=c.getUTCHours(),_=c.getUTCMinutes(),_e=c.getUTCSeconds(),et=c.getUTCMilliseconds();return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(d,g,$,i,a,j,_,_e,et)}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,$;let _=($=(g=a.calendar).isInverseEra)===null||$===void 0?void 0:$.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 j=a.calendar.getMonthsInYear(a);return a.month>j&&(a.month=j,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 j=s.calendar.getEras(),_=j.indexOf(s.era);if(_<0)throw new Error("Invalid era: "+s.era);_=$735220c2d4774dd3$var$cycleValue(_,a,0,j.length-1,c==null?void 0:c.round),d.era=j[_],$735220c2d4774dd3$export$c4e2ecac49351ef2(d);break}case"year":var g,$;!(($=(g=d.calendar).isInverseEra)===null||$===void 0)&&$.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,$=0,j=23;if((c==null?void 0:c.hourCycle)===12){let _=g>=12;$=_?12:0,j=_?23:11}d.hour=$735220c2d4774dd3$var$cycleValue(g,a,$,j,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),s<a&&(s=c);let g=Math.abs(i);i>0?s=Math.ceil(s/g)*g:s=Math.floor(s/g)*g,s>c&&(s=a)}else s+=i,s<a?s=c-(a-s-1):s>c&&(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 ot=s.hour>=12;d=ot?12:0,g=ot?23:11}let $=$11d87f3f76e88657$export$b21e0b124e224484(s),j=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56($,{hour:d}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),_=[$11d87f3f76e88657$export$5107c82f94518f5c(j,s.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c(j,s.timeZone,"later")].filter(ot=>$11d87f3f76e88657$export$1b96692a1ba042ac(ot,s.timeZone).day===j.day)[0],_e=$11d87f3f76e88657$export$b4a036af3fc0b032($735220c2d4774dd3$export$e5d5e1c1822b6e56($,{hour:g}),new $3b62074eb05584b2$export$80ee6245ec4f29ec),et=[$11d87f3f76e88657$export$5107c82f94518f5c(_e,s.timeZone,"earlier"),$11d87f3f76e88657$export$5107c82f94518f5c(_e,s.timeZone,"later")].filter(ot=>$11d87f3f76e88657$export$1b96692a1ba042ac(ot,s.timeZone).day===_e.day).pop(),tt=$11d87f3f76e88657$export$bd4fb2bc8bb06fb(s)-s.offset,rt=Math.floor(tt/$735220c2d4774dd3$var$ONE_HOUR),nt=tt%$735220c2d4774dd3$var$ONE_HOUR;return tt=$735220c2d4774dd3$var$cycleValue(rt,a,Math.floor(_/$735220c2d4774dd3$var$ONE_HOUR),Math.floor(et/$735220c2d4774dd3$var$ONE_HOUR),c==null?void 0:c.round)*$735220c2d4774dd3$var$ONE_HOUR+nt,$11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(tt,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(c<i||c>a)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 $=i.getEras();a=$[$.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,$]=$35ea8db9cb2ccb90$var$shiftArgs(i);this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=$,$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,$]=$35ea8db9cb2ccb90$var$shiftArgs(i);this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=$,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,$]=$35ea8db9cb2ccb90$var$shiftArgs(i),j=i.shift(),_=i.shift();this.calendar=a,this.era=c,this.year=d,this.month=g,this.day=$,this.timeZone=j,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<i)throw new RangeError("End date must be >= 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<i)throw new RangeError("End date must be >= 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[0]?-1:1).join():"");if($fb18d541ea1ad717$var$formatterCache.has(a))return $fb18d541ea1ad717$var$formatterCache.get(a);let c=new Intl.DateTimeFormat(s,i);return $fb18d541ea1ad717$var$formatterCache.set(a,c),c}let $fb18d541ea1ad717$var$_hasBuggyHour12Behavior=null;function $fb18d541ea1ad717$var$hasBuggyHour12Behavior(){return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior==null&&($fb18d541ea1ad717$var$_hasBuggyHour12Behavior=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),$fb18d541ea1ad717$var$_hasBuggyHour12Behavior}let $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle=null;function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle(){return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle==null&&($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),$fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle}function $fb18d541ea1ad717$var$getResolvedHourCycle(s,i){if(!i.timeStyle&&!i.hour)return;s=s.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),s+=(s.includes("-u-")?"":"-u")+"-nu-latn";let a=$fb18d541ea1ad717$var$getCachedDateFormatter(s,{...i,timeZone:void 0}),c=parseInt(a.formatToParts(new Date(2020,2,3,0)).find(g=>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<d;g++){const $=a[g];if(s[$]!==i[$]||!Object.prototype.hasOwnProperty.call(i,$))return!1}return!0}const BoostrapDataContext=reactExports.createContext(null);function useBootstrapData(){return reactExports.useContext(BoostrapDataContext)}function useSelectedLocale(){const{data:{i18n:s}}=useBootstrapData();return{locale:s,localeCode:(s==null?void 0:s.language)||"en",lines:s==null?void 0:s.lines}}function useUserTimezone(){const{data:{user:s,settings:i}}=reactExports.useContext(BoostrapDataContext),a=i.dates.default_timezone,c=(s==null?void 0:s.timezone)||a||"auto";return reactExports.useMemo(()=>!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 $=1;$<d.length;$++)if(d[$]&&typeof d[$]=="object")for(var j in d[$])g[j]=d[$][j];return g});function a(d){var g=d+"",$=g.indexOf("...");return $>=0&&($<g.indexOf(")")||g.indexOf("arguments")>=0)}function c(d,g){g||(g={});var $=g.vargs||a(d),j=Object.create(null),_=[],_e=[],et,tt=new WeakMap,rt=function(at,ut,dt){return setTimeout(function(){if(dt){ut.splice(at,1),dt.splice(at,1);return}ut instanceof WeakMap?ut.delete(at):delete ut[at]},g.maxAge)},nt=g.maxAge>0&&g.maxAge<1/0?rt:0,ot=g.equals?g.equals:function(at,ut){return at===ut},lt=g.maxArgs,ct=g.serializer,it,st;return d.length===1&&!g.equals&&!$?(it=(function(at){var ut=typeof at;if(!ct&&(ut==="object"&&at||ut==="function")){var dt;return tt.get(at)||(!nt||nt(at,tt),tt.set(at,dt=d.call(this,at)),dt)}var mt=ut==="number"||ut==="boolean"||at==null?at:ut==="string"?JSON.stringify(at):ct(at);return j[mt]||(!nt||nt(mt,j),j[mt]=d.call(this,at))}).bind(this),st=1):it=(function(){var at=arguments.length;if(!at&&et!=null)return _e[et];var ut=lt||at,dt;for(dt=_.length-1;dt>=0;dt--)if(!(!lt&&_[dt].length!==ut)){for(var mt=ut-1;mt>=0&&ot(_[dt][mt],arguments[mt]);mt--)if(mt===0)return _e[dt]}return dt=_.length-(dt+1),!at&&et==null&&(et=dt),!nt||nt(dt,_e,_),_e[dt]=d.apply(this,_[dt]=arguments)}).bind(this),it.clear=function(){tt=new WeakMap,j=Object.create(null),_=[],_e=[],et=void 0},it.keys=function(){return st?null:_.slice()},it.values=function(){return st?null:_e.slice()},it.keyValues=function(){return st?{primitives:i({},j),objects:tt}:null},it}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,$]=c,j=$.split("|");if(!j.length)return i;const _e=getRules(s).select(d);let et=j.find(rt=>rt.startsWith(_e));et||(et=j[0]);const tt=et.substring(et.indexOf(" ")+1);return i.replace(g,tt)}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 $=[],j=[];if(Object.entries(a).forEach(([_,_e])=>{typeof _e=="function"?j.push(_):reactExports.isValidElement(_e)?$.push(_):_e!=null&&(g=g==null?void 0:g.replace(`:${_}`,`${_e}`))}),j.length||$.length){const _=[];if(j.length){const rt=j.join("");_.push(`(<[${rt}]>.+?<\\/[${rt}]>)`)}if($.length){const rt=$.join("|");_.push(`(:(?:${rt}))`)}const _e=new RegExp(_.join("|"),"gm"),tt=g.split(_e).filter(Boolean).map((rt,nt)=>{if(rt.startsWith("<")&&rt.endsWith(">")){const ot=rt.match(/<([a-z]+)>(.+?)<\/([a-z]+)>/);if(ot){const[,lt,ct]=ot,it=a==null?void 0:a[lt];if(typeof it=="function"){const st=it(ct);return reactExports.cloneElement(st,{key:nt})}}}if(rt.startsWith(":")){const ot=rt.replace(":",""),lt=a==null?void 0:a[ot];if(reactExports.isValidElement(lt))return reactExports.cloneElement(lt,{key:nt})}return rt});return jsxRuntimeExports.jsx(reactExports.Fragment,{children:tt})}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 $=0;$<=DIVISIONS.length;$++){const j=DIVISIONS[$];if(Math.abs(g)<j.amount)return j.name==="seconds"?jsxRuntimeExports.jsx(Trans,{message:"a few seconds ago"}):jsxRuntimeExports.jsx(reactExports.Fragment,{children:d.format(Math.round(g),j.name)});g/=j.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 j,_;const d=i.type==="primary"||a===0,g=c||DefaultIconRenderer,$=i.action?"a":"div";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs($,{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:(j=i.action)==null?void 0:j.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=(_,_e)=>{const et=typeof _=="function"?_(i):_;if(!Object.is(et,i)){const tt=i;i=_e??typeof et!="object"?et:Object.assign({},i,et),a.forEach(rt=>rt(i,tt))}},d=()=>i,j={setState:c,getState:d,subscribe:_=>(a.add(_),()=>a.delete(_)),destroy:()=>{a.clear()}};return i=s(c,d,j),j},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 $={hasValue:!1,value:null};g.current=$}else $=g.current;g=v(function(){function _(nt){if(!_e){if(_e=!0,et=nt,nt=c(nt),d!==void 0&&$.hasValue){var ot=$.value;if(d(ot,nt))return tt=ot}return tt=nt}if(ot=tt,q(et,nt))return ot;var lt=c(nt);return d!==void 0&&d(ot,lt)?ot:(et=nt,tt=lt)}var _e=!1,et,tt,rt=a===void 0?null:a;return[function(){return _(i())},rt===null?void 0:function(){return _(rt())}]},[i,a,c,d]);var j=r$2(s,g[0],g[1]);return u(function(){$.hasValue=!0,$.value=j},[j]),w(j),j};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;d<c.length;d++){const g=c[d],$=a[g];$.writable===!1&&($.writable=!0,$.configurable=!0),($.get||$.set)&&(a[g]={configurable:!0,writable:!0,enumerable:$.enumerable,value:s[g]})}return Object.create(getPrototypeOf(s),a)}function freeze(s,i=!1){return isFrozen(s)||isDraft(s)||!isDraftable(s)||(getArchtype(s)>1&&(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,$=!1;c.type_===3&&(g=new Set(d),d.clear(),$=!0),each(g,(j,_)=>finalizeProperty(s,c,d,j,_,a,$)),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,$){if(isDraft(d)){const j=g&&i&&i.type_!==3&&!has$1(i.assigned_,c)?g.concat(c):void 0,_=finalize(s,d,j);if(set$2(a,c,_),isDraft(_))s.canAutoFreeze_=!1;else return}else $&&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:$,proxy:j}=Proxy.revocable(d,g);return c.draft_=j,c.revoke_=$,j}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 $=this;return function(_=g,..._e){return $.produce(_,et=>a.call(this,et,..._e))}}typeof a!="function"&&die(6),c!==void 0&&typeof c!="function"&&die(7);let d;if(isDraftable(i)){const g=enterScope(this),$=createProxy(i,void 0);let j=!0;try{d=a($),j=!1}finally{j?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=[],$=[];getPlugin("Patches").generateReplacementPatches_(i,d,g,$),c(g,$)}return d}else die(1,i)},this.produceWithPatches=(i,a)=>{if(typeof i=="function")return($,...j)=>this.produceWithPatches($,_=>i(_,...j));let c,d;return[this.produce(i,a,($,j)=>{c=$,d=j}),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(_,_e){super(),this[DRAFT_STATE]={type_:2,parent_:_e,scope_:_e?_e.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(_,_e){const et=this[DRAFT_STATE];return $(et),(!latest(et).has(_)||latest(et).get(_)!==_e)&&(a(et),markChanged(et),et.assigned_.set(_,!0),et.copy_.set(_,_e),et.assigned_.set(_,!0)),this}delete(_){if(!this.has(_))return!1;const _e=this[DRAFT_STATE];return $(_e),a(_e),markChanged(_e),_e.base_.has(_)?_e.assigned_.set(_,!1):_e.assigned_.delete(_),_e.copy_.delete(_),!0}clear(){const _=this[DRAFT_STATE];$(_),latest(_).size&&(a(_),markChanged(_),_.assigned_=new Map,each(_.base_,_e=>{_.assigned_.set(_e,!1)}),_.copy_.clear())}forEach(_,_e){const et=this[DRAFT_STATE];latest(et).forEach((tt,rt,nt)=>{_.call(_e,this.get(rt),rt,this)})}get(_){const _e=this[DRAFT_STATE];$(_e);const et=latest(_e).get(_);if(_e.finalized_||!isDraftable(et)||et!==_e.base_.get(_))return et;const tt=createProxy(et,_e);return a(_e),_e.copy_.set(_,tt),tt}keys(){return latest(this[DRAFT_STATE]).keys()}values(){const _=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const _e=_.next();return _e.done?_e:{done:!1,value:this.get(_e.value)}}}}entries(){const _=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const _e=_.next();if(_e.done)return _e;const et=this.get(_e.value);return{done:!1,value:[_e.value,et]}}}}[Symbol.iterator](){return this.entries()}}function i(j,_){return new s(j,_)}function a(j){j.copy_||(j.assigned_=new Map,j.copy_=new Map(j.base_))}class c extends Set{constructor(_,_e){super(),this[DRAFT_STATE]={type_:3,parent_:_e,scope_:_e?_e.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 _e=this[DRAFT_STATE];return $(_e),_e.copy_?!!(_e.copy_.has(_)||_e.drafts_.has(_)&&_e.copy_.has(_e.drafts_.get(_))):_e.base_.has(_)}add(_){const _e=this[DRAFT_STATE];return $(_e),this.has(_)||(g(_e),markChanged(_e),_e.copy_.add(_)),this}delete(_){if(!this.has(_))return!1;const _e=this[DRAFT_STATE];return $(_e),g(_e),markChanged(_e),_e.copy_.delete(_)||(_e.drafts_.has(_)?_e.copy_.delete(_e.drafts_.get(_)):!1)}clear(){const _=this[DRAFT_STATE];$(_),latest(_).size&&(g(_),markChanged(_),_.copy_.clear())}values(){const _=this[DRAFT_STATE];return $(_),g(_),_.copy_.values()}entries(){const _=this[DRAFT_STATE];return $(_),g(_),_.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(_,_e){const et=this.values();let tt=et.next();for(;!tt.done;)_.call(_e,tt.value,tt.value,this),tt=et.next()}}function d(j,_){return new c(j,_)}function g(j){j.copy_||(j.copy_=new Set,j.base_.forEach(_=>{if(isDraftable(_)){const _e=createProxy(_,j);j.drafts_.set(_,_e),j.copy_.add(_e)}else j.copy_.add(_)}))}function $(j){j.revoked_&&die(3,JSON.stringify(latest(j)))}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,...$)=>{const j=typeof d=="function"?produce(d):d;return i(j,g,...$)},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){Ft(this,"timerId");Ft(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(et=>{et.toasts.splice(0,d)});const g=(c==null?void 0:c.id)||nanoid(6),$=(c==null?void 0:c.type)||"positive",j=(c==null?void 0:c.duration)??getDefaultDuration($),_={timer:j>0?new ToastTimer(()=>i().remove(g),j):null,message:a,...c,id:g,type:$,position:(c==null?void 0:c.position)||"bottom-center",duration:j,disableExitAnimation:c==null?void 0:c.disableExitAnimation,disableEnterAnimation:c==null?void 0:c.disableEnterAnimation},_e=i().toasts.findIndex(et=>et.id===_.id);_e>-1?s(et=>{et.toasts[_e]=_}):s(et=>{et.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)}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 j;const g=s.length-1===d,$=((j=a==null?void 0:a.renderMap)==null?void 0:j[c.type])||NotificationListItem;return jsxRuntimeExports.jsx($,{notification:c,isLast:g},c.id)})})}function NotificationListItem({notification:s,onActionButtonClick:i,lineIconRenderer:a,isLast:c}){const d=useMarkNotificationsAsRead(),g=useNavigate(),$=s.data.mainAction,j=!s.data.image&&!s.read_at;return jsxRuntimeExports.jsxs("div",{onClick:()=>{var _;!d.isPending&&!s.read_at&&d.mutate({ids:[s.id]}),$!=null&&$.action&&(isAbsoluteUrl($.action)?(_=window.open($.action,"_blank"))==null||_.focus():g($.action))},className:clsx$1("flex items-start gap-14 px-32 py-20 bg-alt relative",!c&&"border-b",($==null?void 0:$.action)&&"cursor-pointer",s.read_at?"hover:bg-hover":"bg-paper hover:bg-primary/10"),title:$!=null&&$.label?$.label:void 0,children:[j&&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((_,_e)=>jsxRuntimeExports.jsx(Line,{iconRenderer:a,notification:s,line:_,index:_e},_e)),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 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)})},getCookie=(s,i="")=>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,$)=>{c(g),setCookie(s,g,$)},[s]);return[a,d]}const ActiveWorkspaceIdContext=React.createContext({workspaceId:null,setWorkspaceId:()=>{}});function useActiveWorkspaceId(){return reactExports.useContext(ActiveWorkspaceIdContext)}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:$})=>{const j=i.data;$==="join"&&a.mutate({inviteId:j.inviteId}),$==="decline"&&c.mutate({inviteId:j.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,[$,j]=useCookie(STORAGE_KEY,`${g}`);let _=a?d.find(et=>et.id==$):d.find(et=>et.id==(i==null?void 0:i.default_id));_||(_=d[0]);const _e=reactExports.useMemo(()=>({allThemes:d,selectedTheme:_,selectTheme:et=>{if(!a)return;const tt=findTheme(d,et);tt&&(j(`${tt.id}`),applyThemeToDom(tt))}}),[d,_,j,a]);return jsxRuntimeExports.jsx(ThemeSelectorContext.Provider,{value:_e,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(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;c<s.length;c++){const d=s[c];try{isVueViewModel(d)?a.push("[VueViewModel]"):a.push(String(d))}catch{a.push("[value cannot be serialized]")}}return a.join(i)}function isMatchingPattern(s,i,a=!1){return isString$1(s)?isRegExp(i)?i.test(s):isString$1(i)?a?s===i:s.includes(i):!1:!1}function stringMatchesSomePattern(s,i=[],a=!1){return i.some(c=>isMatchingPattern(s,c,a))}function applyAggregateErrorsToEvent(s,i,a=250,c,d,g,$){if(!g.exception||!g.exception.values||!$||!isInstanceOf($.originalException,Error))return;const j=g.exception.values.length>0?g.exception.values[g.exception.values.length-1]:void 0;j&&(g.exception.values=truncateAggregateExceptions(aggregateExceptionsFromError(s,i,d,$.originalException,c,g.exception.values,j,0),a))}function aggregateExceptionsFromError(s,i,a,c,d,g,$,j){if(g.length>=a+1)return g;let _=[...g];if(isInstanceOf(c[d],Error)){applyExceptionGroupFieldsForParentException($,j);const _e=s(i,c[d]),et=_.length;applyExceptionGroupFieldsForChildException(_e,d,et,j),_=aggregateExceptionsFromError(s,i,a,c[d],d,[_e,..._],_e,et)}return Array.isArray(c.errors)&&c.errors.forEach((_e,et)=>{if(isInstanceOf(_e,Error)){applyExceptionGroupFieldsForParentException($,j);const tt=s(i,_e),rt=_.length;applyExceptionGroupFieldsForChildException(tt,`errors[${et}]`,rt,j),_=aggregateExceptionsFromError(s,i,a,_e,d,[tt,..._],tt,rt)}}),_}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"<unknown>";try{let a=s;const c=5,d=[];let g=0,$=0;const j=" > ",_=j.length;let _e;const et=Array.isArray(i)?i:i.keyAttrs,tt=!Array.isArray(i)&&i.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;a&&g++<c&&(_e=_htmlElementAsString(a,et),!(_e==="html"||g>1&&$+d.length*_+_e.length>=tt));)d.push(_e),$+=_e.length,a=a.parentNode;return d.reverse().join(j)}catch{return"<unknown>"}}function _htmlElementAsString(s,i){const a=s,c=[];let d,g,$,j,_;if(!a||!a.tagName)return"";c.push(a.tagName.toLowerCase());const _e=i&&i.length?i.filter(tt=>a.getAttribute(tt)).map(tt=>[tt,a.getAttribute(tt)]):null;if(_e&&_e.length)_e.forEach(tt=>{c.push(`[${tt[0]}="${tt[1]}"]`)});else if(a.id&&c.push(`#${a.id}`),d=a.className,d&&isString$1(d))for(g=d.split(/\s+/),_=0;_<g.length;_++)c.push(`.${g[_]}`);const et=["aria-label","type","name","title","alt"];for(_=0;_<et.length;_++)$=et[_],j=a.getAttribute($),j&&c.push(`[${$}="${j}"]`);return c.join("")}function getLocationHref(){try{return WINDOW$6.document.location.href}catch{return""}}function getDomElement(s){return WINDOW$6.document&&WINDOW$6.document.querySelector?WINDOW$6.document.querySelector(s):null}const CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],originalConsoleMethods={};function consoleSandbox(s){if(!("console"in GLOBAL_OBJ))return s();const i=GLOBAL_OBJ.console,a={},c=Object.keys(originalConsoleMethods);c.forEach(d=>{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:$,protocol:j,publicKey:_}=s;return`${j}://${_}${i&&d?`:${d}`:""}@${a}${g?`:${g}`:""}/${c&&`${c}/`}${$}`}function dsnFromString(s){const i=DSN_REGEX.exec(s);if(!i){console.error(`Invalid Sentry Dsn: ${s}`);return}const[a,c,d="",g,$="",j]=i.slice(1);let _="",_e=j;const et=_e.split("/");if(et.length>1&&(_=et.slice(0,-1).join("/"),_e=et.pop()),_e){const tt=_e.match(/^\d+/);tt&&(_e=tt[0])}return dsnFromComponents({host:g,pass:d,path:_,projectId:_e,port:$,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"<unknown>"}}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||"<unknown>":a||"<unknown>"}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 $=c;$<g.length;$++){const j=g[$];if(j.length>1024)continue;const _=WEBPACK_ERROR_REGEXP.test(j)?j.replace(WEBPACK_ERROR_REGEXP,"$1"):j;if(!_.match(/\S*Error: /)){for(const _e of i){const et=_e(_);if(et){d.push(et);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="<anonymous>";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 $=()=>{const j=this[SENTRY_XHR_DATA_KEY];if(j&&this.readyState===4){try{j.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(j){return function(..._){return $(),j.apply(this,_)}}):this.addEventListener("readystatechange",$),fill(this,"setRequestHeader",function(j){return function(..._){const[_e,et]=_,tt=this[SENTRY_XHR_DATA_KEY];return tt&&(tt.request_headers[_e.toLowerCase()]=et),j.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,$=String(d);lastHref=$,triggerHandlers$1("history",{from:g,to:$})}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,$,j){if(g==="click"||g=="keypress")try{const _=this,_e=_.__sentry_instrumentation_handlers__=_.__sentry_instrumentation_handlers__||{},et=_e[g]=_e[g]||{refCount:0};if(!et.handler){const tt=makeDOMEventHandler(s);et.handler=tt,d.call(this,g,tt,j)}et.refCount++}catch{}return d.call(this,g,$,j)}}),fill(c,"removeEventListener",function(d){return function(g,$,j){if(g==="click"||g=="keypress")try{const _=this,_e=_.__sentry_instrumentation_handlers__||{},et=_e[g];et&&(et.refCount--,et.refCount<=0&&(d.call(this,g,et.handler,j),et.handler=void 0,delete _e[g]),Object.keys(_e).length===0&&delete _.__sentry_instrumentation_handlers__)}catch{}return d.call(this,g,$,j)}}))})}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;g<i.length;g++)if(i[g]===d)return!0;return i.push(d),!1}function c(d){if(s)i.delete(d);else for(let g=0;g<i.length;g++)if(i[g]===d){i.splice(g,1);break}}return[a,c]}function normalize(s,i=100,a=1/0){try{return visit("",s,i,a)}catch(c){return{ERROR:`**non-serializable** (${c})`}}}function normalizeToSize(s,i=3,a=100*1024){const c=normalize(s,i);return jsonSize(c)>a?normalizeToSize(s,i-1,a):c}function visit(s,i,a=1/0,c=1/0,d=memoBuilder()){const[g,$]=d;if(i==null||["number","boolean","string"].includes(typeof i)&&!isNaN$1(i))return i;const j=stringifyValue(s,i);if(!j.startsWith("[object "))return j;if(i.__sentry_skip_normalization__)return i;const _=typeof i.__sentry_override_normalization_depth__=="number"?i.__sentry_override_normalization_depth__:a;if(_===0)return j.replace("object ","");if(g(i))return"[Circular ~]";const _e=i;if(_e&&typeof _e.toJSON=="function")try{const nt=_e.toJSON();return visit("",nt,_-1,c,d)}catch{}const et=Array.isArray(i)?[]:{};let tt=0;const rt=convertToPlainObject(i);for(const nt in rt){if(!Object.prototype.hasOwnProperty.call(rt,nt))continue;if(tt>=c){et[nt]="[MaxProperties ~]";break}const ot=rt[nt];et[nt]=visit(nt,ot,_-1,c,d),tt++}return $(i),et}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($){d($)}},g=>{if(!a)d(g);else try{c(a(g))}catch($){d($)}}]),this._executeHandlers()})}catch(i){return this.then(a=>a,i)}finally(i){return new SyncPromise((a,c)=>{let d,g;return this.then($=>{g=!1,d=$,i&&i()},$=>{g=!0,d=$,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.length<s}function c($){return i.splice(i.indexOf($),1)[0]}function d($){if(!a())return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached."));const j=$();return i.indexOf(j)===-1&&i.push(j),j.then(()=>c(j)).then(null,()=>c(j).then(null,()=>{})),j}function g($){return new SyncPromise((j,_)=>{let _e=i.length;if(!_e)return j(!0);const et=setTimeout(()=>{$&&$>0&&j(!1)},$);i.forEach(tt=>{resolvedSyncPromise(tt).then(()=>{--_e||(clearTimeout(et),j(!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<i,$=s.timing&&s.timing.navigationStart,_=typeof $=="number"?Math.abs($+a-c):i,_e=_<i;return g||_e?d<=_?s.timeOrigin:$:c})(),BAGGAGE_HEADER_NAME="baggage",SENTRY_BAGGAGE_KEY_PREFIX="sentry-",SENTRY_BAGGAGE_KEY_PREFIX_REGEX=/^sentry-/,MAX_BAGGAGE_STRING_LENGTH=8192;function baggageHeaderToDynamicSamplingContext(s){if(!isString$1(s)&&!Array.isArray(s))return;let i={};if(Array.isArray(s))i=s.reduce((c,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 $=d.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);c[$]=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)}`,$=d===0?g:`${i},${g}`;return $.length>MAX_BAGGAGE_STRING_LENGTH?i:$},"")}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:$}=a||{},j={traceId:d||uuid4(),spanId:uuid4().substring(16),sampled:$};return g&&(j.parentSpanId=g),c&&(j.dsc=c),{traceparentData:a,dynamicSamplingContext:c,propagationContext:j}}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($){typeof d=="string"?d=typeof $=="string"?d+$:[encodeUTF8(d,i),$]:d.push(typeof $=="string"?encodeUTF8($,i):$)}for(const $ of c){const[j,_]=$;if(g(`
${JSON.stringify(j)}
`),typeof _=="string"||_ instanceof Uint8Array)g(_);else{let _e;try{_e=JSON.stringify(_)}catch{_e=JSON.stringify(normalize(_))}g(_e)}}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"],$=a&&a["retry-after"];if(g)for(const j of g.trim().split(",")){const[_,_e]=j.split(":",2),et=parseInt(_,10),tt=(isNaN(et)?60:et)*1e3;if(!_e)d.all=c+tt;else for(const rt of _e.split(";"))d[rt]=c+tt}else $?d.all=c+parseRetryAfterHeader($,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 $=s[c];if(i===null||typeof $!="function")d(i);else{const j=$({...i},a);isThenable(j)?j.then(_=>notifyEventProcessors(s,_,a,c+1).then(d)).then(null,g):notifyEventProcessors(s,j,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 $=this._span.transaction;if($){i.sdkProcessingMetadata={dynamicSamplingContext:$.getDynamicSamplingContext(),...i.sdkProcessingMetadata};const j=$.name;j&&(i.tags={transaction:j,...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<i}bindClient(i){const a=this.getStackTop();a.client=i,i&&i.setupIntegrations&&i.setupIntegrations()}pushScope(){const i=Scope.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:i}),i}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(i){const a=this.pushScope();try{i(a)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(i,a){const c=this._lastEventId=a&&a.event_id?a.event_id:uuid4(),d=new Error("Sentry syntheticException");return this._withClient((g,$)=>{g.captureException(i,{originalException:i,syntheticException:d,...a,event_id:c},$)}),c}captureMessage(i,a,c){const d=this._lastEventId=c&&c.event_id?c.event_id:uuid4(),g=new Error(i);return this._withClient(($,j)=>{$.captureMessage(i,a,{originalException:i,syntheticException:g,...c,event_id:d},j)}),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:$=DEFAULT_BREADCRUMBS}=d.getOptions&&d.getOptions()||{};if($<=0)return;const _={timestamp:dateTimestampInSeconds(),...i},_e=g?consoleSandbox(()=>g(_,a)):_;_e!==null&&(d.emit&&d.emit("beforeAddBreadcrumb",_e,a),c.addBreadcrumb(_e,$))}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:$}=GLOBAL_OBJ.navigator||{},j=makeSession({release:d,environment:g,user:a.getUser(),...$&&{userAgent:$},...i}),_=a.getSession&&a.getSession();return _&&_.status==="ok"&&updateSession(_,{status:"exited"}),this.endSession(),a.setSession(j),j}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()||{},$=dropUndefinedKeys({environment:c.environment||DEFAULT_ENVIRONMENT,release:c.release,user_segment:g,public_key:d,trace_id:s});return i.emit&&i.emit("createDsc",$),$}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 $=this.metadata.source;return $&&$!=="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="<unlabeled transaction>"),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(j=>j!==this&&j.endTimestamp):[];this._trimEnd&&c.length>0&&(this.endTimestamp=c.reduce((j,_)=>j.endTimestamp&&_.endTimestamp?j.endTimestamp>_.endTimestamp?j:_:j).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,$=!1){super(i,a),this._idleHub=a,this._idleTimeout=c,this._finalTimeout=d,this._heartbeatInterval=g,this._onScope=$,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=IDLE_TRANSACTION_FINISH_REASONS[4],$&&a.configureScope(j=>j.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<i,d=(this._finalTimeout+this._idleTimeout)/1e3,g=a.endTimestamp-this.startTimestamp<d;return c&&g})}if(this._onScope){const a=this._idleHub.getScope();a.getTransaction()===this&&a.setSpan(void 0)}return super.finish(i)}registerBeforeFinishCallback(i){this._beforeFinishCallbacks.push(i)}initSpanRecorder(i){if(!this.spanRecorder){const a=d=>{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()<c,s.sampled,s)}function isValidSampleRate(s){return!(isNaN$1(s)||!(typeof s=="number"||typeof s=="boolean")||s<0||s>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 $=new Transaction(s,this);return $=sampleTransaction($,c,{parentSampled:s.parentSampled,transactionContext:s,...i}),$.sampled&&$.initSpanRecorder(c._experiments&&c._experiments.maxSpans),a&&a.emit&&a.emit("startTransaction",$),$}function startIdleTransaction(s,i,a,c,d,g,$){const j=s.getClient(),_=j&&j.getOptions()||{};let _e=new IdleTransaction(i,s,a,c,$,d);return _e=sampleTransaction(_e,_,{parentSampled:i.parentSampled,transactionContext:i,...g}),_e.sampled&&_e.initSpanRecorder(_._experiments&&_._experiments.maxSpans),j&&j.emit&&j.emit("startTransaction",_e),_e}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)}},$="aggregates"in s?[{type:"sessions"},s]:[{type:"session"},s.toJSON()];return createEnvelope(g,[$])}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 $=createEventEnvelopeHeaders(s,d,c,i);return delete s.sdkProcessingMetadata,createEnvelope($,[[{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($=>{$.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,$=>$.name==="Debug");if(g!==-1){const[$]=d.splice(g,1);d.push($)}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,$)=>c(g,$,s),{id:i.name});s.addEventProcessor(d)}}function findIndex(s,i){for(let a=0;a<s.length;a++)if(i(s[a])===!0)return a;return-1}function prepareEvent(s,i,a,c,d){const{normalizeDepth:g=3,normalizeMaxBreadth:$=1e3}=s,j={...i,event_id:i.event_id||a.event_id||uuid4(),timestamp:i.timestamp||dateTimestampInSeconds()},_=a.integrations||s.integrations.map(rt=>rt.name);applyClientOptions(j,s),applyIntegrationsMetadata(j,_),i.type===void 0&&applyDebugIds(j,s.stackParser);let _e=c;a.captureContext&&(_e=Scope.clone(_e).update(a.captureContext));let et=resolvedSyncPromise(j);const tt=d&&d.getEventProcessors?d.getEventProcessors():[];if(_e){if(_e.getAttachments){const rt=[...a.attachments||[],..._e.getAttachments()];rt.length&&(a.attachments=rt)}et=_e.applyToEvent(j,a,tt)}else et=notifyEventProcessors([...tt,...getGlobalEventProcessors()],j,a);return et.then(rt=>(rt&&applyDebugMeta(rt),typeof g=="number"&&g>0?normalizeEvent(rt,g,$):rt))}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 $=s.exception&&s.exception.values&&s.exception.values[0];$&&$.value&&($.value=truncate($.value,g));const j=s.request;j&&j.url&&(j.url=truncate(j.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(($,j)=>{let _;const _e=c.get(j);_e?_=_e:(_=i(j),c.set(j,_));for(let et=_.length-1;et>=0;et--){const tt=_[et];if(tt.filename){$[tt.filename]=a[j];break}}return $},{});try{s.exception.values.forEach($=>{$.stacktrace.frames.forEach(j=>{j.filename&&(j.debug_id=g[j.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 $=isPrimitive$1(i)?this.eventFromMessage(String(i),a,c):this.eventFromException(i,c);return this._process($.then(j=>this._captureEvent(j,c,d)).then(j=>{g=j})),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 _e=_.mechanism;if(_e&&_e.handled===!1){c=!0;break}}}const $=i.status==="ok";($&&i.errors===0||$&&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($=>{if($===null)return $;const{propagationContext:j}=$.sdkProcessingMetadata||{};if(!($.contexts&&$.contexts.trace)&&j){const{traceId:_e,spanId:et,parentSpanId:tt,dsc:rt}=j;$.contexts={trace:{trace_id:_e,span_id:et,parent_span_id:tt},...$.contexts};const nt=rt||getDynamicSamplingContextFromClient(_e,this,c);$.sdkProcessingMetadata={dynamicSamplingContext:nt,...$.sdkProcessingMetadata}}return $})}_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,$=isTransactionEvent(i),j=isErrorEvent(i),_=i.type||"error",_e=`before send for type \`${_}\``;if(j&&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 et=_==="replay_event"?"replay":_;return this._prepareEvent(i,a,c).then(tt=>{if(tt===null)throw this.recordDroppedEvent("event_processor",et,i),new SentryError("An event processor returned `null`, will not send event.","log");if(a.data&&a.data.__sentry__===!0)return tt;const nt=processBeforeSend(d,tt,a);return _validateBeforeSendResult(nt,_e)}).then(tt=>{if(tt===null)throw this.recordDroppedEvent("before_send",et,i),new SentryError(`${_e} returned \`null\`, will not send event.`,"log");const rt=c&&c.getSession();!$&&rt&&this._updateSessionFromEvent(rt,tt);const nt=tt.transaction_info;if($&&nt&&tt.transaction!==i.transaction){const ot="custom";tt.transaction_info={...nt,source:ot}}return this.sendEvent(tt,a),tt}).then(null,tt=>{throw tt instanceof SentryError?tt:(this.captureException(tt,{data:{__sentry__:!0},originalException:tt}),new SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${tt}`))})}_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=$=>a.drain($);function g($){const j=[];if(forEachEnvelopeItem($,(tt,rt)=>{const nt=envelopeItemTypeToDataCategory(rt);if(isRateLimited(c,nt)){const ot=getEventForEnvelopeItem(tt,rt);s.recordDroppedEvent("ratelimit_backoff",nt,ot)}else j.push(tt)}),j.length===0)return resolvedSyncPromise();const _=createEnvelope($[0],j),_e=tt=>{forEachEnvelopeItem(_,(rt,nt)=>{const ot=getEventForEnvelopeItem(rt,nt);s.recordDroppedEvent(tt,envelopeItemTypeToDataCategory(nt),ot)})},et=()=>i({body:serializeEnvelope(_,s.textEncoder)}).then(tt=>(tt.statusCode!==void 0&&(tt.statusCode<200||tt.statusCode>=300),c=updateRateLimits(c,tt),tt),tt=>{throw _e("network_error"),tt});return a.add(et).then(tt=>tt,tt=>{if(tt instanceof SentryError)return _e("queue_overflow"),resolvedSyncPromise();throw tt})}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.77.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!=="<anonymous>"&&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($=>wrap$1($,i));return s.apply(this,g)}catch(g){throw ignoreNextOnError(),withScope($=>{$.addEventProcessor(j=>(i.mechanism&&(addExceptionTypeValue(j,void 0,void 0),addExceptionMechanism(j,i.mechanism)),j.extra={...j.extra,arguments:d},j)),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(),$=g&&g.getOptions().normalizeDepth,j={exception:{values:[{type:isEvent(i)?i.constructor.name:c?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(i,{isUnhandledRejection:c})}]},extra:{__serialized__:normalizeToSize(i,$)}};if(a){const _=parseStackFrames(s,a);_.length&&(j.exception.values[0].stacktrace={frames:_})}return j}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,$=eventFromString(s,i,g,d);return $.level=a,c&&c.event_id&&($.event_id=c.event_id),resolvedSyncPromise($)}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 $=i;if("stack"in i)g=eventFromError(s,i);else{const j=$.name||(isDOMError($)?"DOMError":"DOMException"),_=$.message?`${j}: ${$.message}`:j;g=eventFromString(s,_,a,c),addExceptionTypeValue(g,_)}return"code"in $&&(g.tags={...g.tags,"DOMException.code":`${$.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 $=g.body.length;a+=$,c++;const j={body:g.body,method:"POST",referrerPolicy:"origin",headers:s.headers,keepalive:a<=6e4&&c<15,...s.fetchOptions};try{return i(s.url,j).then(_=>(a-=$,c--,{statusCode:_.status,headers:{"x-sentry-rate-limits":_.headers.get("X-Sentry-Rate-Limits"),"retry-after":_.headers.get("Retry-After")}}))}catch(_){return clearCachedFetchImplementation(),a-=$,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 $ in s.headers)Object.prototype.hasOwnProperty.call(s.headers,$)&&g.setRequestHeader($,s.headers[$]);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 )?((?:<anonymous>|[-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:$,column:j,error:_}=s;if(shouldIgnoreOnError()||_&&_.__sentry_own_request__)return;const _e=_===void 0&&isString$1(d)?_eventFromIncompleteOnError(d,g,$,j):_enhanceEventWithInitialFrame(eventFromUnknownInput(a,_||d,void 0,c,!1),g,$,j);_e.level="error",addMechanismAndCapture(i,_,_e,"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,$="Error";const j=g.match(d);return j&&($=j[1],g=j[2]),_enhanceEventWithInitialFrame({exception:{values:[{type:$,value:g}]}},i,a,c)}function _enhanceEventWithInitialFrame(s,i,a,c){const d=s.exception=s.exception||{},g=d.values=d.values||[],$=g[0]=g[0]||{},j=$.stacktrace=$.stacktrace||{},_=j.frames=j.frames||[],_e=isNaN(parseInt(c,10))?void 0:c,et=isNaN(parseInt(a,10))?void 0:a,tt=isString$1(i)&&i.length>0?i:getLocationHref();return _.length===0&&_.push({colno:_e,filename:tt,function:"?",in_app:!0,lineno:et}),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 $={mechanism:{data:{function:d,handler:getFunctionName(g)},handled:!1,type:"instrument"}},j=getOriginalFunction(g);return j&&($.mechanism.data.handler=getFunctionName(j)),wrap$1(g,$)})}),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,$){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"}}),$])}}),fill(a,"removeEventListener",function(c){return function(d,g,$){const j=g;try{const _=j&&j.__sentry_wrapped__;_&&c.call(this,d,_,$)}catch{}return c.call(this,d,j,$)}}))}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 $=a.event;c=_isEvent($)?htmlTreeAsString($.target,{keyAttrs:d,maxStringLength:g}):htmlTreeAsString($,{keyAttrs:d,maxStringLength:g})}catch{c="<unknown>"}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:$,body:j}=c,_={method:d,url:g,status_code:$},_e={xhr:s.xhr,input:j,startTimestamp:i,endTimestamp:a};getCurrentHub().addBreadcrumb({category:"xhr",data:_,type:"http"},_e)}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}},$={...i.request,...a&&{url:a},headers:g};i.request=$}}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<c.length;d++){const g=c[d],$=a[d];if(g.filename!==$.filename||g.lineno!==$.lineno||g.colno!==$.colno||g.function!==$.function)return!1}return!0}function _isSameFingerprint(s,i){let a=s.fingerprint,c=i.fingerprint;if(!a&&!c)return!0;if(a&&!c||!a&&c)return!1;a=a,c=c;try{return a.join("")===c.join("")}catch{return!1}}function _getExceptionFromEvent(s){return s.exception&&s.exception.values&&s.exception.values[0]}function _getFramesFromEvent(s){const i=s.exception;if(i)try{return i.values[0].stacktrace.frames}catch{return}}const defaultIntegrations=[new InboundFilters,new FunctionToString,new TryCatch,new Breadcrumbs,new GlobalHandlers,new LinkedErrors,new Dedupe,new HttpContext];function init$1(s={}){s.defaultIntegrations===void 0&&(s.defaultIntegrations=defaultIntegrations),s.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(s.release=__SENTRY_RELEASE__),WINDOW$1.SENTRY_RELEASE&&WINDOW$1.SENTRY_RELEASE.id&&(s.release=WINDOW$1.SENTRY_RELEASE.id)),s.autoSessionTracking===void 0&&(s.autoSessionTracking=!0),s.sendClientReports===void 0&&(s.sendClientReports=!0);const i={...s,stackParser:stackParserFromStackParserOptions(s.stackParser||defaultStackParser),integrations:getIntegrationsToSetup(s),transport:s.transport||(supportsFetch()?makeFetchTransport:makeXHRTransport)};initAndBind(BrowserClient,i),s.autoSessionTracking&&startSessionTracking()}function startSessionOnHub(s){s.startSession({ignoreDuration:!0}),s.captureSession()}function startSessionTracking(){if(typeof WINDOW$1.document>"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=j=>{j.forEach(_=>{if(!_.hadRecentInput){const _e=d[0],et=d[d.length-1];c&&d.length!==0&&_.startTime-et.startTime<1e3&&_.startTime-_e.startTime<5e3?(c+=_.value,d.push(_)):(c=_.value,d=[_]),c>i.value&&(i.value=c,i.entries=d,a&&a())}})},$=observe("layout-shift",g);if($){a=bindReporter(s,i);const j=()=>{g($.takeRecords()),a(!0)};return onHidden(j),j}};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=j=>{j.startTime<i.firstHiddenTime&&(a.value=j.processingStart-j.startTime,a.entries.push(j),c(!0))},g=j=>{j.forEach(d)},$=observe("first-input",g);c=bindReporter(s,a),$&&onHidden(()=>{g($.takeRecords()),$.disconnect()},!0)},reportedMetricIDs={},onLCP=s=>{const i=getVisibilityWatcher(),a=initMetric("LCP");let c;const d=$=>{const j=$[$.length-1];if(j){const _=Math.max(j.startTime-getActivationStart(),0);_<i.firstHiddenTime&&(a.value=_,a.entries=[j],c())}},g=observe("largest-contentful-paint",d);if(g){c=bindReporter(s,a);const $=()=>{reportedMetricIDs[a.id]||(d(g.takeRecords()),g.disconnect(),reportedMetricIDs[a.id]=!0,c(!0))};return["keydown","click"].forEach(j=>{addEventListener(j,$,{once:!0,capture:!0})}),onHidden($,!0),$}},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($=>{const j=msToSec($.startTime),_=msToSec($.duration);if(!(s.op==="navigation"&&a+j<s.startTimestamp))switch($.entryType){case"navigation":{_addNavigationSpans(s,$,a),d=a+msToSec($.responseStart),g=a+msToSec($.requestStart);break}case"mark":case"paint":case"measure":{_addMeasureSpans(s,$,j,_,a);const _e=getVisibilityWatcher(),et=$.startTime<_e.firstHiddenTime;$.name==="first-paint"&&et&&(_measurements.fp={value:$.startTime,unit:"millisecond"}),$.name==="first-contentful-paint"&&et&&(_measurements.fcp={value:$.startTime,unit:"millisecond"});break}case"resource":{const _e=$.name.replace(WINDOW.location.origin,"");_addResourceSpans(s,$,_e,j,_,a);break}}}),_performanceCursor=Math.max(c.length-1,0),_trackNavigator(s),s.op==="pageload"){typeof d=="number"&&(_measurements.ttfb={value:(d-s.startTimestamp)*1e3,unit:"millisecond"},typeof g=="number"&&g<=d&&(_measurements["ttfb.requestTime"]={value:(d-g)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(j=>{if(!_measurements[j]||a>=s.startTimestamp)return;const _=_measurements[j].value,_e=a+msToSec(_),et=Math.abs((_e-s.startTimestamp)*1e3);_measurements[j].value=et});const $=_measurements["mark.fid"];$&&_measurements.fid&&(_startChild(s,{description:"first input delay",endTimestamp:$.value+msToSec(_measurements.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:$.value}),delete _measurements["mark.fid"]),"fcp"in _measurements||delete _measurements.cls,Object.keys(_measurements).forEach(j=>{s.setMeasurement(j,_measurements[j].value,_measurements[j].unit)}),_tagMetricInfo(s)}_lcpEntry=void 0,_clsEntry=void 0,_measurements={}}function _addMeasureSpans(s,i,a,c,d){const g=d+a,$=g+c;return _startChild(s,{description:i.name,endTimestamp:$,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 $=g?i[g]:i[`${a}End`],j=i[`${a}Start`];!j||!$||_startChild(s,{op:"browser",origin:"auto.browser.browser.metrics",description:d||a,startTimestamp:c+msToSec(j),endTimestamp:c+msToSec($)})}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 $={};"transferSize"in i&&($["http.response_transfer_size"]=i.transferSize),"encodedBodySize"in i&&($["http.response_content_length"]=i.encodedBodySize),"decodedBodySize"in i&&($["http.decoded_response_content_length"]=i.decodedBodySize),"renderBlockingStatus"in i&&($["resource.render_blocking_status"]=i.renderBlockingStatus);const j=g+c,_=j+d;_startChild(s,{description:a,endTimestamp:_,op:i.initiatorType?`resource.${i.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:j,data:$})}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:$}={traceFetch:defaultRequestInstrumentationOptions.traceFetch,traceXHR:defaultRequestInstrumentationOptions.traceXHR,...s},j=typeof g=="function"?g:et=>!0,_=et=>shouldAttachHeaders(et,c||d),_e={};i&&addInstrumentationHandler("fetch",et=>{const tt=fetchCallback(et,j,_,_e);$&&tt&&addHTTPTimings(tt)}),a&&addInstrumentationHandler("xhr",et=>{const tt=xhrCallback(et,j,_,_e);$&&tt&&addHTTPTimings(tt)})}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($=>s.setData(...$)),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 rt=s.fetchData.__span;if(!rt)return;const nt=c[rt];if(nt){if(s.response){nt.setHttpStatus(s.response.status);const ot=s.response&&s.response.headers&&s.response.headers.get("content-length"),lt=parseInt(ot);lt>0&&nt.setData("http.response_content_length",lt)}else s.error&&nt.setStatus("internal_error");nt.finish(),delete c[rt]}return}const g=getCurrentHub(),$=g.getScope(),j=g.getClient(),_=$.getSpan(),{method:_e,url:et}=s.fetchData,tt=d&&_?_.startChild({data:{url:et,type:"fetch","http.method":_e},description:`${_e} ${et}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(tt&&(s.fetchData.__span=tt.spanId,c[tt.spanId]=tt),a(s.fetchData.url)&&j){const rt=s.args[0];s.args[1]=s.args[1]||{};const nt=s.args[1];nt.headers=addTracingHeadersToFetchRequest(rt,j,$,nt,tt)}return tt}function addTracingHeadersToFetchRequest(s,i,a,c,d){const g=d||a.getSpan(),$=g&&g.transaction,{traceId:j,sampled:_,dsc:_e}=a.getPropagationContext(),et=g?g.toTraceparent():generateSentryTraceHeader(j,void 0,_),tt=$?$.getDynamicSamplingContext():_e||getDynamicSamplingContextFromClient(j,i,a),rt=dynamicSamplingContextToSentryBaggageHeader(tt),nt=typeof Request<"u"&&isInstanceOf(s,Request)?s.headers:c.headers;if(nt)if(typeof Headers<"u"&&isInstanceOf(nt,Headers)){const ot=new Headers(nt);return ot.append("sentry-trace",et),rt&&ot.append(BAGGAGE_HEADER_NAME,rt),ot}else if(Array.isArray(nt)){const ot=[...nt,["sentry-trace",et]];return rt&&ot.push([BAGGAGE_HEADER_NAME,rt]),ot}else{const ot="baggage"in nt?nt.baggage:void 0,lt=[];return Array.isArray(ot)?lt.push(...ot):ot&&lt.push(ot),rt&&lt.push(rt),{...nt,"sentry-trace":et,baggage:lt.length>0?lt.join(","):void 0}}else return{"sentry-trace":et,baggage:rt}}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 $=i(g.url);if(s.endTimestamp&&$){const tt=d.__sentry_xhr_span_id__;if(!tt)return;const rt=c[tt];rt&&(rt.setHttpStatus(g.status_code),rt.finish(),delete c[tt]);return}const j=getCurrentHub(),_=j.getScope(),_e=_.getSpan(),et=$&&_e?_e.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(et&&(d.__sentry_xhr_span_id__=et.spanId,c[d.__sentry_xhr_span_id__]=et),d.setRequestHeader&&a(g.url))if(et){const tt=et&&et.transaction,rt=tt&&tt.getDynamicSamplingContext(),nt=dynamicSamplingContextToSentryBaggageHeader(rt);setHeaderOnXhr(d,et.toTraceparent(),nt)}else{const tt=j.getClient(),{traceId:rt,sampled:nt,dsc:ot}=_.getPropagationContext(),lt=generateSentryTraceHeader(rt,void 0,nt),ct=ot||(tt?getDynamicSamplingContextFromClient(rt,tt,_):void 0),it=dynamicSamplingContextToSentryBaggageHeader(ct);setHeaderOnXhr(d,lt,it)}return et}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:$})=>{if($===void 0&&c&&c.indexOf(g)!==-1){c=void 0;return}$!==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:$,startTransactionOnLocationChange:j,startTransactionOnPageLoad:_,markBackgroundTransactions:_e,traceFetch:et,traceXHR:tt,shouldCreateSpanForRequest:rt,enableHTTPTimings:nt,_experiments:ot}=this.options,ct=g&&g.tracePropagationTargets||this.options.tracePropagationTargets;$(it=>{const st=this._createRouteTransaction(it);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(st,it,a),st},_,j),_e&&registerBackgroundTabDetection(),ot.enableInteractions&&this._registerInteractionListener(),instrumentOutgoingRequests({traceFetch:et,traceXHR:tt,tracePropagationTargets:ct,shouldCreateSpanForRequest:rt,enableHTTPTimings:nt})}_createRouteTransaction(i){if(!this._getCurrentHub)return;const a=this._getCurrentHub(),{beforeNavigate:c,idleTimeout:d,finalTimeout:g,heartbeatInterval:$}=this.options,j=i.op==="pageload",_=j?getMetaContent("sentry-trace"):"",_e=j?getMetaContent("baggage"):"",{traceparentData:et,dynamicSamplingContext:tt,propagationContext:rt}=tracingContextFromHeaders(_,_e),nt={...i,...et,metadata:{...i.metadata,dynamicSamplingContext:et&&!tt?{}:tt},trimEnd:!0},ot=typeof c=="function"?c(nt):nt,lt=ot===void 0?{...nt,sampled:!1}:ot;lt.metadata=lt.name!==nt.name?{...lt.metadata,source:"custom"}:lt.metadata,this._latestRouteName=lt.name,this._latestRouteSource=lt.metadata&&lt.metadata.source,lt.sampled;const{location:ct}=WINDOW,it=startIdleTransaction(a,lt,d,g,!0,{location:ct},$),st=a.getScope();return j&&et?st.setPropagationContext(rt):st.setPropagationContext({traceId:it.traceId,spanId:it.spanId,parentSpanId:it.parentSpanId,sampled:it.sampled}),it.registerBeforeFinishCallback(at=>{this._collectWebVitals(),addPerformanceEntries(at)}),it}_registerInteractionListener(){let i;const a=()=>{const{idleTimeout:c,finalTimeout:d,heartbeatInterval:g}=this.options,$="ui.action.click",j=getActiveTransaction();if(j&&j.op&&["navigation","pageload"].includes(j.op)||(i&&(i.setFinishReason("interactionInterrupted"),i.finish(),i=void 0),!this._getCurrentHub)||!this._latestRouteName)return;const _=this._getCurrentHub(),{location:_e}=WINDOW,et={name:this._latestRouteName,op:$,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};i=startIdleTransaction(_,et,c,d,!0,{location:_e},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."];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))}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(rt=>rt.name===et)},[s==null?void 0:s.permissions,i==null?void 0:i.permissions]),d=reactExports.useCallback((et,tt)=>{const rt=c(et);let nt=null;if(rt){const ot=rt.restrictions.find(lt=>lt.name===tt);nt=ot?ot.value:void 0}return nt},[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(nt=>nt.name==="admin"))!=null||c(et)!=null},[s==null?void 0:s.permissions,i==null?void 0:i.permissions,c]),$=((_e=s==null?void 0:s.subscriptions)==null?void 0:_e.find(et=>et.valid))!=null,j=reactExports.useCallback(()=>{const et=getFromLocalStorage("be.onboarding.selected");return et?`/checkout/${et.productId}/${et.priceId}`:a},[a]),_=reactExports.useCallback(et=>{var tt;return((tt=s==null?void 0:s.roles)==null?void 0:tt.find(rt=>rt.id===et))!=null},[s]);return{user:s,hasPermission:g,getPermission:c,getRestrictionValue:d,isLoggedIn:!!s,isSubscribed:$,hasRole:_,getRedirectUri:j}}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:$,equalWidth:j=!0,badge:_,..._e},et)=>{const tt=clsx$1(getButtonSizeStyle(i,{padding:$,equalWidth:j,variant:c}),g,_&&"relative");return jsxRuntimeExports.jsxs(ButtonBase,{..._e,ref:et,radius:d,variant:c,className:tt,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:$}=this.resolvedOptions(),j=(c=$488c6ddbf4ef74c2$var$UNITS[d])===null||c===void 0?void 0:c[g];a+=j[$]||j.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<i)throw new RangeError("End date must be >= 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<i)throw new RangeError("End date must be >= 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:$,unitDisplay:j="short"}=i;if(!$)throw new Error('unit option must be provided with style: "unit"');if(!(!((c=$488c6ddbf4ef74c2$var$UNITS[$])===null||c===void 0)&&c[j]))throw new Error(`Unsupported unit ${$} with unitDisplay = ${j}`);i={...i,style:"decimal"}}let d=s+(i?Object.entries(i).sort(($,j)=>$[0]<j[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),$=d.replace(g,"").replace(/\u200e|\u061C/,"");return[...$].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),d.replace(g,"!!!").replace($,"+").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]<g[0]?-1:1).join():""),c=$6c7bd7858deea686$var$numberParserCache.get(a);return c||(c=new $6c7bd7858deea686$var$NumberParserImpl(s,i),$6c7bd7858deea686$var$numberParserCache.set(a,c)),c}class $6c7bd7858deea686$var$NumberParserImpl{parse(i){let a=this.sanitize(i);a=$6c7bd7858deea686$var$replaceAll(a,this.symbols.group,"").replace(this.symbols.decimal,".").replace(this.symbols.minusSign,"-").replace(this.symbols.numeral,this.symbols.index);let c=a?+a:NaN;if(isNaN(c))return NaN;if(this.options.currencySign==="accounting"&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(i)&&(c=-1*c),this.options.style==="percent"){c/=100;var d;c=+c.toFixed(((d=this.options.maximumFractionDigits)!==null&&d!==void 0?d:0)+2)}return c}sanitize(i){return i=i.replace(this.symbols.literals,""),i=i.replace("-",this.symbols.minusSign),this.options.numberingSystem==="arab"&&(i=i.replace(",",this.symbols.decimal),i=i.replace(String.fromCharCode(1548),this.symbols.decimal),i=$6c7bd7858deea686$var$replaceAll(i,".",this.symbols.group)),this.options.locale==="fr-FR"&&(i=$6c7bd7858deea686$var$replaceAll(i,".",String.fromCharCode(8239))),i}isValidPartialNumber(i,a=-1/0,c=1/0){return i=this.sanitize(i),i.startsWith(this.symbols.minusSign)&&a<0?i=i.slice(this.symbols.minusSign.length):this.symbols.plusSign&&i.startsWith(this.symbols.plusSign)&&c>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,$;let j=s.formatToParts(-10000.111),_=s.formatToParts(10000.111),_e=$6c7bd7858deea686$var$pluralNumbers.map(ht=>s.formatToParts(ht));var et;let tt=(et=(c=j.find(ht=>ht.type==="minusSign"))===null||c===void 0?void 0:c.value)!==null&&et!==void 0?et:"-",rt=(d=_.find(ht=>ht.type==="plusSign"))===null||d===void 0?void 0:d.value;!rt&&((a==null?void 0:a.signDisplay)==="exceptZero"||(a==null?void 0:a.signDisplay)==="always")&&(rt="+");let nt=(g=j.find(ht=>ht.type==="decimal"))===null||g===void 0?void 0:g.value,ot=($=j.find(ht=>ht.type==="group"))===null||$===void 0?void 0:$.value,lt=j.filter(ht=>!$6c7bd7858deea686$var$nonLiteralParts.has(ht.type)).map(ht=>$6c7bd7858deea686$var$escapeRegex(ht.value)),ct=_e.flatMap(ht=>ht.filter(xt=>!$6c7bd7858deea686$var$nonLiteralParts.has(xt.type)).map(xt=>$6c7bd7858deea686$var$escapeRegex(xt.value))),it=[...new Set([...lt,...ct])].sort((ht,xt)=>xt.length-ht.length),st=it.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${it.join("|")}|[\\p{White_Space}]`,"gu"),at=[...new Intl.NumberFormat(i.locale,{useGrouping:!1}).format(9876543210)].reverse(),ut=new Map(at.map((ht,xt)=>[ht,xt])),dt=new RegExp(`[${at.join("")}]`,"g");return{minusSign:tt,plusSign:rt,decimal:nt,group:ot,literals:st,numeral:dt,index:ht=>String(ut.get(ht))}}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:$=!1,className:j,position:_="relative",trackColor:_e,fillColor:et="border-primary",...tt}=s;a=clamp$1(a,c,d);const rt=getCircleStyle(g),nt=(a-c)/(d-c),ot=useNumberFormatter({style:"percent"});let lt="";!$&&!lt&&(lt=ot.format(nt));const ct={},it={};if(!$){const st=(a-c)/(d-c)*100;let at;st>0&&st<=50?(at=-180+st/50*180,ct.transform=`rotate(${at}deg)`,it.transform="rotate(-180deg)"):st>50&&(at=-180+(st-50)/50*180,ct.transform="rotate(0deg)",it.transform=`rotate(${at}deg)`)}return jsxRuntimeExports.jsxs("div",{...tt,"aria-valuenow":$?void 0:a,"aria-valuemin":c,"aria-valuemax":d,"aria-valuetext":$?void 0:lt,role:"progressbar",ref:i,className:clsx$1("progress-circle",_,rt,$&&"indeterminate",j),children:[jsxRuntimeExports.jsx("div",{className:clsx$1(rt,_e,"rounded-full border-4")}),jsxRuntimeExports.jsxs("div",{className:clsx$1("fills absolute left-0 top-0 h-full w-full",$&&"progress-circle-fills-animate"),children:[jsxRuntimeExports.jsx(FillMask,{circleSize:rt,subMaskStyle:ct,isIndeterminate:$,className:"rotate-180",fillColor:et,subMaskClassName:clsx$1($&&"progress-circle-fill-submask-1-animate")}),jsxRuntimeExports.jsx(FillMask,{circleSize:rt,subMaskStyle:it,isIndeterminate:$,fillColor:et,subMaskClassName:clsx$1($&&"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)}const mailSentSvg=""+new URL("mail-sent-c2a25732.svg",import.meta.url).href;function useResendVerificationEmail(){return useMutation({mutationFn:resendEmail,onSuccess:()=>{toast(message("Email sent"))},onError:s=>showHttpErrorToast(s)})}function resendEmail(s){return apiClient.post("auth/email/verification-notification",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)}function EmailVerificationPage(){const{data:s}=useUser("me"),i=useResendVerificationEmail(),{branding:{logo_light:a,logo_dark:c}}=useSettings(),g=useIsDarkMode()?a:c,$=useLogout();return jsxRuntimeExports.jsxs("div",{className:"flex min-h-screen w-screen flex-col items-center bg-alt p-24",children:[g&&jsxRuntimeExports.jsx("img",{src:g,alt:"Site logo",className:"my-60 block h-42 w-auto"}),jsxRuntimeExports.jsxs("div",{className:"flex max-w-580 flex-col items-center rounded border bg-paper px-14 py-28 text-center shadow",children:[jsxRuntimeExports.jsx(SvgImage,{src:mailSentSvg,className:"h-144"}),jsxRuntimeExports.jsx("h1",{className:"mb-20 mt-40 text-3xl",children:jsxRuntimeExports.jsx(Trans,{message:"Verify your email"})}),jsxRuntimeExports.jsx("div",{className:"mb-24 text-sm",children:jsxRuntimeExports.jsx(Trans,{message:"We've sent an email to “:email“ to verify your email address and activate your account. The link in the the email will expire in 24 hours.",values:{email:s==null?void 0:s.user.email}})}),jsxRuntimeExports.jsx("div",{className:"text-sm",children:jsxRuntimeExports.jsx(Trans,{message:"If you did not receive an email, click the button below and we will send you another one."})}),jsxRuntimeExports.jsxs("div",{className:"mt-30",children:[jsxRuntimeExports.jsx(Button,{className:"mr-10",variant:"flat",color:"primary",disabled:i.isPending||!(s!=null&&s.user.email),onClick:()=>{i.mutate({email:s.user.email})},children:jsxRuntimeExports.jsx(Trans,{message:"Resend email"})}),jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>$.mutate(),children:jsxRuntimeExports.jsx(Trans,{message:"Logout"})})]})]})]})}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)};function $458b0a5536c1a7cf$export$40bfa8c7b0832715(s,i,a){let[c,d]=reactExports.useState(s||i),g=reactExports.useRef(s!==void 0),$=s!==void 0;reactExports.useEffect(()=>{let _e=g.current;_e!==$&&console.warn(`WARN: A component changed from ${_e?"controlled":"uncontrolled"} to ${$?"controlled":"uncontrolled"}.`),g.current=$},[$]);let j=$?s:c,_=reactExports.useCallback((_e,...et)=>{let tt=(rt,...nt)=>{a&&(Object.is(j,rt)||a(rt,...nt)),$||(j=rt)};typeof _e=="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,...ot)=>{let lt=_e($?j:nt,...ot);return tt(lt,...et),$?nt:lt})):($||d(_e),tt(_e,...et))},[$,j,a]);return[j,_]}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):g<i?g=i:!isNaN(a)&&g>a&&(g=i+Math.floor((a-i)/c)*c);let $=c.toString(),j=$.indexOf("."),_=j>=0?$.length-j:0;if(_>0){let _e=Math.pow(10,_);g=Math.round(g*_e)/_e}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=(d=React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||d===void 0||(c=d.ReactCurrentOwner)===null||c===void 0?void 0:c.current;if(g){let $=$b5e257d569688ac6$var$componentIds.get(g);$==null?$b5e257d569688ac6$var$componentIds.set(g,{id:i.current,state:g.memoizedState}):g.memoizedState!==$.state&&(i.current=$.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 <SSRProvider> 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<s.length;i++)s[i]&&(a=r$1(s[i]))&&(c&&(c+=" "),c+=a);else for(i in s)s[i]&&(c&&(c+=" "),c+=i);return c}function clsx(){for(var s,i,a=0,c="";a<arguments.length;)(s=arguments[a++])&&(i=r$1(s))&&(c&&(c+=" "),c+=i);return c}const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c=typeof document<"u"?React.useLayoutEffect:()=>{};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 $=c.current.next();if($.done){c.current=null;return}i===$.value?d():a($.value)});$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{c.current&&d()});let g=$8ae05eaa5c114e9c$export$7f54fc3180508a52($=>{c.current=$(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)}}const $431fbd86ca7dc216$export$b204af158042fbac=s=>{var i;return(i=s==null?void 0:s.ownerDocument)!==null&&i!==void 0?i:document};function $3ef42575df84b30b$export$9d1611c77c2fe928(...s){let i={...s[0]};for(let a=1;a<s.length;a++){let c=s[a];for(let d in c){let g=i[d],$=c[d];typeof g=="function"&&typeof $=="function"&&d[0]==="o"&&d[1]==="n"&&d.charCodeAt(2)>=65&&d.charCodeAt(2)<=90?i[d]=$ff5963eb1fccf552$export$e08e3b67e392101e(g,$):(d==="className"||d==="UNSAFE_className")&&typeof g=="string"&&typeof $=="string"?i[d]=clsx(g,$):d==="id"&&g&&$?i.id=$bdb11010cef70236$export$cd8c9cb68f842629(g,$):i[d]=$!==void 0?$: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<i.scrollHeight||i.offsetWidth<i.scrollWidth)&&a.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),i=i.parentNode;return c instanceof HTMLElement&&a.push({element:c,scrollTop:c.scrollTop,scrollLeft:c.scrollLeft}),a}function $7215afc6de606d6b$var$restoreScrollPosition(s){for(let{element:i,scrollTop:a,scrollLeft:c}of s)i.scrollTop=a,i.scrollLeft=c}function $c87311424ea30a05$var$testUserAgent(s){var i;return typeof window>"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,$,j)=>{let _=j!=null&&j.once?(..._e)=>{s.current.delete($),$(..._e)}:$;s.current.set($,{type:g,eventTarget:d,fn:_,options:j}),d.addEventListener(g,$,j)},[]),a=reactExports.useCallback((d,g,$,j)=>{var _;let _e=((_=s.current.get($))===null||_===void 0?void 0:_.fn)||$;d.removeEventListener(g,_e,j),s.current.delete($)},[]),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}const 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 $=d==="x"?c===(a?"end":"start")?"right":"left":c==="start"?"bottom":"top";return i.reference[g]>i.floating[g]&&($=getOppositePlacement($)),[$,getOppositePlacement($)]}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"],$=["bottom","top"];switch(s){case"top":case"bottom":return a?i?d:c:i?c:d;case"left":case"right":return i?g:$;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($=>$+"-"+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),$=getAlignmentAxis(i),j=getAxisLength($),_=getSide(i),_e=g==="y",et=c.x+c.width/2-d.width/2,tt=c.y+c.height/2-d.height/2,rt=c[j]/2-d[j]/2;let nt;switch(_){case"top":nt={x:et,y:c.y-d.height};break;case"bottom":nt={x:et,y:c.y+c.height};break;case"right":nt={x:c.x+c.width,y:tt};break;case"left":nt={x:c.x-d.width,y:tt};break;default:nt={x:c.x,y:c.y}}switch(getAlignment(i)){case"start":nt[$]-=rt*(a&&_e?-1:1);break;case"end":nt[$]+=rt*(a&&_e?-1:1);break}return nt}const computePosition$1=async(s,i,a)=>{const{placement:c="bottom",strategy:d="absolute",middleware:g=[],platform:$}=a,j=g.filter(Boolean),_=await($.isRTL==null?void 0:$.isRTL(i));let _e=await $.getElementRects({reference:s,floating:i,strategy:d}),{x:et,y:tt}=computeCoordsFromPlacement(_e,c,_),rt=c,nt={},ot=0;for(let lt=0;lt<j.length;lt++){const{name:ct,fn:it}=j[lt],{x:st,y:at,data:ut,reset:dt}=await it({x:et,y:tt,initialPlacement:c,placement:rt,strategy:d,middlewareData:nt,rects:_e,platform:$,elements:{reference:s,floating:i}});if(et=st??et,tt=at??tt,nt={...nt,[ct]:{...nt[ct],...ut}},dt&&ot<=50){ot++,typeof dt=="object"&&(dt.placement&&(rt=dt.placement),dt.rects&&(_e=dt.rects===!0?await $.getElementRects({reference:s,floating:i,strategy:d}):dt.rects),{x:et,y:tt}=computeCoordsFromPlacement(_e,rt,_)),lt=-1;continue}}return{x:et,y:tt,placement:rt,strategy:d,middlewareData:nt}};async function detectOverflow(s,i){var a;i===void 0&&(i={});const{x:c,y:d,platform:g,rects:$,elements:j,strategy:_}=s,{boundary:_e="clippingAncestors",rootBoundary:et="viewport",elementContext:tt="floating",altBoundary:rt=!1,padding:nt=0}=evaluate(i,s),ot=getPaddingObject(nt),ct=j[rt?tt==="floating"?"reference":"floating":tt],it=rectToClientRect(await g.getClippingRect({element:(a=await(g.isElement==null?void 0:g.isElement(ct)))==null||a?ct:ct.contextElement||await(g.getDocumentElement==null?void 0:g.getDocumentElement(j.floating)),boundary:_e,rootBoundary:et,strategy:_})),st=tt==="floating"?{...$.floating,x:c,y:d}:$.reference,at=await(g.getOffsetParent==null?void 0:g.getOffsetParent(j.floating)),ut=await(g.isElement==null?void 0:g.isElement(at))?await(g.getScale==null?void 0:g.getScale(at))||{x:1,y:1}:{x:1,y:1},dt=rectToClientRect(g.convertOffsetParentRelativeRectToViewportRelativeRect?await g.convertOffsetParentRelativeRectToViewportRelativeRect({rect:st,offsetParent:at,strategy:_}):st);return{top:(it.top-dt.top+ot.top)/ut.y,bottom:(dt.bottom-it.bottom+ot.bottom)/ut.y,left:(it.left-dt.left+ot.left)/ut.x,right:(dt.right-it.right+ot.right)/ut.x}}const arrow$1=s=>({name:"arrow",options:s,async fn(i){const{x:a,y:c,placement:d,rects:g,platform:$,elements:j,middlewareData:_}=i,{element:_e,padding:et=0}=evaluate(s,i)||{};if(_e==null)return{};const tt=getPaddingObject(et),rt={x:a,y:c},nt=getAlignmentAxis(d),ot=getAxisLength(nt),lt=await $.getDimensions(_e),ct=nt==="y",it=ct?"top":"left",st=ct?"bottom":"right",at=ct?"clientHeight":"clientWidth",ut=g.reference[ot]+g.reference[nt]-rt[nt]-g.floating[ot],dt=rt[nt]-g.reference[nt],mt=await($.getOffsetParent==null?void 0:$.getOffsetParent(_e));let ht=mt?mt[at]:0;(!ht||!await($.isElement==null?void 0:$.isElement(mt)))&&(ht=j.floating[at]||g.floating[ot]);const xt=ut/2-dt/2,wt=ht/2-lt[ot]/2-1,Rt=min(tt[it],wt),Ct=min(tt[st],wt),gt=Rt,ft=ht-lt[ot]-Ct,pt=ht/2-lt[ot]/2+xt,bt=clamp(gt,pt,ft),Et=!_.arrow&&getAlignment(d)!=null&&pt!=bt&&g.reference[ot]/2-(pt<gt?Rt:Ct)-lt[ot]/2<0,St=Et?pt<gt?pt-gt:pt-ft:0;return{[nt]:rt[nt]+St,data:{[nt]:bt,centerOffset:pt-bt-St,...Et&&{alignmentOffset:St}},reset:Et}}}),flip=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var a,c;const{placement:d,middlewareData:g,rects:$,initialPlacement:j,platform:_,elements:_e}=i,{mainAxis:et=!0,crossAxis:tt=!0,fallbackPlacements:rt,fallbackStrategy:nt="bestFit",fallbackAxisSideDirection:ot="none",flipAlignment:lt=!0,...ct}=evaluate(s,i);if((a=g.arrow)!=null&&a.alignmentOffset)return{};const it=getSide(d),st=getSide(j)===j,at=await(_.isRTL==null?void 0:_.isRTL(_e.floating)),ut=rt||(st||!lt?[getOppositePlacement(j)]:getExpandedPlacements(j));!rt&&ot!=="none"&&ut.push(...getOppositeAxisPlacements(j,lt,ot,at));const dt=[j,...ut],mt=await detectOverflow(i,ct),ht=[];let xt=((c=g.flip)==null?void 0:c.overflows)||[];if(et&&ht.push(mt[it]),tt){const gt=getAlignmentSides(d,$,at);ht.push(mt[gt[0]],mt[gt[1]])}if(xt=[...xt,{placement:d,overflows:ht}],!ht.every(gt=>gt<=0)){var wt,Rt;const gt=(((wt=g.flip)==null?void 0:wt.index)||0)+1,ft=dt[gt];if(ft)return{data:{index:gt,overflows:xt},reset:{placement:ft}};let pt=(Rt=xt.filter(bt=>bt.overflows[0]<=0).sort((bt,Et)=>bt.overflows[1]-Et.overflows[1])[0])==null?void 0:Rt.placement;if(!pt)switch(nt){case"bestFit":{var Ct;const bt=(Ct=xt.map(Et=>[Et.placement,Et.overflows.filter(St=>St>0).reduce((St,$t)=>St+$t,0)]).sort((Et,St)=>Et[1]-St[1])[0])==null?void 0:Ct[0];bt&&(pt=bt);break}case"initialPlacement":pt=j;break}if(d!==pt)return{reset:{placement:pt}}}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)),$=getSide(a),j=getAlignment(a),_=getSideAxis(a)==="y",_e=["left","top"].includes($)?-1:1,et=g&&_?-1:1,tt=evaluate(i,s);let{mainAxis:rt,crossAxis:nt,alignmentAxis:ot}=typeof tt=="number"?{mainAxis:tt,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...tt};return j&&typeof ot=="number"&&(nt=j==="end"?ot*-1:ot),_?{x:nt*et,y:rt*_e}:{x:rt*_e,y:nt*et}}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:$=!1,limiter:j={fn:ct=>{let{x:it,y:st}=ct;return{x:it,y:st}}},..._}=evaluate(s,i),_e={x:a,y:c},et=await detectOverflow(i,_),tt=getSideAxis(getSide(d)),rt=getOppositeAxis(tt);let nt=_e[rt],ot=_e[tt];if(g){const ct=rt==="y"?"top":"left",it=rt==="y"?"bottom":"right",st=nt+et[ct],at=nt-et[it];nt=clamp(st,nt,at)}if($){const ct=tt==="y"?"top":"left",it=tt==="y"?"bottom":"right",st=ot+et[ct],at=ot-et[it];ot=clamp(st,ot,at)}const lt=j.fn({...i,[rt]:nt,[tt]:ot});return{...lt,data:{x:lt.x-a,y:lt.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:$=()=>{},...j}=evaluate(s,i),_=await detectOverflow(i,j),_e=getSide(a),et=getAlignment(a),tt=getSideAxis(a)==="y",{width:rt,height:nt}=c.floating;let ot,lt;_e==="top"||_e==="bottom"?(ot=_e,lt=et===(await(d.isRTL==null?void 0:d.isRTL(g.floating))?"start":"end")?"left":"right"):(lt=_e,ot=et==="end"?"top":"bottom");const ct=nt-_[ot],it=rt-_[lt],st=!i.middlewareData.shift;let at=ct,ut=it;if(tt){const mt=rt-_.left-_.right;ut=et||st?min(it,mt):mt}else{const mt=nt-_.top-_.bottom;at=et||st?min(ct,mt):mt}if(st&&!et){const mt=max(_.left,0),ht=max(_.right,0),xt=max(_.top,0),wt=max(_.bottom,0);tt?ut=rt-2*(mt!==0||ht!==0?mt+ht:max(_.left,_.right)):at=nt-2*(xt!==0||wt!==0?xt+wt:max(_.top,_.bottom))}await $({...i,availableWidth:ut,availableHeight:at});const dt=await d.getDimensions(g.floating);return rt!==dt.width||nt!==dt.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$1(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$1(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$1(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),$=getWindow(d);return g?i.concat($,$.visualViewport||[],isOverflowElement(d)?d:[],$.frameElement&&a?getOverflowAncestors($.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$1(s),g=d?s.offsetWidth:a,$=d?s.offsetHeight:c,j=round(a)!==g||round(c)!==$;return j&&(a=g,c=$),{width:a,height:c,$:j}}function unwrapElement(s){return isElement(s)?s:s.contextElement}function getScale(s){const i=unwrapElement(s);if(!isHTMLElement$1(i))return createCoords(1);const a=i.getBoundingClientRect(),{width:c,height:d,$:g}=getCssDimensions(i);let $=(g?round(a.width):a.width)/c,j=(g?round(a.height):a.height)/d;return(!$||!Number.isFinite($))&&($=1),(!j||!Number.isFinite(j))&&(j=1),{x:$,y:j}}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 $=createCoords(1);i&&(c?isElement(c)&&($=getScale(c)):$=getScale(s));const j=shouldAddVisualOffsets(g,a,c)?getVisualOffsets(g):createCoords(0);let _=(d.left+j.x)/$.x,_e=(d.top+j.y)/$.y,et=d.width/$.x,tt=d.height/$.y;if(g){const rt=getWindow(g),nt=c&&isElement(c)?getWindow(c):c;let ot=rt.frameElement;for(;ot&&c&&nt!==rt;){const lt=getScale(ot),ct=ot.getBoundingClientRect(),it=getComputedStyle$1(ot),st=ct.left+(ot.clientLeft+parseFloat(it.paddingLeft))*lt.x,at=ct.top+(ot.clientTop+parseFloat(it.paddingTop))*lt.y;_*=lt.x,_e*=lt.y,et*=lt.x,tt*=lt.y,_+=st,_e+=at,ot=getWindow(ot).frameElement}}return rectToClientRect({width:et,height:tt,x:_,y:_e})}function convertOffsetParentRelativeRectToViewportRelativeRect(s){let{rect:i,offsetParent:a,strategy:c}=s;const d=isHTMLElement$1(a),g=getDocumentElement(a);if(a===g)return i;let $={scrollLeft:0,scrollTop:0},j=createCoords(1);const _=createCoords(0);if((d||!d&&c!=="fixed")&&((getNodeName(a)!=="body"||isOverflowElement(g))&&($=getNodeScroll(a)),isHTMLElement$1(a))){const _e=getBoundingClientRect(a);j=getScale(a),_.x=_e.x+a.clientLeft,_.y=_e.y+a.clientTop}return{width:i.width*j.x,height:i.height*j.y,x:i.x*j.x-$.scrollLeft*j.x+_.x,y:i.y*j.y-$.scrollTop*j.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 $=-a.scrollLeft+getWindowScrollBarX(s);const j=-a.scrollTop;return getComputedStyle$1(c).direction==="rtl"&&($+=max(i.clientWidth,c.clientWidth)-d),{width:d,height:g,x:$,y:j}}function getViewportRect(s,i){const a=getWindow(s),c=getDocumentElement(s),d=a.visualViewport;let g=c.clientWidth,$=c.clientHeight,j=0,_=0;if(d){g=d.width,$=d.height;const _e=isWebKit();(!_e||_e&&i==="fixed")&&(j=d.offsetLeft,_=d.offsetTop)}return{width:g,height:$,x:j,y:_}}function getInnerBoundingClientRect(s,i){const a=getBoundingClientRect(s,!0,i==="fixed"),c=a.top+s.clientTop,d=a.left+s.clientLeft,g=isHTMLElement$1(s)?getScale(s):createCoords(1),$=s.clientWidth*g.x,j=s.clientHeight*g.y,_=d*g.x,_e=c*g.y;return{width:$,height:j,x:_,y:_e}}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(j=>isElement(j)&&getNodeName(j)!=="body"),d=null;const g=getComputedStyle$1(s).position==="fixed";let $=g?getParentNode(s):s;for(;isElement($)&&!isLastTraversableNode($);){const j=getComputedStyle$1($),_=isContainingBlock($);!_&&j.position==="fixed"&&(d=null),(g?!_&&!d:!_&&j.position==="static"&&!!d&&["absolute","fixed"].includes(d.position)||isOverflowElement($)&&!_&&hasFixedPositionAncestor(s,$))?c=c.filter(et=>et!==$):d=j,$=getParentNode($)}return i.set(s,c),c}function getClippingRect(s){let{element:i,boundary:a,rootBoundary:c,strategy:d}=s;const $=[...a==="clippingAncestors"?getClippingElementAncestors(i,this._c):[].concat(a),c],j=$[0],_=$.reduce((_e,et)=>{const tt=getClientRectFromClippingAncestor(i,et,d);return _e.top=max(tt.top,_e.top),_e.right=min(tt.right,_e.right),_e.bottom=min(tt.bottom,_e.bottom),_e.left=max(tt.left,_e.left),_e},getClientRectFromClippingAncestor(i,j,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$1(i),d=getDocumentElement(i),g=a==="fixed",$=getBoundingClientRect(s,!0,g,i);let j={scrollLeft:0,scrollTop:0};const _=createCoords(0);if(c||!c&&!g)if((getNodeName(i)!=="body"||isOverflowElement(d))&&(j=getNodeScroll(i)),c){const _e=getBoundingClientRect(i,!0,g,i);_.x=_e.x+i.clientLeft,_.y=_e.y+i.clientTop}else d&&(_.x=getWindowScrollBarX(d));return{x:$.left+j.scrollLeft-_.x,y:$.top+j.scrollTop-_.y,width:$.width,height:$.height}}function getTrueOffsetParent(s,i){return!isHTMLElement$1(s)||getComputedStyle$1(s).position==="fixed"?null:i?i(s):s.offsetParent}function getOffsetParent(s,i){const a=getWindow(s);if(!isHTMLElement$1(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 $(j,_){j===void 0&&(j=!1),_===void 0&&(_=1),g();const{left:_e,top:et,width:tt,height:rt}=s.getBoundingClientRect();if(j||i(),!tt||!rt)return;const nt=floor(et),ot=floor(d.clientWidth-(_e+tt)),lt=floor(d.clientHeight-(et+rt)),ct=floor(_e),st={rootMargin:-nt+"px "+-ot+"px "+-lt+"px "+-ct+"px",threshold:max(0,min(1,_))||1};let at=!0;function ut(dt){const mt=dt[0].intersectionRatio;if(mt!==_){if(!at)return $();mt?$(!1,mt):c=setTimeout(()=>{$(!1,1e-7)},100)}at=!1}try{a=new IntersectionObserver(ut,{...st,root:d.ownerDocument})}catch{a=new IntersectionObserver(ut,st)}a.observe(s)}return $(!0),g}function autoUpdate(s,i,a,c){c===void 0&&(c={});const{ancestorScroll:d=!0,ancestorResize:g=!0,elementResize:$=typeof ResizeObserver=="function",layoutShift:j=typeof IntersectionObserver=="function",animationFrame:_=!1}=c,_e=unwrapElement(s),et=d||g?[..._e?getOverflowAncestors(_e):[],...getOverflowAncestors(i)]:[];et.forEach(it=>{d&&it.addEventListener("scroll",a,{passive:!0}),g&&it.addEventListener("resize",a)});const tt=_e&&j?observeMove(_e,a):null;let rt=-1,nt=null;$&&(nt=new ResizeObserver(it=>{let[st]=it;st&&st.target===_e&&nt&&(nt.unobserve(i),cancelAnimationFrame(rt),rt=requestAnimationFrame(()=>{nt&&nt.observe(i)})),a()}),_e&&!_&&nt.observe(_e),nt.observe(i));let ot,lt=_?getBoundingClientRect(s):null;_&&ct();function ct(){const it=getBoundingClientRect(s);lt&&(it.x!==lt.x||it.y!==lt.y||it.width!==lt.width||it.height!==lt.height)&&a(),lt=it,ot=requestAnimationFrame(ct)}return a(),()=>{et.forEach(it=>{d&&it.removeEventListener("scroll",a),g&&it.removeEventListener("resize",a)}),tt&&tt(),nt&&nt.disconnect(),nt=null,_&&cancelAnimationFrame(ot)}}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$1(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$1(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$1(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:$}={},transform:j=!0,whileElementsMounted:_,open:_e}=s,[et,tt]=reactExports.useState({x:0,y:0,strategy:a,placement:i,middlewareData:{},isPositioned:!1}),[rt,nt]=reactExports.useState(c);deepEqual$1(rt,c)||nt(c);const[ot,lt]=reactExports.useState(null),[ct,it]=reactExports.useState(null),st=reactExports.useCallback(Et=>{Et!=mt.current&&(mt.current=Et,lt(Et))},[lt]),at=reactExports.useCallback(Et=>{Et!==ht.current&&(ht.current=Et,it(Et))},[it]),ut=g||ot,dt=$||ct,mt=reactExports.useRef(null),ht=reactExports.useRef(null),xt=reactExports.useRef(et),wt=useLatestRef(_),Rt=useLatestRef(d),Ct=reactExports.useCallback(()=>{if(!mt.current||!ht.current)return;const Et={placement:i,strategy:a,middleware:rt};Rt.current&&(Et.platform=Rt.current),computePosition(mt.current,ht.current,Et).then(St=>{const $t={...St,isPositioned:!0};gt.current&&!deepEqual$1(xt.current,$t)&&(xt.current=$t,reactDomExports.flushSync(()=>{tt($t)}))})},[rt,i,a,Rt]);index(()=>{_e===!1&&xt.current.isPositioned&&(xt.current.isPositioned=!1,tt(Et=>({...Et,isPositioned:!1})))},[_e]);const gt=reactExports.useRef(!1);index(()=>(gt.current=!0,()=>{gt.current=!1}),[]),index(()=>{if(ut&&(mt.current=ut),dt&&(ht.current=dt),ut&&dt){if(wt.current)return wt.current(ut,dt,Ct);Ct()}},[ut,dt,Ct,wt]);const ft=reactExports.useMemo(()=>({reference:mt,floating:ht,setReference:st,setFloating:at}),[st,at]),pt=reactExports.useMemo(()=>({reference:ut,floating:dt}),[ut,dt]),bt=reactExports.useMemo(()=>{const Et={position:a,left:0,top:0};if(!pt.floating)return Et;const St=roundByDPR(pt.floating,et.x),$t=roundByDPR(pt.floating,et.y);return j?{...Et,transform:"translate("+St+"px, "+$t+"px)",...getDPR(pt.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:St,top:$t}},[a,j,pt.floating,et.x,et.y]);return reactExports.useMemo(()=>({...et,update:Ct,refs:ft,elements:pt,floatingStyles:bt}),[et,Ct,ft,pt,bt])}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:$,shiftCrossAxis:j=!0,fallbackPlacements:_}){const _e=reactExports.useRef(null),et={placement:c,strategy:"fixed"};a||(et.whileElementsMounted=autoUpdate,et.middleware=[offset(d),shift({padding:16,crossAxis:j,mainAxis:!0}),flip({padding:16,fallbackPlacements:_}),size({apply({rects:it,availableHeight:st,availableWidth:at,elements:ut}){s==="matchTrigger"&&$!=null?Object.assign(ut.floating.style,{width:`${it.reference.width}px`,maxWidth:`${at}`,maxHeight:`${Math.min(st,$)}px`}):$!=null&&Object.assign(ut.floating.style,{maxHeight:`${Math.min(st,$)}px`})},padding:16})],g&&et.middleware.push(arrow({element:_e})));const tt=useFloating(et),rt=reactExports.useMemo(()=>o([i,tt.refs.setReference]),[tt.refs.setReference,i]),{x:nt,y:ot}=tt.middlewareData.arrow||{},lt={top:"bottom",right:"left",bottom:"top",left:"right"}[tt.placement.split("-")[0]],ct={left:nt,top:ot,right:"",bottom:"",[lt]:"-4px"};return{...tt,reference:rt,arrowRef:_e,arrowStyle:ct}}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),$=()=>{d(g.matches)};return g.addEventListener("change",$),i||$(),()=>{g.removeEventListener("change",$)}},[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({register:()=>{}});$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}),$=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_=>{a&&$e0b6e0b68ec7f50f$var$isValidEvent(_,i)&&(d&&d(_),g.current.isPointerDown=!0)}),j=$8ae05eaa5c114e9c$export$7f54fc3180508a52(_=>{a&&a(_)});reactExports.useEffect(()=>{let _=g.current;if(c)return;const _e=i.current,et=$431fbd86ca7dc216$export$b204af158042fbac(_e);if(typeof PointerEvent<"u"){let tt=rt=>{_.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(rt,i)&&j(rt),_.isPointerDown=!1};return et.addEventListener("pointerdown",$,!0),et.addEventListener("pointerup",tt,!0),()=>{et.removeEventListener("pointerdown",$,!0),et.removeEventListener("pointerup",tt,!0)}}else{let tt=nt=>{_.ignoreEmulatedMouseEvents?_.ignoreEmulatedMouseEvents=!1:_.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(nt,i)&&j(nt),_.isPointerDown=!1},rt=nt=>{_.ignoreEmulatedMouseEvents=!0,_.isPointerDown&&$e0b6e0b68ec7f50f$var$isValidEvent(nt,i)&&j(nt),_.isPointerDown=!1};return et.addEventListener("mousedown",$,!0),et.addEventListener("mouseup",tt,!0),et.addEventListener("touchstart",$,!0),et.addEventListener("touchend",rt,!0),()=>{et.removeEventListener("mousedown",$,!0),et.removeEventListener("mouseup",tt,!0),et.removeEventListener("touchstart",$,!0),et.removeEventListener("touchend",rt,!0)}}},[i,c,$,j])}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:$}=d(s);c=g!=="none"&&$!=="hidden"&&$!=="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(null),$=reactExports.useRef(null),j=reactExports.useRef([]),{parentNode:_}=reactExports.useContext($9bf71ea28793e738$var$FocusContext)||{},_e=reactExports.useMemo(()=>new $9bf71ea28793e738$var$TreeNode({scopeRef:j}),[j]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let rt=_||$9bf71ea28793e738$export$d06fae2ee68b101e.root;if($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(rt.scopeRef)&&$9bf71ea28793e738$var$activeScope&&!$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope,rt.scopeRef)){let nt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);nt&&(rt=nt)}rt.addChild(_e),$9bf71ea28793e738$export$d06fae2ee68b101e.addNode(_e)},[_e,_]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let rt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(j);rt&&(rt.contain=!!a)},[a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{var rt;let nt=(rt=g.current)===null||rt===void 0?void 0:rt.nextSibling,ot=[];for(;nt&&nt!==$.current;)ot.push(nt),nt=nt.nextSibling;j.current=ot},[i]),$9bf71ea28793e738$var$useActiveScopeTracker(j,c,a),$9bf71ea28793e738$var$useFocusContainment(j,a),$9bf71ea28793e738$var$useRestoreFocus(j,c,a),$9bf71ea28793e738$var$useAutoFocus(j,d),reactExports.useEffect(()=>{let rt=document.activeElement,nt=null;if($9bf71ea28793e738$var$isElementInScope(rt,j.current)){for(let ot of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())ot.scopeRef&&$9bf71ea28793e738$var$isElementInScope(rt,ot.scopeRef.current)&&(nt=ot);nt===$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(j)&&($9bf71ea28793e738$var$activeScope=nt.scopeRef)}},[j]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>()=>{var rt,nt,ot;let lt=(ot=(nt=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(j))===null||nt===void 0||(rt=nt.parent)===null||rt===void 0?void 0:rt.scopeRef)!==null&&ot!==void 0?ot:null;(j===$9bf71ea28793e738$var$activeScope||$9bf71ea28793e738$var$isAncestorScope(j,$9bf71ea28793e738$var$activeScope))&&(!lt||$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(lt))&&($9bf71ea28793e738$var$activeScope=lt),$9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(j)},[j]);let et=reactExports.useMemo(()=>$9bf71ea28793e738$var$createFocusManagerForScope(j),[]),tt=reactExports.useMemo(()=>({focusManager:et,parentNode:_e}),[_e,et]);return React.createElement($9bf71ea28793e738$var$FocusContext.Provider,{value:tt},React.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:g}),i,React.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:$}))}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:$}=i,j=c||document.activeElement,_=a[0].previousElementSibling,_e=$9bf71ea28793e738$var$getScopeRoot(a),et=$9bf71ea28793e738$export$2d6ec8fc375ceafa(_e,{tabbable:d,accept:$},a);et.currentNode=$9bf71ea28793e738$var$isElementInScope(j,a)?j:_;let tt=et.nextNode();return!tt&&g&&(et.currentNode=_,tt=et.nextNode()),tt&&$9bf71ea28793e738$var$focusElement(tt,!0),tt},focusPrevious(i={}){let a=s.current,{from:c,tabbable:d,wrap:g,accept:$}=i,j=c||document.activeElement,_=a[a.length-1].nextElementSibling,_e=$9bf71ea28793e738$var$getScopeRoot(a),et=$9bf71ea28793e738$export$2d6ec8fc375ceafa(_e,{tabbable:d,accept:$},a);et.currentNode=$9bf71ea28793e738$var$isElementInScope(j,a)?j:_;let tt=et.previousNode();return!tt&&g&&(et.currentNode=_,tt=et.previousNode()),tt&&$9bf71ea28793e738$var$focusElement(tt,!0),tt},focusFirst(i={}){let a=s.current,{tabbable:c,accept:d}=i,g=$9bf71ea28793e738$var$getScopeRoot(a),$=$9bf71ea28793e738$export$2d6ec8fc375ceafa(g,{tabbable:c,accept:d},a);$.currentNode=a[0].previousElementSibling;let j=$.nextNode();return j&&$9bf71ea28793e738$var$focusElement(j,!0),j},focusLast(i={}){let a=s.current,{tabbable:c,accept:d}=i,g=$9bf71ea28793e738$var$getScopeRoot(a),$=$9bf71ea28793e738$export$2d6ec8fc375ceafa(g,{tabbable:c,accept:d},a);$.currentNode=a[a.length-1].nextElementSibling;let j=$.previousNode();return j&&$9bf71ea28793e738$var$focusElement(j,!0),j}}}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();$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{let d=s.current;if(!i){c.current&&(cancelAnimationFrame(c.current),c.current=void 0);return}let g=_=>{if(_.key!=="Tab"||_.altKey||_.ctrlKey||_.metaKey||!$9bf71ea28793e738$var$shouldContainFocus(s))return;let _e=document.activeElement,et=s.current;if(!et||!$9bf71ea28793e738$var$isElementInScope(_e,et))return;let tt=$9bf71ea28793e738$var$getScopeRoot(et),rt=$9bf71ea28793e738$export$2d6ec8fc375ceafa(tt,{tabbable:!0},et);if(!_e)return;rt.currentNode=_e;let nt=_.shiftKey?rt.previousNode():rt.nextNode();nt||(rt.currentNode=_.shiftKey?et[et.length-1].nextElementSibling:et[0].previousElementSibling,nt=_.shiftKey?rt.previousNode():rt.nextNode()),_.preventDefault(),nt&&$9bf71ea28793e738$var$focusElement(nt,!0)},$=_=>{(!$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$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current):$9bf71ea28793e738$var$shouldContainFocus(s)&&(a.current=_.target)},j=_=>{c.current&&cancelAnimationFrame(c.current),c.current=requestAnimationFrame(()=>{if(document.activeElement&&$9bf71ea28793e738$var$shouldContainFocus(s)&&!$9bf71ea28793e738$var$isElementInChildScope(document.activeElement,s))if($9bf71ea28793e738$var$activeScope=s,document.body.contains(_.target)){var _e;a.current=_.target,(_e=a.current)===null||_e===void 0||_e.focus()}else $9bf71ea28793e738$var$activeScope.current&&$9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current)})};return document.addEventListener("keydown",g,!1),document.addEventListener("focusin",$,!1),d==null||d.forEach(_=>_.addEventListener("focusin",$,!1)),d==null||d.forEach(_=>_.addEventListener("focusout",j,!1)),()=>{document.removeEventListener("keydown",g,!1),document.removeEventListener("focusin",$,!1),d==null||d.forEach(_=>_.removeEventListener("focusin",$,!1)),d==null||d.forEach(_=>_.removeEventListener("focusout",j,!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!s||!i?!1: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(a&&$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$var$getScopeRoot(s),d=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:i},s);d.currentNode=a;let g=d.nextNode();i&&!g&&(c=$9bf71ea28793e738$var$getScopeRoot(s),d=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:!1},s),d.currentNode=a,g=d.nextNode()),$9bf71ea28793e738$var$focusElement(g)}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)&&s.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 $=g.target;$9bf71ea28793e738$var$isElementInScope($,s.current)?$9bf71ea28793e738$var$activeScope=s:$9bf71ea28793e738$var$isElementInAnyScope($)||($9bf71ea28793e738$var$activeScope=null)};return document.addEventListener("focusin",d,!1),c==null||c.forEach(g=>g.addEventListener("focusin",d,!1)),()=>{document.removeEventListener("focusin",d,!1),c==null||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==null||d.forEach($=>$.addEventListener("focusin",g,!1)),()=>{document.removeEventListener("focusin",g,!1),d==null||d.forEach($=>$.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 $=document.activeElement;if(!$9bf71ea28793e738$var$isElementInScope($,s.current))return;let j=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s);if(!j)return;let _=j.nodeToRestore,_e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(document.body,{tabbable:!0});_e.currentNode=$;let et=g.shiftKey?_e.previousNode():_e.nextNode();if((!_||!document.body.contains(_)||_===document.body)&&(_=void 0,j.nodeToRestore=void 0),(!et||!$9bf71ea28793e738$var$isElementInScope(et,s.current))&&_){_e.currentNode=_;do et=g.shiftKey?_e.previousNode():_e.nextNode();while($9bf71ea28793e738$var$isElementInScope(et,s.current));g.preventDefault(),g.stopPropagation(),et?$9bf71ea28793e738$var$focusElement(et,!0):$9bf71ea28793e738$var$isElementInAnyScope(_)?$9bf71ea28793e738$var$focusElement(_,!0):$.blur()}};return a||document.addEventListener("keydown",d,!0),()=>{a||document.removeEventListener("keydown",d,!0)}},[s,i,a]),$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{if(!i)return;let d=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s);if(d){var g;return d.nodeToRestore=(g=c.current)!==null&&g!==void 0?g:void 0,()=>{let $=$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(s);if(!$)return;let j=$.nodeToRestore;if(i&&j&&($9bf71ea28793e738$var$isElementInScope(document.activeElement,s.current)||document.activeElement===document.body&&$9bf71ea28793e738$var$shouldRestoreFocus(s))){let _=$9bf71ea28793e738$export$d06fae2ee68b101e.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let _e=_.getTreeNode(s);for(;_e;){if(_e.nodeToRestore&&document.body.contains(_e.nodeToRestore)){$9bf71ea28793e738$var$focusElement(_e.nodeToRestore);return}_e=_e.parent}for(_e=_.getTreeNode(s);_e;){if(_e.scopeRef&&_e.scopeRef.current&&$9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(_e.scopeRef)){$9bf71ea28793e738$var$focusFirstInScope(_e.scopeRef.current,!0);return}_e=_e.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 $;return!(i==null||($=i.from)===null||$===void 0)&&$.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 null;let{from:d,tabbable:g=i.tabbable,wrap:$=i.wrap,accept:j=i.accept}=a,_=d||document.activeElement,_e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:g,accept:j});c.contains(_)&&(_e.currentNode=_);let et=_e.nextNode();return!et&&$&&(_e.currentNode=c,et=_e.nextNode()),et&&$9bf71ea28793e738$var$focusElement(et,!0),et},focusPrevious(a=i){let c=s.current;if(!c)return null;let{from:d,tabbable:g=i.tabbable,wrap:$=i.wrap,accept:j=i.accept}=a,_=d||document.activeElement,_e=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:g,accept:j});if(c.contains(_))_e.currentNode=_;else{let tt=$9bf71ea28793e738$var$last(_e);return tt&&$9bf71ea28793e738$var$focusElement(tt,!0),tt??null}let et=_e.previousNode();if(!et&&$){_e.currentNode=c;let tt=$9bf71ea28793e738$var$last(_e);if(!tt)return null;et=tt}return et&&$9bf71ea28793e738$var$focusElement(et,!0),et??null},focusFirst(a=i){let c=s.current;if(!c)return null;let{tabbable:d=i.tabbable,accept:g=i.accept}=a,j=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:d,accept:g}).nextNode();return j&&$9bf71ea28793e738$var$focusElement(j,!0),j},focusLast(a=i){let c=s.current;if(!c)return null;let{tabbable:d=i.tabbable,accept:g=i.accept}=a,$=$9bf71ea28793e738$export$2d6ec8fc375ceafa(c,{tabbable:d,accept:g}),j=$9bf71ea28793e738$var$last($);return j&&$9bf71ea28793e738$var$focusElement(j,!0),j??null}}}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);if(!d)return;let 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);if(!a)return;let c=a.parent;for(let g of this.traverse())g!==a&&a.nodeToRestore&&g.nodeToRestore&&a.scopeRef&&a.scopeRef.current&&$9bf71ea28793e738$var$isElementInScope(g.nodeToRestore,a.scopeRef.current)&&(g.nodeToRestore=a.nodeToRestore);let d=a.children;c&&(c.removeChild(a),d.size>0&&d.forEach(g=>c&&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(){var i;let a=new $9bf71ea28793e738$var$Tree;var c;for(let d of this.traverse())a.addTreeNode(d.scopeRef,(c=(i=d.parent)===null||i===void 0?void 0:i.scopeRef)!==null&&c!==void 0?c:null,d.nodeToRestore);return a}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:$,onClose:j,triggerRef:_,arrowRef:_e,arrowStyle:et,onPointerLeave:tt,onPointerEnter:rt},nt)=>{const ot=useOverlayViewport(),lt=$df56164dff5785e2$export$4338b53315abf666(nt),{domProps:ct}=useCloseOnInteractOutside({isDismissable:d,isOpen:$,onClose:j,triggerRef:_,isContextMenu:g},lt);return jsxRuntimeExports.jsx(m$1.div,{className:"z-popover isolate",role:"presentation",ref:lt,style:{...ot,...i,position:"fixed"},...PopoverAnimation,...$3ef42575df84b30b$export$9d1611c77c2fe928(ct,{onPointerLeave:tt,onPointerEnter:rt}),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}),$=g.current;$.isContextMenu=c,$.onClose=s;const j=reactExports.useCallback(ot=>{const lt=ot.target;if(lt){const ct=lt.ownerDocument;if(!ct||!ct.documentElement.contains(lt))return!1}return d.current&&!d.current.contains(lt)},[d]),_=reactExports.useCallback(()=>visibleOverlays[visibleOverlays.length-1]===d,[d]),_e=reactExports.useCallback(()=>{_()&&$.onClose()},[_,$]),et=reactExports.useCallback(ot=>{var lt,ct;return a.current&&"contains"in a.current?(ct=(lt=a.current).contains)==null?void 0:ct.call(lt,ot):!1},[a]),tt=reactExports.useCallback(ot=>{et(ot.target)||_()&&(ot.stopPropagation(),ot.preventDefault())},[et,_]),rt=reactExports.useCallback(ot=>{et(ot.target)||(_()&&(ot.stopPropagation(),ot.preventDefault()),(!$.isContextMenu||ot.button!==2)&&_e())},[et,_e,$,_]);return reactExports.useEffect(()=>{visibleOverlays.push(d);const ot=st=>{j(st)&&(tt(st),g.current.isPointerDown=!0)},lt=st=>{g.current.isPointerDown&&j(st)&&(g.current.isPointerDown=!1,rt(st))},ct=st=>{st.preventDefault(),j(st)&&_e()},it=st=>{if(!a.current)return;const at=st.target;let ut;a.current instanceof Node?ut=a.current:"contextElement"in a.current&&(ut=a.current.contextElement),(!(at instanceof Node)||!ut||at.contains(ut))&&$.onClose()};return document.addEventListener("pointerdown",ot,!0),document.addEventListener("pointerup",lt,!0),document.addEventListener("contextmenu",ct,!0),document.addEventListener("scroll",it,!0),()=>{const st=visibleOverlays.indexOf(d);st>=0&&visibleOverlays.splice(st,1),document.removeEventListener("pointerdown",ot,!0),document.removeEventListener("pointerup",lt,!0),document.removeEventListener("contextmenu",ct,!0),document.removeEventListener("scroll",it,!0)}},[d,j,$,rt,tt,a,et,_e]),{domProps:{onKeyDown:ot=>{ot.key==="Escape"&&(ot.stopPropagation(),ot.preventDefault(),_e())}}}}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},$)=>{const j=useOverlayViewport(),_=$df56164dff5785e2$export$4338b53315abf666($);return jsxRuntimeExports.jsxs("div",{className:"isolate z-tray fixed inset-0",style:j,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:$},j)=>{const _=useOverlayViewport(),_e=$df56164dff5785e2$export$4338b53315abf666(j);return jsxRuntimeExports.jsxs("div",{className:"fixed inset-0 isolate z-modal",style:_,onKeyDown:et=>{et.key==="Escape"&&(et.stopPropagation(),et.preventDefault(),$())},children:[jsxRuntimeExports.jsx(Underlay,{onClick:()=>{c&&$()}},"modal-underlay"),jsxRuntimeExports.jsx(m$1.div,{ref:_e,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,$)=>{(g.item?JSON.stringify(g.item):g.textLabel).toLowerCase().trim().includes(c)&&a.set($,{...g,index:d++})})}return a}),childrenToCollection=memoize(({children:s,items:i})=>{let a;i&&typeof s=="function"?a=i.map($=>s($)):a=s;const c=new Map;let d=0;const g=($,j,_,_e)=>{const et=d++,tt=j?i==null?void 0:i[_].items[_e]:i==null?void 0:i[et];c.set($.props.value,{index:et,element:$,textLabel:getTextLabel($),item:tt,section:j,isDisabled:$.props.isDisabled,value:$.props.value})};return reactExports.Children.forEach(a,($,j)=>{reactExports.isValidElement($)&&($.type===Section?reactExports.Children.forEach($.props.children,(_,_e)=>{g(_,$,j,_e)}):g($))}),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:$=!1,autoFocusFirstItem:j=!0,onItemSelected:_,clearInputOnItemSelection:_e,blurReferenceOnItemSelection:et,floatingWidth:tt="matchTrigger",floatingMinWidth:rt,floatingMaxHeight:nt,offset:ot,placement:lt,showCheckmark:ct,showEmptyMessage:it,maxItems:st,isAsync:at,allowCustomValue:ut,clearSelectionOnInputClear:dt}=s,mt=s.selectionMode||"none",xt=`${reactExports.useId()}-listbox`,[wt,Rt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.inputValue,s.defaultInputValue||"",s.onInputValueChange),[Ct,gt]=reactExports.useState("all"),ft=buildListboxCollection({children:a,items:c,inputValue:at?void 0:wt,maxItems:st}),pt=Ct==="all"?ft.collection:ft.filteredCollection,bt=reactExports.useRef([]),Et=reactExports.useMemo(()=>[...pt.values()].map(Kt=>Kt.isDisabled?null:Kt.textLabel),[pt]),{selectedValues:St,selectValues:$t}=useControlledSelection(s),[kt,Tt]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.isOpen,s.defaultIsOpen,s.onOpenChange),[At,Lt]=reactExports.useState(null),Bt=useFloatingPosition({floatingWidth:tt,ref:i,placement:lt,offset:ot,maxHeight:nt??420,shiftCrossAxis:!g}),{refs:zt,strategy:Xt,x:Ut,y:Gt}=Bt,Zt=mt==="none"?void 0:pt.get(St[0]),sr=mt==="none"||Zt==null?void 0:Zt.index,qt=Kt=>{if(mt!=="none"){const Qt=[...pt.values()][Kt];Qt&&$t(Qt.value)}},er=reactExports.useCallback((Kt,Qt)=>{var vt,jt;const bn=[...pt.values()],An=!bn.find(_t=>!_t.isDisabled),In=pt.size-1;if(Qt==null||!pt.size||Qt>In||Qt<0||An){Lt(null);return}Qt=getNonDisabledIndex(bn,Qt,$,Kt),Lt(Qt),g?(vt=bt.current[Qt])==null||vt.scrollIntoView({block:"nearest"}):(jt=bt.current[Qt])==null||jt.focus()},[pt,g,$]),xr=reactExports.useCallback(Kt=>{Rt(Kt.target.value),gt(Kt.target.value.trim()?"filtered":"all"),Kt.target.value?Tt(!0):dt&&$t(""),j&&At==null?er("increment",0):Lt(null)},[Rt,Tt,gt,$t,dt,er,j,At]);return{handleItemSelection:Kt=>{const Qt=zt.reference.current;mt!=="none"?$t(Kt):Qt&&"focus"in Qt&&Qt.focus(),g&&(Rt(_e?"":`${Kt}`),et&&Qt&&"blur"in Qt&&Qt.blur()),gt("all"),Tt(!1),_==null||_(Kt),Lt(null)},onInputChange:xr,loopFocus:$,floatingWidth:tt,floatingMinWidth:rt,floatingMaxHeight:nt,showCheckmark:ct,collection:pt,collections:ft,virtualFocus:g,focusItem:er,showEmptyMessage:it&&!!wt,allowCustomValue:ut,refs:zt,reference:Bt.reference,floating:zt.setFloating,positionStyle:{position:Xt,top:Gt??"",left:Ut??""},listContent:Et,listItemsRef:bt,listboxId:xt,role:d,state:{activeIndex:At,setActiveIndex:Lt,selectedIndex:sr,setSelectedIndex:qt,selectionMode:mt,selectedValues:St,selectValues:$t,inputValue:wt,setInputValue:Rt,isOpen:kt,setIsOpen:Tt,setActiveCollection:gt}}}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),$=reactExports.useMemo(()=>typeof d>"u"?[]:Array.isArray(d)?d:[d],[d]),j=reactExports.useCallback(_=>{const _e=Array.isArray(_)?_:[_];i==="single"?g(_e[0]):_e.forEach(et=>{const tt=$.indexOf(et);tt===-1?($.push(et),g([...$])):($.length>1||a)&&($.splice(tt,1),g([...$]))})},[a,$,i,g]);return{selectedValues:$,selectValues:j}}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:$,className:j,..._}){const _e=useIsMobileDevice(),{floatingWidth:et,floatingMinWidth:tt="min-w-180",collection:rt,showEmptyMessage:nt,state:{isOpen:ot,setIsOpen:lt},positionStyle:ct,floating:it,refs:st}=s,at=!$&&_e?c:Popover,ut=clsx$1("text-base sm:text-sm outline-none bg-paper max-h-inherit flex flex-col",!$&&"shadow-xl border py-4",j,at===Popover&&"rounded-panel",at===Popover&&et==="auto"?`max-w-288 ${tt}`:""),dt=reactExports.useMemo(()=>{let xt=0;const wt=[];return[...rt.values()].reduce((Rt,Ct)=>{if(!Ct.section)Rt.push(reactExports.cloneElement(Ct.element,{key:Ct.element.key||Ct.element.props.value}));else if(!wt.includes(Ct.section)){const gt=reactExports.cloneElement(Ct.section,{key:Ct.section.key||xt,index:xt});Rt.push(gt),wt.push(Ct.section),xt++}return Rt},[])},[rt]),mt=dt.length>0||nt&&!a,ht=mt?jsxRuntimeExports.jsxs("div",{className:ut,role:"presentation",children:[d,jsxRuntimeExports.jsx(FocusContainer,{isLoading:a,..._,children:dt})]}):null;return jsxRuntimeExports.jsxs(ListBoxContext.Provider,{value:s,children:[i,$?ht:rootEl&&reactDomExports.createPortal(jsxRuntimeExports.jsx(AnimatePresence,{children:ot&&mt&&jsxRuntimeExports.jsx(at,{triggerRef:st.reference,restoreFocus:!0,isOpen:ot,onClose:()=>{g==null||g(),lt(!1)},isDismissable:!0,style:ct,ref:it,children:ht})}),rootEl)]})}function FocusContainer({className:s,children:i,isLoading:a,...c}){const{role:d,listboxId:g,virtualFocus:$,focusItem:j,state:{activeIndex:_,setActiveIndex:_e,selectedIndex:et}}=useListboxContext(),tt=reactExports.useRef(!0),rt=reactExports.useRef(null);return reactExports.useEffect(()=>()=>_e(null),[_e]),reactExports.useEffect(()=>{if(tt.current){const nt=_??et;nt==null&&!$?requestAnimationFrame(()=>{var ot;(ot=rt.current)==null||ot.focus({preventScroll:!0})}):nt!=null&&requestAnimationFrame(()=>{j("increment",nt)})}tt.current=!1},[_,et,j,$]),jsxRuntimeExports.jsx("div",{tabIndex:$?void 0:-1,role:d,id:g,className:"flex-auto overflow-y-auto overscroll-contain outline-none",ref:rt,...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:$,endSection:j,isDisabled:_,isActive:_e,isSelected:et,showCheckmark:tt,elementType:rt="div",radius:nt,padding:ot,...lt}=s;!a&&tt&&(a=jsxRuntimeExports.jsx(CheckIcon,{size:"sm",className:clsx$1("text-primary",!et&&"invisible")}));const ct=clsx$1("icon-sm rounded overflow-hidden flex-shrink-0",!_&&"text-muted"),it=clsx$1(!_&&"text-muted"),st=rt;return jsxRuntimeExports.jsxs(st,{...lt,"aria-disabled":_,className:itemClassName(s),ref:i,children:[a&&jsxRuntimeExports.jsx("div",{className:ct,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})]}),($||j)&&jsxRuntimeExports.jsx("div",{className:$?ct:it,children:$||j})]})});function itemClassName({className:s,isSelected:i,isActive:a,isDisabled:c,showCheckmark:d,endIcon:g,endSection:$,radius:j,padding:_}){let _e="";c?_e="text-disabled pointer-events-none":i?a?_e="bg-primary/focus":_e="bg-primary/selected hover:bg-primary/focus":a?_e="hover:bg-fg-base/15 bg-focus":_e="hover:bg-hover";let et;return _?et=_:d?g||$?et="pl-8 pr-8":et="pl-8 pr-24":et="px-20",clsx$1("w-full select-none outline-none cursor-pointer","py-8 text-sm truncate flex items-center gap-10",!c&&"text-main",et,_e,s,j)}function Item$1({children:s,value:i,startIcon:a,endIcon:c,endSection:d,description:g,capitalizeFirst:$,textLabel:j,isDisabled:_,onSelected:_e,onClick:et,...tt}){var Rt;const{collection:rt,showCheckmark:nt,virtualFocus:ot,listboxId:lt,role:ct,listItemsRef:it,handleItemSelection:st,state:{selectedValues:at,activeIndex:ut,setActiveIndex:dt}}=useListboxContext(),mt=at.includes(i),ht=(Rt=rt.get(i))==null?void 0:Rt.index,xt=ut===ht;if(ht==null)return null;const wt=xt&&!_?-1:0;return jsxRuntimeExports.jsx(ListItemBase,{...tt,onFocus:()=>{ot||dt(ht)},onPointerEnter:Ct=>{dt(ht),ot||Ct.currentTarget.focus()},onPointerDown:Ct=>{ot&&Ct.preventDefault()},onKeyDown:Ct=>{(Ct.key==="Enter"||Ct.key===" ")&&(Ct.preventDefault(),st(i),_e==null||_e())},onClick:Ct=>{st(i),_e==null||_e(),et==null||et(Ct)},ref:Ct=>it.current[ht]=Ct,id:`${lt}-${ht}`,role:ct==="menu"?"menuitem":"option",tabIndex:ot?void 0:wt,"aria-selected":xt&&mt,showCheckmark:nt,isDisabled:_,isActive:xt,isSelected:mt,startIcon:a,description:g,endIcon:c,endSection:d,capitalizeFirst:$,"data-value":i,children:s})}function useListboxKeyboardNavigation({state:{isOpen:s,setIsOpen:i,selectedIndex:a,activeIndex:c,setInputValue:d},loopFocus:g,collection:$,focusItem:j,handleItemSelection:_,allowCustomValue:_e}){const et=nt=>{if(!(s||!nt.currentTarget.contains(nt.target))){if(nt.key==="ArrowDown")return nt.preventDefault(),i(!0),j("increment",a??0),!0;if(nt.key==="ArrowUp")return nt.preventDefault(),i(!0),j("decrement",a??$.size-1),!0;if(nt.key==="Enter"||nt.key==="Space")return nt.preventDefault(),i(!0),j("increment",a??0),!0}},tt=nt=>{const ot=Math.max(0,$.size-1);if(!(!s||!nt.currentTarget.contains(nt.target)))switch(nt.key){case"ArrowDown":return nt.preventDefault(),c==null?j("increment",0):c>=ot?g&&j("increment",0):j("increment",c+1),!0;case"ArrowUp":return nt.preventDefault(),c==null?j("decrement",ot):c<=0?g&&j("decrement",ot):j("decrement",c-1),!0;case"Home":return nt.preventDefault(),j("increment",0),!0;case"End":return nt.preventDefault(),j("decrement",ot),!0;case"Tab":return i(!1),!0}};return{handleTriggerKeyDown:et,handleListboxKeyboardNavigation:tt,handleListboxSearchFieldKeydown:nt=>{var lt,ct;if(nt.key==="Enter"&&c!=null&&$.size){nt.preventDefault();const[it,st]=[...$.entries()][c];it&&(_(it),(ct=(lt=st.element.props).onSelected)==null||ct.call(lt));return}nt.key==="Escape"&&s&&(i(!1),_e||d("")),et(nt)||tt(nt)}}}const cache=new Map;function useCollator(s){const{localeCode:i}=useSelectedLocale(),a=i+(s?Object.entries(s).sort((d,g)=>d[0]<g[0]?-1:1).join():"");if(cache.has(a))return cache.get(a);const c=new Intl.Collator(i,s);return cache.set(a,c),c}function useTypeSelect(){const s=useCollator({usage:"search",sensitivity:"base"}),i=reactExports.useRef({search:"",timeout:void 0}).current,a=(d,g)=>{let $=g??0;for(;$!=null;){const j=d[$],_=j==null?void 0:j.slice(0,i.search.length);if(_&&s.compare(_,i.search)===0)return $;if($<d.length-1)$++;else return null}return null};return{findMatchingItem:(d,g,$=0)=>{const j=getStringForKey(d.key);if(!j||d.ctrlKey||d.metaKey)return null;j===" "&&i.search.trim().length>0&&(d.preventDefault(),d.stopPropagation()),i.search+=j;let _=a(g,$);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");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 $=g;return i._proxyFormState[$]!==VALIDATION_MODE.all&&(i._proxyFormState[$]=!c||VALIDATION_MODE.all),a&&(a[$]=!0),s[$]}});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($=>i[$]===(!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||{},[$,j]=React.useState(a._formState),_=React.useRef(!0),_e=React.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),et=React.useRef(d);return et.current=d,useSubscribe({disabled:c,next:tt=>_.current&&shouldSubscribeByName(et.current,tt.name,g)&&shouldRenderFormState(tt,_e.current,a._updateFormState)&&j({...a._formState,...tt}),subject:a._subjects.state}),React.useEffect(()=>(_.current=!0,_e.current.isValid&&a._updateValid(!0),()=>{_.current=!1}),[a]),getProxyFormState($,a,_e.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:$}=s||{},j=React.useRef(c);j.current=c,useSubscribe({disabled:g,subject:a._subjects.values,next:et=>{shouldSubscribeByName(j.current,et.name,$)&&_e(cloneObject(generateWatchOutput(j.current,a._names,et.values||a._formValues,!1,d)))}});const[_,_e]=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,$=g-1;for(;++c<g;){const j=d[c];let _=a;if(c!==$){const _e=s[j];_=isObject$1(_e)||Array.isArray(_e)?_e:isNaN(+d[c+1])?{}:[]}s[j]=_,s=s[j]}return s}function useController(s){const i=useFormContext(),{name:a,disabled:c,control:d=i.control,shouldUnregister:g}=s,$=isNameInFieldArray(d._names.array,a),j=useWatch({control:d,name:a,defaultValue:get(d._formValues,a,get(d._defaultValues,a,s.defaultValue)),exact:!0}),_=useFormState({control:d,name:a}),_e=React.useRef(d.register(a,{...s.rules,value:j}));return _e.current=d.register(a,s.rules),React.useEffect(()=>{const et=d._options.shouldUnregister||g,tt=(rt,nt)=>{const ot=get(d._fields,rt);ot&&(ot._f.mount=nt)};if(tt(a,!0),et){const rt=cloneObject(get(d._options.defaultValues,a));set$1(d._defaultValues,a,rt),isUndefined(get(d._formValues,a))&&set$1(d._formValues,a,rt)}return()=>{($?et&&!d._state.action:et)?d.unregister(a):tt(a,!1)}},[a,d,$,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:j,...isBoolean(c)||isBoolean(_.disabled)?{disabled:_.disabled||c}:{},onChange:React.useCallback(et=>_e.current.onChange({target:{value:getEventValue(et),name:a},type:EVENTS.CHANGE}),[a]),onBlur:React.useCallback(()=>_e.current.onBlur({target:{value:get(d._formValues,a),name:a},type:EVENTS.BLUR}),[a,d]),ref:et=>{const tt=get(d._fields,a);tt&&et&&(tt._f.ref={focus:()=>et.focus(),select:()=>et.select(),setCustomValidity:rt=>et.setCustomValidity(rt),reportValidity:()=>et.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:$,...j}=g;if($){if($.refs&&$.refs[0]&&i($.refs[0],d)&&!c)break;if($.ref&&i($.ref,$.name)&&!c)break}else isObject$1(j)&&iterateFieldsByAction(j,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=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:$,required:j,maxLength:_,minLength:_e,min:et,max:tt,pattern:rt,validate:nt,name:ot,valueAsNumber:lt,mount:ct,disabled:it}=s._f,st=get(i,ot);if(!ct||it)return{};const at=$?$[0]:g,ut=gt=>{c&&at.reportValidity&&(at.setCustomValidity(isBoolean(gt)?"":gt||""),at.reportValidity())},dt={},mt=isRadioInput(g),ht=isCheckBoxInput(g),xt=mt||ht,wt=(lt||isFileInput(g))&&isUndefined(g.value)&&isUndefined(st)||isHTMLElement(g)&&g.value===""||st===""||Array.isArray(st)&&!st.length,Rt=appendErrors.bind(null,ot,a,dt),Ct=(gt,ft,pt,bt=INPUT_VALIDATION_RULES.maxLength,Et=INPUT_VALIDATION_RULES.minLength)=>{const St=gt?ft:pt;dt[ot]={type:gt?bt:Et,message:St,ref:g,...Rt(gt?bt:Et,St)}};if(d?!Array.isArray(st)||!st.length:j&&(!xt&&(wt||isNullOrUndefined(st))||isBoolean(st)&&!st||ht&&!getCheckboxValue($).isValid||mt&&!getRadioValue($).isValid)){const{value:gt,message:ft}=isMessage(j)?{value:!!j,message:j}:getValueAndMessage(j);if(gt&&(dt[ot]={type:INPUT_VALIDATION_RULES.required,message:ft,ref:at,...Rt(INPUT_VALIDATION_RULES.required,ft)},!a))return ut(ft),dt}if(!wt&&(!isNullOrUndefined(et)||!isNullOrUndefined(tt))){let gt,ft;const pt=getValueAndMessage(tt),bt=getValueAndMessage(et);if(!isNullOrUndefined(st)&&!isNaN(st)){const Et=g.valueAsNumber||st&&+st;isNullOrUndefined(pt.value)||(gt=Et>pt.value),isNullOrUndefined(bt.value)||(ft=Et<bt.value)}else{const Et=g.valueAsDate||new Date(st),St=Tt=>new Date(new Date().toDateString()+" "+Tt),$t=g.type=="time",kt=g.type=="week";isString(pt.value)&&st&&(gt=$t?St(st)>St(pt.value):kt?st>pt.value:Et>new Date(pt.value)),isString(bt.value)&&st&&(ft=$t?St(st)<St(bt.value):kt?st<bt.value:Et<new Date(bt.value))}if((gt||ft)&&(Ct(!!gt,pt.message,bt.message,INPUT_VALIDATION_RULES.max,INPUT_VALIDATION_RULES.min),!a))return ut(dt[ot].message),dt}if((_||_e)&&!wt&&(isString(st)||d&&Array.isArray(st))){const gt=getValueAndMessage(_),ft=getValueAndMessage(_e),pt=!isNullOrUndefined(gt.value)&&st.length>+gt.value,bt=!isNullOrUndefined(ft.value)&&st.length<+ft.value;if((pt||bt)&&(Ct(pt,gt.message,ft.message),!a))return ut(dt[ot].message),dt}if(rt&&!wt&&isString(st)){const{value:gt,message:ft}=getValueAndMessage(rt);if(isRegex(gt)&&!st.match(gt)&&(dt[ot]={type:INPUT_VALIDATION_RULES.pattern,message:ft,ref:g,...Rt(INPUT_VALIDATION_RULES.pattern,ft)},!a))return ut(ft),dt}if(nt){if(isFunction(nt)){const gt=await nt(st,i),ft=getValidateError(gt,at);if(ft&&(dt[ot]={...ft,...Rt(INPUT_VALIDATION_RULES.validate,ft.message)},!a))return ut(ft.message),dt}else if(isObject$1(nt)){let gt={};for(const ft in nt){if(!isEmptyObject$1(gt)&&!a)break;const pt=getValidateError(await nt[ft](st,i),at,ft);pt&&(gt={...pt,...Rt(ft,pt.message)},ut(pt.message),a&&(dt[ot]=gt))}if(!isEmptyObject$1(gt)&&(dt[ot]={ref:at,...gt},!a))return dt}}return ut(!0),dt};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<a;)s=isUndefined(s)?c++:s[i[c++]];return s}function isEmptyArray(s){for(const i in s)if(s.hasOwnProperty(i)&&!isUndefined(s[i]))return!1;return!0}function unset(s,i){const a=Array.isArray(i)?i:isKey(i)?[i]:stringToPath(i),c=a.length===1?s:baseGet(s,a),d=a.length-1,g=a[d];return c&&delete c[g],d!==0&&(isObject$1(c)&&isEmptyObject$1(c)||Array.isArray(c)&&isEmptyArray(c))&&unset(s,a.slice(0,-1)),s}var updateAt=(s,i,a)=>(s[i]=a,s);function useFieldArray(s){const i=useFormContext(),{control:a=i.control,name:c,keyName:d="id",shouldUnregister:g}=s,[$,j]=React.useState(a._getFieldArray(c)),_=React.useRef(a._getFieldArray(c).map(generateId$1)),_e=React.useRef($),et=React.useRef(c),tt=React.useRef(!1);et.current=c,_e.current=$,a._names.array.add(c),s.rules&&a.register(c,s.rules),useSubscribe({next:({values:dt,name:mt})=>{if(mt===et.current||!mt){const ht=get(dt,et.current);Array.isArray(ht)&&(j(ht),_.current=ht.map(generateId$1))}},subject:a._subjects.array});const rt=React.useCallback(dt=>{tt.current=!0,a._updateFieldArray(c,dt)},[a,c]),nt=(dt,mt)=>{const ht=convertToArrayPayload(cloneObject(dt)),xt=append(a._getFieldArray(c),ht);a._names.focus=getFocusFieldName(c,xt.length-1,mt),_.current=append(_.current,ht.map(generateId$1)),rt(xt),j(xt),a._updateFieldArray(c,xt,append,{argA:fillEmptyArray(dt)})},ot=(dt,mt)=>{const ht=convertToArrayPayload(cloneObject(dt)),xt=prepend(a._getFieldArray(c),ht);a._names.focus=getFocusFieldName(c,0,mt),_.current=prepend(_.current,ht.map(generateId$1)),rt(xt),j(xt),a._updateFieldArray(c,xt,prepend,{argA:fillEmptyArray(dt)})},lt=dt=>{const mt=removeArrayAt(a._getFieldArray(c),dt);_.current=removeArrayAt(_.current,dt),rt(mt),j(mt),a._updateFieldArray(c,mt,removeArrayAt,{argA:dt})},ct=(dt,mt,ht)=>{const xt=convertToArrayPayload(cloneObject(mt)),wt=insert(a._getFieldArray(c),dt,xt);a._names.focus=getFocusFieldName(c,dt,ht),_.current=insert(_.current,dt,xt.map(generateId$1)),rt(wt),j(wt),a._updateFieldArray(c,wt,insert,{argA:dt,argB:fillEmptyArray(mt)})},it=(dt,mt)=>{const ht=a._getFieldArray(c);swapArrayAt(ht,dt,mt),swapArrayAt(_.current,dt,mt),rt(ht),j(ht),a._updateFieldArray(c,ht,swapArrayAt,{argA:dt,argB:mt},!1)},st=(dt,mt)=>{const ht=a._getFieldArray(c);moveArrayAt(ht,dt,mt),moveArrayAt(_.current,dt,mt),rt(ht),j(ht),a._updateFieldArray(c,ht,moveArrayAt,{argA:dt,argB:mt},!1)},at=(dt,mt)=>{const ht=cloneObject(mt),xt=updateAt(a._getFieldArray(c),dt,ht);_.current=[...xt].map((wt,Rt)=>!wt||Rt===dt?generateId$1():_.current[Rt]),rt(xt),j([...xt]),a._updateFieldArray(c,xt,updateAt,{argA:dt,argB:ht},!0,!1)},ut=dt=>{const mt=convertToArrayPayload(cloneObject(dt));_.current=mt.map(generateId$1),rt([...mt]),j([...mt]),a._updateFieldArray(c,[...mt],ht=>ht,{},!0,!1)};return React.useEffect(()=>{if(a._state.action=!1,isWatched(c,a._names)&&a._subjects.state.next({...a._formState}),tt.current&&(!getValidationModes(a._options.mode).isOnSubmit||a._formState.isSubmitted))if(a._options.resolver)a._executeSchema([c]).then(dt=>{const mt=get(dt.errors,c),ht=get(a._formState.errors,c);(ht?!mt&&ht.type||mt&&(ht.type!==mt.type||ht.message!==mt.message):mt&&mt.type)&&(mt?set$1(a._formState.errors,c,mt):unset(a._formState.errors,c),a._subjects.state.next({errors:a._formState.errors}))});else{const dt=get(a._fields,c);dt&&dt._f&&validateField(dt,a._formValues,a._options.criteriaMode===VALIDATION_MODE.all,a._options.shouldUseNativeValidation,!0).then(mt=>!isEmptyObject$1(mt)&&a._subjects.state.next({errors:updateFieldArrayRootError(a._formState.errors,mt,c)}))}a._subjects.values.next({name:c,values:{...a._formValues}}),a._names.focus&&iterateFieldsByAction(a._fields,(dt,mt)=>{if(a._names.focus&&mt.startsWith(a._names.focus)&&dt.focus)return dt.focus(),1}),a._names.focus="",a._updateValid(),tt.current=!1},[$,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(it,[rt,c,a]),move:React.useCallback(st,[rt,c,a]),prepend:React.useCallback(ot,[rt,c,a]),append:React.useCallback(nt,[rt,c,a]),remove:React.useCallback(lt,[rt,c,a]),insert:React.useCallback(ct,[rt,c,a]),update:React.useCallback(at,[rt,c,a]),replace:React.useCallback(ut,[rt,c,a]),fields:React.useMemo(()=>$.map((dt,mt)=>({...dt,[d]:_.current[mt]||generateId$1()})),[$,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(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 $=i[d];if(isDateObject(g)&&isDateObject($)||isObject$1(g)&&isObject$1($)||Array.isArray(g)&&Array.isArray($)?!deepEqual(g,$):g!==$)return!1}}return!0}var isMultipleSelect=s=>s.type==="select-multiple",isRadioOrCheckbox=s=>isRadioInput(s)||isCheckBoxInput(s),live=s=>isHTMLElement(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(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 $=get(i,g);$&&set$1(d,g,$._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("."),$=get(i,g),j=get(s,g);if($&&!Array.isArray($)&&a!==g)return{name:a};if(j&&j.type)return{name:g,error:j};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)||{}:{},$=a.shouldUnregister?{}:cloneObject(g),j={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},_e,et=0;const tt={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},rt={values:createSubject(),array:createSubject(),state:createSubject()},nt=s.resetOptions&&s.resetOptions.keepDirtyValues,ot=getValidationModes(a.mode),lt=getValidationModes(a.reValidateMode),ct=a.criteriaMode===VALIDATION_MODE.all,it=vt=>jt=>{clearTimeout(et),et=setTimeout(vt,jt)},st=async vt=>{if(tt.isValid||vt){const jt=a.resolver?isEmptyObject$1((await wt()).errors):await Ct(d,!0);jt!==c.isValid&&rt.state.next({isValid:jt})}},at=vt=>tt.isValidating&&rt.state.next({isValidating:vt}),ut=(vt,jt=[],_t,Dt,Ot=!0,Pt=!0)=>{if(Dt&&_t){if(j.action=!0,Pt&&Array.isArray(get(d,vt))){const Mt=_t(get(d,vt),Dt.argA,Dt.argB);Ot&&set$1(d,vt,Mt)}if(Pt&&Array.isArray(get(c.errors,vt))){const Mt=_t(get(c.errors,vt),Dt.argA,Dt.argB);Ot&&set$1(c.errors,vt,Mt),unsetEmptyArray(c.errors,vt)}if(tt.touchedFields&&Pt&&Array.isArray(get(c.touchedFields,vt))){const Mt=_t(get(c.touchedFields,vt),Dt.argA,Dt.argB);Ot&&set$1(c.touchedFields,vt,Mt)}tt.dirtyFields&&(c.dirtyFields=getDirtyFields(g,$)),rt.state.next({name:vt,isDirty:ft(vt,jt),dirtyFields:c.dirtyFields,errors:c.errors,isValid:c.isValid})}else set$1($,vt,jt)},dt=(vt,jt)=>{set$1(c.errors,vt,jt),rt.state.next({errors:c.errors})},mt=(vt,jt,_t,Dt)=>{const Ot=get(d,vt);if(Ot){const Pt=get($,vt,isUndefined(_t)?get(g,vt):_t);isUndefined(Pt)||Dt&&Dt.defaultChecked||jt?set$1($,vt,jt?Pt:getFieldValue(Ot._f)):Et(vt,Pt),j.mount&&st()}},ht=(vt,jt,_t,Dt,Ot)=>{let Pt=!1,Mt=!1;const Ht={name:vt};if(!_t||Dt){tt.isDirty&&(Mt=c.isDirty,c.isDirty=Ht.isDirty=ft(),Pt=Mt!==Ht.isDirty);const Yt=deepEqual(get(g,vt),jt);Mt=get(c.dirtyFields,vt),Yt?unset(c.dirtyFields,vt):set$1(c.dirtyFields,vt,!0),Ht.dirtyFields=c.dirtyFields,Pt=Pt||tt.dirtyFields&&Mt!==!Yt}if(_t){const Yt=get(c.touchedFields,vt);Yt||(set$1(c.touchedFields,vt,_t),Ht.touchedFields=c.touchedFields,Pt=Pt||tt.touchedFields&&Yt!==_t)}return Pt&&Ot&&rt.state.next(Ht),Pt?Ht:{}},xt=(vt,jt,_t,Dt)=>{const Ot=get(c.errors,vt),Pt=tt.isValid&&isBoolean(jt)&&c.isValid!==jt;if(s.delayError&&_t?(_e=it(()=>dt(vt,_t)),_e(s.delayError)):(clearTimeout(et),_e=null,_t?set$1(c.errors,vt,_t):unset(c.errors,vt)),(_t?!deepEqual(Ot,_t):Ot)||!isEmptyObject$1(Dt)||Pt){const Mt={...Dt,...Pt&&isBoolean(jt)?{isValid:jt}:{},errors:c.errors,name:vt};c={...c,...Mt},rt.state.next(Mt)}at(!1)},wt=async vt=>a.resolver($,a.context,getResolverOptions(vt||_.mount,d,a.criteriaMode,a.shouldUseNativeValidation)),Rt=async vt=>{const{errors:jt}=await wt(vt);if(vt)for(const _t of vt){const Dt=get(jt,_t);Dt?set$1(c.errors,_t,Dt):unset(c.errors,_t)}else c.errors=jt;return jt},Ct=async(vt,jt,_t={valid:!0})=>{for(const Dt in vt){const Ot=vt[Dt];if(Ot){const{_f:Pt,...Mt}=Ot;if(Pt){const Ht=_.array.has(Pt.name),Yt=await validateField(Ot,$,ct,a.shouldUseNativeValidation&&!jt,Ht);if(Yt[Pt.name]&&(_t.valid=!1,jt))break;!jt&&(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))}Mt&&await Ct(Mt,jt,_t)}}return _t.valid},gt=()=>{for(const vt of _.unMount){const jt=get(d,vt);jt&&(jt._f.refs?jt._f.refs.every(_t=>!live(_t)):!live(jt._f.ref))&&Gt(vt)}_.unMount=new Set},ft=(vt,jt)=>(vt&&jt&&set$1($,vt,jt),!deepEqual(Lt(),g)),pt=(vt,jt,_t)=>generateWatchOutput(vt,_,{...j.mount?$:isUndefined(jt)?g:isString(vt)?{[vt]:jt}:jt},_t,jt),bt=vt=>compact(get(j.mount?$:g,vt,s.shouldUnregister?get(g,vt,[]):[])),Et=(vt,jt,_t={})=>{const Dt=get(d,vt);let Ot=jt;if(Dt){const Pt=Dt._f;Pt&&(!Pt.disabled&&set$1($,vt,getFieldValueAs(jt,Pt)),Ot=isHTMLElement(Pt.ref)&&isNullOrUndefined(jt)?"":jt,isMultipleSelect(Pt.ref)?[...Pt.ref.options].forEach(Mt=>Mt.selected=Ot.includes(Mt.value)):Pt.refs?isCheckBoxInput(Pt.ref)?Pt.refs.length>1?Pt.refs.forEach(Mt=>(!Mt.defaultChecked||!Mt.disabled)&&(Mt.checked=Array.isArray(Ot)?!!Ot.find(Ht=>Ht===Mt.value):Ot===Mt.value)):Pt.refs[0]&&(Pt.refs[0].checked=!!Ot):Pt.refs.forEach(Mt=>Mt.checked=Mt.value===Ot):isFileInput(Pt.ref)?Pt.ref.value="":(Pt.ref.value=Ot,Pt.ref.type||rt.values.next({name:vt,values:{...$}})))}(_t.shouldDirty||_t.shouldTouch)&&ht(vt,Ot,_t.shouldTouch,_t.shouldDirty,!0),_t.shouldValidate&&At(vt)},St=(vt,jt,_t)=>{for(const Dt in jt){const Ot=jt[Dt],Pt=`${vt}.${Dt}`,Mt=get(d,Pt);(_.array.has(vt)||!isPrimitive(Ot)||Mt&&!Mt._f)&&!isDateObject(Ot)?St(Pt,Ot,_t):Et(Pt,Ot,_t)}},$t=(vt,jt,_t={})=>{const Dt=get(d,vt),Ot=_.array.has(vt),Pt=cloneObject(jt);set$1($,vt,Pt),Ot?(rt.array.next({name:vt,values:{...$}}),(tt.isDirty||tt.dirtyFields)&&_t.shouldDirty&&rt.state.next({name:vt,dirtyFields:getDirtyFields(g,$),isDirty:ft(vt,Pt)})):Dt&&!Dt._f&&!isNullOrUndefined(Pt)?St(vt,Pt,_t):Et(vt,Pt,_t),isWatched(vt,_)&&rt.state.next({...c}),rt.values.next({name:vt,values:{...$}}),!j.mount&&i()},kt=async vt=>{const jt=vt.target;let _t=jt.name,Dt=!0;const Ot=get(d,_t),Pt=()=>jt.type?getFieldValue(Ot._f):getEventValue(vt),Mt=Ht=>{Dt=Number.isNaN(Ht)||Ht===get($,_t,Ht)};if(Ot){let Ht,Yt;const hn=Pt(),Fr=vt.type===EVENTS.BLUR||vt.type===EVENTS.FOCUS_OUT,Kn=!hasValidation(Ot._f)&&!a.resolver&&!get(c.errors,_t)&&!Ot._f.deps||skipValidation(Fr,get(c.touchedFields,_t),c.isSubmitted,lt,ot),En=isWatched(_t,_,Fr);set$1($,_t,hn),Fr?(Ot._f.onBlur&&Ot._f.onBlur(vt),_e&&_e(0)):Ot._f.onChange&&Ot._f.onChange(vt);const $n=ht(_t,hn,Fr,!1),Gn=!isEmptyObject$1($n)||En;if(!Fr&&rt.values.next({name:_t,type:vt.type,values:{...$}}),Kn)return tt.isValid&&st(),Gn&&rt.state.next({name:_t,...En?{}:$n});if(!Fr&&En&&rt.state.next({...c}),at(!0),a.resolver){const{errors:On}=await wt([_t]);if(Mt(hn),Dt){const Qn=schemaErrorLookup(c.errors,d,_t),Nn=schemaErrorLookup(On,d,Qn.name||_t);Ht=Nn.error,_t=Nn.name,Yt=isEmptyObject$1(On)}}else Ht=(await validateField(Ot,$,ct,a.shouldUseNativeValidation))[_t],Mt(hn),Dt&&(Ht?Yt=!1:tt.isValid&&(Yt=await Ct(d,!0)));Dt&&(Ot._f.deps&&At(Ot._f.deps),xt(_t,Yt,Ht,$n))}},Tt=(vt,jt)=>{if(get(c.errors,jt)&&vt.focus)return vt.focus(),1},At=async(vt,jt={})=>{let _t,Dt;const Ot=convertToArrayPayload(vt);if(at(!0),a.resolver){const Pt=await Rt(isUndefined(vt)?vt:Ot);_t=isEmptyObject$1(Pt),Dt=vt?!Ot.some(Mt=>get(Pt,Mt)):_t}else vt?(Dt=(await Promise.all(Ot.map(async Pt=>{const Mt=get(d,Pt);return await Ct(Mt&&Mt._f?{[Pt]:Mt}:Mt)}))).every(Boolean),!(!Dt&&!c.isValid)&&st()):Dt=_t=await Ct(d);return rt.state.next({...!isString(vt)||tt.isValid&&_t!==c.isValid?{}:{name:vt},...a.resolver||!vt?{isValid:_t}:{},errors:c.errors,isValidating:!1}),jt.shouldFocus&&!Dt&&iterateFieldsByAction(d,Tt,vt?Ot:_.mount),Dt},Lt=vt=>{const jt={...g,...j.mount?$:{}};return isUndefined(vt)?jt:isString(vt)?get(jt,vt):vt.map(_t=>get(jt,_t))},Bt=(vt,jt)=>({invalid:!!get((jt||c).errors,vt),isDirty:!!get((jt||c).dirtyFields,vt),isTouched:!!get((jt||c).touchedFields,vt),error:get((jt||c).errors,vt)}),zt=vt=>{vt&&convertToArrayPayload(vt).forEach(jt=>unset(c.errors,jt)),rt.state.next({errors:vt?c.errors:{}})},Xt=(vt,jt,_t)=>{const Dt=(get(d,vt,{_f:{}})._f||{}).ref;set$1(c.errors,vt,{...jt,ref:Dt}),rt.state.next({name:vt,errors:c.errors,isValid:!1}),_t&&_t.shouldFocus&&Dt&&Dt.focus&&Dt.focus()},Ut=(vt,jt)=>isFunction(vt)?rt.values.subscribe({next:_t=>vt(pt(void 0,jt),_t)}):pt(vt,jt,!0),Gt=(vt,jt={})=>{for(const _t of vt?convertToArrayPayload(vt):_.mount)_.mount.delete(_t),_.array.delete(_t),jt.keepValue||(unset(d,_t),unset($,_t)),!jt.keepError&&unset(c.errors,_t),!jt.keepDirty&&unset(c.dirtyFields,_t),!jt.keepTouched&&unset(c.touchedFields,_t),!a.shouldUnregister&&!jt.keepDefaultValue&&unset(g,_t);rt.values.next({values:{...$}}),rt.state.next({...c,...jt.keepDirty?{isDirty:ft()}:{}}),!jt.keepIsValid&&st()},Zt=({disabled:vt,name:jt,field:_t,fields:Dt,value:Ot})=>{if(isBoolean(vt)){const Pt=vt?void 0:isUndefined(Ot)?getFieldValue(_t?_t._f:get(Dt,jt)._f):Ot;set$1($,jt,Pt),ht(jt,Pt,!1,!1,!0)}},sr=(vt,jt={})=>{let _t=get(d,vt);const Dt=isBoolean(jt.disabled);return set$1(d,vt,{..._t||{},_f:{..._t&&_t._f?_t._f:{ref:{name:vt}},name:vt,mount:!0,...jt}}),_.mount.add(vt),_t?Zt({field:_t,disabled:jt.disabled,name:vt}):mt(vt,!0,jt.value),{...Dt?{disabled:jt.disabled}:{},...a.progressive?{required:!!jt.required,min:getRuleValue(jt.min),max:getRuleValue(jt.max),minLength:getRuleValue(jt.minLength),maxLength:getRuleValue(jt.maxLength),pattern:getRuleValue(jt.pattern)}:{},name:vt,onChange:kt,onBlur:kt,ref:Ot=>{if(Ot){sr(vt,jt),_t=get(d,vt);const Pt=isUndefined(Ot.value)&&Ot.querySelectorAll&&Ot.querySelectorAll("input,select,textarea")[0]||Ot,Mt=isRadioOrCheckbox(Pt),Ht=_t._f.refs||[];if(Mt?Ht.find(Yt=>Yt===Pt):Pt===_t._f.ref)return;set$1(d,vt,{_f:{..._t._f,...Mt?{refs:[...Ht.filter(live),Pt,...Array.isArray(get(g,vt))?[{}]:[]],ref:{type:Pt.type,name:vt}}:{ref:Pt}}}),mt(vt,!1,void 0,Pt)}else _t=get(d,vt,{}),_t._f&&(_t._f.mount=!1),(a.shouldUnregister||jt.shouldUnregister)&&!(isNameInFieldArray(_.array,vt)&&j.action)&&_.unMount.add(vt)}}},qt=()=>a.shouldFocusError&&iterateFieldsByAction(d,Tt,_.mount),er=vt=>{isBoolean(vt)&&(rt.state.next({disabled:vt}),iterateFieldsByAction(d,jt=>{jt.disabled=vt},0,!1))},xr=(vt,jt)=>async _t=>{_t&&(_t.preventDefault&&_t.preventDefault(),_t.persist&&_t.persist());let Dt=cloneObject($);if(rt.state.next({isSubmitting:!0}),a.resolver){const{errors:Ot,values:Pt}=await wt();c.errors=Ot,Dt=Pt}else await Ct(d);unset(c.errors,"root"),isEmptyObject$1(c.errors)?(rt.state.next({errors:{}}),await vt(Dt,_t)):(jt&&await jt({...c.errors},_t),qt(),setTimeout(qt)),rt.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject$1(c.errors),submitCount:c.submitCount+1,errors:c.errors})},dr=(vt,jt={})=>{get(d,vt)&&(isUndefined(jt.defaultValue)?$t(vt,get(g,vt)):($t(vt,jt.defaultValue),set$1(g,vt,jt.defaultValue)),jt.keepTouched||unset(c.touchedFields,vt),jt.keepDirty||(unset(c.dirtyFields,vt),c.isDirty=jt.defaultValue?ft(vt,get(g,vt)):ft()),jt.keepError||(unset(c.errors,vt),tt.isValid&&st()),rt.state.next({...c}))},Kt=(vt,jt={})=>{const _t=vt?cloneObject(vt):g,Dt=cloneObject(_t),Ot=vt&&!isEmptyObject$1(vt)?Dt:g;if(jt.keepDefaultValues||(g=_t),!jt.keepValues){if(jt.keepDirtyValues||nt)for(const Pt of _.mount)get(c.dirtyFields,Pt)?set$1(Ot,Pt,get($,Pt)):$t(Pt,get(Ot,Pt));else{if(isWeb&&isUndefined(vt))for(const Pt of _.mount){const Mt=get(d,Pt);if(Mt&&Mt._f){const Ht=Array.isArray(Mt._f.refs)?Mt._f.refs[0]:Mt._f.ref;if(isHTMLElement(Ht)){const Yt=Ht.closest("form");if(Yt){Yt.reset();break}}}}d={}}$=s.shouldUnregister?jt.keepDefaultValues?cloneObject(g):{}:cloneObject(Ot),rt.array.next({values:{...Ot}}),rt.values.next({values:{...Ot}})}_={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!j.mount&&i(),j.mount=!tt.isValid||!!jt.keepIsValid,j.watch=!!s.shouldUnregister,rt.state.next({submitCount:jt.keepSubmitCount?c.submitCount:0,isDirty:jt.keepDirty?c.isDirty:!!(jt.keepDefaultValues&&!deepEqual(vt,g)),isSubmitted:jt.keepIsSubmitted?c.isSubmitted:!1,dirtyFields:jt.keepDirtyValues?c.dirtyFields:jt.keepDefaultValues&&vt?getDirtyFields(g,vt):{},touchedFields:jt.keepTouched?c.touchedFields:{},errors:jt.keepErrors?c.errors:{},isSubmitSuccessful:jt.keepIsSubmitSuccessful?c.isSubmitSuccessful:!1,isSubmitting:!1})},Qt=(vt,jt)=>Kt(isFunction(vt)?vt($):vt,jt);return{control:{register:sr,unregister:Gt,getFieldState:Bt,handleSubmit:xr,setError:Xt,_executeSchema:wt,_getWatch:pt,_getDirty:ft,_updateValid:st,_removeUnmounted:gt,_updateFieldArray:ut,_updateDisabledField:Zt,_getFieldArray:bt,_reset:Kt,_resetDefaultValues:()=>isFunction(a.defaultValues)&&a.defaultValues().then(vt=>{Qt(vt,a.resetOptions),rt.state.next({isLoading:!1})}),_updateFormState:vt=>{c={...c,...vt}},_disableForm:er,_subjects:rt,_proxyFormState:tt,get _fields(){return d},get _formValues(){return $},get _state(){return j},set _state(vt){j=vt},get _defaultValues(){return g},get _names(){return _},set _names(vt){_=vt},get _formState(){return c},set _formState(vt){c=vt},get _options(){return a},set _options(vt){a={...a,...vt}}},trigger:At,register:sr,handleSubmit:xr,watch:Ut,setValue:$t,getValues:Lt,reset:Qt,resetField:dr,clearErrors:zt,unregister:Gt,setError:Xt,setFocus:(vt,jt={})=>{const _t=get(d,vt),Dt=_t&&_t._f;if(Dt){const Ot=Dt.refs?Dt.refs[0]:Dt.ref;Ot.focus&&(Ot.focus(),jt.shouldSelect&&Ot.select())}},getFieldState:Bt}}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($=>({...$}))),formState:c});const g=i.current.control;return g._options=s,useSubscribe({subject:g._subjects.state,next:$=>{shouldRenderFormState($,g._proxyFormState,g._updateFormState,!0)&&d({...g._formState})}}),React.useEffect(()=>g._disableForm(s.disabled),[g,s.disabled]),React.useEffect(()=>{if(g._proxyFormState.isDirty){const $=g._getDirty();$!==c.isDirty&&g._subjects.state.next({isDirty:$})}},[g,c.isDirty]),React.useEffect(()=>{s.values&&!deepEqual(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 getInputFieldClassNames(s={}){const{size:i="md",startAppend:a,endAppend:c,className:d,labelPosition:g,labelDisplay:$="block",inputClassName:j,inputWrapperClassName:_,unstyled:_e,invalid:et,disabled:tt,background:rt="bg-transparent",flexibleHeight:nt,inputShadow:ot="shadow-sm",descriptionPosition:lt="bottom",inputRing:ct,inputFontSize:it}={...s};if(_e)return{label:"",input:j||"",wrapper:d||"",inputWrapper:_||"",adornment:"",append:{size:"",radius:""},size:{font:"",height:""},description:"",error:""};const st=inputSizeClass({size:s.size,flexibleHeight:nt});it&&(st.font=it);const at=a||c,dt=ct||`focus:ring ${et?"focus:ring-danger/focus focus:border-danger/60":"focus:ring-primary/focus focus:border-primary/60"}`,mt=getRadius(s);return{label:clsx$1($,"first-letter:capitalize text-left whitespace-nowrap",tt&&"text-disabled",st.font,g==="side"?"mr-16":"mb-4"),input:clsx$1("block text-left relative w-full appearance-none transition-shadow text",rt,mt.input,getInputBorder(s),!tt&&`${dt} focus:outline-none ${ot}`,tt&&"text-disabled cursor-not-allowed",j,st.font,st.height,getInputPadding(s)),adornment:iconSizeClass(i),append:{size:getButtonSizeStyle(i),radius:mt.append},wrapper:clsx$1(d,st.font,{"flex items-center":g==="side"}),inputWrapper:clsx$1("isolate relative",_,at&&"flex items-stretch"),size:st,description:`text-muted ${lt==="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:$={},startAdornment:j,endAdornment:_,adornmentPosition:_e,startAppend:et,endAppend:tt,fieldClassNames:rt,disabled:nt,wrapperProps:ot}=s;return jsxRuntimeExports.jsxs("div",{className:rt.wrapper,ref:i,...ot,children:[jsxRuntimeExports.jsx(Label,{...s}),jsxRuntimeExports.jsxs("div",{className:rt.inputWrapper,children:[jsxRuntimeExports.jsx(Adornment,{direction:"start",className:rt.adornment,position:_e,children:j}),et&&jsxRuntimeExports.jsx(Append,{style:rt.append,disabled:nt,children:et}),a,tt&&jsxRuntimeExports.jsx(Append,{style:rt.append,disabled:nt,children:tt}),jsxRuntimeExports.jsx(Adornment,{direction:"end",className:rt.adornment,position:_e,children:_})]}),c&&!d&&jsxRuntimeExports.jsx("div",{className:rt.description,...g,children:c}),d&&jsxRuntimeExports.jsx("div",{className:rt.error,...$,children:d})]})});function Label({labelElementType:s,fieldClassNames:i,labelProps:a,label:c,labelSuffix:d,labelSuffixPosition:g="spaced",required:$}){if(!c)return null;const j=s||"label",_=jsxRuntimeExports.jsxs(j,{className:i.label,...a,children:[c,$&&jsxRuntimeExports.jsx("span",{className:"text-danger",children:" *"})]});return d?jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center gap-4",children:[_,jsxRuntimeExports.jsx("div",{className:clsx$1("mb-4 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:$,autoSelectText:j,labelPosition:_,descriptionPosition:_e,size:et,errorMessage:tt,description:rt,flexibleHeight:nt,startAdornment:ot,endAdornment:lt,startAppend:ct,adornmentPosition:it,endAppend:st,className:at,inputClassName:ut,inputWrapperClassName:dt,unstyled:mt,background:ht,invalid:xt,disabled:wt,id:Rt,inputRadius:Ct,inputBorder:gt,inputShadow:ft,inputRing:pt,inputFontSize:bt,...Et}=s;useAutoFocus(s,i);const St=reactExports.useId(),$t=Rt||St,kt=`${$t}-label`,Tt=`${$t}-description`,At=`${$t}-error`,Lt={id:kt,htmlFor:a==="label"?$t:void 0},Bt={id:Tt},zt={id:At},Ut={"aria-label":!s.label&&!s["aria-label"]&&s.placeholder?s.placeholder:s["aria-label"],"aria-invalid":xt||void 0,id:$t,disabled:wt,...Et},Gt=[];c&&Gt.push(Lt.id),Ut["aria-labelledby"]&&Gt.push(Ut["aria-labelledby"]),Ut["aria-labelledby"]=Gt.length?Gt.join(" "):void 0;const Zt=[];return rt&&Zt.push(Bt.id),tt&&Zt.push(zt.id),Ut["aria-describedby"]&&Zt.push(Ut["aria-describedby"]),Ut["aria-describedby"]=Zt.length?Zt.join(" "):void 0,{fieldProps:{errorMessageProps:zt,descriptionProps:Bt,labelProps:Lt,disabled:wt,label:c,labelSuffix:d,labelSuffixPosition:g,autoFocus:$,autoSelectText:j,labelPosition:_,descriptionPosition:_e,size:et,errorMessage:tt,description:rt,flexibleHeight:nt,startAdornment:ot,endAdornment:lt,startAppend:ct,adornmentPosition:it,endAppend:st,className:at,inputClassName:ut,inputWrapperClassName:dt,unstyled:mt,background:ht,invalid:xt},inputProps:Ut}}const TextField=reactExports.forwardRef(({inputElementType:s="input",flexibleHeight:i,inputRef:a,inputTestId:c,...d},g)=>{const $=$df56164dff5785e2$export$4338b53315abf666(a),{fieldProps:j,inputProps:_}=useField({...d,focusRef:$}),_e=s==="textarea",et=_e?"textarea":"input",tt=getInputFieldClassNames({...d,flexibleHeight:i||s==="textarea"});return s==="textarea"&&!d.unstyled&&(tt.input=`${tt.input} py-12`),jsxRuntimeExports.jsx(Field,{ref:g,fieldClassNames:tt,...j,children:jsxRuntimeExports.jsx(et,{"data-testid":c,ref:$,..._,rows:_e?_.rows||4:void 0,className:tt.input})})}),FormTextField=React.forwardRef(({name:s,...i},a)=>{const{field:{onChange:c,onBlur:d,value:g="",ref:$},fieldState:{invalid:j,error:_}}=useController({name:s}),_e={onChange:c,onBlur:d,value:g??"",invalid:j,errorMessage:_==null?void 0:_.message,inputRef:$,name:s};return jsxRuntimeExports.jsx(TextField,{ref:a,...$3ef42575df84b30b$export$9d1611c77c2fe928(_e,i)})}),MenuTrigger=reactExports.forwardRef((s,i)=>{const{searchPlaceholder:a,showSearchField:c,children:[d,g],floatingWidth:$="auto",isLoading:j}=s,_=reactExports.useId(),_e=useIsMobileMediaQuery(),et=useListbox({...s,clearInputOnItemSelection:!0,showEmptyMessage:c,floatingWidth:_e?"auto":$,virtualFocus:c,role:c?"listbox":"menu",loopFocus:!c,children:g.props.children},i),{state:{isOpen:tt,setIsOpen:rt,activeIndex:nt,inputValue:ot,setInputValue:lt},listboxId:ct,focusItem:it,listContent:st,reference:at,onInputChange:ut}=et,{handleTriggerKeyDown:dt,handleListboxKeyboardNavigation:mt,handleListboxSearchFieldKeydown:ht}=useListboxKeyboardNavigation(et),{findMatchingItem:xt}=useTypeSelect(),wt=Rt=>{if(!tt)return;const Ct=xt(Rt,st,nt);Ct!=null&&it("increment",Ct)};return jsxRuntimeExports.jsx(Listbox,{listbox:et,onKeyDownCapture:c?void 0:wt,onKeyDown:mt,onClose:c?()=>lt(""):void 0,"aria-labelledby":_,isLoading:j,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":tt?"true":"false","aria-haspopup":"listbox","aria-controls":tt?ct:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:ot,onChange:ut,onKeyDown:Rt=>{ht(Rt)}}):null,children:reactExports.cloneElement(d,{id:_,"aria-expanded":tt?"true":"false","aria-haspopup":"menu","aria-controls":tt?ct:void 0,ref:at,onKeyDown:dt,onClick:createEventHandler(Rt=>{var Ct,gt;(gt=(Ct=d.props)==null?void 0:Ct.onClick)==null||gt.call(Ct,Rt),rt(!tt)})})})});function Menu({children:s}){return s}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:$=!0,triggerOnHover:j=!1,currentValue:_,triggerOnContextMenu:_e=!1,usePortal:et=!0,mobileType:tt}=s;const rt=reactExports.useRef(null),nt=_e&&!s.triggerRef?rt:s.triggerRef,ot=reactExports.useRef(_),[lt,ct]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.isOpen,s.defaultIsOpen,s.onOpenChange);useIsMobileMediaQuery()&&a==="popover"&&(a=tt||"modal");const st=reactExports.useRef(null),{x:at,y:ut,reference:dt,strategy:mt,refs:ht}=useFloatingPosition({...s,disablePositioning:a==="modal"}),xt=a==="popover"?{position:mt,top:ut??"",left:at??""}:{},wt=reactExports.useId(),Rt=`${wt}-label`,Ct=`${wt}-description`,gt=`${wt}-form`,ft=useCallbackRef(s.onClose),pt=reactExports.useCallback(Ut=>{ft==null||ft(Ut??ot.current),ct(!1)},[ft,ct]),bt=reactExports.useCallback(()=>{ct(!0),ot.current=_},[_,ct]);$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>{nt!=null&&nt.current&&ht.reference.current!==nt.current&&dt(nt.current)},[dt,nt==null?void 0:nt.current,ht]);const Et=reactExports.useMemo(()=>({"aria-labelledby":Rt,"aria-describedby":Ct}),[Rt,Ct]);let St;a==="modal"?St=Modal:a==="tray"?St=Tray:St=Popover;const $t=reactExports.useMemo(()=>({dialogProps:Et,type:a,labelId:Rt,descriptionId:Ct,isDismissable:d,close:pt,formId:gt}),[pt,Ct,Et,gt,Rt,a,d]);j=j&&a==="popover";const kt={onPointerEnter:createEventHandler(Ut=>{bt()}),onPointerLeave:createEventHandler(Ut=>{st.current=setTimeout(()=>{pt()},150)})},Tt={onPointerEnter:createEventHandler(Ut=>{st.current&&clearTimeout(st.current)}),onPointerLeave:createEventHandler(Ut=>{pt()})},At={onContextMenu:createEventHandler(Ut=>{Ut.preventDefault(),rt.current=pointToVirtualElement({x:Ut.clientX,y:Ut.clientY},Ut.currentTarget),bt()})},Lt={onClick:createEventHandler(Ut=>{Ut.stopPropagation(),lt?pt():bt()})},{dialogTrigger:Bt,dialog:zt}=extractChildren(i,$t),Xt=jsxRuntimeExports.jsx(AnimatePresence,{initial:!c,children:lt&&jsxRuntimeExports.jsx(DialogContext.Provider,{value:$t,children:jsxRuntimeExports.jsx(St,{...j?Tt:{},ref:ht.setFloating,triggerRef:ht.reference,style:xt,restoreFocus:$,autoFocus:g,isOpen:lt,onClose:pt,isDismissable:d,isContextMenu:_e,placement:s.placement,children:zt})})});return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Bt&&reactExports.cloneElement(Bt,$3ef42575df84b30b$export$9d1611c77c2fe928({...!nt&&!_e?{ref:dt}:{},..._e?{}:Lt,...j?kt:{},..._e?At:{}},{...Bt.props})),et?rootEl&&reactDomExports.createPortal(Xt,rootEl):Xt]})}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(){Ft(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($=>$()):!c||this.loadedAssets[i].doc!==a.document||a.force&&c==="loaded"?(this.loadedAssets[i]={state:new Promise($=>{const j=isAbsoluteUrl(i)?i:`assets/${i}`,_=buildId(i,a.id),_e={url:j,id:_,resolve:$,parentEl:a.parentEl,document:a.document};a.type==="css"?this.loadStyleAsset(_e):this.loadScriptAsset(_e)}),doc:a.document},this.loadedAssets[i].state):this.loadedAssets[i].state}isLoadingOrLoaded(i){return this.loadedAssets[i]!=null}loadStyleAsset(i){var $;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}`)&&(($=c.querySelector(`#${g}`))==null||$.remove())}catch{}d.onload=()=>{this.loadedAssets[i.url].state="loaded",i.resolve()},c.appendChild(d)}loadScriptAsset(i){var $;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}`)&&(($=c.querySelector(`#${g}`))==null||$.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($=>{"google"in $&&$.google?c.push($):"src"in $&&d.push($)}),c!=null&&c.length){const $=i.weights||[400],j=s.map(_e=>`${_e.family}:${$.join(",")}`).join("|"),_=lazyLoader.loadAsset(`https://fonts.googleapis.com/css?family=${j}&display=swap`,{type:"css",id:prefixId(i.id),force:i.forceAssetLoad,document:a});g.push(_)}if(d!=null&&d.length){const $=d.map(async j=>{const _=Array.from(a.fonts.values()).find(et=>et.family===j.family);if(_)return _.loaded;const _e=new FontFace(j.family,`url(${i!=null&&i.prefixSrc?i.prefixSrc(j.src):j.src})`,j.descriptors);return a.fonts.add(_e),_e.load()});g=g.concat($)}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($=>$.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($=>{var j;return(j=$.positions)==null?void 0:j.includes(s)}):s;return d&&(d.items=d.items.filter($=>{const j=($.roles||[]).every(_e=>a==null?void 0:a.roles.find(et=>et.id===_e)),_=($.permissions||[]).every(_e=>c(_e));return $.action&&j&&_})),d}function CustomMenu({className:s,iconClassName:i,itemClassName:a,gap:c="gap-30",menu:d,orientation:g="horizontal",children:$,matchDescendants:j,onlyShowIcons:_,iconSize:_e,unstyled:et=!1}){const tt=useCustomMenu(d);return tt?jsxRuntimeExports.jsx("div",{className:clsx$1("flex",c,g==="vertical"?"flex-col items-start":"items-center",s),"data-menu-id":tt.id,children:tt.items.map(rt=>$?$(rt):jsxRuntimeExports.jsx(CustomMenuItem,{unstyled:et,onlyShowIcon:_,matchDescendants:j,iconClassName:i,iconSize:_e,className:nt=>typeof a=="function"?a({...nt,item:rt}):a,item:rt},rt.id))}):null}const CustomMenuItem=reactExports.forwardRef(({item:s,className:i,matchDescendants:a,unstyled:c,onlyShowIcon:d,iconClassName:g,iconSize:$="sm",...j},_)=>{const _e=jsxRuntimeExports.jsx(Trans,{message:s.label}),et=s.icon&&createSvgIconFromTree(s.icon),tt=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[et&&jsxRuntimeExports.jsx(et,{size:$,className:g}),(!et||!d)&&_e]}),rt=!c&&"block 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(rt,i==null?void 0:i({isActive:!1}),nt),href:s.action,target:s.target,"data-menu-item-id":s.id,ref:_,...j,children:tt}):jsxRuntimeExports.jsx(NavLink,{end:typeof a=="function"?a(s.action):a,className:ot=>clsx$1(rt,i==null?void 0:i(ot),nt),to:s.action,target:s.target,"data-menu-item-id":s.id,ref:_,...j,children:tt})});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 items-center justify-center gap-30 bg-toast p-14 text-sm text-white shadow",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",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:$}=useLocation();if(i&&!c){if(d!==$)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,{})}function Form({children:s,onBeforeSubmit:i,onSubmit:a,form:c,className:d,id:g,onBlur:$}){return jsxRuntimeExports.jsx(FormProvider,{...c,children:jsxRuntimeExports.jsx("form",{id:g,onBlur:$,className:d,onSubmit:j=>{j.stopPropagation(),i==null||i(),c.handleSubmit(a)(j)},children:s})})}const LinkStyle="text-primary 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 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(($,j)=>{i.setError(c,{message:$},{shouldFocus:g===0&&j===0})})}):toast.danger(a.message??message("There was an issue. Please try again later."))}}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 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=(i==null?void 0:i[a])||(i==null?void 0:i[a.toLowerCase()])||a,c&&(a=handlePluralMessage(d,s),Object.entries(c).forEach(([g,$])=>{a=a.replace(`:${g}`,`${$}`)})),a},{equals:shallowEqual,callTimeout:0});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:$="md",background:j,radius:_="rounded",maxWidth:_e="max-w-dialog",...et}=s;let tt=null;(i==="popover"||i==="tray")&&(tt=jsxRuntimeExports.jsx(DismissButton,{onDismiss:c.close}));const rt=$==="fullscreenTakeover"||i==="tray",nt=clsx$1("mx-auto pointer-events-auto outline-none flex flex-col overflow-hidden",j||"bg-paper",i!=="tray"&&sizeStyle($),i==="tray"&&"rounded-t border-b-bg",$!=="fullscreenTakeover"&&"shadow-2xl border max-h-dialog",!rt&&`${_} ${_e}`,g);return jsxRuntimeExports.jsxs("div",{...$3ef42575df84b30b$export$9d1611c77c2fe928({role:"dialog",tabIndex:-1},a,et),style:{...s.style,"--be-dialog-padding":"24px"},"aria-modal":!0,className:nt,children:[reactExports.Children.toArray(d).map(ot=>reactExports.isValidElement(ot)?reactExports.cloneElement(ot,{size:ot.props.size??$}):ot),tt]})}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:$,hideDismissButton:j=!1,size:_,showDivider:_e,justify:et="justify-between",titleFontWeight:tt="font-semibold",titleTextSize:rt=_==="xs"?"text-xs":"text-sm",closeButtonSize:nt=_==="xs"?"xs":"sm",actions:ot}=s,{labelId:lt,isDismissable:ct,close:it}=reactExports.useContext(DialogContext);return jsxRuntimeExports.jsxs("div",{className:clsx$1(a,"flex flex-shrink-0 items-center gap-10",tt,_e&&"border-b",getPadding$2(s),c||"text-main",et),children:[g,jsxRuntimeExports.jsx("h3",{id:lt,className:clsx$1(rt,"mr-auto leading-5 opacity-90"),children:i}),$,ot,ct&&!j&&jsxRuntimeExports.jsx(IconButton,{"aria-label":"Dismiss",onClick:()=>{d?d():it()},size:nt,className:clsx$1("-mr-8 text-muted",$&&"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,...$}=s;return jsxRuntimeExports.jsx("div",{...$,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:$}=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($=>{const{status:j,callbackData:_}=$;if(j)switch(j.toUpperCase()){case"SUCCESS":return _!=null&&_.bootstrapData&&i(_.bootstrapData),$;case"REQUEST_PASSWORD":return d(!0),$;case"ERROR":const _e=(_==null?void 0:_.errorMessage)||s({message:"An error occurred. Please try again later"});return toast.danger(_e),$;default:return $}},[s,i]);return{requestingPassword:c,setIsRequestingPassword:d,loginWithSocial:async $=>{const j=await openNewSocialAuthWindow(`secure/auth/social/${$}/login`);return g(j)},connectSocial:async $=>{const j=$.includes("/")?$:`secure/auth/social/${$}/connect`,_=await openNewSocialAuthWindow(j);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=$=>{const j=getBootstrapData().settings.base_url;$.data.type==="social-auth"&&j.indexOf($.origin)>-1&&(c($.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 _e,et,tt,rt,nt,ot,lt,ct;const{social:i}=useSettings(),a=useNavigate(),{getRedirectUri:c}=useAuth(),{loginWithSocial:d,requestingPassword:g,setIsRequestingPassword:$}=useSocialLogin();if(!((_e=i==null?void 0:i.google)!=null&&_e.enable)&&!((et=i==null?void 0:i.facebook)!=null&&et.enable)&&!((tt=i==null?void 0:i.twitter)!=null&&tt.enable)&&!((rt=i==null?void 0:i.envato)!=null&&rt.enable))return null;const _=async it=>{const st=await d(it);((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,(ot=i==null?void 0:i.facebook)!=null&&ot.enable?jsxRuntimeExports.jsx(SocialLoginButton,{label:facebookLabel,icon:jsxRuntimeExports.jsx(FacebookIcon,{className:"text-facebook"}),onClick:()=>_("facebook")}):null,(lt=i==null?void 0:i.twitter)!=null&&lt.enable?jsxRuntimeExports.jsx(SocialLoginButton,{label:twitterLabel,icon:jsxRuntimeExports.jsx(TwitterIcon,{className:"text-twitter"}),onClick:()=>_("twitter")}):null,(ct=i==null?void 0:i.envato)!=null&&ct.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:$,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:"h-screen flex flex-col items-center bg-alt dark:bg-none pt-70 px-14 md:px-10vw overflow-y-auto",style:{backgroundImage:d?void 0:`url("${authBgSvg}")`},children:[jsxRuntimeExports.jsx(Link,{to:"/",className:"block flex-shrink-0 mb-40","aria-label":g({message:"Go to homepage"}),children:jsxRuntimeExports.jsx("img",{src:d?c.logo_light:c==null?void 0:c.logo_dark,className:"block h-42 w-auto m-auto",alt:""})}),jsxRuntimeExports.jsxs("div",{className:"rounded-lg max-w-440 px-40 pt-40 pb-32 w-full mx-auto bg-paper 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:$,disabled:j,isIndeterminate:_,errorMessage:_e,invalid:et,orientation:tt="horizontal",onChange:rt,autoFocus:nt,required:ot,value:lt,name:ct,inputTestId:it}=s,st=getInputFieldClassNames({...s,label:c}),at=g||CheckBoxOutlineBlankIcon,ut=$||(_?IndeterminateCheckboxFilledIcon:CheckboxFilledIcon),dt=$df56164dff5785e2$export$4338b53315abf666(i);useAutoFocus({autoFocus:nt},dt),reactExports.useEffect(()=>{dt.current&&(dt.current.indeterminate=_||!1)});const[mt,ht]=$458b0a5536c1a7cf$export$40bfa8c7b0832715(s.checked,s.defaultChecked||!1),xt=reactExports.useCallback(gt=>{rt==null||rt(gt),ht(gt.target.checked)},[rt,ht]),wt=clsx$1("select-none",d,et&&"text-danger",!et&&j&&"text-disabled");let Rt,Ct=et?"text-danger":null;return _?(Rt=IndeterminateCheckboxFilledIcon,Ct=Ct||"text-primary"):mt?(Rt=ut,Ct=Ct||"text-primary"):(Rt=at,Ct=Ct||"text-muted"),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("label",{className:wt,children:jsxRuntimeExports.jsxs("div",{className:clsx$1("relative flex items-center",tt==="vertical"&&"flex-col flex-col-reverse"),children:[jsxRuntimeExports.jsx("input",{className:"focus-visible:ring ring-inset transition-shadow outline-none absolute left-0 top-0 w-24 h-24 rounded appearance-none",type:"checkbox","aria-checked":_?"mixed":mt,"aria-invalid":et||void 0,onChange:xt,ref:dt,required:ot,disabled:j,value:lt,name:ct,"data-testid":it}),jsxRuntimeExports.jsx(Rt,{size:a,className:clsx$1("pointer-events-none",j?"text-disabled":Ct)}),c&&jsxRuntimeExports.jsx("div",{className:clsx$1("first-letter:capitalize",st.size.font,tt==="vertical"?"mb-6":"ml-6"),children:c})]})}),_e&&jsxRuntimeExports.jsx("div",{className:st.error,children:_e})]})});function FormCheckbox(s){const{field:{onChange:i,onBlur:a,value:c=!1,ref:d},fieldState:{invalid:g,error:$}}=useController({name:s.name}),j={onChange:i,onBlur:a,checked:c,invalid:g,errorMessage:$==null?void 0:$.message,name:s.name};return jsxRuntimeExports.jsx(Checkbox,{ref:d,...$3ef42575df84b30b$export$9d1611c77c2fe928(j,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 j=await execute(i,s);return j||toast.danger(message("Could not verify you are human.")),g(!1),j},[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 $;const d=await(($=window.grecaptcha)==null?void 0:$.execute(s,{action:i})),g=apiClient.post("recaptcha/verify",{token:d}).then(j=>j.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 meta: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:$}=useLocation(),[j]=useSearchParams(),_=$.includes("workspace"),_e=j.get("redirectFrom")==="pricing",et=j.get("email")||void 0,tt=useForm({defaultValues:{email:et}}),rt=useRegister(tt);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"}):_e&&(nt=jsxRuntimeExports.jsx(Trans,{message:"First, let's create your account"}));const ot=jsxRuntimeExports.jsx(Trans,{values:{a:lt=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/login",children:lt})},message:"Already have an account? <a>Sign in.</a>"});return jsxRuntimeExports.jsxs(AuthLayout,{heading:nt,message:ot,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Register"})}),jsxRuntimeExports.jsxs(Form,{form:tt,onSubmit:async lt=>{await d()&&rt.mutate(lt)},children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"email",type:"email",disabled:!!et,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:rt.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$2=s=>`custom-pages/${s}`;function useCustomPage(s){const i=useParams();return s||(s=i.pageId),useQuery({queryKey:[endpoint$2(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$2(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:$,imageMargin:j="mb-24"}){const _=getSizeClassName(g,$);return jsxRuntimeExports.jsxs("div",{className:clsx$1("text-center",d),children:[s&&jsxRuntimeExports.jsx("div",{className:clsx$1(_.image,j),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),$=()=>{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:$,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:$}=useSettings(),{user:j,isSubscribed:_}=useAuth(),_e=useNavigate(),{selectedTheme:et,selectTheme:tt}=useThemeSelector();if(!et||!j)return null;const rt=!!j.unread_notifications_count,nt=jsxRuntimeExports.jsxs(Item$1,{className:"md:hidden",value:"notifications",startIcon:jsxRuntimeExports.jsx(NotificationsIcon,{}),onSelected:()=>{_e("/notifications")},children:[jsxRuntimeExports.jsx(Trans,{message:"Notifications"}),rt?` (${j.unread_notifications_count})`:void 0]}),ot=jsxRuntimeExports.jsx(Item$1,{value:"billing",startIcon:jsxRuntimeExports.jsx(PaymentsIcon,{}),onSelected:()=>{_e("/billing")},children:jsxRuntimeExports.jsx(Trans,{message:"Billing"})});return jsxRuntimeExports.jsxs(MenuTrigger,{children:[s,jsxRuntimeExports.jsxs(Menu,{children:[d&&d.items.map(lt=>{const ct=lt.icon&&createSvgIconFromTree(lt.icon);return jsxRuntimeExports.jsx(Item$1,{value:lt.id,startIcon:ct&&jsxRuntimeExports.jsx(ct,{}),onSelected:()=>{lt.type==="link"?window.open(lt.action,"_blank"):_e(lt.action)},children:jsxRuntimeExports.jsx(Trans,{message:lt.label})},lt.id)}),a.getUserProfileLink&&jsxRuntimeExports.jsx(Item$1,{value:"profile",startIcon:jsxRuntimeExports.jsx(AccountCircleIcon,{}),onSelected:()=>{_e(a.getUserProfileLink(j))},children:jsxRuntimeExports.jsx(Trans,{message:"Profile page"})}),i==null?void 0:i.map(lt=>lt),g!=null&&g.integrated?nt:void 0,_&&ot,($==null?void 0:$.user_change)&&!et.is_dark&&jsxRuntimeExports.jsx(Item$1,{value:"light",startIcon:jsxRuntimeExports.jsx(DarkModeIcon,{}),onSelected:()=>{tt("dark")},children:jsxRuntimeExports.jsx(Trans,{message:"Dark mode"})}),($==null?void 0:$.user_change)&&et.is_dark&&jsxRuntimeExports.jsx(Item$1,{value:"dark",startIcon:jsxRuntimeExports.jsx(LightModeIcon,{}),onSelected:()=>{tt("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}){const{trans:c}=useTrans(),{branding:d}=useSettings();let g,$;return a||!d.logo_dark||i!=="dark"&&s!=="bg"&&s!=="bg-alt"?(g=d.logo_light,$=d.logo_light_mobile):(g=d.logo_dark,$=d.logo_dark_mobile),!$&&!g?null:jsxRuntimeExports.jsx(Link,{to:"/",className:"mr-4 block h-full max-h-26 flex-shrink-0 md:mr-24 md:max-h-36","aria-label":c({message:"Go to homepage"}),children:jsxRuntimeExports.jsxs("picture",{children:[jsxRuntimeExports.jsx("source",{srcSet:$||g,media:"(max-width: 768px)"}),jsxRuntimeExports.jsx("source",{srcSet:g,media:"(min-width: 768px)"}),jsxRuntimeExports.jsx("img",{className:"block h-full max-h-26 w-auto md:max-h-36",alt:c({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:$="md",color:j,textColor:_,darkModeColor:_e,rightChildren:et,menuPosition:tt,logoColor:rt,primaryButtonColor:nt,authMenuItems:ot,alwaysDarkMode:lt=!1,wrapInContainer:ct=!1}=s;const it=useIsDarkMode()||lt,{notifications:st}=useSettings(),{isLoggedIn:at}=useAuth(),ut=useDarkThemeVariables(),dt=useLightThemeVariables(),mt=at&&(st==null?void 0:st.integrated);return j=j??(dt==null?void 0:dt["--be-navbar-color"])??"primary",_e=_e??(_e==null?void 0:_e["--be-navbar-color"])??"bg-alt",it&&(j=_e),jsxRuntimeExports.jsx("div",{style:lt?ut:void 0,className:clsx$1(getColorStyle(j,_),$==="md"&&"h-64 py-8",$==="sm"&&"h-54 py-4",$==="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",ct&&"container mx-auto"),children:[!i&&jsxRuntimeExports.jsx(Logo,{isDarkMode:it,color:j,logoColor:rt}),a,c,jsxRuntimeExports.jsx(MobileMenu,{position:tt}),jsxRuntimeExports.jsx(DesktopMenu,{position:tt}),jsxRuntimeExports.jsxs("div",{className:"ml-auto flex items-center gap-4 md:gap-14",children:[et,mt&&jsxRuntimeExports.jsx(NotificationDialogTrigger,{}),at?jsxRuntimeExports.jsx(NavbarAuthUser,{items:ot}):jsxRuntimeExports.jsx(NavbarAuthButtons,{navbarColor:j,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;d.type==="route"?i(d.action):(g=window.open(d.action,d.target))==null||g.focus()};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 prefetchValueLists(s,i){queryClient.prefetchQuery({queryKey:["value-lists",s,i],queryFn:()=>fetchValueLists(s,i)})}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-96b627c8.js"),["./highlight-96b627c8.js","./highlight-material-palenight-6c006c26.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:"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:$}){const{isLoggedIn:j}=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))&&!j?jsxRuntimeExports.jsx(Navigate,{to:"/login",replace:!0}):i&&s.isError&&errorStatusIs(s.error,404)?$?jsxRuntimeExports.jsx(Navigate,{to:$,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:$,site:j,social:_}=useSettings(),_e=reactExports.useContext(SiteConfigContext),et=j.demo&&!d?getDemoFormDefaults(_e):{},tt=useForm({defaultValues:{remember:!0,email:d,...et}}),rt=useLogin(tt),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"}),ot=!$.disable&&jsxRuntimeExports.jsx(Trans,{values:{a:ct=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/register",children:ct})},message:"Don't have an account? <a>Sign up.</a>"}),lt=!!Object.keys(tt.formState.errors).length;return jsxRuntimeExports.jsxs(AuthLayout,{heading:nt,message:ot,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Login"})}),jsxRuntimeExports.jsxs(Form,{form:tt,onSubmit:ct=>{rt.mutate(ct,{onSuccess:it=>{it.two_factor&&s()}})},children:[jsxRuntimeExports.jsx(FormTextField,{className:"mb-32",name:"email",type:"email",label:jsxRuntimeExports.jsx(Trans,{message:"Email"}),disabled:!!d,invalid:lt,required:!0}),jsxRuntimeExports.jsx(FormTextField,{className:"mb-12",name:"password",type:"password",label:jsxRuntimeExports.jsx(Trans,{message:"Password"}),invalid:lt,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:rt.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<i.length;a++)c=i[a](s),c!==void 0&&(s=c);return s}function parseKey(s,i){return s[0]==="-"&&Array.isArray(i)&&/^-\d+$/.test(s)?i.length+parseInt(s,10):s}function isIndex(s){return/^\d+$/.test(s)}function isObject(s){return Object.prototype.toString.call(s)==="[object Object]"}function isArrayOrObject(s){return Object(s)===s}function isEmptyObject(s){return Object.keys(s).length===0}var blacklist=["__proto__","prototype","constructor"],blacklistFilter=function(s){return blacklist.indexOf(s)===-1};function parsePath(s,i){s.indexOf("[")>=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,$,j,_;for(g=parsePath(s,this.separator),d=0;d<g.length;d++)if(j=parseKey(g[d],i),i&&typeof i=="object"&&j in i){if(d===g.length-1)return a?($=i[j],c&&Array.isArray(i)?i.splice(j,1):delete i[j],Array.isArray(i)&&(_=g.slice(0,-1).join("."),this.cleanup.indexOf(_)===-1&&this.cleanup.push(_)),$):i[j];i=i[j]}else return;return a&&Array.isArray(i)&&(i=i.filter(function(_e){return _e!==void 0})),i};DotObject.prototype.delete=function(s,i){return this.remove(s,i,!0)};DotObject.prototype.remove=function(s,i,a){var c;if(this.cleanup=[],Array.isArray(s)){for(c=0;c<s.length;c++)this.pick(s[c],i,!0,a);return a||this._cleanup(i),i}else return this.pick(s,i,!0,a)};DotObject.prototype._cleanup=function(s){var i,a,c,d;if(this.cleanup.length){for(a=0;a<this.cleanup.length;a++)c=this.cleanup[a].split("."),d=c.splice(0,-1).join("."),i=d?this.pick(d,s):s,i=i[c[0]].filter(function(g){return g!==void 0}),this.set(this.cleanup[a],i,s);this.cleanup=[]}};DotObject.prototype.del=DotObject.prototype.remove;DotObject.prototype.move=function(s,i,a,c,d){return typeof c=="function"||Array.isArray(c)?this.set(i,_process(this.pick(s,a,!0),c),a,d):(d=c,this.set(i,this.pick(s,a,!0),a,d)),a};DotObject.prototype.transfer=function(s,i,a,c,d,g){return typeof d=="function"||Array.isArray(d)?this.set(i,_process(this.pick(s,a,!0),d),c,g):(g=d,this.set(i,this.pick(s,a,!0),c,g)),c};DotObject.prototype.copy=function(s,i,a,c,d,g){return typeof d=="function"||Array.isArray(d)?this.set(i,_process(JSON.parse(JSON.stringify(this.pick(s,a,!1))),d),c,g):(g=d,this.set(i,this.pick(s,a,!1),c,g)),c};DotObject.prototype.set=function(s,i,a,c){var d,g,$,j;if(typeof i>"u")return a;for($=parsePath(s,this.separator),d=0;d<$.length;d++){if(j=$[d],d===$.length-1)if(c&&isObject(i)&&isObject(a[j]))for(g in i)hasOwnProperty.call(i,g)&&(a[j][g]=i[g]);else if(c&&Array.isArray(a[j])&&Array.isArray(i))for(var _=0;_<i.length;_++)a[$[d]].push(i[_]);else a[j]=i;else(!hasOwnProperty.call(a,j)||!isObject(a[j])&&!Array.isArray(a[j]))&&(/^\d+$/.test($[d+1])?a[j]=[]:a[j]={});a=a[j]}return a};DotObject.prototype.transform=function(s,i,a){return i=i||{},a=a||{},Object.keys(s).forEach((function(c){this.set(s[c],this.pick(c,i),a)}).bind(this)),a};DotObject.prototype.dot=function(s,i,a){i=i||{},a=a||[];var c=Array.isArray(s);return Object.keys(s).forEach((function(d){var g=c&&this.useBrackets?"["+d+"]":d;if(isArrayOrObject(s[d])&&(isObject(s[d])&&!isEmptyObject(s[d])||Array.isArray(s[d])&&!this.keepArray&&s[d].length!==0))if(c&&this.useBrackets){var $=a[a.length-1]||"";return this.dot(s[d],i,a.slice(0,-1).concat($+g))}else return this.dot(s[d],i,a.concat(g));else c&&this.useBrackets?i[a.join(this.separator).concat("["+d+"]")]=s[d]:i[a.concat(g).join(this.separator)]=s[d]}).bind(this)),i};DotObject.pick=wrap("pick");DotObject.move=wrap("move");DotObject.transfer=wrap("transfer");DotObject.transform=wrap("transform");DotObject.copy=wrap("copy");DotObject.object=wrap("object");DotObject.str=wrap("str");DotObject.set=wrap("set");DotObject.delete=wrap("delete");DotObject.del=DotObject.remove=wrap("remove");DotObject.dot=wrap("dot");["override","overwrite"].forEach(function(s){Object.defineProperty(DotObject,s,{get:function(){return dotDefault.override},set:function(i){dotDefault.override=!!i}})});["useArray","keepArray","useBrackets"].forEach(function(s){Object.defineProperty(DotObject,s,{get:function(){return dotDefault[s]},set:function(i){dotDefault[s]=i}})});DotObject._process=_process;var dotObject=DotObject;const dot=getDefaultExportFromCjs(dotObject);function AdHost({slot:s,className:i}){var g;const a=useSettings(),{isSubscribed:c}=useAuth(),d=reactExports.useMemo(()=>dot.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 $=new MutationObserver(function(){g.style.height="",g.style.minHeight=""});return $.observe(g,{attributes:!0,attributeFilter:["style"]}),()=>$.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\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").trim()}function loadAdScripts(s,i){const a=[],c=/<script.*?src=['"](.*?)['"]/g;let d;for(;d=c.exec(s);)d[1]&&a.push(lazyLoader.loadAsset(d[1],{type:"js",parentEl:i}));return Promise.all(a)}function executeAdJavascript(adCode,id){const pattern=/<script\b[^>]*>([\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)}}const word="[a-fA-F\\d:]",b=s=>s&&s.includeBoundaries?`(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))`:"",v4="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",v6seg="[a-fA-F\\d]{1,4}",v6=`
(?:
(?:${v6seg}:){7}(?:${v6seg}|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),v46Exact=new RegExp(`(?:^${v4}$)|(?:^${v6}$)`),v4exact=new RegExp(`^${v4}$`),v6exact=new RegExp(`^${v6}$`),ip=s=>s&&s.exact?v46Exact:new RegExp(`(?:${b(s)}${v4}${b(s)})|(?:${b(s)}${v6}${b(s)})`,"g");ip.v4=s=>s&&s.exact?v4exact:new RegExp(`${b(s)}${v4}${b(s)}`,"g");ip.v6=s=>s&&s.exact?v6exact:new RegExp(`${b(s)}${v6}${b(s)}`,"g");var ipRegex$1=ip;const require$$1=["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","etisalat","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","اتصالات","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"],ipRegex=ipRegex$1,tlds=require$$1;var urlRegex=s=>{s={strict:!0,...s};const i=`(?:(?:[a-z]+:)?//)${s.strict?"":"?"}`,a="(?:\\S+(?::\\S*)?@)?",c=ipRegex.v4().source,d="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",$=`(?:\\.${s.strict?"(?:[a-z\\u00a1-\\uffff]{2,})":`(?:${tlds.sort((et,tt)=>tt.length-et.length).join("|")})`})\\.?`,_e=`(?:${i}|www\\.)${a}(?:localhost|${c}|${d}${g}${$})(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return s.exact?new RegExp(`(?:^${_e}$)`,"i"):new RegExp(_e,"ig")};const urlRegex$1=getDefaultExportFromCjs(urlRegex);function urlIsValid(s){return urlRegex$1({exact:!0,strict:!1}).test(s)}var toggleSelection=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var i=document.activeElement,a=[],c=0;c<s.rangeCount;c++)a.push(s.getRangeAt(c));switch(i.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":i.blur();break;default:i=null;break}return s.removeAllRanges(),function(){s.type==="Caret"&&s.removeAllRanges(),s.rangeCount||a.forEach(function(d){s.addRange(d)}),i&&i.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(s){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return s.replace(/#{\s*key\s*}/g,i)}function copy(s,i){var a,c,d,g,$,j,_=!1;i||(i={}),a=i.debug||!1;try{d=deselectCurrent(),g=document.createRange(),$=document.getSelection(),j=document.createElement("span"),j.textContent=s,j.ariaHidden="true",j.style.all="unset",j.style.position="fixed",j.style.top=0,j.style.clip="rect(0, 0, 0, 0)",j.style.whiteSpace="pre",j.style.webkitUserSelect="text",j.style.MozUserSelect="text",j.style.msUserSelect="text",j.style.userSelect="text",j.addEventListener("copy",function(et){if(et.stopPropagation(),i.format)if(et.preventDefault(),typeof et.clipboardData>"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var tt=clipboardToIE11Formatting[i.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(tt,s)}else et.clipboardData.clearData(),et.clipboardData.setData(i.format,s);i.onCopy&&(et.preventDefault(),i.onCopy(et.clipboardData))}),document.body.appendChild(j),g.selectNodeContents(j),$.addRange(g);var _e=document.execCommand("copy");if(!_e)throw new Error("copy command was unsuccessful");_=!0}catch(et){a&&console.error("unable to copy using execCommand: ",et),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",s),i.onCopy&&i.onCopy(window.clipboardData),_=!0}catch(tt){a&&console.error("unable to copy using clipboardData: ",tt),a&&console.error("falling back to prompt"),c=format("message"in i?i.message:defaultMessage),window.prompt(c,s)}}finally{$&&(typeof $.removeRange=="function"?$.removeRange(g):$.removeAllRanges()),j&&document.body.removeChild(j),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 $=setTimeout(function(){d(!1)},g);return function(){clearTimeout($)}}},[c,g]),[c,function(){var $=r(s);d($)}]}function LandingPageNewLinkForm({content:s}){const{trans:i}=useTrans(),a=useLightThemeVariables(),{verify:c,isVerifying:d}=useRecaptcha("link_creation"),{links:{default_type:g}}=useSettings(),$=reactExports.useRef(null),[j,_]=reactExports.useState(""),[_e,et]=reactExports.useState(""),[,tt]=useClipboard(_e,{successDuration:100}),rt={long_url:j,type:g||"direct"},nt=useMutation({mutationFn:()=>postCreateLink(rt),onSuccess:ot=>{var lt;toast.positive(i(message("Link shortened"))),reactDomExports.flushSync(()=>{et(ot.link.short_url)}),(lt=$.current)==null||lt.select()},onError:ot=>showHttpErrorToast(ot,message("Could not shorten link. Please try again later"),"long_url")});return jsxRuntimeExports.jsx("form",{className:"mt-60 w-full md:mt-80",onSubmit:async ot=>{if(ot.preventDefault(),!(nt.isPending||d)){if(_e){reactDomExports.flushSync(()=>{tt(),et(""),_("")}),toast.positive(message("Copied link to clipboard"));return}urlIsValid(j)?await c()&&nt.mutate():toast.danger(message("This url is invalid."))}},children:jsxRuntimeExports.jsx(TextField,{inputRef:$,background:"bg-white",inputRadius:"rounded-full",style:a,size:"lg",placeholder:i(message(s.actions.inputText)),value:_e||j,onChange:ot=>_(ot.target.value),endAppend:jsxRuntimeExports.jsx(Button,{radius:"rounded-r-full",type:"submit",variant:"flat",color:"primary",className:"min-w-160",children:_e?jsxRuntimeExports.jsx(Trans,{message:"Copy"}):jsxRuntimeExports.jsx(Trans,{message:s.actions.inputButton})})})})}function postCreateLink(s){return apiClient.post("link",s).then(i=>i.data)}const endpoint$1="homepage/stats";function useLandingPageStats(){return useQuery({queryKey:[endpoint$1],queryFn:()=>getLandingPageStats(),initialData:()=>{var s,i;if((i=(s=getBootstrapData().loaders)==null?void 0:s.landingPage)!=null&&i.stats)return{stats:getBootstrapData().loaders.landingPage.stats}}})}function getLandingPageStats(){return apiClient.get(endpoint$1).then(s=>s.data)}const LinkIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z"}),"LinkOutlined"),MouseIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20 9c-.04-4.39-3.6-7.93-8-7.93S4.04 4.61 4 9v6c0 4.42 3.58 8 8 8s8-3.58 8-8V9zm-2 0h-5V3.16c2.81.47 4.96 2.9 5 5.84zm-7-5.84V9H6c.04-2.94 2.19-5.37 5-5.84zM18 15c0 3.31-2.69 6-6 6s-6-2.69-6-6v-4h12v4z"}),"MouseOutlined"),FormattedNumber=reactExports.memo(({value:s,...i})=>{const a=useNumberFormatter(i);return isNaN(s)&&(s=0),jsxRuntimeExports.jsx(reactExports.Fragment,{children:a.format(s)})},shallowEqual);function LandingPageStats(){const{data:s}=useLandingPageStats();return s?jsxRuntimeExports.jsxs("div",{className:"landing-container py-90 border-t flex gap-60 justify-between overflow-x-auto",children:[jsxRuntimeExports.jsx(StatLayout,{label:jsxRuntimeExports.jsx(Trans,{message:"Total links shortened"}),icon:jsxRuntimeExports.jsx(LinkIcon,{}),number:s.stats.links}),jsxRuntimeExports.jsx(StatLayout,{label:jsxRuntimeExports.jsx(Trans,{message:"Total link clicks"}),icon:jsxRuntimeExports.jsx(MouseIcon,{}),number:s.stats.clicks}),jsxRuntimeExports.jsx(StatLayout,{label:jsxRuntimeExports.jsx(Trans,{message:"Users signed up"}),icon:jsxRuntimeExports.jsx(PersonIcon,{}),number:s.stats.users})]}):null}function StatLayout({label:s,icon:i,number:a}){return jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[reactExports.cloneElement(i,{size:"xl"}),jsxRuntimeExports.jsxs("div",{className:"border-l border-l-2 pl-24 ml-24",children:[jsxRuntimeExports.jsx("div",{className:"whitespace-nowrap uppercase text-[15px]",children:s}),jsxRuntimeExports.jsx("div",{className:"text-3xl font-medium mt-6",children:jsxRuntimeExports.jsx(FormattedNumber,{value:a})})]})]})}function Skeleton({variant:s="text",animation:i="wave",size:a,className:c,display:d="block",radius:g="rounded"}){return jsxRuntimeExports.jsx("span",{className:clsx$1("overflow-hidden relative bg-fg-base/4 bg-no-repeat will-change-transform skeleton",g,skeletonSize({variant:s,size:a}),d,s==="text"&&"scale-y-[0.6] origin-[0_55%]",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"}}const 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}))}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 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:$,usePortal:j=!0,..._},_e)=>{const{x:et,y:tt,reference:rt,strategy:nt,arrowRef:ot,arrowStyle:lt,refs:ct}=useFloatingPosition({placement:a,offset:c,ref:_e,showArrow:!0}),[it,st]=reactExports.useState(!1),at=reactExports.useId(),ut=reactExports.useRef(),dt=()=>{clearTimeout(ut.current),ut.current=void 0,closeOpenTooltips(at),tooltips[at]=mt,globalWarmedUp=!0,st(!0),globalWarmUpTimeout&&(clearTimeout(globalWarmUpTimeout),globalWarmUpTimeout=null),globalCooldownTimeout&&(clearTimeout(globalCooldownTimeout),globalCooldownTimeout=null)},mt=reactExports.useCallback(Rt=>{Rt?(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[at],globalCooldownTimeout=null,globalWarmedUp=!1},TOOLTIP_COOLDOWN))},[at]),ht=()=>{closeOpenTooltips(at),tooltips[at]=mt,!it&&!globalWarmUpTimeout&&!globalWarmedUp?globalWarmUpTimeout=setTimeout(()=>{globalWarmUpTimeout=null,globalWarmedUp=!0,dt()},g):it||dt()},xt=Rt=>{!Rt&&g>0&&!ut.current?ht():dt()};reactExports.useEffect(()=>()=>{clearTimeout(ut.current),tooltips[at]&&delete tooltips[at]},[at]),reactExports.useEffect(()=>{const Rt=Ct=>{Ct.key==="Escape"&&mt(!0)};if(it)return document.addEventListener("keydown",Rt,!0),()=>{document.removeEventListener("keydown",Rt,!0)}},[it,mt]);const wt=jsxRuntimeExports.jsx(AnimatePresence,{children:it&&jsxRuntimeExports.jsxs(m$1.div,{...PopoverAnimation,ref:ct.setFloating,id:at,role:"tooltip",onPointerEnter:()=>{xt(!0)},onPointerLeave:()=>{mt()},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:tt??"",left:et??""},children:[jsxRuntimeExports.jsx("div",{ref:ot,className:"absolute h-8 w-8 rotate-45 bg-inherit",style:lt}),i]})});return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[reactExports.cloneElement(s,$3ef42575df84b30b$export$9d1611c77c2fe928({"aria-describedby":it?at:void 0,ref:rt,onPointerEnter:Rt=>{Rt.pointerType==="mouse"&&xt()},onFocus:Rt=>{Rt.target.matches(":focus-visible")&&xt(!0)},onPointerLeave:Rt=>{Rt.pointerType==="mouse"&&mt()},onPointerDown:()=>{mt(!0)},onBlur:()=>{mt()},"aria-label":typeof i=="string"?i:i.props.message},_)),j?rootEl&&reactDomExports.createPortal(wt,rootEl):wt]})});function Chip(s){const{onRemove:i,disabled:a,invalid:c,errorMessage:d,children:g,className:$,selectable:j=!1,radius:_="rounded-full",elementType:_e="div",to:et,onClick:tt}=s,rt=reactExports.useRef(null),nt=reactExports.useRef(null),ot=$9bf71ea28793e738$export$10c5169755ce7bd7(),lt=ut=>{switch(ut.key){case"ArrowRight":case"ArrowDown":ot==null||ot.focusNext({tabbable:!0});break;case"ArrowLeft":case"ArrowUp":ot==null||ot.focusPrevious({tabbable:!0});break;case"Backspace":case"Delete":rt.current===document.activeElement&&(i==null||i());break}},ct=ut=>{ut.stopPropagation(),tt?tt(ut):rt.current.focus()},it=sizeClassNames(s);let st=c||d!=null?jsxRuntimeExports.jsx(WarningIcon,{className:"text-danger",size:"sm"}):s.adornment&&reactExports.cloneElement(s.adornment,{size:it.adornment.size,circle:!0,className:clsx$1(s.adornment.props,it.adornment.margin)});d&&st&&(st=jsxRuntimeExports.jsx(Tooltip,{label:d,variant:"danger",children:st}));const at=_e;return jsxRuntimeExports.jsxs(at,{tabIndex:j?0:void 0,ref:rt,to:et,onKeyDown:j?lt:void 0,onClick:j?ct: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",tt&&"cursor-pointer",_,colorClassName(s),it.chip,!a&&j&&"hover:after:bg-black/5 focus:after:bg-black/10",$),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",it.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:"border-t pt-24 mt-32",children:[jsxRuntimeExports.jsx("div",{className:"text-sm mb-10 font-semibold",children:jsxRuntimeExports.jsx(Trans,{message:"What's included"})}),s.feature_list.map(i=>jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-10 text-sm py-6",children:[jsxRuntimeExports.jsx(CheckIcon,{className:"text-positive",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-center 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,$)=>{const j=$===0,_=$===d.length-1,_e=findBestPrice(i,g.prices);let et;return a||(et="/register?redirectFrom=pricing"),c&&(et=`/change-plan/${g.id}/${_e==null?void 0:_e.id}/confirm`),a&&!g.free&&(et=`/checkout/${g.id}/${_e==null?void 0:_e.id}`),jsxRuntimeExports.jsxs(m$1.div,{...opacityAnimation,className:clsx$1("w-full rounded-lg border bg-paper px-28 shadow-lg md:min-w-240 md:max-w-350",g.recommended?"py-56":"py-28",j&&"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:[_e?jsxRuntimeExports.jsx(FormattedPrice,{priceClassName:"font-bold text-4xl",periodClassName:"text-muted text-xs",variant:"separateLine",price:_e}):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:"flat",color:"primary",className:"w-full",size:"md",elementType:et?Link:void 0,disabled:!et,onClick:()=>{a||!_e||!g||setInLocalStorage("be.onboarding.selected",{productId:g.id,priceId:_e.id})},to:et,children:jsxRuntimeExports.jsx(ActionButtonText,{product:g})})}),jsxRuntimeExports.jsx(ProductFeatureList,{product:g})]})]},g.id)})})}function ActionButtonText({product:s}){const{isLoggedIn:i}=useAuth();return s.free&&i?jsxRuntimeExports.jsx(Trans,{message:"You're on :plan",values:{plan:s.name}}):s.free||!i?jsxRuntimeExports.jsx(Trans,{message:"Get started"}):jsxRuntimeExports.jsx(Trans,{message:"Upgrade"})}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,{})]})}const Radio=reactExports.forwardRef((s,i)=>{const{children:a,autoFocus:c,size:d,invalid:g,isFirst:$,...j}=s,_=$df56164dff5785e2$export$4338b53315abf666(i);useAutoFocus({autoFocus:c},_);const _e=getSizeClassNames(d);return jsxRuntimeExports.jsxs("label",{className:clsx$1("inline-flex gap-8 select-none items-center whitespace-nowrap align-middle",_e.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",_e.circle),ref:_,...j}),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}),$={onChange:i,onBlur:a,checked:s.value===c,invalid:s.invalid||g};return jsxRuntimeExports.jsx(Radio,{ref:d,...$3ef42575df84b30b$export$9d1611c77c2fe928($,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:$,orientation:j="horizontal",disabled:_,required:_e,invalid:et,errorMessage:tt,description:rt}=s,nt={},ot=reactExports.useId(),lt=s.name||ot;return jsxRuntimeExports.jsxs("fieldset",{"aria-describedby":rt?`${ot}-description`:void 0,ref:i,className:clsx$1("text-left",$),children:[c&&jsxRuntimeExports.jsx("legend",{className:a.label,...nt,children:c}),jsxRuntimeExports.jsx("div",{className:clsx$1("flex",c?"mt-6":"mt-0",j==="vertical"?"flex-col gap-10":"flex-row gap-16"),children:reactExports.Children.map(d,ct=>{if(reactExports.isValidElement(ct))return reactExports.cloneElement(ct,{name:lt,size:g,invalid:ct.props.invalid||et||void 0,disabled:ct.props.disabled||_,required:ct.props.required||_e})})}),rt&&!tt&&jsxRuntimeExports.jsx("div",{className:a.description,id:`${ot}-description`,children:rt}),tt&&jsxRuntimeExports.jsx("div",{className:a.error,children:tt})]})});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})}const UpsellLabel=reactExports.memo(({products:s})=>{const i=calcHighestUpsellPercentage(s);return i<=0?null:jsxRuntimeExports.jsx(reactExports.Fragment,{children:jsxRuntimeExports.jsxs("span",{className:"text-positive-darker font-medium",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=>{const c=findBestPrice("monthly",a.prices),d=findBestPrice("yearly",a.prices);if(!c||!d)return 0;const g=c.amount*12,$=d.amount,j=Math.round((g-$)/g*100);return j>0&&j<=200?j: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"})})]})}function LandingPage(){var c;const s=useSettings(),i=s.homepage,a=s.links.homepage_pricing&&s.billing.enable;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(DefaultMetaTags,{}),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(HeroHeader,{content:i.appearance}),jsxRuntimeExports.jsx(AdHost,{slot:"landing",className:"mx-14 -mt-30 mb-14 md:mb-70"}),jsxRuntimeExports.jsx(PrimaryFeatures,{content:i.appearance}),jsxRuntimeExports.jsx("div",{className:"mt-100 h-1 bg-divider"}),jsxRuntimeExports.jsx(SecondaryFeatures,{content:i.appearance}),((c=s.links)==null?void 0:c.homepage_stats)&&jsxRuntimeExports.jsx(LandingPageStats,{}),jsxRuntimeExports.jsx(BottomCta,{content:i.appearance}),a&&jsxRuntimeExports.jsx(PricingSection,{content:i.appearance}),jsxRuntimeExports.jsx(Footer,{className:"landing-container"})]})]})}function HeroHeader({content:s}){const{hasPermission:i}=useAuth(),{links:{homepage_creation:a}}=useSettings(),{headerTitle:c,headerSubtitle:d,headerImage:g,headerImageOpacity:$,actions:j,headerOverlayColor1:_,headerOverlayColor2:_e}=s;let et;return _&&_e?et=`linear-gradient(45deg, ${_} 0%, ${_e} 100%)`:_?et=_:_e&&(et=_e),jsxRuntimeExports.jsxs("header",{className:"relative isolate mb-14 overflow-hidden md:mb-60",children:[jsxRuntimeExports.jsx("img",{"data-testid":"headerImage",src:g,style:{opacity:$},alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:"absolute left-1/2 top-1/2 z-20 max-w-none -translate-x-1/2 -translate-y-1/2"}),jsxRuntimeExports.jsx("div",{className:"absolute z-10 h-full w-full bg-[rgb(37,99,235)]",style:{background:et}}),jsxRuntimeExports.jsxs("div",{className:"relative z-30 flex h-full flex-col",children:[jsxRuntimeExports.jsx(Navbar,{color:"transparent",className:"flex-shrink-0",menuPosition:"homepage-navbar",primaryButtonColor:"paper"}),jsxRuntimeExports.jsxs("div",{className:"mx-auto flex max-w-850 flex-auto flex-col items-center justify-center px-14 py-50 text-center text-white lg:py-90",children:[c&&jsxRuntimeExports.jsx("h1",{className:"text-3xl font-normal md:text-5xl","data-testid":"headerTitle",children:jsxRuntimeExports.jsx(Trans,{message:c})}),d&&jsxRuntimeExports.jsx("div",{className:"max-auto mt-24 max-w-640 text-lg tracking-tight md:text-xl","data-testid":"headerSubtitle",children:jsxRuntimeExports.jsx(Trans,{message:d})}),a&&i("links.create")&&jsxRuntimeExports.jsx(LandingPageNewLinkForm,{content:s}),jsxRuntimeExports.jsxs("div",{className:"flex min-h-50 gap-20 pb-30 pt-70 empty:min-h-0 md:pb-50 md:pt-90",children:[jsxRuntimeExports.jsx(CtaButton,{item:j.cta1,variant:"raised",color:"primary",size:"lg",radius:"rounded-full","data-testid":"cta1",className:"min-w-180"}),jsxRuntimeExports.jsx(CtaButton,{item:j.cta2,variant:"text",color:"paper",size:"lg",radius:"rounded-full","data-testid":"cta2"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"absolute bottom-0 z-20 h-[6vw] w-full translate-y-1/2 -skew-y-3 transform bg"})]})}function CtaButton({item:s,...i}){if(!(s!=null&&s.label)||!(s!=null&&s.action))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}){return jsxRuntimeExports.jsx("div",{className:"landing-container z-20 items-stretch gap-26 md:flex",id:"primary-features",children:s.primaryFeatures.map((i,a)=>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)] dark:bg-alt md:mb-0","data-testid":`primary-root-${a}`,children:[jsxRuntimeExports.jsx(MixedImage,{className:"mx-auto mb-30 h-128","data-testid":`primary-image-${a}`,src:i.image}),jsxRuntimeExports.jsx("h2",{className:"my-16 text-lg font-medium","data-testid":`primary-title-${a}`,children:jsxRuntimeExports.jsx(Trans,{message:i.title})}),jsxRuntimeExports.jsx("div",{className:"text-md text-[0.938rem]","data-testid":`primary-subtitle-${a}`,children:jsxRuntimeExports.jsx(Trans,{message:i.subtitle})})]},a))})}function SecondaryFeatures({content:s}){return jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden pt-100",children:jsxRuntimeExports.jsx("div",{className:"landing-container relative",id:"features",children:s.secondaryFeatures.map((i,a)=>{const c=a%2===0;return jsxRuntimeExports.jsxs("div",{"data-testid":`secondary-root-${a}`,className:clsx$1("relative z-20 mb-14 py-16 md:mb-80 md:flex",c&&"flex-row-reverse"),children:[jsxRuntimeExports.jsx("img",{src:i.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-${a}`,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-${a}`,children:jsxRuntimeExports.jsx(Trans,{message:i.subtitle})}),jsxRuntimeExports.jsx("h3",{className:"py-16 text-3xl","data-testid":`secondary-title-${a}`,children:jsxRuntimeExports.jsx(Trans,{message:i.title})}),jsxRuntimeExports.jsx("div",{className:"h-2 w-50 bg-black/90 dark:bg-divider"}),jsxRuntimeExports.jsx("div",{className:"my-20 text-[0.938rem]","data-testid":`secondary-description-${a}`,children:jsxRuntimeExports.jsx(Trans,{message:i.description})})]})]},a)})})})}function PricingSection({content:s}){var d;const i=useProducts("landingPage"),[a,c]=reactExports.useState("yearly");return jsxRuntimeExports.jsx("div",{className:"py-80 sm:py-128",id:"pricing",children:jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-1280 px-24 lg:px-32",children:[jsxRuntimeExports.jsxs("div",{className:"md:text-center",children:[jsxRuntimeExports.jsx("h2",{className:"font-display text-3xl tracking-tight sm:text-4xl","data-testid":"pricingTitle",children:jsxRuntimeExports.jsx(Trans,{message:s.pricingTitle})}),jsxRuntimeExports.jsx("p",{className:"mt-16 text-lg text-muted","data-testid":"pricingSubtitle",children:jsxRuntimeExports.jsx(Trans,{message:s.pricingSubtitle})})]}),jsxRuntimeExports.jsx(BillingCycleRadio,{products:(d=i.data)==null?void 0:d.products,selectedCycle:a,onChange:c,className:"my-50 flex justify-center",size:"lg"}),jsxRuntimeExports.jsx(PricingTable,{selectedCycle:a,productLoader:"landingPage"})]})})}function BottomCta({content:s}){return jsxRuntimeExports.jsxs("div",{className:"relative overflow-hidden bg-[rgb(37,99,235)] py-90 text-white md:py-128","data-testid":"footerImage",children:[jsxRuntimeExports.jsx("img",{src:s.footerImage,alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:"absolute left-1/2 top-1/2 max-w-none -translate-x-1/2 -translate-y-1/2"}),jsxRuntimeExports.jsx("div",{className:"relative mx-auto max-w-1280 px-24 text-center sm:px-16 lg:px-32",children:jsxRuntimeExports.jsxs("div",{className:"mx-auto max-w-512 text-center",children:[jsxRuntimeExports.jsx("h2",{className:" font-display text-3xl tracking-tight sm:text-4xl","data-testid":"footerTitle",children:jsxRuntimeExports.jsx(Trans,{message:s.footerTitle})}),s.footerSubtitle&&jsxRuntimeExports.jsx("p",{className:"mt-16 text-lg tracking-tight","data-testid":"footerSubtitle",children:jsxRuntimeExports.jsx(Trans,{message:s.footerSubtitle})}),jsxRuntimeExports.jsx(CtaButton,{item:s.actions.cta3,size:"lg",radius:"rounded-full",variant:"outline",color:"paper",className:"mt-40 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:"rounded-panel mb-24 w-full border bg-paper 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 $=$9bf71ea28793e738$export$10c5169755ce7bd7(),j=!!i,[_,_e]=reactExports.useState(!1),et=tt=>{switch(tt.key){case"ArrowDown":tt.preventDefault(),$==null||$.focusNext();break;case"ArrowUp":tt.preventDefault(),$==null||$.focusPrevious();break;case"Home":tt.preventDefault(),$==null||$.focusFirst();break;case"End":tt.preventDefault(),$==null||$.focusLast();break;case"Enter":case"Space":tt.preventDefault(),i==null||i();break}};return jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(ListItemBase,{className:clsx$1(c,a),isActive:_,isDisabled:d.isDisabled,...d,onFocus:tt=>{_e(tt.target.matches(":focus-visible"))},onBlur:()=>{_e(!1)},onClick:()=>{i==null||i()},ref:g,role:j?"button":void 0,onKeyDown:j?et:void 0,tabIndex:j&&!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 $;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:[($=d.accountSettingsPanels)==null?void 0:$.map(j=>jsxRuntimeExports.jsx(Item,{icon:jsxRuntimeExports.jsx(j.icon,{viewBox:"0 0 50 50"}),panel:j.id,children:jsxRuntimeExports.jsx(Trans,{...j.label})},j.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}){return 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 _,_e,et;const{social:d}=useSettings(),{connectSocial:g,disconnectSocial:$}=useSocialLogin(),j=(_e=(_=i==null?void 0:i.social_profiles)==null?void 0:_.find(tt=>tt.service_name===s))==null?void 0:_e.username;return(et=d==null?void 0:d[s])!=null&&et.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:j||jsxRuntimeExports.jsx(Trans,{message:"Disabled"})})]}),jsxRuntimeExports.jsx(Button,{disabled:$.isPending,size:"xs",variant:"outline",color:j?"danger":"primary",onClick:async()=>{if(j)$.mutate({service:s},{onSuccess:()=>{queryClient.invalidateQueries({queryKey:["users"]}),toast(message("Disabled :service account",{values:{service:s}}))}});else{const tt=await g(s);(tt==null?void 0:tt.status)==="SUCCESS"&&(queryClient.invalidateQueries({queryKey:["users"]}),toast(message("Enabled :service account",{values:{service:s}})))}},children:j?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,$){try{var j=s[g]($),_=j.value}catch(_e){a(_e);return}j.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 $(_){asyncGeneratorStep$2(g,c,d,$,j,"next",_)}function j(_){asyncGeneratorStep$2(g,c,d,$,j,"throw",_)}$(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<arguments.length;i++){var a=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$2(Object(a),!0).forEach(function(c){_defineProperty$2(s,c,a[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(a)):ownKeys$2(Object(a)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(a,c))})}return s}function _defineProperty$2(s,i,a){return i in s?Object.defineProperty(s,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):s[i]=a,s}var namespace="axios-retry";function isNetworkError(s){var i=["ERR_CANCELED","ECONNABORTED"];return!s.response&&!!s.code&&!i.includes(s.code)&&isRetryAllowed$1(s)}var SAFE_HTTP_METHODS=["get","head","options"],IDEMPOTENT_HTTP_METHODS=SAFE_HTTP_METHODS.concat(["put","delete"]);function isRetryableError(s){return s.code!=="ECONNABORTED"&&(!s.response||s.response.status>=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<s&&i(c);if(typeof d=="object")try{var g=yield d;return g!==!1}catch{return!1}return d}),_shouldRetry.apply(this,arguments)}function axiosRetry(s,i){var a=s.interceptors.request.use(d=>{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:$}=g;if(!$)return Promise.reject(g);var{retries:j=3,retryCondition:_=isNetworkOrIdempotentRequestError,retryDelay:_e=noDelay,shouldResetTimeout:et=!1,onRetry:tt=()=>{}}=getRequestOptions($,i),rt=getCurrentState($);if(yield shouldRetry$1(j,_,rt,g)){rt.retryCount+=1;var nt=_e(rt.retryCount,g);if(fixConfig(s,$),!et&&$.timeout&&rt.lastRequestTime){var ot=Date.now()-rt.lastRequestTime,lt=$.timeout-ot-nt;if(lt<=0)return Promise.reject(g);$.timeout=lt}return $.transformRequest=[ct=>ct],yield tt(rt.retryCount,g,$),new Promise(ct=>setTimeout(()=>ct(s($)),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){Ft(this,"abortController");Ft(this,"chunks",[]);Ft(this,"uploadId");Ft(this,"fileKey");Ft(this,"chunkAxios");Ft(this,"abortedByUser",!1);Ft(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,$,j;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 _e=await this.createFileEntry();if(_e!=null&&_e.fileEntry){(g=(d=this.config).onSuccess)==null||g.call(d,_e==null?void 0:_e.fileEntry,this.file),removeFromLocalStorage(this.storageKey);return}}catch{}}this.abortController.signal.aborted||this.abortController.abort(),this.abortedByUser||(j=($=this.config).onError)==null||j.call($,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($=>this.uploadPartToS3($));if(!(await Promise.all(d)).every($=>$))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 $,j;if(!d.event.lengthComputable)return;c.bytesUploaded=d.loaded;const g=this.chunks.reduce((_,_e)=>_+_e.bytesUploaded,0);(j=($=this.config).onProgress)==null||j.call($,{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<this.file.size;g+=a){const $=Math.min(this.file.size,g+a),j=(c=this.uploadedParts)==null?void 0:c.find(_=>_.PartNumber===d);this.chunks.push({blob:this.file.native.slice(g,$),done:!!j,partNumber:d,etag:j?j.ETag:void 0,bytesUploaded:j!=null&&j.Size?parseInt(j==null?void 0:j.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 $=s.length%3;for(let j=0;j<s.length;){if((a=s.charCodeAt(j++))>255||(c=s.charCodeAt(j++))>255||(d=s.charCodeAt(j++))>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 $?g.slice(0,$-3)+"===".substring($):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;c<d;c+=4096)a.push(_fromCC.apply(null,s.subarray(c,c+4096)));return _btoa(a.join(""))},fromUint8Array=(s,i=!1)=>i?_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$2=(s,i=!1)=>i?_mkUriSafe(_encode(s)):_encode(s),encodeURI$1=s=>encode$2(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<s.length;)i=b64tab[s.charAt(g++)]<<18|b64tab[s.charAt(g++)]<<12|(c=b64tab[s.charAt(g++)])<<6|(d=b64tab[s.charAt(g++)]),a+=c===64?_fromCC(i>>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$2=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$2(this)}),s("toBase64",function(i){return encode$2(this,i)}),s("toBase64URI",function(){return encode$2(this,!0)}),s("toBase64URL",function(){return encode$2(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$2,toBase64:encode$2,encode:encode$2,encodeURI:encodeURI$1,encodeURL:encodeURI$1,utob,btou,decode:decode$2,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$1(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch{return null}}function encode$1(s){try{return encodeURIComponent(s)}catch{return null}}function querystring(s){for(var i=/([^=?#&]+)=?([^&]*)/g,a={},c;c=i.exec(s);){var d=decode$1(c[1]),g=decode$1(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$1(d),c=encode$1(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],$=0,j;return d?g?(j=a[2]+a[3]+a[4],$=a[2].length+a[3].length):(j=a[2]+a[4],$=a[2].length):g?(j=a[3]+a[4],$=a[3].length):j=a[4],c==="file:"?$>=2&&(j=j.slice(2)):isSpecial(c)?j=a[4]:c?d&&(j=j.slice(2)):$>=2&&isSpecial(i.protocol)&&(j=a[4]),{protocol:c,slashes:d||isSpecial(c),slashesCount:$,rest:j}}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,$=0;c--;)a[c]==="."?a.splice(c,1):a[c]===".."?(a.splice(c,1),$++):$&&(c===0&&(g=!0),a.splice(c,1),$--);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,$,j,_,_e=rules.slice(),et=typeof i,tt=this,rt=0;for(et!=="object"&&et!=="string"&&(a=i,i=null),a&&typeof a!="function"&&(a=qs.parse),i=lolcation(i),d=extractProtocol(s||"",i),c=!d.protocol&&!d.slashes,tt.slashes=d.slashes||c&&i.slashes,tt.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(tt.protocol)))&&(_e[3]=[/(.*)/,"pathname"]);rt<_e.length;rt++){if($=_e[rt],typeof $=="function"){s=$(s,tt);continue}g=$[0],_=$[1],g!==g?tt[_]=s:typeof g=="string"?(j=g==="@"?s.lastIndexOf(g):s.indexOf(g),~j&&(typeof $[2]=="number"?(tt[_]=s.slice(0,j),s=s.slice(j+$[2])):(tt[_]=s.slice(j),s=s.slice(0,j)))):(j=g.exec(s))&&(tt[_]=j[1],s=s.slice(0,j.index)),tt[_]=tt[_]||c&&$[3]&&i[_]||"",$[4]&&(tt[_]=tt[_].toLowerCase())}a&&(tt.query=a(tt.query)),c&&i.slashes&&tt.pathname.charAt(0)!=="/"&&(tt.pathname!==""||i.pathname!=="")&&(tt.pathname=resolve(tt.pathname,i.pathname)),tt.pathname.charAt(0)!=="/"&&isSpecial(tt.protocol)&&(tt.pathname="/"+tt.pathname),required(tt.port,tt.protocol)||(tt.host=tt.hostname,tt.port=""),tt.username=tt.password="",tt.auth&&(j=tt.auth.indexOf(":"),~j?(tt.username=tt.auth.slice(0,j),tt.username=encodeURIComponent(decodeURIComponent(tt.username)),tt.password=tt.auth.slice(j+1),tt.password=encodeURIComponent(decodeURIComponent(tt.password))):tt.username=encodeURIComponent(decodeURIComponent(tt.auth)),tt.auth=tt.password?tt.username+":"+tt.password:tt.username),tt.origin=tt.protocol!=="file:"&&isSpecial(tt.protocol)&&tt.host?tt.protocol+"//"+tt.host:"null",tt.href=tt.toString()}function set(s,i,a){var c=this;switch(s){case"query":typeof i=="string"&&i.length&&(i=(a||qs.parse)(i)),c[s]=i;break;case"port":c[s]=i,required(i,c.protocol)?i&&(c.host=c.hostname+":"+i):(c.host=c.hostname,c[s]="");break;case"hostname":c[s]=i,c.port&&(i+=":"+c.port),c.host=i;break;case"host":c[s]=i,port.test(i)?(i=i.split(":"),c.port=i.pop(),c.hostname=i.join(":")):(c.hostname=i,c.port="");break;case"protocol":c.protocol=i.toLowerCase(),c.slashes=!a;break;case"pathname":case"hash":if(i){var d=s==="pathname"?"/":"#";c[s]=i.charAt(0)!==d?d+i:i}else c[s]=i;break;case"username":case"password":c[s]=encodeURIComponent(i);break;case"auth":var g=i.indexOf(":");~g?(c.username=i.slice(0,g),c.username=encodeURIComponent(decodeURIComponent(c.username)),c.password=i.slice(g+1),c.password=encodeURIComponent(decodeURIComponent(c.password))):c.username=encodeURIComponent(decodeURIComponent(i))}for(var $=0;$<rules.length;$++){var j=rules[$];j[4]&&(c[j[1]]=c[j[1]].toLowerCase())}return c.auth=c.password?c.username+":"+c.password:c.username,c.origin=c.protocol!=="file:"&&isSpecial(c.protocol)&&c.host?c.protocol+"//"+c.host:"null",c.href=c.toString(),c}function toString(s){(!s||typeof s!="function")&&(s=qs.stringify);var i,a=this,c=a.host,d=a.protocol;d&&d.charAt(d.length-1)!==":"&&(d+=":");var g=d+(a.protocol&&a.slashes||isSpecial(a.protocol)?"//":"");return a.username?(g+=a.username,a.password&&(g+=":"+a.password),g+="@"):a.password?(g+=":"+a.password,g+="@"):a.protocol!=="file:"&&isSpecial(a.protocol)&&!c&&a.pathname!=="/"&&(g+="@"),(c[c.length-1]===":"||port.test(a.hostname)&&!a.port)&&(c+=":"),g+=c+a.pathname,i=typeof a.query=="object"?s(a.query):a.query,i&&(g+=i.charAt(0)!=="?"?"?"+i:i),a.hash&&(g+=a.hash),g}Url.prototype={set,toString};Url.extractProtocol=extractProtocol;Url.location=lolcation;Url.trimLeft=trimLeft;Url.qs=qs;var urlParse=Url;const URL$1=getDefaultExportFromCjs(urlParse);function _typeof$8(s){"@babel/helpers - typeof";return _typeof$8=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$8(s)}function _defineProperties$8(s,i){for(var a=0;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$8(c.key),c)}}function _createClass$8(s,i,a){return i&&_defineProperties$8(s.prototype,i),a&&_defineProperties$8(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$8(s){var i=_toPrimitive$8(s,"string");return _typeof$8(i)==="symbol"?i:String(i)}function _toPrimitive$8(s,i){if(_typeof$8(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$8(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}function _classCallCheck$8(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _inherits$1(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),i&&_setPrototypeOf$1(s,i)}function _createSuper$1(s){var i=_isNativeReflectConstruct$1();return function(){var c=_getPrototypeOf$1(s),d;if(i){var g=_getPrototypeOf$1(this).constructor;d=Reflect.construct(c,arguments,g)}else d=c.apply(this,arguments);return _possibleConstructorReturn$1(this,d)}}function _possibleConstructorReturn$1(s,i){if(i&&(_typeof$8(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(s)}function _assertThisInitialized$1(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function _wrapNativeSuper(s){var i=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(c){if(c===null||!_isNativeFunction(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(c))return i.get(c);i.set(c,d)}function d(){return _construct(c,arguments,_getPrototypeOf$1(this).constructor)}return d.prototype=Object.create(c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$1(d,c)},_wrapNativeSuper(s)}function _construct(s,i,a){return _isNativeReflectConstruct$1()?_construct=Reflect.construct.bind():_construct=function(d,g,$){var j=[null];j.push.apply(j,g);var _=Function.bind.apply(d,j),_e=new _;return $&&_setPrototypeOf$1(_e,$.prototype),_e},_construct.apply(null,arguments)}function _isNativeReflectConstruct$1(){if(typeof Reflect>"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,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(_classCallCheck$8(this,a),d=i.call(this,c),d.originalRequest=$,d.originalResponse=j,d.causingError=g,g!=null&&(c+=", caused by ".concat(g.toString())),$!=null){var _=$.getHeader("X-Request-ID")||"n/a",_e=$.getMethod(),et=$.getURL(),tt=j?j.getStatus():"n/a",rt=j?j.getBody()||"":"n/a";c+=", originated from request (method: ".concat(_e,", url: ").concat(et,", response code: ").concat(tt,", response text: ").concat(rt,", 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(gt,ft,pt){gt[ft]=pt.value},d=typeof Symbol=="function"?Symbol:{},g=d.iterator||"@@iterator",$=d.asyncIterator||"@@asyncIterator",j=d.toStringTag||"@@toStringTag";function _(gt,ft,pt){return Object.defineProperty(gt,ft,{value:pt,enumerable:!0,configurable:!0,writable:!0}),gt[ft]}try{_({},"")}catch{_=function(pt,bt,Et){return pt[bt]=Et}}function _e(gt,ft,pt,bt){var Et=ft&&ft.prototype instanceof rt?ft:rt,St=Object.create(Et.prototype),$t=new wt(bt||[]);return c(St,"_invoke",{value:dt(gt,pt,$t)}),St}function et(gt,ft,pt){try{return{type:"normal",arg:gt.call(ft,pt)}}catch(bt){return{type:"throw",arg:bt}}}s.wrap=_e;var tt={};function rt(){}function nt(){}function ot(){}var lt={};_(lt,g,function(){return this});var ct=Object.getPrototypeOf,it=ct&&ct(ct(Rt([])));it&&it!==i&&a.call(it,g)&&(lt=it);var st=ot.prototype=rt.prototype=Object.create(lt);function at(gt){["next","throw","return"].forEach(function(ft){_(gt,ft,function(pt){return this._invoke(ft,pt)})})}function ut(gt,ft){function pt(Et,St,$t,kt){var Tt=et(gt[Et],gt,St);if(Tt.type!=="throw"){var At=Tt.arg,Lt=At.value;return Lt&&_typeof$7(Lt)=="object"&&a.call(Lt,"__await")?ft.resolve(Lt.__await).then(function(Bt){pt("next",Bt,$t,kt)},function(Bt){pt("throw",Bt,$t,kt)}):ft.resolve(Lt).then(function(Bt){At.value=Bt,$t(At)},function(Bt){return pt("throw",Bt,$t,kt)})}kt(Tt.arg)}var bt;c(this,"_invoke",{value:function(St,$t){function kt(){return new ft(function(Tt,At){pt(St,$t,Tt,At)})}return bt=bt?bt.then(kt,kt):kt()}})}function dt(gt,ft,pt){var bt="suspendedStart";return function(Et,St){if(bt==="executing")throw new Error("Generator is already running");if(bt==="completed"){if(Et==="throw")throw St;return Ct()}for(pt.method=Et,pt.arg=St;;){var $t=pt.delegate;if($t){var kt=mt($t,pt);if(kt){if(kt===tt)continue;return kt}}if(pt.method==="next")pt.sent=pt._sent=pt.arg;else if(pt.method==="throw"){if(bt==="suspendedStart")throw bt="completed",pt.arg;pt.dispatchException(pt.arg)}else pt.method==="return"&&pt.abrupt("return",pt.arg);bt="executing";var Tt=et(gt,ft,pt);if(Tt.type==="normal"){if(bt=pt.done?"completed":"suspendedYield",Tt.arg===tt)continue;return{value:Tt.arg,done:pt.done}}Tt.type==="throw"&&(bt="completed",pt.method="throw",pt.arg=Tt.arg)}}}function mt(gt,ft){var pt=ft.method,bt=gt.iterator[pt];if(bt===void 0)return ft.delegate=null,pt==="throw"&&gt.iterator.return&&(ft.method="return",ft.arg=void 0,mt(gt,ft),ft.method==="throw")||pt!=="return"&&(ft.method="throw",ft.arg=new TypeError("The iterator does not provide a '"+pt+"' method")),tt;var Et=et(bt,gt.iterator,ft.arg);if(Et.type==="throw")return ft.method="throw",ft.arg=Et.arg,ft.delegate=null,tt;var St=Et.arg;return St?St.done?(ft[gt.resultName]=St.value,ft.next=gt.nextLoc,ft.method!=="return"&&(ft.method="next",ft.arg=void 0),ft.delegate=null,tt):St:(ft.method="throw",ft.arg=new TypeError("iterator result is not an object"),ft.delegate=null,tt)}function ht(gt){var ft={tryLoc:gt[0]};1 in gt&&(ft.catchLoc=gt[1]),2 in gt&&(ft.finallyLoc=gt[2],ft.afterLoc=gt[3]),this.tryEntries.push(ft)}function xt(gt){var ft=gt.completion||{};ft.type="normal",delete ft.arg,gt.completion=ft}function wt(gt){this.tryEntries=[{tryLoc:"root"}],gt.forEach(ht,this),this.reset(!0)}function Rt(gt){if(gt){var ft=gt[g];if(ft)return ft.call(gt);if(typeof gt.next=="function")return gt;if(!isNaN(gt.length)){var pt=-1,bt=function Et(){for(;++pt<gt.length;)if(a.call(gt,pt))return Et.value=gt[pt],Et.done=!1,Et;return Et.value=void 0,Et.done=!0,Et};return bt.next=bt}}return{next:Ct}}function Ct(){return{value:void 0,done:!0}}return nt.prototype=ot,c(st,"constructor",{value:ot,configurable:!0}),c(ot,"constructor",{value:nt,configurable:!0}),nt.displayName=_(ot,j,"GeneratorFunction"),s.isGeneratorFunction=function(gt){var ft=typeof gt=="function"&&gt.constructor;return!!ft&&(ft===nt||(ft.displayName||ft.name)==="GeneratorFunction")},s.mark=function(gt){return Object.setPrototypeOf?Object.setPrototypeOf(gt,ot):(gt.__proto__=ot,_(gt,j,"GeneratorFunction")),gt.prototype=Object.create(st),gt},s.awrap=function(gt){return{__await:gt}},at(ut.prototype),_(ut.prototype,$,function(){return this}),s.AsyncIterator=ut,s.async=function(gt,ft,pt,bt,Et){Et===void 0&&(Et=Promise);var St=new ut(_e(gt,ft,pt,bt),Et);return s.isGeneratorFunction(ft)?St:St.next().then(function($t){return $t.done?$t.value:St.next()})},at(st),_(st,j,"Generator"),_(st,g,function(){return this}),_(st,"toString",function(){return"[object Generator]"}),s.keys=function(gt){var ft=Object(gt),pt=[];for(var bt in ft)pt.push(bt);return pt.reverse(),function Et(){for(;pt.length;){var St=pt.pop();if(St in ft)return Et.value=St,Et.done=!1,Et}return Et.done=!0,Et}},s.values=Rt,wt.prototype={constructor:wt,reset:function(ft){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(xt),!ft)for(var pt in this)pt.charAt(0)==="t"&&a.call(this,pt)&&!isNaN(+pt.slice(1))&&(this[pt]=void 0)},stop:function(){this.done=!0;var ft=this.tryEntries[0].completion;if(ft.type==="throw")throw ft.arg;return this.rval},dispatchException:function(ft){if(this.done)throw ft;var pt=this;function bt(At,Lt){return $t.type="throw",$t.arg=ft,pt.next=At,Lt&&(pt.method="next",pt.arg=void 0),!!Lt}for(var Et=this.tryEntries.length-1;Et>=0;--Et){var St=this.tryEntries[Et],$t=St.completion;if(St.tryLoc==="root")return bt("end");if(St.tryLoc<=this.prev){var kt=a.call(St,"catchLoc"),Tt=a.call(St,"finallyLoc");if(kt&&Tt){if(this.prev<St.catchLoc)return bt(St.catchLoc,!0);if(this.prev<St.finallyLoc)return bt(St.finallyLoc)}else if(kt){if(this.prev<St.catchLoc)return bt(St.catchLoc,!0)}else{if(!Tt)throw new Error("try statement without catch or finally");if(this.prev<St.finallyLoc)return bt(St.finallyLoc)}}}},abrupt:function(ft,pt){for(var bt=this.tryEntries.length-1;bt>=0;--bt){var Et=this.tryEntries[bt];if(Et.tryLoc<=this.prev&&a.call(Et,"finallyLoc")&&this.prev<Et.finallyLoc){var St=Et;break}}St&&(ft==="break"||ft==="continue")&&St.tryLoc<=pt&&pt<=St.finallyLoc&&(St=null);var $t=St?St.completion:{};return $t.type=ft,$t.arg=pt,St?(this.method="next",this.next=St.finallyLoc,tt):this.complete($t)},complete:function(ft,pt){if(ft.type==="throw")throw ft.arg;return ft.type==="break"||ft.type==="continue"?this.next=ft.arg:ft.type==="return"?(this.rval=this.arg=ft.arg,this.method="return",this.next="end"):ft.type==="normal"&&pt&&(this.next=pt),tt},finish:function(ft){for(var pt=this.tryEntries.length-1;pt>=0;--pt){var bt=this.tryEntries[pt];if(bt.finallyLoc===ft)return this.complete(bt.completion,bt.afterLoc),xt(bt),tt}},catch:function(ft){for(var pt=this.tryEntries.length-1;pt>=0;--pt){var bt=this.tryEntries[pt];if(bt.tryLoc===ft){var Et=bt.completion;if(Et.type==="throw"){var St=Et.arg;xt(bt)}return St}}throw new Error("illegal catch attempt")},delegateYield:function(ft,pt,bt){return this.delegate={iterator:Rt(ft),resultName:pt,nextLoc:bt},this.method==="next"&&(this.arg=void 0),tt}},s}function asyncGeneratorStep$1(s,i,a,c,d,g,$){try{var j=s[g]($),_=j.value}catch(_e){a(_e);return}j.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 $(_){asyncGeneratorStep$1(g,c,d,$,j,"next",_)}function j(_){asyncGeneratorStep$1(g,c,d,$,j,"throw",_)}$(void 0)})}}function _slicedToArray$1(s,i){return _arrayWithHoles$1(s)||_iterableToArrayLimit$1(s,i)||_unsupportedIterableToArray$1(s,i)||_nonIterableRest$1()}function _nonIterableRest$1(){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$1(s,i){if(s){if(typeof s=="string")return _arrayLikeToArray$1(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$1(s,i)}}function _arrayLikeToArray$1(s,i){(i==null||i>s.length)&&(i=s.length);for(var a=0,c=new Array(i);a<i;a++)c[a]=s[a];return c}function _iterableToArrayLimit$1(s,i){var a=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(a!=null){var c,d,g,$,j=[],_=!0,_e=!1;try{if(g=(a=a.call(s)).next,i===0){if(Object(a)!==a)return;_=!1}else for(;!(_=(c=g.call(a)).done)&&(j.push(c.value),j.length!==i);_=!0);}catch(et){_e=!0,d=et}finally{try{if(!_&&a.return!=null&&($=a.return(),Object($)!==$))return}finally{if(_e)throw d}}return j}}function _arrayWithHoles$1(s){if(Array.isArray(s))return s}function _typeof$7(s){"@babel/helpers - typeof";return _typeof$7=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$7(s)}function ownKeys$1(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$1(s){for(var i=1;i<arguments.length;i++){var a=arguments[i]!=null?arguments[i]:{};i%2?ownKeys$1(Object(a),!0).forEach(function(c){_defineProperty$1(s,c,a[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(a)):ownKeys$1(Object(a)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(a,c))})}return s}function _defineProperty$1(s,i,a){return i=_toPropertyKey$7(i),i in s?Object.defineProperty(s,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):s[i]=a,s}function _classCallCheck$7(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(s,i){for(var a=0;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$7(c.key),c)}}function _createClass$7(s,i,a){return i&&_defineProperties$7(s.prototype,i),a&&_defineProperties$7(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$7(s){var i=_toPrimitive$7(s,"string");return _typeof$7(i)==="symbol"?i:String(i)}function _toPrimitive$7(s,i){if(_typeof$7(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$7(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var defaultOptions$1={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},BaseUpload=function(){function s(i,a){_classCallCheck$7(this,s),"resume"in a&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=a,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=i,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return _createClass$7(s,[{key:"findPreviousUploads",value:function(){var a=this;return this.options.fingerprint(this.file,this.options).then(function(c){return a._urlStorage.findUploadsByFingerprint(c)})}},{key:"resumeFromPreviousUpload",value:function(a){this.url=a.uploadUrl||null,this._parallelUploadUrls=a.parallelUploadUrls||null,this._urlStorageKey=a.urlStorageKey}},{key:"start",value:function(){var a=this,c=this.file;if(!c){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var d=this.options.retryDelays;if(d!=null&&Object.prototype.toString.call(d)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var g=0,$=["uploadUrl","uploadSize","uploadLengthDeferred"];g<$.length;g++){var j=$[g];if(this.options[j]){this._emitError(new Error("tus: cannot use the ".concat(j," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(c,this.options).then(function(_){return a._fingerprint=_,a._source?a._source:a.options.fileReader.openFile(c,a.options.chunkSize)}).then(function(_){if(a._source=_,a.options.uploadLengthDeferred)a._size=null;else if(a.options.uploadSize!=null){if(a._size=Number(a.options.uploadSize),Number.isNaN(a._size)){a._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if(a._size=a._source.size,a._size==null){a._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}a.options.parallelUploads>1||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 $=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,j=(a=this.options.parallelUploadBoundaries)!==null&&a!==void 0?a:splitSizeIntoParts(this._source.size,$);this._parallelUploadUrls&&j.forEach(function(et,tt){et.uploadUrl=c._parallelUploadUrls[tt]||null}),this._parallelUploadUrls=new Array(j.length);var _=j.map(function(et,tt){var rt=0;return c._source.slice(et.start,et.end).then(function(nt){var ot=nt.value;return new Promise(function(lt,ct){var it=_objectSpread$1(_objectSpread$1({},c.options),{},{uploadUrl:et.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:{},headers:_objectSpread$1(_objectSpread$1({},c.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:lt,onError:ct,onProgress:function(ut){g=g-rt+ut,rt=ut,c._emitProgress(g,d)},onUploadUrlAvailable:function(){c._parallelUploadUrls[tt]=st.url,c._parallelUploadUrls.filter(function(ut){return!!ut}).length===j.length&&c._saveUploadInUrlStorage()}}),st=new s(ot,it);st.start(),c._parallelUploads.push(st)})})}),_e;Promise.all(_).then(function(){_e=c._openRequest("POST",c.options.endpoint),_e.setHeader("Upload-Concat","final;".concat(c._parallelUploadUrls.join(" ")));var et=encodeMetadata(c.options.metadata);return et!==""&&_e.setHeader("Upload-Metadata",et),c._sendRequest(_e,null)}).then(function(et){if(!inStatusCategory(et.getStatus(),200)){c._emitHttpError(_e,et,"tus: unexpected response while creating upload");return}var tt=et.getHeader("Location");if(tt==null){c._emitHttpError(_e,et,"tus: invalid or missing Location header");return}c.url=resolveUrl(c.options.endpoint,tt),"Created upload at ".concat(c.url),c._emitSuccess()}).catch(function(et){c._emitError(et)})}},{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($){if(!inStatusCategory($.getStatus(),200)){a._emitHttpError(c,$,"tus: unexpected response while creating upload");return}var j=$.getHeader("Location");if(j==null){a._emitHttpError(c,$,"tus: invalid or missing Location header");return}if(a.url=resolveUrl(a.options.endpoint,j),"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,$):(a._offset=0,a._performUpload())})}).catch(function($){a._emitHttpError(c,null,"tus: failed to create upload",$)})}},{key:"_resumeUpload",value:function(){var a=this,c=this._openRequest("HEAD",this.url),d=this._sendRequest(c,null);d.then(function(g){var $=g.getStatus();if(!inStatusCategory($,200)){if($===423){a._emitHttpError(c,g,"tus: upload is currently locked; retry later");return}if(inStatusCategory($,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 j=parseInt(g.getHeader("Upload-Offset"),10);if(Number.isNaN(j)){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(j===_){a._emitProgress(_,_),a._emitSuccess();return}a._offset=j,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($){c._emitProgress(d+$,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($){var j=$.value,_=$.done,_e=j&&j.size?j.size:0;c.options.uploadLengthDeferred&&_&&(c._size=c._offset+_e,a.setHeader("Upload-Length",c._size));var et=c._offset+_e;return!c.options.uploadLengthDeferred&&_&&et!==c._size?Promise.reject(new Error("upload was configured with a size of ".concat(c._size," bytes, but the source is done after ").concat(et," bytes"))):j===null?c._sendRequest(a):(c._emitProgress(c._offset,c._size),c._sendRequest(a,j))})}},{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 $=c.retryDelays[0],j=c.retryDelays.slice(1),_=_objectSpread$1(_objectSpread$1({},c),{},{retryDelays:j});return new Promise(function(_e){return setTimeout(_e,$)}).then(function(){return s.terminate(a,_)})})}}]),s}();function encodeMetadata(s){return Object.entries(s).map(function(i){var a=_slicedToArray$1(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<i+100}function openRequest(s,i,a){var c=a.httpStack.createRequest(s,i);c.setHeader("Tus-Resumable","1.0.0");var d=a.headers||{};if(Object.entries(d).forEach(function($){var j=_slicedToArray$1($,2),_=j[0],_e=j[1];c.setHeader(_,_e)}),a.addRequestId){var g=uuid();c.setHeader("X-Request-ID",g)}return c}function sendRequest(s,i,a){return _sendRequest2.apply(this,arguments)}function _sendRequest2(){return _sendRequest2=_asyncToGenerator$1(_regeneratorRuntime$1().mark(function s(i,a,c){var d;return _regeneratorRuntime$1().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(typeof c.onBeforeRequest!="function"){$.next=3;break}return $.next=3,c.onBeforeRequest(i);case 3:return $.next=5,i.send(a);case 5:if(d=$.sent,typeof c.onAfterResponse!="function"){$.next=9;break}return $.next=9,c.onAfterResponse(i,d);case 9:return $.abrupt("return",d);case 10:case"end":return $.stop()}},s)})),_sendRequest2.apply(this,arguments)}function isOnline(){var s=!0;return typeof window<"u"&&"navigator"in window&&window.navigator.onLine===!1&&(s=!1),s}function shouldRetry(s,i,a){if(a.retryDelays==null||i>=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;d<i;d++)c.push({start:a*d,end:a*(d+1)});return c[i-1].end=s,c}BaseUpload.defaultOptions=defaultOptions$1;function _typeof$6(s){"@babel/helpers - typeof";return _typeof$6=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$6(s)}function _classCallCheck$6(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(s,i){for(var a=0;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$6(c.key),c)}}function _createClass$6(s,i,a){return i&&_defineProperties$6(s.prototype,i),a&&_defineProperties$6(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$6(s){var i=_toPrimitive$6(s,"string");return _typeof$6(i)==="symbol"?i:String(i)}function _toPrimitive$6(s,i){if(_typeof$6(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$6(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var NoopUrlStorage=function(){function s(){_classCallCheck$6(this,s)}return _createClass$6(s,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(a){return Promise.resolve([])}},{key:"removeUpload",value:function(a){return Promise.resolve()}},{key:"addUpload",value:function(a,c){return Promise.resolve(null)}}]),s}();function _typeof$5(s){"@babel/helpers - typeof";return _typeof$5=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$5(s)}function _classCallCheck$5(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(s,i){for(var a=0;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$5(c.key),c)}}function _createClass$5(s,i,a){return i&&_defineProperties$5(s.prototype,i),a&&_defineProperties$5(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$5(s){var i=_toPrimitive$5(s,"string");return _typeof$5(i)==="symbol"?i:String(i)}function _toPrimitive$5(s,i){if(_typeof$5(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$5(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var hasStorage=!1;try{hasStorage="localStorage"in window;var key="tusSupport",originalValue=localStorage.getItem(key);localStorage.setItem(key,originalValue),originalValue===null&&localStorage.removeItem(key)}catch(s){if(s.code===s.SECURITY_ERR||s.code===s.QUOTA_EXCEEDED_ERR)hasStorage=!1;else throw s}var canStoreURLs=hasStorage,WebStorageUrlStorage=function(){function s(){_classCallCheck$5(this,s)}return _createClass$5(s,[{key:"findAllUploads",value:function(){var a=this._findEntries("tus::");return Promise.resolve(a)}},{key:"findUploadsByFingerprint",value:function(a){var c=this._findEntries("tus::".concat(a,"::"));return Promise.resolve(c)}},{key:"removeUpload",value:function(a){return localStorage.removeItem(a),Promise.resolve()}},{key:"addUpload",value:function(a,c){var d=Math.round(Math.random()*1e12),g="tus::".concat(a,"::").concat(d);return localStorage.setItem(g,JSON.stringify(c)),Promise.resolve(g)}},{key:"_findEntries",value:function(a){for(var c=[],d=0;d<localStorage.length;d++){var g=localStorage.key(d);if(g.indexOf(a)===0)try{var $=JSON.parse(localStorage.getItem(g));$.urlStorageKey=g,c.push($)}catch{}}return c}}]),s}();function _typeof$4(s){"@babel/helpers - typeof";return _typeof$4=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$4(s)}function _classCallCheck$4(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(s,i){for(var a=0;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$4(c.key),c)}}function _createClass$4(s,i,a){return i&&_defineProperties$4(s.prototype,i),a&&_defineProperties$4(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$4(s){var i=_toPrimitive$4(s,"string");return _typeof$4(i)==="symbol"?i:String(i)}function _toPrimitive$4(s,i){if(_typeof$4(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$4(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var XHRHttpStack=function(){function s(){_classCallCheck$4(this,s)}return _createClass$4(s,[{key:"createRequest",value:function(a,c){return new Request$1(a,c)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),s}(),Request$1=function(){function s(i,a){_classCallCheck$4(this,s),this._xhr=new XMLHttpRequest,this._xhr.open(i,a,!0),this._method=i,this._url=a,this._headers={}}return _createClass$4(s,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(a,c){this._xhr.setRequestHeader(a,c),this._headers[a]=c}},{key:"getHeader",value:function(a){return this._headers[a]}},{key:"setProgressHandler",value:function(a){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(c){c.lengthComputable&&a(c.loaded)})}},{key:"send",value:function(){var a=this,c=arguments.length>0&&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($){g($)},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<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$3(c.key),c)}}function _createClass$3(s,i,a){return i&&_defineProperties$3(s.prototype,i),a&&_defineProperties$3(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$3(s){var i=_toPrimitive$3(s,"string");return _typeof$3(i)==="symbol"?i:String(i)}function _toPrimitive$3(s,i){if(_typeof$3(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$3(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var FileSource=function(){function s(i){_classCallCheck$3(this,s),this._file=i,this.size=i.size}return _createClass$3(s,[{key:"slice",value:function(a,c){if(isCordova())return readAsByteArray(this._file.slice(a,c));var d=this._file.slice(a,c),g=c>=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;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$2(c.key),c)}}function _createClass$2(s,i,a){return i&&_defineProperties$2(s.prototype,i),a&&_defineProperties$2(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$2(s){var i=_toPrimitive$2(s,"string");return _typeof$2(i)==="symbol"?i:String(i)}function _toPrimitive$2(s,i){if(_typeof$2(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$2(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}function len(s){return s===void 0?0:s.size!==void 0?s.size:s.length}function concat(s,i){if(s.concat)return s.concat(i);if(s instanceof Blob)return new Blob([s,i],{type:s.type});if(s.set){var a=new s.constructor(s.length+i.length);return a.set(s),a.set(i,s.length),a}throw new Error("Unknown data type")}var StreamSource=function(){function s(i){_classCallCheck$2(this,s),this._buffer=void 0,this._bufferOffset=0,this._reader=i,this._done=!1}return _createClass$2(s,[{key:"slice",value:function(a,c){return a<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(a,c)}},{key:"_readUntilEnoughDataOrDone",value:function(a,c){var d=this,g=c<=this._bufferOffset+len(this._buffer);if(this._done||g){var $=this._getDataFromBuffer(a,c),j=$==null?this._done:!1;return Promise.resolve({value:$,done:j})}return this._reader.read().then(function(_){var _e=_.value,et=_.done;return et?d._done=!0:d._buffer===void 0?d._buffer=_e:d._buffer=concat(d._buffer,_e),d._readUntilEnoughDataOrDone(a,c)})}},{key:"_getDataFromBuffer",value:function(a,c){a>this._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(gt,ft,pt){gt[ft]=pt.value},d=typeof Symbol=="function"?Symbol:{},g=d.iterator||"@@iterator",$=d.asyncIterator||"@@asyncIterator",j=d.toStringTag||"@@toStringTag";function _(gt,ft,pt){return Object.defineProperty(gt,ft,{value:pt,enumerable:!0,configurable:!0,writable:!0}),gt[ft]}try{_({},"")}catch{_=function(pt,bt,Et){return pt[bt]=Et}}function _e(gt,ft,pt,bt){var Et=ft&&ft.prototype instanceof rt?ft:rt,St=Object.create(Et.prototype),$t=new wt(bt||[]);return c(St,"_invoke",{value:dt(gt,pt,$t)}),St}function et(gt,ft,pt){try{return{type:"normal",arg:gt.call(ft,pt)}}catch(bt){return{type:"throw",arg:bt}}}s.wrap=_e;var tt={};function rt(){}function nt(){}function ot(){}var lt={};_(lt,g,function(){return this});var ct=Object.getPrototypeOf,it=ct&&ct(ct(Rt([])));it&&it!==i&&a.call(it,g)&&(lt=it);var st=ot.prototype=rt.prototype=Object.create(lt);function at(gt){["next","throw","return"].forEach(function(ft){_(gt,ft,function(pt){return this._invoke(ft,pt)})})}function ut(gt,ft){function pt(Et,St,$t,kt){var Tt=et(gt[Et],gt,St);if(Tt.type!=="throw"){var At=Tt.arg,Lt=At.value;return Lt&&_typeof$1(Lt)=="object"&&a.call(Lt,"__await")?ft.resolve(Lt.__await).then(function(Bt){pt("next",Bt,$t,kt)},function(Bt){pt("throw",Bt,$t,kt)}):ft.resolve(Lt).then(function(Bt){At.value=Bt,$t(At)},function(Bt){return pt("throw",Bt,$t,kt)})}kt(Tt.arg)}var bt;c(this,"_invoke",{value:function(St,$t){function kt(){return new ft(function(Tt,At){pt(St,$t,Tt,At)})}return bt=bt?bt.then(kt,kt):kt()}})}function dt(gt,ft,pt){var bt="suspendedStart";return function(Et,St){if(bt==="executing")throw new Error("Generator is already running");if(bt==="completed"){if(Et==="throw")throw St;return Ct()}for(pt.method=Et,pt.arg=St;;){var $t=pt.delegate;if($t){var kt=mt($t,pt);if(kt){if(kt===tt)continue;return kt}}if(pt.method==="next")pt.sent=pt._sent=pt.arg;else if(pt.method==="throw"){if(bt==="suspendedStart")throw bt="completed",pt.arg;pt.dispatchException(pt.arg)}else pt.method==="return"&&pt.abrupt("return",pt.arg);bt="executing";var Tt=et(gt,ft,pt);if(Tt.type==="normal"){if(bt=pt.done?"completed":"suspendedYield",Tt.arg===tt)continue;return{value:Tt.arg,done:pt.done}}Tt.type==="throw"&&(bt="completed",pt.method="throw",pt.arg=Tt.arg)}}}function mt(gt,ft){var pt=ft.method,bt=gt.iterator[pt];if(bt===void 0)return ft.delegate=null,pt==="throw"&&gt.iterator.return&&(ft.method="return",ft.arg=void 0,mt(gt,ft),ft.method==="throw")||pt!=="return"&&(ft.method="throw",ft.arg=new TypeError("The iterator does not provide a '"+pt+"' method")),tt;var Et=et(bt,gt.iterator,ft.arg);if(Et.type==="throw")return ft.method="throw",ft.arg=Et.arg,ft.delegate=null,tt;var St=Et.arg;return St?St.done?(ft[gt.resultName]=St.value,ft.next=gt.nextLoc,ft.method!=="return"&&(ft.method="next",ft.arg=void 0),ft.delegate=null,tt):St:(ft.method="throw",ft.arg=new TypeError("iterator result is not an object"),ft.delegate=null,tt)}function ht(gt){var ft={tryLoc:gt[0]};1 in gt&&(ft.catchLoc=gt[1]),2 in gt&&(ft.finallyLoc=gt[2],ft.afterLoc=gt[3]),this.tryEntries.push(ft)}function xt(gt){var ft=gt.completion||{};ft.type="normal",delete ft.arg,gt.completion=ft}function wt(gt){this.tryEntries=[{tryLoc:"root"}],gt.forEach(ht,this),this.reset(!0)}function Rt(gt){if(gt){var ft=gt[g];if(ft)return ft.call(gt);if(typeof gt.next=="function")return gt;if(!isNaN(gt.length)){var pt=-1,bt=function Et(){for(;++pt<gt.length;)if(a.call(gt,pt))return Et.value=gt[pt],Et.done=!1,Et;return Et.value=void 0,Et.done=!0,Et};return bt.next=bt}}return{next:Ct}}function Ct(){return{value:void 0,done:!0}}return nt.prototype=ot,c(st,"constructor",{value:ot,configurable:!0}),c(ot,"constructor",{value:nt,configurable:!0}),nt.displayName=_(ot,j,"GeneratorFunction"),s.isGeneratorFunction=function(gt){var ft=typeof gt=="function"&&gt.constructor;return!!ft&&(ft===nt||(ft.displayName||ft.name)==="GeneratorFunction")},s.mark=function(gt){return Object.setPrototypeOf?Object.setPrototypeOf(gt,ot):(gt.__proto__=ot,_(gt,j,"GeneratorFunction")),gt.prototype=Object.create(st),gt},s.awrap=function(gt){return{__await:gt}},at(ut.prototype),_(ut.prototype,$,function(){return this}),s.AsyncIterator=ut,s.async=function(gt,ft,pt,bt,Et){Et===void 0&&(Et=Promise);var St=new ut(_e(gt,ft,pt,bt),Et);return s.isGeneratorFunction(ft)?St:St.next().then(function($t){return $t.done?$t.value:St.next()})},at(st),_(st,j,"Generator"),_(st,g,function(){return this}),_(st,"toString",function(){return"[object Generator]"}),s.keys=function(gt){var ft=Object(gt),pt=[];for(var bt in ft)pt.push(bt);return pt.reverse(),function Et(){for(;pt.length;){var St=pt.pop();if(St in ft)return Et.value=St,Et.done=!1,Et}return Et.done=!0,Et}},s.values=Rt,wt.prototype={constructor:wt,reset:function(ft){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(xt),!ft)for(var pt in this)pt.charAt(0)==="t"&&a.call(this,pt)&&!isNaN(+pt.slice(1))&&(this[pt]=void 0)},stop:function(){this.done=!0;var ft=this.tryEntries[0].completion;if(ft.type==="throw")throw ft.arg;return this.rval},dispatchException:function(ft){if(this.done)throw ft;var pt=this;function bt(At,Lt){return $t.type="throw",$t.arg=ft,pt.next=At,Lt&&(pt.method="next",pt.arg=void 0),!!Lt}for(var Et=this.tryEntries.length-1;Et>=0;--Et){var St=this.tryEntries[Et],$t=St.completion;if(St.tryLoc==="root")return bt("end");if(St.tryLoc<=this.prev){var kt=a.call(St,"catchLoc"),Tt=a.call(St,"finallyLoc");if(kt&&Tt){if(this.prev<St.catchLoc)return bt(St.catchLoc,!0);if(this.prev<St.finallyLoc)return bt(St.finallyLoc)}else if(kt){if(this.prev<St.catchLoc)return bt(St.catchLoc,!0)}else{if(!Tt)throw new Error("try statement without catch or finally");if(this.prev<St.finallyLoc)return bt(St.finallyLoc)}}}},abrupt:function(ft,pt){for(var bt=this.tryEntries.length-1;bt>=0;--bt){var Et=this.tryEntries[bt];if(Et.tryLoc<=this.prev&&a.call(Et,"finallyLoc")&&this.prev<Et.finallyLoc){var St=Et;break}}St&&(ft==="break"||ft==="continue")&&St.tryLoc<=pt&&pt<=St.finallyLoc&&(St=null);var $t=St?St.completion:{};return $t.type=ft,$t.arg=pt,St?(this.method="next",this.next=St.finallyLoc,tt):this.complete($t)},complete:function(ft,pt){if(ft.type==="throw")throw ft.arg;return ft.type==="break"||ft.type==="continue"?this.next=ft.arg:ft.type==="return"?(this.rval=this.arg=ft.arg,this.method="return",this.next="end"):ft.type==="normal"&&pt&&(this.next=pt),tt},finish:function(ft){for(var pt=this.tryEntries.length-1;pt>=0;--pt){var bt=this.tryEntries[pt];if(bt.finallyLoc===ft)return this.complete(bt.completion,bt.afterLoc),xt(bt),tt}},catch:function(ft){for(var pt=this.tryEntries.length-1;pt>=0;--pt){var bt=this.tryEntries[pt];if(bt.tryLoc===ft){var Et=bt.completion;if(Et.type==="throw"){var St=Et.arg;xt(bt)}return St}}throw new Error("illegal catch attempt")},delegateYield:function(ft,pt,bt){return this.delegate={iterator:Rt(ft),resultName:pt,nextLoc:bt},this.method==="next"&&(this.arg=void 0),tt}},s}function asyncGeneratorStep(s,i,a,c,d,g,$){try{var j=s[g]($),_=j.value}catch(_e){a(_e);return}j.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 $(_){asyncGeneratorStep(g,c,d,$,j,"next",_)}function j(_){asyncGeneratorStep(g,c,d,$,j,"throw",_)}$(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<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey$1(c.key),c)}}function _createClass$1(s,i,a){return i&&_defineProperties$1(s.prototype,i),a&&_defineProperties$1(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _toPropertyKey$1(s){var i=_toPrimitive$1(s,"string");return _typeof$1(i)==="symbol"?i:String(i)}function _toPrimitive$1(s,i){if(_typeof$1(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof$1(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var FileReader$1=function(){function s(){_classCallCheck$1(this,s)}return _createClass$1(s,[{key:"openFile",value:function(){var i=_asyncToGenerator(_regeneratorRuntime().mark(function c(d,g){var $;return _regeneratorRuntime().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!(isReactNative()&&d&&typeof d.uri<"u")){_.next=11;break}return _.prev=1,_.next=4,uriToBlob(d.uri);case 4:return $=_.sent,_.abrupt("return",new FileSource($));case 8:throw _.prev=8,_.t0=_.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(_.t0));case 11:if(!(typeof d.slice=="function"&&typeof d.size<"u")){_.next=13;break}return _.abrupt("return",Promise.resolve(new FileSource(d)));case 13:if(typeof d.read!="function"){_.next=18;break}if(g=Number(g),Number.isFinite(g)){_.next=17;break}return _.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return _.abrupt("return",Promise.resolve(new StreamSource(d,g)));case 18:return _.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return _.stop()}},c,null,[[1,8]])}));function a(c,d){return i.apply(this,arguments)}return a}()}]),s}();function fingerprint(s,i){return isReactNative()?Promise.resolve(reactNativeFingerprint(s,i)):Promise.resolve(["tus-br",s.name,s.type,s.size,s.lastModified,i.endpoint].join("-"))}function reactNativeFingerprint(s,i){var a=s.exif?hashCode(JSON.stringify(s.exif)):"noexif";return["tus-rn",s.name||"noname",s.size||"nosize",a,i.endpoint].join("/")}function hashCode(s){var i=0;if(s.length===0)return i;for(var a=0;a<s.length;a++){var c=s.charCodeAt(a);i=(i<<5)-i+c,i&=i}return i}function _typeof(s){"@babel/helpers - typeof";return _typeof=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(s)}function _classCallCheck(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function _defineProperties(s,i){for(var a=0;a<i.length;a++){var c=i[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,_toPropertyKey(c.key),c)}}function _createClass(s,i,a){return i&&_defineProperties(s.prototype,i),a&&_defineProperties(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}function _inherits(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(i&&i.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),i&&_setPrototypeOf(s,i)}function _setPrototypeOf(s,i){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__=d,c},_setPrototypeOf(s,i)}function _createSuper(s){var i=_isNativeReflectConstruct();return function(){var c=_getPrototypeOf(s),d;if(i){var g=_getPrototypeOf(this).constructor;d=Reflect.construct(c,arguments,g)}else d=c.apply(this,arguments);return _possibleConstructorReturn(this,d)}}function _possibleConstructorReturn(s,i){if(i&&(_typeof(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(s)}function _assertThisInitialized(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function _isNativeReflectConstruct(){if(typeof Reflect>"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;i<arguments.length;i++){var a=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(a),!0).forEach(function(c){_defineProperty(s,c,a[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(a,c))})}return s}function _defineProperty(s,i,a){return i=_toPropertyKey(i),i in s?Object.defineProperty(s,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):s[i]=a,s}function _toPropertyKey(s){var i=_toPrimitive(s,"string");return _typeof(i)==="symbol"?i:String(i)}function _toPrimitive(s,i){if(_typeof(s)!=="object"||s===null)return s;var a=s[Symbol.toPrimitive];if(a!==void 0){var c=a.call(s,i||"default");if(_typeof(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var defaultOptions=_objectSpread(_objectSpread({},BaseUpload.defaultOptions),{},{httpStack:new XHRHttpStack,fileReader:new FileReader$1,urlStorage:canStoreURLs?new WebStorageUrlStorage:new NoopUrlStorage,fingerprint}),Upload=function(s){_inherits(a,s);var i=_createSuper(a);function a(){var c=arguments.length>0&&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=lt,s.setCookie=s.getCookie=void 0,s.stringifyOptions=rt;var i=reactExports;function a(ct,it){return j(ct)||$(ct,it)||d(ct,it)||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(ct,it){if(ct){if(typeof ct=="string")return g(ct,it);var st=Object.prototype.toString.call(ct).slice(8,-1);if(st==="Object"&&ct.constructor&&(st=ct.constructor.name),st==="Map"||st==="Set")return Array.from(ct);if(st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st))return g(ct,it)}}function g(ct,it){(it==null||it>ct.length)&&(it=ct.length);for(var st=0,at=new Array(it);st<it;st++)at[st]=ct[st];return at}function $(ct,it){var st=ct==null?null:typeof Symbol<"u"&&ct[Symbol.iterator]||ct["@@iterator"];if(st!=null){var at=[],ut=!0,dt=!1,mt,ht;try{for(st=st.call(ct);!(ut=(mt=st.next()).done)&&(at.push(mt.value),!(it&&at.length===it));ut=!0);}catch(xt){dt=!0,ht=xt}finally{try{!ut&&st.return!=null&&st.return()}finally{if(dt)throw ht}}return at}}function j(ct){if(Array.isArray(ct))return ct}function _(ct,it){var st=Object.keys(ct);if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(ct);it&&(at=at.filter(function(ut){return Object.getOwnPropertyDescriptor(ct,ut).enumerable})),st.push.apply(st,at)}return st}function _e(ct){for(var it=1;it<arguments.length;it++){var st=arguments[it]!=null?arguments[it]:{};it%2?_(Object(st),!0).forEach(function(at){et(ct,at,st[at])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ct,Object.getOwnPropertyDescriptors(st)):_(Object(st)).forEach(function(at){Object.defineProperty(ct,at,Object.getOwnPropertyDescriptor(st,at))})}return ct}function et(ct,it,st){return it in ct?Object.defineProperty(ct,it,{value:st,enumerable:!0,configurable:!0,writable:!0}):ct[it]=st,ct}var tt=typeof window<"u";function rt(ct){return Object.keys(ct).reduce(function(it,st){return st==="days"||ct[st]===!1?it:ct[st]===!0?"".concat(it,"; ").concat(st):"".concat(it,"; ").concat(st,"=").concat(ct[st])},"")}var nt=function(it,st,at){if(tt){var ut=_e({days:7,path:"/"},at),dt=new Date(Date.now()+ut.days*864e5).toUTCString();document.cookie=it+"="+encodeURIComponent(st)+"; expires="+dt+rt(ut)}};s.setCookie=nt;var ot=function(it){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return tt&&document.cookie.split("; ").reduce(function(at,ut){var dt=ut.split("=");return dt[0]===it?decodeURIComponent(dt[1]):at},"")||st};s.getCookie=ot;function lt(ct,it){var st=(0,i.useState)(function(){return ot(ct,it)}),at=a(st,2),ut=at[0],dt=at[1],mt=function(xt,wt){dt(xt),nt(ct,xt,wt)};return[ut,mt]}})(dist);class TusUpload{constructor(i){this.upload=i}start(){this.upload.start()}abort(){return this.upload.abort(!0)}static async create(i,{onProgress:a,onSuccess:c,onError:d,metadata:g,chunkSize:$,baseUrl:j}){const _=["tus",i.fingerprint,"drive"].join("-"),_e=new Upload(i.native,{fingerprint:()=>Promise.resolve(_),removeFingerprintOnSuccess:!0,endpoint:`${j}/api/v1/tus/upload`,chunkSize:$,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:tt=>{var rt;if("originalResponse"in tt&&tt.originalResponse)try{const nt=(rt=JSON.parse(tt.originalResponse.getBody()))==null?void 0:rt.message;d==null||d(nt,i)}catch{d==null||d(null,i)}else d==null||d(null,i)},onProgress(tt,rt){a==null||a({bytesUploaded:tt,bytesTotal:rt})},onSuccess:async()=>{var rt;const tt=(rt=_e.url)==null?void 0:rt.split("/").pop();try{if(tt){const nt=await createFileEntry(tt);c==null||c(nt.fileEntry,i)}}catch(nt){localStorage.removeItem(_),d==null||d(getAxiosErrorMessage(nt),i)}}}),et=await _e.findPreviousUploads();return et.length&&_e.resumeFromPreviousUpload(et[0]),new TusUpload(_e)}}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){Ft(this,"abortController");Ft(this,"presignedRequest");this.file=i,this.config=a,this.abortController=new AbortController}async start(){var c,d,g,$;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||($=(g=this.config).onError)==null||$.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){Ft(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(([j,_])=>{i.set(j,`${_}`)});const $=await apiClient.post("file-entries",i,{onUploadProgress:j=>{j.event.lengthComputable&&(d==null||d({bytesUploaded:j.loaded,bytesTotal:j.total||0}))},signal:this.abortController.signal,headers:{"Content-Type":"multipart/form-data"}}).catch(j=>{j.code!=="ERR_CANCELED"&&(c==null||c(getAxiosErrorMessage(j),this.file))});this.abortController.signal.aborted||$&&$.data.fileEntry&&(a==null||a($.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<d;c++)a[c]!=="*"&&(c<g.length?i=a[c]===g[c]:i=!1);i=i&&g}else if(typeof s.splice=="function")for(i=[],c=s.length;c--;)this.match(s[c])&&(i[i.length]=s[c]);else if(typeof s=="object"){i={};for(var $ in s)this.match($)&&(i[$]=s[$])}return i};var wildcard$1=function(s,i,a){var c=new WildcardMatcher(s,a||/[\/\.]/);return typeof i<"u"?c.match(i):c},wildcard=wildcard$1,reMimePartSplit=/[\/\+\.]/,mimeMatch=function(s,i){function a(c){var d=wildcard(c,s,reMimePartSplit);return d&&d.length>=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(){Ft(this,"aliveTimer");Ft(this,"isDone",!1);Ft(this,"timeout",3e4);Ft(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 _e,et;const a=getBootstrapData().settings,c=s.options,d=s.file;if(c!=null&&c.restrictions){const tt=validateUpload(d,c.restrictions);if(tt)return i.updateFileUpload(d.id,{errorMessage:tt,status:"failed",request:void 0,timer:void 0}),c.showToastOnRestrictionFail&&toast.danger(tt),i.runQueue(),null}const g=new ProgressTimeout,$={metadata:{...c==null?void 0:c.metadata,relativePath:d.relativePath,disk:((_e=c==null?void 0:c.metadata)==null?void 0:_e.disk)||Disk.uploads,parentId:((et=c==null?void 0:c.metadata)==null?void 0:et.parentId)||""},chunkSize:a.uploads.chunk_size,baseUrl:a.base_url,onError:tt=>{var rt;i.updateFileUpload(d.id,{errorMessage:tt,status:"failed"}),i.runQueue(),g.done(),(rt=c==null?void 0:c.onError)==null||rt.call(c,tt,d)},onSuccess:tt=>{var rt;i.updateFileUpload(d.id,{status:"completed",entry:tt}),i.runQueue(),g.done(),(rt=c==null?void 0:c.onSuccess)==null||rt.call(c,tt,d)},onProgress:({bytesUploaded:tt,bytesTotal:rt})=>{var ot;const nt=tt/rt*100;i.updateFileUpload(d.id,{percentage:nt,bytesUploaded:tt}),g.progress(),(ot=c==null?void 0:c.onProgress)==null||ot.call(c,{bytesUploaded:tt,bytesTotal:rt})}},_=await chooseUploadStrategy(d,$).create(d,$);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){Ft(this,"id");Ft(this,"fingerprint");Ft(this,"name");Ft(this,"relativePath","");Ft(this,"size");Ft(this,"mime","");Ft(this,"extension","");Ft(this,"native");Ft(this,"lastModified");Ft(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 createFileUploadStore=({settings:s})=>create()(immer((i,a)=>({concurrency:3,fileUploads:new Map,activeUploadsCount:0,completedUploadsCount:0,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 $=g.fileUploads.get(c);$&&(g.fileUploads.set(c,{...$,...d}),"status"in d&&updateTotals(g))})},uploadSingle:(c,d)=>{const g=createUpload(c,d),$=new Map(a().fileUploads);return $.set(g.file.id,g),i(j=>{updateTotals(j),j.fileUploads=$}),a().runQueue(),g.file.id},uploadMultiple:(c,d)=>{const g=new Map(a().fileUploads);return[...c].forEach($=>{const j=createUpload($,d);g.set(j.file.id,j)}),i($=>{updateTotals($),$.fileUploads=g}),a().runQueue(),[...g.keys()]},runQueue:async()=>{const c=[...a().fileUploads.values()],d=c.filter($=>$.status==="inProgress");let g=a().concurrency;if(d.filter($=>$.file.relativePath||$.request instanceof S3MultipartUpload||$.request instanceof TusUpload&&s.uploads.chunk_size&&$.file.size>s.uploads.chunk_size).length&&(g=1),d.length<g){const $=c.find(j=>j.status==="pending");$&&await startUploading($,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($=>$.name!==".DS_Store").map($=>new UploadedFile($));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(et=>et.uploadSingle),c=useFileUploadStore(et=>et.abortUpload),d=useFileUploadStore(et=>et.updateFileUpload),g=useFileUploadStore(et=>i.current?et.fileUploads.get(i.current):null),$=reactExports.useCallback((et,tt)=>{i.current=a(et,tt)},[a]),j=reactExports.useCallback(async et=>{var rt;const tt=await openUploadWindow({types:(rt=et==null?void 0:et.restrictions)==null?void 0:rt.allowedFileTypes});return $(tt[0],et),tt[0]},[$]),_=reactExports.useCallback(({onSuccess:et,entryPath:tt})=>{var nt,ot,lt;const rt=()=>{g&&d(g.file.id,{...g,entry:void 0}),et()};if(!tt&&!((nt=g==null?void 0:g.entry)!=null&&nt.id)){rt();return}s.mutate({paths:tt?[tt]:void 0,entryIds:(ot=g==null?void 0:g.entry)!=null&&ot.id?[(lt=g==null?void 0:g.entry)==null?void 0:lt.id]:void 0,deleteForever:!0},{onSuccess:rt})},[s,g,d]),_e=reactExports.useCallback(()=>{g&&c(g.file.id)},[g,c]);return{uploadFile:$,selectAndUploadFile:j,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:_e}}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:$=!!g,isIndeterminate:j=!1,labelPosition:_="top",className:_e,role:et,formatOptions:tt={style:"percent"},radius:rt="rounded",trackColor:nt="bg-primary-light",progressColor:ot="bg-primary",trackHeight:lt=getSize(d)}=s;const ct=reactExports.useId();i=clamp$1(i,a,c);const it=(i-a)/(c-a),st=useNumberFormatter(tt);let at="";if(!j&&$){const ht=tt.style==="percent"?it:i;at=st.format(ht)}const ut={};j||(ut.width=`${Math.round(it*100)}%`);const dt=getInputFieldClassNames({size:d}),mt=(g||at)&&jsxRuntimeExports.jsxs("div",{className:clsx$1("flex gap-10 justify-between my-4",dt.label),children:[g&&jsxRuntimeExports.jsx("span",{id:ct,children:g}),at&&jsxRuntimeExports.jsx("div",{children:at})]});return jsxRuntimeExports.jsxs("div",{"aria-valuenow":j?void 0:i,"aria-valuemin":a,"aria-valuemax":c,"aria-valuetext":j?void 0:at,"aria-labelledby":g?ct:void 0,role:et||"progressbar",className:clsx$1(_e,"min-w-42"),children:[_==="top"&&mt,jsxRuntimeExports.jsx("div",{className:`${lt} ${rt} ${nt} overflow-hidden`,children:jsxRuntimeExports.jsx("div",{className:clsx$1(ot,"fill h-full transition-width duration-200 rounded-l",j&&"progress-bar-indeterminate-animate"),style:ut})}),_==="bottom"&&mt]})}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:$,showRemoveButton:j,showEditButtonOnHover:_=!1,invalid:_e,errorMessage:et,required:tt,autoFocus:rt,variant:nt="input",previewSize:ot="h-80",placeholderIcon:lt,stretchPreview:ct=!1,previewRadius:it,disabled:st}){const{uploadFile:at,entry:ut,uploadStatus:dt,deleteEntry:mt,isDeletingEntry:ht,percentage:xt}=useActiveUpload(),wt=reactExports.useRef(null);useAutoFocus({autoFocus:rt},wt);const Rt=reactExports.useId(),Ct=i?`${Rt}-label`:void 0,gt=a?`${Rt}-description`:void 0,ft=c||(ut==null?void 0:ut.url),pt={showToastOnRestrictionFail:!0,restrictions:{allowedFileTypes:[UploadInputType.image],maxFileSize:TwoMB},metadata:{diskPrefix:$,disk:Disk.public},onSuccess:Tt=>{d==null||d(Tt.url)},onError:Tt=>{Tt&&toast.danger(Tt)}},bt=getInputFieldClassNames({description:a,descriptionPosition:"top",invalid:_e});let Et;nt==="avatar"?Et=AvatarVariant:nt==="square"?Et=SquareVariant:Et=InputVariant;const St=j?jsxRuntimeExports.jsx(Button,{variant:"link",color:"danger",size:"xs",disabled:ht||!ft||st,onClick:()=>{mt({onSuccess:()=>d==null?void 0:d("")})},children:jsxRuntimeExports.jsx(Trans,{message:"Remove image"})}):null,$t=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,kt=reactExports.useCallback(()=>{var Tt;(Tt=wt.current)==null||Tt.click()},[]);return jsxRuntimeExports.jsxs("div",{className:clsx$1("text-sm",s),children:[i&&jsxRuntimeExports.jsx("div",{id:Ct,className:bt.label,children:i}),a&&jsxRuntimeExports.jsx("div",{className:bt.description,children:a}),jsxRuntimeExports.jsx("div",{"aria-labelledby":Ct,"aria-describedby":gt,children:jsxRuntimeExports.jsxs(Field,{fieldClassNames:bt,errorMessage:et,invalid:_e,children:[jsxRuntimeExports.jsx(Et,{inputFieldClassNames:bt,placeholderIcon:lt,previewSize:ot,isLoading:dt==="inProgress",imageUrl:ft,removeButton:St,useDefaultButton:$t,showEditButtonOnHover:_,stretchPreview:ct,previewRadius:it,handleUpload:kt,disabled:st,children:jsxRuntimeExports.jsx("input",{ref:wt,"aria-labelledby":Ct,"aria-describedby":gt,required:ft?!1:tt,accept:UploadInputType.image,type:"file",disabled:dt==="inProgress",className:"sr-only",onChange:Tt=>{var At;(At=Tt.target.files)!=null&&At.length&&at(Tt.target.files[0],pt)}})}),dt==="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:$,removeButton:j,useDefaultButton:_,disabled:_e}){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:()=>$(),src:a,alt:""}),s]}),jsxRuntimeExports.jsx(Button,{onClick:()=>$(),disabled:g||_e,className:"mr-10",variant:"outline",color:"primary",size:"xs",children:jsxRuntimeExports.jsx(Trans,{message:"Replace"})}),j&&reactExports.cloneElement(j,{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:$,useDefaultButton:j,previewRadius:_="rounded",showEditButtonOnHover:_e=!1,disabled:et}){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(_e&&"invisible group-hover:visible"),disabled:et,children:c?jsxRuntimeExports.jsx(Trans,{message:"Replace image"}):jsxRuntimeExports.jsx(Trans,{message:"Upload image"})})]}),s,($||j)&&jsxRuntimeExports.jsxs("div",{className:"mt-8",children:[$&&reactExports.cloneElement($,{variant:"link"}),j&&reactExports.cloneElement(j,{variant:"link"})]})]})}function AvatarVariant({children:s,placeholderIcon:i,previewSize:a,isLoading:c,imageUrl:d,removeButton:g,useDefaultButton:$,handleUpload:j,previewRadius:_="rounded-full",disabled:_e}){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:()=>j(),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||_e,type:"button",variant:"outline",size:"sm",color:"primary",radius:"rounded-full",children:jsxRuntimeExports.jsx(AddAPhotoIcon,{})})})]}),s,(g||$)&&jsxRuntimeExports.jsxs("div",{className:"mt-14",children:[g&&reactExports.cloneElement(g,{variant:"link"}),$&&reactExports.cloneElement($,{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:$=>{g.mutate($)},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:$=>{$?i.mutate({url:$}):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:$,inputValue:j}}=useListboxContext(),_=reactExports.useRef(j);return reactExports.useEffect(()=>{s&&!d?(a.current===null&&(a.current=setTimeout(()=>{g(!0)},500)),j!==_.current&&(clearTimeout(a.current),a.current=setTimeout(()=>{g(!0)},500))):s||(g(!1),clearTimeout(a.current),a.current=null),_.current=j},[s,d,j]),d&&($||s)?jsxRuntimeExports.jsx(ProgressCircle,{"aria-label":c({message:"Loading"}),size:"sm",isIndeterminate:!0}):i||jsxRuntimeExports.jsx(KeyboardArrowDownIcon,{})}function ComboBox(s,i){var sr;const{children:a,items:c,isAsync:d,isLoading:g,openMenuOnFocus:$=!0,endAdornmentIcon:j,onItemSelected:_,maxItems:_e,clearInputOnItemSelection:et,inputValue:tt,selectedValue:rt,onSelectionChange:nt,allowCustomValue:ot=!1,onInputValueChange:lt,defaultInputValue:ct,selectionMode:it="single",useOptionLabelAsInputValue:st,showEmptyMessage:at,floatingMaxHeight:ut,hideEndAdornment:dt=!1,blurReferenceOnItemSelection:mt,isOpen:ht,onOpenChange:xt,prependListbox:wt,listboxClassName:Rt,onEndAdornmentClick:Ct,autoFocusFirstItem:gt=!0,...ft}=s,pt=useListbox({...s,floatingMaxHeight:ut,blurReferenceOnItemSelection:mt,selectionMode:it,role:"listbox",virtualFocus:!0,clearSelectionOnInputClear:!0},i),{reference:bt,listboxId:Et,onInputChange:St,state:{isOpen:$t,setIsOpen:kt,inputValue:Tt,setInputValue:At,selectValues:Lt,selectedValues:Bt,setActiveCollection:zt},collection:Xt}=pt,Ut=Bt[0]?(sr=Xt.get(Bt[0]))==null?void 0:sr.textLabel:void 0,{handleListboxSearchFieldKeydown:Gt}=useListboxKeyboardNavigation(pt),Zt=createEventHandler(qt=>{$&&!$t&&kt(!0),qt.target.select()});return jsxRuntimeExports.jsx(Listbox,{prepend:wt,className:Rt,listbox:pt,mobileOverlay:Popover,isLoading:g,onPointerDown:qt=>{qt.preventDefault()},children:jsxRuntimeExports.jsx(TextField,{inputRef:bt,...ft,endAdornment:dt?null:jsxRuntimeExports.jsx(IconButton,{size:"md",tabIndex:-1,disabled:ft.disabled,className:"pointer-events-auto",onPointerDown:qt=>{qt.preventDefault(),qt.stopPropagation(),Ct?Ct():(zt("all"),kt(!$t))},children:jsxRuntimeExports.jsx(ComboboxEndAdornment,{isLoading:g,icon:j})}),"aria-expanded":$t?"true":"false","aria-haspopup":"listbox","aria-controls":$t?Et:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",onChange:St,value:st&&Ut?Ut:Tt,onBlur:qt=>{if(ot)Lt(qt.target.value);else if(!et){const er=Bt[0];At(Lt.length&&er!=null?`${er}`:"")}},onFocus:Zt,onClick:Zt,onKeyDown:qt=>Gt(qt)})})}React.forwardRef(ComboBox);function Select(s,i){const a=useIsMobileMediaQuery(),{hideCaret:c,placeholder:d=jsxRuntimeExports.jsx(Trans,{message:"Select an option..."}),selectedValue:g,onItemSelected:$,onOpenChange:j,onInputValueChange:_,onSelectionChange:_e,selectionMode:et,minWidth:tt="min-w-128",children:rt,searchPlaceholder:nt,showEmptyMessage:ot,showSearchField:lt,defaultInputValue:ct,inputValue:it,isLoading:st,isAsync:at,valueClassName:ut,floatingWidth:dt=a?"auto":"matchTrigger",...mt}=s,ht=useListbox({...s,clearInputOnItemSelection:!0,showEmptyMessage:ot||lt,floatingWidth:dt,selectionMode:"single",role:"listbox",virtualFocus:lt},i),{state:{selectedValues:xt,isOpen:wt,setIsOpen:Rt,activeIndex:Ct,setSelectedIndex:gt,inputValue:ft,setInputValue:pt},collections:bt,focusItem:Et,listboxId:St,reference:$t,refs:kt,listContent:Tt,onInputChange:At}=ht,{fieldProps:Lt,inputProps:Bt}=useField({...mt,focusRef:kt.reference}),zt=bt.collection.get(xt[0]),Xt=zt?jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-10",children:[zt.element.props.startIcon,jsxRuntimeExports.jsx("span",{className:clsx$1("overflow-hidden overflow-ellipsis whitespace-nowrap",ut),children:zt.element.props.children})]}):jsxRuntimeExports.jsx("span",{className:"italic",children:d}),Ut=getInputFieldClassNames({...s,endAdornment:!0}),{handleTriggerKeyDown:Gt,handleListboxKeyboardNavigation:Zt,handleListboxSearchFieldKeydown:sr}=useListboxKeyboardNavigation(ht),{findMatchingItem:qt}=useTypeSelect(),er=dr=>{if(!wt)return;const Kt=qt(dr,Tt,Ct);Kt!=null&&Et("increment",Kt)},xr=dr=>{if(wt)return;const Kt=qt(dr,Tt,Ct);Kt!=null&&gt(Kt)};return jsxRuntimeExports.jsx(Listbox,{listbox:ht,onKeyDownCapture:lt?void 0:er,onKeyDown:Zt,onClose:lt?()=>pt(""):void 0,isLoading:st,searchField:lt&&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":wt?"true":"false","aria-haspopup":"listbox","aria-controls":wt?St:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:ft,onChange:At,onKeyDown:dr=>{sr(dr)}}),children:jsxRuntimeExports.jsx(Field,{fieldClassNames:Ut,...Lt,endAdornment:!c&&jsxRuntimeExports.jsx(ComboboxEndAdornment,{isLoading:st}),children:jsxRuntimeExports.jsx("button",{...Bt,type:"button","data-selected-value":zt==null?void 0:zt.value,"aria-expanded":wt?"true":"false","aria-haspopup":"listbox","aria-controls":wt?St:void 0,ref:$t,onKeyDown:Gt,onKeyDownCapture:lt?void 0:xr,disabled:mt.disabled,onClick:()=>{Rt(!wt)},className:clsx$1(Ut.input,!Lt.unstyled&&tt),children:Xt})})})}const SelectForwardRef=React.forwardRef(Select);function FormSelect({children:s,...i}){const{field:{onChange:a,onBlur:c,value:d=null,ref:g},fieldState:{invalid:$,error:j}}=useController({name:i.name}),_={onSelectionChange:a,onBlur:c,selectedValue:d,invalid:$,errorMessage:j==null?void 0:j.message,name:i.name},_e=i.errorMessage||(j==null?void 0:j.message);return jsxRuntimeExports.jsx(SelectForwardRef,{ref:g,...$3ef42575df84b30b$export$9d1611c77c2fe928(_,i,{errorMessage:_e}),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(([$,j])=>jsxRuntimeExports.jsx(Section,{label:$,children:j.map(_=>jsxRuntimeExports.jsx(Item$1,{value:_.value,children:_.text},_.value))},$))})}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:$}=useValueLists(["timezones","countries","localizations"]),j=($==null?void 0:$.countries)||[],_=($==null?void 0:$.localizations)||[],_e=($==null?void 0:$.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:et=>{d.mutate(et),g.mutate({locale:et.language})},id:i,children:[jsxRuntimeExports.jsx(FormSelect,{className:"mb-24",selectionMode:"single",name:"language",label:jsxRuntimeExports.jsx(Trans,{message:"Language"}),children:_.map(et=>jsxRuntimeExports.jsx(Item$1,{value:et.language,children:et.name},et.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:j.map(et=>jsxRuntimeExports.jsx(Item$1,{value:et.code,children:et.name},et.code))}),jsxRuntimeExports.jsx(TimezoneSelect,{label:jsxRuntimeExports.jsx(Trans,{message:"Timezone"}),name:"timezone",timezones:_e})]})})}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"}},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:$}){const{close:j}=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:()=>{j(!1)},children:jsxRuntimeExports.jsx(Trans,{message:"Cancel"})}),jsxRuntimeExports.jsx(Button,{disabled:g,variant:"flat",color:d?"danger":"primary",onClick:()=>{$==null||$(),$||j(!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)})}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(),$=jsxRuntimeExports.jsx(Form,{form:s,id:i,onSubmit:j=>{c.mutate(j,{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}):$}),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 deleteAccount(s){return apiClient.delete(`users/${s}`,{params:{deleteCurrentUser:!0}}).then(i=>i.data)}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 DangerZonePanel(){const s=useDeleteAccount();return jsxRuntimeExports.jsx(AccountSettingsPanel,{id:AccountSettingsId.DeleteAccount,title:jsxRuntimeExports.jsx(Trans,{message:"Danger zone"}),children:jsxRuntimeExports.jsxs(DialogTrigger,{type:"modal",onClose:i=>{i&&s.mutate()},children:[jsxRuntimeExports.jsx(Button,{variant:"flat",color:"danger",children:jsxRuntimeExports.jsx(Trans,{message:"Delete account"})}),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"})})]})})}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 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 $=await openDialog(ConfirmPasswordDialog);$&&(c.current=$,setPasswordConfirmationStatus(!0),g(c.current))}},[i==null?void 0:i.confirmed,s]);return{isLoading:a,withConfirmedPassword:d}}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 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:$}=usePasswordConfirmedAction(),j=c.isPending||d.isPending||$;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:j,onClick:()=>{g(()=>{d.mutate(void 0,{onSuccess:s})})},children:jsxRuntimeExports.jsx(Trans,{message:"Cancel"})}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"primary",disabled:j,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(),$=a.isPending||c.isPending||g,j=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{type:"button",onClick:()=>d(()=>{c.mutate(void 0,{onSuccess:()=>{queryClient.invalidateQueries({queryKey:["users"]})}})}),variant:"outline",disabled:$,className:"mr-12",children:jsxRuntimeExports.jsx(Trans,{message:"Regenerate recovery codes"})}),jsxRuntimeExports.jsx(Button,{type:"submit",variant:"flat",color:"danger",disabled:$,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:j,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(_e=>jsxRuntimeExports.jsx("div",{className:"mb-4",children:_e},_e))})})}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 j;const{data:i,isLoading:a}=useUserSessions(),c=useLogoutOtherSessions(),{withConfirmedPassword:d,isLoading:g}=usePasswordConfirmedAction({needsPassword:!0}),$=jsxRuntimeExports.jsx("div",{className:"max-h-400 overflow-y-auto",children:(j=i==null?void 0:i.sessions)==null?void 0:j.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})}):$}),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 my-24 px-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:$=>jsxRuntimeExports.jsx(Link,{className:LinkStyle,to:"/register",children:$})},message:"Don't have an account? <a>Sign up.</a>"});return jsxRuntimeExports.jsxs(AuthLayout,{message:g,children:[jsxRuntimeExports.jsx(StaticPageTitle,{children:jsxRuntimeExports.jsx(Trans,{message:"Forgot Password"})}),jsxRuntimeExports.jsxs(Form,{form:c,onSubmit:$=>{d.mutate($)},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? <a>Sign up.</a>"});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,{})})})]}),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");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-a41ba13e.js"),["./billing-page-routes-a41ba13e.js","./Edit-b651a781.js","./billing-redirect-message-bb1d9064.js","./TaskAlt-122dfadf.js","./use-resume-subscription-c9a817ba.js","./OpenInNew-ddbf849b.js"],import.meta.url)),CheckoutRoutes=React.lazy(()=>__vitePreload(()=>import("./checkout-routes-d2ea10b7.js"),["./checkout-routes-d2ea10b7.js","./billing-redirect-message-bb1d9064.js","./TaskAlt-122dfadf.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(),$=()=>{i&&d.mutate({markAllAsUnread:!0})},j=jsxRuntimeExports.jsx(Button,{variant:"outline",color:"primary",size:"xs",startIcon:jsxRuntimeExports.jsx(DoneAllIcon,{}),onClick:$,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&&j,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 $={},j={};a.available_channels.forEach(_=>{j[_]=!1}),a.subscriptions.forEach(_=>{_.subscriptions.forEach(_e=>{const et=a.user_selections.find(tt=>tt.notif_id===_e.notif_id);$[_e.notif_id]=(et==null?void 0:et.channels)||{...j}})}),g($)}},[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($=>jsxRuntimeExports.jsxs("div",{className:"mb-10 text-sm",children:[jsxRuntimeExports.jsx(GroupRow,{group:$,allChannels:a==null?void 0:a.available_channels,selection:d,setSelection:g},$.group_name),$.subscriptions.map(j=>jsxRuntimeExports.jsx(SubscriptionRow,{subscription:j,selection:d,setSelection:g,allChannels:a==null?void 0:a.available_channels},j.notif_id))]},$.group_name)),jsxRuntimeExports.jsx(Button,{className:"ml-10 mt-20",variant:"flat",color:"primary",disabled:i.isPending,onClick:()=>{i.mutate(Object.entries(d).map(([$,j])=>({notif_id:$,channels:j})))},children:jsxRuntimeExports.jsx(Trans,{message:"Update preferences"})})]})})]})}function GroupRow({group:s,allChannels:i,selection:a,setSelection:c}){const d=($,j)=>{const _=produce(a,_e=>{Object.keys(a).forEach(et=>{_e[et][$]=j})});c(_)},g=jsxRuntimeExports.jsx("div",{className:"ml-auto flex items-center gap-40 max-md:hidden",children:i.map($=>{const j=Object.values(a).every(_e=>_e[$]),_=!j&&Object.values(a).some(_e=>_e[$]);return jsxRuntimeExports.jsx(Checkbox,{orientation:"vertical",isIndeterminate:_,checked:j,onChange:async _e=>{if($==="browser"){const et=await requestBrowserPermission();d($,et?!j:!1)}else d($,!j)},children:jsxRuntimeExports.jsx(Trans,{message:$})},$)})});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=($,j)=>{const _=produce(a,_e=>{_e[s.notif_id][$]=j});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($=>jsxRuntimeExports.jsx(Checkbox,{orientation:"vertical",checked:a[d][$],onChange:async j=>{const _=!a[d][$];if($==="browser"){const _e=await requestBrowserPermission();g($,_e?_:!1)}else g($,_)},"aria-label":$,children:jsxRuntimeExports.jsx("div",{className:"md:invisible md:h-0",children:jsxRuntimeExports.jsx(Trans,{message:$})})},$))})]})}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 ShareIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92c0-1.61-1.31-2.92-2.92-2.92zM18 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 7.02c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}),"ShareOutlined"),CopyLinkIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M 4 2 C 2.895 2 2 2.895 2 4 L 2 18 L 4 18 L 4 4 L 18 4 L 18 2 L 4 2 z M 8 6 C 6.895 6 6 6.895 6 8 L 6 20 C 6 21.105 6.895 22 8 22 L 20 22 C 21.105 22 22 21.105 22 20 L 22 8 C 22 6.895 21.105 6 20 6 L 8 6 z M 8 8 L 20 8 L 20 20 L 8 20 L 8 8 z M 16 9.0058594 C 15.230215 9.0058594 14.460443 9.2973698 13.878906 9.8789062 L 12.607422 11.150391 L 14.021484 12.564453 L 12.556641 14.029297 L 11.142578 12.615234 L 9.8789062 13.878906 C 8.7158332 15.041979 8.7158332 16.958021 9.8789062 18.121094 C 10.460397 18.702585 11.234094 19 12 19 C 12.765906 19 13.539603 18.702585 14.121094 18.121094 L 15.384766 16.857422 L 13.970703 15.443359 L 15.457031 13.957031 L 14.042969 12.542969 L 15.292969 11.292969 C 15.691896 10.894042 16.308104 10.894042 16.707031 11.292969 C 17.105958 11.691896 17.105958 12.308104 16.707031 12.707031 L 15.464844 13.949219 L 16.878906 15.363281 L 18.121094 14.121094 C 19.284167 12.958021 19.284167 11.041979 18.121094 9.8789062 C 17.539557 9.2973698 16.769785 9.0058594 16 9.0058594 z M 12.542969 14.042969 L 13.957031 15.457031 L 12.707031 16.707031 C 12.506522 16.90754 12.258094 17 12 17 C 11.741906 17 11.493478 16.90754 11.292969 16.707031 C 10.894042 16.308104 10.894042 15.691896 11.292969 15.292969 L 12.542969 14.042969 z"})),QrCode2Icon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15 21h-2v-2h2v2zm-2-7h-2v5h2v-5zm8-2h-2v4h2v-4zm-2-2h-2v2h2v-2zM7 12H5v2h2v-2zm-2-2H3v2h2v-2zm7-5h2V3h-2v2zm-7.5-.5v3h3v-3h-3zM9 9H3V3h6v6zm-4.5 7.5v3h3v-3h-3zM9 21H3v-6h6v6zm7.5-16.5v3h3v-3h-3zM21 9h-6V3h6v6zm-2 10v-3h-4v2h2v3h4v-2h-2zm-2-7h-4v2h4v-2zm-4-2H7v2h2v2h2v-2h2v-2zm1-1V7h-2V5h-2v4h4zM6.75 5.25h-1.5v1.5h1.5v-1.5zm0 12h-1.5v1.5h1.5v-1.5zm12-12h-1.5v1.5h1.5v-1.5z"}),"QrCode2Outlined");function shareLinkSocially(s,i,a,c){const d=generateShareUrl(s,i,a,c);s==="mail"?window.location.href=d:openNewWindow(d)}function openNewWindow(s){const c=(window.innerWidth-575)/2,d=(window.innerHeight-400)/2,g="status=1, scrollbars=1,width=575,height=400,top="+d+",left="+c;window.open(s,"share",g)}function generateShareUrl(s,i,a,c){switch(s){case"facebook":return"https://www.facebook.com/sharer/sharer.php?u="+i;case"twitter":return`https://twitter.com/intent/tweet?text=${a}&url=${i}`;case"pinterest":return"https://pinterest.com/pin/create/button/?url="+i+"&media="+c;case"tumblr":return"https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=&posttype=photo&title=&caption="+a+"&content="+c+"&url="+i;case"blogger":return"https://www.blogger.com/blog_this.pyra?t&u="+i+"&n="+a;case"mail":return`mailto:?subject=Check out this link.&body=${i}`}}function ShareLinkButton({link:s,className:i,variant:a="icon"}){const{base_url:c}=useSettings(),{trans:d}=useTrans();let g;"short_url"in s&&s.short_url?g=s.short_url:g=`${c}/${s.hash}`;const[,$]=useClipboard(g),[,j]=useClipboard(`${g}/qr`),_=a==="text"?jsxRuntimeExports.jsx(Button,{className:i,startIcon:jsxRuntimeExports.jsx(ShareIcon,{}),variant:"text",children:jsxRuntimeExports.jsx(Trans,{message:"Share"})}):jsxRuntimeExports.jsx(IconButton,{className:i,children:jsxRuntimeExports.jsx(ShareIcon,{})});return jsxRuntimeExports.jsxs(MenuTrigger,{children:[jsxRuntimeExports.jsx(Tooltip,{label:jsxRuntimeExports.jsx(Trans,{message:"Share"}),children:_}),jsxRuntimeExports.jsxs(Menu,{children:[jsxRuntimeExports.jsx(Item$1,{value:"clipboard",startIcon:jsxRuntimeExports.jsx(CopyLinkIcon,{}),onSelected:()=>{$(),toast.positive(message("Copied link to clipboard"))},children:jsxRuntimeExports.jsx(Trans,{message:"Copy to clipboard"})}),jsxRuntimeExports.jsx(Item$1,{value:"qr",startIcon:jsxRuntimeExports.jsx(QrCode2Icon,{}),onClick:()=>{j(),toast.positive(message("Copied QR code link to clipboard"))},children:jsxRuntimeExports.jsx(Trans,{message:"Copy QR code"})}),jsxRuntimeExports.jsx(Item$1,{value:"facebook",startIcon:jsxRuntimeExports.jsx(FacebookIcon,{}),onClick:()=>{shareLinkSocially("facebook",g,d(message("Check out this link")))},children:jsxRuntimeExports.jsx(Trans,{message:"Share to facebook"})}),jsxRuntimeExports.jsx(Item$1,{value:"twitter",startIcon:jsxRuntimeExports.jsx(TwitterIcon,{}),onClick:()=>{shareLinkSocially("twitter",g,d(message("Check out this link")))},children:jsxRuntimeExports.jsx(Trans,{message:"Share to twitter"})})]})]})}function buildLongUrlWithUtm(s){const i=new URL(s.long_url);return s.utm&&new URLSearchParams(s.utm).forEach((a,c)=>{i.searchParams.append(a,c)}),i.toString()}function RedirectCountdownButton({link:s,...i}){const{links:{redirect_time:a=0}}=useSettings(),c=reactExports.useRef(null),d=reactExports.useRef(a),[g,$]=reactExports.useState(d.current),j=reactExports.useCallback(()=>{window.location.href=buildLongUrlWithUtm(s)},[s]);reactExports.useEffect(()=>{if(a)return c.current=setInterval(()=>{d.current--,d.current<=0&&c.current&&(clearInterval(c.current),j()),$(d.current)},1e3),()=>{c.current&&clearInterval(c.current)}},[a,$,j]);const _=g>0?jsxRuntimeExports.jsx(Trans,{message:"Redirect in :seconds",values:{seconds:g}}):jsxRuntimeExports.jsx(Trans,{message:"Go to link"});return jsxRuntimeExports.jsx(Button,{...i,className:"min-w-128",onClick:()=>{g<=0&&j()},children:_})}function LinkPageRenderer({link:s}){const i=s.custom_page,{hideNavbar:a,hideFooter:c}=i.meta||{};return jsxRuntimeExports.jsxs("div",{className:"flex flex-col min-h-screen",children:[!a&&jsxRuntimeExports.jsx(LinkPageNavbar,{link:s}),jsxRuntimeExports.jsx(AdHost,{slot:"link_page",className:"mt-70 mb-20pa"}),jsxRuntimeExports.jsx("div",{className:"flex-auto",children:jsxRuntimeExports.jsx(CustomPageBody,{page:i})}),!c&&jsxRuntimeExports.jsx(Footer,{className:"mx-14 md:mx-40"})]})}function LinkPageNavbar({link:s}){return jsxRuntimeExports.jsx(Navbar,{menuPosition:"link-page-navbar",className:"flex-shrink-0 sticky top-0",rightChildren:jsxRuntimeExports.jsx(ShareLinkButton,{link:s}),children:jsxRuntimeExports.jsx(RedirectCountdownButton,{variant:"flat",color:"paper",link:s})})}function FloatingLinkOverlay({overlay:s}){const i=s.colors||{};return jsxRuntimeExports.jsxs("div",{style:{backgroundColor:i["bg-color"],backgroundImage:i["bg-image"]?`url(${i["bg-image"]})`:"",color:i["text-color"]},className:clsx$1("absolute max-w-[calc(100%-14px)] p-16 overflow-hidden shadow-lg bg-cover bg text-main",getOverlayPositionClass(s),getOverlayThemeClass(s.theme)),children:[s.label&&jsxRuntimeExports.jsx("div",{className:clsx$1("absolute w-84 h-[88px]",s.theme==="pill"?"top-4 right-4":"-top-4 -right-4"),children:jsxRuntimeExports.jsx("div",{className:"relative -left-4 top-14 w-[120px] rotate-45 text-sm py-4 text-center shadow",style:{background:i["label-bg-color"],color:i["label-color"]},children:s.label})}),s.message&&jsxRuntimeExports.jsx("div",{className:clsx$1("text-sm",s.theme==="full-width"?"mb-14":"my-14"),children:s.message}),s.btn_text&&jsxRuntimeExports.jsx(Button,{size:"sm",style:{borderColor:i["btn-bg-color"],background:i["btn-bg-color"],color:i["btn-text-color"]},variant:"flat",color:"primary",elementType:"a",href:s.btn_link,tabIndex:0,children:s.btn_text})]})}function getOverlayPositionClass(s){if(s.theme==="full-width")return s.position.startsWith("top")?"top-14 left-14":"bottom-14 left-14";switch(s.position){case"top-left":return"top-14 left-14";case"top-right":return"top-14 right-14";case"bottom-left":return"bottom-14 left-14";case"bottom-right":return"bottom-14 right-14"}}function getOverlayThemeClass(s){const i="w-350";switch(s){case"default":return`rounded p-16 ${i}`;case"rounded":return`rounded-lg p-16 ${i}`;case"pill":return`rounded-full px-30 pb-24 pt-14 ${i}`;case"full-width":return"rounded w-full flex items-center justify-center flex-col"}}function LinkOverlayRenderer({link:s}){return jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-screen relative",children:[jsxRuntimeExports.jsx(AdHost,{slot:"frame",className:"my-20"}),s.overlay&&jsxRuntimeExports.jsx(FloatingLinkOverlay,{overlay:s.overlay}),jsxRuntimeExports.jsx("iframe",{src:s.long_url,className:"flex-auto"})]})}function LinkIframeRenderer({link:s}){return jsxRuntimeExports.jsxs("div",{className:"flex flex-col h-screen relative",children:[jsxRuntimeExports.jsx(Navbar,{menuPosition:"link-page-navbar",className:"flex-shrink-0 sticky top-0",rightChildren:jsxRuntimeExports.jsx(ShareLinkButton,{link:s})}),jsxRuntimeExports.jsx(AdHost,{slot:"frame",className:"my-20"}),jsxRuntimeExports.jsx("iframe",{src:s.long_url,className:"flex-auto"})]})}function LinkSplashRenderer({link:s}){const{base_url:i}=useSettings();return jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full h-screen bg-alt",children:[jsxRuntimeExports.jsx(Navbar,{menuPosition:"link-page-navbar",rightChildren:jsxRuntimeExports.jsx(ShareLinkButton,{link:s})}),jsxRuntimeExports.jsxs("div",{className:"container flex-auto flex flex-col items-center justify-center mx-auto px-24",children:[jsxRuntimeExports.jsx(AdHost,{slot:"splash_top",className:"mt-20 mb-60 flex-shrink-0"}),jsxRuntimeExports.jsxs("div",{className:"border rounded md:flex gap-24 p-20 bg-paper flex-shrink-0",children:[jsxRuntimeExports.jsx("img",{src:`${i}/${s.hash}/img`,alt:"",className:"flex-shrink-0 border w-320 h-240 rounded max-w-full object-contain"}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl mt-24 md:mt-0 mb-24",children:jsxRuntimeExports.jsx(Trans,{message:"You are about to be redirected to another page."})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(RedirectCountdownButton,{variant:"flat",color:"primary",link:s}),jsxRuntimeExports.jsx(Button,{className:"ml-10",elementType:Link,to:"/",children:jsxRuntimeExports.jsx(Trans,{message:"Go back"})})]}),jsxRuntimeExports.jsx("div",{className:"text-sm text-muted border-t mt-24 pt-24",children:jsxRuntimeExports.jsx(Trans,{message:"You are about to be redirected to another page. We are not responsible for the content of that page or the consequences it may have on you."})})]})]}),jsxRuntimeExports.jsx(AdHost,{slot:"splash_bottom",className:"mt-60 mb-20 flex-shrink-0"})]}),jsxRuntimeExports.jsx(Footer,{className:"px-24"})]})}function removeProtocol(s){return s&&s.replace(/(^\w+:|^)\/\//,"")}function RemoteFavicon({url:s,className:i,size:a="w-16 h-16",alt:c}){if(!s)return null;const d=getFaviconSrc(s);return jsxRuntimeExports.jsx("img",{className:clsx$1(a,i),src:getFaviconSrc(s),alt:c||`${d} favicon`})}const getFaviconSrc=memoize(s=>s.includes("youtube")?"https://www.youtube.com/s/desktop/ca54e1bd/img/favicon.ico":(isAbsoluteUrl(s)||(s=`${window.location.protocol}//${window.location.host}`),"https://www.google.com/s2/favicons?domain="+new URL(s).origin));function LinkClipboardButton({link:s,variant:i,...a}){const{base_url:c}=useSettings();let d;"short_url"in s&&s.short_url?d=s.short_url:d=`${c}/${s.hash}`;const[,g]=useClipboard(d);return i==="text"?jsxRuntimeExports.jsx(ButtonBase,{...a,onClick:()=>{g(),toast.positive(message("Copied to clipboard"))},children:removeProtocol(d)}):jsxRuntimeExports.jsx(Tooltip,{label:jsxRuntimeExports.jsx(Trans,{message:"Copy to clipboard"}),children:jsxRuntimeExports.jsx(IconButton,{...a,onClick:()=>{g(),toast.positive(message("Copied to clipboard"))},children:jsxRuntimeExports.jsx(CopyLinkIcon,{})})})}function InfiniteScrollSentinel({query:{isInitialLoading:s,fetchNextPage:i,isFetchingNextPage:a,hasNextPage:c},children:d,loaderMarginTop:g="mt-24",style:$,className:j,variant:_="infiniteScroll",loadMoreExtraContent:_e,size:et="md"}){const tt=reactExports.useRef(null),rt=a||s,[nt,ot]=reactExports.useState(0),lt=_==="loadMore"&&nt<3?"loadMore":"infiniteScroll";reactExports.useEffect(()=>{const it=tt.current;if(!it||lt==="loadMore")return;const st=new IntersectionObserver(([at])=>{at.isIntersecting&&c&&!rt&&i()});return st.observe(it),()=>{st.unobserve(it)}},[i,c,rt,lt]);let ct;return d?ct=a?d:null:lt==="loadMore"?ct=!s&&c&&jsxRuntimeExports.jsxs("div",{className:clsx$1("flex items-center gap-8",g),children:[_e,jsxRuntimeExports.jsx(Button,{size:et==="md"?"sm":"xs",className:clsx$1(et==="sm"?"min-h-24 min-w-96":"min-h-36 min-w-112"),variant:"outline",color:"primary",onClick:()=>{i(),ot(nt+1)},disabled:rt,children:nt>=2&&!a?jsxRuntimeExports.jsx(Trans,{message:"Load all"}):jsxRuntimeExports.jsx(Trans,{message:"Show more"})})]}):ct=jsxRuntimeExports.jsx(AnimatePresence,{children:a&&jsxRuntimeExports.jsx(m$1.div,{className:clsx$1("flex justify-center w-full",g),...opacityAnimation,children:jsxRuntimeExports.jsx(ProgressCircle,{size:et,isIndeterminate:!0,"aria-label":"loading"})})}),jsxRuntimeExports.jsxs("div",{style:$,className:clsx$1("w-full",j,c&&"min-h-36"),role:"presentation",children:[jsxRuntimeExports.jsx("div",{ref:tt,"aria-hidden":!0}),ct]})}const shareLink=""+new URL("share-link-2f61bb3e.svg",import.meta.url).href;function hasNextPage(s){return"next_cursor"in s?s.next_cursor!=null:"last_page"in s?s.current_page<s.last_page:s.data.length>0&&s.data.length>=s.per_page}function buildQueryKey({queryKey:s,defaultOrderDir:i,defaultOrderBy:a,queryParams:c},d,g=""){return d.orderBy||(d.orderBy=a),d.orderDir||(d.orderDir=i),[...s,d,g,c]}function useInfiniteData(s){var at,ut,dt,mt;const{initialPage:i,endpoint:a,defaultOrderBy:c,defaultOrderDir:d,queryParams:g,paginate:$,transformResponse:j,willSortOrFilter:_=!1}=s,[_e,et]=reactExports.useState(""),[tt,rt]=reactExports.useState({orderBy:c,orderDir:d}),nt=buildQueryKey(s,tt,_e),ot=reactExports.useRef(hashKey(nt)).current,lt=useInfiniteQuery({placeholderData:_?keepPreviousData:void 0,queryKey:nt,queryFn:({pageParam:ht,signal:xt})=>{const wt={...g,perPage:(i==null?void 0:i.per_page)||(g==null?void 0:g.perPage),query:_e,paginate:$,...tt};return $==="cursor"?wt.cursor=ht:wt.page=ht||1,fetchData(a,wt,j,xt)},initialPageParam:$==="cursor"?"":1,getNextPageParam:ht=>hasNextPage(ht.pagination)?"next_cursor"in ht.pagination?ht.pagination.next_cursor:ht.pagination.current_page+1:null,initialData:()=>{if(!(!i||hashKey(nt)!==ot))return{pageParams:[void 0,1],pages:[{pagination:i}]}}}),ct=reactExports.useMemo(()=>{var ht;return((ht=lt.data)==null?void 0:ht.pages.flatMap(xt=>xt.pagination.data))||[]},[(at=lt.data)==null?void 0:at.pages]),it=(ut=lt.data)==null?void 0:ut.pages[0].pagination,st=it&&"total"in it&&it.total?it.total:null;return{...lt,items:ct,totalItems:st,noResults:((mt=(dt=lt.data)==null?void 0:dt.pages)==null?void 0:mt[0].pagination.data.length)===0,isReloading:lt.isFetching&&!lt.isFetchingNextPage&&lt.isPlaceholderData,sortDescriptor:tt,setSortDescriptor:rt,searchQuery:_e,setSearchQuery:et}}async function fetchData(s,i,a,c){return i.query&&await new Promise(d=>setTimeout(d,300)),apiClient.get(s,{params:i,signal:i.query?c:void 0}).then(d=>a?a(d.data):d.data)}function LinkGroupRenderer({linkGroup:s}){const i=useInfiniteData({willSortOrFilter:!0,queryKey:["link-group",s.id,"links"],endpoint:`link-group/${s.id}/links`,paginate:"simple"});let a;return i.isLoading?a=jsxRuntimeExports.jsx(Skeletons,{},"skeletons"):i.noResults?a=jsxRuntimeExports.jsx(IllustratedMessage,{className:"mt-80",image:jsxRuntimeExports.jsx(SvgImage,{src:shareLink}),title:jsxRuntimeExports.jsx(Trans,{message:"Nothing to show"}),description:jsxRuntimeExports.jsx(Trans,{message:"This group does not have any links yet"})},"illustration"):a=jsxRuntimeExports.jsx(LinkList,{data:i.items},"linkList"),jsxRuntimeExports.jsxs("div",{className:"bg-alt flex flex-col min-h-screen",children:[jsxRuntimeExports.jsx(Navbar,{menuPosition:"link-page-navbar",className:"sticky top-0 flex-shrink-0"}),jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-24 py-40 flex-auto",children:[jsxRuntimeExports.jsx("h1",{className:"text-3xl mb-40",children:s.name}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,mode:"wait",children:a}),jsxRuntimeExports.jsx(InfiniteScrollSentinel,{query:i})]})]})]})}function LinkList({data:s}){return jsxRuntimeExports.jsx(reactExports.Fragment,{children:s==null?void 0:s.map(i=>reactExports.createElement(m$1.div,{...opacityAnimation,key:i.id,className:"p-20 shadow rounded-lg mb-20 bg-paper"},jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-8",children:[jsxRuntimeExports.jsx(RemoteFavicon,{url:i.long_url}),jsxRuntimeExports.jsx("a",{target:"_blank",href:i.long_url,className:clsx$1(LinkStyle,"font-medium"),rel:"noreferrer",children:removeProtocol(i.long_url)})]}),jsxRuntimeExports.jsx(LinkClipboardButton,{link:i,variant:"text",className:"text-sm hover:underline"}),i.description&&jsxRuntimeExports.jsx("div",{className:"text-muted text-sm mt-14",children:i.description})))})}function Skeletons(){const s=Array.from(Array(10).keys());return reactExports.createElement(m$1.div,{...opacityAnimation,key:"skeleton"},s.map(i=>jsxRuntimeExports.jsxs(m$1.div,{className:"p-20 shadow rounded-lg mb-20 bg-paper",children:[jsxRuntimeExports.jsx(Skeleton,{className:"text-sm mb-14"}),jsxRuntimeExports.jsx(Skeleton,{className:"text-xs"}),jsxRuntimeExports.jsx(Skeleton,{className:"text-xs"})]},i)))}function cssPropsFromBgConfig(s){if(s){const i=s;return{backgroundImage:i.backgroundImage,backgroundColor:i.backgroundColor,backgroundAttachment:i.backgroundAttachment,backgroundSize:i.backgroundSize,backgroundRepeat:i.backgroundRepeat,backgroundPosition:i.backgroundPosition,color:i.color}}}const ImageIcon=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-2zm-4.86 8.86-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}),"ImageOutlined");function ImageWidgetRenderer({widget:s,variant:i}){const a=s.config.url?jsxRuntimeExports.jsx("img",{className:clsx$1("object-cover",getImageClassName({widget:s,variant:i})),src:s.config.url,alt:""}):jsxRuntimeExports.jsx("div",{className:clsx$1(getImageClassName({widget:s,variant:i}),"flex items-center justify-center"),children:jsxRuntimeExports.jsx(ImageIcon,{size:i==="editor"?"sm":"lg",className:"text-muted"})});return s.config.destinationUrl?jsxRuntimeExports.jsx("a",{href:s.config.destinationUrl,children:a}):a}function getImageClassName({widget:s,variant:i}){const a=s.config.type;return i==="editor"?`w-20 h-20 ${a==="avatar"?"rounded-full":"rounded"}`:a==="avatar"?"w-96 h-96 rounded-full mx-auto":"w-full h-full rounded block"}/*! get-video-id v3.6.5 | @license MIT © Michael Wuergler | https://github.com/radiovisual/get-video-id */function stripParameters(s){return s.includes("?")&&(s=s.split("?")[0]),s.includes("/")&&(s=s.split("/")[0]),s.includes("&")&&(s=s.split("&")[0]),s}function youtube(s){var i=s;i=i.replace(/#t=.*$/,""),i=i.replace(/^https?:\/\//,"");var a=/youtube:\/\/|youtu\.be\/|y2u\.be\//g;if(a.test(i)){var c=i.split(a)[1];return stripParameters(c)}var d=/\/shorts\//g;if(d.test(i))return stripParameters(i.split(d)[1]);var g=/v=|vi=/g;if(g.test(i)){var $=i.split(g);return stripParameters($[1].split("&")[0])}var j=/\/v\/|\/vi\/|\/watch\//g;if(j.test(i)){var _=i.split(j)[1];return stripParameters(_)}var _e=/\/an_webp\//g;if(_e.test(i)){var et=i.split(_e)[1];return stripParameters(et)}var tt=/\/e\//g;if(tt.test(i)){var rt=i.split(tt)[1];return stripParameters(rt)}var nt=/\/embed\//g;if(nt.test(i)){var ot=i.split(nt)[1];return stripParameters(ot)}var lt=/\/user\/([a-zA-Z\d]*)$/g;if(!lt.test(i)){var ct=/\/user\/(?!.*videos)/g;if(ct.test(i)){var it=i.split("/");return stripParameters(it.pop())}var st=/\/attribution_link\?.*v%3D([^%&]*)(%26|&|$)/;if(st.test(i))return stripParameters(i.match(st)[1])}}function _slicedToArray(s,i){return _arrayWithHoles(s)||_iterableToArrayLimit(s,i)||_unsupportedIterableToArray(s,i)||_nonIterableRest()}function _arrayWithHoles(s){if(Array.isArray(s))return s}function _iterableToArrayLimit(s,i){var a=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(a!=null){var c=[],d=!0,g=!1,$,j;try{for(a=a.call(s);!(d=($=a.next()).done)&&(c.push($.value),!(i&&c.length===i));d=!0);}catch(_){g=!0,j=_}finally{try{!d&&a.return!=null&&a.return()}finally{if(g)throw j}}return c}}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);a<i;a++)c[a]=s[a];return c}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 vimeo(s){var i=s;if(i.includes("#")){var a=i.split("#"),c=_slicedToArray(a,1);i=c[0]}if(i.includes("?")&&!i.includes("clip_id=")){var d=i.split("?"),g=_slicedToArray(d,1);i=g[0]}var $,j,_=/https?:\/\/vimeo\.com\/event\/(\d+)$/,_e=_.exec(i);if(_e&&_e[1])return _e[1];var et=/https?:\/\/vimeo\.com\/(\d+)/,tt=et.exec(i);if(tt&&tt[1])return tt[1];var rt=["https?://player.vimeo.com/video/[0-9]+$","https?://vimeo.com/channels","groups","album"].join("|"),nt=new RegExp(rt,"gim");if(nt.test(i))j=i.split("/"),j&&j.length>0&&($=j.pop());else if(/clip_id=/gim.test(i)&&(j=i.split("clip_id="),j&&j.length>0)){var ot=j[1].split("&"),lt=_slicedToArray(ot,1);$=lt[0]}return $}function vine(s){var i=/https:\/\/vine\.co\/v\/([a-zA-Z\d]*)\/?/,a=i.exec(s);if(a&&a.length>1)return a[1]}function videopress(s){var i;if(s.includes("embed"))return i=/embed\/(\w{8})/,s.match(i)[1];i=/\/v\/(\w{8})/;var a=s.match(i);if(a&&a.length>0)return a[1]}function microsoftStream(s){var i=s.includes("embed")?/https:\/\/web\.microsoftstream\.com\/embed\/video\/([a-zA-Z\d-]*)\/?/:/https:\/\/web\.microsoftstream\.com\/video\/([a-zA-Z\d-]*)\/?/,a=i.exec(s);if(a&&a.length>1)return a[1]}function tiktok(s){var i=/tiktok\.com(.*)\/video\/(\d+)/gm,a=i.exec(s);if(a&&a.length>2)return a[2]}function dailymotion(s){var i=/dailymotion\.com(.*)(video)\/([a-zA-Z\d]+)/gm,a=i.exec(s);if(a)return a[3];var c=/dai\.ly\/([a-zA-Z\d]+)/gm,d=c.exec(s);if(d&&d.length>1)return d[1];var g=/dailymotion\.com(.*)video=([a-zA-Z\d]+)/gm,$=g.exec(s);if($&&$.length>2)return $[2]}function getSrc(s){if(typeof s!="string")throw new TypeError("getSrc expected a string");var i=/src="(.*?)"/gm,a=i.exec(s);if(a&&a.length>=2)return a[1]}function getVideoId(s){if(typeof s!="string")throw new TypeError("get-video-id expects a string");var i=s;/<iframe/gi.test(i)&&(i=getSrc(i)||""),i=i.trim(),i=i.replace("-nocookie",""),i=i.replace("/www.","/");var a={id:null,service:null};if(/\/\/google/.test(i)){var c=i.match(/url=([^&]+)&/);c&&(i=decodeURIComponent(c[1]))}return/youtube|youtu\.be|y2u\.be|i.ytimg\./.test(i)?a={id:youtube(i),service:"youtube"}:/vimeo/.test(i)?a={id:vimeo(i),service:"vimeo"}:/vine/.test(i)?a={id:vine(i),service:"vine"}:/videopress/.test(i)?a={id:videopress(i),service:"videopress"}:/microsoftstream/.test(i)?a={id:microsoftStream(i),service:"microsoftstream"}:/tiktok\.com/.test(i)?a={id:tiktok(i),service:"tiktok"}:/(dailymotion\.com|dai\.ly)/.test(i)&&(a={id:dailymotion(i),service:"dailymotion"}),a}function VideoEmbedWidgetRenderer({variant:s,embedUrl:i}){return i?s==="editor"?jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-8",children:[jsxRuntimeExports.jsx(RemoteFavicon,{url:i}),jsxRuntimeExports.jsx("a",{href:i,target:"_blank",className:"text-muted text-sm hover:underline",rel:"noreferrer",children:i})]}):jsxRuntimeExports.jsx("iframe",{className:clsx$1("aspect-video w-full rounded shadow-lg"),loading:"lazy",src:i,allow:"autoplay; encrypted-media; picture-in-picture",allowFullScreen:!0}):null}function YoutubeWidgetRenderer({widget:s,variant:i}){if(!s.config.url)return null;const{id:a}=getVideoId(s.config.url),c=`https://www.youtube.com/embed/${a}`;return jsxRuntimeExports.jsx(VideoEmbedWidgetRenderer,{variant:i,embedUrl:c})}function TextWidgetRenderer({widget:s,variant:i}){return!s.config.title&&!s.config.description?null:i==="editor"?jsxRuntimeExports.jsxs("div",{className:"text-sm text-muted whitespace-nowrap overflow-hidden",children:[jsxRuntimeExports.jsx("div",{children:s.config.title}),jsxRuntimeExports.jsx("div",{className:"overflow-hidden overflow-ellipsis",children:s.config.description})]}):jsxRuntimeExports.jsxs("div",{className:"text-center mb-30",children:[jsxRuntimeExports.jsx("div",{className:"text-base font-medium",children:s.config.title}),jsxRuntimeExports.jsx("div",{className:"text-sm mt-8",children:s.config.description})]})}const EmailIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"}),"EmailOutlined"),InstagramIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"})),TiktokIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"})),YoutubeIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M 5.6796875 2 L 7.1582031 7.34375 L 7.1582031 9.90625 L 8.4394531 9.90625 L 8.4394531 7.34375 L 9.9375 2 L 8.6464844 2 L 8.109375 4.4316406 C 7.958375 5.1416406 7.8623594 5.6462656 7.8183594 5.9472656 L 7.7792969 5.9472656 C 7.7162969 5.5262656 7.6202813 5.017875 7.4882812 4.421875 L 6.9707031 2 L 5.6796875 2 z M 11.431641 4.0175781 C 10.997641 4.0175781 10.647859 4.1023906 10.380859 4.2753906 C 10.113859 4.4473906 9.9170156 4.7226094 9.7910156 5.0996094 C 9.6660156 5.4766094 9.6035156 5.9756563 9.6035156 6.5976562 L 9.6035156 7.4375 C 9.6035156 8.0525 9.6575781 8.5450156 9.7675781 8.9160156 C 9.8775781 9.2870156 10.063219 9.5603281 10.324219 9.7363281 C 10.585219 9.9123281 10.944344 10 11.402344 10 C 11.848344 10 12.202891 9.9132344 12.462891 9.7402344 C 12.722891 9.5672344 12.911344 9.295875 13.027344 8.921875 C 13.143344 8.547875 13.201172 8.0535 13.201172 7.4375 L 13.201172 6.5976562 C 13.201172 5.9766562 13.142437 5.4794687 13.023438 5.1054688 C 12.904438 4.7324687 12.715031 4.45725 12.457031 4.28125 C 12.199031 4.10525 11.858641 4.0175781 11.431641 4.0175781 z M 13.878906 4.1308594 L 13.878906 8.4453125 C 13.878906 8.9793125 13.968391 9.3720469 14.150391 9.6230469 C 14.332391 9.8740469 14.615047 10 14.998047 10 C 15.550047 10 15.966187 9.7332188 16.242188 9.1992188 L 16.269531 9.1992188 L 16.382812 9.90625 L 17.400391 9.90625 L 17.400391 4.1308594 L 16.101562 4.1308594 L 16.101562 8.71875 C 16.051563 8.82575 15.975094 8.9134219 15.871094 8.9824219 C 15.767094 9.0524219 15.659875 9.0859375 15.546875 9.0859375 C 15.414875 9.0859375 15.320672 9.031875 15.263672 8.921875 C 15.206672 8.811875 15.177734 8.6271406 15.177734 8.3691406 L 15.177734 4.1308594 L 13.878906 4.1308594 z M 11.402344 4.9121094 C 11.584344 4.9121094 11.713156 5.0072187 11.785156 5.1992188 C 11.857156 5.3902187 11.892578 5.694375 11.892578 6.109375 L 11.892578 7.9082031 C 11.892578 8.3352031 11.857156 8.6440312 11.785156 8.8320312 C 11.713156 9.0200312 11.585297 9.1142344 11.404297 9.1152344 C 11.222297 9.1152344 11.096344 9.0200313 11.027344 8.8320312 C 10.957344 8.6440313 10.923828 8.3352031 10.923828 7.9082031 L 10.923828 6.109375 C 10.923828 5.695375 10.95925 5.3912188 11.03125 5.1992188 C 11.10325 5.0082187 11.226344 4.9121094 11.402344 4.9121094 z M 5 11 C 3.9 11 3 11.9 3 13 L 3 20 C 3 21.1 3.9 22 5 22 L 19 22 C 20.1 22 21 21.1 21 20 L 21 13 C 21 11.9 20.1 11 19 11 L 5 11 z M 12.048828 13 L 13.105469 13 L 13.105469 15.568359 L 13.113281 15.568359 C 13.208281 15.382359 13.344531 15.233141 13.519531 15.119141 C 13.694531 15.005141 13.883938 14.949219 14.085938 14.949219 C 14.345937 14.949219 14.549266 15.01825 14.697266 15.15625 C 14.845266 15.29425 14.953531 15.517219 15.019531 15.824219 C 15.085531 16.132219 15.117187 16.559469 15.117188 17.105469 L 15.117188 17.876953 L 15.119141 17.876953 C 15.119141 18.603953 15.030469 19.136516 14.855469 19.478516 C 14.680469 19.820516 14.408109 19.992188 14.037109 19.992188 C 13.830109 19.992188 13.642656 19.944609 13.472656 19.849609 C 13.302656 19.754609 13.174844 19.623984 13.089844 19.458984 L 13.066406 19.458984 L 12.955078 19.919922 L 12.048828 19.919922 L 12.048828 13 z M 5.4863281 13.246094 L 8.7382812 13.246094 L 8.7382812 14.130859 L 7.6484375 14.130859 L 7.6484375 19.919922 L 6.5761719 19.919922 L 6.5761719 14.130859 L 5.4863281 14.130859 L 5.4863281 13.246094 z M 17.097656 14.951172 C 17.473656 14.951172 17.762844 15.020203 17.964844 15.158203 C 18.165844 15.296203 18.307625 15.511734 18.390625 15.802734 C 18.472625 16.094734 18.513672 16.497719 18.513672 17.011719 L 18.513672 17.847656 L 16.677734 17.847656 L 16.677734 18.095703 C 16.677734 18.408703 16.686078 18.642828 16.705078 18.798828 C 16.724078 18.954828 16.762312 19.069625 16.820312 19.140625 C 16.878312 19.212625 16.967844 19.248047 17.089844 19.248047 C 17.253844 19.248047 17.366734 19.183641 17.427734 19.056641 C 17.488734 18.929641 17.522344 18.718875 17.527344 18.421875 L 18.474609 18.476562 C 18.479609 18.518563 18.482422 18.578344 18.482422 18.652344 C 18.482422 19.103344 18.358328 19.440109 18.111328 19.662109 C 17.864328 19.885109 17.517406 19.996094 17.066406 19.996094 C 16.525406 19.996094 16.145734 19.825328 15.927734 19.486328 C 15.709734 19.147328 15.601562 18.623109 15.601562 17.912109 L 15.601562 17.060547 C 15.601562 16.328547 15.714453 15.794031 15.939453 15.457031 C 16.164453 15.120031 16.551656 14.951172 17.097656 14.951172 z M 8.4101562 15.044922 L 9.5097656 15.044922 L 9.5097656 18.625 C 9.5097656 18.842 9.5340312 18.997844 9.5820312 19.089844 C 9.6300313 19.182844 9.7083125 19.228516 9.8203125 19.228516 C 9.9153125 19.228516 10.008703 19.199625 10.095703 19.140625 C 10.183703 19.082625 10.246062 19.007969 10.289062 18.917969 L 10.289062 15.044922 L 11.388672 15.044922 L 11.388672 19.919922 L 11.386719 19.919922 L 10.527344 19.919922 L 10.433594 19.322266 L 10.408203 19.322266 C 10.174203 19.774266 9.8244219 20 9.3574219 20 C 9.0334219 20 8.7965781 19.893641 8.6425781 19.681641 C 8.4885781 19.469641 8.4101563 19.1375 8.4101562 18.6875 L 8.4101562 15.044922 z M 17.074219 15.693359 C 16.957219 15.693359 16.870453 15.728875 16.814453 15.796875 C 16.758453 15.865875 16.721125 15.978766 16.703125 16.134766 C 16.684125 16.290766 16.675781 16.527703 16.675781 16.845703 L 16.675781 17.195312 L 17.478516 17.195312 L 17.478516 16.845703 C 17.478516 16.532703 17.468266 16.296766 17.447266 16.134766 C 17.427266 15.972766 17.388031 15.858969 17.332031 15.792969 C 17.276031 15.726969 17.191219 15.693359 17.074219 15.693359 z M 13.591797 15.728516 C 13.485797 15.728516 13.388828 15.770469 13.298828 15.855469 C 13.208828 15.940469 13.144422 16.049641 13.107422 16.181641 L 13.107422 18.949219 C 13.155422 19.034219 13.217922 19.097625 13.294922 19.140625 C 13.371922 19.182625 13.453922 19.205078 13.544922 19.205078 C 13.661922 19.205078 13.753266 19.163125 13.822266 19.078125 C 13.891266 18.993125 13.941703 18.850437 13.970703 18.648438 C 13.999703 18.447437 14.013672 18.1675 14.013672 17.8125 L 14.013672 17.185547 C 14.013672 16.803547 14.002516 16.509734 13.978516 16.302734 C 13.954516 16.095734 13.911562 15.946375 13.851562 15.859375 C 13.790563 15.772375 13.703797 15.728516 13.591797 15.728516 z"})),SoundcloudIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c0-.057-.045-.1-.09-.1m-.899.828c-.06 0-.091.037-.104.094L0 14.479l.165 1.308c0 .055.045.094.09.094s.089-.045.104-.104l.21-1.319-.21-1.334c0-.061-.044-.09-.09-.09m1.83-1.229c-.061 0-.12.045-.12.104l-.21 2.563.225 2.458c0 .06.045.12.119.12.061 0 .105-.061.121-.12l.254-2.474-.254-2.548c-.016-.06-.061-.12-.121-.12m.945-.089c-.075 0-.135.06-.15.135l-.193 2.64.21 2.544c.016.077.075.138.149.138.075 0 .135-.061.15-.15l.24-2.532-.24-2.623c0-.075-.06-.135-.135-.135l-.031-.017zm1.155.36c-.005-.09-.075-.149-.159-.149-.09 0-.158.06-.164.149l-.217 2.43.2 2.563c0 .09.075.157.159.157.074 0 .148-.068.148-.158l.227-2.563-.227-2.444.033.015zm.809-1.709c-.101 0-.18.09-.18.181l-.21 3.957.187 2.563c0 .09.08.164.18.164.094 0 .174-.09.18-.18l.209-2.563-.209-3.972c-.008-.104-.088-.18-.18-.18m.959-.914c-.105 0-.195.09-.203.194l-.18 4.872.165 2.548c0 .12.09.209.195.209.104 0 .194-.089.21-.209l.193-2.548-.192-4.856c-.016-.12-.105-.21-.21-.21m.989-.449c-.121 0-.211.089-.225.209l-.165 5.275.165 2.52c.014.119.104.225.225.225.119 0 .225-.105.225-.225l.195-2.52-.196-5.275c0-.12-.105-.225-.225-.225m1.245.045c0-.135-.105-.24-.24-.24-.119 0-.24.105-.24.24l-.149 5.441.149 2.503c.016.135.121.24.256.24s.24-.105.24-.24l.164-2.503-.164-5.456-.016.015zm.749-.134c-.135 0-.255.119-.255.254l-.15 5.322.15 2.473c0 .15.12.255.255.255s.255-.12.255-.27l.15-2.474-.165-5.307c0-.148-.12-.27-.271-.27m1.005.166c-.164 0-.284.135-.284.285l-.103 5.143.135 2.474c0 .149.119.277.284.277.149 0 .271-.12.284-.285l.121-2.443-.135-5.112c-.012-.164-.135-.285-.285-.285m1.184-.945c-.045-.029-.105-.044-.165-.044s-.119.015-.165.044c-.09.054-.149.15-.149.255v.061l-.104 6.048.115 2.449v.008c.008.06.03.135.074.18.058.061.142.104.234.104.08 0 .158-.044.209-.09.058-.06.091-.135.091-.225l.015-.24.117-2.203-.135-6.086c0-.104-.061-.193-.135-.239l-.002-.022zm1.006-.547c-.045-.045-.09-.061-.15-.061-.074 0-.149.016-.209.061-.075.061-.119.15-.119.24v.029l-.137 6.609.076 1.215.061 1.185c0 .164.148.314.328.314.181 0 .33-.15.33-.329l.15-2.414-.15-6.637c0-.12-.074-.221-.165-.277m8.934 3.777c-.405 0-.795.086-1.139.232-.24-2.654-2.46-4.736-5.188-4.736-.659 0-1.305.135-1.889.359-.225.09-.27.18-.285.359v9.368c.016.18.15.33.33.345h8.185C22.681 17.218 24 15.914 24 14.28s-1.319-2.952-2.938-2.952"})),BandcampIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M0 18.75l7.437-13.5H24l-7.438 13.5H0z"})),LinkedinIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})),WhatsappIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})),TelegramIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})),TwitchIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"})),PatreonIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M0 .48v23.04h4.22V.48zm15.385 0c-4.764 0-8.641 3.88-8.641 8.65 0 4.755 3.877 8.623 8.641 8.623 4.75 0 8.615-3.868 8.615-8.623C24 4.36 20.136.48 15.385.48z"})),PinterestIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z"})),SpotifyIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})),AmazonIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 01-10.951-.577 17.88 17.88 0 01-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.375.15-.63.045a6.062 6.062 0 01-.526-.496l-.31-.347a9.391 9.391 0 01-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.02zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 011.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.046-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.047-.02-.077 0-.017.006-.03.02-.063v-.06z"})),SnapchatIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.075.045.203.09.401.09.3-.016.659-.12 1.033-.301.165-.088.344-.104.464-.104.182 0 .359.029.509.09.45.149.734.479.734.838.015.449-.39.839-1.213 1.168-.089.029-.209.075-.344.119-.45.135-1.139.36-1.333.81-.09.224-.061.524.12.868l.015.015c.06.136 1.526 3.475 4.791 4.014.255.044.435.27.42.509 0 .075-.015.149-.045.225-.24.569-1.273.988-3.146 1.271-.059.091-.12.375-.164.57-.029.179-.074.36-.134.553-.076.271-.27.405-.555.405h-.03c-.135 0-.313-.031-.538-.074-.36-.075-.765-.135-1.273-.135-.3 0-.599.015-.913.074-.6.104-1.123.464-1.723.884-.853.599-1.826 1.288-3.294 1.288-.06 0-.119-.015-.18-.015h-.149c-1.468 0-2.427-.675-3.279-1.288-.599-.42-1.107-.779-1.707-.884-.314-.045-.629-.074-.928-.074-.54 0-.958.089-1.272.149-.211.043-.391.074-.54.074-.374 0-.523-.224-.583-.42-.061-.192-.09-.389-.135-.567-.046-.181-.105-.494-.166-.57-1.918-.222-2.95-.642-3.189-1.226-.031-.063-.052-.15-.055-.225-.015-.243.165-.465.42-.509 3.264-.54 4.73-3.879 4.791-4.02l.016-.029c.18-.345.224-.645.119-.869-.195-.434-.884-.658-1.332-.809-.121-.029-.24-.074-.346-.119-1.107-.435-1.257-.93-1.197-1.273.09-.479.674-.793 1.168-.793.146 0 .27.029.383.074.42.194.789.3 1.104.3.234 0 .384-.06.465-.105l-.046-.569c-.098-1.626-.225-3.651.307-4.837C7.392 1.077 10.739.807 11.727.807l.419-.015h.06z"})),AppleIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"}));var SocialsType=(s=>(s.Mail="mail",s.Facebook="facebook",s.Twitter="twitter",s.Instagram="instagram",s.Tiktok="tiktok",s.Youtube="youtube",s.Soundcloud="soundcloud",s.Bandcamp="bandcamp",s.LinkedIn="linkedin",s.Whatsapp="whatsapp",s.Telegram="telegram",s.Twitch="twitch",s.Patreon="patreon",s.Pinterest="pinterest",s.Spotify="spotify",s.Amazon="amazon",s.Snapchat="snapchat",s.Apple="apple",s))(SocialsType||{});const SocialsList={mail:{name:message("Email"),placeholder:"your@email.com",inputType:"email",icon:EmailIcon},facebook:{name:message("Facebook url"),placeholder:"https://facebook.com/username",pattern:"https://(www.)?facebook.com/[a-zA-Z0-9._%-]+$",inputType:"url",icon:FacebookIcon},twitter:{name:message("Twitter handle"),placeholder:"@yourtwitterhandle",pattern:"^@[A-Za-z0-9_]{1,15}$",icon:TwitterIcon},instagram:{name:message("Instagram username"),placeholder:"@instagramusername",pattern:"^@[a-zA-Z0-9._%-]+$",icon:InstagramIcon},tiktok:{name:message("TikTok username"),placeholder:"@tiktokusername",pattern:"^@[a-zA-Z0-9._%-]+$",icon:TiktokIcon},youtube:{name:message("Youtube channel url"),placeholder:"https://youtube.com/channel/youtubechannelurl",inputType:"url",pattern:"https://(www.)?youtube.com/channel/[a-zA-Z0-9._%-]+$",icon:YoutubeIcon},soundcloud:{name:message("SoundCloud url"),placeholder:"https://soundcloud.com/username",inputType:"url",pattern:"https://(www.)?soundcloud.com/[a-zA-Z0-9._%-]+$",icon:SoundcloudIcon},bandcamp:{name:message("Bandcamp url"),placeholder:"https://you.bandcamp.com",inputType:"url",pattern:"https://(www.)?[a-zA-Z0-9._%-]+.bandcamp.com$",icon:BandcampIcon},linkedin:{name:message("LinkedIn url"),placeholder:"https://linkedin.com/in/username",inputType:"url",pattern:"https://(www.)?linkedin.com/[a-zA-Z0-9._%-]+/[a-zA-Z0-9._%-]+$",icon:LinkedinIcon},whatsapp:{name:message("WhatsApp"),placeholder:"+00000000000",pattern:"^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$",icon:WhatsappIcon},telegram:{name:message("Telegram url"),placeholder:"https://t.me",inputType:"url",pattern:"https://(www.)?t.me/[a-zA-Z0-9._%-]+$",icon:TelegramIcon},twitch:{name:message("Twitch url"),placeholder:"https://twitch.tv/username",inputType:"url",pattern:"https://(www.)?twitch.tv/[a-zA-Z0-9._%-]+$",icon:TwitchIcon},patreon:{name:message("Patreon url"),placeholder:"https://patreon.com/username",inputType:"url",pattern:"https://(www.)?patreon.com/[a-zA-Z0-9._%-]+$",icon:PatreonIcon},pinterest:{name:message("Pinterest url"),placeholder:"https://pinterest.com",inputType:"url",pattern:"https://(www.)?pinterest.com/.+",icon:PinterestIcon},spotify:{name:message("Spotify artist url"),placeholder:"https://open.spotify.com/artist/artistname",inputType:"url",pattern:"https://(www.)?open.spotify.com/artist/[a-zA-Z0-9._%-]+$",icon:SpotifyIcon},amazon:{name:message("Amazon shop url"),placeholder:"https://amazon.com/shop/yourshopname",inputType:"url",pattern:"https://(www.)?amazon.com/shop/[a-zA-Z0-9._%-]+$",icon:AmazonIcon},snapchat:{name:message("Snapchat url"),placeholder:"https://www.snapchat.com/add/yourusername",inputType:"url",pattern:"https://(www.)?snapchat.com/add/[a-zA-Z0-9_--%]+$",icon:SnapchatIcon},apple:{name:message("Apple music url"),placeholder:"https://music.apple.com/us/album/youralbum",inputType:"url",pattern:"https://(www.)?music.apple.com/.+",icon:AppleIcon}};function SocialsWidgetRenderer({widget:s,variant:i}){return jsxRuntimeExports.jsx("div",{className:clsx$1("flex flex-wrap items-center gap-y-8",i==="editor"?"gap-x-14 mt-4 text-muted":"gap-x-2 mt-20 mb-26 justify-center"),children:Object.entries(s.config).map(([a,c])=>{const d=SocialsList[a].icon;return d?i==="editor"?jsxRuntimeExports.jsx(d,{},a):jsxRuntimeExports.jsx(IconButton,{className:"flex-shrink-0",elementType:"a",href:buildUrl(a,c),children:jsxRuntimeExports.jsx(d,{})},a):null})})}function buildUrl(s,i){return!i||isAbsoluteUrl(i)?i:s===SocialsType.Twitter?`https://twitter.com/${i.replace("@","")}`:s===SocialsType.Instagram?`https://instagram.com/${i.replace("@","")}`:s===SocialsType.Tiktok?`https://tiktok.com/${i}`:s===SocialsType.Mail?`mailto:${i}`:s===SocialsType.Whatsapp?`https://api.whatsapp.com/send?phone=${i}`:i}function TwitchWidgetRenderer({widget:s,variant:i}){const{base_url:a}=useSettings();if(!s.config.url)return null;const c=getTwitchEmbedUrl(s.config.url,a);return jsxRuntimeExports.jsx(VideoEmbedWidgetRenderer,{variant:i,embedUrl:c})}function getTwitchEmbedUrl(s,i){var d;i=removeProtocol(i);let a;const c=(d=new URL(s).pathname.split("/").pop())==null?void 0:d.trim();return s.includes("clip")?a=`https://clips.twitch.tv/embed?clip=${c}`:a=`https://player.twitch.tv/?channel=${c}`,`${a}&parent=${i}`}function SoundcloudWidgetRenderer({widget:s,variant:i}){return s.config.url?jsxRuntimeExports.jsx(VideoEmbedWidgetRenderer,{variant:i,embedUrl:s.config.embedUrl}):null}function VimeoWidgetRenderer({widget:s,variant:i}){if(!s.config.url)return null;const{id:a}=getVideoId(s.config.url),c=`https://player.vimeo.com/video/${a}`;return jsxRuntimeExports.jsx(VideoEmbedWidgetRenderer,{variant:i,embedUrl:c})}function decode(s){return decodeURIComponent(s).replace(/\+/g," ")}function encode(s){return escape(s.replace(/ /g,"+"))}class SpotifyUri{constructor(i){Ft(this,"uri");this.uri=i}static is(i){return typeof i=="object"&&typeof i.uri=="string"}toEmbedURL(){return`https://embed.spotify.com/?uri=${this.toURI()}`}toOpenURL(){return`https://open.spotify.com${this.toURL()}`}toPlayURL(){return`https://play.spotify.com${this.toURL()}`}}class Local extends SpotifyUri{constructor(a,c,d,g,$){super(a);Ft(this,"type","local");Ft(this,"artist");Ft(this,"album");Ft(this,"track");Ft(this,"seconds");this.artist=c,this.album=d,this.track=g,this.seconds=$}static is(a){return typeof a=="object"&&a.type==="local"}toURI(){return`spotify:local:${encode(this.artist)}:${encode(this.album)}:${encode(this.track)}:${this.seconds}`}toURL(){return`/local/${encode(this.artist)}/${encode(this.album)}/${encode(this.track)}/${this.seconds}`}}class Search extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","search");Ft(this,"query");this.query=c}static is(a){return typeof a=="object"&&a.type==="search"}toURI(){return`spotify:search:${encode(this.query)}`}toURL(){return`/search/${encode(this.query)}`}}class Playlist extends SpotifyUri{constructor(a,c,d){super(a);Ft(this,"type","playlist");Ft(this,"id");Ft(this,"user");this.id=c,typeof d=="string"&&(this.user=d)}static is(a){return typeof a=="object"&&a.type==="playlist"}toURI(){return this.user!==void 0?this.id==="starred"?`spotify:user:${encode(this.user)}:${encode(this.id)}`:`spotify:user:${encode(this.user)}:playlist:${encode(this.id)}`:`spotify:playlist:${encode(this.id)}`}toURL(){return this.user!==void 0?this.id==="starred"?`/user/${encode(this.user)}/${encode(this.id)}`:`/user/${encode(this.user)}/playlist/${encode(this.id)}`:`/playlist/${encode(this.id)}`}}class Artist extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","artist");Ft(this,"id");this.id=c}static is(a){return typeof a=="object"&&a.type==="artist"}toURI(){return`spotify:${this.type}:${encode(this.id)}`}toURL(){return`/${this.type}/${encode(this.id)}`}}class Album extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","album");Ft(this,"id");this.id=c}static is(a){return typeof a=="object"&&a.type==="album"}toURI(){return`spotify:${this.type}:${encode(this.id)}`}toURL(){return`/${this.type}/${encode(this.id)}`}}class Track extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","track");Ft(this,"id");this.id=c}static is(a){return typeof a=="object"&&a.type==="track"}toURI(){return`spotify:${this.type}:${encode(this.id)}`}toURL(){return`/${this.type}/${encode(this.id)}`}}class Episode extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","episode");Ft(this,"id");this.id=c}static is(a){return typeof a=="object"&&a.type==="episode"}toURI(){return`spotify:${this.type}:${encode(this.id)}`}toURL(){return`/${this.type}/${encode(this.id)}`}}class Show extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","show");Ft(this,"id");this.id=c}static is(a){return typeof a=="object"&&a.type==="show"}toURI(){return`spotify:${this.type}:${encode(this.id)}`}toURL(){return`/${this.type}/${encode(this.id)}`}}class User extends SpotifyUri{constructor(a,c){super(a);Ft(this,"type","user");Ft(this,"user");this.user=c}static is(a){return typeof a=="object"&&a.type==="user"}toURI(){return`spotify:${this.type}:${encode(this.user)}`}toURL(){return`/${this.type}/${encode(this.user)}`}}function parse(s){const i=SpotifyUri.is(s)?s.uri:s,{protocol:a,hostname:c,pathname:d="/",searchParams:g}=new URL(i);if(c==="embed.spotify.com"){const j=Object.fromEntries(g);if(typeof j.uri!="string")throw new Error("fo");return parse(j.uri)}if(a==="spotify:"){const j=i.split(":");return parseParts(i,j)}if(d===null)throw new TypeError("No pathname");const $=d.split("/");return parseParts(i,$)}function parseParts(s,i){const a=i.length;if(i[1]==="embed"&&(i=i.slice(1)),i[1]==="search")return new Search(s,decode(i.slice(2).join(":")));if(a>=3&&i[1]==="local")return new Local(s,decode(i[2]),decode(i[3]),decode(i[4]),+i[5]);if(a===3&&i[1]==="playlist")return new Playlist(s,decode(i[2]));if(a===3&&i[1]==="user")return new User(s,decode(i[2]));if(a>=5)return new Playlist(s,decode(i[4]),decode(i[2]));if(a>=4&&i[3]==="starred")return new Playlist(s,"starred",decode(i[2]));if(i[1]==="artist")return new Artist(s,i[2]);if(i[1]==="album")return new Album(s,i[2]);if(i[1]==="track")return new Track(s,i[2]);if(i[1]==="episode")return new Episode(s,i[2]);if(i[1]==="show")return new Show(s,i[2]);if(i[1]==="playlist")return new Playlist(s,i[2]);throw new TypeError(`Could not determine type for: ${s}`)}function formatEmbedURL(s){return(typeof s=="string"?parse(s):s).toEmbedURL()}function SpotifyWidgetRenderer({widget:s,variant:i}){if(!s.config.url)return null;if(i==="editor")return jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-8",children:[jsxRuntimeExports.jsx(RemoteFavicon,{url:s.config.url}),jsxRuntimeExports.jsx("a",{href:s.config.url,target:"_blank",className:"text-muted text-sm hover:underline whitespace-nowrap overflow-hidden overflow-ellipsis max-w-[80%]",rel:"noreferrer",children:s.config.url})]});const a=formatEmbedURL(s.config.url);return jsxRuntimeExports.jsx("iframe",{className:clsx$1("w-full rounded shadow-lg",getEmbedHeight(s.config.type)),loading:"lazy",src:a,allow:"autoplay; encrypted-media; picture-in-picture",allowFullScreen:!0})}function getEmbedHeight(s){switch(s){case"track":return"h-80";default:return"h-[152px]"}}const tiktokImage=""+new URL("tiktok-956e4d3e.png",import.meta.url).href;function TiktokWidgetRenderer({widget:s,variant:i}){var c;if(reactExports.useEffect(()=>{lazyLoader.loadAsset("https://www.tiktok.com/embed.js",{type:"js"})},[]),!s.config.url)return null;if(i==="editor")return jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-8",children:[jsxRuntimeExports.jsx(RemoteFavicon,{url:s.config.url}),jsxRuntimeExports.jsx("a",{href:s.config.url,target:"_blank",className:"text-muted text-sm hover:underline whitespace-nowrap overflow-hidden overflow-ellipsis max-w-[80%]",rel:"noreferrer",children:s.config.url})]});const a=(c=new URL(s.config.url).pathname.split("/").pop())==null?void 0:c.trim();return jsxRuntimeExports.jsx("blockquote",{"data-video-id":a,className:"tiktok-embed",children:jsxRuntimeExports.jsx("img",{src:tiktokImage,alt:""})})}var WidgetType=(s=>(s.Image="image",s.Text="text",s.Socials="socials",s.Youtube="youtube",s.Soundcloud="soundcloud",s.Vimeo="video",s.Spotify="spotify",s.Twitch="twitch",s.Tiktok="tiktok",s))(WidgetType||{});const WidgetRenderers={[WidgetType.Image]:ImageWidgetRenderer,[WidgetType.Text]:TextWidgetRenderer,[WidgetType.Socials]:SocialsWidgetRenderer,[WidgetType.Youtube]:YoutubeWidgetRenderer,[WidgetType.Soundcloud]:SoundcloudWidgetRenderer,[WidgetType.Vimeo]:VimeoWidgetRenderer,[WidgetType.Spotify]:SpotifyWidgetRenderer,[WidgetType.Twitch]:TwitchWidgetRenderer,[WidgetType.Tiktok]:TiktokWidgetRenderer};class $5b160d28a433310d$export$c17fa47878dc55b6{getStringForLocale(i,a){let c=this.strings[a];c||(c=$5b160d28a433310d$var$getStringsForLocale(a,this.strings,this.defaultLocale),this.strings[a]=c);let d=c[i];if(!d)throw new Error(`Could not find intl message ${i} in ${a} locale`);return d}constructor(i,a="en-US"){this.strings={...i},this.defaultLocale=a}}function $5b160d28a433310d$var$getStringsForLocale(s,i,a="en-US"){if(i[s])return i[s];let c=$5b160d28a433310d$var$getLanguage(s);if(i[c])return i[c];for(let d in i)if(d.startsWith(c+"-"))return i[d];return i[a]}function $5b160d28a433310d$var$getLanguage(s){return Intl.Locale?new Intl.Locale(s).language:s.split("-")[0]}function $parcel$interopDefault(s){return s&&s.__esModule?s.default:s}var $f98dad178a72c00d$exports={},$2d805fd52bb48883$exports={};$2d805fd52bb48883$exports={alpha:"ألفا",blue:"أزرق",brightness:"السطوع",green:"أخضر",hue:"درجة اللون",lightness:"الإضاءة",red:"أحمر",saturation:"التشبع"};var $6c28468dc1df643c$exports={};$6c28468dc1df643c$exports={alpha:"Алфа",blue:"Синьо",brightness:"Яркост",green:"Зелено",hue:"Оттенък",lightness:"Лекота",red:"Червено",saturation:"Наситеност"};var $807554f8230db0ed$exports={};$807554f8230db0ed$exports={alpha:"Alfa",blue:"Modrá",brightness:"Jas",green:"Zelená",hue:"Odstín",lightness:"Světlost",red:"Červená",saturation:"Sytost"};var $7097f64386f1761c$exports={};$7097f64386f1761c$exports={alpha:"Alfa",blue:"Blå",brightness:"Lysstyrke",green:"Grøn",hue:"Tone",lightness:"Lyshed",red:"Rød",saturation:"Farvemætning"};var $bdd847d8beb08799$exports={};$bdd847d8beb08799$exports={alpha:"Alpha",blue:"Blau",brightness:"Helligkeit",green:"Grün",hue:"Farbton",lightness:"Leuchtkraft",red:"Rot",saturation:"Sättigung"};var $a53e00b683950971$exports={};$a53e00b683950971$exports={alpha:"Άλφα",blue:"Μπλε",brightness:"Φωτεινότητα",green:"Πράσινο",hue:"Τόνος",lightness:"Φωτεινότητα",red:"Κόκκινο",saturation:"Κορεσμός"};var $21cdd87e84f28d89$exports={};$21cdd87e84f28d89$exports={hue:"Hue",saturation:"Saturation",lightness:"Lightness",brightness:"Brightness",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha"};var $92fee9698e4d675a$exports={};$92fee9698e4d675a$exports={alpha:"Alpha",blue:"Azul",brightness:"Brillo",green:"Verde",hue:"Tono",lightness:"Luminosidad",red:"Rojo",saturation:"Saturación"};var $7ea012e91a5ad3ee$exports={};$7ea012e91a5ad3ee$exports={alpha:"Alfa",blue:"Sinine",brightness:"Heledus",green:"Roheline",hue:"Värv",lightness:"Valgus",red:"Punane",saturation:"Küllastus"};var $8460c13bb2d75345$exports={};$8460c13bb2d75345$exports={alpha:"Alpha",blue:"Sininen",brightness:"Kirkkaus",green:"Vihreä",hue:"Sävy",lightness:"Valomäärä",red:"Punainen",saturation:"Värikylläisyys"};var $2a2d5dc14e680587$exports={};$2a2d5dc14e680587$exports={alpha:"Alpha",blue:"Bleu",brightness:"Luminosité",green:"Vert",hue:"Teinte",lightness:"Luminosité",red:"Rouge",saturation:"Saturation"};var $9a3f292371bb0589$exports={};$9a3f292371bb0589$exports={alpha:"אלפא",blue:"כחול",brightness:"בהירות",green:"ירוק",hue:"גוון",lightness:"כמות אור",red:"אדום",saturation:"רוויה"};var $4742231a685fa068$exports={};$4742231a685fa068$exports={alpha:"Alfa",blue:"Plava",brightness:"Svjetlina",green:"Zelena",hue:"Nijansa",lightness:"Osvijetljenost",red:"Crvena",saturation:"Zasićenost"};var $05e247fd2960981e$exports={};$05e247fd2960981e$exports={alpha:"Alfa",blue:"Kék",brightness:"Fényesség",green:"Zöld",hue:"Színárnyalat",lightness:"Világosság",red:"Piros",saturation:"Telítettség"};var $a67524a79ccbe190$exports={};$a67524a79ccbe190$exports={alpha:"Alfa",blue:"Blu",brightness:"Luminosità",green:"Verde",hue:"Tonalità",lightness:"Luminosità",red:"Rosso",saturation:"Saturazione"};var $a9eefe9d6c8cb7d5$exports={};$a9eefe9d6c8cb7d5$exports={alpha:"アルファ",blue:"青",brightness:"明るさ",green:"緑",hue:"色相",lightness:"明度",red:"赤",saturation:"彩度"};var $4a6b836d4f1bfaba$exports={};$4a6b836d4f1bfaba$exports={alpha:"알파",blue:"파랑",brightness:"명도",green:"초록",hue:"색조",lightness:"밝기",red:"빨강",saturation:"채도"};var $c950e4b1c482abde$exports={};$c950e4b1c482abde$exports={alpha:"Alfa",blue:"Mėlyna",brightness:"Ryškumas",green:"Žalia",hue:"Atspalvis",lightness:"Šviesumas",red:"Raudona",saturation:"Įsotinimas"};var $d10d6b60dc50b438$exports={};$d10d6b60dc50b438$exports={alpha:"Alfa",blue:"Zila",brightness:"Spilgtums",green:"Zaļa",hue:"Nokrāsa",lightness:"Gaišums",red:"Sarkana",saturation:"Piesātinājums"};var $371a732b2494f452$exports={};$371a732b2494f452$exports={alpha:"Alfa",blue:"Blå",brightness:"Lysstyrke",green:"Grønn",hue:"Fargetone",lightness:"Lyshet",red:"Rød",saturation:"Metning"};var $6d042cae6243464b$exports={};$6d042cae6243464b$exports={alpha:"Alfa",blue:"Blauw",brightness:"Helderheid",green:"Groen",hue:"Kleurtoon",lightness:"Lichtsterkte",red:"Rood",saturation:"Verzadiging"};var $d9ab5c2611e0bcd3$exports={};$d9ab5c2611e0bcd3$exports={alpha:"Alfa",blue:"Niebieski",brightness:"Jasność",green:"Zielony",hue:"Odcień",lightness:"Jaskrawość",red:"Czerwony",saturation:"Nasycenie"};var $73f77c9902e29ca6$exports={};$73f77c9902e29ca6$exports={alpha:"Alfa",blue:"Azul",brightness:"Brilho",green:"Verde",hue:"Matiz",lightness:"Luminosidade",red:"Vermelho",saturation:"Saturação"};var $4f461eb266a95c10$exports={};$4f461eb266a95c10$exports={alpha:"Alfa",blue:"Azul",brightness:"Luminosidade",green:"Verde",hue:"Tonalidade",lightness:"Claridade",red:"Vermelho",saturation:"Saturação"};var $dc46bea2f2597899$exports={};$dc46bea2f2597899$exports={alpha:"Alfa",blue:"Albastru",brightness:"Luminozitate",green:"Verde",hue:"Nuanță",lightness:"Luminozitate",red:"Roșu",saturation:"Saturație"};var $622bbd6719cc95af$exports={};$622bbd6719cc95af$exports={alpha:"Альфа",blue:"Синий",brightness:"Яркость",green:"Зеленый",hue:"Оттенок",lightness:"Освещенность",red:"Красный",saturation:"Насыщенность"};var $4da03c1ecd9a9c7d$exports={};$4da03c1ecd9a9c7d$exports={alpha:"Alfa",blue:"Modrá",brightness:"Jas",green:"Zelená",hue:"Odtieň",lightness:"Svetlosť",red:"Červená",saturation:"Sýtosť"};var $edb6b2fe456ed4e8$exports={};$edb6b2fe456ed4e8$exports={alpha:"Alfa",blue:"Modra",brightness:"Svetlost",green:"Zelena",hue:"Barva",lightness:"Lahkost",red:"Rdeča",saturation:"Nasičenost"};var $264cd81c52b30815$exports={};$264cd81c52b30815$exports={alpha:"Alfa",blue:"Plava",brightness:"Osvetljenost",green:"Zelena",hue:"Nijansa",lightness:"Osvetljenje",red:"Crvena",saturation:"Zasićenje"};var $6f80afde0270dda7$exports={};$6f80afde0270dda7$exports={alpha:"Alfa",blue:"Blått",brightness:"Ljusstyrka",green:"Grönt",hue:"Nyans",lightness:"Ljushet",red:"Rött",saturation:"Mättnad"};var $23a92651c6957668$exports={};$23a92651c6957668$exports={alpha:"Alfa",blue:"Mavi",brightness:"Parlaklık",green:"Yeşil",hue:"Ton",lightness:"Canlılık",red:"Kırmızı",saturation:"Doygunluk"};var $0f9b1074d04f4954$exports={};$0f9b1074d04f4954$exports={alpha:"Альфа",blue:"Синій",brightness:"Яскравість",green:"Зелений",hue:"Тон",lightness:"Освітленість",red:"Червоний",saturation:"Насиченість"};var $a9cedf75b94e4916$exports={};$a9cedf75b94e4916$exports={alpha:"Alpha",blue:"蓝色",brightness:"亮度",green:"绿色",hue:"色相",lightness:"明亮度",red:"红色",saturation:"饱和度"};var $37cff576474bc8d4$exports={};$37cff576474bc8d4$exports={alpha:"Alpha",blue:"藍色",brightness:"亮度",green:"綠色",hue:"色相",lightness:"明亮",red:"紅色",saturation:"飽和度"};$f98dad178a72c00d$exports={"ar-AE":$2d805fd52bb48883$exports,"bg-BG":$6c28468dc1df643c$exports,"cs-CZ":$807554f8230db0ed$exports,"da-DK":$7097f64386f1761c$exports,"de-DE":$bdd847d8beb08799$exports,"el-GR":$a53e00b683950971$exports,"en-US":$21cdd87e84f28d89$exports,"es-ES":$92fee9698e4d675a$exports,"et-EE":$7ea012e91a5ad3ee$exports,"fi-FI":$8460c13bb2d75345$exports,"fr-FR":$2a2d5dc14e680587$exports,"he-IL":$9a3f292371bb0589$exports,"hr-HR":$4742231a685fa068$exports,"hu-HU":$05e247fd2960981e$exports,"it-IT":$a67524a79ccbe190$exports,"ja-JP":$a9eefe9d6c8cb7d5$exports,"ko-KR":$4a6b836d4f1bfaba$exports,"lt-LT":$c950e4b1c482abde$exports,"lv-LV":$d10d6b60dc50b438$exports,"nb-NO":$371a732b2494f452$exports,"nl-NL":$6d042cae6243464b$exports,"pl-PL":$d9ab5c2611e0bcd3$exports,"pt-BR":$73f77c9902e29ca6$exports,"pt-PT":$4f461eb266a95c10$exports,"ro-RO":$dc46bea2f2597899$exports,"ru-RU":$622bbd6719cc95af$exports,"sk-SK":$4da03c1ecd9a9c7d$exports,"sl-SI":$edb6b2fe456ed4e8$exports,"sr-SP":$264cd81c52b30815$exports,"sv-SE":$6f80afde0270dda7$exports,"tr-TR":$23a92651c6957668$exports,"uk-UA":$0f9b1074d04f4954$exports,"zh-CN":$a9cedf75b94e4916$exports,"zh-TW":$37cff576474bc8d4$exports};const $799cddbef784668f$var$strings=new $5b160d28a433310d$export$c17fa47878dc55b6($parcel$interopDefault($f98dad178a72c00d$exports));function $799cddbef784668f$export$6e865ea70d7724f(s){let i=$799cddbef784668f$var$RGBColor.parse(s)||$799cddbef784668f$var$HSBColor.parse(s)||$799cddbef784668f$var$HSLColor.parse(s);if(i)return i;throw new Error("Invalid color value: "+s)}class $799cddbef784668f$var$Color{toHexInt(){return this.toFormat("rgb").toHexInt()}getChannelValue(i){if(i in this)return this[i];throw new Error("Unsupported color channel: "+i)}withChannelValue(i,a){if(i in this){let c=this.clone();return c[i]=a,c}throw new Error("Unsupported color channel: "+i)}getChannelName(i,a){return $799cddbef784668f$var$strings.getStringForLocale(i,a)}getColorSpaceAxes(i){let{xChannel:a,yChannel:c}=i,d=a||this.getColorChannels().find(j=>j!==c),g=c||this.getColorChannels().find(j=>j!==d),$=this.getColorChannels().find(j=>j!==d&&j!==g);return{xChannel:d,yChannel:g,zChannel:$}}}class $799cddbef784668f$var$RGBColor extends $799cddbef784668f$var$Color{static parse(i){let a=[];if(/^#[\da-f]+$/i.test(i)&&[4,5,7,9].includes(i.length)){const g=(i.length<6?i.replace(/[^#]/gi,"$&$&"):i).slice(1).split("");for(;g.length>0;)a.push(parseInt(g.splice(0,2).join(""),16));a[3]=a[3]!==void 0?a[3]/255:void 0}const c=i.match(/^rgba?\((.*)\)$/);c!=null&&c[1]&&(a=c[1].split(",").map(g=>Number(g.trim())),a=a.map((g,$)=>$9446cca9a3875146$export$7d15b64cf5a3a4c4(g,0,$<3?255:1)));var d;return a.length<3?void 0:new $799cddbef784668f$var$RGBColor(a[0],a[1],a[2],(d=a[3])!==null&&d!==void 0?d:1)}toString(i){switch(i){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;default:return this.toFormat(i).toString(i)}}toFormat(i){switch(i){case"hex":case"hexa":case"rgb":case"rgba":return this;case"hsb":case"hsba":return this.toHSB();case"hsl":case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+i)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const i=this.red/255,a=this.green/255,c=this.blue/255,d=Math.min(i,a,c),g=Math.max(i,a,c),$=g-d,j=g===0?0:$/g;let _=0;if($!==0){switch(g){case i:_=(a-c)/$+(a<c?6:0);break;case a:_=(c-i)/$+2;break;case c:_=(i-a)/$+4;break}_/=6}return new $799cddbef784668f$var$HSBColor($9446cca9a3875146$export$b6268554fba451f(_*360,2),$9446cca9a3875146$export$b6268554fba451f(j*100,2),$9446cca9a3875146$export$b6268554fba451f(g*100,2),this.alpha)}toHSL(){const i=this.red/255,a=this.green/255,c=this.blue/255,d=Math.min(i,a,c),g=Math.max(i,a,c),$=(g+d)/2,j=g-d;let _,_e;if(j===0)_=_e=0;else{switch(_e=j/($<.5?g+d:2-g-d),g){case i:_=(a-c)/j+(a<c?6:0);break;case a:_=(c-i)/j+2;break;case c:_=(i-a)/j+4;break}_/=6}return new $799cddbef784668f$var$HSLColor($9446cca9a3875146$export$b6268554fba451f(_*360,2),$9446cca9a3875146$export$b6268554fba451f(_e*100,2),$9446cca9a3875146$export$b6268554fba451f($*100,2),this.alpha)}clone(){return new $799cddbef784668f$var$RGBColor(this.red,this.green,this.blue,this.alpha)}getChannelRange(i){switch(i){case"red":case"green":case"blue":return{minValue:0,maxValue:255,step:1,pageSize:17};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+i)}}formatChannelValue(i,a){let c,d=this.getChannelValue(i);switch(i){case"red":case"green":case"blue":c={style:"decimal"};break;case"alpha":c={style:"percent"};break;default:throw new Error("Unknown color channel: "+i)}return new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(a,c).format(d)}getColorSpace(){return"rgb"}getColorChannels(){return $799cddbef784668f$var$RGBColor.colorChannels}constructor(i,a,c,d){super(),this.red=i,this.green=a,this.blue=c,this.alpha=d}}$799cddbef784668f$var$RGBColor.colorChannels=["red","green","blue"];const $799cddbef784668f$var$HSB_REGEX=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;class $799cddbef784668f$var$HSBColor extends $799cddbef784668f$var$Color{static parse(i){let a;if(a=i.match($799cddbef784668f$var$HSB_REGEX)){var c;const[d,g,$,j]=((c=a[1])!==null&&c!==void 0?c:a[2]).split(",").map(_=>Number(_.trim().replace("%","")));return new $799cddbef784668f$var$HSBColor($799cddbef784668f$var$mod(d,360),$9446cca9a3875146$export$7d15b64cf5a3a4c4(g,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4($,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4(j??1,0,1))}}toString(i){switch(i){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.brightness,2)}%, ${this.alpha})`;default:return this.toFormat(i).toString(i)}}toFormat(i){switch(i){case"hsb":case"hsba":return this;case"hsl":case"hsla":return this.toHSL();case"rgb":case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+i)}}toHSL(){let i=this.saturation/100,a=this.brightness/100,c=a*(1-i/2);return i=c===0||c===1?0:(a-c)/Math.min(c,1-c),new $799cddbef784668f$var$HSLColor($9446cca9a3875146$export$b6268554fba451f(this.hue,2),$9446cca9a3875146$export$b6268554fba451f(i*100,2),$9446cca9a3875146$export$b6268554fba451f(c*100,2),this.alpha)}toRGB(){let i=this.hue,a=this.saturation/100,c=this.brightness/100,d=(g,$=(g+i/60)%6)=>c-a*c*Math.max(Math.min($,4-$,1),0);return new $799cddbef784668f$var$RGBColor(Math.round(d(5)*255),Math.round(d(3)*255),Math.round(d(1)*255),this.alpha)}clone(){return new $799cddbef784668f$var$HSBColor(this.hue,this.saturation,this.brightness,this.alpha)}getChannelRange(i){switch(i){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+i)}}formatChannelValue(i,a){let c,d=this.getChannelValue(i);switch(i){case"hue":c={style:"unit",unit:"degree",unitDisplay:"narrow"};break;case"saturation":case"brightness":c={style:"percent"},d/=100;break;case"alpha":c={style:"percent"};break;default:throw new Error("Unknown color channel: "+i)}return new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(a,c).format(d)}getColorSpace(){return"hsb"}getColorChannels(){return $799cddbef784668f$var$HSBColor.colorChannels}constructor(i,a,c,d){super(),this.hue=i,this.saturation=a,this.brightness=c,this.alpha=d}}$799cddbef784668f$var$HSBColor.colorChannels=["hue","saturation","brightness"];const $799cddbef784668f$var$HSL_REGEX=/hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;function $799cddbef784668f$var$mod(s,i){return(s%i+i)%i}class $799cddbef784668f$var$HSLColor extends $799cddbef784668f$var$Color{static parse(i){let a;if(a=i.match($799cddbef784668f$var$HSL_REGEX)){var c;const[d,g,$,j]=((c=a[1])!==null&&c!==void 0?c:a[2]).split(",").map(_=>Number(_.trim().replace("%","")));return new $799cddbef784668f$var$HSLColor($799cddbef784668f$var$mod(d,360),$9446cca9a3875146$export$7d15b64cf5a3a4c4(g,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4($,0,100),$9446cca9a3875146$export$7d15b64cf5a3a4c4(j??1,0,1))}}toString(i){switch(i){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${$9446cca9a3875146$export$b6268554fba451f(this.saturation,2)}%, ${$9446cca9a3875146$export$b6268554fba451f(this.lightness,2)}%, ${this.alpha})`;default:return this.toFormat(i).toString(i)}}toFormat(i){switch(i){case"hsl":case"hsla":return this;case"hsb":case"hsba":return this.toHSB();case"rgb":case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+i)}}toHSB(){let i=this.saturation/100,a=this.lightness/100,c=a+i*Math.min(a,1-a);return i=c===0?0:2*(1-a/c),new $799cddbef784668f$var$HSBColor($9446cca9a3875146$export$b6268554fba451f(this.hue,2),$9446cca9a3875146$export$b6268554fba451f(i*100,2),$9446cca9a3875146$export$b6268554fba451f(c*100,2),this.alpha)}toRGB(){let i=this.hue,a=this.saturation/100,c=this.lightness/100,d=a*Math.min(c,1-c),g=($,j=($+i/30)%12)=>c-d*Math.max(Math.min(j-3,9-j,1),-1);return new $799cddbef784668f$var$RGBColor(Math.round(g(0)*255),Math.round(g(8)*255),Math.round(g(4)*255),this.alpha)}clone(){return new $799cddbef784668f$var$HSLColor(this.hue,this.saturation,this.lightness,this.alpha)}getChannelRange(i){switch(i){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+i)}}formatChannelValue(i,a){let c,d=this.getChannelValue(i);switch(i){case"hue":c={style:"unit",unit:"degree",unitDisplay:"narrow"};break;case"saturation":case"lightness":c={style:"percent"},d/=100;break;case"alpha":c={style:"percent"};break;default:throw new Error("Unknown color channel: "+i)}return new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(a,c).format(d)}getColorSpace(){return"hsl"}getColorChannels(){return $799cddbef784668f$var$HSLColor.colorChannels}constructor(i,a,c,d){super(),this.hue=i,this.saturation=a,this.lightness=c,this.alpha=d}}$799cddbef784668f$var$HSLColor.colorChannels=["hue","saturation","lightness"];$799cddbef784668f$export$6e865ea70d7724f("#ffffff");$799cddbef784668f$export$6e865ea70d7724f("hsl(0, 100%, 50%)");const $b335ada08155d9c0$var$MIN_COLOR=$799cddbef784668f$export$6e865ea70d7724f("#000000"),$b335ada08155d9c0$var$MAX_COLOR=$799cddbef784668f$export$6e865ea70d7724f("#FFFFFF");$b335ada08155d9c0$var$MIN_COLOR.toHexInt();$b335ada08155d9c0$var$MAX_COLOR.toHexInt();function getColorBrightness(s){const i=$799cddbef784668f$export$6e865ea70d7724f(s).toFormat("rgb"),a=i.getChannelValue("red"),c=i.getChannelValue("green"),d=i.getChannelValue("blue");return(a*299+c*587+d*114)/1e3}function BiolinkLayout({biolink:s,className:i,appearance:a,enableLinkAnimations:c,showAds:d}){var g,$;return a=a||((g=s.appearance)==null?void 0:g.config),reactExports.useEffect(()=>{const j="biolink-fonts";a!=null&&a.fontConfig&&loadFonts([a==null?void 0:a.fontConfig],{id:j})},[a==null?void 0:a.fontConfig]),reactExports.useEffect(()=>{const j=s.content.some(_=>_.model_type==="link"&&_.animation);c&&j&&__vitePreload(()=>Promise.resolve({}),["./animate.min-a0f1ac67.css"],import.meta.url)},[c,s.content]),jsxRuntimeExports.jsx("div",{className:"h-screen overflow-y-auto",style:{...cssPropsFromBgConfig(a==null?void 0:a.bgConfig),fontFamily:($=a==null?void 0:a.fontConfig)==null?void 0:$.family},children:jsxRuntimeExports.jsxs("div",{className:clsx$1("flex flex-col px-12 py-34 w-full h-full",i),children:[jsxRuntimeExports.jsxs("div",{className:"flex-auto",children:[d&&jsxRuntimeExports.jsx(AdHost,{slot:"biolink_top",className:"mb-60"}),s.content.map(j=>{if(!j.active)return null;const _=`${j.model_type}-${j.id}`;let _e;if(j.model_type==="link")_e=jsxRuntimeExports.jsx(LinkButton,{appearance:a,link:j});else{const et=WidgetRenderers[j.type];_e=jsxRuntimeExports.jsx(et,{widget:j,variant:"biolinkPage"})}return jsxRuntimeExports.jsx("div",{className:"mb-14 w-full",children:_e},_)})]}),jsxRuntimeExports.jsx(Branding,{appearance:a})]})})}function LinkButton({link:s,appearance:i}){var _,_e,et,tt,rt;const a=((_=i==null?void 0:i.btnConfig)==null?void 0:_.variant)??"flat",c=((_e=i==null?void 0:i.btnConfig)==null?void 0:_e.radius)??"rounded",d=((et=i==null?void 0:i.btnConfig)==null?void 0:et.shadow)??void 0,g=((tt=i==null?void 0:i.btnConfig)==null?void 0:tt.color)??"primary",$=((rt=i==null?void 0:i.btnConfig)==null?void 0:rt.textColor)??void 0,j=g!=="primary"&&g!=="paper";return jsxRuntimeExports.jsx(Button,{className:clsx$1("w-full min-h-54 break-words hyphens-auto",s.animation&&`animate__animated animate__${s.animation}`),variant:a,radius:c,color:j?null:g,startIcon:s.image?jsxRuntimeExports.jsx("img",{className:"w-24 h-24 object-cover rounded",src:s.image,alt:""}):void 0,whitespace:"whitespace-normal",elementType:"a",href:s.short_url,target:"_blank",style:{boxShadow:d,backgroundColor:j?g:void 0,borderColor:j?g:void 0,color:$},children:s.name})}function Branding({appearance:s}){var $,j;const{branding:i,biolink:a}=useSettings();let c=a==null?void 0:a.branding_img;const{trans:d}=useTrans();let g=useIsDarkMode();return s!=null&&s.hideBranding?null:(($=s==null?void 0:s.bgConfig)!=null&&$.color&&(g=getColorBrightness((j=s==null?void 0:s.bgConfig)==null?void 0:j.color)>100),c||(c=g?i.logo_light:i.logo_dark),jsxRuntimeExports.jsx("div",{className:"flex-shrink-0",children:jsxRuntimeExports.jsx(Link,{to:"/",children:jsxRuntimeExports.jsx("img",{className:"w-auto h-24 mx-auto",src:c,alt:d(message(":site logo",{values:{site:i.site_name}}))})})}))}function BiolinkRenderer({biolink:s}){return jsxRuntimeExports.jsx(BiolinkLayout,{biolink:s,enableLinkAnimations:!0,showAds:!0,className:"max-w-680 mx-auto"})}function useCheckLinkPassword(s,i){return useMutation({mutationFn:a=>checkPassword(s,a),onError:a=>onFormQueryError(a,i)})}function checkPassword(s,i){return apiClient.post("links/check-password",{...i,linkeableType:s.model_type,linkeableId:s.id}).then(a=>a.data)}function PasswordPage({linkeable:s,onPasswordValid:i}){const{trans:a}=useTrans(),c=a({message:"Password"}),d=useForm(),g=useCheckLinkPassword(s,d);return jsxRuntimeExports.jsx("div",{className:"flex h-screen w-full items-center justify-center bg-alt",children:jsxRuntimeExports.jsxs("div",{className:"m-14 flex max-w-[560px] flex-col items-center gap-40 rounded border bg p-24 md:flex-row md:gap-14",children:[jsxRuntimeExports.jsx("div",{className:"h-132 w-[165px]",children:jsxRuntimeExports.jsx(SvgImage,{src:secureFilesSvg})}),jsxRuntimeExports.jsxs(Form,{form:d,onSubmit:$=>{g.mutate($,{onSuccess:i})},children:[jsxRuntimeExports.jsx("span",{className:"text-sm",children:s.model_type==="biolink"?jsxRuntimeExports.jsx(Trans,{message:"The biolink you are trying to access is password protected."}):jsxRuntimeExports.jsx(Trans,{message:"The link you are trying to access is password protected."})}),jsxRuntimeExports.jsx(FormTextField,{name:"password",autoFocus:!0,placeholder:c,"aria-label":c,className:"mb-20 mt-10",type:"password",required:!0}),jsxRuntimeExports.jsx("div",{className:"text-right",children:jsxRuntimeExports.jsx(Button,{variant:"flat",color:"primary",type:"submit",className:"w-full md:w-auto",disabled:g.isPending,children:jsxRuntimeExports.jsx(Trans,{message:"Enter"})})})]})]})})}function LinkeableRenderer({linkeable:s}){const[i,a]=reactExports.useState(!s.has_password);return s.has_password&&!i?jsxRuntimeExports.jsx(PasswordPage,{linkeable:s,onPasswordValid:()=>a(!0)}):getLinkeableRenderer(s)}function getLinkeableRenderer(s){switch(s.model_type){case"link":return getLinkRenderer(s);case"linkGroup":return jsxRuntimeExports.jsx(LinkGroupRenderer,{linkGroup:s});case"biolink":return jsxRuntimeExports.jsx(BiolinkRenderer,{biolink:s});default:return jsxRuntimeExports.jsx(NotFoundPage,{})}}function getLinkRenderer(s){switch(s.type){case"frame":return jsxRuntimeExports.jsx(LinkIframeRenderer,{link:s});case"overlay":return jsxRuntimeExports.jsx(LinkOverlayRenderer,{link:s});case"splash":return jsxRuntimeExports.jsx(LinkSplashRenderer,{link:s});case"page":return jsxRuntimeExports.jsx(LinkPageRenderer,{link:s});case"direct":return window.location.replace(s.long_url),null;default:return jsxRuntimeExports.jsx(NotFoundPage,{})}}const AdminRoutes=React.lazy(()=>__vitePreload(()=>import("./admin-routes-8ec576e2.js").then(s=>s.h),["./admin-routes-8ec576e2.js","./dashboard-routes-63fde3df.js","./Edit-b651a781.js","./use-resume-subscription-c9a817ba.js"],import.meta.url)),SwaggerApiDocs=React.lazy(()=>__vitePreload(()=>import("./swagger-api-docs-page-e6d6385a.js"),["./swagger-api-docs-page-e6d6385a.js","./index-848fa251.js","./swagger-api-docs-page-34ffaf07.css"],import.meta.url)),DashboardRoutes=React.lazy(()=>__vitePreload(()=>import("./dashboard-routes-63fde3df.js").then(s=>s.a$),["./dashboard-routes-63fde3df.js","./Edit-b651a781.js"],import.meta.url));function AppRoutes(){var _e;const{billing:s,notifications:i,require_email_confirmation:a,api:c}=useSettings(),{user:d,hasPermission:g}=useAuth(),{pathname:$}=useLocation(),j=(_e=getBootstrapData().loaders)==null?void 0:_e.linkeablePage,_=$.replace(/^\/|\/$/g,"");return j&&_===j.path?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(CookieNotice,{}),jsxRuntimeExports.jsx(ToastContainer,{}),jsxRuntimeExports.jsx(LinkeableRenderer,{linkeable:j.linkeable}),jsxRuntimeExports.jsx(DialogStoreOutlet,{})]}):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:"/dashboard/*",element:jsxRuntimeExports.jsx(React.Suspense,{fallback:jsxRuntimeExports.jsx(FullPageLoader,{screen:!0}),children:jsxRuntimeExports.jsx(ActiveWorkspaceProvider,{children:jsxRuntimeExports.jsx(DashboardRoutes,{})})})}),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,{})]})}React.lazy(()=>__vitePreload(()=>import("./admin-routes-8ec576e2.js").then(s=>s.h),["./admin-routes-8ec576e2.js","./dashboard-routes-63fde3df.js","./Edit-b651a781.js","./use-resume-subscription-c9a817ba.js"],import.meta.url));React.lazy(()=>__vitePreload(()=>import("./swagger-api-docs-page-e6d6385a.js"),["./swagger-api-docs-page-e6d6385a.js","./index-848fa251.js","./swagger-api-docs-page-34ffaf07.css"],import.meta.url));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 $,reactExports as A,Button as B,CustomMenu as C,Dialog as D,useFieldArray as E,Form as F,FormImageSelector as G,useValueLists as H,IconButton as I,DoneAllIcon as J,List as K,Link as L,ListItem as M,TextField as N,Outlet as O,produce as P,useController as Q,React as R,$3ef42575df84b30b$export$9d1611c77c2fe928 as S,Trans as T,AnimatePresence as U,m$1 as V,opacityAnimation as W,Skeleton as X,useFormContext as Y,createSvgIconFromTree as Z,__vitePreload as _,createSvgIcon as a,FormattedPrice as a$,FormSelect as a0,Item$1 as a1,Section as a2,getInputFieldClassNames as a3,useNumberFormatter as a4,$03deb23ff14920c4$export$4eaf04e54aa8eed6 as a5,$9446cca9a3875146$export$cb6e0bb50bc19463 as a6,clamp$1 as a7,$df56164dff5785e2$export$4338b53315abf666 as a8,createEventHandler as a9,SelectForwardRef as aA,dot as aB,ProgressBar as aC,LinkIcon as aD,ExternalLink as aE,$799cddbef784668f$export$6e865ea70d7724f as aF,MenuTrigger as aG,Menu as aH,RemoteFavicon as aI,removeProtocol as aJ,FormRadioGroup as aK,FormRadio as aL,DateFormatPresets as aM,memoize as aN,prettyBytes as aO,useSocialLogin as aP,useField as aQ,Field as aR,useResendVerificationEmail as aS,useUser as aT,useUploadAvatar as aU,useRemoveAvatar as aV,reactDomExports as aW,SearchIcon as aX,isAbsoluteUrl as aY,useMediaQuery as aZ,useProducts as a_,ButtonBase as aa,deepMerge as ab,create as ac,immer as ad,useQuery as ae,useLocation as af,MixedText as ag,useAppearanceEditorMode as ah,Navigate as ai,StaticPageTitle as aj,FileUploadProvider as ak,ProgressCircle as al,useNavigate$1 as am,nanoid as an,useParams as ao,IllustratedMessage as ap,SvgImage as aq,useNavigate as ar,useBootstrapData as as,NavLink as at,useQueryClient as au,FullPageLoader as av,LinkStyle as aw,SiteConfigContext as ax,getBootstrapData as ay,useIsMobileMediaQuery as az,useMutation as b,AvatarPlaceholderIcon as b$,FormattedNumber as b0,keepPreviousData as b1,useOutletContext as b2,useCustomPage as b3,PageMetaTags as b4,PageStatus as b5,FormProvider as b6,useRoutes as b7,AuthRoute as b8,NotFoundPage as b9,$14e0f24ef4ac5c92$export$5c333a116e949cdd as bA,$14e0f24ef4ac5c92$export$ea39ec197993aef0 as bB,$11d87f3f76e88657$export$93522d1a439f3617 as bC,$14e0f24ef4ac5c92$export$a18c89cbd24170ff as bD,useSelectedLocale as bE,$9bf71ea28793e738$export$10c5169755ce7bd7 as bF,useDateFormatter as bG,$6c7bd7858deea686$export$cd11ab140839f11d as bH,$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3 as bI,$14e0f24ef4ac5c92$export$b2f4953d301981d5 as bJ,$14e0f24ef4ac5c92$export$5412ac11713b72ad as bK,$14e0f24ef4ac5c92$export$2061056d06d7cdf7 as bL,$14e0f24ef4ac5c92$export$629b0a497aa65267 as bM,$14e0f24ef4ac5c92$export$ccc1b2479e7dd654 as bN,shallowEqual as bO,$fae977aafc393c5c$export$5adfdab05168c219 as bP,useAutoFocus as bQ,$fae977aafc393c5c$export$8e384432362ed0f0 as bR,useSearchParams as bS,$c87311424ea30a05$export$9ac100e40613ea10 as bT,$9bf71ea28793e738$export$2d6ec8fc375ceafa as bU,$7215afc6de606d6b$export$de79e2c695e052f3 as bV,useIsDarkMode as bW,Checkbox as bX,$e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as bY,hasNextPage as bZ,ArrowDropDownIcon as b_,getDefaultExportFromCjs as ba,commonjsGlobal as bb,getAugmentedNamespace as bc,shimExports as bd,copyToClipboard as be,ReactDOM as bf,URL$1 as bg,Navbar as bh,Footer as bi,getFromLocalStorage as bj,setInLocalStorage as bk,Underlay as bl,$14e0f24ef4ac5c92$export$aa8b41735afcabd2 as bm,$14e0f24ef4ac5c92$export$461939dd4422153 as bn,$14e0f24ef4ac5c92$export$42c81a444fbfb5d4 as bo,$14e0f24ef4ac5c92$export$ef8b6d9133084f4e as bp,$14e0f24ef4ac5c92$export$a5a3b454ada2268e as bq,$14e0f24ef4ac5c92$export$a2258d9c4118825c as br,$14e0f24ef4ac5c92$export$f91e89d3d0406102 as bs,$14e0f24ef4ac5c92$export$8b7aa55c66d5569e as bt,$9bf71ea28793e738$export$20e40289641fbbb6 as bu,$9bf71ea28793e738$export$c5251b9e124bf29 as bv,$35ea8db9cb2ccb90$export$99faa760c7908e4f as bw,useUserTimezone as bx,$11d87f3f76e88657$export$84c95a83c799e074 as by,$14e0f24ef4ac5c92$export$a75f2bff57811055 as bz,clsx$1 as c,ComputerIcon as c$,useListbox as c0,$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as c1,Listbox as c2,Popover as c3,KeyboardArrowDownIcon as c4,useListboxKeyboardNavigation as c5,UploadedFile as c6,$62d8ded9296f3872$export$cfa2225e87938781 as c7,WorkspaceQueryKeys as c8,useActiveWorkspaceId as c9,BiolinkLayout as cA,RadioGroup as cB,Radio as cC,cssPropsFromBgConfig as cD,useCollator as cE,loadFonts as cF,notifySvg as cG,useActiveUpload as cH,UploadInputType as cI,Disk as cJ,BillingCycleRadio as cK,findBestPrice as cL,FormattedCurrency as cM,Routes as cN,Route as cO,$1dbecbe27a04f9af$export$14d238f342723f25 as cP,$9daab02d461809db$export$683480f191c0e3ea as cQ,removeFromLocalStorage as cR,LocaleSwitcher as cS,ProductFeatureList as cT,ErrorIcon as cU,useCallbackRef as cV,AccountCircleIcon as cW,AddAPhotoIcon as cX,ApiIcon as cY,CheckBoxOutlineBlankIcon as cZ,CheckCircleIcon as c_,useAuth as ca,PersonalWorkspace as cb,ExitToAppIcon as cc,useUserWorkspaces as cd,openDialog as ce,ProgressBarBase as cf,AdHost as cg,useThemeSelector as ch,$fb18d541ea1ad717$export$ad991b66133851cf as ci,lazyLoader as cj,prefetchValueLists as ck,LockIcon as cl,SettingsIcon as cm,urlIsValid as cn,removeEmptyValuesFromObject as co,useRecaptcha as cp,LinkClipboardButton as cq,ShareLinkButton as cr,shareLink as cs,WarningIcon as ct,FloatingLinkOverlay as cu,ImageIcon as cv,getVideoId as cw,SocialsList as cx,parse as cy,WidgetRenderers as cz,apiClient as d,DangerousIcon as d0,DarkModeIcon as d1,DevicesIcon as d2,EmailIcon as d3,ErrorOutlineIcon as d4,FileDownloadDoneIcon as d5,ForumIcon as d6,GroupAddIcon as d7,LanguageIcon as d8,LightModeIcon as d9,TelegramIcon as dA,TiktokIcon as dB,TwitchIcon as dC,TwitterIcon as dD,WhatsappIcon as dE,YoutubeIcon as dF,LightbulbIcon as da,MenuIcon as db,MouseIcon as dc,NotificationsIcon as dd,PaymentsIcon as de,PeopleIcon as df,PersonIcon as dg,PhonelinkLockIcon as dh,QrCode2Icon as di,ShareIcon as dj,SmartphoneIcon as dk,TabletIcon as dl,elementToTree as dm,AmazonIcon as dn,AppleIcon as dp,BandcampIcon as dq,EnvatoIcon as dr,FacebookIcon as ds,InstagramIcon as dt,LinkedinIcon as du,PatreonIcon as dv,PinterestIcon as dw,SnapchatIcon as dx,SoundcloudIcon as dy,SpotifyIcon as dz,useTrans as e,useDialogContext as f,useForm as g,DialogHeader as h,DialogBody as i,jsxRuntimeExports as j,FormTextField as k,DialogFooter as l,message as m,CheckIcon as n,onFormQueryError as o,CloseIcon as p,queryClient as q,Chip as r,showHttpErrorToast as s,toast as t,useSettings as u,FormattedDate as v,Tooltip as w,DialogTrigger as x,ConfirmationDialog as y,LoginIcon as z};
//# sourceMappingURL=main-96065a7f.js.map